Dataset Viewer
Auto-converted to Parquet Duplicate
statement
stringlengths
5
1.82k
proof
stringlengths
0
5.57k
type
stringclasses
4 values
symbolic_name
stringlengths
1
58
library
stringclasses
164 values
filename
stringclasses
562 values
imports
listlengths
0
99
deps
listlengths
0
64
docstring
stringclasses
1 value
source_url
stringclasses
1 value
commit
stringclasses
1 value
_ = Precategory
_ = Functor _ = is-strict _ = Strict-cats _ = Sets _ = Groups _ = poset→category _ = Disc _ = B _ = Slice _ = Ab↪Sets _ = Hom-from _ = Const _ = _=>_ _ = Cat[_,_] _ = _◆_ _ = ◆-interchange _ = yo-is-equiv _ = yo-naturalr _ = yo-naturall _ = constⁿ _ = _^op _ = Hom[-,-] _ = よ₀ _ = よ _ = is-faithful _ = is-full _ = is-fu...
function
_
Root
src/Borceux.lagda.md
[ "Algebra.Group.Cat.FinitelyComplete", "Algebra.Monoid.Category", "Algebra.Group.Cat.Base", "Algebra.Group.Free", "Algebra.Group.Ab", "Cat.Morphism.Factorisation.Orthogonal", "Cat.Diagram.Coequaliser.RegularEpi", "Cat.Functor.Adjoint.Epireflective", "Cat.Functor.Adjoint.Representable", "Cat.Instanc...
[ "Ab↪Sets", "Cat[_,_]", "Cat⟨_,_⟩", "Cocone", "Curry", "Disc", "Disci", "Disc⊣Γ", "Dom", "Equaliser→Limit", "Free-category", "Free-monoid⊣Forget", "Functor", "Functor-cat-is-complete", "Graph", "Graph-hom", "Groups", "Hom[-,-]", "Hom[-,-]-is-fully-faithful", "Indexed-product-uni...
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
_ = LR-iso→is-reflective
_ = crude-monadicity _ = ∫ _ = Karoubi-is-completion _ = lambek _ = Finitely-complete→is-finitely-complete _ = with-equalisers _ = with-pullbacks _ = Subobject-weak-opfibration _ = weak-cocartesian-lift→left-adjoint _ = is-extremal-epi→is-strong-epi _ = Sub-regular _ = is-strong-epi→is-regular-epi _ = is-congruence _ =...
function
_
Root
src/Elephant.lagda.md
[ "Cat.Displayed.Instances.Subobjects", "Cat.Instances.Elements.Covariant", "Cat.Displayed.Cocartesian.Weak", "Cat.Functor.Adjoint.Reflective", "Cat.Site.Instances.Canonical", "Cat.CartesianClosed.Locally", "Cat.Functor.Monadic.Crude", "Cat.Instances.Sheaf.Omega", "Cat.Diagram.Limit.Finite", "Cat.Di...
[ "Coverage", "Karoubi-is-completion", "Sh[]-omega", "Subobject-weak-opfibration", "crude-monadicity", "is-colim", "is-congruence", "is-extremal-epi→is-strong-epi", "is-universal-colim" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
_ = sym
_ = _∙_ _ = ∙-idl _ = ∙-idr _ = ∙-invl _ = ∙-invr _ = ∙-assoc _ = Ωⁿ⁺²-is-abelian _ = Type∙ _ = Ωⁿ _ = ap _ = ap-∙ _ = subst _ = Σ-pathp _ = transport-refl _ = subst-∙ _ = homotopy-natural _ = homotopy-invert _ = is-iso _ = transport⁻transport _ = id-equiv _ = Equiv.inverse _ = _∙e_ _ = Σ-pathp≃ _ = funext _ = funext-d...
function
_
Root
src/HoTT.lagda.md
[ "1Lab.Counterexamples.GlobalChoice", "1Lab.Function.Surjection", "1Lab.Function.Embedding", "1Lab.Equiv.Biinv", "1Lab.Classical", "Algebra.Group.Homotopy", "Algebra.Monoid", "Algebra.Group", "Cat.Instances.Sets.Congruences", "Cat.Displayed.Univalence.Thin", "Cat.Functor.Hom.Representable", "Ca...
[ "Axiom-of-choice", "Cat", "Cat[_,_]", "Category-identity-system", "Cocone", "Coeq", "Coeq-univ", "Curry", "DNE", "Dec", "Disc", "Discrete", "Discrete-Nat", "Discrete→is-set", "Displayed", "Fibre-equiv", "Functor", "Functor-is-category", "Functor-path", "F∘-assoc", "Group-on",...
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
_ : ∀ {ℓ} {A B : Type ℓ} → is-equiv (path→equiv {A = A} {B})
_ = Precategory _ = univalence
function
_
Root
src/index.lagda.md
[ "1Lab.Univalence", "1Lab.Equiv", "1Lab.HLevel", "1Lab.Type", "1Lab.Path", "Cat.Base", "1Lab.Type", "1Lab.Path", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Univalence", "1Lab.Reflection.HLevel", "1Lab.Extensionality", "1Lab.Reflection.Induction", "1Lab.Reflection.Induction.Examples", "Cat.Base"...
[ "Precategory", "is-equiv", "path→equiv", "univalence" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
LEM : Type
LEM = ∀ (P : Ω) → Dec ∣ P ∣
function
LEM
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "Dec" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
DNE : Type
DNE = ∀ (P : Ω) → ¬ ¬ ∣ P ∣ → ∣ P ∣
function
DNE
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
LEM-is-prop : is-prop LEM
LEM-is-prop = hlevel 1
function
LEM-is-prop
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "LEM", "hlevel", "is-prop" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
DNE-is-prop : is-prop DNE
DNE-is-prop = hlevel 1
function
DNE-is-prop
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "DNE", "hlevel", "is-prop" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
LEM→DNE : LEM → DNE
LEM→DNE lem P = Dec-elim _ (λ p _ → p) (λ ¬p ¬¬p → absurd (¬¬p ¬p)) (lem P)
function
LEM→DNE
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "DNE", "Dec-elim", "LEM", "absurd", "lem" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
DNE→LEM : DNE → LEM
DNE→LEM dne P = dne (el (Dec ∣ P ∣) (hlevel 1)) λ k → k (no λ p → k (yes p))
function
DNE→LEM
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "DNE", "Dec", "LEM", "hlevel" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
LEM≃DNE : LEM ≃ DNE
LEM≃DNE = prop-ext LEM-is-prop DNE-is-prop LEM→DNE DNE→LEM
function
LEM≃DNE
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "DNE", "DNE-is-prop", "DNE→LEM", "LEM", "LEM-is-prop", "LEM→DNE" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
WLEM : Type
WLEM = ∀ (P : Ω) → Dec (¬ ∣ P ∣)
function
WLEM
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "Dec" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
LEM→WLEM : LEM → WLEM
LEM→WLEM lem P = lem (P →Ω ⊥Ω)
function
LEM→WLEM
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "LEM", "WLEM", "lem", "⊥Ω" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
WLEM-is-prop : is-prop WLEM
WLEM-is-prop = hlevel 1
function
WLEM-is-prop
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "WLEM", "hlevel", "is-prop" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Axiom-of-choice : Typeω
Axiom-of-choice = ∀ {ℓ ℓ'} {B : Type ℓ} {P : B → Type ℓ'} → is-set B → (∀ b → is-set (P b)) → (∀ b → ∥ P b ∥) → ∥ (∀ b → P b) ∥
function
Axiom-of-choice
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "is-set" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Surjections-split : Typeω
Surjections-split = ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} → is-set A → is-set B → (f : A → B) → is-surjective f → is-split-surjective f
function
Surjections-split
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "is-set", "is-split-surjective", "is-surjective" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
AC→Surjections-split : Axiom-of-choice → Surjections-split
AC→Surjections-split ac Aset Bset f = ac Bset (fibre-is-hlevel 2 Aset Bset f)
function
AC→Surjections-split
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "Axiom-of-choice", "Surjections-split", "fibre-is-hlevel" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Surjections-split→AC : Surjections-split → Axiom-of-choice
Surjections-split→AC ss {P = P} Bset Pset h = ∥-∥-map (Equiv.to (Π-ap-cod (Fibre-equiv P))) (ss (Σ-is-hlevel 2 Bset Pset) Bset fst λ b → ∥-∥-map (Equiv.from (Fibre-equiv P b)) (h b))
function
Surjections-split→AC
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "Axiom-of-choice", "Fibre-equiv", "Surjections-split", "Π-ap-cod", "Σ-is-hlevel", "∥-∥-map" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
_ = Fibration-equiv
function
_
1Lab
src/1Lab/Classical.lagda.md
[ "1Lab.Prelude", "Data.Bool", "Data.Dec", "Data.Sum", "Homotopy.Space.Suspension.Properties", "Homotopy.Space.Suspension", "Meta.Invariant" ]
[ "Fibration-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-iso (f : A → B) : Type (level-of A ⊔ level-of B) where no-eta-equality constructor iso field from : B → A rinv : is-right-inverse from f linv : is-left-inverse from f
record
is-iso
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-left-inverse", "is-right-inverse", "level-of", "linv", "rinv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-equiv (f : A → B) : Type (level-of A ⊔ level-of B) where no-eta-equality field is-eqv : (y : B) → is-contr (fibre f y)
record
is-equiv
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "fibre", "is-contr", "level-of" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-left-inverse : (B → A) → (A → B) → Type _
is-left-inverse g f = (x : _) → g (f x) ≡ x
function
is-left-inverse
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-right-inverse : (B → A) → (A → B) → Type _
is-right-inverse g f = (x : _) → f (g x) ≡ x
function
is-right-inverse
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Iso : ∀ {ℓ₁ ℓ₂} → Type ℓ₁ → Type ℓ₂ → Type _
Iso A B = Σ (A → B) is-iso
function
Iso
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-iso" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
fibre : (A → B) → B → Type _
fibre {A = A} f y = Σ[ x ∈ A ] f x ≡ y
function
fibre
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
_≃_ : ∀ {ℓ₁ ℓ₂} → Type ℓ₁ → Type ℓ₂ → Type _
_≃_ A B = Σ (A → B) is-equiv
function
_≃_
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
id-equiv : is-equiv {A = A} id
id-equiv .is-eqv y .centre = y , refl id-equiv .is-eqv y .paths (x , p) i = p (~ i) , λ j → p (~ i ∨ j)
function
id-equiv
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "id", "is-equiv", "refl" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
strict-fibres : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} {f : A → B} (g : B → A) (b : B) → Σ[ t ∈ fibre f (f (g b)) ] ((t' : fibre f b) → Path (fibre f (f (g b))) t (g (f (t' .fst)) , ap (f ∘ g) (t' .snd)))
strict-fibres {f = f} g b .fst = (g b , refl) strict-fibres {f = f} g b .snd (a , p) i = (g (p (~ i)) , λ j → f (g (p (~ i ∨ j)))) -- This is more efficient than using Iso→Equiv. When f (g x) is definitionally x, -- the type reduces to essentially is-contr (fibre f b).
function
strict-fibres
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "Path", "ap", "fibre", "refl" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-eqv' : ∀ {a b} (A : Type a) (B : Type b) → (w : A ≃ B) (a : B) → (ψ : I) → (p : Partial ψ (fibre (w .fst) a)) → fibre (w .fst) a [ ψ ↦ p ]
is-eqv' A B (f , is-equiv) a ψ u0 = inS ( hcomp (∂ ψ) λ where i (ψ = i0) → c .centre i (ψ = i1) → c .paths (u0 1=1) i i (i = i0) → c .centre) where c = is-equiv .is-eqv a {-# BUILTIN EQUIVPROOF is-eqv' #-}
function
is-eqv'
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "fibre", "hcomp", "is-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
equiv-centre : (e : A ≃ B) (y : B) → fibre (e .fst) y
equiv-centre e y = e .snd .is-eqv y .centre
function
equiv-centre
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "fibre" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
equiv-path : (e : A ≃ B) (y : B) → (v : fibre (e .fst) y) → Path _ (equiv-centre e y) v
equiv-path e y = e .snd .is-eqv y .paths
function
equiv-path
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "Path", "equiv-centre", "fibre" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-equiv-is-prop : (f : A → B) → is-prop (is-equiv f)
is-equiv-is-prop f x y i .is-eqv p = is-contr-is-prop (x .is-eqv p) (y .is-eqv p) i
function
is-equiv-is-prop
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-contr-is-prop", "is-equiv", "is-prop" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
equiv→inverse : {f : A → B} → is-equiv f → B → A
equiv→inverse eqv y = eqv .is-eqv y .centre .fst
function
equiv→inverse
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
equiv→counit : ∀ {f : A → B} (eqv : is-equiv f) (y : B) → f (equiv→inverse eqv y) ≡ y
equiv→counit eqv y = eqv .is-eqv y .centre .snd
function
equiv→counit
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "equiv→inverse", "is-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
equiv→unit : ∀ {f : A → B} (eqv : is-equiv f) x → equiv→inverse eqv (f x) ≡ x
equiv→unit {f = f} eqv x i = eqv .is-eqv (f x) .paths (x , refl) i .fst
function
equiv→unit
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "equiv→inverse", "is-equiv", "refl" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
equiv→square : ∀ {f : A → B} (eqv : is-equiv f) (x : A) → Square (ap f (equiv→unit eqv x)) (equiv→counit eqv (f x)) refl refl
equiv→square {f = f} eqv x i j = eqv .is-eqv (f x) .paths (x , refl) i .snd j
function
equiv→square
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "Square", "ap", "equiv→counit", "equiv→unit", "is-equiv", "refl" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
equiv→zig : ∀ {f : A → B} (eqv : is-equiv f) x → ap f (equiv→unit eqv x) ≡ equiv→counit eqv (f x)
equiv→zig {f = f} eqv x i j = hcomp (∂ i ∨ ∂ j) λ where k (k = i0) → equiv→square eqv x j i k (i = i0) → f (equiv→unit eqv x j) k (i = i1) → equiv→counit eqv (f x) (j ∨ ~ k) k (j = i0) → equiv→counit eqv (f x) (i ∧ ~ k) k (j = i1) → f x
function
equiv→zig
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "ap", "equiv→counit", "equiv→square", "equiv→unit", "hcomp", "is-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
equiv→zag : ∀ {f : A → B} (eqv : is-equiv f) x → ap (equiv→inverse eqv) (equiv→counit eqv x) ≡ equiv→unit eqv (equiv→inverse eqv x)
equiv→zag {f = f} eqv b = subst (λ b → ap g (ε b) ≡ η (g b)) (ε b) (helper (g b)) where g = equiv→inverse eqv ε = equiv→counit eqv η = equiv→unit eqv helper : ∀ a → ap g (ε (f a)) ≡ η (g (f a)) helper a i j = hcomp (∂ i ∨ ∂ j) λ where k (i = i0) → g (ε (f a) (j ∨ ~ k)) k (i = i1) → η (η a (~ k)) j ...
function
equiv→zag
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "ap", "equiv→counit", "equiv→inverse", "equiv→unit", "equiv→zig", "hcomp", "is-equiv", "subst" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-equiv→is-iso : {f : A → B} → is-equiv f → is-iso f
is-equiv→is-iso eqv .is-iso.from = equiv→inverse eqv is-equiv→is-iso eqv .is-iso.rinv = equiv→counit eqv is-equiv→is-iso eqv .is-iso.linv = equiv→unit eqv
function
is-equiv→is-iso
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "equiv→counit", "equiv→inverse", "equiv→unit", "is-equiv", "is-iso" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Iso→Equiv : Iso A B → A ≃ B {-# INLINE Iso→Equiv #-}
Iso→Equiv (f , is-iso) = record { fst = f ; snd = is-iso→is-equiv is-iso }
function
Iso→Equiv
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "Iso", "is-iso" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
inverse-is-equiv : {f : A → B} (eqv : is-equiv f) → is-equiv (equiv→inverse eqv)
inverse-is-equiv {f = f} eqv .is-eqv x .centre = record { fst = f x ; snd = equiv→unit eqv x } inverse-is-equiv {A = A} {B = B} {f = f} eqv .is-eqv x .paths (y , p) = q where g = equiv→inverse eqv η = equiv→unit eqv ε = equiv→counit eqv zag = equiv→zag eqv q : (f x , η x) ≡ (y , p) q i .fst = (ap f (sym ...
function
inverse-is-equiv
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "ap", "equiv→counit", "equiv→inverse", "equiv→unit", "equiv→zag", "hcomp", "is-equiv", "sym", "∙-filler'" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
injectiveP : ∀ {ℓ ℓ'} {A : I → Type ℓ} {B : I → Type ℓ'} (f : ∀ i → Iso (A i) (B i)) {x y} → PathP (λ i → B i) (f i0 .fst x) (f i1 .fst y) → PathP (λ i → A i) x y
injectiveP f {x} {y} p = sym (Iso.linv (f i0) x) ◁ apd (λ i → Iso.from (f i)) p ▷ Iso.linv (f i1) y
function
injectiveP
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "Iso", "apd", "sym" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-contr→is-equiv : is-contr A → is-contr B → {f : A → B} → is-equiv f
is-contr→is-equiv cA cB = is-iso→is-equiv λ where .is-iso.from _ → cA .centre .is-iso.linv _ → is-contr→is-prop cA _ _ .is-iso.rinv _ → is-contr→is-prop cB _ _
function
is-contr→is-equiv
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-contr", "is-contr→is-prop", "is-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-contr→≃ : is-contr A → is-contr B → A ≃ B
is-contr→≃ cA cB = (λ _ → cB .centre) , is-contr→is-equiv cA cB
function
is-contr→≃
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-contr", "is-contr→is-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-contr→≃⊤ : is-contr A → A ≃ ⊤
is-contr→≃⊤ c = is-contr→≃ c ⊤-is-contr
function
is-contr→≃⊤
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-contr", "is-contr→≃", "⊤-is-contr" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
¬-is-equiv : (f : A → ⊥) → is-equiv f
function
¬-is-equiv
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-empty→≃⊥ : ¬ A → A ≃ ⊥
is-empty→≃⊥ ¬a = _ , ¬-is-equiv ¬a
function
is-empty→≃⊥
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "¬-is-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
sym-equiv : ∀ {ℓ} {A : Type ℓ} {x y : A} → (x ≡ y) ≃ (y ≡ x)
sym-equiv .fst = sym sym-equiv .snd = is-iso→is-equiv (iso sym (λ _ → refl) (λ _ → refl))
function
sym-equiv
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "refl", "sym" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
∙-pre-equiv : ∀ {ℓ} {A : Type ℓ} {x y z : A} → x ≡ y → (y ≡ z) ≃ (x ≡ z)
∙-pre-equiv p .fst q = p ∙ q ∙-pre-equiv p .snd = is-iso→is-equiv λ where .is-iso.from q → sym p ∙ q .is-iso.rinv q → ∙-assoc p _ _ ∙∙ ap (_∙ q) (∙-invr p) ∙∙ ∙-idl q .is-iso.linv q → ∙-assoc (sym p) _ _ ∙∙ ap (_∙ q) (∙-invl p) ∙∙ ∙-idl q
function
∙-pre-equiv
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "ap", "sym" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
∙-post-equiv : ∀ {ℓ} {A : Type ℓ} {x y z : A} → y ≡ z → (x ≡ y) ≃ (x ≡ z)
∙-post-equiv p .fst q = q ∙ p ∙-post-equiv p .snd = is-iso→is-equiv λ where .is-iso.from q → q ∙ sym p .is-iso.rinv q → sym (∙-assoc q _ _) ∙∙ ap (q ∙_) (∙-invl p) ∙∙ ∙-idr q .is-iso.linv q → sym (∙-assoc q _ _) ∙∙ ap (q ∙_) (∙-invr p) ∙∙ ∙-idr q
function
∙-post-equiv
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "ap", "sym" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Lift-≃ : ∀ {a ℓ} {A : Type a} → Lift ℓ A ≃ A
Lift-≃ .fst (lift a) = a Lift-≃ .snd .is-eqv a .centre = lift a , refl Lift-≃ .snd .is-eqv a .paths (x , p) i .fst = lift (p (~ i)) Lift-≃ .snd .is-eqv a .paths (x , p) i .snd j = p (~ i ∨ j)
function
Lift-≃
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "Lift", "refl" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Lift-ap : ∀ {a b ℓ ℓ'} {A : Type a} {B : Type b} → A ≃ B → Lift ℓ A ≃ Lift ℓ' B
Lift-ap (f , eqv) .fst (lift x) = lift (f x) Lift-ap f .snd .is-eqv (lift y) .centre = lift (Equiv.from f y) , ap lift (Equiv.ε f y) Lift-ap f .snd .is-eqv (lift y) .paths (lift x , q) i = lift (p i .fst) , λ j → lift (p i .snd j) where p = f .snd .is-eqv y .paths (x , ap lower q)
function
Lift-ap
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "Lift", "ap" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-involutive→is-equiv : {f : A → A} → (∀ a → f (f a) ≡ a) → is-equiv f
is-involutive→is-equiv inv = is-iso→is-equiv (iso _ inv inv)
function
is-involutive→is-equiv
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "inv", "is-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
_ : ∘-closed is-equiv
_ = ∘-is-equiv
function
_
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-equiv", "∘-closed" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
left-inverse→equiv : {f : A → B} {g : B → A} → is-left-inverse g f → is-equiv f → is-equiv g
left-inverse→equiv linv ef = equiv-cancelr ef (subst is-equiv (sym (funext linv)) id-equiv)
function
left-inverse→equiv
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "funext", "id-equiv", "is-equiv", "is-left-inverse", "linv", "subst", "sym" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
right-inverse→equiv : {f : A → B} {g : B → A} → is-right-inverse g f → is-equiv f → is-equiv g
right-inverse→equiv rinv ef = equiv-cancell ef (subst is-equiv (sym (funext rinv)) id-equiv)
function
right-inverse→equiv
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "funext", "id-equiv", "is-equiv", "is-right-inverse", "rinv", "subst", "sym" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
id≃ : ∀ {ℓ} {A : Type ℓ} → A ≃ A
id≃ = id , id-equiv
function
id≃
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "id", "id-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
_∙e_ : A ≃ B → B ≃ C → A ≃ C {-# INLINE _∙e_ #-}
_∙e_ (f , ef) (g , eg) = record { fst = g ∘ f ; snd = ∘-is-equiv eg ef }
function
_∙e_
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
_e⁻¹ : A ≃ B → B ≃ A
function
_e⁻¹
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
≃⟨⟩-syntax : ∀ {ℓ ℓ₁ ℓ₂} (A : Type ℓ) {B : Type ℓ₁} {C : Type ℓ₂} → B ≃ C → A ≃ B → A ≃ C
≃⟨⟩-syntax A g f = f ∙e g
function
≃⟨⟩-syntax
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
_≃˘⟨_⟩_ : ∀ {ℓ ℓ₁ ℓ₂} (A : Type ℓ) {B : Type ℓ₁} {C : Type ℓ₂} → B ≃ A → B ≃ C → A ≃ C
function
_≃˘⟨_⟩_
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
_≃⟨⟩_ : ∀ {ℓ ℓ₁} (A : Type ℓ) {B : Type ℓ₁} → A ≃ B → A ≃ B
function
_≃⟨⟩_
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
_≃∎ : ∀ {ℓ} (A : Type ℓ) → A ≃ A
function
_≃∎
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
subst≃ : (x : A) → (Σ[ y ∈ A ] (y ≡ x × P y)) ≃ P x
subst≃ {A = A} {P = P} x = Iso→Equiv (to , iso from invr invl) where to : Σ[ y ∈ A ] (y ≡ x × P y) → P x to (y , y=x , py) = subst P y=x py from : P x → Σ[ y ∈ A ] (y ≡ x × P y) from px = x , refl , px invr : is-right-inverse from to invr = transport-refl invl : is-left-inverse from to ...
function
subst≃
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "Iso→Equiv", "is-left-inverse", "is-right-inverse", "refl", "subst", "transport-refl" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-equiv≃fibre-is-contr : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} → {f : A → B} → is-equiv f ≃ (∀ x → is-contr (fibre f x))
is-equiv≃fibre-is-contr {f = f} = prop-ext (is-equiv-is-prop f) (λ f g i x → is-contr-is-prop (f x) (g x) i) is-eqv (λ fib-contr → record { is-eqv = fib-contr }) -- This ideally would go in 1Lab.HLevel, but we don't have equivalences -- defined that early in the bootrapping process.
function
is-equiv≃fibre-is-contr
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "fibre", "is-contr", "is-contr-is-prop", "is-equiv", "is-equiv-is-prop" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-prop→is-contr-iff-inhabited : ∀ {ℓ} {A : Type ℓ} → is-prop A → is-contr A ≃ A
is-prop→is-contr-iff-inhabited A-prop = prop-ext is-contr-is-prop A-prop centre (is-prop∙→is-contr A-prop)
function
is-prop→is-contr-iff-inhabited
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-contr", "is-contr-is-prop", "is-prop", "is-prop∙→is-contr" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
lift-inj : ∀ {ℓ ℓ'} {A : Type ℓ} {a b : A} → lift {ℓ = ℓ'} a ≡ lift {ℓ = ℓ'} b → a ≡ b
lift-inj p = ap lower p -- Fibres of composites are given by pairs of fibres.
function
lift-inj
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "ap" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
fibre-∘-≃ : ∀ {ℓ ℓ' ℓ''} {A : Type ℓ} {B : Type ℓ'} {C : Type ℓ''} → {f : B → C} {g : A → B} → ∀ c → fibre (f ∘ g) c ≃ (Σ[ (b , _) ∈ fibre f c ] fibre g b)
fibre-∘-≃ {f = f} {g = g} c .fst (a , p) = (g a , p) , a , refl fibre-∘-≃ {f = f} {g = g} c .snd = is-iso→is-equiv (iso bwd invl invr) where fwd : fibre (f ∘ g) c → Σ[ (b , _) ∈ fibre f c ] fibre g b fwd (a , p) = ((g a) , p) , (a , refl) bwd : Σ[ (b , _) ∈ fibre f c ] fibre g b → fibre (f ∘ g) c bwd ((b , p) ...
function
fibre-∘-≃
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "ap", "fibre", "hcomp", "refl", "∙-filler" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-empty→≃ : ¬ A → ¬ B → A ≃ B
is-empty→≃ ¬a ¬b = is-empty→≃⊥ ¬a ∙e is-empty→≃⊥ ¬b e⁻¹
function
is-empty→≃
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-empty→≃⊥" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
flip-equiv-square : (e : A ≃ A') (e' : B ≃ B') (f : A → B) (f' : A' → B') → Equiv.to e' ∘ f ∘ Equiv.from e ≡ f' → f ≡ Equiv.from e' ∘ f' ∘ Equiv.to e
flip-equiv-square e e' f f' p = funext λ z → Equiv.injective e' (sym ( Equiv.ε e' _ ∙ happly (sym p) (e .fst z) ∙ ap (e' .fst ∘ f) (Equiv.η e _)))
function
flip-equiv-square
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "ap", "f'", "funext", "happly", "sym" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-equiv-join : (f : A → B) → (B → is-equiv f) → is-equiv f {-# INLINE is-equiv-join #-}
is-equiv-join f fe = record { is-eqv = λ y → fe y .is-eqv y }
function
is-equiv-join
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "is-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
((f , ef) e⁻¹) = equiv→inverse ef , inverse-is-equiv ef
function
f
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "equiv→inverse", "inverse-is-equiv" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
A ≃˘⟨ f ⟩ g = f e⁻¹ ∙e g
function
A
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
x ≃⟨⟩ x≡y = x≡y
x ≃∎ = id≃
function
x
1Lab
src/1Lab/Equiv.lagda.md
[ "1Lab.Path.Reasoning", "1Lab.Path.Groupoid", "1Lab.HLevel", "1Lab.Path", "1Lab.Type" ]
[ "id≃" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Extensional (A : Type ℓ) ℓ-rel : Type (ℓ ⊔ lsuc ℓ-rel) where no-eta-equality field Pathᵉ : A → A → Type ℓ-rel reflᵉ : ∀ x → Pathᵉ x x idsᵉ : is-identity-system Pathᵉ reflᵉ {-# INLINE Extensional.constructor #-}
record
Extensional
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "is-identity-system", "lsuc" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Extensional-default : Extensional A (level-of A)
Extensional-default .Pathᵉ = _≡_ Extensional-default .reflᵉ _ = refl Extensional-default .idsᵉ = Path-identity-system -- We can't mark this instance as OVERLAPPABLE because it's not -- strictly less specific than most other instances (it fixes the -- level of the relation to be that of the type). {-# INCO...
function
Extensional-default
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "Path-identity-system", "_≡_", "level-of", "refl" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Extensional-Lift : ⦃ Extensional A ℓr ⦄ → Extensional (Lift ℓ' A) ℓr
Extensional-Lift ⦃ sa ⦄ .Pathᵉ (lift x) (lift y) = sa .Pathᵉ x y Extensional-Lift ⦃ sa ⦄ .reflᵉ (lift x) = sa .reflᵉ x Extensional-Lift ⦃ sa ⦄ .idsᵉ .to-path p = ap lift (sa .idsᵉ .to-path p) Extensional-Lift ⦃ sa ⦄ .idsᵉ .to-path-over p = sa .idsᵉ .to-path-over p
function
Extensional-Lift
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "Lift", "ap" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Extensional-Π : ⦃ ∀ {x} → Extensional (P x) ℓr ⦄ → Extensional ((x : A) → P x) (level-of A ⊔ ℓr)
Extensional-Π ⦃ sb ⦄ .Pathᵉ f g = ∀ x → Pathᵉ sb (f x) (g x) Extensional-Π ⦃ sb ⦄ .reflᵉ f x = reflᵉ sb (f x) Extensional-Π ⦃ sb ⦄ .idsᵉ .to-path h = funext λ i → sb .idsᵉ .to-path (h i) Extensional-Π ⦃ sb ⦄ .idsᵉ .to-path-over h = funextP λ i → sb .idsᵉ .to-path-over (h i) -- This instance is *very often* specialis...
function
Extensional-Π
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "funext", "funextP", "level-of" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Extensional-Π' : ⦃ ∀ {x} → Extensional (P x) ℓr ⦄ → Extensional ({x : A} → P x) (level-of A ⊔ ℓr)
Extensional-Π' ⦃ sb ⦄ .Pathᵉ f g = ∀ {x} → Pathᵉ (sb {x}) f g Extensional-Π' ⦃ sb ⦄ .reflᵉ f = reflᵉ sb f Extensional-Π' ⦃ sb ⦄ .idsᵉ .to-path h i = sb .idsᵉ .to-path h i Extensional-Π' ⦃ sb ⦄ .idsᵉ .to-path-over h i = sb .idsᵉ .to-path-over h i
function
Extensional-Π'
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "level-of" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Extensional-Π'' : ⦃ ∀ ⦃ x ⦄ → Extensional (P x) ℓr ⦄ → Extensional (⦃ x : A ⦄ → P x) (level-of A ⊔ ℓr)
Extensional-Π'' ⦃ sb ⦄ .Pathᵉ f g = ∀ ⦃ x ⦄ → Pathᵉ (sb ⦃ x ⦄) f g Extensional-Π'' ⦃ sb ⦄ .reflᵉ f = reflᵉ sb f Extensional-Π'' ⦃ sb ⦄ .idsᵉ .to-path h i = sb .idsᵉ .to-path h i Extensional-Π'' ⦃ sb ⦄ .idsᵉ .to-path-over h i = sb .idsᵉ .to-path-over h i -- Some non-confluent "reduction rules" for extensionality are ...
function
Extensional-Π''
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "level-of" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Extensional-uncurry : ∀ {ℓ ℓ' ℓ'' ℓr} {A : Type ℓ} {B : A → Type ℓ'} {C : (x : A) → B x → Type ℓ''} → ⦃ sb : Extensional ((x : A) (y : B x) → C x y) ℓr ⦄ → Extensional ((p : Σ A B) → C (p .fst) (p .snd)) ℓr
Extensional-uncurry ⦃ sb ⦄ .Pathᵉ f g = sb .Pathᵉ (curry f) (curry g) Extensional-uncurry ⦃ sb ⦄ .reflᵉ f = sb .reflᵉ (curry f) Extensional-uncurry ⦃ sb = sb ⦄ .idsᵉ .to-path h i (a , b) = sb .idsᵉ .to-path h i a b Extensional-uncurry ⦃ sb = sb ⦄ .idsᵉ .to-path-over h = sb .idsᵉ .to-path-over h
function
Extensional-uncurry
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Extensional-lift-map : ∀ {ℓ ℓ' ℓ'' ℓr} {A : Type ℓ} {B : Lift ℓ' A → Type ℓ''} → ⦃ sa : Extensional ((x : A) → B (lift x)) ℓr ⦄ → Extensional ((x : Lift ℓ' A) → B x) ℓr
Extensional-lift-map ⦃ sa = sa ⦄ .Pathᵉ f g = sa .Pathᵉ (f ∘ lift) (g ∘ lift) Extensional-lift-map ⦃ sa = sa ⦄ .reflᵉ x = sa .reflᵉ (x ∘ lift) Extensional-lift-map ⦃ sa = sa ⦄ .idsᵉ .to-path h i (lift x) = sa .idsᵉ .to-path h i x Extensional-lift-map ⦃ sa = sa ⦄ .idsᵉ .to-path-over h = sa .idsᵉ .to-path-over h
function
Extensional-lift-map
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "Lift" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
ext : ∀ {ℓ ℓr} {A : Type ℓ} {x y : A} ⦃ r : Extensional A ℓr ⦄ → Pathᵉ r x y → x ≡ y
ext ⦃ r ⦄ p = r .idsᵉ .to-path p {- Using the extensionality tactic we can define a "more general refl", where the terms being compared are not definitionally equal, but they inhabit a type with a good identity system for which 'r x : R x y' type checks. The idea is to write a function wrapping ext : ⦃ r : Extensi...
function
ext
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
trivial-iso! : ∀ {ℓ ℓ' ℓr ℓs} {A : Type ℓ} {B : Type ℓ'} → ⦃ r : Extensional (A → A) ℓr ⦄ → ⦃ s : Extensional (B → B) ℓs ⦄ → (f : A → B) → (g : B → A) → {@(tactic trivial-worker r (g ∘ f) id) p : Pathᵉ r (g ∘ f) id} → {@(tactic trivial-worker s (f ∘ g) id) q : Pathᵉ s (f ∘ g) id} → Iso A B
trivial-iso! ⦃ r ⦄ ⦃ s ⦄ f g {p = p} {q = q} = f , iso g (happly (s .idsᵉ .to-path q)) (happly (r .idsᵉ .to-path p))
function
trivial-iso!
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "Iso", "happly", "id" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
unext : ∀ {ℓ ℓr} {A : Type ℓ} ⦃ e : Extensional A ℓr ⦄ {x y : A} → x ≡ y → e .Pathᵉ x y
unext ⦃ e ⦄ {x = x} p = transport (λ i → e .Pathᵉ x (p i)) (e .reflᵉ x)
function
unext
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "transport" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
reext! : ∀ {ℓ ℓr} {A : Type ℓ} ⦃ ea : Extensional A ℓr ⦄ {x y : A} → x ≡ y → Term → TC ⊤
reext! p goal = do `p ← quoteTC p unify goal (def (quote ext) [ argN (def (quote unext) [ argN `p ]) ])
function
reext!
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "Term", "argN", "ext", "unext" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Pathᵉ-is-hlevel : ∀ {ℓ ℓr} {A : Type ℓ} n (sa : Extensional A ℓr) → is-hlevel A (suc n) → ∀ {x y} → is-hlevel (Pathᵉ sa x y) n
Pathᵉ-is-hlevel n sa hl = Equiv→is-hlevel _ (identity-system-gives-path (sa .idsᵉ)) (Path-is-hlevel' _ hl _ _) -- Constructors for Extensional instances in terms of embeddings. The -- extra coherence is required to make sure that we still have an -- identity system by the end. -- -- If the type you're reducing to is...
function
Pathᵉ-is-hlevel
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Equiv→is-hlevel", "Extensional", "Path-is-hlevel'", "identity-system-gives-path", "is-hlevel", "suc" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
embedding→extensional : ∀ {ℓ ℓ' ℓr} {A : Type ℓ} {B : Type ℓ'} → (f : A ↪ B) → Extensional B ℓr → Extensional A ℓr {-# INLINE embedding→extensional #-}
embedding→extensional f ext = record where Pathᵉ x y = ext .Pathᵉ (f .fst x) (f .fst y) reflᵉ x = ext .reflᵉ (f .fst x) idsᵉ = pullback-identity-system (ext .idsᵉ) f
function
embedding→extensional
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "ext" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
iso→extensional : ∀ {ℓ ℓ' ℓr} {A : Type ℓ} {B : Type ℓ'} → Iso A B → Extensional B ℓr → Extensional A ℓr {-# INLINE iso→extensional #-}
iso→extensional f ext = embedding→extensional (Iso→Embedding f) ext
function
iso→extensional
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "Iso", "Iso→Embedding", "embedding→extensional", "ext" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
injection→extensional : ∀ {ℓ ℓ' ℓr} {A : Type ℓ} {B : Type ℓ'} → is-set B → {f : A → B} → (∀ {x y} → f x ≡ f y → x ≡ y) → Extensional B ℓr → Extensional A ℓr {-# INLINE injection→extensional #-}
injection→extensional b-set {f} inj ext = record where Pathᵉ x y = ext .Pathᵉ (f x) (f y) reflᵉ x = ext .reflᵉ (f x) idsᵉ = record where to-path x = inj (ext .idsᵉ .to-path x) to-path-over p = is-prop→pathp (λ i → Pathᵉ-is-hlevel 1 ext b-set) _ _
function
injection→extensional
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "Pathᵉ-is-hlevel", "ext", "inj", "is-prop→pathp", "is-set", "to-path" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
injection→extensional! : ∀ {ℓ ℓ' ℓr} {A : Type ℓ} {B : Type ℓ'} → ⦃ _ : H-Level B 2 ⦄ → {f : A → B} → (∀ {x y} → f x ≡ f y → x ≡ y) → Extensional B ℓr → Extensional A ℓr {-# INLINE injection→extensional! #-}
injection→extensional! = injection→extensional (hlevel 2)
function
injection→extensional!
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "H-Level", "hlevel", "injection→extensional" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Σ-prop-extensional : ∀ {ℓ ℓ' ℓr} {A : Type ℓ} {B : A → Type ℓ'} → (∀ x → is-prop (B x)) → Extensional A ℓr → Extensional (Σ A B) ℓr {-# INLINE Σ-prop-extensional #-}
Σ-prop-extensional bprop = embedding→extensional (fst , Subset-proj-embedding bprop)
function
Σ-prop-extensional
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "Subset-proj-embedding", "embedding→extensional", "is-prop" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Extensional-Σ-trunc : ∀ {ℓ ℓ' ℓr} {A : Type ℓ} {B : A → Type ℓ'} → ⦃ ea : Extensional A ℓr ⦄ → Extensional (Σ A λ x → ∥ B x ∥) ℓr
Extensional-Σ-trunc ⦃ ea ⦄ = Σ-prop-extensional (λ x → hlevel 1) ea
function
Extensional-Σ-trunc
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "hlevel", "Σ-prop-extensional" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Extensional-equiv : ∀ {ℓ ℓ' ℓr} {A : Type ℓ} {B : Type ℓ'} → ⦃ ea : Extensional (A → B) ℓr ⦄ → Extensional (A ≃ B) ℓr
Extensional-equiv ⦃ ea ⦄ = Σ-prop-extensional (λ x → hlevel 1) ea
function
Extensional-equiv
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "hlevel", "Σ-prop-extensional" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Extensional-emb : ∀ {ℓ ℓ' ℓr} {A : Type ℓ} {B : Type ℓ'} → ⦃ ea : Extensional (A → B) ℓr ⦄ → Extensional (A ↪ B) ℓr
Extensional-emb ⦃ ea ⦄ = Σ-prop-extensional (λ x → hlevel 1) ea
function
Extensional-emb
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "hlevel", "Σ-prop-extensional" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
Extensional-tr-map : ∀ {ℓ ℓ' ℓr} {A : Type ℓ} {B : Type ℓ'} → ⦃ bset : H-Level B 2 ⦄ → ⦃ ea : Extensional (A → B) ℓr ⦄ → Extensional (∥ A ∥ → B) ℓr
Extensional-tr-map ⦃ ea = ea ⦄ = injection→extensional! {f = λ f → f ∘ inc} (λ p → funext $ ∥-∥-elim (λ _ → hlevel 1) (happly p)) ea
function
Extensional-tr-map
1Lab
src/1Lab/Extensionality.agda
[ "1Lab.Reflection.Signature", "1Lab.Path.IdentitySystem", "1Lab.Function.Embedding", "1Lab.Reflection.HLevel", "1Lab.Reflection.Subst", "1Lab.HLevel.Closure", "1Lab.Reflection", "1Lab.Truncation", "1Lab.Type.Sigma", "1Lab.Type.Pi", "1Lab.HLevel", "1Lab.Equiv", "1Lab.Path", "1Lab.Type", "D...
[ "Extensional", "H-Level", "funext", "happly", "hlevel", "inc", "injection→extensional!", "∥-∥-elim" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-contr {ℓ} (A : Type ℓ) : Type ℓ where constructor contr field centre : A paths : (x : A) → centre ≡ x
record
is-contr
1Lab
src/1Lab/HLevel.lagda.md
[ "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
[0,1] : Type where ii0 : [0,1] ii1 : [0,1] seg : ii0 ≡ ii1
data
[0,1]
1Lab
src/1Lab/HLevel.lagda.md
[ "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
is-prop : ∀ {ℓ} → Type ℓ → Type ℓ
is-prop T = (x y : T) → x ≡ y
function
is-prop
1Lab
src/1Lab/HLevel.lagda.md
[ "1Lab.Path", "1Lab.Type" ]
[]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
subst-prop : ∀ {ℓ ℓ'} {A : Type ℓ} {P : A → Type ℓ'} → is-prop A → ∀ a → P a → ∀ b → P b
subst-prop {P = P} prop a pa b = subst P (prop a b) pa
function
subst-prop
1Lab
src/1Lab/HLevel.lagda.md
[ "1Lab.Path", "1Lab.Type" ]
[ "is-prop", "subst" ]
https://github.com/plt-amy/1lab
e5a99a399a3c58922adef713f38314805810937c
End of preview. Expand in Data Studio

Agda-1Lab

Structured dataset from 1Lab — Cross-linked reference resource for HoTT.

Source

Schema

Column Type Description
statement string Declaration signature/claim with the leading keyword removed (verbatim slice); the full declaration minus its proof
proof string Verbatim proof/body, empty if the declaration has none
type string Declaration keyword
symbolic_name string Declaration identifier
library string Sub-library
filename string Repository-relative source path
imports list[string] File-level Require/Import modules
deps list[string] Intra-corpus identifiers referenced
docstring string Preceding documentation comment, empty if absent
source_url string Upstream repository
commit string Upstream commit extracted

Statistics

  • Entries: 5,696
  • With proof: 4,758 (83.5%)
  • With docstring: 0 (0.0%)
  • Libraries: 164

By type

Type Count
function 5,264
record 311
data 116
postulate 5

Example

Axiom-of-choice : Typeω
Axiom-of-choice =
  ∀ {ℓ ℓ'} {B : Type ℓ} {P : B → Type ℓ'}
  → is-set B → (∀ b → is-set (P b))
  → (∀ b → ∥ P b ∥)
  → ∥ (∀ b → P b) ∥
  • type: function | symbolic_name: Axiom-of-choice | src/1Lab/Classical.lagda.md

Use

Each declaration is split into a statement (signature/claim) and a proof (body) that are disjoint and together form the complete declaration, for proof modeling, autoformalization, retrieval, and dependency analysis via deps.

Citation

@misc{agda_1lab_dataset,
  title  = {Agda-1Lab},
  author = {Norton, Charles},
  year   = {2026},
  note   = {Extracted from https://github.com/plt-amy/1lab, commit e5a99a399a3c},
  url    = {https://huggingface.co/datasets/phanerozoic/Agda-1Lab}
}
Downloads last month
59

Collection including phanerozoic/Agda-1Lab