-
Notifications
You must be signed in to change notification settings - Fork 97
Univalent groupoids #651
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
Open
TOTBWF
wants to merge
7
commits into
main
Choose a base branch
from
univalent-groupoids
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Univalent groupoids #651
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
58d69e6
chore: add versions of equiv composition lemmas with better defeqs
TOTBWF ac70fb7
def: lemma for projections out of subtypes
TOTBWF 73a75a1
def: isomorphisms are equivalent to a sigma type
TOTBWF 7ac75f0
def: univalent groupoids
TOTBWF 81d2510
def: prove that some categories are univalent groupoids
TOTBWF fc8ef27
def: products of univalent groupoids are univalent groupoids
TOTBWF 403998c
prose: fix typos
TOTBWF File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,20 +23,113 @@ is-pregroupoid C = ∀ {x y} (f : Hom x y) → is-invertible f | |||||||
| ``` | ||||||||
|
|
||||||||
| <!-- | ||||||||
| ```agda | ||||||||
| module _ {o ℓ} (C : Precategory o ℓ) (gpd : is-pregroupoid C) where | ||||||||
| ``` | ||||||||
| --> | ||||||||
|
|
||||||||
| Of course, the [[opposite]] of a groupoid is a groupoid. | ||||||||
|
|
||||||||
| ```agda | ||||||||
| ^op-pregroupoid : is-pregroupoid (C ^op) | ||||||||
| ^op-pregroupoid f = invertible→co-invertible C (gpd f) | ||||||||
| ``` | ||||||||
|
|
||||||||
| If $\cC$ is a pregroupoid, then the map $x \iso y \to \cC(x,y)$ that | ||||||||
| forgets the inverse is an [[equivalence]]. | ||||||||
|
|
||||||||
| ```agda | ||||||||
| module is-pregroupoid {o ℓ} (C : Precategory o ℓ) (gpd : is-pregroupoid C) where | ||||||||
| open Cat.Reasoning C | ||||||||
|
|
||||||||
| forget-iso-is-equiv : ∀ {x y} → is-equiv (λ (f : x ≅ y) → f .to) | ||||||||
| ``` | ||||||||
|
|
||||||||
| First, recall that being invertible is a [[property]] of morphisms. | ||||||||
| This means that the first projection `Σ[ f ∈ Hom x y ] is-invertible f → Hom x y` | ||||||||
| must be an equivalence, as all of the fibres are prop-valued | ||||||||
| and inhabited. Moreover, the type of isomorphisms $x \iso y$ is equivalent | ||||||||
| to the above sigma type, so 2-out-of-3 for equivalences gives us our desired | ||||||||
| result. | ||||||||
|
|
||||||||
| ```agda | ||||||||
| forget-iso-is-equiv {x} {y} = | ||||||||
| equiv-cancelr | ||||||||
| (inverse-is-equiv (iso≃is-invertible .snd)) | ||||||||
| proj-is-equiv | ||||||||
| where | ||||||||
| proj-is-equiv : is-equiv {A = Σ[ f ∈ Hom x y ] is-invertible f} fst | ||||||||
| proj-is-equiv = Subtype-proj-is-equiv (λ _ → hlevel 1) gpd | ||||||||
| ``` | ||||||||
|
|
||||||||
| <!-- | ||||||||
| ```agda | ||||||||
| hom→iso : ∀ {x y} → Hom x y → x ≅ y | ||||||||
| hom→iso f = invertible→iso f (gpd f) | ||||||||
|
|
||||||||
| module _ {o ℓ} (C : Precategory o ℓ) (gpd : is-pregroupoid C) where | ||||||||
| hom≃iso : ∀ {x y} → Hom x y ≃ (x ≅ y) | ||||||||
| hom≃iso .fst = hom→iso | ||||||||
| hom≃iso .snd = inverse-is-equiv forget-iso-is-equiv | ||||||||
| ``` | ||||||||
| --> | ||||||||
|
|
||||||||
| Of course, the [[opposite]] of a groupoid is a groupoid. | ||||||||
| ## Univalent groupoids | ||||||||
|
|
||||||||
| :::{.definition #univalent-groupoid} | ||||||||
| A precategory $\cC$ is a **univalent groupoid** or **groupoid** if | ||||||||
| the type of morphisms of $\cC$ forms an [[identity system]] on $\cC$. | ||||||||
| ::: | ||||||||
|
|
||||||||
|
|
||||||||
| ```agda | ||||||||
| ^op-pregroupoid : is-pregroupoid (C ^op) | ||||||||
| ^op-pregroupoid f = invertible→co-invertible C (gpd f) | ||||||||
| is-univalent-groupoid : ∀ {o ℓ} → Precategory o ℓ → Type _ | ||||||||
| is-univalent-groupoid C = is-identity-system Hom λ x → id {x} | ||||||||
| where open Precategory C | ||||||||
| ``` | ||||||||
|
|
||||||||
| As the name suggests, every univalent groupoid is both a [[univalent category]] and a pregroupoid. | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
|
||||||||
| ```agda | ||||||||
| module is-univalent-groupoid {o ℓ} (C : Precategory o ℓ) (C-gpd : is-univalent-groupoid C) where | ||||||||
| open Cat.Reasoning C | ||||||||
|
|
||||||||
| univalent : is-category C | ||||||||
| pregroupoid : is-pregroupoid C | ||||||||
| ``` | ||||||||
|
|
||||||||
| We shall start by showing that $\cC$ is a pregroupoid. Let | ||||||||
| $f : \cC(x,y)$ be a morphism of $\cC$: our goal is to show | ||||||||
| that it is invertible. However, $\cC(x,y)$ is an identity | ||||||||
| system, so we can contract $f$ down to $\id$, which is obviously | ||||||||
| invertible! | ||||||||
|
|
||||||||
| ```agda | ||||||||
| pregroupoid = IdsJ C-gpd (λ y f → is-invertible f) id-invertible | ||||||||
| ``` | ||||||||
|
|
||||||||
| By our previous result, we now know that the type of morphisms $\cC(x,y)$ is | ||||||||
| equivalent to type of isomorphisms $x \iso y$. Moreover, this equivalence | ||||||||
| sends the identity morphism to the identity isomorphism. This means that | ||||||||
| we can prove that $\cC$ is univalent by transferring the identity system on | ||||||||
| morphisms along this equivalence. | ||||||||
|
|
||||||||
| ```agda | ||||||||
| open is-pregroupoid C pregroupoid public | ||||||||
|
|
||||||||
| univalent = transfer-identity-system C-gpd (λ x y → hom≃iso) λ x → ext refl | ||||||||
| ``` | ||||||||
|
|
||||||||
| We can use a similar argument to establish that every univalent pregroupoid | ||||||||
| is a univalent groupoid. | ||||||||
|
|
||||||||
| ```agda | ||||||||
| is-univalent-pregroupoid→is-univalent-groupoid | ||||||||
| : ∀ {o ℓ} {C : Precategory o ℓ} | ||||||||
| → is-category C | ||||||||
| → is-pregroupoid C | ||||||||
| → is-univalent-groupoid C | ||||||||
| is-univalent-pregroupoid→is-univalent-groupoid {C = C} C-cat C-gpd = | ||||||||
| transfer-identity-system C-cat (λ x y → hom≃iso e⁻¹) λ _ → refl | ||||||||
| where | ||||||||
| open is-pregroupoid C C-gpd | ||||||||
| ``` | ||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
is there a reason that this path is backwards?