-
Notifications
You must be signed in to change notification settings - Fork 90
Acyclic types are inhabited #1503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Acyclic types are inhabited #1503
Conversation
Co-authored-by: Fredrik Bakke <fredrbak@gmail.com>
…acewhale/agda-unimath into Acyclic-types-are-inhabited
Co-authored-by: Fredrik Bakke <fredrbak@gmail.com>
…acewhale/agda-unimath into Acyclic-types-are-inhabited
Co-authored-by: Fredrik Bakke <fredrbak@gmail.com>
### 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 | ||
``` |
There was a problem hiding this comment.
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.
src/synthetic-homotopy-theory/suspensions-of-propositions.lagda.md
Outdated
Show resolved
Hide resolved
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 !} |
There was a problem hiding this comment.
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.
What's advertised on the tin. As bonus lemmas, we show that
X
is inhabited iffΣ X
is 0-connected, and is propositionally decidable ifftrunc-Set (Σ X)
is finite.