Skip to content

Conversation

djspacewhale
Copy link
Contributor

What's advertised on the tin. As bonus lemmas, we show that X is inhabited iff Σ X is 0-connected, and is propositionally decidable iff trunc-Set (Σ X) is finite.

Comment on lines +199 to +221
### The space of sections of `f : A B` is equivalent to the space of dependent maps `(b : B) fiber f b`

```agda
module _
{l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A B)
where

section-dependent-fiber : section f (b : B) fiber f b
pr1 (section-dependent-fiber (g , s) b) = g b
pr2 (section-dependent-fiber (g , s) b) = s b

dependent-fiber-section : ((b : B) fiber f b) section f
pr1 (dependent-fiber-section g) b = pr1 (g b)
pr2 (dependent-fiber-section g) b = pr2 (g b)

equiv-section-dependent-fiber :
section f ≃ ((b : B) fiber f b)
pr1 equiv-section-dependent-fiber = section-dependent-fiber
pr1 (pr1 (pr2 equiv-section-dependent-fiber)) = dependent-fiber-section
pr2 (pr1 (pr2 equiv-section-dependent-fiber)) = refl-htpy
pr1 (pr2 (pr2 equiv-section-dependent-fiber)) = dependent-fiber-section
pr2 (pr2 (pr2 equiv-section-dependent-fiber)) = refl-htpy
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this is already formalized in foundation.split-surjective-maps:

Maybe you could add a link to that file in a ## See also section? See how this section is formatted elsewhere for inspiration.

Comment on lines 863 to 885
is-inhabited-or-empty-is-finite-suspension :
is-finite (type-trunc-Set (suspension X)) is-inhabited-or-empty X
is-inhabited-or-empty-is-finite-suspension p with number-of-elements-is-finite p in eq
... | 0 =
ex-falso
( is-nonempty-is-inhabited
( is-inhabited-suspension X)
( is-empty-set-truncation-is-empty
( is-empty-is-zero-number-of-elements-is-finite p eq)))
... | 1 =
inl
( is-inhabited-suspension-is-0-connected
( X)
( is-contr-is-one-number-of-elements-is-finite p eq))
... | 2 =
inr
( is-empty-trunc-suspension-has-two-elements
( map-inv-equiv-has-cardinality-id-number-of-elements-is-finite
( type-trunc-Set (suspension X))
( p)
( 2)
( eq)))
... | succ-ℕ (succ-ℕ (succ-ℕ n)) = ex-falso {! is-upper-bound-finite-enumeration !}
Copy link
Collaborator

@fredrik-bakke fredrik-bakke Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using a with abstraction, you should instead define a lemma

  is-decidable-has-count-trunc-set-suspension :
    count (type-trunc-Set (suspension X)) → is-decidable X

and then instantiate the present theorem at that lemma to get your result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants