diff --git a/Cubical.Algebra.CommMonoid.GrothendieckGroup.html b/Cubical.Algebra.CommMonoid.GrothendieckGroup.html index 8a48a1547d..7d024609db 100644 --- a/Cubical.Algebra.CommMonoid.GrothendieckGroup.html +++ b/Cubical.Algebra.CommMonoid.GrothendieckGroup.html @@ -29,7 +29,7 @@ module _ (M : CommMonoid ) where - open BinaryRelation + open BinaryRelation : CommMonoid _ = CommMonoidProd M M @@ -53,7 +53,7 @@ _+/_ : M²/R M²/R M²/R x +/ y = setQuotBinOp isReflR isReflR _·_ isCongR x y where - isReflR : isRefl R + isReflR : isRefl R isReflR (a , b) = ε , cong (ε ·_) (·Comm a b) isCongR : u u' v v' R u u' R v v' R (u · v) (u' · v') diff --git a/Cubical.Algebra.CommRing.Localisation.Base.html b/Cubical.Algebra.CommRing.Localisation.Base.html index f6df6cd542..260b04b328 100644 --- a/Cubical.Algebra.CommRing.Localisation.Base.html +++ b/Cubical.Algebra.CommRing.Localisation.Base.html @@ -67,15 +67,15 @@ S⁻¹R = (R × S) / _≈_ -- now define addition for S⁻¹R - open BinaryRelation + open BinaryRelation - locRefl : isRefl _≈_ + locRefl : isRefl _≈_ locRefl _ = (1r , SMultClosedSubset .containsOne) , refl - locSym : isSym _≈_ + locSym : isSym _≈_ locSym (r , s , s∈S') (r' , s' , s'∈S') (u , p) = u , sym p - locTrans : isTrans _≈_ + locTrans : isTrans _≈_ locTrans (r , s , s∈S') (r' , s' , s'∈S') (r'' , s'' , s''∈S') ((u , u∈S') , p) ((v , v∈S') , q) = ((u · v · s') , SMultClosedSubset .multClosed (SMultClosedSubset .multClosed u∈S' v∈S') s'∈S') , path @@ -89,10 +89,10 @@ u · s · (v · r'' · s') ≡⟨ solve! R' u · v · s' · r'' · s - locIsEquivRel : isEquivRel _≈_ - isEquivRel.reflexive locIsEquivRel = locRefl - isEquivRel.symmetric locIsEquivRel = locSym - isEquivRel.transitive locIsEquivRel = locTrans + locIsEquivRel : isEquivRel _≈_ + isEquivRel.reflexive locIsEquivRel = locRefl + isEquivRel.symmetric locIsEquivRel = locSym + isEquivRel.transitive locIsEquivRel = locTrans _+ₗ_ : S⁻¹R S⁻¹R S⁻¹R _+ₗ_ = setQuotSymmBinOp locRefl locTrans _+ₚ_ diff --git a/Cubical.Algebra.Group.QuotientGroup.html b/Cubical.Algebra.Group.QuotientGroup.html index a69c77073b..135eb2a79f 100644 --- a/Cubical.Algebra.Group.QuotientGroup.html +++ b/Cubical.Algebra.Group.QuotientGroup.html @@ -30,7 +30,7 @@ module _ (G' : Group ) (H' : Subgroup G') (Hnormal : isNormal H') where - open BinaryRelation + open BinaryRelation open isSubgroup (snd H') open GroupStr (snd G') open GroupTheory G' @@ -40,7 +40,7 @@ _~_ : G G Type x ~ y = x · inv y H' - isRefl~ : isRefl _~_ + isRefl~ : isRefl _~_ isRefl~ x = subst-∈ H' (sym (·InvR x)) id-closed G/H : Type diff --git a/Cubical.Algebra.IntegerMatrix.Base.html b/Cubical.Algebra.IntegerMatrix.Base.html index 04ba82c0c0..98c4c4926f 100644 --- a/Cubical.Algebra.IntegerMatrix.Base.html +++ b/Cubical.Algebra.IntegerMatrix.Base.html @@ -41,7 +41,7 @@ -- Using well-foundedness to do induction Norm : Type -Norm n = Acc _<_ (abs n) +Norm n = Acc _<_ (abs n) -- Divisibility of matrix elements diff --git a/Cubical.Algebra.IntegerMatrix.Diagonalization.html b/Cubical.Algebra.IntegerMatrix.Diagonalization.html index f78a1b7baf..e6ca910f6a 100644 --- a/Cubical.Algebra.IntegerMatrix.Diagonalization.html +++ b/Cubical.Algebra.IntegerMatrix.Diagonalization.html @@ -181,19 +181,19 @@ (p : ¬ M zero zero 0)(h : Norm (M zero zero)) (div? : DivStatus (M zero zero) M) DiagStep M - diagStep-helper M p (acc ind) (badCol i q) = + diagStep-helper M p (acc ind) (badCol i q) = let improved = improveRows M p normIneq = ind _ (stDivIneq p q (improved .div zero) (improved .div (suc i))) in simDiagStep (improved .sim) (diagStep-helper _ (improved .nonZero) normIneq (divStatus _ _)) - diagStep-helper M p (acc ind) (badRow j q) = + diagStep-helper M p (acc ind) (badRow j q) = let improved = improveCols M p normIneq = ind _ (stDivIneq p q (improved .div zero) (improved .div (suc j))) in simDiagStep (improved .sim) (diagStep-helper _ (improved .nonZero) normIneq (divStatus _ _)) - diagStep-helper M p (acc ind) (allDone div₁ div₂) = + diagStep-helper M p (acc ind) (allDone div₁ div₂) = let improveColM = improveCols M p invCol = bézoutRows-inv _ p div₂ divCol = i transport t invCol t zero invCol t (suc i)) (div₁ i)) diff --git a/Cubical.Algebra.IntegerMatrix.Smith.Normalization.html b/Cubical.Algebra.IntegerMatrix.Smith.Normalization.html index 22ac86afb6..a6367440b6 100644 --- a/Cubical.Algebra.IntegerMatrix.Smith.Normalization.html +++ b/Cubical.Algebra.IntegerMatrix.Smith.Normalization.html @@ -151,7 +151,7 @@ Empty.rec (q (∣-refl refl)) reducePivot-helper M _ _ cst (pivot (suc i) zero q) = Empty.rec (q (subst a (M zero zero) a) (sym (cst i)) (∣-refl refl))) - reducePivot-helper M p (acc ind) _ (pivot zero (suc j) q) = + reducePivot-helper M p (acc ind) _ (pivot zero (suc j) q) = let helperM = reducePivot-induction-helper M p j q reduceM = reducePivot-helper @@ -160,7 +160,7 @@ (ind _ (helperM .normIneq)) (helperM .improved .const) (findPivot _ _) in simPivotReduced (helperM .improved .sim) reduceM - reducePivot-helper M p (acc ind) cst (pivot (suc i) (suc j) q) = + reducePivot-helper M p (acc ind) cst (pivot (suc i) (suc j) q) = let swapM = swapFirstRow i M swapNonZero = r p (sym (cst i) (swapM .swapEq zero) r)) swapDiv = diff --git a/Cubical.Algebra.Ring.Quotient.html b/Cubical.Algebra.Ring.Quotient.html index 33deb8773e..6ef88899da 100644 --- a/Cubical.Algebra.Ring.Quotient.html +++ b/Cubical.Algebra.Ring.Quotient.html @@ -267,7 +267,7 @@ module idealIsKernel {R : Ring } (I : IdealsIn R) where open RingStr (snd R) open isIdeal (snd I) - open BinaryRelation.isEquivRel + open BinaryRelation.isEquivRel private π = quotientHom R I @@ -281,10 +281,10 @@ I⊆ker x x∈I = eq/ _ _ (subst (_∈ fst I) (sym (x-0≡x x)) x∈I) private - _~_ : Rel R R + _~_ : Rel R R x ~ y = x - y fst I - ~IsPropValued : BinaryRelation.isPropValued _~_ + ~IsPropValued : BinaryRelation.isPropValued _~_ ~IsPropValued x y = snd (fst I (x - y)) -- _~_ is an equivalence relation. @@ -306,10 +306,10 @@ (x + 0r) + - z ≡⟨ cong (_+ - z) (+IdR _) x - z - ~IsEquivRel : BinaryRelation.isEquivRel _~_ - reflexive ~IsEquivRel x = subst (_∈ fst I) (sym (+InvR x)) 0r-closed - symmetric ~IsEquivRel x y x~y = subst (_∈ fst I) -[x-y]≡y-x (-closed x~y) - transitive ~IsEquivRel x y z x~y y~z = subst (_∈ fst I) x-y+y-z≡x-z (+-closed x~y y~z) + ~IsEquivRel : BinaryRelation.isEquivRel _~_ + reflexive ~IsEquivRel x = subst (_∈ fst I) (sym (+InvR x)) 0r-closed + symmetric ~IsEquivRel x y x~y = subst (_∈ fst I) -[x-y]≡y-x (-closed x~y) + transitive ~IsEquivRel x y z x~y y~z = subst (_∈ fst I) x-y+y-z≡x-z (+-closed x~y y~z) ker⊆I : kernel π fst I ker⊆I x x∈ker = subst (_∈ fst I) (x-0≡x x) x-0∈I diff --git a/Cubical.Algebra.ZariskiLattice.Base.html b/Cubical.Algebra.ZariskiLattice.Base.html index 6188fb254d..f5bcaf525f 100644 --- a/Cubical.Algebra.ZariskiLattice.Base.html +++ b/Cubical.Algebra.ZariskiLattice.Base.html @@ -42,8 +42,8 @@ open import Cubical.HITs.SetQuotients as SQ open Iso -open BinaryRelation -open isEquivRel +open BinaryRelation +open isEquivRel private variable @@ -83,14 +83,14 @@ _∼_ : A A Type -- \sim α β = (α β) × (β α) - ∼PropValued : isPropValued (_∼_) + ∼PropValued : isPropValued (_∼_) ∼PropValued (_ , α) (_ , β) = isProp× (isPropΠ i β .fst (α i) .snd)) (isPropΠ i α .fst (β i) .snd)) - ∼EquivRel : isEquivRel (_∼_) - reflexive ∼EquivRel _ = isRefl≼ , isRefl≼ - symmetric ∼EquivRel _ _ = Σ-swap-Iso .fun - transitive ∼EquivRel _ _ _ a∼b b∼c = isTrans≼ (fst a∼b) (fst b∼c) , isTrans≼ (snd b∼c) (snd a∼b) + ∼EquivRel : isEquivRel (_∼_) + reflexive ∼EquivRel _ = isRefl≼ , isRefl≼ + symmetric ∼EquivRel _ _ = Σ-swap-Iso .fun + transitive ∼EquivRel _ _ _ a∼b b∼c = isTrans≼ (fst a∼b) (fst b∼c) , isTrans≼ (snd b∼c) (snd a∼b) -- lives in the same universe as R ZL : Type @@ -118,7 +118,7 @@ 1z = [ 1 , (replicateFinVec 1 1r) ] _∨z_ : ZL ZL ZL - _∨z_ = setQuotSymmBinOp (reflexive ∼EquivRel) (transitive ∼EquivRel) + _∨z_ = setQuotSymmBinOp (reflexive ∼EquivRel) (transitive ∼EquivRel) (_ , α) (_ , β) (_ , α ++Fin β)) (_ , α) (_ , β) ≡→∼ (cong (FGIdealAddLemma _ α β ∙∙ +iComm _ _ ∙∙ sym (FGIdealAddLemma _ β α)))) @@ -131,7 +131,7 @@ β ++Fin γ ) _∧z_ : ZL ZL ZL - _∧z_ = setQuotSymmBinOp (reflexive ∼EquivRel) (transitive ∼EquivRel) + _∧z_ = setQuotSymmBinOp (reflexive ∼EquivRel) (transitive ∼EquivRel) (_ , α) (_ , β) (_ , α ··Fin β)) (_ , α) (_ , β) ≡→∼ (cong (FGIdealMultLemma _ α β ∙∙ ·iComm _ _ ∙∙ sym (FGIdealMultLemma _ β α)))) @@ -154,7 +154,7 @@ (≡→∼ (cong (FGIdealAddLemma _ α β ∙∙ +iComm _ _ ∙∙ sym (FGIdealAddLemma _ β α)))) ∨zLid : (𝔞 : ZL) 0z ∨z 𝔞 𝔞 - ∨zLid = SQ.elimProp _ squash/ _ _) λ _ eq/ _ _ (reflexive ∼EquivRel _) + ∨zLid = SQ.elimProp _ squash/ _ _) λ _ eq/ _ _ (reflexive ∼EquivRel _) ∨zRid : (𝔞 : ZL) 𝔞 ∨z 0z 𝔞 ∨zRid _ = ∨zComm _ _ ∨zLid _ diff --git a/Cubical.Algebra.ZariskiLattice.StructureSheaf.html b/Cubical.Algebra.ZariskiLattice.StructureSheaf.html index ba09ff90ae..18d4d91899 100644 --- a/Cubical.Algebra.ZariskiLattice.StructureSheaf.html +++ b/Cubical.Algebra.ZariskiLattice.StructureSheaf.html @@ -80,8 +80,8 @@ open import Cubical.HITs.PropositionalTruncation as PT open Iso -open BinaryRelation -open isEquivRel +open BinaryRelation +open isEquivRel module _ { : Level} (R' : CommRing ) where diff --git a/Cubical.Algebra.ZariskiLattice.StructureSheafPullback.html b/Cubical.Algebra.ZariskiLattice.StructureSheafPullback.html index c880172a26..68ba26bb55 100644 --- a/Cubical.Algebra.ZariskiLattice.StructureSheafPullback.html +++ b/Cubical.Algebra.ZariskiLattice.StructureSheafPullback.html @@ -76,8 +76,8 @@ open import Cubical.HITs.PropositionalTruncation as PT open Iso -open BinaryRelation -open isEquivRel +open BinaryRelation +open isEquivRel private variable diff --git a/Cubical.Categories.Category.Path.html b/Cubical.Categories.Category.Path.html index d7f9ab9988..69f02cd7c3 100644 --- a/Cubical.Categories.Category.Path.html +++ b/Cubical.Categories.Category.Path.html @@ -36,8 +36,8 @@ field ob≡ : C .ob C' .ob Hom≡ : PathP i ob≡ i ob≡ i Type ℓ') (C .Hom[_,_]) (C' .Hom[_,_]) - id≡ : PathP i BinaryRelation.isRefl' (Hom≡ i)) (C .id) (C' .id) - ⋆≡ : PathP i BinaryRelation.isTrans' (Hom≡ i)) (C ._⋆_) (C' ._⋆_) + id≡ : PathP i BinaryRelation.isRefl' (Hom≡ i)) (C .id) (C' .id) + ⋆≡ : PathP i BinaryRelation.isTrans' (Hom≡ i)) (C ._⋆_) (C' ._⋆_) isSetHom≡ : PathP i {x y} isSet (Hom≡ i x y)) @@ -129,14 +129,14 @@ Hom≡ (CategoryPath≡ _ _ p≡ h≡ i) = h≡ i id≡ (CategoryPath≡ cp cp' p≡ h≡ i) j {x} = isSet→SquareP i j isProp→PathP i - isPropIsSet {A = BinaryRelation.isRefl' (h≡ i j)}) + isPropIsSet {A = BinaryRelation.isRefl' (h≡ i j)}) (isSetImplicitΠ λ x isSetHom≡ cp j {x} {x}) (isSetImplicitΠ λ x isSetHom≡ cp' j {x} {x}) i) (id≡ cp) (id≡ cp') _ C .id) _ C' .id) i j {x} ⋆≡ (CategoryPath≡ cp cp' p≡ h≡ i) j {x} {y} {z} = isSet→SquareP i j isProp→PathP i - isPropIsSet {A = BinaryRelation.isTrans' (h≡ i j)}) + isPropIsSet {A = BinaryRelation.isTrans' (h≡ i j)}) (isSetImplicitΠ3 x _ z isSetΠ2 λ _ _ isSetHom≡ cp j {x} {z})) (isSetImplicitΠ3 x _ z isSetΠ2 λ _ _ isSetHom≡ cp' j {x} {z})) i) (⋆≡ cp) (⋆≡ cp') _ C ._⋆_) _ C' ._⋆_) diff --git a/Cubical.Categories.Equivalence.WeakEquivalence.html b/Cubical.Categories.Equivalence.WeakEquivalence.html index e9169cad99..6bacd6b930 100644 --- a/Cubical.Categories.Equivalence.WeakEquivalence.html +++ b/Cubical.Categories.Equivalence.WeakEquivalence.html @@ -147,10 +147,10 @@ _ x i glue {(i = i0) _ ; (i = i1) _ }) (x i)) _ _ Hom≃ (C .id) (F-id F) ⋆≡ WeakEquivlance→CategoryPath = EquivJRel {_∻_ = C' [_,_]} - Ob e H[_,_] h[_,_] (⋆* : BinaryRelation.isTrans' H[_,_]) + Ob e H[_,_] h[_,_] (⋆* : BinaryRelation.isTrans' H[_,_]) (∀ {x y z : Ob} f g (h[ x , z ] ≃$ (⋆* f g)) C' ._⋆_ (h[ x , _ ] ≃$ f) (h[ y , _ ] ≃$ g) ) - PathP i BinaryRelation.isTrans' (RelPathP e h[_,_] i)) + PathP i BinaryRelation.isTrans' (RelPathP e h[_,_] i)) ⋆* {x y z} C' ._⋆_ {x} {y} {z})) _ x i f g glue {(i = i0) _ ; (i = i1) _ }) (x (unglue (i ~ i) f) (unglue (i ~ i) g) i )) diff --git a/Cubical.Cohomology.Base.html b/Cubical.Cohomology.Base.html index f6386c7f7d..8255c680e7 100644 --- a/Cubical.Cohomology.Base.html +++ b/Cubical.Cohomology.Base.html @@ -33,7 +33,7 @@ open import Cubical.Data.Nat.Base using () open import Cubical.Data.Sigma open import Cubical.Homotopy.Group.Base -open import Cubical.HITs.SetTruncation hiding (map) +open import Cubical.HITs.SetTruncation hiding (map) open import Cubical.Homotopy.Spectrum open import Cubical.Homotopy.Loopspace renaming (EH to isCommΩ) @@ -92,7 +92,7 @@ open GroupStr (snd CohomAsGroup) isComm : (a b : fst CohomAsGroup) a · b b · a - isComm = elim2 _ _ isSetPathImplicit) + isComm = elim2 _ _ isSetPathImplicit) λ a b a b ∣₂ ≡⟨ cong ∣_∣₂ (isCommΩ 0 a b) b a ∣₂ diff --git a/Cubical.Cohomology.EilenbergMacLane.Base.html b/Cubical.Cohomology.EilenbergMacLane.Base.html index 6a557998ec..99053d70fb 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Base.html +++ b/Cubical.Cohomology.EilenbergMacLane.Base.html @@ -37,7 +37,7 @@ open import Cubical.Algebra.AbGroup.Properties open import Cubical.HITs.SetTruncation as ST - hiding (rec ; map ; elim ; elim2 ; elim3) + hiding (rec ; map ; elim ; elim2 ; elim3) private variable @@ -56,13 +56,13 @@ module _ {n : } {G : AbGroup } {A : Type ℓ'} where _+ₕ_ : coHom n G A coHom n G A coHom n G A - _+ₕ_ = ST.rec2 squash₂ λ f g x f x +ₖ g x) ∣₂ + _+ₕ_ = ST.rec2 squash₂ λ f g x f x +ₖ g x) ∣₂ -ₕ_ : coHom n G A coHom n G A - -ₕ_ = ST.map λ f x -ₖ f x + -ₕ_ = ST.map λ f x -ₖ f x _-ₕ_ : coHom n G A coHom n G A coHom n G A - _-ₕ_ = ST.rec2 squash₂ λ f g x f x -ₖ g x) ∣₂ + _-ₕ_ = ST.rec2 squash₂ λ f g x f x -ₖ g x) ∣₂ module _ (n : ) {G : AbGroup } {A : Type ℓ'} where +ₕ-syntax : coHom n G A coHom n G A coHom n G A @@ -83,27 +83,27 @@ 0ₕ = _ 0ₖ n) ∣₂ rUnitₕ : (x : coHom n G A) x +ₕ 0ₕ x - rUnitₕ = ST.elim _ isSetPathImplicit) + rUnitₕ = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x rUnitₖ n (f x)) lUnitₕ : (x : coHom n G A) 0ₕ +[ n ]ₕ x x - lUnitₕ = ST.elim _ isSetPathImplicit) + lUnitₕ = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x lUnitₖ n (f x)) commₕ : (x y : coHom n G A) x +ₕ y y +ₕ x - commₕ = ST.elim2 _ _ isSetPathImplicit) + commₕ = ST.elim2 _ _ isSetPathImplicit) λ f g cong ∣_∣₂ (funExt λ x commₖ n (f x) (g x)) assocₕ : (x y z : coHom n G A) x +ₕ (y +ₕ z) (x +ₕ y) +ₕ z - assocₕ = ST.elim3 _ _ _ isSetPathImplicit) + assocₕ = ST.elim3 _ _ _ isSetPathImplicit) λ f g h cong ∣_∣₂ (funExt λ x assocₖ n (f x) (g x) (h x)) rCancelₕ : (x : coHom n G A) x +ₕ (-ₕ x) 0ₕ - rCancelₕ = ST.elim _ isSetPathImplicit) + rCancelₕ = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x rCancelₖ n (f x)) lCancelₕ : (x : coHom n G A) (-ₕ x) +ₕ x 0ₕ - lCancelₕ = ST.elim _ isSetPathImplicit) + lCancelₕ = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x lCancelₖ n (f x)) coHomGr : (n : ) (G : AbGroup ) (A : Type ℓ') AbGroup (ℓ-max ℓ') @@ -129,12 +129,12 @@ -- operations module _ {n : } {G : AbGroup } {A : Pointed ℓ'} where _+ₕ∙_ : coHomRed n G A coHomRed n G A coHomRed n G A - _+ₕ∙_ = ST.rec2 squash₂ + _+ₕ∙_ = ST.rec2 squash₂ λ f g x fst f x +ₖ fst g x) , cong₂ _+ₖ_ (snd f) (snd g) rUnitₖ n (0ₖ n) ∣₂ -ₕ∙_ : coHomRed n G A coHomRed n G A - -ₕ∙_ = ST.map λ f x -ₖ (fst f x)) + -ₕ∙_ = ST.map λ f x -ₖ (fst f x)) , cong -ₖ_ (snd f) -0ₖ n @@ -144,7 +144,7 @@ module coHomRedAxioms (n : ) {G : AbGroup } {A : Pointed ℓ'} where commₕ∙ : (x y : coHomRed n G A) x +ₕ∙ y y +ₕ∙ x commₕ∙ = - ST.elim2 _ _ isSetPathImplicit) + ST.elim2 _ _ isSetPathImplicit) λ f g cong ∣_∣₂ (ΣPathP (funExt x commₖ n (fst f x) (fst g x)) , help n _ (sym (snd f)) _ (sym (snd g)))) where @@ -160,7 +160,7 @@ rCancelₕ∙ : (x : coHomRed n G A) (x +ₕ∙ (-ₕ∙ x)) 0ₕ∙ n rCancelₕ∙ = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (ΣPathP ((funExt x rCancelₖ n (fst f x))) , help n _ (sym (snd f)))) where @@ -177,7 +177,7 @@ lCancelₕ∙ x = commₕ∙ (-ₕ∙ x) x rCancelₕ∙ x rUnitₕ∙ : (x : coHomRed n G A) (x +ₕ∙ 0ₕ∙ n) x - rUnitₕ∙ = ST.elim _ isSetPathImplicit) + rUnitₕ∙ = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (ΣPathP ((funExt λ x rUnitₖ n (fst f x)) , help n _ (sym (snd f)))) where @@ -190,7 +190,7 @@ help (suc (suc n)) = J> sym (rUnit refl) lUnitₕ∙ : (x : coHomRed n G A) (0ₕ∙ n +ₕ∙ x) x - lUnitₕ∙ = ST.elim _ isSetPathImplicit) + lUnitₕ∙ = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (ΣPathP ((funExt x lUnitₖ n (fst f x))) , help n _ (sym (snd f)))) where @@ -204,7 +204,7 @@ assocₕ∙ : (x y z : coHomRed n G A) x +ₕ∙ (y +ₕ∙ z) (x +ₕ∙ y) +ₕ∙ z assocₕ∙ = - ST.elim3 _ _ _ isSetPathImplicit) + ST.elim3 _ _ _ isSetPathImplicit) λ f g h cong ∣_∣₂ (ΣPathP ((funExt x assocₖ n (fst f x) (fst g x) (fst h x))) , help n _ (sym (snd f)) _ (sym (snd g)) _ (sym (snd h)))) @@ -258,23 +258,23 @@ EM-raw'→EM∙ G (suc n) ∣₁) main : GroupIso _ _ - Iso.fun (fst main) = ST.map fst - Iso.inv (fst main) = ST.map λ f x f x -ₖ f (pt A)) + Iso.fun (fst main) = ST.map fst + Iso.inv (fst main) = ST.map λ f x f x -ₖ f (pt A)) , rCancelₖ (suc n) (f (pt A)) Iso.rightInv (fst main) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f PT.rec (squash₂ _ _) p cong ∣_∣₂ (funExt λ x cong z f x +ₖ z) (cong -ₖ_ p -0ₖ (suc n)) rUnitₖ (suc n) (f x))) (con-lem n (f (pt A))) Iso.leftInv (fst main) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM (suc n)) (funExt λ x cong (fst f x +ₖ_) (cong -ₖ_ (snd f) -0ₖ (suc n)) rUnitₖ (suc n) (fst f x))) snd main = - makeIsGroupHom (ST.elim2 _ _ isSetPathImplicit) + makeIsGroupHom (ST.elim2 _ _ isSetPathImplicit) λ _ _ refl) coHom⁰≅coHomRed⁰ : (G : AbGroup ) (A : Pointed ) @@ -282,19 +282,19 @@ fst (coHom⁰≅coHomRed⁰ G A) = isoToEquiv is where is : Iso _ _ - Iso.fun is = uncurry (ST.rec (isSetΠ _ squash₂)) + Iso.fun is = uncurry (ST.rec (isSetΠ _ squash₂)) λ f g x AbGroupStr._+_ (snd G) (fst f x) g) ∣₂) - Iso.inv is = ST.rec (isSet× squash₂ (is-set (snd G))) + Iso.inv is = ST.rec (isSet× squash₂ (is-set (snd G))) λ f x AbGroupStr._-_ (snd G) (f x) (f (pt A))) , +InvR (snd G) (f (pt A)) ∣₂ , f (pt A) - Iso.rightInv is = ST.elim _ isSetPathImplicit) + Iso.rightInv is = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x sym (+Assoc (snd G) _ _ _) ∙∙ cong (AbGroupStr._+_ (snd G) (f x)) (+InvL (snd G) (f (pt A))) ∙∙ +IdR (snd G) (f x)) Iso.leftInv is = - uncurry (ST.elim + uncurry (ST.elim _ isSetΠ _ isOfHLevelPath 2 (isSet× squash₂ (is-set (snd G))) _ _)) λ f λ g @@ -311,35 +311,35 @@ , (cong x AbGroupStr._+_ (snd G) x g) (snd f) +IdL (snd G) g))) snd (coHom⁰≅coHomRed⁰ G A) = - makeIsGroupHom (uncurry (ST.elim _ isSetΠ2 λ _ _ isSetPathImplicit) - λ f1 g1 uncurry (ST.elim _ isSetΠ λ _ isSetPathImplicit) + makeIsGroupHom (uncurry (ST.elim _ isSetΠ2 λ _ _ isSetPathImplicit) + λ f1 g1 uncurry (ST.elim _ isSetΠ λ _ isSetPathImplicit) λ f2 g2 cong ∣_∣₂ (funExt λ a AbGroupTheory.comm-4 G _ _ _ _)))) -- ℤ/2 lemmas +ₕ≡id-ℤ/2 : {} {A : Type } (n : ) (x : coHom n ℤ/2 A) x +ₕ x 0ₕ n +ₕ≡id-ℤ/2 n = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x +ₖ≡id-ℤ/2 n (f x)) -ₕConst-ℤ/2 : (n : ) {A : Type } (x : coHom n ℤ/2 A) -ₕ x x -ₕConst-ℤ/2 zero = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x -Const-ℤ/2 (f x)) -ₕConst-ℤ/2 (suc n) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x -ₖConst-ℤ/2 n (f x)) coHomFun : {ℓ''} {A : Type } {B : Type ℓ'} {G : AbGroup ℓ''} (n : ) (f : A B) coHom n G B coHom n G A -coHomFun n f = ST.map λ g x g (f x) +coHomFun n f = ST.map λ g x g (f x) coHomHom : {ℓ''} {A : Type } {B : Type ℓ'} {G : AbGroup ℓ''} (n : ) (f : A B) AbGroupHom (coHomGr n G B) (coHomGr n G A) fst (coHomHom n f) = coHomFun n f snd (coHomHom n f) = - makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) + makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ f g refl) coHomEquiv : {ℓ''} {A : Type } {B : Type ℓ'} {G : AbGroup ℓ''} @@ -352,24 +352,24 @@ Iso.fun is = coHomFun n (Iso.fun f) Iso.inv is = coHomFun n (Iso.inv f) Iso.rightInv is = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ g cong ∣_∣₂ (funExt λ x cong g (Iso.leftInv f x)) Iso.leftInv is = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ g cong ∣_∣₂ (funExt λ x cong g (Iso.rightInv f x)) snd (coHomEquiv n f) = snd (coHomHom n (Iso.fun f)) coHomFun∙ : {ℓ''} {A : Pointed } {B : Pointed ℓ'} {G : AbGroup ℓ''} (n : ) (f : A →∙ B) coHomRed n G B coHomRed n G A -coHomFun∙ n f = ST.map λ g g ∘∙ f +coHomFun∙ n f = ST.map λ g g ∘∙ f coHomHom∙ : {ℓ''} {A : Pointed } {B : Pointed ℓ'} {G : AbGroup ℓ''} (n : ) (f : A →∙ B) AbGroupHom (coHomRedGr n G B) (coHomRedGr n G A) fst (coHomHom∙ n f) = coHomFun∙ n f snd (coHomHom∙ n f) = - makeIsGroupHom (ST.elim2 _ _ isSetPathImplicit) + makeIsGroupHom (ST.elim2 _ _ isSetPathImplicit) λ g h cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) refl)) substℕ-coHom : {A : Type } {G : AbGroup ℓ'} {n m : } @@ -416,7 +416,7 @@ ((f : A EM G (suc n)) f a 0ₖ (suc n) B f ∣₂) (x : coHom (suc n) G A) B x coHomPointedElim {ℓ'' = ℓ''} {G = G} {A = A} n a isprop indp = - ST.elim _ isOfHLevelSuc 1 (isprop _)) + ST.elim _ isOfHLevelSuc 1 (isprop _)) λ f helper n isprop indp f where helper : (n : ) {B : coHom (suc n) G A Type ℓ''} @@ -432,9 +432,9 @@ coHomTruncEquiv : {A : Type } (G : AbGroup ) (n : ) AbGroupEquiv (coHomGr n G ( A (suc (suc n)))) (coHomGr n G A) fst (coHomTruncEquiv G n) = - isoToEquiv (setTruncIso (univTrunc (suc (suc n)) {B = _ , hLevelEM G n})) + isoToEquiv (setTruncIso (univTrunc (suc (suc n)) {B = _ , hLevelEM G n})) snd (coHomTruncEquiv G n) = - makeIsGroupHom (ST.elim2 _ _ isSetPathImplicit) + makeIsGroupHom (ST.elim2 _ _ isSetPathImplicit) λ _ _ refl) EM→-charac : { ℓ'} {A : Pointed } {G : AbGroup ℓ'} (n : ) diff --git a/Cubical.Cohomology.EilenbergMacLane.CupProduct.html b/Cubical.Cohomology.EilenbergMacLane.CupProduct.html index 23f951cc85..e1b2384d72 100644 --- a/Cubical.Cohomology.EilenbergMacLane.CupProduct.html +++ b/Cubical.Cohomology.EilenbergMacLane.CupProduct.html @@ -57,51 +57,51 @@ _⌣_ : {n m : } coHom n G' A coHom m G' A coHom (n +' m) G' A - _⌣_ = ST.rec2 squash₂ λ f g x f x ⌣ₖ g x) ∣₂ + _⌣_ = ST.rec2 squash₂ λ f g x f x ⌣ₖ g x) ∣₂ ⌣-0ₕ : (n m : ) (x : coHom n G' A) (x 0ₕ m) 0ₕ (n +' m) ⌣-0ₕ n m = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x ⌣ₖ-0ₖ n m (f x)) 0ₕ-⌣ : (n m : ) (x : coHom m G' A) (0ₕ n x) 0ₕ (n +' m) 0ₕ-⌣ n m = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x 0ₖ-⌣ₖ n m (f x)) ⌣-1ₕ : (n : ) (x : coHom n G' A) (x 1ₕ) subst n coHom n G' A) (+'-comm zero n) x ⌣-1ₕ n = - ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x ⌣ₖ-1ₖ n (f x) cong (transport i EM G' (+'-comm zero n i))) (cong f (sym (transportRefl x)))) 1ₕ-⌣ : (n : ) (x : coHom n G' A) (1ₕ x) x - 1ₕ-⌣ n = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ + 1ₕ-⌣ n = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x 1ₖ-⌣ₖ n (f x)) distrR⌣ : (n m : ) (x y : coHom n G' A) (z : coHom m G' A) ((x +ₕ y) z) (x z) +ₕ (y z) distrR⌣ n m = - ST.elim2 _ _ isSetΠ _ isSetPathImplicit)) - λ f g ST.elim _ isSetPathImplicit) + ST.elim2 _ _ isSetΠ _ isSetPathImplicit)) + λ f g ST.elim _ isSetPathImplicit) λ h cong ∣_∣₂ (funExt x distrR⌣ₖ n m (f x) (g x) (h x))) distrL⌣ : (n m : ) (x : coHom n G' A) (y z : coHom m G' A) (x (y +ₕ z)) (x y) +ₕ (x z) distrL⌣ n m = - ST.elim _ isSetΠ2 _ _ isSetPathImplicit)) - λ f ST.elim2 _ _ isSetPathImplicit) + ST.elim _ isSetΠ2 _ _ isSetPathImplicit)) + λ f ST.elim2 _ _ isSetPathImplicit) λ g h cong ∣_∣₂ (funExt x distrL⌣ₖ n m (f x) (g x) (h x))) assoc⌣ : (n m l : ) (x : coHom n G' A) (y : coHom m G' A) (z : coHom l G' A) ((x y) z) subst n coHom n G' A) (+'-assoc n m l) (x (y z)) assoc⌣ n m l = - ST.elim _ isSetΠ2 _ _ isSetPathImplicit)) - λ f ST.elim _ isSetΠ _ isSetPathImplicit)) - λ g ST.elim _ isSetPathImplicit) + ST.elim _ isSetΠ2 _ _ isSetPathImplicit)) + λ f ST.elim _ isSetΠ _ isSetPathImplicit)) + λ g ST.elim _ isSetPathImplicit) λ h cong ∣_∣₂ (funExt λ x assoc⌣ₖ n m l (f x) (g x) (h x) cong (transport i EM G' (+'-assoc n m l i))) (cong x (f x ⌣ₖ (g x ⌣ₖ h x))) (sym (transportRefl x)))) @@ -109,20 +109,20 @@ -- Graded commutativity -ₕ^[_·_] : {G' : AbGroup } {A : Type ℓ'} (n m : ) {k : } coHom k G' A coHom k G' A --ₕ^[ n · m ] = ST.map λ f x -ₖ^[ n · m ] (f x) +-ₕ^[ n · m ] = ST.map λ f x -ₖ^[ n · m ] (f x) -ₕ^[_·_]-even : {G' : AbGroup } {A : Type ℓ'} (n m : ) {k : } isEvenT n isEvenT m (x : coHom k G' A) -ₕ^[ n · m ] x x -ₕ^[ n · m ]-even {k = k} p = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x -ₖ^[ n · m ]-even p (f x)) -ₕ^[_·_]-odd : {G' : AbGroup } {A : Type ℓ'} (n m : ) {k : } isOddT n × isOddT m (x : coHom k G' A) -ₕ^[ n · m ] x -ₕ x -ₕ^[ n · m ]-odd {k = k} p = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x -ₖ^[ n · m ]-odd p (f x)) comm⌣ : {G'' : CommRing } {A : Type ℓ'} (n m : ) @@ -132,7 +132,7 @@ (+'-comm m n) (-ₕ^[ n · m ] (y x)) comm⌣ {G'' = R} {A = A} n m = - ST.elim2 _ _ isSetPathImplicit) + ST.elim2 _ _ isSetPathImplicit) λ f g cong ∣_∣₂ (funExt λ x ⌣ₖ-comm n m (f x) (g x) cong (subst n EM (CommRing→AbGroup R) n) (+'-comm m n)) @@ -184,7 +184,7 @@ where lem : (x : coHom n ℤ/2 A) (y : coHom m ℤ/2 A) -ₕ^[ n · m ] (y ⌣[ ℤ/2Ring ] x) (y x) - lem = ST.elim2 _ _ isSetPathImplicit) + lem = ST.elim2 _ _ isSetPathImplicit) λ _ _ cong ∣_∣₂ (funExt λ _ -ₖ^[ n · m ]-const _) module _ {G'' : Ring } {A : Type ℓ'} where diff --git a/Cubical.Cohomology.EilenbergMacLane.EilenbergSteenrod.html b/Cubical.Cohomology.EilenbergMacLane.EilenbergSteenrod.html index 71b7352cc1..3469f4e47b 100644 --- a/Cubical.Cohomology.EilenbergMacLane.EilenbergSteenrod.html +++ b/Cubical.Cohomology.EilenbergMacLane.EilenbergSteenrod.html @@ -67,14 +67,14 @@ compGroupHom (Hmap∙ n g) (Hmap∙ n f) Hmap∙ n (g ∘∙ f) compAx (pos n) g f = Σ≡Prop _ isPropIsGroupHom _ _) - (funExt (ST.elim _ isSetPathImplicit) + (funExt (ST.elim _ isSetPathImplicit) λ a cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) refl))) compAx (negsuc n) g f = Σ≡Prop _ isPropIsGroupHom _ _) refl idAx : (n : ) {A : Pointed ℓ'} Hmap∙ n (idfun∙ A) idGroupHom idAx (pos n) = Σ≡Prop _ isPropIsGroupHom _ _) - (funExt (ST.elim _ isSetPathImplicit) + (funExt (ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (ΣPathP (refl , sym (lUnit (snd f)))))) idAx (negsuc n) = refl @@ -82,7 +82,7 @@ AbGroupHom (coHomRedℤ G (sucℤ n) (Susp (typ A) , north)) (coHomRedℤ G n A) fst (suspMap (pos n) {A = A}) = - ST.map λ f x ΩEM+1→EM n + ST.map λ f x ΩEM+1→EM n (sym (snd f) ∙∙ cong (fst f) (merid x sym (merid (pt A))) ∙∙ snd f)) @@ -94,7 +94,7 @@ ΩEM+1→EM-refl n snd (suspMap (pos n) {A = A}) = makeIsGroupHom - (ST.elim2 _ _ isSetPathImplicit) + (ST.elim2 _ _ isSetPathImplicit) f g cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) (funExt λ x main n _ (sym (snd f)) _ (sym (snd g)) (cong (fst f) (merid x sym (merid (pt A)))) @@ -143,11 +143,11 @@ AbGroupIso (coHomRedℤ G (sucℤ n) (Susp (typ A) , north)) (coHomRedℤ G n A) fun (fst (suspMapIso n)) = suspMap n .fst - inv (fst (suspMapIso (pos n))) = ST.map (toSusp-coHomRed n) + inv (fst (suspMapIso (pos n))) = ST.map (toSusp-coHomRed n) inv (fst (suspMapIso (negsuc zero))) _ = 0ₕ∙ zero inv (fst (suspMapIso (negsuc (suc n)))) _ = tt* rightInv (fst (suspMapIso (pos n) {A = A})) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) (funExt λ x cong (ΩEM+1→EM n) (sym (rUnit _) @@ -161,7 +161,7 @@ rightInv (fst (suspMapIso (negsuc zero))) tt* = refl rightInv (fst (suspMapIso (negsuc (suc n)))) tt* = refl leftInv (fst (suspMapIso (pos n) {A = A})) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM (suc n)) (funExt λ { north sym (snd f) ; south sym (snd f) cong (fst f) (merid (pt A)) @@ -182,7 +182,7 @@ (fst f (compPath-filler (merid a) (sym (merid (pt A))) (~ i) j)) leftInv (fst (suspMapIso (negsuc zero) {A = A})) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (Σ≡Prop _ hLevelEM G 0 _ _) (funExt (suspToPropElim (pt A) _ hLevelEM G 0 _ _) @@ -196,7 +196,7 @@ HMapId (satisfies-ES G) = coHomRedℤ.idAx fst (Suspension (satisfies-ES G)) n = GroupIso→GroupEquiv (coHomRedℤ.suspMapIso n) snd (Suspension (satisfies-ES G)) f (pos n) = - funExt (ST.elim _ isSetPathImplicit) λ f + funExt (ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM (suc n)) (funExt λ { north refl ; south refl @@ -209,22 +209,22 @@ To : (x : coHomRed n G B) isInKer (coHomHom∙ n f) x isInIm (coHomHom∙ n (cfcod (fst f) , refl)) x - To = ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInIm _ _)) + To = ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInIm _ _)) λ g p PT.map id { (inl x) 0ₖ n ; (inr x) fst g x ; (push a i) id (~ i) .fst a}) , snd g ∣₂ , cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) refl)) - (Iso.fun ST.PathIdTrunc₀Iso p) + (Iso.fun ST.PathIdTrunc₀Iso p) From : (x : coHomRed n G B) isInIm (coHomHom∙ n (cfcod (fst f) , refl)) x isInKer (coHomHom∙ n f) x From = - ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInKer _ _)) + ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInKer _ _)) λ g PT.rec (isPropIsInKer _ _) - (uncurry (ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInKer _ _)) + (uncurry (ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInKer _ _)) λ h p PT.rec (squash₂ _ _) id cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) (funExt λ x sym (funExt⁻ (cong fst id) (fst f x)) @@ -232,7 +232,7 @@ push (pt A) λ i inr (snd f i)) snd h))) - (Iso.fun ST.PathIdTrunc₀Iso p))) + (Iso.fun ST.PathIdTrunc₀Iso p))) help : Iso (Ker (coHomHom∙ n f)) (Im (coHomHom∙ n (cfcod (fst f) , refl))) @@ -253,7 +253,7 @@ Dimension (satisfies-ES G) (pos zero) p = ⊥.rec (p refl) fst (Dimension (satisfies-ES G) (pos (suc n)) _) = 0ₕ∙ (suc n) snd (Dimension (satisfies-ES G) (pos (suc n)) _) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f T.rec (isProp→isOfHLevelSuc n (squash₂ _ _)) p cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM (suc n)) (funExt λ { (lift false) sym p @@ -267,22 +267,22 @@ where main : GroupIso _ _ fun (fst main) = - ST.rec (isSet× squash₂ squash₂) + ST.rec (isSet× squash₂ squash₂) λ f f ∘∙ (inl , refl) ∣₂ , f ∘∙ (inr , sym (push tt)) ∣₂ inv (fst main) = - uncurry (ST.rec2 squash₂ + uncurry (ST.rec2 squash₂ λ f g { (inl x) fst f x ; (inr x) fst g x ; (push a i) (snd f sym (snd g)) i}) , snd f ∣₂) rightInv (fst main) = uncurry - (ST.elim2 _ _ isOfHLevelPath 2 (isSet× squash₂ squash₂) _ _) + (ST.elim2 _ _ isOfHLevelPath 2 (isSet× squash₂ squash₂) _ _) λ f g ΣPathP ((cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) refl)) , cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) refl))) leftInv (fst main) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) (funExt λ { (inl x) refl ; (inr x) refl @@ -297,7 +297,7 @@ sym (lUnit q) snd main = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 (isSet× squash₂ squash₂) _ _) + (ST.elim2 _ _ isOfHLevelPath 2 (isSet× squash₂ squash₂) _ _) λ f g ΣPathP (cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) refl) , (cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) refl)))) @@ -320,15 +320,15 @@ snd eq = satAC _ mainIso : Iso _ _ - fun mainIso = ST.map λ f i + fun mainIso = ST.map λ f i x f .fst (inr (i , x))) , cong (fst f) (sym (push i)) snd f - inv mainIso = ST.map λ f { (inl x) 0ₖ n + inv mainIso = ST.map λ f { (inl x) 0ₖ n ; (inr x) f (fst x) .fst (snd x) ; (push a i) f a .snd (~ i)}) , refl - rightInv mainIso = ST.elim _ isSetPathImplicit) + rightInv mainIso = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt i ΣPathP (refl , (sym (rUnit (snd (f i))))))) - leftInv mainIso = ST.elim _ isSetPathImplicit) + leftInv mainIso = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (ΣPathP ((funExt { (inl x) sym (snd f) ; (inr x) refl @@ -345,7 +345,7 @@ (codomainIsoDep λ i invIso setTruncTrunc2Iso)) altEquiv≡ : fst altEquiv _ - altEquiv≡ = funExt (ST.elim _ isOfHLevelPath 2 (isSetΠ _ squash₂)) _ _) + altEquiv≡ = funExt (ST.elim _ isOfHLevelPath 2 (isSetΠ _ squash₂)) _ _) λ _ refl) Wedge (satisfies-ES-gen G) (negsuc n) {I = I} satAC {A = A} = isoToIsEquiv (iso _ _ tt*) _ refl) λ _ refl) diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.Connected.html b/Cubical.Cohomology.EilenbergMacLane.Groups.Connected.html index 65806f6ee7..771ff7a08a 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.Connected.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.Connected.html @@ -34,7 +34,7 @@ H⁰→G' : hLevelTrunc 2 A H⁰A fst G H⁰→G' = Trunc.rec (isSetΠ _ is-set)) - a ST.rec is-set λ f f a) + a ST.rec is-set λ f f a) H⁰→G'-id : (a : hLevelTrunc 2 A) H⁰→G' a* H⁰→G' a H⁰→G'-id a = cong H⁰→G' (conA .snd a) @@ -50,8 +50,8 @@ a g i H⁰→G'-id a i (G→H⁰ g)) a* H⁰→G→H⁰ : (x : H⁰A) G→H⁰ (H⁰→G x) x - H⁰→G→H⁰ = ST.elim _ isSetPathImplicit) λ f - Trunc.rec isSetPathImplicit + H⁰→G→H⁰ = ST.elim _ isSetPathImplicit) λ f + Trunc.rec isSetPathImplicit a i G→H⁰ (H⁰→G'-id a ∣ₕ i f ∣₂)) cong ∣_∣₂ (funExt λ x Trunc.rec (is-set _ _) diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.KleinBottle.html b/Cubical.Cohomology.EilenbergMacLane.Groups.KleinBottle.html index a91685949e..7ab0c90251 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.KleinBottle.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.KleinBottle.html @@ -139,7 +139,7 @@ ------ H¹(K²,ℤ/2) ------ H¹K²→ℤ/2×ℤ/2 : coHom 1 ℤ/2 KleinBottle fst (dirProdAb ℤ/2 ℤ/2) -H¹K²→ℤ/2×ℤ/2 = ST.rec (is-set (snd (dirProdAb ℤ/2 ℤ/2))) +H¹K²→ℤ/2×ℤ/2 = ST.rec (is-set (snd (dirProdAb ℤ/2 ℤ/2))) λ f ΩEM+1→EM-gen _ _ (cong f line1) , ΩEM+1→EM-gen _ _ (cong f line2) @@ -181,7 +181,7 @@ H¹K²→ℤ/2×ℤ/2→H¹K² : (x : _) ℤ/2×ℤ/2→H¹K² (H¹K²→ℤ/2×ℤ/2 x) x H¹K²→ℤ/2×ℤ/2→H¹K² = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) (ConnK².elim₁ (isConnectedEM 1) _ squash₂ _ _) embase λ l1 l2 sq cong ∣_∣₂ (funExt (elimSet _ hLevelEM _ 1 _ _) refl (flipSquare (Iso.rightInv (Iso-EM-ΩEM+1 0) l1)) @@ -268,7 +268,7 @@ H²K²→ℤ/2 : coHom 2 ℤ/2 KleinBottle fst ℤ/2 H²K²→ℤ/2 = - ST.rec isSetFin + ST.rec isSetFin λ f H²K²→ℤ/2₂ (H²K²→ℤ/2₁ f) -- Map in other direction @@ -278,7 +278,7 @@ -- Cancellations H²K²→ℤ/2→H²K² : (f : coHom 2 ℤ/2 KleinBottle) ℤ/2→H²K² (H²K²→ℤ/2 f) f H²K²→ℤ/2→H²K² = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) (ConnK².elim₂ (isConnectedEM 2) _ squash₂ _ _) north λ sq cong ℤ/2→H²K² (H²K²→ℤ/2-rewrite sq) cong ∣_∣₂ (funExt @@ -316,14 +316,14 @@ Iso.leftInv is = H²K²→ℤ/2→H²K² snd H²[K²,ℤ/2]≅ℤ/2 = Isoℤ/2-morph (fst H²[K²,ℤ/2]≅ℤ/2) (0ₕ 2) (sym H²K²→ℤ/2-pres0) _+ₕ_ (-ₕ_) - (funExt (ST.elim _ isSetPathImplicit) + (funExt (ST.elim _ isSetPathImplicit) f cong ∣_∣₂ (funExt λ x sym (-ₖConst-ℤ/2 1 (f x)))))) (AbGroupStr.isAbGroup (coHomGr 2 ℤ/2 KleinBottle .snd)) isContr-HⁿKleinBottle : (n : ) (G : AbGroup ) isContr (coHom (suc (suc (suc n))) G KleinBottle) fst (isContr-HⁿKleinBottle n G) = (KleinFun north refl refl refl) ∣₂ -snd (isContr-HⁿKleinBottle n G) = ST.elim _ isSetPathImplicit) +snd (isContr-HⁿKleinBottle n G) = ST.elim _ isSetPathImplicit) (ConnK².elim₂ (isConnectedSubtr 3 (suc n) (subst m isConnected m (EM G (3 +ℕ n))) (cong suc (+-comm 3 n)) @@ -387,21 +387,21 @@ mainIso : Iso (coHom 1 G KleinBottle) (fst G × coHom 1 G RP²) Iso.fun mainIso = - ST.rec (isSet× (is-set (snd G)) squash₂) + ST.rec (isSet× (is-set (snd G)) squash₂) λ f (ΩEM+1→EM-gen 0 _ (cong f line2)) , F→ f ∣₂ - Iso.inv mainIso = uncurry λ g ST.map (F← g) + Iso.inv mainIso = uncurry λ g ST.map (F← g) Iso.rightInv mainIso = uncurry λ g - ST.elim _ isOfHLevelPath 2 (isSet× (is-set (snd G)) squash₂) _ _) + ST.elim _ isOfHLevelPath 2 (isSet× (is-set (snd G)) squash₂) _ _) λ f ΣPathP ((Iso.leftInv (Iso-EM-ΩEM+1-gen 0 (f point)) g) , cong ∣_∣₂ (funExt (elimSetRP² _ hLevelEM G 1 _ _) refl λ i j f (line i)))) - Iso.leftInv mainIso = ST.elim _ isSetPathImplicit) + Iso.leftInv mainIso = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt (elimSet _ hLevelEM G 1 _ _) refl i j f (line1 i)) (flipSquare (Iso.rightInv (Iso-EM-ΩEM+1-gen 0 (f point)) (cong f line2))))) snd (H¹[K²,G]≅G×H¹[RP²,G] G) = - makeIsGroupHom (ST.elim2 + makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 lem _ _) (ConnK².elim₁ (isConnectedEM 1) _ isPropΠ λ _ lem _ _) embase λ p1 q1 r1 @@ -439,30 +439,30 @@ Σ[ q Ω (EM∙ G (2 +ℕ n)) .fst ] Square (sym p) p q q) ∥₂ (Σ[ x EM G (2 +ℕ n) ] (Σ[ p Ω (EM G (2 +ℕ n) , x) .fst ] Σ[ q Ω (EM G (2 +ℕ n) , x) .fst ] Square (sym p) p q q)) ∥₂ - Iso.fun (H²K²-helperIso₁ G n) = ST.map (0ₖ _ ,_) - Iso.inv (H²K²-helperIso₁ G n) = ST.rec squash₂ + Iso.fun (H²K²-helperIso₁ G n) = ST.map (0ₖ _ ,_) + Iso.inv (H²K²-helperIso₁ G n) = ST.rec squash₂ (uncurry (EM-raw'-elim G (2 +ℕ n) _ isOfHLevelΠ (3 +ℕ n) λ _ isOfHLevelPlus' {n = suc n} 2 squash₂) (EM-raw'-trivElim G (suc n) _ isOfHLevelΠ (2 +ℕ n) λ _ isOfHLevelPlus' {n = n} 2 squash₂) ∣_∣₂))) - Iso.rightInv (H²K²-helperIso₁ G n) = ST.elim _ isSetPathImplicit) + Iso.rightInv (H²K²-helperIso₁ G n) = ST.elim _ isSetPathImplicit) (uncurry (EM-raw'-elim G (2 +ℕ n) _ isOfHLevelΠ (3 +ℕ n) λ _ isOfHLevelPlus' {n = suc (suc n)} 1 (squash₂ _ _)) (EM-raw'-trivElim G (suc n) _ isOfHLevelΠ (2 +ℕ n) λ _ isOfHLevelPlus' {n = suc n} 1 (squash₂ _ _)) λ _ refl))) - Iso.leftInv (H²K²-helperIso₁ G n) = ST.elim _ isSetPathImplicit) λ _ refl + Iso.leftInv (H²K²-helperIso₁ G n) = ST.elim _ isSetPathImplicit) λ _ refl H²K²-helperIso₂ : (G : AbGroup ) (n : ) Iso (Σ[ p Ω (EM∙ G (2 +ℕ n)) .fst ] Σ[ q Ω (EM∙ G (2 +ℕ n)) .fst ] Square (sym p) p q q) ∥₂ ((Σ[ p Ω (EM∙ G (2 +ℕ n)) .fst ] p sym p)) ∥₂ - Iso.fun (H²K²-helperIso₂ G n) = ST.map (H²K²-helperFun₁ G n) - Iso.inv (H²K²-helperIso₂ G n) = ST.map p fst p , refl , sym (snd p)) - Iso.rightInv (H²K²-helperIso₂ G n) = ST.elim _ isSetPathImplicit) λ {(p , r) + Iso.fun (H²K²-helperIso₂ G n) = ST.map (H²K²-helperFun₁ G n) + Iso.inv (H²K²-helperIso₂ G n) = ST.map p fst p , refl , sym (snd p)) + Iso.rightInv (H²K²-helperIso₂ G n) = ST.elim _ isSetPathImplicit) λ {(p , r) TR.rec (isProp→isOfHLevelSuc n (squash₂ _ _)) { P cong ∣_∣₂ (main p P r)}) ((F p .fst))} @@ -474,7 +474,7 @@ H²K²-helperFun₁ G n (p , refl , sym r) (p , r) main = (J> λ r (ΣPathP (refl , sym (rUnit _) λ i j k rUnitₖ (suc (suc n)) (r j k) i))) - Iso.leftInv (H²K²-helperIso₂ G n) = ST.elim _ isSetPathImplicit) + Iso.leftInv (H²K²-helperIso₂ G n) = ST.elim _ isSetPathImplicit) (uncurry λ p TR.rec (isProp→isOfHLevelSuc n (isPropΠ _ squash₂ _ _ ))) P uncurry λ q TR.rec (isProp→isOfHLevelSuc n (isPropΠ _ squash₂ _ _ ))) Q x cong ∣_∣₂ (main p P q Q x)) @@ -499,24 +499,24 @@ (coHom (2 +ℕ n) G RP²) Iso-H²⁺ⁿ[K²,G]-H²⁺ⁿ[RP²,G] G n = compIso - (setTruncIso + (setTruncIso (compIso K²FunCharacIso (Σ-cong-iso-snd λ p Σ-cong-iso-snd λ q Σ-cong-iso-snd λ r equivToIso flipSquareEquiv))) (compIso (invIso (H²K²-helperIso₁ G n)) (compIso (H²K²-helperIso₂ G n) (compIso (invIso (killFirstCompIsoGen G n)) - (setTruncIso (invIso RP²FunCharacIso))))) + (setTruncIso (invIso RP²FunCharacIso))))) H²[RP²,G]≅H²[K²,G] : (G : AbGroup ) AbGroupEquiv (coHomGr 2 G RP²) (coHomGr 2 G KleinBottle) fst (H²[RP²,G]≅H²[K²,G] G) = isoToEquiv (invIso (Iso-H²⁺ⁿ[K²,G]-H²⁺ⁿ[RP²,G] G 0)) snd (H²[RP²,G]≅H²[K²,G] G) = - makeIsGroupHom (ST.elim _ isSetΠ λ _ isSetPathImplicit) + makeIsGroupHom (ST.elim _ isSetΠ λ _ isSetPathImplicit) (RP²Conn.elim₂ (isConnectedEM 2) _ isPropΠ λ _ squash₂ _ _) (0ₖ 2) - λ p ST.elim _ isSetPathImplicit) + λ p ST.elim _ isSetPathImplicit) (RP²Conn.elim₂ (isConnectedEM 2) _ squash₂ _ _) (0ₖ 2) λ q diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.RP2.html b/Cubical.Cohomology.EilenbergMacLane.Groups.RP2.html index 937437fd84..dadb8489f4 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.RP2.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.RP2.html @@ -130,7 +130,7 @@ ----- H¹(RP²,ℤ/2) ------ H¹[RP²,ℤ/2]→ℤ/2 : coHom 1 ℤ/2 RP² fst ℤ/2 H¹[RP²,ℤ/2]→ℤ/2 = - ST.rec isSetFin + ST.rec isSetFin λ f ΩEM+1→EM-gen 0 _ (cong f line) ℤ/2→H¹[RP²,ℤ/2] : fst ℤ/2 coHom 1 ℤ/2 RP² @@ -146,8 +146,8 @@ H¹[RP²,ℤ/2]→ℤ/2→H¹[RP²,ℤ/2] : (f : coHom 1 ℤ/2 RP²) ℤ/2→H¹[RP²,ℤ/2] (H¹[RP²,ℤ/2]→ℤ/2 f) f H¹[RP²,ℤ/2]→ℤ/2→H¹[RP²,ℤ/2] = - ST.elim - _ isSetPathImplicit) + ST.elim + _ isSetPathImplicit) (RP²Conn.elim₁ (isConnectedEM 1) _ squash₂ _ _) embase @@ -177,7 +177,7 @@ H²[RP²,ℤ/2]→ℤ/2 : coHom 2 ℤ/2 RP² fst ℤ/2 H²[RP²,ℤ/2]→ℤ/2 = - ST.rec isSetFin + ST.rec isSetFin λ f ΩEM+1→EM-gen 0 _ (cong (ΩEM+1→EM-gen 1 _) ((cong (cong f) square symConst-ℤ/2 2 _ (sym (cong f line))))) @@ -203,7 +203,7 @@ H²[RP²,ℤ/2]→ℤ/2→H²[RP²,ℤ/2] : (x : coHom 2 ℤ/2 RP²) ℤ/2→H²[RP²,ℤ/2] (H²[RP²,ℤ/2]→ℤ/2 x) x H²[RP²,ℤ/2]→ℤ/2→H²[RP²,ℤ/2] = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) (RP²Conn.elim₂ (isConnectedEM 2) _ squash₂ _ _) @@ -226,7 +226,7 @@ _ (sym (H²[RP²,ℤ/2]→ℤ/2-Id refl) cong (H²[RP²,ℤ/2]→ℤ/2 ∣_∣₂) (characRP²Fun _ 0ₖ 2))) - _ _ (funExt (ST.elim _ isSetPathImplicit) + _ _ (funExt (ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x sym (-ₖConst-ℤ/2 1 (f x))))) _ @@ -237,7 +237,7 @@ fst (H³⁺ⁿ[RP²,G]≅G n G) = isoToEquiv (isContr→Iso ( RP²Fun (0ₖ (3 +ℕ n)) refl refl ∣₂ - , (ST.elim _ isSetPathImplicit) + , (ST.elim _ isSetPathImplicit) (RP²Conn.elim₃ (isConnectedSubtr 4 n (subst x isConnected x (EM G (3 +ℕ n))) @@ -272,7 +272,7 @@ H¹[RP²,G]→G[2] : coHom 1 G RP² (G [ 2 ]ₜ) .fst H¹[RP²,G]→G[2] = - ST.rec (is-set (snd (G [ 2 ]ₜ))) + ST.rec (is-set (snd (G [ 2 ]ₜ))) λ f ΩEM+1→EM-gen {G = G} 0 (f point) (cong f line) , cong (_+_ (snd G) (ΩEM+1→EM-gen 0 (f point) (cong f line))) (+IdR (snd G) _) @@ -300,7 +300,7 @@ Iso.rightInv is (g , p) = Σ≡Prop _ is-set (snd G) _ _) (Iso.leftInv (Iso-EM-ΩEM+1 0) g) - Iso.leftInv is = ST.elim _ isSetPathImplicit) + Iso.leftInv is = ST.elim _ isSetPathImplicit) (RP²Conn.elim₁ (isConnectedEM 1) _ squash₂ _ _) embase λ p q cong ∣_∣₂ @@ -344,15 +344,15 @@ Iso (Σ[ x EM G (2 +ℕ n) ] (Σ[ p x x ] p sym p)) ∥₂ (Σ[ p Ω (EM∙ G (2 +ℕ n)) .fst ] p sym p) ∥₂ Iso.fun (killFirstCompIsoGen n) = - ST.rec squash₂ + ST.rec squash₂ (uncurry (TR.elim _ isOfHLevelPlus {n = 2 +ℕ n} 2 (isOfHLevelPlus' {n = n} 2 (isSetΠ λ _ squash₂))) (EM-raw'-trivElim G (suc n) _ isOfHLevelΠ (suc (suc n)) λ _ isOfHLevelPlus' {n = n} 2 squash₂) ∣_∣₂))) - Iso.inv (killFirstCompIsoGen n) = ST.map (0ₖ (2 +ℕ n) ,_) - Iso.rightInv (killFirstCompIsoGen n) = ST.elim _ isSetPathImplicit) λ _ refl - Iso.leftInv (killFirstCompIsoGen n) = ST.elim _ isSetPathImplicit) + Iso.inv (killFirstCompIsoGen n) = ST.map (0ₖ (2 +ℕ n) ,_) + Iso.rightInv (killFirstCompIsoGen n) = ST.elim _ isSetPathImplicit) λ _ refl + Iso.leftInv (killFirstCompIsoGen n) = ST.elim _ isSetPathImplicit) (uncurry (TR.elim _ isProp→isOfHLevelSuc (3 +ℕ n) (isPropΠ _ squash₂ _ _))) (EM-raw'-trivElim G (suc n) _ isProp→isOfHLevelSuc (suc n) @@ -360,7 +360,7 @@ λ _ refl))) H²RP²-Iso₁ : Iso (coHom 2 G RP²) (Σ[ p Ω (EM∙ G 2) .fst ] p sym p) ∥₂ - H²RP²-Iso₁ = compIso (setTruncIso RP²FunCharacIso) (killFirstCompIsoGen 0) + H²RP²-Iso₁ = compIso (setTruncIso RP²FunCharacIso) (killFirstCompIsoGen 0) H²RP²-Iso₂ : Iso ((Σ[ p Ω (EM∙ G 2) .fst ] p sym p)) (Σ[ p EM G 1 ] p -ₖ p) H²RP²-Iso₂ = (Σ-cong-iso (invIso (Iso-EM-ΩEM+1 1)) @@ -406,16 +406,16 @@ (((sym≡flipSquare p) flipSquare≡cong-sym p) j k r)) H²RP²-Iso₁,₂-charac : (p : (Ω^ 2) (EM∙ G 2) .fst) - ST.map (Iso.fun H²RP²-Iso₂) (Iso.fun H²RP²-Iso₁ RP²Fun _ _ p ∣₂) + ST.map (Iso.fun H²RP²-Iso₂) (Iso.fun H²RP²-Iso₁ RP²Fun _ _ p ∣₂) embase , (cong (ΩEM+1→EM 1) p) ∣₂ H²RP²-Iso₁,₂-charac p = cong ∣_∣₂ (ΣPathP (refl , i cong (ΩEM+1→EM {G = G} 1) p ΩEM+1→EM-sym'-refl i) sym (rUnit (cong (ΩEM+1→EM 1) p)))) H²RP²-Iso₁,₂+ : (p q : (Ω^ 2) (EM∙ G 2) .fst) - ST.map (Iso.fun H²RP²-Iso₂) (Iso.fun H²RP²-Iso₁ ( RP²Fun _ _ p ∣₂ +ₕ RP²Fun _ _ q ∣₂)) + ST.map (Iso.fun H²RP²-Iso₂) (Iso.fun H²RP²-Iso₁ ( RP²Fun _ _ p ∣₂ +ₕ RP²Fun _ _ q ∣₂)) embase , cong (ΩEM+1→EM 1) p cong (ΩEM+1→EM 1) q ∣₂ - H²RP²-Iso₁,₂+ p q = cong (ST.map (Iso.fun H²RP²-Iso₂) Iso.fun H²RP²-Iso₁) + H²RP²-Iso₁,₂+ p q = cong (ST.map (Iso.fun H²RP²-Iso₂) Iso.fun H²RP²-Iso₁) (cong ∣_∣₂ (funExt (RP²Fun-pres+ p q))) H²RP²-Iso₁,₂-charac (p q) cong ∣_∣₂ (ΣPathP (refl , cong-∙ (ΩEM+1→EM 1) p q)) @@ -442,7 +442,7 @@ +Assoc (snd G) _ _ _ ∣₁) H²RP²-Iso₃ : Iso (Σ[ p EM G 1 ] p -ₖ p) ∥₂ (fst (G /^ 2)) - Iso.fun H²RP²-Iso₃ = ST.rec squash/ (uncurry H²RP²-Iso₃→) + Iso.fun H²RP²-Iso₃ = ST.rec squash/ (uncurry H²RP²-Iso₃→) Iso.inv H²RP²-Iso₃ = SQ.elim _ squash₂) a embase , emloop a ∣₂) λ a b PT.rec (squash₂ _ _) @@ -467,7 +467,7 @@ +IdR (snd G) b))))) Iso.rightInv H²RP²-Iso₃ = SQ.elimProp _ squash/ _ _) λ a cong [_] (Iso.leftInv (Iso-EM-ΩEM+1 0) a) - Iso.leftInv H²RP²-Iso₃ = ST.elim _ isSetPathImplicit) + Iso.leftInv H²RP²-Iso₃ = ST.elim _ isSetPathImplicit) (uncurry (EM1.elimProp (AbGroup→Group G) _ isPropΠ λ _ squash₂ _ _) λ p cong ∣_∣₂ (ΣPathP (refl , (Iso.rightInv (Iso-EM-ΩEM+1 0) p))))) @@ -475,9 +475,9 @@ fst H²[RP²,G]≅G/2 = isoToEquiv is where is : Iso _ _ - is = compIso (compIso H²RP²-Iso₁ (setTruncIso H²RP²-Iso₂)) H²RP²-Iso₃ + is = compIso (compIso H²RP²-Iso₁ (setTruncIso H²RP²-Iso₂)) H²RP²-Iso₃ snd H²[RP²,G]≅G/2 = - makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 squash/ _ _) + makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 squash/ _ _) (RP²Conn.elim₂ (isConnectedEM 2) _ isPropΠ λ _ squash/ _ _) (0ₖ 2) λ p RP²Conn.elim₂ (isConnectedEM 2) _ squash/ _ _) (0ₖ 2) λ q cong (Iso.fun H²RP²-Iso₃) (H²RP²-Iso₁,₂+ p q) @@ -489,7 +489,7 @@ H³⁺ⁿ[RP²,G]≅0 : (n : ) AbGroupEquiv (coHomGr (3 +ℕ n) G RP²) (trivialAbGroup {}) fst (H³⁺ⁿ[RP²,G]≅0 n) = isContr→≃Unit* (0ₕ _ - , ST.elim _ isSetPathImplicit) + , ST.elim _ isSetPathImplicit) (RP²Conn.elim₃ (isConnectedSubtr 4 n (subst k isConnected k (EM G (3 +ℕ n))) (+-comm 4 n) (isConnectedEM (3 +ℕ n)))) diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.RPinf.html b/Cubical.Cohomology.EilenbergMacLane.Groups.RPinf.html index 460fbca8b1..f96b0a945b 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.RPinf.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.RPinf.html @@ -234,15 +234,15 @@ help = equivToIso (invEquiv (⌣RP∞''Equiv n)) ∥EM-ℤ/2ˣ∥₀-Iso : (n : ) Iso EM ℤ/2 ˣ n ∥₂ (fst ℤ/2) -∥EM-ℤ/2ˣ∥₀-Iso zero = setTruncIdempotentIso (is-set (snd ℤ/2Ring)) +∥EM-ℤ/2ˣ∥₀-Iso zero = setTruncIdempotentIso (is-set (snd ℤ/2Ring)) ∥EM-ℤ/2ˣ∥₀-Iso (suc n) = compIso (compIso - setTruncOfProdIso + setTruncOfProdIso (compIso (Σ-cong-iso-snd λ _ equivToIso (isContr→≃Unit ( 0ₖ (suc n) ∣₂ - , ST.elim _ isSetPathImplicit) + , ST.elim _ isSetPathImplicit) (EM→Prop _ _ _ squash₂ _ _) refl)))) rUnit×Iso)) (∥EM-ℤ/2ˣ∥₀-Iso n) @@ -254,7 +254,7 @@ subst-EM∙ (+'-suc₁ n) .snd) cohomRP∞Iso : (n : ) Iso (coHom n ℤ/2 (EM ℤ/2 1)) (ℤ/2 .fst) -cohomRP∞Iso n = compIso (setTruncIso (RP→EM-ℤ/2-CharacIso n)) (∥EM-ℤ/2ˣ∥₀-Iso n) +cohomRP∞Iso n = compIso (setTruncIso (RP→EM-ℤ/2-CharacIso n)) (∥EM-ℤ/2ˣ∥₀-Iso n) RP→EM-ℤ/2-CharacIso∙ : (n : ) Iso.fun (RP→EM-ℤ/2-CharacIso n) _ 0ₖ n) EM-ℤ/2ˣ∙ n diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.Sn.html b/Cubical.Cohomology.EilenbergMacLane.Groups.Sn.html index c4deecf5e3..ecb1f9a671 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.Sn.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.Sn.html @@ -99,7 +99,7 @@ module _ (G : AbGroup ) where open AbGroupStr (snd G) renaming (is-set to is-setG) H¹S¹→G : coHom 1 G fst G - H¹S¹→G = ST.rec is-setG λ f ΩEM+1→EM-gen 0 (f base) (cong f loop) + H¹S¹→G = ST.rec is-setG λ f ΩEM+1→EM-gen 0 (f base) (cong f loop) G→H¹S¹ : fst G coHom 1 G G→H¹S¹ g = S¹fun (0ₖ 1) (emloop g) ∣₂ @@ -112,7 +112,7 @@ Iso.inv is = G→H¹S¹ Iso.rightInv is = Iso.leftInv (Iso-EM-ΩEM+1 0) Iso.leftInv is = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) (S¹-connElim (isConnectedEM 1) _ squash₂ _ _) embase λ p cong ∣_∣₂ (cong (S¹fun embase) (Iso.rightInv (Iso-EM-ΩEM+1 0) p))) @@ -125,7 +125,7 @@ HⁿSⁿ↓ : (n : ) coHom (suc (suc n)) G (S₊ (suc (suc n))) coHom (suc n) G (S₊ (suc n)) - HⁿSⁿ↓ n = ST.map λ f x ΩEM+1→EM-gen (suc n) _ (cong f (toSusp (S₊∙ (suc n)) x)) + HⁿSⁿ↓ n = ST.map λ f x ΩEM+1→EM-gen (suc n) _ (cong f (toSusp (S₊∙ (suc n)) x)) private liftMap : (n : ) (f : S₊ (suc n) EM G (suc n)) @@ -134,7 +134,7 @@ HⁿSⁿ↑ : (n : ) coHom (suc n) G (S₊ (suc n)) coHom (suc (suc n)) G (S₊ (suc (suc n))) - HⁿSⁿ↑ n = ST.map (liftMap n) + HⁿSⁿ↑ n = ST.map (liftMap n) Hⁿ[Sⁿ,G]≅Hⁿ⁺¹[Sⁿ⁺¹,G] : (n : ) AbGroupEquiv (coHomGr (suc n) G (S₊ (suc n))) @@ -145,7 +145,7 @@ Iso.fun is = HⁿSⁿ↑ n Iso.inv is = HⁿSⁿ↓ n Iso.rightInv is = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) (Sⁿ-connElim n (isConnectedSubtr 2 (suc n) (subst x isConnected x (EM G (suc (suc n)))) (cong suc (+-comm 2 n)) (isConnectedEM (suc (suc n))))) @@ -165,7 +165,7 @@ (isConnectedPath (suc (suc n)) (isConnectedEM (suc (suc n))) _ _) (p (ptSn _)) refl .fst)) - Iso.leftInv is = ST.elim _ isSetPathImplicit) + Iso.leftInv is = ST.elim _ isSetPathImplicit) λ f TR.rec (isProp→isOfHLevelSuc n (squash₂ _ _)) q cong ∣_∣₂ (funExt λ x cong (ΩEM+1→EM (suc n)) @@ -180,7 +180,7 @@ (f (ptSn (suc n))) (0ₖ (suc n)) .fst) snd (Hⁿ[Sⁿ,G]≅Hⁿ⁺¹[Sⁿ⁺¹,G] n) = makeIsGroupHom - (ST.elim2 _ _ isSetPathImplicit) + (ST.elim2 _ _ isSetPathImplicit) λ f g cong ∣_∣₂ (funExt λ { north refl ; south refl @@ -199,7 +199,7 @@ isContr (coHom ((suc m) +ℕ suc n) G (S₊ (suc n))) fst (isContr-Hᵐ⁺ⁿ[Sⁿ,G] zero m) = 0ₕ _ snd (isContr-Hᵐ⁺ⁿ[Sⁿ,G] zero m) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) (S¹-connElim (isConnectedSubtr 2 (suc m) (subst x isConnected x (EM G (suc (m +ℕ 1)))) @@ -215,7 +215,7 @@ (isConnectedEM (suc (m +ℕ 1))) _ _) refl p .fst)) fst (isContr-Hᵐ⁺ⁿ[Sⁿ,G] (suc n) m) = 0ₕ _ snd (isContr-Hᵐ⁺ⁿ[Sⁿ,G] (suc n) m) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) (Sⁿ-connElim n (isConnectedSubtr 2 (suc (suc m) +ℕ n) (subst x isConnected x (EM G (suc (m +ℕ suc (suc n))))) @@ -227,7 +227,7 @@ λ p PT.rec (squash₂ _ _) q cong ∣_∣₂ (sym (characSⁿFun n _ 0ₖ _)) cong (SⁿFun n (0ₖ (suc (m +ℕ suc (suc n))))) q)) - (Iso.fun PathIdTrunc₀Iso + (Iso.fun PathIdTrunc₀Iso (isContr→isProp (subst A isContr (S₊ (suc n) A) ∥₂) (cong (EM G) (sym (+-suc m (suc n))) @@ -254,7 +254,7 @@ isoToEquiv (isContr→Iso ((0ₕ _) - , (ST.elim _ isSetPathImplicit) + , (ST.elim _ isSetPathImplicit) (subst x (a : S₊ x EM G 1) 0ₕ 1 a ∣₂) (cong suc (+-comm 1 m)) λ f TR.rec (squash₂ _ _) @@ -269,7 +269,7 @@ isoToEquiv (isContr→Iso ((0ₕ _) - , ST.elim _ isSetPathImplicit) + , ST.elim _ isSetPathImplicit) (subst x (a : S₊ x EM G (suc (suc n))) 0ₕ (suc (suc n)) a ∣₂) (cong suc (cong suc (sym (+-suc m n)) @@ -357,7 +357,7 @@ compEquiv (invEquiv (compEquiv (fst (coHom≅coHomRed n G (S₊∙ (suc n)))) - (isoToEquiv (setTruncIdempotentIso (isSet-Sn→∙EM G (suc n)))))) + (isoToEquiv (setTruncIdempotentIso (isSet-Sn→∙EM G (suc n)))))) (fst (Hⁿ[Sⁿ,G]≅G G n)) -- generator of HⁿSⁿ ≃ (Sⁿ →∙ K(G,n)) diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.Torus.html b/Cubical.Cohomology.EilenbergMacLane.Groups.Torus.html index 13a33ca05c..4751e3d090 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.Torus.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.Torus.html @@ -153,12 +153,12 @@ _+1_ = _+ₖ_ {G = G} {n = 1} typIso : Iso _ _ - Iso.fun typIso = ST.rec (isSet× squash₂ squash₂) + Iso.fun typIso = ST.rec (isSet× squash₂ squash₂) λ f x f (x , base)) ∣₂ , x f (base , x)) ∣₂ - Iso.inv typIso = uncurry (ST.rec2 squash₂ + Iso.inv typIso = uncurry (ST.rec2 squash₂ λ f g x f (fst x) +1 g (snd x)) ∣₂) Iso.rightInv typIso = - uncurry (ST.elim2 _ _ isOfHLevelPath 2 (isSet× squash₂ squash₂) _ _) + uncurry (ST.elim2 _ _ isOfHLevelPath 2 (isSet× squash₂ squash₂) _ _) (S¹-connElim (isConnectedEM {G' = G} 1) _ isPropΠ λ _ isSet× squash₂ squash₂ _ _) (0ₖ {G = G} 1) @@ -176,8 +176,8 @@ theIso : AbGroupIso (AbDirProd (coHomGr 1 G ) (coHomGr 1 G )) (coHomGr 1 G ( × )) fst theIso = invIso typIso snd theIso = makeIsGroupHom - (uncurry (ST.elim2 _ _ isSetΠ λ _ isSetPathImplicit) - λ f1 g1 uncurry (ST.elim2 _ _ isSetPathImplicit) + (uncurry (ST.elim2 _ _ isSetΠ λ _ isSetPathImplicit) + λ f1 g1 uncurry (ST.elim2 _ _ isSetPathImplicit) λ f2 g2 cong ∣_∣₂ (funExt λ {(x , y) move4 (f1 x) (f2 x) (g1 y) (g2 y) _+1_ (assocₖ {G = G} 1) (commₖ {G = G} 1)})))) @@ -198,9 +198,9 @@ (Σ-cong-iso-snd λ t invIso (Iso-EM-ΩEM+1-gen {G = G} 1 t)) is : Iso _ _ - is = compIso (setTruncIso (compIso curryIso + is = compIso (setTruncIso (compIso curryIso (compIso (codomainIso is1) toProdIso))) - (compIso setTruncOfProdIso + (compIso setTruncOfProdIso (compIso (prodIso (equivToIso (fst (Hᵐ⁺ⁿ[Sⁿ,G]≅0 G 0 0))) idIso) lUnit*×Iso)) diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.Unit.html b/Cubical.Cohomology.EilenbergMacLane.Groups.Unit.html index 868456a8f0..5ddb9e46e5 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.Unit.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.Unit.html @@ -37,7 +37,7 @@ isContr (coHom (suc n) G Unit) fst (isContr-Hⁿ⁺¹[Unit,G] {G = G} n) = 0ₕ (suc n) snd (isContr-Hⁿ⁺¹[Unit,G] {G = G} n) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f Trunc.rec (isProp→isOfHLevelSuc n (squash₂ _ _)) p cong ∣_∣₂ (funExt λ _ p)) diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.Wedge.html b/Cubical.Cohomology.EilenbergMacLane.Groups.Wedge.html index 91f8f308c7..a4c243f3f8 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.Wedge.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.Wedge.html @@ -62,12 +62,12 @@ (coHom (suc n) G (fst A) × coHom (suc n) G (fst B)) Iso.fun (Hⁿ⋁-Iso n) = - ST.rec (isSet× squash₂ squash₂) + ST.rec (isSet× squash₂ squash₂) λ f f inl ∣₂ , f inr ∣₂ Iso.inv (Hⁿ⋁-Iso n) = - uncurry (ST.rec2 squash₂ λ f g Hⁿ-⋁→Hⁿ× n f g ∣₂) + uncurry (ST.rec2 squash₂ λ f g Hⁿ-⋁→Hⁿ× n f g ∣₂) Iso.rightInv (Hⁿ⋁-Iso n) = - uncurry (ST.elim2 + uncurry (ST.elim2 _ _ isOfHLevelPath 2 (isSet× squash₂ squash₂) _ _) λ f g ΣPathP (Trunc.rec (isProp→isOfHLevelSuc n (squash₂ _ _)) @@ -83,7 +83,7 @@ (isConnectedPath (suc n) (isConnectedEM (suc n)) (g (pt B)) (0ₖ (suc n)) .fst))) Iso.leftInv (Hⁿ⋁-Iso n) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f Trunc.rec (isProp→isOfHLevelSuc n (squash₂ _ _)) p cong ∣_∣₂ (funExt λ { (inl x) pgen f p (inl x) @@ -133,6 +133,6 @@ fst (Hⁿ-⋁≅Hⁿ×Hⁿ n) = isoToEquiv (Hⁿ⋁-Iso n) snd (Hⁿ-⋁≅Hⁿ×Hⁿ n) = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 (isSet× squash₂ squash₂) _ _) + (ST.elim2 _ _ isOfHLevelPath 2 (isSet× squash₂ squash₂) _ _) λ f g refl) \ No newline at end of file diff --git a/Cubical.Cohomology.EilenbergMacLane.Gysin.html b/Cubical.Cohomology.EilenbergMacLane.Gysin.html index ebb9a59168..f4a788dffb 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Gysin.html +++ b/Cubical.Cohomology.EilenbergMacLane.Gysin.html @@ -274,7 +274,7 @@ (funExt λ x cong (subst EMR (+'≡+ (suc i) n)) (0ₖ-⌣ₖ (suc i) n (gen-HⁿSⁿ-raw R n .fst x)) subst-EM-0ₖ (+'≡+ (suc i) n))))) - (Iso.fun PathIdTrunc₀Iso + (Iso.fun PathIdTrunc₀Iso (isContr→isProp (help2 i n) f ∣₂ (0ₕ∙ _)))) where myEq = compEquiv (isoToEquiv (invIso (Iso-EM-ΩEM+1 i))) @@ -296,8 +296,8 @@ help2 : (i n : ) isContr ( S₊∙ n →∙ EMR∙ (suc (i + n)) ∥₂) help2 i zero = 0ₕ∙ _ - , ST.elim - _ isSetPathImplicit) + , ST.elim + _ isSetPathImplicit) λ f TR.rec (isProp→isOfHLevelSuc (i + zero) (squash₂ _ _)) p cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM _) (funExt λ { false sym p ; true sym (snd f)}))) @@ -681,7 +681,7 @@ ϕ-equiv : (i : ) coHom i RR (fst B) coHomRed (i +' suc n) RR EP∙ ϕ-equiv i = - isoToEquiv (setTruncIso (compIso (M.pre-ϕIso i) (ι (i +' (suc n))))) + isoToEquiv (setTruncIso (compIso (M.pre-ϕIso i) (ι (i +' (suc n))))) ϕ-raw-contr : (i : ) isContr E (fst B EMR i) (B →∙ EMR∙ (i +' suc n)) ϕ-raw-contr i contr = @@ -694,7 +694,7 @@ isHomϕ : (i : ) (x y : coHom i RR (fst B)) ϕ i (x +ₕ y) ϕ i x +ₕ∙ ϕ i y isHomϕ i = - ST.elim2 _ _ isSetPathImplicit) + ST.elim2 _ _ isSetPathImplicit) λ f g cong ∣_∣₂ (cong (Iso.fun (ι (i +' suc n))) (M.pre-ϕ-pres+ i f g) ι-pres+ (i +' suc n) @@ -721,10 +721,10 @@ snd (pre-E↑ i f) = refl E↑ : (i : ) AbGroupHom (coHomGr i RR E) (coHomRedGr (suc i) RR EP∙) - fst (E↑ i) = ST.map (pre-E↑ i) + fst (E↑ i) = ST.map (pre-E↑ i) snd (E↑ i) = makeIsGroupHom - (ST.elim2 _ _ isSetPathImplicit) + (ST.elim2 _ _ isSetPathImplicit) λ f g cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM (suc i)) (funExt λ { (inl x) sym (rUnitₖ (suc i) (0ₖ (suc i))) @@ -743,9 +743,9 @@ (EM→ΩEM+1 (suc n) y)) j* : (i : ) AbGroupHom (coHomRedGr i RR EP∙) (coHomGr i RR (fst B)) - fst (j* i) = ST.map λ f b fst f (inr b) + fst (j* i) = ST.map λ f b fst f (inr b) snd (j* i) = makeIsGroupHom - (ST.elim2 _ _ isSetPathImplicit) λ f g refl) + (ST.elim2 _ _ isSetPathImplicit) λ f g refl) p* : (i : ) AbGroupHom (coHomGr i RR (fst B)) (coHomGr i RR E) p* i = coHomHom i fst @@ -754,39 +754,39 @@ isInIm (j* i) x isInKer (p* i) x Im-j*⊂Ker-p* i = - ST.elim - f isSetΠ λ _ isSetPathImplicit) + ST.elim + f isSetΠ λ _ isSetPathImplicit) λ f PT.rec (squash₂ _ _) - (uncurry (ST.elim _ isSetΠ - λ _ isSetPathImplicit) + (uncurry (ST.elim _ isSetΠ + λ _ isSetPathImplicit) λ g p PT.rec (squash₂ _ _) (J f _ isInKer (p* i) f ∣₂) (cong ∣_∣₂ (funExt a cong (fst g) (sym (push a) push (pt B , P*)) snd g)))) - (Iso.fun PathIdTrunc₀Iso p))) + (Iso.fun PathIdTrunc₀Iso p))) Ker-p*⊂Im-j* : (i : ) (x : _) isInKer (p* i) x isInIm (j* i) x Ker-p*⊂Im-j* i = - ST.elim _ isSetΠ λ _ isProp→isSet squash₁) + ST.elim _ isSetΠ λ _ isProp→isSet squash₁) λ f p PT.map p { (inl x) 0ₖ i ; (inr x) f x ; (push a i) p (~ i) a}) , funExt⁻ p (pt B , P*) ∣₂ , refl) - (Iso.fun PathIdTrunc₀Iso p) + (Iso.fun PathIdTrunc₀Iso p) Im-p*⊂Ker-E↑ : (i : ) (x : _) isInIm (p* i) x isInKer (E↑ i) x - Im-p*⊂Ker-E↑ i = ST.elim - f isSetΠ λ _ isSetPathImplicit) + Im-p*⊂Ker-E↑ i = ST.elim + f isSetΠ λ _ isSetPathImplicit) λ f PT.rec (squash₂ _ _) - (uncurry (ST.elim _ isSetΠ - λ _ isSetPathImplicit) + (uncurry (ST.elim _ isSetΠ + λ _ isSetPathImplicit) λ g p PT.rec (squash₂ _ _) (J f _ isInKer (E↑ i) f ∣₂) (cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM _) @@ -794,13 +794,13 @@ ; (inr x) sym (EM→ΩEM+1 i (g x)) ; (push a j) k EM→ΩEM+1 i (g (fst a)) (j ~ k)})))) - (Iso.fun PathIdTrunc₀Iso p))) + (Iso.fun PathIdTrunc₀Iso p))) Ker-E↑⊂Im-p* : (i : ) (x : _) isInKer (E↑ i) x isInIm (p* i) x Ker-E↑⊂Im-p* i = - ST.elim _ isSetΠ λ _ isProp→isSet squash₁) + ST.elim _ isSetΠ λ _ isProp→isSet squash₁) λ f p PT.map r b ΩEM+1→EM i (sym (funExt⁻ (cong fst r) (inr b))) +ₖ f (* , P*)) ∣₂ @@ -833,25 +833,25 @@ sym (assocₖ i (f (x , p)) (-ₖ (f (* , P*))) (f (* , P*))) cong₂ _+ₖ_ refl (lCancelₖ i (f (* , P*))) rUnitₖ i (f (x , p))})) - ((Iso.fun PathIdTrunc₀Iso p)) + ((Iso.fun PathIdTrunc₀Iso p)) Im-E↑⊂Ker-j* : (i : ) (x : _) isInIm (E↑ i) x isInKer (j* (suc i)) x - Im-E↑⊂Ker-j* i = ST.elim - f isSetΠ λ _ isSetPathImplicit) + Im-E↑⊂Ker-j* i = ST.elim + f isSetΠ λ _ isSetPathImplicit) λ f PT.rec (squash₂ _ _) - (uncurry (ST.elim _ isSetΠ - λ _ isSetPathImplicit) + (uncurry (ST.elim _ isSetΠ + λ _ isSetPathImplicit) λ g p PT.rec (squash₂ _ _) (J f _ isInKer (j* (suc i)) f ∣₂) refl) - (Iso.fun PathIdTrunc₀Iso p))) + (Iso.fun PathIdTrunc₀Iso p))) Ker-j*⊂Im-E↑ : (i : ) (x : _) isInKer (j* (suc i)) x isInIm (E↑ i) x Ker-j*⊂Im-E↑ i = - ST.elim _ isSetΠ λ _ isProp→isSet squash₁) + ST.elim _ isSetΠ λ _ isProp→isSet squash₁) λ f p PT.map p b ΩEM+1→EM i (pth b f (funExt⁻ p))) ∣₂ , cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM _) @@ -859,7 +859,7 @@ cong (fst f) (sym (push (* , P*))) ; (inr x) sym (funExt⁻ p x) ; (push a j) main a f (funExt⁻ p) j}))) - (Iso.fun PathIdTrunc₀Iso p) + (Iso.fun PathIdTrunc₀Iso p) where pth : (a : E) (f : EP∙ →∙ EM∙ RR (suc i)) (p : (b : fst B) fst f (inr b) 0ₖ (suc i)) @@ -948,7 +948,7 @@ ⌣≡alt : (i : ) (t : suc n i) ⌣-hom i t alt-hom i t ⌣≡alt i t = Σ≡Prop _ isPropIsGroupHom _ _) - (funExt (ST.elim _ isSetPathImplicit) λ _ refl)) + (funExt (ST.elim _ isSetPathImplicit) λ _ refl)) -- the other two maps diff --git a/Cubical.Cohomology.EilenbergMacLane.MayerVietoris.html b/Cubical.Cohomology.EilenbergMacLane.MayerVietoris.html index 9c9ebbca9b..8f3dbee35d 100644 --- a/Cubical.Cohomology.EilenbergMacLane.MayerVietoris.html +++ b/Cubical.Cohomology.EilenbergMacLane.MayerVietoris.html @@ -40,16 +40,16 @@ ×coHomGr n = dirProdAb (coHomGr n G A) (coHomGr n G B) i* : (n : ) coHom n G (Pushout f g) coHom n G A × coHom n G B - i* n = ST.rec (isSet× squash₂ squash₂) + i* n = ST.rec (isSet× squash₂ squash₂) λ δ x δ (inl x)) ∣₂ , x δ (inr x)) ∣₂ i : (n : ) AbGroupHom (coHomGr n G (Pushout f g)) (×coHomGr n) fst (i n) = i* n snd (i n) = makeIsGroupHom - (ST.elim2 _ _ + (ST.elim2 _ _ isOfHLevelPath 2 - (isSet× isSetSetTrunc isSetSetTrunc) _ _) + (isSet× isSetSetTrunc isSetSetTrunc) _ _) λ _ _ refl) private @@ -71,8 +71,8 @@ Δ : (n : ) AbGroupHom (×coHomGr n) (coHomGr n G C) fst (Δ n) = Δ' n snd (Δ n) = - makeIsGroupHom (uncurry (ST.elim2 _ _ isSetΠ λ _ isSetPathImplicit) - λ a b uncurry (ST.elim2 _ _ isSetPathImplicit) + makeIsGroupHom (uncurry (ST.elim2 _ _ isSetΠ λ _ isSetPathImplicit) + λ a b uncurry (ST.elim2 _ _ isSetPathImplicit) λ c d cong ∣_∣₂ (funExt x distrLem n (a (f x)) (c (f x)) (b (g x)) (d (g x))))))) @@ -100,8 +100,8 @@ sym (cong₂+₂ n (EM→ΩEM+1 (suc n) (h a)) (EM→ΩEM+1 (suc n) (l a))) d : (n : ) AbGroupHom (coHomGr n G C) (coHomGr (suc n) G (Pushout f g)) - fst (d n) = ST.rec isSetSetTrunc λ a d-pre n a ∣₂ - snd (d n) = makeIsGroupHom (ST.elim2 _ _ isSetPathImplicit) + fst (d n) = ST.rec isSetSetTrunc λ a d-pre n a ∣₂ + snd (d n) = makeIsGroupHom (ST.elim2 _ _ isSetPathImplicit) λ a b cong ∣_∣₂ (funExt (dHomHelper n a b))) -- The long exact sequence @@ -109,10 +109,10 @@ isInIm (d n) x isInKer (i (suc n)) x Im-d⊂Ker-i n = - ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInKer _ _)) + ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInKer _ _)) λ a PT.rec (isPropIsInKer _ _) - (uncurry (ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInKer _ _)) - λ δ b i ST.rec (isSetΣ squash₂ _ squash₂)) + (uncurry (ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInKer _ _)) + λ δ b i ST.rec (isSetΣ squash₂ _ squash₂)) δ δ inl ∣₂ , δ inr ∣₂) (b (~ i)))) @@ -120,12 +120,12 @@ isInKer (i (suc n)) x isInIm (d n) x Ker-i⊂Im-d n = - ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInIm _ _)) + ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInIm _ _)) λ a p PT.map2 l r F a (funExt⁻ l) (funExt⁻ r) ∣₂ , cong ∣_∣₂ (funExt (F-kill a (funExt⁻ l) (funExt⁻ r)))) - (Iso.fun PathIdTrunc₀Iso (cong fst p)) - (Iso.fun PathIdTrunc₀Iso (cong snd p)) + (Iso.fun PathIdTrunc₀Iso (cong fst p)) + (Iso.fun PathIdTrunc₀Iso (cong snd p)) where module _ (a : Pushout f g EM G (suc n)) (l : (x : A) a (inl x) 0ₖ (suc n)) @@ -150,9 +150,9 @@ isInIm (i n) x isInKer (Δ n) x Im-i⊂Ker-Δ n = - uncurry (ST.elim2 _ _ isSetΠ λ _ isSetPathImplicit) + uncurry (ST.elim2 _ _ isSetΠ λ _ isSetPathImplicit) λ a b PT.rec (squash₂ _ _) - (uncurry (ST.elim _ isSetΠ λ _ isSetPathImplicit) + (uncurry (ST.elim _ isSetΠ λ _ isSetPathImplicit) λ h p cong (Δ' n) (sym p) cong ∣_∣₂ (funExt λ x cong z h z -ₖ h (inr (g x))) (push x) @@ -162,10 +162,10 @@ isInKer (Δ n) a isInIm (i n) a Ker-Δ⊂Im-i n = - uncurry (ST.elim2 + uncurry (ST.elim2 _ _ isSetΠ λ _ isProp→isSet (isPropIsInIm _ _)) λ a b p PT.map q F a b (funExt⁻ q) ∣₂ , refl) - (Iso.fun PathIdTrunc₀Iso p)) + (Iso.fun PathIdTrunc₀Iso p)) where module _ (a : A EM G n) (b : B EM G n) @@ -205,7 +205,7 @@ isInKer (d n) a isInIm (Δ n) a Ker-d⊂Im-Δ n = - ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInIm _ _)) + ST.elim _ isSetΠ λ _ isProp→isSet (isPropIsInIm _ _)) λ h p PT.map p ( a ΩEM+1→EM n (cong f f (inl a)) p)) ∣₂ , a ΩEM+1→EM n (cong f f (inr a)) p)) ∣₂) @@ -213,7 +213,7 @@ i₁ p i₁ (inr (g c))) cong (ΩEM+1→EM n) (help h p c) Iso.leftInv (Iso-EM-ΩEM+1 n) (h c))) - (Iso.fun (PathIdTrunc₀Iso) p) + (Iso.fun (PathIdTrunc₀Iso) p) where help : (h : _) (p : d-pre n h _ 0ₖ (suc n))) (c : C) funExt⁻ p (inl (f c)) @@ -230,17 +230,17 @@ isInIm (Δ n) a isInKer (d n) a Im-Δ⊂Ker-d n = - ST.elim _ isOfHLevelΠ 2 λ _ isSetPathImplicit) + ST.elim _ isOfHLevelΠ 2 λ _ isSetPathImplicit) λ a PT.rec (isPropIsInKer _ _) - (uncurry (uncurry (ST.elim2 - _ _ isOfHLevelΠ 2 λ _ isSetPathImplicit) + (uncurry (uncurry (ST.elim2 + _ _ isOfHLevelΠ 2 λ _ isSetPathImplicit) λ F G p PT.rec (isPropIsInKer (d n) a ∣₂) q cong ∣_∣₂ (cong (d-pre n) (sym q)) (cong ∣_∣₂ (funExt λ { (inl x) EM→ΩEM+1 n (F x) ; (inr x) EM→ΩEM+1 n (G x) ; (push a j) i help (F (f a)) (G (g a)) i j}))) - (Iso.fun (PathIdTrunc₀Iso) p)))) + (Iso.fun (PathIdTrunc₀Iso) p)))) where help : (x y : EM G n) Square (EM→ΩEM+1 n (x -ₖ y)) refl (EM→ΩEM+1 n x) (EM→ΩEM+1 n y) diff --git a/Cubical.Cohomology.EilenbergMacLane.RingStructure.html b/Cubical.Cohomology.EilenbergMacLane.RingStructure.html index 80c94d38dc..ded2133256 100644 --- a/Cubical.Cohomology.EilenbergMacLane.RingStructure.html +++ b/Cubical.Cohomology.EilenbergMacLane.RingStructure.html @@ -107,13 +107,13 @@ fst (coHomGr-Iso {n}) = is where is : Iso (coHom n R-ab X) (coHom n R-ab Y) - fun is = ST.rec squash₂ f y f (inv e y)) ∣₂) - inv is = ST.rec squash₂ g x g (fun e x)) ∣₂) - rightInv is = ST.elim _ isProp→isSet (squash₂ _ _)) f cong ∣_∣₂ (funExt y cong f (rightInv e y)))) - leftInv is = ST.elim _ isProp→isSet (squash₂ _ _)) g cong ∣_∣₂ (funExt x cong g (leftInv e x)))) + fun is = ST.rec squash₂ f y f (inv e y)) ∣₂) + inv is = ST.rec squash₂ g x g (fun e x)) ∣₂) + rightInv is = ST.elim _ isProp→isSet (squash₂ _ _)) f cong ∣_∣₂ (funExt y cong f (rightInv e y)))) + leftInv is = ST.elim _ isProp→isSet (squash₂ _ _)) g cong ∣_∣₂ (funExt x cong g (leftInv e x)))) snd (coHomGr-Iso {n}) = makeIsGroupHom - (ST.elim _ isProp→isSet λ u v i y squash₂ _ _ (u y) (v y) i) - f ST.elim _ isProp→isSet (squash₂ _ _)) + (ST.elim _ isProp→isSet λ u v i y squash₂ _ _ (u y) (v y) i) + f ST.elim _ isProp→isSet (squash₂ _ _)) f' refl))) H*-X→H*-Y : H* R X H* R Y @@ -159,10 +159,10 @@ H*-X→H*-Y-pres· : (x x' : H* R X) H*-X→H*-Y (x cupX x') H*-X→H*-Y x cupY H*-X→H*-Y x' H*-X→H*-Y-pres· = DS-Ind-Prop.f _ _ _ _ x u v i y isSetH*Y _ _ (u y) (v y) i) _ refl) - n ST.elim x isProp→isSet λ u v i y isSetH*Y _ _ (u y) (v y) i) + n ST.elim x isProp→isSet λ u v i y isSetH*Y _ _ (u y) (v y) i) f DS-Ind-Prop.f _ _ _ _ _ isSetH*Y _ _) refl - m ST.elim _ isProp→isSet (isSetH*Y _ _)) + m ST.elim _ isProp→isSet (isSetH*Y _ _)) g refl)) λ {U V} ind-U ind-V cong₂ _+H*Y_ ind-U ind-V) ) {U V} ind-U ind-V y cong₂ _+H*Y_ (ind-U y) (ind-V y)) diff --git a/Cubical.Cohomology.EilenbergMacLane.Rings.KleinBottle.html b/Cubical.Cohomology.EilenbergMacLane.Rings.KleinBottle.html index 5b7d444bf3..2cea3dcda8 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Rings.KleinBottle.html +++ b/Cubical.Cohomology.EilenbergMacLane.Rings.KleinBottle.html @@ -473,7 +473,7 @@ ⌣-commℤ/2₁,₁ : {} {A : Type } (x y : coHom 1 ℤ/2 A) (_⌣_ {G'' = ℤ/2Ring} x y) (y x) ⌣-commℤ/2₁,₁ = - ST.elim2 _ _ isSetPathImplicit) + ST.elim2 _ _ isSetPathImplicit) λ f g cong ∣_∣₂ (funExt λ x ⌣ₖ-commℤ/2₁,₁ (f x) (g x)) ⌣ₖ⊗-commℤ/2-base : (n : ) (x : ℤ/2 .fst) (y : EM ℤ/2 n) @@ -495,7 +495,7 @@ (_⌣_ {G'' = ℤ/2Ring} x y) (_⌣_ {G'' = ℤ/2Ring} y x) ⌣-comm-Klein zero m = - ST.elim2 _ _ isOfHLevelPathP 2 squash₂ _ _ ) + ST.elim2 _ _ isOfHLevelPathP 2 squash₂ _ _ ) λ f g i x ⌣ₖ⊗-commℤ/2-base m (f x) (g x) i) ∣₂ ⌣-comm-Klein (suc n) zero x y = transport j PathP diff --git a/Cubical.Cohomology.EilenbergMacLane.Rings.RPinf.html b/Cubical.Cohomology.EilenbergMacLane.Rings.RPinf.html index 52ba679142..cdd0aecd43 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Rings.RPinf.html +++ b/Cubical.Cohomology.EilenbergMacLane.Rings.RPinf.html @@ -67,9 +67,9 @@ eRP∞^-isGen : (n : ) Iso.inv (HⁿRP∞≅ℤ/2 n .fst) fone eRP∞^ n eRP∞^-isGen zero = refl eRP∞^-isGen (suc n) = - (cong₂ v w ST.rec isSetSetTrunc + (cong₂ v w ST.rec isSetSetTrunc x inv (RP→EM-ℤ/2-CharacIso (suc n)) x ∣₂) - (ST.rec2 isSetSetTrunc a b a , b ∣₂) + (ST.rec2 isSetSetTrunc a b a , b ∣₂) v w)) (inv-∥EM-ℤ/2ˣ∥₀-Iso-fone n) (isContr→isProp (isConnected₀EM ℤ/2 n) _ (0ₖ (suc n)) ∣₂) @@ -86,7 +86,7 @@ (inv (RP→EM-ℤ/2-CharacIso n) (EMOne n) x)))) cong (subst k coHom k ℤ/2 (EM ℤ/2 1)) (+'-suc₁ n)) (cong (_⌣_ {G'' = ℤ/2Ring} {n = 1} {n} idfun _ ∣₂) - (cong (ST.rec isSetSetTrunc x inv (RP→EM-ℤ/2-CharacIso n) x ∣₂)) + (cong (ST.rec isSetSetTrunc x inv (RP→EM-ℤ/2-CharacIso n) x ∣₂)) (sym (inv-∥EM-ℤ/2ˣ∥₀-Iso-fone n)) eRP∞^-isGen n)) where @@ -94,7 +94,7 @@ inv (∥EM-ℤ/2ˣ∥₀-Iso n) fone EMOne n ∣₂ inv-∥EM-ℤ/2ˣ∥₀-Iso-fone zero = refl inv-∥EM-ℤ/2ˣ∥₀-Iso-fone (suc n) = - cong₂ v w prodRec isSetSetTrunc a b a , b ∣₂) + cong₂ v w prodRec isSetSetTrunc a b a , b ∣₂) (v , w)) (inv-∥EM-ℤ/2ˣ∥₀-Iso-fone n) (isContr→isProp (isConnected₀EM ℤ/2 n) _ (0ₖ (suc n)) ∣₂) diff --git a/Cubical.Cohomology.EilenbergMacLane.Rings.Sn.html b/Cubical.Cohomology.EilenbergMacLane.Rings.Sn.html index 40d5315b56..b2f28589c0 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Rings.Sn.html +++ b/Cubical.Cohomology.EilenbergMacLane.Rings.Sn.html @@ -117,7 +117,7 @@ (_⌣_ {G'' = G} {n = 0} {suc n} _ g) ∣₂ x) RingStr._·_ (snd G) g (Hⁿ[Sⁿ,G]≅G (Ring→AbGroup G) n .fst .fst x) Hⁿ[Sⁿ,G]≅G-pres⌣ zero G g = - ST.elim _ isOfHLevelPath 2 (RingStr.is-set (snd G)) _ _) + ST.elim _ isOfHLevelPath 2 (RingStr.is-set (snd G)) _ _) (S¹-connElim (isConnectedEM 1) _ RingStr.is-set (snd G) _ _) embase @@ -135,7 +135,7 @@ RingStr._·_ (snd G) g h help h = Iso.leftInv (Iso-EM-ΩEM+1 0) (RingStr._·_ (snd G) g h) Hⁿ[Sⁿ,G]≅G-pres⌣ (suc n) G g = - ST.elim _ isOfHLevelPath 2 (RingStr.is-set (snd G)) _ _) + ST.elim _ isOfHLevelPath 2 (RingStr.is-set (snd G)) _ _) (Sⁿ-connElim n (isConnectedSubtr 2 (suc n) (subst k isConnected (suc k) (EM (Ring→AbGroup G) (suc (suc n)))) (+-comm 2 n) (isConnectedEM (2 +ℕ n)))) diff --git a/Cubical.Data.Cardinal.Base.html b/Cubical.Data.Cardinal.Base.html new file mode 100644 index 0000000000..bd0c9504c5 --- /dev/null +++ b/Cubical.Data.Cardinal.Base.html @@ -0,0 +1,56 @@ + +Cubical.Data.Cardinal.Base
{-
+
+This file contains:
+
+- Treatment of set truncation as cardinality
+  as per the HoTT book, section 10.2
+
+-}
+{-# OPTIONS --safe #-}
+module Cubical.Data.Cardinal.Base where
+
+open import Cubical.HITs.SetTruncation as ∥₂
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.HLevels
+open import Cubical.Data.Empty
+open import Cubical.Data.Sigma
+open import Cubical.Data.Sum
+open import Cubical.Data.Unit
+
+private
+  variable
+     ℓ' : Level
+
+-- First, we define a cardinal as the set truncation of Set
+Card : Type (ℓ-suc )
+Card {} =  hSet  ∥₂
+
+-- Verify that it's a set
+isSetCard : isSet (Card {})
+isSetCard = isSetSetTrunc
+
+-- Set truncation of a set is its cardinality
+card : hSet   Card {}
+card = ∣_∣₂
+
+-- Some special cardinalities
+𝟘 : Card {}
+𝟘 = card (⊥* , isProp→isSet isProp⊥*)
+
+𝟙 : Card {}
+𝟙 = card (Unit* , isSetUnit*)
+
+-- Now we define some arithmetic
+_+_ : Card {}  Card {ℓ'}  Card {ℓ-max  ℓ'}
+_+_ = ∥₂.rec2 isSetCard λ (A , isSetA) (B , isSetB)
+                         card ((A  B) , isSet⊎ isSetA isSetB)
+
+_·_ : Card {}  Card {ℓ'}  Card {ℓ-max  ℓ'}
+_·_ = ∥₂.rec2 isSetCard λ (A , isSetA) (B , isSetB)
+                         card ((A × B) , isSet× isSetA isSetB)
+
+_^_ : Card {}  Card {ℓ'}  Card {ℓ-max  ℓ'}
+_^_ = ∥₂.rec2 isSetCard λ (A , isSetA) (B , _)
+                         card ((B  A) , isSet→ isSetA)
+
\ No newline at end of file diff --git a/Cubical.Data.Cardinal.Properties.html b/Cubical.Data.Cardinal.Properties.html new file mode 100644 index 0000000000..27d83ce5df --- /dev/null +++ b/Cubical.Data.Cardinal.Properties.html @@ -0,0 +1,201 @@ + +Cubical.Data.Cardinal.Properties
{-
+
+This file contains:
+
+- Properties of cardinality
+- Preordering of cardinalities
+
+-}
+{-# OPTIONS --safe #-}
+module Cubical.Data.Cardinal.Properties where
+
+open import Cubical.HITs.SetTruncation as ∥₂
+open import Cubical.Data.Cardinal.Base
+
+open import Cubical.Algebra.CommSemiring
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Isomorphism
+open import Cubical.Foundations.HLevels
+open import Cubical.Foundations.Structure
+open import Cubical.Functions.Embedding
+open import Cubical.Data.Empty as 
+open import Cubical.Data.Sigma
+open import Cubical.Data.Sum as 
+open import Cubical.Data.Unit
+open import Cubical.HITs.PropositionalTruncation as ∥₁
+open import Cubical.Relation.Binary.Base
+open import Cubical.Relation.Binary.Order.Preorder.Base
+open import Cubical.Relation.Binary.Order.Properties
+
+private
+  variable
+     ℓ' ℓ'' ℓa ℓb ℓc ℓd : Level
+
+-- Cardinality is a commutative semiring
+module _ where
+  private
+    +Assoc : (A : Card {ℓa}) (B : Card {ℓb}) (C : Card {ℓc})
+            A + (B + C)  (A + B) + C
+    +Assoc = ∥₂.elim3  _ _ _  isProp→isSet (isSetCard _ _))
+                      λ _ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                                  (sym (isoToPath ⊎-assoc-Iso)))
+
+    ·Assoc : (A : Card {ℓa}) (B : Card {ℓb}) (C : Card {ℓc})
+            A · (B · C)  (A · B) · C
+    ·Assoc = ∥₂.elim3  _ _ _  isProp→isSet (isSetCard _ _))
+                      λ _ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                                  (sym (isoToPath Σ-assoc-Iso)))
+
+    +IdR𝟘 : (A : Card {})  A + 𝟘 {}  A
+    +IdR𝟘 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
+                    λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                            (isoToPath ⊎-IdR-⊥*-Iso))
+
+    +IdL𝟘 : (A : Card {})  𝟘 {} + A  A
+    +IdL𝟘 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
+                    λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                            (isoToPath ⊎-IdL-⊥*-Iso))
+
+    ·IdR𝟙 : (A : Card {})  A · 𝟙 {}  A
+    ·IdR𝟙 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
+                    λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                            (isoToPath rUnit*×Iso))
+
+    ·IdL𝟙 : (A : Card {})  𝟙 {} · A  A
+    ·IdL𝟙 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
+                    λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                            (isoToPath lUnit*×Iso))
+
+    +Comm : (A : Card {ℓa}) (B : Card {ℓb})
+           (A + B)  (B + A)
+    +Comm = ∥₂.elim2  _ _  isProp→isSet (isSetCard _ _))
+                     λ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                               (isoToPath ⊎-swap-Iso))
+
+    ·Comm : (A : Card {ℓa}) (B : Card {ℓb})
+           (A · B)  (B · A)
+    ·Comm = ∥₂.elim2  _ _  isProp→isSet (isSetCard _ _))
+                     λ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                               (isoToPath Σ-swap-Iso))
+
+    ·LDist+ : (A : Card {ℓa}) (B : Card {ℓb}) (C : Card {ℓc})
+             A · (B + C)  (A · B) + (A · C)
+    ·LDist+ = ∥₂.elim3  _ _ _  isProp→isSet (isSetCard _ _))
+                       λ _ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                                   (isoToPath ×DistR⊎Iso))
+
+    AnnihilL : (A : Card {})  𝟘 · A  𝟘
+    AnnihilL = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
+                       λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                               (isoToPath (ΣEmpty*Iso λ _  _)))
+
+  isCardCommSemiring : IsCommSemiring {ℓ-suc } 𝟘 𝟙 _+_ _·_
+  isCardCommSemiring = makeIsCommSemiring isSetCard +Assoc +IdR𝟘 +Comm ·Assoc ·IdR𝟙 ·LDist+ AnnihilL ·Comm
+
+-- Exponentiation is also well-behaved
+
+^AnnihilR𝟘 : (A : Card {})  A ^ 𝟘 {}  𝟙 {}
+^AnnihilR𝟘 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
+             λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                            (isoToPath (iso⊥ _)))
+           where iso⊥ :  A  Iso (⊥*  A) Unit*
+                 Iso.fun (iso⊥ A) _        = tt*
+                 Iso.inv (iso⊥ A) _        ()
+                 Iso.rightInv (iso⊥ A) _   = refl
+                 Iso.leftInv  (iso⊥ A) _ i ()
+
+^IdR𝟙 : (A : Card {})  A ^ 𝟙 {}  A
+^IdR𝟙 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
+                λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                               (isoToPath (iso⊤ _)))
+        where iso⊤ :  A  Iso (Unit*  A) A
+              Iso.fun (iso⊤ _) f      = f tt*
+              Iso.inv (iso⊤ _) a _    = a
+              Iso.rightInv (iso⊤ _) _ = refl
+              Iso.leftInv  (iso⊤ _) _ = refl
+
+^AnnihilL𝟙 : (A : Card {})  𝟙 {} ^ A  𝟙 {}
+^AnnihilL𝟙 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
+                     λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                             (isoToPath (iso⊤ _)))
+             where iso⊤ :  A  Iso (A  Unit*) Unit*
+                   Iso.fun (iso⊤ _) _      = tt*
+                   Iso.inv (iso⊤ _) _ _    = tt*
+                   Iso.rightInv (iso⊤ _) _ = refl
+                   Iso.leftInv  (iso⊤ _) _ = refl
+
+^LDist+ : (A : Card {ℓa}) (B : Card {ℓb}) (C : Card {ℓc})
+         A ^ (B + C)  (A ^ B) · (A ^ C)
+^LDist+ = ∥₂.elim3  _ _ _  isProp→isSet (isSetCard _ _))
+                   λ _ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                               (isoToPath Π⊎Iso))
+
+^Assoc· : (A : Card {ℓa}) (B : Card {ℓb}) (C : Card {ℓc})
+         A ^ (B · C)  (A ^ B) ^ C
+^Assoc· = ∥₂.elim3  _ _ _  isProp→isSet (isSetCard _ _))
+                   λ _ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                               (isoToPath (is _ _ _)))
+          where is :  A B C  Iso (B × C  A) (C  B  A)
+                is A B C = (B × C  A) Iso⟨ domIso Σ-swap-Iso 
+                           (C × B  A) Iso⟨ curryIso 
+                           (C  B  A) ∎Iso
+
+^RDist· : (A : Card {ℓa}) (B : Card {ℓb}) (C : Card {ℓc})
+         (A · B) ^ C  (A ^ C) · (B ^ C)
+^RDist· = ∥₂.elim3  _ _ _  isProp→isSet (isSetCard _ _))
+                   λ _ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
+                                               (isoToPath Σ-Π-Iso))
+
+
+-- With basic arithmetic done, we can now define an ordering over cardinals
+module _ where
+  private
+    _≲'_ : Card {}  Card {ℓ'}  hProp (ℓ-max  ℓ')
+    _≲'_ = ∥₂.rec2 isSetHProp λ (A , _) (B , _)   A  B ∥₁ , isPropPropTrunc
+
+  _≲_ : Rel (Card {}) (Card {ℓ'}) (ℓ-max  ℓ')
+  A  B =  A ≲' B 
+
+  isPropValued≲ : (A : Card {}) (B : Card {ℓ'})  isProp (A  B)
+  isPropValued≲ a b = str (a ≲' b)
+
+  isRefl≲ : BinaryRelation.isRefl {A = Card {}} _≲_
+  isRefl≲ = ∥₂.elim  A  isProp→isSet (isPropValued≲ A A))
+                     λ (A , _)   id↪ A ∣₁
+
+  isTrans≲ : (A : Card {}) (B : Card {ℓ'}) (C : Card {ℓ''})
+            A  B  B  C  A  C
+  isTrans≲ = ∥₂.elim3
+              x _ z  isSetΠ2 λ _ _  isProp→isSet (isPropValued≲ x z))
+             λ (A , _) (B , _) (C , _)
+                ∥₁.map2 λ A↪B B↪C  compEmbedding B↪C A↪B
+
+  isPreorder≲ : IsPreorder {ℓ-suc } _≲_
+  isPreorder≲
+    = ispreorder isSetCard isPropValued≲ isRefl≲ isTrans≲
+
+isLeast𝟘 : ∀{}  isLeast isPreorder≲ (Card {} , id↪ (Card {})) (𝟘 {})
+isLeast𝟘 = ∥₂.elim  x  isProp→isSet (isPropValued≲ 𝟘 x))
+                    _   ⊥.rec* ,  ()) ∣₁)
+
+-- Our arithmetic behaves as expected over our preordering
++Monotone≲ : (A : Card {ℓa}) (B : Card {ℓb}) (C : Card {ℓc}) (D : Card {ℓd})
+            A  C  B  D  (A + B)  (C + D)
++Monotone≲
+  = ∥₂.elim4  w x y z  isSetΠ2 λ _ _  isProp→isSet (isPropValued≲
+                                                       (w + x)
+                                                       (y + z)))
+              λ (A , _) (B , _) (C , _) (D , _)
+               ∥₁.map2 λ A↪C B↪D  ⊎Monotone↪ A↪C B↪D
+
+·Monotone≲ : (A : Card {ℓa}) (B : Card {ℓb}) (C : Card {ℓc}) (D : Card {ℓd})
+            A  C  B  D  (A · B)  (C · D)
+·Monotone≲
+  = ∥₂.elim4  w x y z  isSetΠ2 λ _ _  isProp→isSet (isPropValued≲
+                                                       (w · x)
+                                                       (y · z)))
+              λ (A , _) (B , _) (C , _) (D , _)
+               ∥₁.map2 λ A↪C B↪D  ×Monotone↪ A↪C B↪D
+
\ No newline at end of file diff --git a/Cubical.Data.Cardinal.html b/Cubical.Data.Cardinal.html new file mode 100644 index 0000000000..26bf336a5c --- /dev/null +++ b/Cubical.Data.Cardinal.html @@ -0,0 +1,7 @@ + +Cubical.Data.Cardinal
{-# OPTIONS --safe #-}
+module Cubical.Data.Cardinal where
+
+open import Cubical.Data.Cardinal.Base public
+open import Cubical.Data.Cardinal.Properties public
+
\ No newline at end of file diff --git a/Cubical.Data.Cardinality.Base.html b/Cubical.Data.Cardinality.Base.html deleted file mode 100644 index 85490fe4c3..0000000000 --- a/Cubical.Data.Cardinality.Base.html +++ /dev/null @@ -1,56 +0,0 @@ - -Cubical.Data.Cardinality.Base
{-
-
-This file contains:
-
-- Treatment of set truncation as cardinality
-  as per the HoTT book, section 10.2
-
--}
-{-# OPTIONS --safe #-}
-module Cubical.Data.Cardinality.Base where
-
-open import Cubical.HITs.SetTruncation as ∥₂
-open import Cubical.Foundations.Prelude
-open import Cubical.Foundations.HLevels
-open import Cubical.Data.Empty
-open import Cubical.Data.Sigma
-open import Cubical.Data.Sum
-open import Cubical.Data.Unit
-
-private
-  variable
-     : Level
-
--- First, we define a cardinal as the set truncation of Set
-Card : Type (ℓ-suc )
-Card {} =  hSet  ∥₂
-
--- Verify that it's a set
-isSetCard : isSet (Card {})
-isSetCard = isSetSetTrunc
-
--- Set truncation of a set is its cardinality
-card : hSet   Card {}
-card = ∣_∣₂
-
--- Some special cardinalities
-𝟘 : Card {}
-𝟘 = card (⊥* , isProp→isSet isProp⊥*)
-
-𝟙 : Card {}
-𝟙 = card (Unit* , isSetUnit*)
-
--- Now we define some arithmetic
-_+_ : Card {}  Card {}  Card {}
-_+_ = ∥₂.rec2 isSetCard λ (A , isSetA) (B , isSetB)
-                         card ((A  B) , isSet⊎ isSetA isSetB)
-
-_·_ : Card {}  Card {}  Card {}
-_·_ = ∥₂.rec2 isSetCard λ (A , isSetA) (B , isSetB)
-                         card ((A × B) , isSet× isSetA isSetB)
-
-_^_ : Card {}  Card {}  Card {}
-_^_ = ∥₂.rec2 isSetCard λ (A , isSetA) (B , _)
-                         card ((B  A) , isSet→ isSetA)
-
\ No newline at end of file diff --git a/Cubical.Data.Cardinality.Properties.html b/Cubical.Data.Cardinality.Properties.html deleted file mode 100644 index fbb7f4085f..0000000000 --- a/Cubical.Data.Cardinality.Properties.html +++ /dev/null @@ -1,196 +0,0 @@ - -Cubical.Data.Cardinality.Properties
{-
-
-This file contains:
-
-- Properties of cardinality
-- Preordering of cardinalities
-
--}
-{-# OPTIONS --safe #-}
-module Cubical.Data.Cardinality.Properties where
-
-open import Cubical.HITs.SetTruncation as ∥₂
-open import Cubical.Data.Cardinality.Base
-
-open import Cubical.Algebra.CommSemiring
-
-open import Cubical.Foundations.Prelude
-open import Cubical.Foundations.Isomorphism
-open import Cubical.Foundations.HLevels
-open import Cubical.Foundations.Structure
-open import Cubical.Functions.Embedding
-open import Cubical.Data.Empty as 
-open import Cubical.Data.Sigma
-open import Cubical.Data.Sum as 
-open import Cubical.Data.Unit
-open import Cubical.HITs.PropositionalTruncation as ∥₁
-open import Cubical.Relation.Binary.Base
-open import Cubical.Relation.Binary.Order.Preorder.Base
-open import Cubical.Relation.Binary.Order.Properties
-
-private
-  variable
-     : Level
-
--- Cardinality is a commutative semiring
-module _ where
-  private
-    +Assoc : (A B C : Card {})  A + (B + C)  (A + B) + C
-    +Assoc = ∥₂.elim3  _ _ _  isProp→isSet (isSetCard _ _))
-                      λ _ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                                  (sym (isoToPath ⊎-assoc-Iso)))
-
-    ·Assoc : (A B C : Card {})  A · (B · C)  (A · B) · C
-    ·Assoc = ∥₂.elim3  _ _ _  isProp→isSet (isSetCard _ _))
-                      λ _ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                                  (sym (isoToPath Σ-assoc-Iso)))
-
-    +IdR𝟘 : (A : Card {})  A + 𝟘  A
-    +IdR𝟘 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
-                    λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                            (isoToPath ⊎-IdR-⊥*-Iso))
-
-    +IdL𝟘 : (A : Card {})  𝟘 + A  A
-    +IdL𝟘 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
-                    λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                            (isoToPath ⊎-IdL-⊥*-Iso))
-
-    ·IdR𝟙 : (A : Card {})  A · 𝟙  A
-    ·IdR𝟙 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
-                    λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                            (isoToPath rUnit*×Iso))
-
-    ·IdL𝟙 : (A : Card {})  𝟙 · A  A
-    ·IdL𝟙 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
-                    λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                            (isoToPath lUnit*×Iso))
-
-    +Comm : (A B : Card {})  (A + B)  (B + A)
-    +Comm = ∥₂.elim2  _ _  isProp→isSet (isSetCard _ _))
-                     λ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                               (isoToPath ⊎-swap-Iso))
-
-    ·Comm : (A B : Card {})  (A · B)  (B · A)
-    ·Comm = ∥₂.elim2  _ _  isProp→isSet (isSetCard _ _))
-                     λ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                               (isoToPath Σ-swap-Iso))
-
-    ·LDist+ : (A B C : Card {})  A · (B + C)  (A · B) + (A · C)
-    ·LDist+ = ∥₂.elim3  _ _ _  isProp→isSet (isSetCard _ _))
-                       λ _ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                                   (isoToPath ×DistL⊎Iso))
-
-    AnnihilL : (A : Card {})  𝟘 · A  𝟘
-    AnnihilL = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
-                       λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                               (isoToPath (ΣEmpty*Iso λ _  _)))
-
-  isCardCommSemiring : IsCommSemiring {ℓ-suc } 𝟘 𝟙 _+_ _·_
-  isCardCommSemiring = makeIsCommSemiring isSetCard +Assoc +IdR𝟘 +Comm ·Assoc ·IdR𝟙 ·LDist+ AnnihilL ·Comm
-
--- Exponentiation is also well-behaved
-
-^AnnihilR𝟘 : (A : Card {})  A ^ 𝟘  𝟙
-^AnnihilR𝟘 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
-             λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                            (isoToPath (iso⊥ _)))
-           where iso⊥ :  A  Iso (⊥*  A) Unit*
-                 Iso.fun (iso⊥ A) _        = tt*
-                 Iso.inv (iso⊥ A) _        ()
-                 Iso.rightInv (iso⊥ A) _   = refl
-                 Iso.leftInv  (iso⊥ A) _ i ()
-
-^IdR𝟙 : (A : Card {})  A ^ 𝟙  A
-^IdR𝟙 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
-                λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                               (isoToPath (iso⊤ _)))
-        where iso⊤ :  A  Iso (Unit*  A) A
-              Iso.fun (iso⊤ _) f      = f tt*
-              Iso.inv (iso⊤ _) a _    = a
-              Iso.rightInv (iso⊤ _) _ = refl
-              Iso.leftInv  (iso⊤ _) _ = refl
-
-^AnnihilL𝟙 : (A : Card {})  𝟙 ^ A  𝟙
-^AnnihilL𝟙 = ∥₂.elim  _  isProp→isSet (isSetCard _ _))
-                     λ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                             (isoToPath (iso⊤ _)))
-             where iso⊤ :  A  Iso (A  Unit*) Unit*
-                   Iso.fun (iso⊤ _) _      = tt*
-                   Iso.inv (iso⊤ _) _ _    = tt*
-                   Iso.rightInv (iso⊤ _) _ = refl
-                   Iso.leftInv  (iso⊤ _) _ = refl
-
-^LDist+ : (A B C : Card {})  A ^ (B + C)  (A ^ B) · (A ^ C)
-^LDist+ = ∥₂.elim3  _ _ _  isProp→isSet (isSetCard _ _))
-                   λ _ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                               (isoToPath Π⊎Iso))
-
-^Assoc· : (A B C : Card {})  A ^ (B · C)  (A ^ B) ^ C
-^Assoc· = ∥₂.elim3  _ _ _  isProp→isSet (isSetCard _ _))
-                   λ _ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                               (isoToPath (is _ _ _)))
-          where is :  A B C  Iso (B × C  A) (C  B  A)
-                is A B C = (B × C  A) Iso⟨ domIso Σ-swap-Iso 
-                           (C × B  A) Iso⟨ curryIso 
-                           (C  B  A) ∎Iso
-
-^RDist· : (A B C : Card {})  (A · B) ^ C  (A ^ C) · (B ^ C)
-^RDist· = ∥₂.elim3  _ _ _  isProp→isSet (isSetCard _ _))
-                   λ _ _ _  cong ∣_∣₂ (Σ≡Prop  _  isPropIsSet)
-                                               (isoToPath Σ-Π-Iso))
-
-
--- With basic arithmetic done, we can now define an ordering over cardinals
-module _ where
-  private
-    _≲'_ : Card {}  Card {}  hProp 
-    _≲'_ = ∥₂.rec2 isSetHProp λ (A , _) (B , _)   A  B ∥₁ , isPropPropTrunc
-
-  _≲_ : Rel (Card {}) (Card {}) 
-  A  B =  A ≲' B 
-
-  isPreorder≲ : IsPreorder {ℓ-suc } _≲_
-  isPreorder≲
-    = ispreorder isSetCard prop reflexive transitive
-                 where prop : BinaryRelation.isPropValued _≲_
-                       prop a b = str (a ≲' b)
-
-                       reflexive : BinaryRelation.isRefl _≲_
-                       reflexive = ∥₂.elim  A  isProp→isSet (prop A A))
-                                            (A , _)   id↪ A ∣₁)
-
-                       transitive : BinaryRelation.isTrans _≲_
-                       transitive = ∥₂.elim3  x _ z  isSetΠ2
-                                                      λ _ _  isProp→isSet
-                                                              (prop x z))
-                                              (A , _) (B , _) (C , _)
-                                               ∥₁.map2 λ A↪B B↪C
-                                                         compEmbedding
-                                                          B↪C
-                                                          A↪B)
-
-isLeast𝟘 : ∀{}  isLeast isPreorder≲ (Card {} , id↪ (Card {})) (𝟘 {})
-isLeast𝟘 = ∥₂.elim  x  isProp→isSet (IsPreorder.is-prop-valued
-                                       isPreorder≲ 𝟘 x))
-                    _   ⊥.rec* ,  ()) ∣₁)
-
--- Our arithmetic behaves as expected over our preordering
-+Monotone≲ : (A B C D : Card {})  A  C  B  D  (A + B)  (C + D)
-+Monotone≲
-  = ∥₂.elim4  w x y z  isSetΠ2 λ _ _  isProp→isSet (IsPreorder.is-prop-valued
-                                                       isPreorder≲
-                                                       (w + x)
-                                                       (y + z)))
-              λ (A , _) (B , _) (C , _) (D , _)
-               ∥₁.map2 λ A↪C B↪D  ⊎Monotone↪ A↪C B↪D
-
-·Monotone≲ : (A B C D : Card {})  A  C  B  D  (A · B)  (C · D)
-·Monotone≲
-  = ∥₂.elim4  w x y z  isSetΠ2 λ _ _  isProp→isSet (IsPreorder.is-prop-valued
-                                                       isPreorder≲
-                                                       (w · x)
-                                                       (y · z)))
-              λ (A , _) (B , _) (C , _) (D , _)
-               ∥₁.map2 λ A↪C B↪D  ×Monotone↪ A↪C B↪D
-
\ No newline at end of file diff --git a/Cubical.Data.Cardinality.html b/Cubical.Data.Cardinality.html deleted file mode 100644 index fbbaab5a82..0000000000 --- a/Cubical.Data.Cardinality.html +++ /dev/null @@ -1,7 +0,0 @@ - -Cubical.Data.Cardinality
{-# OPTIONS --safe #-}
-module Cubical.Data.Cardinality where
-
-open import Cubical.Data.Cardinality.Base public
-open import Cubical.Data.Cardinality.Properties public
-
\ No newline at end of file diff --git a/Cubical.Data.Empty.Base.html b/Cubical.Data.Empty.Base.html index 38b89f76b6..eaaf784b08 100644 --- a/Cubical.Data.Empty.Base.html +++ b/Cubical.Data.Empty.Base.html @@ -21,4 +21,7 @@ elim : {A : Type } (x : ) A x elim () + +elim* : {A : ⊥* {ℓ'} Type } (x : ⊥* {ℓ'}) A x +elim* () \ No newline at end of file diff --git a/Cubical.Data.Everything.html b/Cubical.Data.Everything.html index efcd05ac1b..d8e8d60872 100644 --- a/Cubical.Data.Everything.html +++ b/Cubical.Data.Everything.html @@ -5,81 +5,82 @@ import Cubical.Data.BinNat import Cubical.Data.Bool import Cubical.Data.Bool.SwitchStatement -import Cubical.Data.Cardinality -import Cubical.Data.DescendingList -import Cubical.Data.Empty -import Cubical.Data.Equality -import Cubical.Data.Fin -import Cubical.Data.Fin.Arithmetic -import Cubical.Data.Fin.LehmerCode -import Cubical.Data.Fin.Recursive -import Cubical.Data.FinData -import Cubical.Data.FinData.DepFinVec -import Cubical.Data.FinData.Order -import Cubical.Data.FinInd -import Cubical.Data.FinSet -import Cubical.Data.FinSet.Binary.Large -import Cubical.Data.FinSet.Binary.Small -import Cubical.Data.FinSet.Cardinality -import Cubical.Data.FinSet.Constructors -import Cubical.Data.FinSet.DecidablePredicate -import Cubical.Data.FinSet.FiniteChoice -import Cubical.Data.FinSet.Induction -import Cubical.Data.FinSet.Quotients -import Cubical.Data.FinType -import Cubical.Data.FinType.FiniteStructure -import Cubical.Data.FinType.Sigma -import Cubical.Data.FinWeak -import Cubical.Data.Graph -import Cubical.Data.InfNat -import Cubical.Data.Int -import Cubical.Data.Int.Divisibility -import Cubical.Data.Int.IsEven -import Cubical.Data.Int.MoreInts.BiInvInt -import Cubical.Data.Int.MoreInts.DeltaInt -import Cubical.Data.Int.MoreInts.DiffInt -import Cubical.Data.Int.MoreInts.QuoInt -import Cubical.Data.Int.Order -import Cubical.Data.List -import Cubical.Data.List.Dependent -import Cubical.Data.List.FinData -import Cubical.Data.Maybe -import Cubical.Data.Nat -import Cubical.Data.Nat.Algebra -import Cubical.Data.Nat.Coprime -import Cubical.Data.Nat.Divisibility -import Cubical.Data.Nat.GCD -import Cubical.Data.Nat.IsEven -import Cubical.Data.Nat.Literals -import Cubical.Data.Nat.Lower -import Cubical.Data.Nat.Mod -import Cubical.Data.Nat.Omniscience -import Cubical.Data.Nat.Order -import Cubical.Data.Nat.Order.Recursive -import Cubical.Data.Nat.Triangular -import Cubical.Data.NatMinusOne -import Cubical.Data.NatPlusOne -import Cubical.Data.NatPlusOne.MoreNats.AssocNat -import Cubical.Data.Prod -import Cubical.Data.Queue -import Cubical.Data.Queue.1List -import Cubical.Data.Queue.Truncated2List -import Cubical.Data.Queue.Untruncated2List -import Cubical.Data.Queue.Untruncated2ListInvariant -import Cubical.Data.Rationals -import Cubical.Data.Rationals.MoreRationals.HITQ -import Cubical.Data.Rationals.MoreRationals.QuoQ -import Cubical.Data.Rationals.MoreRationals.SigmaQ -import Cubical.Data.Rationals.Order -import Cubical.Data.Sigma -import Cubical.Data.SubFinSet -import Cubical.Data.Sum -import Cubical.Data.SumFin -import Cubical.Data.Unit -import Cubical.Data.Unit.Pointed -import Cubical.Data.Vec -import Cubical.Data.Vec.DepVec -import Cubical.Data.Vec.NAry -import Cubical.Data.Vec.OperationsNat -import Cubical.Data.W.Indexed +import Cubical.Data.Cardinal +import Cubical.Data.DescendingList +import Cubical.Data.Empty +import Cubical.Data.Equality +import Cubical.Data.Fin +import Cubical.Data.Fin.Arithmetic +import Cubical.Data.Fin.LehmerCode +import Cubical.Data.Fin.Recursive +import Cubical.Data.FinData +import Cubical.Data.FinData.DepFinVec +import Cubical.Data.FinData.Order +import Cubical.Data.FinInd +import Cubical.Data.FinSet +import Cubical.Data.FinSet.Binary.Large +import Cubical.Data.FinSet.Binary.Small +import Cubical.Data.FinSet.Cardinality +import Cubical.Data.FinSet.Constructors +import Cubical.Data.FinSet.DecidablePredicate +import Cubical.Data.FinSet.FiniteChoice +import Cubical.Data.FinSet.Induction +import Cubical.Data.FinSet.Quotients +import Cubical.Data.FinType +import Cubical.Data.FinType.FiniteStructure +import Cubical.Data.FinType.Sigma +import Cubical.Data.FinWeak +import Cubical.Data.Graph +import Cubical.Data.InfNat +import Cubical.Data.Int +import Cubical.Data.Int.Divisibility +import Cubical.Data.Int.IsEven +import Cubical.Data.Int.MoreInts.BiInvInt +import Cubical.Data.Int.MoreInts.DeltaInt +import Cubical.Data.Int.MoreInts.DiffInt +import Cubical.Data.Int.MoreInts.QuoInt +import Cubical.Data.Int.Order +import Cubical.Data.List +import Cubical.Data.List.Dependent +import Cubical.Data.List.FinData +import Cubical.Data.Maybe +import Cubical.Data.Nat +import Cubical.Data.Nat.Algebra +import Cubical.Data.Nat.Coprime +import Cubical.Data.Nat.Divisibility +import Cubical.Data.Nat.GCD +import Cubical.Data.Nat.IsEven +import Cubical.Data.Nat.Literals +import Cubical.Data.Nat.Lower +import Cubical.Data.Nat.Mod +import Cubical.Data.Nat.Omniscience +import Cubical.Data.Nat.Order +import Cubical.Data.Nat.Order.Recursive +import Cubical.Data.Nat.Triangular +import Cubical.Data.NatMinusOne +import Cubical.Data.NatPlusOne +import Cubical.Data.NatPlusOne.MoreNats.AssocNat +import Cubical.Data.Ordinal +import Cubical.Data.Prod +import Cubical.Data.Queue +import Cubical.Data.Queue.1List +import Cubical.Data.Queue.Truncated2List +import Cubical.Data.Queue.Untruncated2List +import Cubical.Data.Queue.Untruncated2ListInvariant +import Cubical.Data.Rationals +import Cubical.Data.Rationals.MoreRationals.HITQ +import Cubical.Data.Rationals.MoreRationals.QuoQ +import Cubical.Data.Rationals.MoreRationals.SigmaQ +import Cubical.Data.Rationals.Order +import Cubical.Data.Sigma +import Cubical.Data.SubFinSet +import Cubical.Data.Sum +import Cubical.Data.SumFin +import Cubical.Data.Unit +import Cubical.Data.Unit.Pointed +import Cubical.Data.Vec +import Cubical.Data.Vec.DepVec +import Cubical.Data.Vec.NAry +import Cubical.Data.Vec.OperationsNat +import Cubical.Data.W.Indexed \ No newline at end of file diff --git a/Cubical.Data.FinData.Order.html b/Cubical.Data.FinData.Order.html index 9b6191916a..ed5226d9c5 100644 --- a/Cubical.Data.FinData.Order.html +++ b/Cubical.Data.FinData.Order.html @@ -28,8 +28,8 @@ _<Fin_ : {n : } Fin n Fin n Type i <Fin j = (suc i) ≤Fin (weakenFin j) -open BinaryRelation -≤FinIsPropValued : {n : } isPropValued (_≤Fin_ {n}) +open BinaryRelation +≤FinIsPropValued : {n : } isPropValued (_≤Fin_ {n}) ≤FinIsPropValued _ _ = isProp≤ @@ -40,8 +40,8 @@ _<'Fin_ : {n : } Fin n Fin n Type i <'Fin j = (suc i) ≤'Fin (weakenFin j) -open BinaryRelation -≤'FinIsPropValued : {n : } isPropValued (_≤'Fin_ {n}) +open BinaryRelation +≤'FinIsPropValued : {n : } isPropValued (_≤'Fin_ {n}) ≤'FinIsPropValued _ _ = ≤'IsPropValued _ _ diff --git a/Cubical.Data.FinSet.Cardinality.html b/Cubical.Data.FinSet.Cardinality.html index a4bd098bee..c3744e347c 100644 --- a/Cubical.Data.FinSet.Cardinality.html +++ b/Cubical.Data.FinSet.Cardinality.html @@ -572,12 +572,12 @@ open Iso Iso-∥FinSet∥₂-ℕ : Iso FinSet ∥₂ -Iso-∥FinSet∥₂-ℕ .fun = Set.rec isSetℕ card +Iso-∥FinSet∥₂-ℕ .fun = Set.rec isSetℕ card Iso-∥FinSet∥₂-ℕ .inv n = 𝔽in n ∣₂ Iso-∥FinSet∥₂-ℕ .rightInv n = card𝔽in n Iso-∥FinSet∥₂-ℕ { = } .leftInv = - Set.elim {B = λ X 𝔽in (Set.rec isSetℕ card X) ∣₂ X} - X isSetPathImplicit) + Set.elim {B = λ X 𝔽in (Set.rec isSetℕ card X) ∣₂ X} + X isSetPathImplicit) (elimProp X 𝔽in (card X) ∣₂ X ∣₂) X squash₂ _ _) n i 𝔽in (card𝔽in { = } n i) ∣₂)) diff --git a/Cubical.Data.FinSet.Quotients.html b/Cubical.Data.FinSet.Quotients.html index 0565db2833..d5fd886e04 100644 --- a/Cubical.Data.FinSet.Quotients.html +++ b/Cubical.Data.FinSet.Quotients.html @@ -133,12 +133,12 @@ isFinSet∥Eff : isFinSet _∥Eff_ isFinSet∥Eff = isFinSetSub (_ , isFinSetℙEff X) _ _ , isDecPropIsEqClassEff) -open BinaryRelation +open BinaryRelation module _ (X : FinSet ) (R : X .fst X .fst Type ℓ') - (h : isEquivRel R) + (h : isEquivRel R) (dec : (x x' : X .fst) isDecProp (R x x')) where isFinSetQuot : isFinSet (X .fst / R) diff --git a/Cubical.Data.FinType.FiniteStructure.html b/Cubical.Data.FinType.FiniteStructure.html index 68d35dc8af..35889d6674 100644 --- a/Cubical.Data.FinType.FiniteStructure.html +++ b/Cubical.Data.FinType.FiniteStructure.html @@ -56,12 +56,12 @@ ∥FinSetOfCard∥₂≡ : (X Y : FinSetOfCard n) X .fst Y .fst ∥₁ X ∣₂ Y ∣₂ ∥FinSetOfCard∥₂≡ _ _ = - Prop.rec (squash₂ _ _) p PathIdTrunc₀Iso .inv FinSetOfCard≡ _ _ .fst p ∣₁) + Prop.rec (squash₂ _ _) p PathIdTrunc₀Iso .inv FinSetOfCard≡ _ _ .fst p ∣₁) isPathConnectedFinSetOfCard : isContr FinSetOfCard n ∥₂ isPathConnectedFinSetOfCard {n = n} .fst = 𝔽in n , card𝔽in n ∣₂ isPathConnectedFinSetOfCard {n = n} .snd = - Set.elim _ isProp→isSet (squash₂ _ _)) (X , p) sym (∥FinSetOfCard∥₂≡ _ _ (card≡n p))) + Set.elim _ isProp→isSet (squash₂ _ _)) (X , p) sym (∥FinSetOfCard∥₂≡ _ _ (card≡n p))) isFinTypeFinSetOfCard : isFinType 1 (FinSetOfCard n) isFinTypeFinSetOfCard .fst = isPathConnected→isFinType0 isPathConnectedFinSetOfCard diff --git a/Cubical.Data.FinType.Properties.html b/Cubical.Data.FinType.Properties.html index 0404ad306b..8b4f769c68 100644 --- a/Cubical.Data.FinType.Properties.html +++ b/Cubical.Data.FinType.Properties.html @@ -29,13 +29,13 @@ Y : Type ℓ' EquivPresIsFinType : (n : ) X Y isFinType n X isFinType n Y -EquivPresIsFinType 0 e = EquivPresIsFinSet (isoToEquiv (setTruncIso (equivToIso e))) +EquivPresIsFinType 0 e = EquivPresIsFinSet (isoToEquiv (setTruncIso (equivToIso e))) EquivPresIsFinType (suc n) e (p , q) .fst = EquivPresIsFinType 0 e p EquivPresIsFinType (suc n) e (p , q) .snd a b = EquivPresIsFinType n (invEquiv (congEquiv (invEquiv e))) (q _ _) isFinSet→isFinType : (n : ) isFinSet X isFinType n X -isFinSet→isFinType 0 p = EquivPresIsFinSet (invEquiv (setTruncIdempotent≃ (isFinSet→isSet p))) p +isFinSet→isFinType 0 p = EquivPresIsFinSet (invEquiv (setTruncIdempotent≃ (isFinSet→isSet p))) p isFinSet→isFinType (suc n) p .fst = isFinSet→isFinType 0 p isFinSet→isFinType (suc n) p .snd a b = isFinSet→isFinType n (isFinSet≡ (_ , p) _ _) diff --git a/Cubical.Data.FinType.Sigma.html b/Cubical.Data.FinType.Sigma.html index 139ca57ca6..06b88678fc 100644 --- a/Cubical.Data.FinType.Sigma.html +++ b/Cubical.Data.FinType.Sigma.html @@ -40,7 +40,7 @@ private ∥f∥₂ : X ∥₂ Y ∥₂ - ∥f∥₂ = Set.map f + ∥f∥₂ = Set.map f module _ (y : Y) where @@ -55,7 +55,7 @@ (isFinSetQuot (_ , q y) (fiberRel f y) (isEquivRelFiberRel f y) isDecPropFiberRel) isFinSetFiber∥∥₂ : (y : Y ∥₂) isFinSet (fiber ∥f∥₂ y) - isFinSetFiber∥∥₂ = Set.elim _ isProp→isSet isPropIsFinSet) isFinSetFiber∥∥₂' + isFinSetFiber∥∥₂ = Set.elim _ isProp→isSet isPropIsFinSet) isFinSetFiber∥∥₂' isFinType0Total : isFinType 0 X isFinType0Total = isFinSetTotal X ∥₂ ( Y ∥₂ , h .fst) ∥f∥₂ isFinSetFiber∥∥₂ diff --git a/Cubical.Data.Int.MoreInts.DiffInt.Properties.html b/Cubical.Data.Int.MoreInts.DiffInt.Properties.html index 8811c83ed0..d60bce60b3 100644 --- a/Cubical.Data.Int.MoreInts.DiffInt.Properties.html +++ b/Cubical.Data.Int.MoreInts.DiffInt.Properties.html @@ -19,18 +19,18 @@ open import Cubical.HITs.PropositionalTruncation as PropositionalTruncation open import Cubical.Foundations.Isomorphism -open BinaryRelation +open BinaryRelation -relIsEquiv : isEquivRel rel -relIsEquiv = equivRel {A = × } relIsRefl relIsSym relIsTrans +relIsEquiv : isEquivRel rel +relIsEquiv = equivRel {A = × } relIsRefl relIsSym relIsTrans where - relIsRefl : isRefl rel + relIsRefl : isRefl rel relIsRefl (a0 , a1) = refl - relIsSym : isSym rel + relIsSym : isSym rel relIsSym (a0 , a1) (b0 , b1) p = sym p - relIsTrans : isTrans rel + relIsTrans : isTrans rel relIsTrans (a0 , a1) (b0 , b1) (c0 , c1) p0 p1 = inj-m+ {m = (b0 +ℕ b1)} ((b0 +ℕ b1) +ℕ (a0 +ℕ c1) ≡⟨ ℕ.+-assoc (b0 +ℕ b1) a0 c1 ((b0 +ℕ b1) +ℕ a0) +ℕ c1 ≡[ i ]⟨ ℕ.+-comm b0 b1 i +ℕ a0 +ℕ c1 diff --git a/Cubical.Data.Nat.GCD.html b/Cubical.Data.Nat.GCD.html index 9ecc1d72dc..dc3326e61f 100644 --- a/Cubical.Data.Nat.GCD.html +++ b/Cubical.Data.Nat.GCD.html @@ -98,7 +98,7 @@ -- putting it all together using well-founded induction euclid< : m n n < m GCD m n -euclid< = WFI.induction <-wellfounded λ { +euclid< = WFI.induction <-wellfounded λ { m rec zero p m , zeroGCD m ; m rec (suc n) p let d , dGCD = rec (suc n) p (m % suc n) (n%sk<sk m n) in d , stepGCD dGCD } diff --git a/Cubical.Data.Nat.Order.Recursive.html b/Cubical.Data.Nat.Order.Recursive.html index 919154ac5e..8e8fe284b3 100644 --- a/Cubical.Data.Nat.Order.Recursive.html +++ b/Cubical.Data.Nat.Order.Recursive.html @@ -127,17 +127,17 @@ = Sum.map (idfun _) (cong suc) (≤-split {m} {n} m≤n) module WellFounded where - wf-< : WellFounded _<_ - wf-rec-< : n WFRec _<_ (Acc _<_) n + wf-< : WellFounded _<_ + wf-rec-< : n WFRec _<_ (Acc _<_) n - wf-< n = acc (wf-rec-< n) + wf-< n = acc (wf-rec-< n) wf-rec-< (suc n) m m≤n with ≤-split {m} {n} m≤n ... | inl m<n = wf-rec-< n m m<n - ... | inr m≡n = subst⁻ (Acc _<_) m≡n (wf-< n) + ... | inr m≡n = subst⁻ (Acc _<_) m≡n (wf-< n) wf-elim : (∀ n (∀ m m < n P m) P n) n P n -wf-elim = WFI.induction WellFounded.wf-< +wf-elim = WFI.induction WellFounded.wf-< wf-rec : (∀ n (∀ m m < n R) R) R wf-rec {R = R} = wf-elim {P = λ _ R} diff --git a/Cubical.Data.Nat.Order.html b/Cubical.Data.Nat.Order.html index 5a798ecac0..88e10388e2 100644 --- a/Cubical.Data.Nat.Order.html +++ b/Cubical.Data.Nat.Order.html @@ -335,16 +335,16 @@ <-asym' = <-asym'-case (_≟_ _ _) private - acc-suc : Acc _<_ n Acc _<_ (suc n) + acc-suc : Acc _<_ n Acc _<_ (suc n) acc-suc a - = acc λ y y<sn + = acc λ y y<sn case <-split y<sn of λ - { (inl y<n) access a y y<n + { (inl y<n) access a y y<n ; (inr y≡n) subst _ (sym y≡n) a } -<-wellfounded : WellFounded _<_ -<-wellfounded zero = acc λ _ ⊥.rec ¬-<-zero +<-wellfounded : WellFounded _<_ +<-wellfounded zero = acc λ _ ⊥.rec ¬-<-zero <-wellfounded (suc n) = acc-suc (<-wellfounded n) <→≢ : n < m ¬ n m @@ -356,7 +356,7 @@ (base : n n < suc b₀ P n) (step : n P n P (suc b₀ + n)) where - open WFI (<-wellfounded) + open WFI (<-wellfounded) private dichotomy : b n (n < b) (Σ[ m ] n b + m) @@ -404,13 +404,13 @@ transportRefl _ +induction : n P n - +induction = induction wfStep + +induction = induction wfStep +inductionBase : n (l : n < b) +induction n base n l - +inductionBase n l = induction-compute wfStep n wfStepLemma₀ n l _ + +inductionBase n l = induction-compute wfStep n wfStepLemma₀ n l _ +inductionStep : n +induction (b + n) step n (+induction n) - +inductionStep n = induction-compute wfStep (b + n) wfStepLemma₁ n _ + +inductionStep n = induction-compute wfStep (b + n) wfStepLemma₁ n _ module <-Reasoning where -- TODO: would it be better to mirror the way it is done in the agda-stdlib? diff --git a/Cubical.Data.Ordinal.Base.html b/Cubical.Data.Ordinal.Base.html new file mode 100644 index 0000000000..d381b6303e --- /dev/null +++ b/Cubical.Data.Ordinal.Base.html @@ -0,0 +1,259 @@ + +Cubical.Data.Ordinal.Base
{-
+
+This file contains:
+
+- Ordinals as well-ordered sets
+
+-}
+{-# OPTIONS --safe #-}
+module Cubical.Data.Ordinal.Base where
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.HLevels
+open import Cubical.Foundations.Equiv
+open import Cubical.Foundations.Function
+open import Cubical.Foundations.Structure
+
+open import Cubical.Data.Empty as 
+open import Cubical.Data.Sigma
+open import Cubical.Data.Sum as 
+open import Cubical.Data.Unit
+
+open import Cubical.Induction.WellFounded
+
+open import Cubical.Relation.Binary.Base
+open import Cubical.Relation.Binary.Extensionality
+open import Cubical.Relation.Binary.Order.Woset
+
+private
+  variable
+     : Level
+
+infix 7 _·_
+infix 6 _+_
+
+-- Ordinals are simply well-ordered sets
+Ord :  {}  Type _
+Ord {} = Woset  
+
+isSetOrd : isSet (Ord {})
+isSetOrd = isSetWoset
+
+-- The successor ordinal is simply the union with unit
+suc : Ord {}  Ord {}
+suc {} (A , ordStr) = (A  Unit* {}) , wosetstr _≺_ iswos
+  where _≺ₐ_ = WosetStr._≺_ ordStr
+        wosA = WosetStr.isWoset ordStr
+        setA = IsWoset.is-set wosA
+        propA = IsWoset.is-prop-valued wosA
+        wellA = IsWoset.is-well-founded wosA
+        weakA = IsWoset.is-weakly-extensional wosA
+        transA = IsWoset.is-trans wosA
+
+
+        _≺_ : Rel (A  Unit* {}) (A  Unit* {}) 
+        inl a  inl b = a ≺ₐ b
+        inl _  inr * = Unit* {}
+        inr *  _ = ⊥* {}
+
+        open BinaryRelation
+
+        set : isSet (A  Unit*)
+        set = isSet⊎ setA isSetUnit*
+
+        prop : isPropValued _≺_
+        prop (inl a) (inl b) = propA a b
+        prop (inl _) (inr *) = isPropUnit*
+        prop (inr *) _ = isProp⊥*
+
+        well : WellFounded _≺_
+        well (inl x) = WFI.induction wellA {P = λ x  Acc _≺_ (inl x)}
+                      _ ind  acc  { (inl y)  ind y
+                                       ; (inr *) () })) x
+        well (inr *) = acc  { (inl y) _  well (inl y)
+                              ; (inr *) () })
+
+        weak : isWeaklyExtensional _≺_
+        weak = ≺×→≡→isWeaklyExtensional _≺_ set prop
+             λ { (inl x) (inl y) ex  cong inl
+                 (isWeaklyExtensional→≺Equiv→≡ _≺ₐ_ weakA x y λ z
+                  propBiimpl→Equiv (propA z x) (propA z y)
+                   (ex (inl z) .fst)
+                   (ex (inl z) .snd))
+               ; (inl x) (inr *) ex  ⊥.rec
+                   (WellFounded→isIrrefl _≺ₐ_ wellA x (ex (inl x) .snd tt*))
+               ; (inr *) (inl x) ex  ⊥.rec
+                   (WellFounded→isIrrefl _≺ₐ_ wellA x (ex (inl x) .fst tt*))
+               ; (inr *) (inr _) _  refl
+               }
+
+        trans : isTrans _≺_
+        trans (inl a) (inl b) (inl c) = transA a b c
+        trans (inl _) (inl _) (inr *) _ _ = tt*
+        trans (inl a) (inr *) _ _ ()
+        trans (inr *) _ _ ()
+
+        iswos : IsWoset _≺_
+        iswos = iswoset set prop well weak trans
+
+-- Ordinal addition is handled similarly
+_+_ : Ord {}  Ord {}  Ord {}
+A + B = ( A    B ) , wosetstr _≺_ wos
+  where _≺ᵣ_ = WosetStr._≺_ (str A)
+        _≺ₛ_ = WosetStr._≺_ (str B)
+
+        wosA = WosetStr.isWoset (str A)
+        setA = IsWoset.is-set wosA
+        propA = IsWoset.is-prop-valued wosA
+        wellA = IsWoset.is-well-founded wosA
+        weakA = IsWoset.is-weakly-extensional wosA
+        transA = IsWoset.is-trans wosA
+
+        wosB = WosetStr.isWoset (str B)
+        setB = IsWoset.is-set wosB
+        propB = IsWoset.is-prop-valued wosB
+        wellB = IsWoset.is-well-founded wosB
+        weakB = IsWoset.is-weakly-extensional wosB
+        transB = IsWoset.is-trans wosB
+
+        _≺_ : Rel ( A    B ) ( A    B ) _
+        inl a₀  inl a₁ = a₀ ≺ᵣ a₁
+        inl a₀  inr b₁ = Unit*
+        inr b₀  inl a₁ = ⊥*
+        inr b₀  inr b₁ = b₀ ≺ₛ b₁
+
+        open BinaryRelation
+
+        set : isSet ( A    B )
+        set = isSet⊎ setA setB
+
+        prop : isPropValued _≺_
+        prop (inl a₀) (inl a₁) = propA a₀ a₁
+        prop (inl a₀) (inr b₁) = isPropUnit*
+        prop (inr b₀) (inl a₁) = isProp⊥*
+        prop (inr b₀) (inr b₁) = propB b₀ b₁
+
+        well : WellFounded _≺_
+        well (inl a₀) = WFI.induction wellA {P = λ a  Acc _≺_ (inl a)}
+           _ ind  acc λ { (inl a₁)  ind a₁
+                           ; (inr b₁) () }) a₀
+        well (inr b₀) = WFI.induction wellB {P = λ b  Acc _≺_ (inr b)}
+           _ ind  acc λ { (inl a₁) _  well (inl a₁)
+                           ; (inr b₁)  ind b₁ }) b₀
+
+        weak : isWeaklyExtensional _≺_
+        weak = ≺×→≡→isWeaklyExtensional _≺_ set prop
+          λ { (inl a₀) (inl a₁) ex  cong inl
+              (isWeaklyExtensional→≺Equiv→≡ _≺ᵣ_ weakA a₀ a₁ λ c 
+                propBiimpl→Equiv (propA c a₀) (propA c a₁)
+                (ex (inl c) .fst)
+                (ex (inl c) .snd))
+            ; (inl a₀) (inr _) ex 
+              ⊥.rec (WellFounded→isIrrefl _≺ᵣ_ wellA a₀ (ex (inl a₀) .snd tt*))
+            ; (inr _) (inl a₁) ex 
+              ⊥.rec (WellFounded→isIrrefl _≺ᵣ_ wellA a₁ (ex (inl a₁) .fst tt*))
+            ; (inr b₀) (inr b₁) ex  cong inr
+              (isWeaklyExtensional→≺Equiv→≡ _≺ₛ_ weakB b₀ b₁ λ c 
+                propBiimpl→Equiv (propB c b₀) (propB c b₁)
+                (ex (inr c) .fst)
+                (ex (inr c) .snd))
+            }
+
+        trans : isTrans _≺_
+        trans (inl a) (inl b) (inl c) = transA a b c
+        trans (inl _) _ (inr _) _ _ = tt*
+        trans _ (inr _) (inl _) _ ()
+        trans (inr _) (inl _) _ ()
+        trans (inr a) (inr b) (inr c) = transB a b c
+
+        wos : IsWoset _≺_
+        wos = iswoset set prop well weak trans
+
+-- Ordinal multiplication is handled lexicographically
+_·_ : Ord {}  Ord {}  Ord {}
+A · B =  A  ×  B  , wosetstr _≺_ wos
+  where _≺ᵣ_ = WosetStr._≺_ (str A)
+        _≺ₛ_ = WosetStr._≺_ (str B)
+
+        wosA = WosetStr.isWoset (str A)
+        setA = IsWoset.is-set wosA
+        propA = IsWoset.is-prop-valued wosA
+        wellA = IsWoset.is-well-founded wosA
+        weakA = IsWoset.is-weakly-extensional wosA
+        transA = IsWoset.is-trans wosA
+
+        wosB = WosetStr.isWoset (str B)
+        setB = IsWoset.is-set wosB
+        propB = IsWoset.is-prop-valued wosB
+        wellB = IsWoset.is-well-founded wosB
+        weakB = IsWoset.is-weakly-extensional wosB
+        transB = IsWoset.is-trans wosB
+
+        _≺_ : Rel ( A  ×  B ) ( A  ×  B ) _
+        (a₀ , b₀)  (a₁ , b₁) = (b₀ ≺ₛ b₁)  ((b₀  b₁) × (a₀ ≺ᵣ a₁))
+
+        open BinaryRelation
+
+        set : isSet ( A  ×  B )
+        set = isSet× setA setB
+
+        prop : isPropValued _≺_
+        prop (a₀ , b₀) (a₁ , b₁)
+          = isProp⊎ (propB _ _) (isProp× (setB _ _) (propA _ _))
+            λ b₀≺b₁ (b₀≡b₁ , _)
+           WellFounded→isIrrefl _≺ₛ_ wellB b₁ (subst (_≺ₛ b₁) b₀≡b₁ b₀≺b₁)
+
+        well : WellFounded _≺_
+        well (a₀ , b₀) = WFI.induction wellB {P = λ b   a  Acc _≺_ (a , b)}
+           b₁ indB  WFI.induction wellA {P = λ a  Acc _≺_ (a , b₁)}
+           λ a₂ indA  acc λ { (a , b) (inl b≺b₁)  indB b b≺b₁ a
+                             ; (a , b) (inr (b≡b₁ , a≺a₁))
+                              subst  x  Acc _≺_ (a , x))
+                                     (sym b≡b₁)
+                                     (indA a a≺a₁) }) b₀ a₀
+
+        weak : isWeaklyExtensional _≺_
+        weak = ≺×→≡→isWeaklyExtensional _≺_ set prop λ (a₀ , b₀) (a₁ , b₁) ex 
+             ΣPathP ((isWeaklyExtensional→≺Equiv→≡ _≺ᵣ_ weakA a₀ a₁
+                a₂  propBiimpl→Equiv (propA a₂ a₀) (propA a₂ a₁)
+                a₂≺a₀  ⊎.rec  b₀≺b₁  ⊥.rec
+                          (WellFounded→isIrrefl _≺ₛ_ wellB b₁
+                          (subst (_≺ₛ b₁) (lemma a₀ a₁ b₀ b₁ ex) b₀≺b₁))) snd
+                          (ex (a₂ , b₀) .fst (inr (refl , a₂≺a₀))))
+               λ a₂≺a₁  ⊎.rec  b₁≺b₀  ⊥.rec
+                         (WellFounded→isIrrefl _≺ₛ_ wellB b₁
+                         (subst (b₁ ≺ₛ_) (lemma a₀ a₁ b₀ b₁ ex) b₁≺b₀))) snd
+                         (ex (a₂ , b₁) .snd (inr (refl , a₂≺a₁)))))
+               , lemma a₀ a₁ b₀ b₁ ex)
+             where lemma :  a₀ a₁ b₀ b₁
+                          (∀ c  (c  (a₀ , b₀)  c  (a₁ , b₁))
+                                × (c  (a₁ , b₁)  c  (a₀ , b₀)))
+                          b₀  b₁
+                   lemma a₀ a₁ b₀ b₁ ex
+                     = isWeaklyExtensional→≺Equiv→≡ _≺ₛ_ weakB b₀ b₁
+                       λ b₂  propBiimpl→Equiv (propB b₂ b₀) (propB b₂ b₁)
+                          b₂≺b₀  ⊎.rec  b₂≺b₁  b₂≺b₁)
+                             (_ , a₁≺a₁)
+                             ⊥.rec (WellFounded→isIrrefl _≺ᵣ_ wellA a₁ a₁≺a₁))
+                              (ex (a₁ , b₂) .fst (inl b₂≺b₀)))
+                         λ b₂≺b₁  ⊎.rec  b₂≺b₀  b₂≺b₀)
+                            (_ , a₀≺a₀)
+                            ⊥.rec (WellFounded→isIrrefl _≺ᵣ_ wellA a₀ a₀≺a₀))
+                             (ex (a₀ , b₂) .snd (inl b₂≺b₁))
+
+        trans : isTrans _≺_
+        trans (_ , b₀) (_ , b₁) (_ , b₂) (inl b₀≺b₁) (inl b₁≺b₂)
+          = inl (transB b₀ b₁ b₂ b₀≺b₁ b₁≺b₂)
+        trans (_ , b₀) _ _ (inl b₀≺b₁) (inr (b₁≡b₂ , _))
+          = inl (subst (b₀ ≺ₛ_) b₁≡b₂ b₀≺b₁)
+        trans _ _ (_ , b₂) (inr (b₀≡b₁ , _)) (inl b₁≺b₂)
+          = inl (subst (_≺ₛ b₂) (sym b₀≡b₁) b₁≺b₂)
+        trans (a₀ , _) (a₁ , _) (a₂ , _)
+              (inr (b₀≡b₁ , a₀≺a₁))
+              (inr (b₁≡b₂ , a₁≺a₂))
+          = inr ((b₀≡b₁  b₁≡b₂) , (transA a₀ a₁ a₂ a₀≺a₁ a₁≺a₂))
+
+        wos : IsWoset _≺_
+        wos = iswoset set prop well weak trans
+
\ No newline at end of file diff --git a/Cubical.Data.Ordinal.Properties.html b/Cubical.Data.Ordinal.Properties.html new file mode 100644 index 0000000000..b5e773de22 --- /dev/null +++ b/Cubical.Data.Ordinal.Properties.html @@ -0,0 +1,301 @@ + +Cubical.Data.Ordinal.Properties
{-
+
+This file contains:
+
+- Properties of ordinals
+
+-}
+{-# OPTIONS --safe #-}
+module Cubical.Data.Ordinal.Properties where
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Structure
+open import Cubical.Foundations.Equiv
+open import Cubical.Foundations.Function
+open import Cubical.Foundations.Isomorphism
+
+open import Cubical.Functions.Embedding
+
+open import Cubical.Data.Ordinal.Base
+open import Cubical.Data.Empty as  using ( ; ⊥* ; isProp⊥*)
+open import Cubical.Data.Sigma
+open import Cubical.Data.Sum as  hiding (rec ; elim ; map)
+open import Cubical.Data.Unit
+
+open import Cubical.Induction.WellFounded
+
+open import Cubical.Relation.Binary.Base
+open import Cubical.Relation.Binary.Extensionality
+open import Cubical.Relation.Binary.Order.Woset
+open import Cubical.Relation.Binary.Order.Woset.Simulation
+open import Cubical.Relation.Binary.Order
+
+private
+  variable
+     : Level
+
+propOrd : (P : Type )  isProp P  Ord {}
+propOrd {} P prop = P , (wosetstr _<_ (iswoset set prp well weak trans))
+  where
+    open BinaryRelation
+    _<_ : P  P  Type 
+    a < b = ⊥*{}
+
+    set : isSet P
+    set = isProp→isSet prop
+
+    prp : isPropValued _<_
+    prp _ _ = isProp⊥*
+
+    well : WellFounded _<_
+    well _ = acc  _  ⊥.elim*)
+
+    weak : isWeaklyExtensional _<_
+    weak = ≺×→≡→isWeaklyExtensional _<_ set prp λ x y _  prop x y
+
+    trans : isTrans _<_
+    trans _ _ _ = ⊥.elim*
+
+𝟘 𝟙 : Ord {}
+𝟘 {} = propOrd (⊥* {}) (isProp⊥*)
+𝟙 {} = propOrd (Unit* {}) (isPropUnit*)
+
+isLeast𝟘 : ∀{}  isLeast (isPoset→isPreorder isPoset≼) ((Ord {}) , (id↪ (Ord {}))) (𝟘 {})
+isLeast𝟘 _ = ⊥.elim* , (⊥.elim* , ⊥.elim*)
+
+-- The successor of 𝟘 is 𝟙
+suc𝟘 : suc (𝟘 {})  𝟙 {}
+suc𝟘 = equivFun (WosetPath _ _) (eq , makeIsWosetEquiv eq eqsuc λ _ _  ⊥.elim*)
+  where
+    eq :  𝟘   Unit*   𝟙 
+    eq = ⊎-IdL-⊥*-≃
+
+    eqsuc : _
+    eqsuc (inr x) (inr y) = ⊥.elim*
+
++IdR : (α : Ord {})  α + 𝟘 {}  α
++IdR α = equivFun (WosetPath _ _) (eq , (makeIsWosetEquiv eq eqα λ _ _ x≺y  x≺y))
+  where
+    eq :  α    𝟘    α 
+    eq = ⊎-IdR-⊥*-≃
+
+    eqα : _
+    eqα (inl x) (inl y) x≺y = x≺y
+
++IdL : (α : Ord {})  𝟘 {} + α  α
++IdL α = equivFun (WosetPath _ _) (eq , (makeIsWosetEquiv eq eqα λ _ _ x≺y  x≺y))
+  where
+    eq :  𝟘    α    α 
+    eq = ⊎-IdL-⊥*-≃
+
+    eqα : (x y :  𝟘    α )
+         ((𝟘 + α) .snd WosetStr.≺ x) y
+         (α .snd WosetStr.≺ equivFun eq x) (equivFun eq y)
+    eqα (inr x) (inr y) x≺y = x≺y
+
+-- The successor is just addition by 𝟙
+suc≡+𝟙 : (α : Ord {})  suc α  α + 𝟙 {}
+suc≡+𝟙 α = equivFun (WosetPath _ _) (eq , (makeIsWosetEquiv eq eqsucα eqα+𝟙))
+  where
+    eq :  suc α    α    𝟙 
+    eq = idEquiv  suc α 
+
+    eqsucα : _
+    eqsucα (inl x) (inl y) x≺y = x≺y
+    eqsucα (inl x) (inr y) _ = tt*
+    eqsucα (inr x) (inl y) = ⊥.elim*
+    eqsucα (inr x) (inr y) = ⊥.elim*
+
+    eqα+𝟙 : _
+    eqα+𝟙 (inl x) (inl y) x≺y = x≺y
+    eqα+𝟙 (inl x) (inr y) _ = tt*
+    eqα+𝟙 (inr x) (inl y) = ⊥.elim*
+    eqα+𝟙 (inr x) (inr y) = ⊥.elim*
+
+-- Successor is strictly increasing, though we can't prove it's the smallest ordinal greater than its predecessor
+suc≺ : (α : Ord {})  α  suc α
+suc≺ α = (inr tt*) , (eq , makeIsWosetEquiv eq eqsucα eqαsuc)
+  where
+    fun :  suc α  inr tt*    α 
+    fun (inl a , _) = a
+
+    iseq : isEquiv fun
+    fst (fst (equiv-proof iseq a)) = (inl a) , tt*
+    snd (fst (equiv-proof iseq a)) = refl
+    snd (equiv-proof iseq a) ((inl x , _) , x≡a)
+      = Σ≡Prop  _  IsWoset.is-set (WosetStr.isWoset (str α)) _ _)
+                (Σ≡Prop lem (cong inl (sym x≡a)))
+      where lem : (y :  suc α )  isProp _
+            lem (inl y) = isPropUnit*
+            lem (inr _) = ⊥.elim*
+    eq :  suc α  inr tt*    α 
+    eq = fun , iseq
+
+    eqsucα : _
+    eqsucα (inl x , _) (inl y , _) x<y = x<y
+
+    eqαsuc : _
+    eqαsuc x y x≺y = x≺y
+
+·IdR : (α : Ord {})  α · 𝟙 {}  α
+·IdR α = equivFun (WosetPath _ _) (eq , makeIsWosetEquiv eq eqα𝟙 eqα)
+  where
+    eq :  α  ×  𝟙    α 
+    eq = isoToEquiv rUnit*×Iso
+
+    eqα𝟙 : _
+    eqα𝟙 (x , _) (y , _) (inl tt≺tt) = ⊥.rec (IsStrictPoset.is-irrefl
+                                                (isWoset→isStrictPoset
+                                                   (WosetStr.isWoset (str 𝟙)))
+                                               tt* tt≺tt)
+    eqα𝟙 (x , _) (y , _) (inr (_ , x≺y)) = x≺y
+
+    eqα : _
+    eqα x y x≺y = inr ((isPropUnit* _ _) , x≺y)
+
+·IdL : (α : Ord {})  𝟙 {} · α  α
+·IdL α = equivFun (WosetPath _ _) (eq , makeIsWosetEquiv eq eq𝟙α eqα)
+  where
+    eq :  𝟙  ×  α    α 
+    eq = isoToEquiv lUnit*×Iso
+
+    eq𝟙α : _
+    eq𝟙α (_ , x) (_ , y) (inr (_ , tt≺tt)) = ⊥.rec
+                                               (IsStrictPoset.is-irrefl
+                                                (isWoset→isStrictPoset
+                                                  (WosetStr.isWoset (str 𝟙)))
+                                                tt* tt≺tt)
+    eq𝟙α (_ , x) (_ , y) (inl x≺y) = x≺y
+
+    eqα : _
+    eqα x y x≺y = inl x≺y
+
+·AnnihilR : (α : Ord {})  α · 𝟘 {}  𝟘 {}
+·AnnihilR α = equivFun (WosetPath _ _)
+                       (eq , makeIsWosetEquiv eq  b _ _  ⊥.elim* (b .snd)) ⊥.elim*)
+  where
+    eq :  α  ×  𝟘    𝟘 
+    eq = (⊥.elim*  snd) , (record { equiv-proof = ⊥.elim* })
+
+·AnnihilL : (α : Ord {})  𝟘 {} · α  𝟘 {}
+·AnnihilL α = equivFun (WosetPath _ _)
+                       (eq , makeIsWosetEquiv eq  b _ _  ⊥.elim* (b .fst)) ⊥.elim*)
+  where
+    eq :  𝟘  ×  α    𝟘 
+    eq = (⊥.elim*  fst) , (record { equiv-proof = ⊥.elim*  })
+
++Assoc : (α β γ : Ord {})  (α + β) + γ  α + (β + γ)
++Assoc α β γ = equivFun (WosetPath _ _) (eq , makeIsWosetEquiv eq eq→ eq←)
+  where
+    eq : ( α    β )   γ    α   ( β    γ )
+    eq = ⊎-assoc-≃
+
+    eq→ : _
+    eq→ (inl (inl x)) (inl (inl y)) x≺y = x≺y
+    eq→ (inl (inl x)) (inl (inr y)) x≺y = tt*
+    eq→ (inl (inr x)) (inl (inl y)) = ⊥.elim*
+    eq→ (inl (inr x)) (inl (inr y)) x≺y = x≺y
+    eq→ (inl (inl x)) (inr y) x≺y = tt*
+    eq→ (inl (inr x)) (inr y) x≺y = tt*
+    eq→ (inr x) (inl (inl y)) = ⊥.elim*
+    eq→ (inr x) (inl (inr y)) = ⊥.elim*
+    eq→ (inr x) (inr y) x≺y = x≺y
+
+    eq← : _
+    eq← (inl x) (inl y) x≺y = x≺y
+    eq← (inl x) (inr (inl y)) x≺y = tt*
+    eq← (inl x) (inr (inr y)) x≺y = tt*
+    eq← (inr (inl x)) (inl y) = ⊥.elim*
+    eq← (inr (inr x)) (inl y) = ⊥.elim*
+    eq← (inr (inl x)) (inr (inl y)) x≺y = x≺y
+    eq← (inr (inl x)) (inr (inr y)) x≺y = tt*
+    eq← (inr (inr x)) (inr (inl y)) = ⊥.elim*
+    eq← (inr (inr x)) (inr (inr y)) x≺y = x≺y
+
+·Assoc : (α β γ : Ord {})  (α · β) · γ  α · (β · γ)
+·Assoc α β γ = equivFun (WosetPath _ _) (eq , makeIsWosetEquiv eq eq→ eq←)
+  where
+    eq : ( α  ×  β ) ×  γ    α  × ( β  ×  γ )
+    eq = Σ-assoc-≃
+
+    eq→ : _
+    eq→ ((xa , xb) , xc) ((ya , yb) , yc) (inl xc≺yc)
+      = inl (inl xc≺yc)
+    eq→ ((xa , xb) , xc) ((ya , yb) , yc) (inr (xc≡yc , inl xb≺yb))
+      = inl (inr (xc≡yc , xb≺yb))
+    eq→ ((xa , xb) , xc) ((ya , yb) , yc) (inr (xc≡yc , inr (xb≡yb , xa≺ya)))
+      = inr ((≡-× xb≡yb xc≡yc) , xa≺ya)
+
+    eq← : _
+    eq← (xa , xb , xc) (ya , yb , yc) (inl (inl xc≺yc))
+      = inl xc≺yc
+    eq← (xa , xb , xc) (ya , yb , yc) (inl (inr (xc≡yc , xb≺yb)))
+      = inr (xc≡yc , (inl xb≺yb))
+    eq← (xa , xb , xc) (ya , yb , yc) (inr (xbxc≡ybyc , xa≺ya))
+      = inr ((PathPΣ xbxc≡ybyc .snd) , (inr ((PathPΣ xbxc≡ybyc .fst) , xa≺ya)))
+
+≺-o+ : {β γ : Ord {}}  (α : Ord {})  β  γ  (α + β)  (α + γ)
+≺-o+ {} {β} {γ} α (g , γ↓g≃β , wEq) = inr g , eq , makeIsWosetEquiv eq eq→ eq←
+  where
+    fun :  (α + γ)  inr g    α + β 
+    fun (inl x , _) = inl x
+    fun (inr x , p) = inr (equivFun γ↓g≃β (x , p))
+
+    inv :  α + β    (α + γ)  inr g 
+    inv (inl x) = inl x , tt*
+    inv (inr x) = inr (invEq γ↓g≃β x .fst) , invEq γ↓g≃β x .snd
+
+    is : Iso  (α + γ)  inr g   α + β 
+    Iso.fun is = fun
+    Iso.inv is = inv
+    Iso.rightInv is (inl x) = refl
+    Iso.rightInv is (inr x) = cong inr (secEq γ↓g≃β x)
+    Iso.leftInv  is (inl x , _) = ΣPathP (refl , (isPropUnit* _ _))
+    Iso.leftInv  is (inr x , x≺g)
+      = ΣPathP (cong inr (PathPΣ (retEq γ↓g≃β (x , x≺g)) .fst)
+                        , PathPΣ (retEq γ↓g≃β (x , x≺g)) .snd)
+
+    eq : _
+    eq = isoToEquiv is
+
+    eq→ : _
+    eq→ (inl x , _) (inl y , _) x≺y = x≺y
+    eq→ (inl x , _) (inr y , _) _ = tt*
+    eq→ (inr x , x≺g) (inl y , y≺g) = ⊥.elim*
+    eq→ (inr x , x≺g) (inr y , y≺g) x≺y
+      = equivFun (IsWosetEquiv.pres≺ wEq (x , x≺g) (y , y≺g)) x≺y
+
+    eq← : _
+    eq← (inl x) (inl y) x≺y = x≺y
+    eq← (inl x) (inr y) _ = tt*
+    eq← (inr x) (inl y) = ⊥.elim*
+    eq← (inr x) (inr y) x≺y = equivFun (IsWosetEquiv.pres≺⁻ wEq x y) x≺y
+
+·DistR+ : (α β γ : Ord {})  α · (β + γ)  (α · β) + (α · γ)
+·DistR+ α β γ = equivFun (WosetPath _ _) (eq , makeIsWosetEquiv eq eq→ eq←)
+  where
+    eq :  α  × ( β    γ )  ( α  ×  β )  ( α  ×  γ )
+    eq = isoToEquiv ×DistR⊎Iso
+
+    eq→ : _
+    eq→ (xa , inl xb) (ya , inl yb) (inl xg≺yg) = inl xg≺yg
+    eq→ (xa , inl xb) (ya , inl yb) (inr (xb≡yb , xa≺ya))
+      = inr (isEmbedding→Inj isEmbedding-inl xb yb xb≡yb , xa≺ya)
+    eq→ (xa , inl xb) (ya , inr yg) (inl x≺y) = x≺y
+    eq→ (xa , inl xb) (ya , inr yg) (inr (xb≡yg , _)) = ⊥.rec* (⊎Path.encode _ _ xb≡yg)
+    eq→ (xa , inr xg) (ya , inl yb) (inr (xg≡yb , _)) = ⊥.rec* (⊎Path.encode _ _ xg≡yb)
+    eq→ (xa , inr xg) (ya , inr yg) (inl xg≺yg) = inl xg≺yg
+    eq→ (xa , inr xg) (ya , inr yg) (inr (xg≡yg , xa≺ya))
+      = inr (isEmbedding→Inj isEmbedding-inr xg yg xg≡yg , xa≺ya)
+
+    eq← : _
+    eq← (inl (xa , xb)) (inl (ya , yb)) (inl xb≺yb) = inl xb≺yb
+    eq← (inl (xa , xb)) (inl (ya , yb)) (inr (xb≡yb , xa≺ya))
+      = inr (cong inl xb≡yb , xa≺ya)
+    eq← (inl (xa , xb)) (inr (ya , yg)) _ = inl tt*
+    eq← (inr x) (inl (ya , yb)) = ⊥.elim*
+    eq← (inr xg) (inr yg) (inl xg≺yg) = inl xg≺yg
+    eq← (inr (xa , xg)) (inr (ya , yg)) (inr (xg≡yg , xa≺ya))
+      = inr (cong inr xg≡yg , xa≺ya)
+
\ No newline at end of file diff --git a/Cubical.Data.Ordinal.html b/Cubical.Data.Ordinal.html new file mode 100644 index 0000000000..541cfc906f --- /dev/null +++ b/Cubical.Data.Ordinal.html @@ -0,0 +1,7 @@ + +Cubical.Data.Ordinal
{-# OPTIONS --safe #-}
+module Cubical.Data.Ordinal where
+
+open import Cubical.Data.Ordinal.Base public
+open import Cubical.Data.Ordinal.Properties public
+
\ No newline at end of file diff --git a/Cubical.Data.Rationals.Base.html b/Cubical.Data.Rationals.Base.html index af91b41206..381ccd4935 100644 --- a/Cubical.Data.Rationals.Base.html +++ b/Cubical.Data.Rationals.Base.html @@ -16,7 +16,7 @@ open import Cubical.Relation.Nullary open import Cubical.Relation.Binary.Base -open BinaryRelation +open BinaryRelation ℕ₊₁→ℤ : ℕ₊₁ ℕ₊₁→ℤ n = pos (ℕ₊₁→ℕ n) @@ -38,10 +38,10 @@ [ a / b ] = [ a , b ] -isEquivRel∼ : isEquivRel _∼_ -isEquivRel.reflexive isEquivRel∼ (a , b) = refl -isEquivRel.symmetric isEquivRel∼ (a , b) (c , d) = sym -isEquivRel.transitive isEquivRel∼ (a , b) (c , d) (e , f) p q = ·rCancel _ _ (e · pos (ℕ.suc (ℕ₊₁.n b))) r (ℕ.snotz injPos) +isEquivRel∼ : isEquivRel _∼_ +isEquivRel.reflexive isEquivRel∼ (a , b) = refl +isEquivRel.symmetric isEquivRel∼ (a , b) (c , d) = sym +isEquivRel.transitive isEquivRel∼ (a , b) (c , d) (e , f) p q = ·rCancel _ _ (e · pos (ℕ.suc (ℕ₊₁.n b))) r (ℕ.snotz injPos) where r = (a · ℕ₊₁→ℤ f) · ℕ₊₁→ℤ d ≡[ i ]⟨ ·Comm a (ℕ₊₁→ℤ f) i · ℕ₊₁→ℤ d (ℕ₊₁→ℤ f · a) · ℕ₊₁→ℤ d ≡⟨ sym (·Assoc (ℕ₊₁→ℤ f) a (ℕ₊₁→ℤ d)) ℕ₊₁→ℤ f · (a · ℕ₊₁→ℤ d) ≡[ i ]⟨ ℕ₊₁→ℤ f · p i diff --git a/Cubical.Data.Rationals.MoreRationals.QuoQ.Base.html b/Cubical.Data.Rationals.MoreRationals.QuoQ.Base.html index 3988d8a2b5..d1007a27d2 100644 --- a/Cubical.Data.Rationals.MoreRationals.QuoQ.Base.html +++ b/Cubical.Data.Rationals.MoreRationals.QuoQ.Base.html @@ -15,7 +15,7 @@ open import Cubical.Relation.Nullary open import Cubical.Relation.Binary.Base -open BinaryRelation +open BinaryRelation ℕ₊₁→ℤ : ℕ₊₁ ℕ₊₁→ℤ n = pos (ℕ₊₁→ℕ n) @@ -41,10 +41,10 @@ [ a / b ] = [ a , b ] -isEquivRel∼ : isEquivRel _∼_ -isEquivRel.reflexive isEquivRel∼ (a , b) = refl -isEquivRel.symmetric isEquivRel∼ (a , b) (c , d) = sym -isEquivRel.transitive isEquivRel∼ (a , b) (c , d) (e , f) p q = ·-injʳ _ _ _ r +isEquivRel∼ : isEquivRel _∼_ +isEquivRel.reflexive isEquivRel∼ (a , b) = refl +isEquivRel.symmetric isEquivRel∼ (a , b) (c , d) = sym +isEquivRel.transitive isEquivRel∼ (a , b) (c , d) (e , f) p q = ·-injʳ _ _ _ r where r = (a · ℕ₊₁→ℤ f) · ℕ₊₁→ℤ d ≡[ i ]⟨ ·-comm a (ℕ₊₁→ℤ f) i · ℕ₊₁→ℤ d (ℕ₊₁→ℤ f · a) · ℕ₊₁→ℤ d ≡⟨ sym (·-assoc (ℕ₊₁→ℤ f) a (ℕ₊₁→ℤ d)) ℕ₊₁→ℤ f · (a · ℕ₊₁→ℤ d) ≡[ i ]⟨ ℕ₊₁→ℤ f · p i diff --git a/Cubical.Data.Rationals.Order.html b/Cubical.Data.Rationals.Order.html index dc247d56b0..98b1ff9f8f 100644 --- a/Cubical.Data.Rationals.Order.html +++ b/Cubical.Data.Rationals.Order.html @@ -166,27 +166,27 @@ gt : m > n Trichotomy m n module _ where - open BinaryRelation + open BinaryRelation - isProp≤ : isPropValued _≤_ + isProp≤ : isPropValued _≤_ isProp≤ m n = snd (m ≤' n) - isProp< : isPropValued _<_ + isProp< : isPropValued _<_ isProp< m n = snd (m <' n) - isRefl≤ : isRefl _≤_ + isRefl≤ : isRefl _≤_ isRefl≤ = elimProp {P = λ x x x} x isProp≤ x x) λ _ ℤ.isRefl≤ - isIrrefl< : isIrrefl _<_ + isIrrefl< : isIrrefl _<_ isIrrefl< = elimProp {P = λ x ¬ x < x} _ isProp¬ _) λ _ ℤ.isIrrefl< - isAntisym≤ : isAntisym _≤_ + isAntisym≤ : isAntisym _≤_ isAntisym≤ = elimProp2 {P = λ a b a b b a a b} x y isPropΠ2 λ _ _ isSetℚ x y) λ a b a≤b b≤a eq/ a b (ℤ.isAntisym≤ a≤b b≤a) - isTrans≤ : isTrans _≤_ + isTrans≤ : isTrans _≤_ isTrans≤ = elimProp3 {P = λ a b c a b b c a c} x _ z isPropΠ2 λ _ _ isProp≤ x z) @@ -200,7 +200,7 @@ (·CommR e (ℕ₊₁→ℤ d) (ℕ₊₁→ℤ b)) (ℤ.≤-·o {k = ℕ₊₁→ℕ b} cf≤ed)))) } - isTrans< : isTrans _<_ + isTrans< : isTrans _<_ isTrans< = elimProp3 {P = λ a b c a < b b < c a < c} x _ z isPropΠ2 λ _ _ isProp< x z) @@ -214,10 +214,10 @@ (·CommR e (ℕ₊₁→ℤ d) (ℕ₊₁→ℤ b)) (ℤ.<-·o {k = -1+ b} cf<ed)))) } - isAsym< : isAsym _<_ - isAsym< = isIrrefl×isTrans→isAsym _<_ (isIrrefl< , isTrans<) + isAsym< : isAsym _<_ + isAsym< = isIrrefl×isTrans→isAsym _<_ (isIrrefl< , isTrans<) - isStronglyConnected≤ : isStronglyConnected _≤_ + isStronglyConnected≤ : isStronglyConnected _≤_ isStronglyConnected≤ = elimProp2 {P = λ a b (a b) ⊔′ (b a)} _ _ isPropPropTrunc) @@ -229,7 +229,7 @@ ... | ℤ.eq ad≡cb = inl (0 , ad≡cb) ... | ℤ.gt cb<ad = inr (ℤ.<-weaken cb<ad) - isConnected< : isConnected _<_ + isConnected< : isConnected _<_ isConnected< = elimProp2 {P = λ a b ¬ a b (a < b) ⊔′ (b < a)} _ _ isProp→ isPropPropTrunc) @@ -242,7 +242,7 @@ ... | ℤ.eq ad≡cb = ⊥.rec (¬a≡b (eq/ (a , b) (c , d) ad≡cb)) ... | ℤ.gt cb<ad = inr cb<ad - isWeaklyLinear< : isWeaklyLinear _<_ + isWeaklyLinear< : isWeaklyLinear _<_ isWeaklyLinear< = elimProp3 {P = λ a b c a < b (a < c) ⊔′ (c < b)} _ _ _ isProp→ isPropPropTrunc) @@ -255,18 +255,18 @@ c<a isTrans< [ c ] [ a ] [ b ] c<a a<b)) (isConnected< [ a ] [ c ] a≢c) - isProp# : isPropValued _#_ + isProp# : isPropValued _#_ isProp# x y = isProp⊎ (isProp< x y) (isProp< y x) (isAsym< x y) - isIrrefl# : isIrrefl _#_ + isIrrefl# : isIrrefl _#_ isIrrefl# x (inl x<x) = isIrrefl< x x<x isIrrefl# x (inr x<x) = isIrrefl< x x<x - isSym# : isSym _#_ + isSym# : isSym _#_ isSym# _ _ (inl x<y) = inr x<y isSym# _ _ (inr y<x) = inl y<x - isCotrans# : isCotrans _#_ + isCotrans# : isCotrans _#_ isCotrans# = elimProp3 {P = λ a b c a # b (a # c) ⊔′ (b # c)} _ _ _ isProp→ isPropPropTrunc) @@ -277,7 +277,7 @@ ... | yes b≡c = inl (subst ([ a ] #_) b≡c a#b) ∣₁ ... | no b≢c = ∥₁.map inr (isConnected< [ b ] [ c ] b≢c) - inequalityImplies# : inequalityImplies _#_ + inequalityImplies# : inequalityImplies _#_ inequalityImplies# a b = ∥₁.rec (isProp# a b) a#b a#b) (isConnected< a b) ≤-+o : m n o m n m ℚ.+ o n ℚ.+ o diff --git a/Cubical.Data.Sum.Properties.html b/Cubical.Data.Sum.Properties.html index 4e5967de1d..afa62e0093 100644 --- a/Cubical.Data.Sum.Properties.html +++ b/Cubical.Data.Sum.Properties.html @@ -223,15 +223,15 @@ leftInv Σ⊎Iso (inl a , ea) = refl leftInv Σ⊎Iso (inr b , eb) = refl -×DistL⊎Iso : Iso (A × (B C)) ((A × B) (A × C)) -fun ×DistL⊎Iso (a , inl b) = inl (a , b) -fun ×DistL⊎Iso (a , inr c) = inr (a , c) -inv ×DistL⊎Iso (inl (a , b)) = a , inl b -inv ×DistL⊎Iso (inr (a , c)) = a , inr c -rightInv ×DistL⊎Iso (inl (a , b)) = refl -rightInv ×DistL⊎Iso (inr (a , c)) = refl -leftInv ×DistL⊎Iso (a , inl b) = refl -leftInv ×DistL⊎Iso (a , inr c) = refl +×DistR⊎Iso : Iso (A × (B C)) ((A × B) (A × C)) +fun ×DistR⊎Iso (a , inl b) = inl (a , b) +fun ×DistR⊎Iso (a , inr c) = inr (a , c) +inv ×DistR⊎Iso (inl (a , b)) = a , inl b +inv ×DistR⊎Iso (inr (a , c)) = a , inr c +rightInv ×DistR⊎Iso (inl (a , b)) = refl +rightInv ×DistR⊎Iso (inr (a , c)) = refl +leftInv ×DistR⊎Iso (a , inl b) = refl +leftInv ×DistR⊎Iso (a , inr c) = refl Π⊎≃ : ((x : A B) E x) ((a : A) E (inl a)) × ((b : B) E (inr b)) Π⊎≃ = isoToEquiv Π⊎Iso diff --git a/Cubical.Displayed.Base.html b/Cubical.Displayed.Base.html index b7fc1e16db..db0daec0c3 100644 --- a/Cubical.Displayed.Base.html +++ b/Cubical.Displayed.Base.html @@ -38,13 +38,13 @@ ρ : (a : A) a a ρ a = ≡→≅ refl -open BinaryRelation +open BinaryRelation -- another constructor for UARel using contractibility of relational singletons make-𝒮 : {A : Type ℓA} {_≅_ : A A Type ℓ≅A} - (ρ : isRefl _≅_) (contrTotal : contrRelSingl _≅_) UARel A ℓ≅A + (ρ : isRefl _≅_) (contrTotal : contrRelSingl _≅_) UARel A ℓ≅A UARel._≅_ (make-𝒮 {_≅_ = _≅_} _ _) = _≅_ -UARel.ua (make-𝒮 {_≅_ = _≅_} ρ c) = contrRelSingl→isUnivalent _≅_ ρ c +UARel.ua (make-𝒮 {_≅_ = _≅_} ρ c) = contrRelSingl→isUnivalent _≅_ ρ c record DUARel {A : Type ℓA} (𝒮-A : UARel A ℓ≅A) (B : A Type ℓB) (ℓ≅B : Level) : Type (ℓ-max (ℓ-max ℓA ℓB) (ℓ-max ℓ≅A (ℓ-suc ℓ≅B))) where @@ -56,7 +56,7 @@ _≅ᴰ⟨_⟩_ : {a a' : A} B a a a' B a' Type ℓ≅B uaᴰ : {a a' : A} (b : B a) (p : a a') (b' : B a') (b ≅ᴰ⟨ p b') PathP i B (≅→≡ p i)) b b' - fiberRel : (a : A) Rel (B a) (B a) ℓ≅B + fiberRel : (a : A) Rel (B a) (B a) ℓ≅B fiberRel a = _≅ᴰ⟨ ρ a ⟩_ uaᴰρ : {a : A} (b b' : B a) b ≅ᴰ⟨ ρ a b' (b b') diff --git a/Cubical.Displayed.Properties.html b/Cubical.Displayed.Properties.html index e1838c7ada..ed52540169 100644 --- a/Cubical.Displayed.Properties.html +++ b/Cubical.Displayed.Properties.html @@ -12,7 +12,7 @@ open import Cubical.Data.Sigma open import Cubical.Relation.Binary -open BinaryRelation +open BinaryRelation open import Cubical.Displayed.Base @@ -81,19 +81,19 @@ -- constructor that reduces univalence further to contractibility of relational singletons - 𝒮ᴰ-make-2 : (ρᴰ : {a : A} isRefl _≅ᴰ⟨ ρ a ⟩_) - (contrTotal : (a : A) contrRelSingl _≅ᴰ⟨ ρ a ⟩_) + 𝒮ᴰ-make-2 : (ρᴰ : {a : A} isRefl _≅ᴰ⟨ ρ a ⟩_) + (contrTotal : (a : A) contrRelSingl _≅ᴰ⟨ ρ a ⟩_) DUARel 𝒮-A B ℓ≅B - 𝒮ᴰ-make-2 ρᴰ contrTotal = 𝒮ᴰ-make-1 (contrRelSingl→isUnivalent _ ρᴰ (contrTotal _)) + 𝒮ᴰ-make-2 ρᴰ contrTotal = 𝒮ᴰ-make-1 (contrRelSingl→isUnivalent _ ρᴰ (contrTotal _)) -- relational isomorphisms 𝒮-iso→iso : {A : Type ℓA} (𝒮-A : UARel A ℓ≅A) {B : Type ℓB} (𝒮-B : UARel B ℓ≅B) - (F : RelIso (UARel._≅_ 𝒮-A) (UARel._≅_ 𝒮-B)) + (F : RelIso (UARel._≅_ 𝒮-A) (UARel._≅_ 𝒮-B)) Iso A B 𝒮-iso→iso 𝒮-A 𝒮-B F - = RelIso→Iso (UARel._≅_ 𝒮-A) + = RelIso→Iso (UARel._≅_ 𝒮-A) (UARel._≅_ 𝒮-B) (UARel.≅→≡ 𝒮-A) (UARel.≅→≡ 𝒮-B) @@ -123,14 +123,14 @@ -- the following can of course be done slightly more generally -- for fiberwise binary relations - F*fiberRelB' : (a : A) Rel (B' (f a)) (B' (f a)) ℓ≅B' + F*fiberRelB' : (a : A) Rel (B' (f a)) (B' (f a)) ℓ≅B' F*fiberRelB' a = fiberRelB' (f a) - module _ (G : (a : A) RelIso (fiberRelB a) (F*fiberRelB' a)) where + module _ (G : (a : A) RelIso (fiberRelB a) (F*fiberRelB' a)) where private fiberIsoOver : (a : A) Iso (B a) (B' (f a)) fiberIsoOver a - = RelIso→Iso (fiberRelB a) + = RelIso→Iso (fiberRelB a) (F*fiberRelB' a) (equivFun (uaᴰρB _ _)) (equivFun (uaᴰρB' _ _)) diff --git a/Cubical.Experiments.Combinatorics.html b/Cubical.Experiments.Combinatorics.html index 1ed7361021..31e521a8ae 100644 --- a/Cubical.Experiments.Combinatorics.html +++ b/Cubical.Experiments.Combinatorics.html @@ -95,13 +95,13 @@ isDecR : {n : } (x y : Fin n .fst) isDecProp (R {n = n} x y) isDecR _ _ = true , idEquiv _ -open BinaryRelation -open isEquivRel +open BinaryRelation +open isEquivRel -isEquivRelR : {n : } isEquivRel (R {n = n}) -isEquivRelR {n = n} .reflexive _ = tt -isEquivRelR {n = n} .symmetric _ _ tt = tt -isEquivRelR {n = n} .transitive _ _ _ tt tt = tt +isEquivRelR : {n : } isEquivRel (R {n = n}) +isEquivRelR {n = n} .reflexive _ = tt +isEquivRelR {n = n} .symmetric _ _ tt = tt +isEquivRelR {n = n} .transitive _ _ _ tt tt = tt collapsed : (n : ) FinSet ℓ-zero collapsed n = _ , isFinSetQuot (Fin n) R isEquivRelR isDecR diff --git a/Cubical.Experiments.ZCohomologyOld.Properties.html b/Cubical.Experiments.ZCohomologyOld.Properties.html index efcd44bed5..e59cf31238 100644 --- a/Cubical.Experiments.ZCohomologyOld.Properties.html +++ b/Cubical.Experiments.ZCohomologyOld.Properties.html @@ -17,7 +17,7 @@ open import Cubical.Data.Sigma hiding (_×_) open import Cubical.HITs.Susp open import Cubical.HITs.Wedge -open import Cubical.HITs.SetTruncation renaming (rec to sRec ; rec2 to sRec2 ; elim to sElim ; elim2 to sElim2 ; isSetSetTrunc to §) +open import Cubical.HITs.SetTruncation renaming (rec to sRec ; rec2 to sRec2 ; elim to sElim ; elim2 to sElim2 ; isSetSetTrunc to §) open import Cubical.Data.Int renaming (_+_ to _ℤ+_) hiding (-_) open import Cubical.Data.Nat open import Cubical.HITs.Truncation renaming (elim to trElim ; map to trMap ; rec to trRec ; elim3 to trElim3) hiding (map2) @@ -378,7 +378,7 @@ λ a i funExt x lCancelₖ n (a x)) i ∣₂ assocₕ : (n : ) (x y z : coHom n A) ((x +[ n ]ₕ y) +[ n ]ₕ z) (x +[ n ]ₕ (y +[ n ]ₕ z)) -assocₕ n = elim3 _ _ _ isOfHLevelPath 1 (§ _ _)) +assocₕ n = elim3 _ _ _ isOfHLevelPath 1 (§ _ _)) λ a b c i funExt x assocₖ n (a x) (b x) (c x)) i ∣₂ commₕ : (n : ) (x y : coHom n A) (x +[ n ]ₕ y) (y +[ n ]ₕ x) @@ -610,7 +610,7 @@ λ a i funExt x lCancelK n (a x)) i ∣₂ assocH : (n : ) (x y z : coHom n A) (+H n (+H n x y) z) (+H n x (+H n y z)) - assocH n = elim3 _ _ _ isOfHLevelPath 1 (§ _ _)) + assocH n = elim3 _ _ _ isOfHLevelPath 1 (§ _ _)) λ a b c i funExt x assocK n (a x) (b x) (c x)) i ∣₂ commH : (n : ) (x y : coHom n A) (+H n x y) (+H n y x) diff --git a/Cubical.Experiments.ZariskiLatticeBasicOpens.html b/Cubical.Experiments.ZariskiLatticeBasicOpens.html index 55ed81c22a..97bd647a75 100644 --- a/Cubical.Experiments.ZariskiLatticeBasicOpens.html +++ b/Cubical.Experiments.ZariskiLatticeBasicOpens.html @@ -42,8 +42,8 @@ open import Cubical.HITs.PropositionalTruncation as PT open Iso -open BinaryRelation -open isEquivRel +open BinaryRelation +open isEquivRel private variable @@ -72,10 +72,10 @@ x y = ∃[ n ] Σ[ z A ] x ^ n z ·r y -- rad(x) ⊆ rad(y) -- ≼ is a pre-order: - Refl≼ : isRefl _≼_ + Refl≼ : isRefl _≼_ Refl≼ x = PT.∣ 1 , 1r , ·r-comm _ _ ∣₁ - Trans≼ : isTrans _≼_ + Trans≼ : isTrans _≼_ Trans≼ x y z = map2 Trans≼Σ where Trans≼Σ : Σ[ n ] Σ[ a A ] x ^ n a ·r y @@ -95,13 +95,13 @@ R : A A Type R x y = x y × y x -- rad(x) ≡ rad(y) - RequivRel : isEquivRel R - RequivRel .reflexive x = Refl≼ x , Refl≼ x - RequivRel .symmetric _ _ Rxy = (Rxy .snd) , (Rxy .fst) - RequivRel .transitive _ _ _ Rxy Ryz = Trans≼ _ _ _ (Rxy .fst) (Ryz .fst) + RequivRel : isEquivRel R + RequivRel .reflexive x = Refl≼ x , Refl≼ x + RequivRel .symmetric _ _ Rxy = (Rxy .snd) , (Rxy .fst) + RequivRel .transitive _ _ _ Rxy Ryz = Trans≼ _ _ _ (Rxy .fst) (Ryz .fst) , Trans≼ _ _ _ (Ryz .snd) (Rxy .snd) - RpropValued : isPropValued R + RpropValued : isPropValued R RpropValued x y = isProp× isPropPropTrunc isPropPropTrunc powerIs≽ : (x a : A) x [ a ⁿ|n≥0] a x @@ -159,8 +159,8 @@ -- Multiplication lifts to the quotient and corresponds to intersection -- of basic opens, i.e. we get a meet-semilattice with: _∧/_ : A / R A / R A / R - _∧/_ = setQuotSymmBinOp (RequivRel .reflexive) (RequivRel .transitive) _·r_ - a b subst x R (a ·r b) x) (·r-comm a b) (RequivRel .reflexive (a ·r b))) ·r-lcoh + _∧/_ = setQuotSymmBinOp (RequivRel .reflexive) (RequivRel .transitive) _·r_ + a b subst x R (a ·r b) x) (·r-comm a b) (RequivRel .reflexive (a ·r b))) ·r-lcoh where ·r-lcoh-≼ : (x y z : A) x y (x ·r z) (y ·r z) ·r-lcoh-≼ x y z = map ·r-lcoh-≼Σ diff --git a/Cubical.Foundations.RelationalStructure.html b/Cubical.Foundations.RelationalStructure.html index 0a688f0009..d3c2d5db76 100644 --- a/Cubical.Foundations.RelationalStructure.html +++ b/Cubical.Foundations.RelationalStructure.html @@ -20,8 +20,8 @@ open import Cubical.Relation.Binary.Base open import Cubical.Relation.ZigZag.Base -open BinaryRelation -open isEquivRel +open BinaryRelation +open isEquivRel open isQuasiEquivRel private @@ -31,45 +31,45 @@ -- A notion of structured relation for a structure S assigns a relation on S X and S Y to every relation on X -- and Y. We require the output to be proposition-valued when the input is proposition-valued. StrRel : (S : Type Type ℓ') (ℓ'' : Level) Type (ℓ-max (ℓ-suc (ℓ-max ℓ'')) ℓ') -StrRel { = } S ℓ'' = {A B} (R : Rel A B ) Rel (S A) (S B) ℓ'' +StrRel { = } S ℓ'' = {A B} (R : Rel A B ) Rel (S A) (S B) ℓ'' -- Given a type A and relation R, a quotient structure is a structure on the set quotient A/R such that -- the graph of [_] : A → A/R is a structured relation InducedQuotientStr : (S : Type Type ℓ') (ρ : StrRel S ℓ'') - (A : TypeWithStr S) (R : Rel (typ A) (typ A) ) + (A : TypeWithStr S) (R : Rel (typ A) (typ A) ) Type (ℓ-max ℓ' ℓ'') InducedQuotientStr S ρ A R = - Σ[ s S (typ A / R) ] ρ (graphRel [_]) (A .snd) s + Σ[ s S (typ A / R) ] ρ (graphRel [_]) (A .snd) s -- A structured equivalence relation R on a structured type A should induce a structure on A/R InducesQuotientStr : (S : Type Type ℓ') (ρ : StrRel S ℓ'') Type _ InducesQuotientStr { = } S ρ = - (A : TypeWithStr S) (R : EquivPropRel (typ A) ) + (A : TypeWithStr S) (R : EquivPropRel (typ A) ) ρ (R .fst .fst) (A .snd) (A .snd) - ∃![ s S (typ A / R .fst .fst) ] ρ (graphRel [_]) (A .snd) s + ∃![ s S (typ A / R .fst .fst) ] ρ (graphRel [_]) (A .snd) s -- The identity should be a structured relation isReflexiveStrRel : {S : Type Type ℓ'} (ρ : StrRel S ℓ'') Type _ isReflexiveStrRel { = } {S = S} ρ = - {X : Type } (s : S X) ρ (idPropRel X .fst) s s + {X : Type } (s : S X) ρ (idPropRel X .fst) s s -- The inverse of a structured relation should be structured isSymmetricStrRel : {S : Type Type ℓ'} (ρ : StrRel S ℓ'') Type _ isSymmetricStrRel { = } {S = S} ρ = - {X Y : Type } (R : PropRel X Y ) + {X Y : Type } (R : PropRel X Y ) {sx : S X} {sy : S Y} ρ (R .fst) sx sy - ρ (invPropRel R .fst) sy sx + ρ (invPropRel R .fst) sy sx -- The composite of structured relations should be structured isTransitiveStrRel : {S : Type Type ℓ'} (ρ : StrRel S ℓ'') Type _ isTransitiveStrRel { = } {S = S} ρ = {X Y Z : Type } - (R : PropRel X Y ) (R' : PropRel Y Z ) + (R : PropRel X Y ) (R' : PropRel Y Z ) {sx : S X} {sy : S Y} {sz : S Z} ρ (R .fst) sx sy ρ (R' .fst) sy sz - ρ (compPropRel R R' .fst) sx sz + ρ (compPropRel R R' .fst) sx sz -- The type of structures on a set should be a set preservesSetsStr : (S : Type Type ℓ') Type (ℓ-max (ℓ-suc ) ℓ') @@ -78,7 +78,7 @@ -- The type of structures on a prop-valued relation should be a prop preservesPropsStrRel : {S : Type Type ℓ'} (ρ : StrRel S ℓ'') Type _ preservesPropsStrRel { = } {S = S} ρ = - {X Y : Type } {R : Rel X Y } + {X Y : Type } {R : Rel X Y } (∀ x y isProp (R x y)) (sx : S X) (sy : S Y) isProp (ρ R sx sy) @@ -94,7 +94,7 @@ open SuitableStrRel public -quotientPropRel : {} {A : Type } (R : Rel A A ) PropRel A (A / R) +quotientPropRel : {} {A : Type } (R : Rel A A ) PropRel A (A / R) quotientPropRel R .fst a t = [ a ] t quotientPropRel R .snd _ _ = squash/ _ _ @@ -104,16 +104,16 @@ StrRel S ℓ'' StrEquiv S ℓ''' Type _ StrRelMatchesEquiv {S = S} ρ ι = (A B : TypeWithStr _ S) (e : typ A typ B) - ρ (graphRel (e .fst)) (A .snd) (B .snd) ι A B e + ρ (graphRel (e .fst)) (A .snd) (B .snd) ι A B e -- Additional conditions for a "positive" notion of structured relation isDetransitiveStrRel : {S : Type Type ℓ'} (ρ : StrRel S ℓ'') Type _ isDetransitiveStrRel { = } {S = S} ρ = {X Y Z : Type } - (R : PropRel X Y ) (R' : PropRel Y Z ) + (R : PropRel X Y ) (R' : PropRel Y Z ) {sx : S X} {sz : S Z} - ρ (compPropRel R R' .fst) sx sz + ρ (compPropRel R R' .fst) sx sz ∃[ sy S Y ] ρ (R .fst) sx sy × ρ (R' .fst) sy sz record StrRelAction {S : Type Type ℓ'} (ρ : StrRel S ℓ'') @@ -131,7 +131,7 @@ strRelQuotientComparison : {S : Type Type ℓ'} {ρ : StrRel S ℓ''} (θ : SuitableStrRel S ρ) (α : StrRelAction ρ) - {X : Type } (R : EquivPropRel X ) + {X : Type } (R : EquivPropRel X ) (S X / ρ (R .fst .fst)) S (X / R .fst .fst) strRelQuotientComparison θ α R [ s ] = α .actStr [_] s strRelQuotientComparison {ρ = ρ} θ α R (eq/ s t r i) = @@ -143,9 +143,9 @@ (funExt₂ λ x x' hPropExt squash₁ (R .fst .snd x x') (Trunc.rec (R .fst .snd x x') - {(_ , r , r') R .snd .transitive _ _ _ r (R .snd .symmetric _ _ r')})) - r x' , r , R .snd .reflexive x' ∣₁)) - (θ .transitive (R .fst) (invPropRel (R .fst)) r (θ .symmetric (R .fst) r)) + {(_ , r , r') R .snd .transitive _ _ _ r (R .snd .symmetric _ _ r')})) + r x' , r , R .snd .reflexive x' ∣₁)) + (θ .transitive (R .fst) (invPropRel (R .fst)) r (θ .symmetric (R .fst) r)) leftEq : θ .quo (_ , s) R ρs .fst .fst α .actStr [_] s leftEq = @@ -153,7 +153,7 @@ (θ .quo (_ , s) R ρs .snd ( α .actStr [_] s , subst - s' ρ (graphRel [_]) s' (α .actStr [_] s)) + s' ρ (graphRel [_]) s' (α .actStr [_] s)) (α .actStrId s) (α .actRel eq/ s s ρs) )) @@ -164,7 +164,7 @@ (θ .quo (_ , s) R ρs .snd ( α .actStr [_] t , subst - s' ρ (graphRel [_]) s' (α .actStr [_] t)) + s' ρ (graphRel [_]) s' (α .actStr [_] t)) (α .actStrId s) (α .actRel eq/ s t r) )) @@ -181,13 +181,13 @@ act : StrRelAction ρ reflexive : isReflexiveStrRel ρ detransitive : isDetransitiveStrRel ρ - quo : {X : Type } (R : EquivPropRel X ) isEquiv (strRelQuotientComparison θ act R) + quo : {X : Type } (R : EquivPropRel X ) isEquiv (strRelQuotientComparison θ act R) open PositiveStrRel public posRelReflexive : {S : Type Type ℓ'} {ρ : StrRel S ℓ''} {θ : SuitableStrRel S ρ} PositiveStrRel θ - {X : Type } (R : EquivPropRel X ) + {X : Type } (R : EquivPropRel X ) (s : S X) ρ (R .fst .fst) s s posRelReflexive {ρ = ρ} σ R s = subst @@ -196,7 +196,7 @@ (σ .act .actRel x y Trunc.rec (R .fst .snd _ _) - p subst (R .fst .fst x) p (R .snd .reflexive x))) + p subst (R .fst .fst x) p (R .snd .reflexive x))) s s (σ .reflexive s)) @@ -214,7 +214,7 @@ field quoᴸ : InducedQuotientStr S ρ A E.Rᴸ quoᴿ : InducedQuotientStr S ρ B E.Rᴿ - rel : ρ (graphRel (E.Thm .fst)) (quoᴸ .fst) (quoᴿ .fst) + rel : ρ (graphRel (E.Thm .fst)) (quoᴸ .fst) (quoᴿ .fst) open QERDescends @@ -225,18 +225,18 @@ QERDescends S ρ A B R structuredQER→structuredEquiv {ρ = ρ} θ (X , s) (Y , t) R r .quoᴸ = θ .quo (X , s) (QER→EquivRel R) - (θ .transitive (R .fst) (invPropRel (R .fst)) r (θ .symmetric (R .fst) r)) + (θ .transitive (R .fst) (invPropRel (R .fst)) r (θ .symmetric (R .fst) r)) .fst structuredQER→structuredEquiv {ρ = ρ} θ (X , s) (Y , t) R r .quoᴿ = θ .quo (Y , t) (QER→EquivRel (invQER R)) - (θ .transitive (invPropRel (R .fst)) (R .fst) (θ .symmetric (R .fst) r) r) + (θ .transitive (invPropRel (R .fst)) (R .fst) (θ .symmetric (R .fst) r) r) .fst structuredQER→structuredEquiv {ρ = ρ} θ (X , s) (Y , t) R r .rel = subst R' ρ R' (quol .fst) (quor .fst)) correction - (θ .transitive (compPropRel (invPropRel (quotientPropRel E.Rᴸ)) (R .fst)) (quotientPropRel E.Rᴿ) - (θ .transitive (invPropRel (quotientPropRel E.Rᴸ)) (R .fst) + (θ .transitive (compPropRel (invPropRel (quotientPropRel E.Rᴸ)) (R .fst)) (quotientPropRel E.Rᴿ) + (θ .transitive (invPropRel (quotientPropRel E.Rᴸ)) (R .fst) (θ .symmetric (quotientPropRel E.Rᴸ) (quol .snd)) r) (quor .snd)) @@ -244,9 +244,9 @@ module E = QER→Equiv R quol = structuredQER→structuredEquiv {ρ = ρ} θ (X , s) (Y , t) R r .quoᴸ quor = structuredQER→structuredEquiv {ρ = ρ} θ (X , s) (Y , t) R r .quoᴿ - [R] = compPropRel (compPropRel (invPropRel (quotientPropRel E.Rᴸ)) (R .fst)) (quotientPropRel E.Rᴿ) + [R] = compPropRel (compPropRel (invPropRel (quotientPropRel E.Rᴸ)) (R .fst)) (quotientPropRel E.Rᴿ) - correction : [R] .fst graphRel (E.Thm .fst) + correction : [R] .fst graphRel (E.Thm .fst) correction = funExt₂ λ qx qy (hPropExt squash₁ (squash/ _ _) diff --git a/Cubical.HITs.Bouquet.FundamentalGroupProof.html b/Cubical.HITs.Bouquet.FundamentalGroupProof.html index 1c5ecf4e8e..f93dd9ce38 100644 --- a/Cubical.HITs.Bouquet.FundamentalGroupProof.html +++ b/Cubical.HITs.Bouquet.FundamentalGroupProof.html @@ -23,7 +23,7 @@ open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.GroupoidLaws renaming (assoc to pathAssoc) -open import Cubical.HITs.SetTruncation hiding (rec2) +open import Cubical.HITs.SetTruncation hiding (rec2) open import Cubical.HITs.PropositionalTruncation hiding (map ; elim) renaming (rec to propRec) open import Cubical.Algebra.Group open import Cubical.Homotopy.Group.Base @@ -78,10 +78,10 @@ π₁Bouquet {A = A} = π 1 (Bouquet∙ A) loopingT : FreeGroupoid A ∥₂ π₁Bouquet -loopingT = map looping +loopingT = map looping windingT : π₁Bouquet FreeGroupoid A ∥₂ -windingT = map winding +windingT = map winding -- Utility proofs @@ -234,7 +234,7 @@ g right-homotopyInTruncatedGroupoid : (g : FreeGroupoid A) winding (looping g) ∣₂ g ∣₂ -right-homotopyInTruncatedGroupoid g = Iso.inv PathIdTrunc₀Iso (truncatedRight-homotopy g) +right-homotopyInTruncatedGroupoid g = Iso.inv PathIdTrunc₀Iso (truncatedRight-homotopy g) -- Truncated encodeDecode over all fibrations @@ -247,25 +247,25 @@ pointwise x = isProp→PathP i squash₁) (f x) (g x) encodeDecodeInTruncatedGroupoid : (x : Bouquet A) (g : code x) encode x (decode x g) ∣₂ g ∣₂ -encodeDecodeInTruncatedGroupoid x g = Iso.inv PathIdTrunc₀Iso (truncatedEncodeDecode x g) +encodeDecodeInTruncatedGroupoid x g = Iso.inv PathIdTrunc₀Iso (truncatedEncodeDecode x g) -- Encode Decode over the truncated versions of the types encodeT : (x : Bouquet A) base x ∥₂ code x ∥₂ -encodeT x = map (encode x) +encodeT x = map (encode x) decodeT : (x : Bouquet A) code x ∥₂ base x ∥₂ -decodeT x = map (decode x) +decodeT x = map (decode x) decodeEncodeT : (x : Bouquet A) (p : base x ∥₂) decodeT x (encodeT x p) p -decodeEncodeT x g = elim sethood induction g where +decodeEncodeT x g = elim sethood induction g where sethood : (q : base x ∥₂) isSet (decodeT x (encodeT x q) q) sethood q = isProp→isSet (squash₂ (decodeT x (encodeT x q)) q) induction : (l : base x) decode x (encode x l) ∣₂ l ∣₂ induction l = cong l' l' ∣₂) (decodeEncode x l) encodeDecodeT : (x : Bouquet A) (g : code x ∥₂) encodeT x (decodeT x g) g -encodeDecodeT x g = elim sethood induction g where +encodeDecodeT x g = elim sethood induction g where sethood : (z : code x ∥₂) isSet (encodeT x (decodeT x z) z) sethood z = isProp→isSet (squash₂ (encodeT x (decodeT x z)) z) induction : (a : code x) encode x (decode x a) ∣₂ a ∣₂ diff --git a/Cubical.HITs.FreeGroupoid.Properties.html b/Cubical.HITs.FreeGroupoid.Properties.html index 878e034ee9..2b2f7b405b 100644 --- a/Cubical.HITs.FreeGroupoid.Properties.html +++ b/Cubical.HITs.FreeGroupoid.Properties.html @@ -20,7 +20,7 @@ open import Cubical.Foundations.Equiv open import Cubical.Foundations.Equiv.BiInvertible open import Cubical.Foundations.Univalence using (ua) -open import Cubical.HITs.SetTruncation renaming (rec to recTrunc) +open import Cubical.HITs.SetTruncation renaming (rec to recTrunc) open import Cubical.Algebra.Group open import Cubical.Algebra.Group.Morphisms @@ -98,7 +98,7 @@ ∥freeGroupoid∥₂IsSet = squash₂ _∣·∣₂_ : FreeGroupoid A ∥₂ FreeGroupoid A ∥₂ FreeGroupoid A ∥₂ -_∣·∣₂_ = rec2 ∥freeGroupoid∥₂IsSet g1 g2 g1 · g2 ∣₂) +_∣·∣₂_ = rec2 ∥freeGroupoid∥₂IsSet g1 g2 g1 · g2 ∣₂) ∥freeGroupoid∥₂IsSemiGroup : {}{A : Type } IsSemigroup _∣·∣₂_ ∥freeGroupoid∥₂IsSemiGroup {A = A} = issemigroup ∥freeGroupoid∥₂IsSet |assoc∣₂ where @@ -107,23 +107,23 @@ Bset : x y z isSet (x ∣·∣₂ (y ∣·∣₂ z) (x ∣·∣₂ y) ∣·∣₂ z) Bset x y z = isProp→isSet (squash₂ (x ∣·∣₂ (y ∣·∣₂ z)) ((x ∣·∣₂ y) ∣·∣₂ z)) |assoc∣₂ : (x y z : FreeGroupoid A ∥₂) x ∣·∣₂ (y ∣·∣₂ z) (x ∣·∣₂ y) ∣·∣₂ z - |assoc∣₂ = elim3 Bset inuctionBase + |assoc∣₂ = elim3 Bset inuctionBase ∣ε∣₂ : FreeGroupoid A ∥₂ ∣ε∣₂ = ε ∣₂ ∥freeGroupoid∥₂IsMonoid : IsMonoid {A = FreeGroupoid A ∥₂} ∣ε∣₂ _∣·∣₂_ ∥freeGroupoid∥₂IsMonoid = ismonoid ∥freeGroupoid∥₂IsSemiGroup - x elim g isProp→isSet (squash₂ (g ∣·∣₂ ∣ε∣₂) g)) g cong g' g' ∣₂) (sym (idr g))) x) - x elim g isProp→isSet (squash₂ (∣ε∣₂ ∣·∣₂ g) g)) g cong g' g' ∣₂) (sym (idl g))) x) + x elim g isProp→isSet (squash₂ (g ∣·∣₂ ∣ε∣₂) g)) g cong g' g' ∣₂) (sym (idr g))) x) + x elim g isProp→isSet (squash₂ (∣ε∣₂ ∣·∣₂ g) g)) g cong g' g' ∣₂) (sym (idl g))) x) ∣inv∣₂ : FreeGroupoid A ∥₂ FreeGroupoid A ∥₂ -∣inv∣₂ = map inv +∣inv∣₂ = map inv ∥freeGroupoid∥₂IsGroup : IsGroup {G = FreeGroupoid A ∥₂} ∣ε∣₂ _∣·∣₂_ ∣inv∣₂ ∥freeGroupoid∥₂IsGroup = isgroup ∥freeGroupoid∥₂IsMonoid - x elim g isProp→isSet (squash₂ (g ∣·∣₂ (∣inv∣₂ g)) ∣ε∣₂)) g cong g' g' ∣₂) (invr g)) x) - x elim g isProp→isSet (squash₂ ((∣inv∣₂ g) ∣·∣₂ g) ∣ε∣₂)) g cong g' g' ∣₂) (invl g)) x) + x elim g isProp→isSet (squash₂ (g ∣·∣₂ (∣inv∣₂ g)) ∣ε∣₂)) g cong g' g' ∣₂) (invr g)) x) + x elim g isProp→isSet (squash₂ ((∣inv∣₂ g) ∣·∣₂ g) ∣ε∣₂)) g cong g' g' ∣₂) (invl g)) x) ∥freeGroupoid∥₂GroupStr : GroupStr FreeGroupoid A ∥₂ ∥freeGroupoid∥₂GroupStr = groupstr ∣ε∣₂ _∣·∣₂_ ∣inv∣₂ ∥freeGroupoid∥₂IsGroup @@ -150,11 +150,11 @@ aux (invr g i) = invr (aux g) i aux (invl g i) = invl (aux g) i isHom : IsGroupHom {A = FreeGroupoid A ∥₂} {B = FreeGroup A} ∥freeGroupoid∥₂GroupStr invf freeGroupGroupStr - IsGroupHom.pres· isHom x y = elim2 x y isProp→isSet (freeGroupIsSet (invf (x ∣·∣₂ y)) ((invf x) · (invf y)))) ind x y where + IsGroupHom.pres· isHom x y = elim2 x y isProp→isSet (freeGroupIsSet (invf (x ∣·∣₂ y)) ((invf x) · (invf y)))) ind x y where ind : g1 g2 invf ( g1 ∣₂ ∣·∣₂ g2 ∣₂) (invf g1 ∣₂) · (invf g2 ∣₂) ind g1 g2 = refl IsGroupHom.pres1 isHom = refl - IsGroupHom.presinv isHom x = elim x isProp→isSet (freeGroupIsSet (invf (∣inv∣₂ x)) (inv (invf x)))) ind x where + IsGroupHom.presinv isHom x = elim x isProp→isSet (freeGroupIsSet (invf (∣inv∣₂ x)) (inv (invf x)))) ind x where ind : g invf (∣inv∣₂ g ∣₂) inv (invf g ∣₂) ind g = refl @@ -166,7 +166,7 @@ invf : FreeGroupoid A ∥₂ FreeGroup A invf = fst forgetfulHom⁻¹ rightInv : (x : FreeGroupoid A ∥₂) f (invf x) x - rightInv x = elim x isProp→isSet (squash₂ (f (invf x)) x)) ind x where + rightInv x = elim x isProp→isSet (squash₂ (f (invf x)) x)) ind x where ind : (g : FreeGroupoid A) f (invf g ∣₂) g ∣₂ ind g = elimProp Bprop η-ind ·-ind ε-ind inv-ind g where Bprop : g isProp (f (invf g ∣₂) g ∣₂) diff --git a/Cubical.HITs.GroupoidQuotients.Base.html b/Cubical.HITs.GroupoidQuotients.Base.html index 112f5057c1..243ba2655b 100644 --- a/Cubical.HITs.GroupoidQuotients.Base.html +++ b/Cubical.HITs.GroupoidQuotients.Base.html @@ -15,7 +15,7 @@ -- Groupoid quotients as a higher inductive type: -- For the definition, only transitivity is needed data _//_ { ℓ'} (A : Type ) {R : A A Type ℓ'} - (Rt : BinaryRelation.isTrans R) : Type (ℓ-max ℓ') where + (Rt : BinaryRelation.isTrans R) : Type (ℓ-max ℓ') where [_] : (a : A) A // Rt eq// : {a b : A} (r : R a b) [ a ] [ b ] comp// : {a b c : A} (r : R a b) (s : R b c) @@ -36,7 +36,7 @@ -} comp'// : { ℓ' : Level} (A : Type ) {R : A A Type ℓ'} - (Rt : BinaryRelation.isTrans R) + (Rt : BinaryRelation.isTrans R) {a b c : A} (r : R a b) (s : R b c) eq// {Rt = Rt} (Rt a b c r s) eq// r eq// s comp'// A Rt r s i = compPath-unique refl (eq// r) (eq// s) diff --git a/Cubical.HITs.GroupoidQuotients.Properties.html b/Cubical.HITs.GroupoidQuotients.Properties.html index e29fbc1930..bfad5ecb08 100644 --- a/Cubical.HITs.GroupoidQuotients.Properties.html +++ b/Cubical.HITs.GroupoidQuotients.Properties.html @@ -35,7 +35,7 @@ A : Type ℓA R : A A Type ℓR -elimSet : (Rt : BinaryRelation.isTrans R) +elimSet : (Rt : BinaryRelation.isTrans R) {B : A // Rt Type } ((x : A // Rt) isSet (B x)) (f : (a : A) B [ a ]) @@ -54,7 +54,7 @@ where g = elimSet Rt Bset f feq -elimProp : (Rt : BinaryRelation.isTrans R) +elimProp : (Rt : BinaryRelation.isTrans R) {B : A // Rt Type } ((x : A // Rt) isProp (B x)) ((a : A) B [ a ]) @@ -63,7 +63,7 @@ elimProp Rt Brop f x = elimSet Rt x isProp→isSet (Brop x)) f r isProp→PathP i Brop (eq// r i)) (f _) (f _)) x -elimProp2 : (Rt : BinaryRelation.isTrans R) +elimProp2 : (Rt : BinaryRelation.isTrans R) {C : A // Rt A // Rt Type } ((x y : A // Rt) isProp (C x y)) ((a b : A) C [ a ] [ b ]) @@ -72,11 +72,11 @@ elimProp2 Rt Cprop f = elimProp Rt x isPropΠ y Cprop x y)) x elimProp Rt y Cprop [ x ] y) (f x)) -isSurjective[] : (Rt : BinaryRelation.isTrans R) +isSurjective[] : (Rt : BinaryRelation.isTrans R) isSurjection a [ a ]) isSurjective[] Rt = elimProp Rt x squash₁) a a , refl ∣₁) -elim : (Rt : BinaryRelation.isTrans R) +elim : (Rt : BinaryRelation.isTrans R) {B : A // Rt Type } ((x : A // Rt) isGroupoid (B x)) (f : (a : A) B [ a ]) @@ -95,7 +95,7 @@ where g = elim Rt Bgpd f feq fcomp -rec : (Rt : BinaryRelation.isTrans R) +rec : (Rt : BinaryRelation.isTrans R) {B : Type } isGroupoid B (f : A B) diff --git a/Cubical.HITs.SetQuotients.EqClass.html b/Cubical.HITs.SetQuotients.EqClass.html index 393f1aed39..ba1eb8509b 100644 --- a/Cubical.HITs.SetQuotients.EqClass.html +++ b/Cubical.HITs.SetQuotients.EqClass.html @@ -24,8 +24,8 @@ -- another definition using equivalence classes -open BinaryRelation -open isEquivRel +open BinaryRelation +open isEquivRel open Iso @@ -88,11 +88,11 @@ { ℓ' ℓ'' : Level} (X : Type ) (R : X X Type ℓ'') - (h : isEquivRel R) where + (h : isEquivRel R) where ∥Rx∥Iso : (x x' : X)(r : R x x') (a : X) Iso R a x ∥₁ R a x' ∥₁ - ∥Rx∥Iso x x' r a .fun = Prop.rec isPropPropTrunc r' h .transitive _ _ _ r' r ∣₁) - ∥Rx∥Iso x x' r a .inv = Prop.rec isPropPropTrunc r' h .transitive _ _ _ r' (h .symmetric _ _ r) ∣₁) + ∥Rx∥Iso x x' r a .fun = Prop.rec isPropPropTrunc r' h .transitive _ _ _ r' r ∣₁) + ∥Rx∥Iso x x' r a .inv = Prop.rec isPropPropTrunc r' h .transitive _ _ _ r' (h .symmetric _ _ r) ∣₁) ∥Rx∥Iso x x' r a .leftInv _ = isPropPropTrunc _ _ ∥Rx∥Iso x x' r a .rightInv _ = isPropPropTrunc _ _ @@ -116,7 +116,7 @@ /→∥ = SetQuot.rec (isSet∥ X R) ∥R∥ x x' r ∥Rx∥Path x x' r) inj/→∥' : (x x' : X) ∥R∥ x ∥R∥ x' R x x' ∥₁ - inj/→∥' x x' p = transport i p i .fst x .fst) h .reflexive x ∣₁ + inj/→∥' x x' p = transport i p i .fst x .fst) h .reflexive x ∣₁ inj/→∥ : (x y : X / R) /→∥ x /→∥ y x y inj/→∥ = diff --git a/Cubical.HITs.SetQuotients.Properties.html b/Cubical.HITs.SetQuotients.Properties.html index ed64d32d41..da2fba40a9 100644 --- a/Cubical.HITs.SetQuotients.Properties.html +++ b/Cubical.HITs.SetQuotients.Properties.html @@ -31,7 +31,7 @@ open import Cubical.HITs.PropositionalTruncation as PropTrunc using (∥_∥₁ ; ∣_∣₁ ; squash₁) renaming (rec to propRec) open import Cubical.HITs.SetTruncation as SetTrunc - using (∥_∥₂ ; ∣_∣₂ ; squash₂ ; isSetSetTrunc) + using (∥_∥₂ ; ∣_∣₂ ; squash₂ ; isSetSetTrunc) private @@ -156,10 +156,10 @@ -- We start by proving that we can recover the set-quotient -- by set-truncating the (non-truncated type quotient) typeQuotSetTruncIso : Iso (A / R) A /ₜ R ∥₂ -Iso.fun typeQuotSetTruncIso = rec isSetSetTrunc a [ a ] ∣₂) +Iso.fun typeQuotSetTruncIso = rec isSetSetTrunc a [ a ] ∣₂) λ a b r cong ∣_∣₂ (eq/ a b r) -Iso.inv typeQuotSetTruncIso = SetTrunc.rec squash/ (TypeQuot.rec [_] eq/) -Iso.rightInv typeQuotSetTruncIso = SetTrunc.elim _ isProp→isSet (squash₂ _ _)) +Iso.inv typeQuotSetTruncIso = SetTrunc.rec squash/ (TypeQuot.rec [_] eq/) +Iso.rightInv typeQuotSetTruncIso = SetTrunc.elim _ isProp→isSet (squash₂ _ _)) (TypeQuot.elimProp _ squash₂ _ _) λ _ refl) Iso.leftInv typeQuotSetTruncIso = elimProp _ squash/ _ _) λ _ refl @@ -173,7 +173,7 @@ fun = f₁ f₂ where f₁ : A /ₜ R ∥₂ B - f₁ = SetTrunc.rec→Gpd.fun Bgpd f/ congF/Const + f₁ = SetTrunc.rec→Gpd.fun Bgpd f/ congF/Const where f/ : A /ₜ R B f/ = TypeQuot.rec f feq @@ -207,7 +207,7 @@ (A / R B) (Σ[ f (A B) ] ((a b : A) R a b f a f b)) setQuotUniversal Bset = isoToEquiv (setQuotUniversalIso Bset) -open BinaryRelation +open BinaryRelation setQuotUnaryOp : (-_ : A A) (∀ a a' R a a' R (- a) (- a')) @@ -215,7 +215,7 @@ setQuotUnaryOp -_ h = rec squash/ a [ - a ]) a b x eq/ _ _ (h _ _ x)) -- characterisation of binary functions/operations on set-quotients -setQuotUniversal2Iso : isSet C isRefl R isRefl S +setQuotUniversal2Iso : isSet C isRefl R isRefl S Iso (A / R B / S C) (Σ[ _∗_ (A B C) ] (∀ a a' b b' R a a' S b b' a b a' b')) Iso.fun (setQuotUniversal2Iso {R = R} {S = S} Bset isReflR isReflS) _∗/_ = _∗_ , h @@ -237,7 +237,7 @@ Iso.leftInv (setQuotUniversal2Iso Bset isReflR isReflS) _∗/_ = funExt₂ (elimProp2 _ _ Bset _ _) λ _ _ refl) -setQuotUniversal2 : isSet C isRefl R isRefl S +setQuotUniversal2 : isSet C isRefl R isRefl S (A / R B / S C) (Σ[ _∗_ (A B C) ] (∀ a a' b b' R a a' S b b' a b a' b')) setQuotUniversal2 Bset isReflR isReflS = @@ -245,7 +245,7 @@ -- corollary for binary operations -- TODO: prove truncated inverse for effective relations -setQuotBinOp : isRefl R isRefl S +setQuotBinOp : isRefl R isRefl S (_∗_ : A B C) (∀ a a' b b' R a a' S b b' T (a b) (a' b')) (A / R B / S C / T) @@ -254,7 +254,7 @@ _ _ _ r eq/ _ _ (h _ _ _ _ r (isReflS _))) _ _ _ s eq/ _ _ (h _ _ _ _ (isReflR _) s)) -setQuotSymmBinOp : isRefl R isTrans R +setQuotSymmBinOp : isRefl R isTrans R (_∗_ : A A A) (∀ a b R (a b) (b a)) (∀ a a' b R a a' R (a b) (a' b)) @@ -268,9 +268,9 @@ (isTransR _ _ _ (∗Rsymm a' b) (isTransR _ _ _ (h b b' a' rb) (∗Rsymm b' a'))) -effective : (Rprop : isPropValued R) (Requiv : isEquivRel R) +effective : (Rprop : isPropValued R) (Requiv : isEquivRel R) (a b : A) [ a ] [ b ] R a b -effective {A = A} {R = R} Rprop (equivRel R/refl R/sym R/trans) a b p = +effective {A = A} {R = R} Rprop (equivRel R/refl R/sym R/trans) a b p = transport aa≡ab (R/refl _) where helper : A / R hProp _ @@ -286,14 +286,14 @@ aa≡ab : R a a R a b aa≡ab i = helper (p i) .fst -isEquivRel→effectiveIso : isPropValued R isEquivRel R +isEquivRel→effectiveIso : isPropValued R isEquivRel R (a b : A) Iso ([ a ] [ b ]) (R a b) Iso.fun (isEquivRel→effectiveIso {R = R} Rprop Req a b) = effective Rprop Req a b Iso.inv (isEquivRel→effectiveIso {R = R} Rprop Req a b) = eq/ a b Iso.rightInv (isEquivRel→effectiveIso {R = R} Rprop Req a b) _ = Rprop a b _ _ Iso.leftInv (isEquivRel→effectiveIso {R = R} Rprop Req a b) _ = squash/ _ _ _ _ -isEquivRel→isEffective : isPropValued R isEquivRel R isEffective R +isEquivRel→isEffective : isPropValued R isEquivRel R isEffective R isEquivRel→isEffective Rprop Req a b = isoToIsEquiv (invIso (isEquivRel→effectiveIso Rprop Req a b)) @@ -311,20 +311,20 @@ -- path-types for equivalence relations (not prop-valued) -- and their quotients -isEquivRel→TruncIso : isEquivRel R (a b : A) Iso ([ a ] [ b ]) R a b ∥₁ +isEquivRel→TruncIso : isEquivRel R (a b : A) Iso ([ a ] [ b ]) R a b ∥₁ isEquivRel→TruncIso {A = A} {R = R} Req a b = compIso (isProp→Iso (squash/ _ _) (squash/ _ _) (cong (Iso.fun truncRelIso)) (cong (Iso.inv truncRelIso))) (isEquivRel→effectiveIso _ _ PropTrunc.isPropPropTrunc) ∥R∥eq a b) where - open isEquivRel - ∥R∥eq : isEquivRel λ a b R a b ∥₁ - reflexive ∥R∥eq a = reflexive Req a ∣₁ - symmetric ∥R∥eq a b = PropTrunc.map (symmetric Req a b) - transitive ∥R∥eq a b c = PropTrunc.map2 (transitive Req a b c) + open isEquivRel + ∥R∥eq : isEquivRel λ a b R a b ∥₁ + reflexive ∥R∥eq a = reflexive Req a ∣₁ + symmetric ∥R∥eq a b = PropTrunc.map (symmetric Req a b) + transitive ∥R∥eq a b c = PropTrunc.map2 (transitive Req a b c) -discreteSetQuotients : isEquivRel R +discreteSetQuotients : isEquivRel R (∀ a₀ a₁ Dec (R a₀ a₁)) Discrete (A / R) discreteSetQuotients {A = A} {R = R} Req Rdec = diff --git a/Cubical.HITs.SetTruncation.Fibers.html b/Cubical.HITs.SetTruncation.Fibers.html index fa8a4101d1..c2c26af9b7 100644 --- a/Cubical.HITs.SetTruncation.Fibers.html +++ b/Cubical.HITs.SetTruncation.Fibers.html @@ -39,7 +39,7 @@ private ∥f∥₂ : X ∥₂ Y ∥₂ - ∥f∥₂ = Set.map f + ∥f∥₂ = Set.map f module _ (y : Y) where @@ -49,11 +49,11 @@ isSetFiber∥∥₂ = isOfHLevelΣ 2 squash₂ _ isProp→isSet (squash₂ _ _)) fiberRel : fiber f y ∥₂ fiber f y ∥₂ Type - fiberRel a b = Set.map fst a Set.map fst b + fiberRel a b = Set.map fst a Set.map fst b private proj : fiber f y ∥₂ / fiberRel X ∥₂ - proj = SetQuot.rec squash₂ (Set.map fst) _ _ p p) + proj = SetQuot.rec squash₂ (Set.map fst) _ _ p p) ∥fiber∥₂/R→fiber∥∥₂ : fiber f y ∥₂ / fiberRel fiber ∥f∥₂ y ∣₂ ∥fiber∥₂/R→fiber∥∥₂ = SetQuot.rec isSetFiber∥∥₂ ∥fiber∥₂→fiber∥∥₂ feq @@ -62,11 +62,11 @@ fiber→fiber∥∥₂ (x , p) = x ∣₂ , cong ∣_∣₂ p ∥fiber∥₂→fiber∥∥₂ : fiber f y ∥₂ fiber ∥f∥₂ y ∣₂ - ∥fiber∥₂→fiber∥∥₂ = Set.rec isSetFiber∥∥₂ fiber→fiber∥∥₂ + ∥fiber∥₂→fiber∥∥₂ = Set.rec isSetFiber∥∥₂ fiber→fiber∥∥₂ feq : (a b : fiber f y ∥₂) (r : fiberRel a b) ∥fiber∥₂→fiber∥∥₂ a ∥fiber∥₂→fiber∥∥₂ b feq = - Set.elim2 _ _ isProp→isSet (isPropΠ _ isSetFiber∥∥₂ _ _))) λ _ _ p + Set.elim2 _ _ isProp→isSet (isPropΠ _ isSetFiber∥∥₂ _ _))) λ _ _ p ΣPathP (p , isSet→isSet' squash₂ _ _ _ _) mereFiber→∥fiber∥₂/R : (x : X) f x y ∥₁ fiber f y ∥₂ / fiberRel @@ -75,28 +75,28 @@ fiber∥∥₂→∥fiber∥₂/R : fiber ∥f∥₂ y ∣₂ fiber f y ∥₂ / fiberRel fiber∥∥₂→∥fiber∥₂/R = uncurry - (Set.elim _ isSetΠ λ _ squash/) λ x p - mereFiber→∥fiber∥₂/R x (PathIdTrunc₀Iso .fun p)) + (Set.elim _ isSetΠ λ _ squash/) λ x p + mereFiber→∥fiber∥₂/R x (PathIdTrunc₀Iso .fun p)) ∥fiber∥₂/R→fiber∥∥₂→fst : (q : fiber f y ∥₂ / fiberRel) ∥fiber∥₂/R→fiber∥∥₂ q .fst proj q ∥fiber∥₂/R→fiber∥∥₂→fst = SetQuot.elimProp _ squash₂ _ _) - (Set.elim _ isProp→isSet (squash₂ _ _)) _ refl)) + (Set.elim _ isProp→isSet (squash₂ _ _)) _ refl)) fiber∥∥₂→∥fiber∥₂/R→proj : (x : fiber ∥f∥₂ y ∣₂) proj (fiber∥∥₂→∥fiber∥₂/R x) x .fst fiber∥∥₂→∥fiber∥₂/R→proj = uncurry - (Set.elim _ isSetΠ λ _ isProp→isSet (squash₂ _ _)) λ x p + (Set.elim _ isSetΠ λ _ isProp→isSet (squash₂ _ _)) λ x p Prop.elim {P = λ t proj (mereFiber→∥fiber∥₂/R x t) x ∣₂} _ squash₂ _ _) _ refl) - (PathIdTrunc₀Iso .fun p)) + (PathIdTrunc₀Iso .fun p)) ∥fiber∥₂/R→fiber∥∥₂→∥fiber∥₂/R : (x : fiber f y ∥₂ / fiberRel) fiber∥∥₂→∥fiber∥₂/R (∥fiber∥₂/R→fiber∥∥₂ x) x ∥fiber∥₂/R→fiber∥∥₂→∥fiber∥₂/R = SetQuot.elimProp _ squash/ _ _) - (Set.elim _ isProp→isSet (squash/ _ _)) + (Set.elim _ isProp→isSet (squash/ _ _)) _ eq/ _ _ refl)) fiber∥∥₂→∥fiber∥₂/R→fiber∥∥₂ : @@ -119,40 +119,40 @@ -- the relation is an equivalence relation - open BinaryRelation - open isEquivRel + open BinaryRelation + open isEquivRel - isEquivRelFiberRel : isEquivRel fiberRel - isEquivRelFiberRel .reflexive _ = refl - isEquivRelFiberRel .symmetric _ _ = sym - isEquivRelFiberRel .transitive _ _ _ = _∙_ + isEquivRelFiberRel : isEquivRel fiberRel + isEquivRelFiberRel .reflexive _ = refl + isEquivRelFiberRel .symmetric _ _ = sym + isEquivRelFiberRel .transitive _ _ _ = _∙_ -- alternative characterization of the relation in terms of equality in Y and fiber f y ∣transport∣ : y y ∥₂ fiber f y ∥₂ fiber f y ∥₂ - ∣transport∣ = Set.rec2 squash₂ s (x , q) x , q s ∣₂) + ∣transport∣ = Set.rec2 squash₂ s (x , q) x , q s ∣₂) fiberRel2 : (x x' : fiber f y ∥₂) Type (ℓ-max ℓ') fiberRel2 x x' = Σ[ s y y ∥₂ ] ∣transport∣ s x x' ∥₁ fiberRel2→1 : x x' fiberRel2 x x' fiberRel x x' fiberRel2→1 = - Set.elim2 _ _ isSetΠ λ _ isOfHLevelPath 2 squash₂ _ _) λ _ _ + Set.elim2 _ _ isSetΠ λ _ isOfHLevelPath 2 squash₂ _ _) λ _ _ Prop.rec (squash₂ _ _) (uncurry - (Set.elim _ isSetΠ λ _ isOfHLevelPath 2 squash₂ _ _) λ _ - cong (Set.map fst))) + (Set.elim _ isSetΠ λ _ isOfHLevelPath 2 squash₂ _ _) λ _ + cong (Set.map fst))) fiberRel1→2 : x x' fiberRel x x' fiberRel2 x x' fiberRel1→2 = - Set.elim2 _ _ isSetΠ λ _ isProp→isSet squash₁) λ a b p + Set.elim2 _ _ isSetΠ λ _ isProp→isSet squash₁) λ a b p Prop.rec squash₁ q let filler = doubleCompPath-filler (sym (a .snd)) (cong f q) (b .snd) in filler i1 ∣₂ , cong ∣_∣₂ (ΣPathP (q , adjustLemma (flipSquare filler))) ∣₁) - (PathIdTrunc₀Iso .Iso.fun p) + (PathIdTrunc₀Iso .Iso.fun p) where adjustLemma : {x y z w : Y} {p : x y} {q : x z} {r : z w} {s : y w} PathP i p i r i) q s diff --git a/Cubical.HITs.SetTruncation.Properties.html b/Cubical.HITs.SetTruncation.Properties.html index 3618aec131..b4f768dc65 100644 --- a/Cubical.HITs.SetTruncation.Properties.html +++ b/Cubical.HITs.SetTruncation.Properties.html @@ -25,318 +25,322 @@ private variable - ℓ' ℓ'' : Level - A B C D : Type - -isSetPathImplicit : {x y : A ∥₂} isSet (x y) -isSetPathImplicit = isOfHLevelPath 2 squash₂ _ _ - -rec : isSet B (A B) A ∥₂ B -rec Bset f x ∣₂ = f x -rec Bset f (squash₂ x y p q i j) = - Bset _ _ (cong (rec Bset f) p) (cong (rec Bset f) q) i j - -rec2 : isSet C (A B C) A ∥₂ B ∥₂ C -rec2 Cset f x ∣₂ y ∣₂ = f x y -rec2 Cset f x ∣₂ (squash₂ y z p q i j) = - Cset _ _ (cong (rec2 Cset f x ∣₂) p) (cong (rec2 Cset f x ∣₂) q) i j -rec2 Cset f (squash₂ x y p q i j) z = - Cset _ _ (cong a rec2 Cset f a z) p) (cong a rec2 Cset f a z) q) i j - --- Old version: --- rec2 Cset f = rec (isSetΠ λ _ → Cset) λ x → rec Cset (f x) - --- lemma 6.9.1 in HoTT book -elim : {B : A ∥₂ Type } - (Bset : (x : A ∥₂) isSet (B x)) - (f : (a : A) B ( a ∣₂)) - (x : A ∥₂) B x -elim Bset f a ∣₂ = f a -elim Bset f (squash₂ x y p q i j) = - isOfHLevel→isOfHLevelDep 2 Bset _ _ - (cong (elim Bset f) p) (cong (elim Bset f) q) (squash₂ x y p q) i j - -elim2 : {C : A ∥₂ B ∥₂ Type } - (Cset : ((x : A ∥₂) (y : B ∥₂) isSet (C x y))) - (f : (a : A) (b : B) C a ∣₂ b ∣₂) - (x : A ∥₂) (y : B ∥₂) C x y -elim2 Cset f x ∣₂ y ∣₂ = f x y -elim2 Cset f x ∣₂ (squash₂ y z p q i j) = - isOfHLevel→isOfHLevelDep 2 a Cset x ∣₂ a) _ _ - (cong (elim2 Cset f x ∣₂) p) (cong (elim2 Cset f x ∣₂) q) (squash₂ y z p q) i j -elim2 Cset f (squash₂ x y p q i j) z = - isOfHLevel→isOfHLevelDep 2 a Cset a z) _ _ - (cong a elim2 Cset f a z) p) (cong a elim2 Cset f a z) q) (squash₂ x y p q) i j - --- Old version: --- elim2 Cset f = elim (λ _ → isSetΠ (λ _ → Cset _ _)) --- (λ a → elim (λ _ → Cset _ _) (f a)) - --- TODO: generalize -elim3 : {B : (x y z : A ∥₂) Type } - (Bset : ((x y z : A ∥₂) isSet (B x y z))) - (g : (a b c : A) B a ∣₂ b ∣₂ c ∣₂) - (x y z : A ∥₂) B x y z -elim3 Bset g = elim2 _ _ isSetΠ _ Bset _ _ _)) - a b elim _ Bset _ _ _) (g a b)) - -elim4 : {B : (w x y z : A ∥₂) Type } - (Bset : ((w x y z : A ∥₂) isSet (B w x y z))) - (g : (a b c d : A) B a ∣₂ b ∣₂ c ∣₂ d ∣₂) - (w x y z : A ∥₂) B w x y z -elim4 Bset g = elim3 _ _ _ isSetΠ λ _ Bset _ _ _ _) - λ a b c elim _ Bset _ _ _ _) (g a b c) - - --- the recursor for maps into groupoids following the "HIT proof" in: --- https://arxiv.org/abs/1507.01150 --- i.e. for any type A and groupoid B we can construct a map ∥ A ∥₂ → B --- from a map A → B satisfying the condition --- ∀ (a b : A) (p q : a ≡ b) → cong f p ≡ cong f q --- TODO: prove that this is an equivalence -module rec→Gpd {A : Type } {B : Type ℓ'} (Bgpd : isGroupoid B) (f : A B) - (congFConst : (a b : A) (p q : a b) cong f p cong f q) where - - data H : Type where - η : A H - ε : (a b : A) a b ∥₁ η a η b -- prop. trunc. of a≡b - δ : (a b : A) (p : a b) ε a b p ∣₁ cong η p - gtrunc : isGroupoid H - - -- write elimination principle for H - module Helim {P : H Type ℓ''} (Pgpd : h isGroupoid (P h)) - (η* : (a : A) P (η a)) - (ε* : (a b : A) (∣p∣₁ : a b ∥₁) - PathP i P (ε a b ∣p∣₁ i)) (η* a) (η* b)) - (δ* : (a b : A) (p : a b) - PathP i PathP j P (δ a b p i j)) (η* a) (η* b)) - (ε* a b p ∣₁) (cong η* p)) where - - fun : (h : H) P h - fun (η a) = η* a - fun (ε a b ∣p∣₁ i) = ε* a b ∣p∣₁ i - fun (δ a b p i j) = δ* a b p i j - fun (gtrunc x y p q α β i j k) = isOfHLevel→isOfHLevelDep 3 Pgpd - (fun x) (fun y) - (cong fun p) (cong fun q) - (cong (cong fun) α) (cong (cong fun) β) - (gtrunc x y p q α β) i j k - - module Hrec {C : Type ℓ''} (Cgpd : isGroupoid C) - (η* : A C) - (ε* : (a b : A) a b ∥₁ η* a η* b) - (δ* : (a b : A) (p : a b) ε* a b p ∣₁ cong η* p) where - - fun : H C - fun (η a) = η* a - fun (ε a b ∣p∣₁ i) = ε* a b ∣p∣₁ i - fun (δ a b p i j) = δ* a b p i j - fun (gtrunc x y p q α β i j k) = Cgpd (fun x) (fun y) (cong fun p) (cong fun q) - (cong (cong fun) α) (cong (cong fun) β) i j k - - module HelimProp {P : H Type ℓ''} (Pprop : h isProp (P h)) - (η* : (a : A) P (η a)) where - - fun : h P h - fun = Helim.fun _ isSet→isGroupoid (isProp→isSet (Pprop _))) η* - a b ∣p∣₁ isOfHLevel→isOfHLevelDep 1 Pprop _ _ (ε a b ∣p∣₁)) - λ a b p isOfHLevel→isOfHLevelDep 1 - {B = λ p PathP i P (p i)) (η* a) (η* b)} - _ isOfHLevelPathP 1 (Pprop _) _ _) _ _ (δ a b p) - - -- The main trick: eliminating into hsets is easy - -- i.e. H has the universal property of set truncation... - module HelimSet {P : H Type ℓ''} (Pset : h isSet (P h)) - (η* : a P (η a)) where - - fun : (h : H) P h - fun = Helim.fun _ isSet→isGroupoid (Pset _)) η* ε* - λ a b p isOfHLevel→isOfHLevelDep 1 - {B = λ p PathP i P (p i)) (η* a) (η* b)} - _ isOfHLevelPathP' 1 (Pset _) _ _) _ _ (δ a b p) - where - ε* : (a b : A) (∣p∣₁ : a b ∥₁) PathP i P (ε a b ∣p∣₁ i)) (η* a) (η* b) - ε* a b = pElim _ isOfHLevelPathP' 1 (Pset _) (η* a) (η* b)) - λ p subst x PathP i P (x i)) (η* a) (η* b)) - (sym (δ a b p)) (cong η* p) - - - -- Now we need to prove that H is a set. - -- We start with a little lemma: - localHedbergLemma : {X : Type ℓ''} (P : X Type ℓ'') - (∀ x isProp (P x)) - ((x : X) P x (y : X) P y x y) - -------------------------------------------------- - (x : X) P x (y : X) isProp (x y) - localHedbergLemma {X = X} P Pprop P→≡ x px y = isPropRetract - p subst P p px) py sym (P→≡ x px x px) P→≡ x px y py) - isRetract (Pprop y) - where - isRetract : (p : x y) (sym (P→≡ x px x px)) P→≡ x px y (subst P p px) p - isRetract = J y' p' (sym (P→≡ x px x px)) P→≡ x px y' (subst P p' px) p') - (subst px' sym (P→≡ x px x px) P→≡ x px x px' refl) - (sym (substRefl {B = P} px)) (lCancel (P→≡ x px x px))) - - Hset : isSet H - Hset = HelimProp.fun _ isPropΠ λ _ isPropIsProp) baseCaseLeft - where - baseCaseLeft : (a₀ : A) (y : H) isProp (η a₀ y) - baseCaseLeft a₀ = localHedbergLemma x Q x .fst) x Q x .snd) Q→≡ _ refl ∣₁ - where - Q : H hProp - Q = HelimSet.fun _ isSetHProp) λ b a₀ b ∥₁ , isPropPropTrunc - -- Q (η b) = ∥ a ≡ b ∥₁ - - Q→≡ : (x : H) Q x .fst (y : H) Q y .fst x y - Q→≡ = HelimSet.fun _ isSetΠ3 λ _ _ _ gtrunc _ _) - λ a p HelimSet.fun _ isSetΠ λ _ gtrunc _ _) - λ b q sym (ε a₀ a p) ε a₀ b q - - -- our desired function will split through H, - -- i.e. we get a function ∥ A ∥₂ → H → B - fun : A ∥₂ B - fun = f₁ f₂ - where - f₁ : H B - f₁ = Hrec.fun Bgpd f εᶠ λ _ _ _ refl - where - εᶠ : (a b : A) a b ∥₁ f a f b - εᶠ a b = rec→Set (Bgpd _ _) (cong f) λ p q congFConst a b p q - -- this is the inductive step, - -- we use that maps ∥ A ∥₁ → B for an hset B - -- correspond to 2-Constant maps A → B (which cong f is by assumption) - f₂ : A ∥₂ H - f₂ = rec Hset η - - -map : (A B) A ∥₂ B ∥₂ -map f = rec squash₂ λ x f x ∣₂ - -map∙ : { ℓ' : Level} {A : Pointed } {B : Pointed ℓ'} - (f : A →∙ B) A ∥₂∙ →∙ B ∥₂∙ -fst (map∙ f) = map (fst f) -snd (map∙ f) = cong ∣_∣₂ (snd f) - -setTruncUniversal : isSet B ( A ∥₂ B) (A B) -setTruncUniversal {B = B} Bset = - isoToEquiv (iso h x h x ∣₂) (rec Bset) _ refl) rinv) - where - rinv : (f : A ∥₂ B) rec Bset x f x ∣₂) f - rinv f i x = - elim x isProp→isSet (Bset (rec Bset x f x ∣₂) x) (f x))) - _ refl) x i - -isSetSetTrunc : isSet A ∥₂ -isSetSetTrunc a b p q = squash₂ a b p q - -setTruncIdempotentIso : isSet A Iso A ∥₂ A -Iso.fun (setTruncIdempotentIso hA) = rec hA (idfun _) -Iso.inv (setTruncIdempotentIso hA) x = x ∣₂ -Iso.rightInv (setTruncIdempotentIso hA) _ = refl -Iso.leftInv (setTruncIdempotentIso hA) = elim _ isSet→isGroupoid isSetSetTrunc _ _) _ refl) - -setTruncIdempotent≃ : isSet A A ∥₂ A -setTruncIdempotent≃ {A = A} hA = isoToEquiv (setTruncIdempotentIso hA) - -setTruncIdempotent : isSet A A ∥₂ A -setTruncIdempotent hA = ua (setTruncIdempotent≃ hA) - -isContr→isContrSetTrunc : isContr A isContr ( A ∥₂) -isContr→isContrSetTrunc contr = fst contr ∣₂ - , elim _ isOfHLevelPath 2 (isSetSetTrunc) _ _) - λ a cong ∣_∣₂ (snd contr a) - - -setTruncIso : Iso A B Iso A ∥₂ B ∥₂ -Iso.fun (setTruncIso is) = rec isSetSetTrunc x Iso.fun is x ∣₂) -Iso.inv (setTruncIso is) = rec isSetSetTrunc x Iso.inv is x ∣₂) -Iso.rightInv (setTruncIso is) = - elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - λ a cong ∣_∣₂ (Iso.rightInv is a) -Iso.leftInv (setTruncIso is) = - elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - λ a cong ∣_∣₂ (Iso.leftInv is a) - -setSigmaIso : {B : A Type } Iso Σ A B ∥₂ Σ A x B x ∥₂) ∥₂ -setSigmaIso {A = A} {B = B} = iso fun funinv sect retr - where - {- writing it out explicitly to avoid yellow highlighting -} - fun : Σ A B ∥₂ Σ A x B x ∥₂) ∥₂ - fun = rec isSetSetTrunc λ {(a , p) a , p ∣₂ ∣₂} - funinv : Σ A x B x ∥₂) ∥₂ Σ A B ∥₂ - funinv = rec isSetSetTrunc {(a , p) rec isSetSetTrunc p a , p ∣₂) p}) - sect : section fun funinv - sect = elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - λ { (a , p) elim {B = λ p fun (funinv a , p ∣₂) a , p ∣₂} - p isOfHLevelPath 2 isSetSetTrunc _ _) _ refl) p } - retr : retract fun funinv - retr = elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - λ { _ refl } - -sigmaElim : {B : A ∥₂ Type } {C : Σ A ∥₂ B Type ℓ'} - (Bset : (x : Σ A ∥₂ B) isSet (C x)) - (g : (a : A) (b : B a ∣₂) C ( a ∣₂ , b)) - (x : Σ A ∥₂ B) C x -sigmaElim {B = B} {C = C} set g (x , y) = - elim {B = λ x (y : B x) C (x , y)} _ isSetΠ λ _ set _) g x y - -sigmaProdElim : {C : A ∥₂ × B ∥₂ Type } {D : Σ ( A ∥₂ × B ∥₂) C Type ℓ'} - (Bset : (x : Σ ( A ∥₂ × B ∥₂) C) isSet (D x)) - (g : (a : A) (b : B) (c : C ( a ∣₂ , b ∣₂)) D (( a ∣₂ , b ∣₂) , c)) - (x : Σ ( A ∥₂ × B ∥₂) C) D x -sigmaProdElim {B = B} {C = C} {D = D} set g ((x , y) , c) = - elim {B = λ x (y : B ∥₂) (c : C (x , y)) D ((x , y) , c)} - _ isSetΠ λ _ isSetΠ λ _ set _) - x elim _ isSetΠ λ _ set _) (g x)) - x y c - -prodElim : {C : A ∥₂ × B ∥₂ Type } - ((x : A ∥₂ × B ∥₂) isSet (C x)) - ((a : A) (b : B) C ( a ∣₂ , b ∣₂)) - (x : A ∥₂ × B ∥₂) C x -prodElim setC f (a , b) = elim2 x y setC (x , y)) f a b - -prodRec : {C : Type } isSet C (A B C) A ∥₂ × B ∥₂ C -prodRec setC f (a , b) = rec2 setC f a b - -prodElim2 : {E : ( A ∥₂ × B ∥₂) ( C ∥₂ × D ∥₂) Type } - ((x : A ∥₂ × B ∥₂) (y : C ∥₂ × D ∥₂) isSet (E x y)) - ((a : A) (b : B) (c : C) (d : D) E ( a ∣₂ , b ∣₂) ( c ∣₂ , d ∣₂)) - ((x : A ∥₂ × B ∥₂) (y : C ∥₂ × D ∥₂) (E x y)) -prodElim2 isset f = prodElim _ isSetΠ λ _ isset _ _) - λ a b prodElim _ isset _ _) - λ c d f a b c d - -setTruncOfProdIso : Iso A × B ∥₂ ( A ∥₂ × B ∥₂) -Iso.fun setTruncOfProdIso = rec (isSet× isSetSetTrunc isSetSetTrunc) λ { (a , b) a ∣₂ , b ∣₂ } -Iso.inv setTruncOfProdIso = prodRec isSetSetTrunc λ a b a , b ∣₂ -Iso.rightInv setTruncOfProdIso = - prodElim _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) λ _ _ refl -Iso.leftInv setTruncOfProdIso = - elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ {(a , b) refl} - -IsoSetTruncateSndΣ : {A : Type } {B : A Type ℓ'} Iso Σ A B ∥₂ Σ A x B x ∥₂) ∥₂ -Iso.fun IsoSetTruncateSndΣ = map λ a (fst a) , snd a ∣₂ -Iso.inv IsoSetTruncateSndΣ = rec isSetSetTrunc (uncurry λ x map λ b x , b) -Iso.rightInv IsoSetTruncateSndΣ = - elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - (uncurry λ a elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - λ _ refl) -Iso.leftInv IsoSetTruncateSndΣ = - elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - λ _ refl - -PathIdTrunc₀Iso : {a b : A} Iso ( a ∣₂ b ∣₂) a b ∥₁ -Iso.fun (PathIdTrunc₀Iso {b = b}) p = - transport i rec {B = TypeOfHLevel _ 1} (isOfHLevelTypeOfHLevel 1) - a a b ∥₁ , squash₁) (p (~ i)) .fst) - refl ∣₁ -Iso.inv PathIdTrunc₀Iso = pRec (squash₂ _ _) (cong ∣_∣₂) -Iso.rightInv PathIdTrunc₀Iso _ = squash₁ _ _ -Iso.leftInv PathIdTrunc₀Iso _ = squash₂ _ _ _ _ - -mapFunctorial : {A B C : Type } (f : A B) (g : B C) - map g map f map (g f) -mapFunctorial f g = - funExt (elim x isSetPathImplicit) λ a refl) + ℓ' ℓ'' ℓa ℓb ℓc ℓd : Level + A : Type ℓa + B : Type ℓb + C : Type ℓc + D : Type ℓd + +isSetPathImplicit : {x y : A ∥₂} isSet (x y) +isSetPathImplicit = isOfHLevelPath 2 squash₂ _ _ + +rec : isSet B (A B) A ∥₂ B +rec Bset f x ∣₂ = f x +rec Bset f (squash₂ x y p q i j) = + Bset _ _ (cong (rec Bset f) p) (cong (rec Bset f) q) i j + +rec2 : isSet C (A B C) A ∥₂ B ∥₂ C +rec2 Cset f x ∣₂ y ∣₂ = f x y +rec2 Cset f x ∣₂ (squash₂ y z p q i j) = + Cset _ _ (cong (rec2 Cset f x ∣₂) p) (cong (rec2 Cset f x ∣₂) q) i j +rec2 Cset f (squash₂ x y p q i j) z = + Cset _ _ (cong a rec2 Cset f a z) p) (cong a rec2 Cset f a z) q) i j + +-- Old version: +-- rec2 Cset f = rec (isSetΠ λ _ → Cset) λ x → rec Cset (f x) + +-- lemma 6.9.1 in HoTT book +elim : {B : A ∥₂ Type } + (Bset : (x : A ∥₂) isSet (B x)) + (f : (a : A) B ( a ∣₂)) + (x : A ∥₂) B x +elim Bset f a ∣₂ = f a +elim Bset f (squash₂ x y p q i j) = + isOfHLevel→isOfHLevelDep 2 Bset _ _ + (cong (elim Bset f) p) (cong (elim Bset f) q) (squash₂ x y p q) i j + +elim2 : {C : A ∥₂ B ∥₂ Type } + (Cset : ((x : A ∥₂) (y : B ∥₂) isSet (C x y))) + (f : (a : A) (b : B) C a ∣₂ b ∣₂) + (x : A ∥₂) (y : B ∥₂) C x y +elim2 Cset f x ∣₂ y ∣₂ = f x y +elim2 Cset f x ∣₂ (squash₂ y z p q i j) = + isOfHLevel→isOfHLevelDep 2 a Cset x ∣₂ a) _ _ + (cong (elim2 Cset f x ∣₂) p) (cong (elim2 Cset f x ∣₂) q) (squash₂ y z p q) i j +elim2 Cset f (squash₂ x y p q i j) z = + isOfHLevel→isOfHLevelDep 2 a Cset a z) _ _ + (cong a elim2 Cset f a z) p) (cong a elim2 Cset f a z) q) (squash₂ x y p q) i j + +-- Old version: +-- elim2 Cset f = elim (λ _ → isSetΠ (λ _ → Cset _ _)) +-- (λ a → elim (λ _ → Cset _ _) (f a)) + +-- TODO: generalize +elim3 : {D : A ∥₂ B ∥₂ C ∥₂ Type } + (Dset : ((x : A ∥₂) (y : B ∥₂) (z : C ∥₂) isSet (D x y z))) + (g : (a : A) (b : B) (c : C) D a ∣₂ b ∣₂ c ∣₂) + (x : A ∥₂) (y : B ∥₂) (z : C ∥₂) D x y z +elim3 Dset g = elim2 _ _ isSetΠ _ Dset _ _ _)) + a b elim _ Dset _ _ _) (g a b)) + +elim4 : {E : A ∥₂ B ∥₂ C ∥₂ D ∥₂ Type } + (Eset : ((w : A ∥₂) (x : B ∥₂) (y : C ∥₂) (z : D ∥₂) + isSet (E w x y z))) + (g : (a : A) (b : B) (c : C) (d : D) E a ∣₂ b ∣₂ c ∣₂ d ∣₂) + (w : A ∥₂) (x : B ∥₂) (y : C ∥₂) (z : D ∥₂) E w x y z +elim4 Eset g = elim3 _ _ _ isSetΠ λ _ Eset _ _ _ _) + λ a b c elim _ Eset _ _ _ _) (g a b c) + + +-- the recursor for maps into groupoids following the "HIT proof" in: +-- https://arxiv.org/abs/1507.01150 +-- i.e. for any type A and groupoid B we can construct a map ∥ A ∥₂ → B +-- from a map A → B satisfying the condition +-- ∀ (a b : A) (p q : a ≡ b) → cong f p ≡ cong f q +-- TODO: prove that this is an equivalence +module rec→Gpd {A : Type } {B : Type ℓ'} (Bgpd : isGroupoid B) (f : A B) + (congFConst : (a b : A) (p q : a b) cong f p cong f q) where + + data H : Type where + η : A H + ε : (a b : A) a b ∥₁ η a η b -- prop. trunc. of a≡b + δ : (a b : A) (p : a b) ε a b p ∣₁ cong η p + gtrunc : isGroupoid H + + -- write elimination principle for H + module Helim {P : H Type ℓ''} (Pgpd : h isGroupoid (P h)) + (η* : (a : A) P (η a)) + (ε* : (a b : A) (∣p∣₁ : a b ∥₁) + PathP i P (ε a b ∣p∣₁ i)) (η* a) (η* b)) + (δ* : (a b : A) (p : a b) + PathP i PathP j P (δ a b p i j)) (η* a) (η* b)) + (ε* a b p ∣₁) (cong η* p)) where + + fun : (h : H) P h + fun (η a) = η* a + fun (ε a b ∣p∣₁ i) = ε* a b ∣p∣₁ i + fun (δ a b p i j) = δ* a b p i j + fun (gtrunc x y p q α β i j k) = isOfHLevel→isOfHLevelDep 3 Pgpd + (fun x) (fun y) + (cong fun p) (cong fun q) + (cong (cong fun) α) (cong (cong fun) β) + (gtrunc x y p q α β) i j k + + module Hrec {C : Type ℓ''} (Cgpd : isGroupoid C) + (η* : A C) + (ε* : (a b : A) a b ∥₁ η* a η* b) + (δ* : (a b : A) (p : a b) ε* a b p ∣₁ cong η* p) where + + fun : H C + fun (η a) = η* a + fun (ε a b ∣p∣₁ i) = ε* a b ∣p∣₁ i + fun (δ a b p i j) = δ* a b p i j + fun (gtrunc x y p q α β i j k) = Cgpd (fun x) (fun y) (cong fun p) (cong fun q) + (cong (cong fun) α) (cong (cong fun) β) i j k + + module HelimProp {P : H Type ℓ''} (Pprop : h isProp (P h)) + (η* : (a : A) P (η a)) where + + fun : h P h + fun = Helim.fun _ isSet→isGroupoid (isProp→isSet (Pprop _))) η* + a b ∣p∣₁ isOfHLevel→isOfHLevelDep 1 Pprop _ _ (ε a b ∣p∣₁)) + λ a b p isOfHLevel→isOfHLevelDep 1 + {B = λ p PathP i P (p i)) (η* a) (η* b)} + _ isOfHLevelPathP 1 (Pprop _) _ _) _ _ (δ a b p) + + -- The main trick: eliminating into hsets is easy + -- i.e. H has the universal property of set truncation... + module HelimSet {P : H Type ℓ''} (Pset : h isSet (P h)) + (η* : a P (η a)) where + + fun : (h : H) P h + fun = Helim.fun _ isSet→isGroupoid (Pset _)) η* ε* + λ a b p isOfHLevel→isOfHLevelDep 1 + {B = λ p PathP i P (p i)) (η* a) (η* b)} + _ isOfHLevelPathP' 1 (Pset _) _ _) _ _ (δ a b p) + where + ε* : (a b : A) (∣p∣₁ : a b ∥₁) PathP i P (ε a b ∣p∣₁ i)) (η* a) (η* b) + ε* a b = pElim _ isOfHLevelPathP' 1 (Pset _) (η* a) (η* b)) + λ p subst x PathP i P (x i)) (η* a) (η* b)) + (sym (δ a b p)) (cong η* p) + + + -- Now we need to prove that H is a set. + -- We start with a little lemma: + localHedbergLemma : {X : Type ℓ''} (P : X Type ℓ'') + (∀ x isProp (P x)) + ((x : X) P x (y : X) P y x y) + -------------------------------------------------- + (x : X) P x (y : X) isProp (x y) + localHedbergLemma {X = X} P Pprop P→≡ x px y = isPropRetract + p subst P p px) py sym (P→≡ x px x px) P→≡ x px y py) + isRetract (Pprop y) + where + isRetract : (p : x y) (sym (P→≡ x px x px)) P→≡ x px y (subst P p px) p + isRetract = J y' p' (sym (P→≡ x px x px)) P→≡ x px y' (subst P p' px) p') + (subst px' sym (P→≡ x px x px) P→≡ x px x px' refl) + (sym (substRefl {B = P} px)) (lCancel (P→≡ x px x px))) + + Hset : isSet H + Hset = HelimProp.fun _ isPropΠ λ _ isPropIsProp) baseCaseLeft + where + baseCaseLeft : (a₀ : A) (y : H) isProp (η a₀ y) + baseCaseLeft a₀ = localHedbergLemma x Q x .fst) x Q x .snd) Q→≡ _ refl ∣₁ + where + Q : H hProp + Q = HelimSet.fun _ isSetHProp) λ b a₀ b ∥₁ , isPropPropTrunc + -- Q (η b) = ∥ a ≡ b ∥₁ + + Q→≡ : (x : H) Q x .fst (y : H) Q y .fst x y + Q→≡ = HelimSet.fun _ isSetΠ3 λ _ _ _ gtrunc _ _) + λ a p HelimSet.fun _ isSetΠ λ _ gtrunc _ _) + λ b q sym (ε a₀ a p) ε a₀ b q + + -- our desired function will split through H, + -- i.e. we get a function ∥ A ∥₂ → H → B + fun : A ∥₂ B + fun = f₁ f₂ + where + f₁ : H B + f₁ = Hrec.fun Bgpd f εᶠ λ _ _ _ refl + where + εᶠ : (a b : A) a b ∥₁ f a f b + εᶠ a b = rec→Set (Bgpd _ _) (cong f) λ p q congFConst a b p q + -- this is the inductive step, + -- we use that maps ∥ A ∥₁ → B for an hset B + -- correspond to 2-Constant maps A → B (which cong f is by assumption) + f₂ : A ∥₂ H + f₂ = rec Hset η + + +map : (A B) A ∥₂ B ∥₂ +map f = rec squash₂ λ x f x ∣₂ + +map∙ : { ℓ' : Level} {A : Pointed } {B : Pointed ℓ'} + (f : A →∙ B) A ∥₂∙ →∙ B ∥₂∙ +fst (map∙ f) = map (fst f) +snd (map∙ f) = cong ∣_∣₂ (snd f) + +setTruncUniversal : isSet B ( A ∥₂ B) (A B) +setTruncUniversal {B = B} Bset = + isoToEquiv (iso h x h x ∣₂) (rec Bset) _ refl) rinv) + where + rinv : (f : A ∥₂ B) rec Bset x f x ∣₂) f + rinv f i x = + elim x isProp→isSet (Bset (rec Bset x f x ∣₂) x) (f x))) + _ refl) x i + +isSetSetTrunc : isSet A ∥₂ +isSetSetTrunc a b p q = squash₂ a b p q + +setTruncIdempotentIso : isSet A Iso A ∥₂ A +Iso.fun (setTruncIdempotentIso hA) = rec hA (idfun _) +Iso.inv (setTruncIdempotentIso hA) x = x ∣₂ +Iso.rightInv (setTruncIdempotentIso hA) _ = refl +Iso.leftInv (setTruncIdempotentIso hA) = elim _ isSet→isGroupoid isSetSetTrunc _ _) _ refl) + +setTruncIdempotent≃ : isSet A A ∥₂ A +setTruncIdempotent≃ {A = A} hA = isoToEquiv (setTruncIdempotentIso hA) + +setTruncIdempotent : isSet A A ∥₂ A +setTruncIdempotent hA = ua (setTruncIdempotent≃ hA) + +isContr→isContrSetTrunc : isContr A isContr ( A ∥₂) +isContr→isContrSetTrunc contr = fst contr ∣₂ + , elim _ isOfHLevelPath 2 (isSetSetTrunc) _ _) + λ a cong ∣_∣₂ (snd contr a) + + +setTruncIso : Iso A B Iso A ∥₂ B ∥₂ +Iso.fun (setTruncIso is) = rec isSetSetTrunc x Iso.fun is x ∣₂) +Iso.inv (setTruncIso is) = rec isSetSetTrunc x Iso.inv is x ∣₂) +Iso.rightInv (setTruncIso is) = + elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + λ a cong ∣_∣₂ (Iso.rightInv is a) +Iso.leftInv (setTruncIso is) = + elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + λ a cong ∣_∣₂ (Iso.leftInv is a) + +setSigmaIso : {B : A Type } Iso Σ A B ∥₂ Σ A x B x ∥₂) ∥₂ +setSigmaIso {A = A} {B = B} = iso fun funinv sect retr + where + {- writing it out explicitly to avoid yellow highlighting -} + fun : Σ A B ∥₂ Σ A x B x ∥₂) ∥₂ + fun = rec isSetSetTrunc λ {(a , p) a , p ∣₂ ∣₂} + funinv : Σ A x B x ∥₂) ∥₂ Σ A B ∥₂ + funinv = rec isSetSetTrunc {(a , p) rec isSetSetTrunc p a , p ∣₂) p}) + sect : section fun funinv + sect = elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + λ { (a , p) elim {B = λ p fun (funinv a , p ∣₂) a , p ∣₂} + p isOfHLevelPath 2 isSetSetTrunc _ _) _ refl) p } + retr : retract fun funinv + retr = elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + λ { _ refl } + +sigmaElim : {B : A ∥₂ Type } {C : Σ A ∥₂ B Type ℓ'} + (Bset : (x : Σ A ∥₂ B) isSet (C x)) + (g : (a : A) (b : B a ∣₂) C ( a ∣₂ , b)) + (x : Σ A ∥₂ B) C x +sigmaElim {B = B} {C = C} set g (x , y) = + elim {B = λ x (y : B x) C (x , y)} _ isSetΠ λ _ set _) g x y + +sigmaProdElim : {C : A ∥₂ × B ∥₂ Type } {D : Σ ( A ∥₂ × B ∥₂) C Type ℓ'} + (Bset : (x : Σ ( A ∥₂ × B ∥₂) C) isSet (D x)) + (g : (a : A) (b : B) (c : C ( a ∣₂ , b ∣₂)) D (( a ∣₂ , b ∣₂) , c)) + (x : Σ ( A ∥₂ × B ∥₂) C) D x +sigmaProdElim {B = B} {C = C} {D = D} set g ((x , y) , c) = + elim {B = λ x (y : B ∥₂) (c : C (x , y)) D ((x , y) , c)} + _ isSetΠ λ _ isSetΠ λ _ set _) + x elim _ isSetΠ λ _ set _) (g x)) + x y c + +prodElim : {C : A ∥₂ × B ∥₂ Type } + ((x : A ∥₂ × B ∥₂) isSet (C x)) + ((a : A) (b : B) C ( a ∣₂ , b ∣₂)) + (x : A ∥₂ × B ∥₂) C x +prodElim setC f (a , b) = elim2 x y setC (x , y)) f a b + +prodRec : {C : Type } isSet C (A B C) A ∥₂ × B ∥₂ C +prodRec setC f (a , b) = rec2 setC f a b + +prodElim2 : {E : ( A ∥₂ × B ∥₂) ( C ∥₂ × D ∥₂) Type } + ((x : A ∥₂ × B ∥₂) (y : C ∥₂ × D ∥₂) isSet (E x y)) + ((a : A) (b : B) (c : C) (d : D) E ( a ∣₂ , b ∣₂) ( c ∣₂ , d ∣₂)) + ((x : A ∥₂ × B ∥₂) (y : C ∥₂ × D ∥₂) (E x y)) +prodElim2 isset f = prodElim _ isSetΠ λ _ isset _ _) + λ a b prodElim _ isset _ _) + λ c d f a b c d + +setTruncOfProdIso : Iso A × B ∥₂ ( A ∥₂ × B ∥₂) +Iso.fun setTruncOfProdIso = rec (isSet× isSetSetTrunc isSetSetTrunc) λ { (a , b) a ∣₂ , b ∣₂ } +Iso.inv setTruncOfProdIso = prodRec isSetSetTrunc λ a b a , b ∣₂ +Iso.rightInv setTruncOfProdIso = + prodElim _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) λ _ _ refl +Iso.leftInv setTruncOfProdIso = + elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ {(a , b) refl} + +IsoSetTruncateSndΣ : {A : Type } {B : A Type ℓ'} Iso Σ A B ∥₂ Σ A x B x ∥₂) ∥₂ +Iso.fun IsoSetTruncateSndΣ = map λ a (fst a) , snd a ∣₂ +Iso.inv IsoSetTruncateSndΣ = rec isSetSetTrunc (uncurry λ x map λ b x , b) +Iso.rightInv IsoSetTruncateSndΣ = + elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + (uncurry λ a elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + λ _ refl) +Iso.leftInv IsoSetTruncateSndΣ = + elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + λ _ refl + +PathIdTrunc₀Iso : {a b : A} Iso ( a ∣₂ b ∣₂) a b ∥₁ +Iso.fun (PathIdTrunc₀Iso {b = b}) p = + transport i rec {B = TypeOfHLevel _ 1} (isOfHLevelTypeOfHLevel 1) + a a b ∥₁ , squash₁) (p (~ i)) .fst) + refl ∣₁ +Iso.inv PathIdTrunc₀Iso = pRec (squash₂ _ _) (cong ∣_∣₂) +Iso.rightInv PathIdTrunc₀Iso _ = squash₁ _ _ +Iso.leftInv PathIdTrunc₀Iso _ = squash₂ _ _ _ _ + +mapFunctorial : {A B C : Type } (f : A B) (g : B C) + map g map f map (g f) +mapFunctorial f g = + funExt (elim x isSetPathImplicit) λ a refl) \ No newline at end of file diff --git a/Cubical.HITs.Truncation.FromNegTwo.Properties.html b/Cubical.HITs.Truncation.FromNegTwo.Properties.html index b37c89e1ef..56b028d633 100644 --- a/Cubical.HITs.Truncation.FromNegTwo.Properties.html +++ b/Cubical.HITs.Truncation.FromNegTwo.Properties.html @@ -213,10 +213,10 @@ setTruncTrunc2Iso : Iso A ∥₂ ( A 2) -Iso.fun setTruncTrunc2Iso = SetTrunc.elim _ isOfHLevelTrunc 2) ∣_∣ +Iso.fun setTruncTrunc2Iso = SetTrunc.elim _ isOfHLevelTrunc 2) ∣_∣ Iso.inv setTruncTrunc2Iso = elim _ squash₂) ∣_∣₂ Iso.rightInv setTruncTrunc2Iso = elim _ isOfHLevelPath 2 (isOfHLevelTrunc 2) _ _) _ refl) -Iso.leftInv setTruncTrunc2Iso = SetTrunc.elim _ isOfHLevelPath 2 squash₂ _ _) _ refl) +Iso.leftInv setTruncTrunc2Iso = SetTrunc.elim _ isOfHLevelPath 2 squash₂ _ _) _ refl) setTrunc≃Trunc2 : A ∥₂ A 2 setTrunc≃Trunc2 = isoToEquiv setTruncTrunc2Iso diff --git a/Cubical.HITs.Truncation.Properties.html b/Cubical.HITs.Truncation.Properties.html index 0879b94c97..5df1d38c65 100644 --- a/Cubical.HITs.Truncation.Properties.html +++ b/Cubical.HITs.Truncation.Properties.html @@ -338,10 +338,10 @@ setTruncTrunc2Iso : Iso A ∥₂ ( A 2) -Iso.fun setTruncTrunc2Iso = SetTrunc.rec (isOfHLevelTrunc 2) ∣_∣ +Iso.fun setTruncTrunc2Iso = SetTrunc.rec (isOfHLevelTrunc 2) ∣_∣ Iso.inv setTruncTrunc2Iso = rec squash₂ ∣_∣₂ Iso.rightInv setTruncTrunc2Iso = elim _ isOfHLevelPath 2 (isOfHLevelTrunc 2) _ _) _ refl) -Iso.leftInv setTruncTrunc2Iso = SetTrunc.elim _ isOfHLevelPath 2 squash₂ _ _) _ refl) +Iso.leftInv setTruncTrunc2Iso = SetTrunc.elim _ isOfHLevelPath 2 squash₂ _ _) _ refl) setTrunc≃Trunc2 : A ∥₂ A 2 setTrunc≃Trunc2 = isoToEquiv setTruncTrunc2Iso diff --git a/Cubical.Homotopy.Group.Base.html b/Cubical.Homotopy.Group.Base.html index 9637d2d9d8..783f9b1a9c 100644 --- a/Cubical.Homotopy.Group.Base.html +++ b/Cubical.Homotopy.Group.Base.html @@ -19,9 +19,9 @@ open import Cubical.Functions.Morphism open import Cubical.HITs.SetTruncation - renaming (rec to sRec ; rec2 to sRec2 - ; elim to sElim ; elim2 to sElim2 ; elim3 to sElim3 - ; map to sMap) + renaming (rec to sRec ; rec2 to sRec2 + ; elim to sElim ; elim2 to sElim2 ; elim3 to sElim3 + ; map to sMap) open import Cubical.HITs.Truncation renaming (rec to trRec ; elim to trElim ; elim2 to trElim2) open import Cubical.HITs.Sn @@ -69,27 +69,27 @@ π-rUnit : {} (n : ) {A : Pointed } (x : π (suc n) A) (·π n x ( (suc n))) x -π-rUnit n = sElim _ isSetPathImplicit) λ p i rUnit p (~ i) ∣₂ +π-rUnit n = sElim _ isSetPathImplicit) λ p i rUnit p (~ i) ∣₂ π-lUnit : {} (n : ) {A : Pointed } (x : π (suc n) A) (·π n ( (suc n)) x) x -π-lUnit n = sElim _ isSetPathImplicit) λ p i lUnit p (~ i) ∣₂ +π-lUnit n = sElim _ isSetPathImplicit) λ p i lUnit p (~ i) ∣₂ π-rCancel : {} (n : ) {A : Pointed } (x : π (suc n) A) (·π n x ( n x)) (suc n) -π-rCancel n = sElim _ isSetPathImplicit) λ p i rCancel p i ∣₂ +π-rCancel n = sElim _ isSetPathImplicit) λ p i rCancel p i ∣₂ π-lCancel : {} (n : ) {A : Pointed } (x : π (suc n) A) (·π n ( n x) x) (suc n) -π-lCancel n = sElim _ isSetPathImplicit) λ p i lCancel p i ∣₂ +π-lCancel n = sElim _ isSetPathImplicit) λ p i lCancel p i ∣₂ π-assoc : {} (n : ) {A : Pointed } (x y z : π (suc n) A) ·π n x (·π n y z) ·π n (·π n x y) z -π-assoc n = sElim3 _ _ _ isSetPathImplicit) λ p q r i ∙assoc p q r i ∣₂ +π-assoc n = sElim3 _ _ _ isSetPathImplicit) λ p q r i ∙assoc p q r i ∣₂ π-comm : {} (n : ) {A : Pointed } (x y : π (suc (suc n)) A) ·π (suc n) x y ·π (suc n) y x -π-comm n = sElim2 _ _ isSetPathImplicit) λ p q i EH n p q i ∣₂ +π-comm n = sElim2 _ _ isSetPathImplicit) λ p q i EH n p q i ∣₂ -- πₙ₊₁ πGr : {} (n : ) (A : Pointed ) Group @@ -607,27 +607,27 @@ π'-rUnit : {} (n : ) {A : Pointed } (x : π' (suc n) A) (·π' n x (1π' (suc n))) x -π'-rUnit n = sElim _ isSetPathImplicit) λ p i ∙Π-rUnit p i ∣₂ +π'-rUnit n = sElim _ isSetPathImplicit) λ p i ∙Π-rUnit p i ∣₂ π'-lUnit : {} (n : ) {A : Pointed } (x : π' (suc n) A) (·π' n (1π' (suc n)) x) x -π'-lUnit n = sElim _ isSetPathImplicit) λ p i ∙Π-lUnit p i ∣₂ +π'-lUnit n = sElim _ isSetPathImplicit) λ p i ∙Π-lUnit p i ∣₂ π'-rCancel : {} (n : ) {A : Pointed } (x : π' (suc n) A) (·π' n x (-π' n x)) 1π' (suc n) -π'-rCancel n = sElim _ isSetPathImplicit) λ p i ∙Π-rCancel p i ∣₂ +π'-rCancel n = sElim _ isSetPathImplicit) λ p i ∙Π-rCancel p i ∣₂ π'-lCancel : {} (n : ) {A : Pointed } (x : π' (suc n) A) (·π' n (-π' n x) x) 1π' (suc n) -π'-lCancel n = sElim _ isSetPathImplicit) λ p i ∙Π-lCancel p i ∣₂ +π'-lCancel n = sElim _ isSetPathImplicit) λ p i ∙Π-lCancel p i ∣₂ π'-assoc : {} (n : ) {A : Pointed } (x y z : π' (suc n) A) ·π' n x (·π' n y z) ·π' n (·π' n x y) z -π'-assoc n = sElim3 _ _ _ isSetPathImplicit) λ p q r i ∙Π-assoc p q r i ∣₂ +π'-assoc n = sElim3 _ _ _ isSetPathImplicit) λ p q r i ∙Π-assoc p q r i ∣₂ π'-comm : {} (n : ) {A : Pointed } (x y : π' (suc (suc n)) A) ·π' (suc n) x y ·π' (suc n) y x -π'-comm n = sElim2 _ _ isSetPathImplicit) λ p q i ∙Π-comm p q i ∣₂ +π'-comm n = sElim2 _ _ isSetPathImplicit) λ p q i ∙Π-comm p q i ∣₂ -- We finally get the group definition π'Gr : {} (n : ) (A : Pointed ) Group @@ -642,22 +642,22 @@ -- and finally, the Iso π'Gr≅πGr : {} (n : ) (A : Pointed ) GroupIso (π'Gr n A) (πGr n A) -fst (π'Gr≅πGr n A) = setTruncIso (IsoSphereMapΩ (suc n)) +fst (π'Gr≅πGr n A) = setTruncIso (IsoSphereMapΩ (suc n)) snd (π'Gr≅πGr n A) = - makeIsGroupHom (sElim2 _ _ isSetPathImplicit) + makeIsGroupHom (sElim2 _ _ isSetPathImplicit) λ p q i IsoSphereMapΩ-pres∙Π n p q i ∣₂) {- Proof of πₙ(ΩA) = πₙ₊₁(A) -} Iso-πΩ-π : {} {A : Pointed } (n : ) Iso (π n (Ω A)) (π (suc n) A) -Iso-πΩ-π {A = A} n = setTruncIso (invIso (flipΩIso n)) +Iso-πΩ-π {A = A} n = setTruncIso (invIso (flipΩIso n)) GrIso-πΩ-π : {} {A : Pointed } (n : ) GroupIso (πGr n (Ω A)) (πGr (suc n) A) fst (GrIso-πΩ-π n) = Iso-πΩ-π _ snd (GrIso-πΩ-π n) = makeIsGroupHom - (sElim2 _ _ isSetPathImplicit) + (sElim2 _ _ isSetPathImplicit) λ p q cong ∣_∣₂ (flipΩIso⁻pres· n p q)) @@ -791,22 +791,22 @@ πTruncIso : {} {A : Pointed } (n : ) Iso (π n A) (π n (hLevelTrunc∙ (2 + n) A)) πTruncIso {A = A} zero = - compIso (invIso (setTruncIdempotentIso squash₂)) - (setTruncIso setTruncTrunc2Iso) + compIso (invIso (setTruncIdempotentIso squash₂)) + (setTruncIso setTruncTrunc2Iso) πTruncIso {A = A} (suc n) = compIso setTruncTrunc2Iso (compIso (2TruncΩIso (suc n)) - (invIso (setTruncIdempotentIso (isSetΩTrunc n)))) + (invIso (setTruncIdempotentIso (isSetΩTrunc n)))) πTruncGroupIso : {} {A : Pointed } (n : ) GroupIso (πGr n A) (πGr n (hLevelTrunc∙ (3 + n) A)) fst (πTruncGroupIso n) = πTruncIso (suc n) snd (πTruncGroupIso {A = A} n) = makeIsGroupHom - (sElim2 _ _ isSetPathImplicit) + (sElim2 _ _ isSetPathImplicit) λ a b - cong (inv (setTruncIdempotentIso (isSetΩTrunc n))) + cong (inv (setTruncIdempotentIso (isSetΩTrunc n))) (cong (transport i typ ((Ω^ suc n) (hLevelTrunc∙ (+-comm (suc n) 2 i) A)))) @@ -978,7 +978,7 @@ fst (πHom n f) = πFun n f snd (πHom n f) = makeIsGroupHom - (sElim2 _ _ isSetPathImplicit) + (sElim2 _ _ isSetPathImplicit) λ p q cong ∣_∣₂ (Ω^→pres∙ f n p q)) π'∘∙Hom' : { ℓ'} {A : Pointed } {B : Pointed ℓ'} (n : ) (f : A →∙ B) @@ -990,7 +990,7 @@ π'∘∙Hom'≡π'∘∙fun : { ℓ'} {A : Pointed } {B : Pointed ℓ'} (n : ) (f : A →∙ B) π'∘∙Hom' n f .fst π'∘∙fun n f π'∘∙Hom'≡π'∘∙fun n f = - funExt (sElim _ isSetPathImplicit) + funExt (sElim _ isSetPathImplicit) λ g cong ∣_∣₂ ((λ i inv (IsoSphereMapΩ (suc n)) (transportRefl (Ω^→ (suc n) f .fst @@ -1023,7 +1023,7 @@ π'eqFun n (idEquiv (fst A) , _ pt A)) idfun _ π'eqFun-idEquiv n = - funExt (sElim _ isSetPathImplicit) + funExt (sElim _ isSetPathImplicit) λ f cong ∣_∣₂ (∘∙-idʳ f)) invEquiv∙idEquiv∙≡idEquiv : {} {A : Pointed } @@ -1079,7 +1079,7 @@ fst (fst (πIso e n)) = fst (πHom n (≃∙map e)) snd (fst (πIso e n)) = isoToIsEquiv - (setTruncIso + (setTruncIso (equivToIso (_ , isEquivΩ^→ (suc n) (≃∙map e) (snd (fst e))))) snd (πIso e n) = snd (πHom n (≃∙map e)) \ No newline at end of file diff --git a/Cubical.Homotopy.Group.LES.html b/Cubical.Homotopy.Group.LES.html index 9a9863c8ea..11007d9820 100644 --- a/Cubical.Homotopy.Group.LES.html +++ b/Cubical.Homotopy.Group.LES.html @@ -24,9 +24,9 @@ open import Cubical.Foundations.Function open import Cubical.HITs.SetTruncation - renaming (rec to sRec - ; elim to sElim ; elim2 to sElim2 - ; map to sMap) + renaming (rec to sRec + ; elim to sElim ; elim2 to sElim2 + ; map to sMap) open import Cubical.HITs.PropositionalTruncation renaming (rec to pRec) @@ -525,18 +525,18 @@ λ p ker pRec squash₁ ker∙ ind p ker∙ .fst ∣₂ , cong ∣_∣₂ (ind p ker∙ .snd) ∣₁ ) - (fun PathIdTrunc₀Iso ker) + (fun PathIdTrunc₀Iso ker) im⊂ker : ((x : typ (Ω ((Ω^ m) B))) isInIm∙ f x isInKer∙ g x) (x : π (suc m) B) isInIm (_ , e₁) x isInKer (_ , e₂) x im⊂ker ind = - sElim _ isSetΠ λ _ isSetPathImplicit) + sElim _ isSetΠ λ _ isSetPathImplicit) λ p pRec (squash₂ _ _) - (uncurry (sElim _ isSetΠ λ _ isSetPathImplicit) + (uncurry (sElim _ isSetΠ λ _ isSetPathImplicit) λ a q pRec (squash₂ _ _) q cong ∣_∣₂ (ind p (a , q))) - (fun PathIdTrunc₀Iso q))) + (fun PathIdTrunc₀Iso q))) {- The long exact sequence of homotopy groups -} module πLES { ℓ' : Level} {A : Pointed } {B : Pointed ℓ'} (f : A →∙ B) where @@ -549,14 +549,14 @@ fst (fib→A n) = sMap (fst (Ω^fibf→A (suc n))) snd (fib→A n) = makeIsGroupHom - (sElim2 _ _ isSetPathImplicit) + (sElim2 _ _ isSetPathImplicit) λ p q cong ∣_∣₂ (Ω^fibf→A-pres∙ n p q)) A→B : (n : ) GroupHom (πGr n A) (πGr n B) fst (A→B n) = sMap (fst (A→B' (suc n))) snd (A→B n) = makeIsGroupHom - (sElim2 _ _ isSetPathImplicit) + (sElim2 _ _ isSetPathImplicit) λ g h cong ∣_∣₂ (Ω^→pres∙ f n g h)) B→fib : (n : ) GroupHom (πGr (suc n) B) (πGr n fib) @@ -564,7 +564,7 @@ snd (B→fib n) = makeIsGroupHom (sElim2 - _ _ isSetPathImplicit) + _ _ isSetPathImplicit) λ p q cong ∣_∣₂ (ΩB→Ω^fibf-pres∙ n p q)) Ker-A→B⊂Im-fib→A : (n : ) (x : π (suc n) A) diff --git a/Cubical.Homotopy.Group.Pi3S2.html b/Cubical.Homotopy.Group.Pi3S2.html index c9c4dc250c..a4ce169e15 100644 --- a/Cubical.Homotopy.Group.Pi3S2.html +++ b/Cubical.Homotopy.Group.Pi3S2.html @@ -24,7 +24,7 @@ open Iso open import Cubical.Foundations.Equiv -open import Cubical.HITs.SetTruncation renaming (elim to sElim) +open import Cubical.HITs.SetTruncation renaming (elim to sElim) open import Cubical.HITs.Sn open import Cubical.HITs.Susp open import Cubical.HITs.S1 @@ -77,12 +77,12 @@ SES→isEquiv (isContr→≡UnitGroup (subst isContr (cong (π 3) (sym IsoFiberTotalHopfS¹∙≡)) - ( refl ∣₂ , (sElim _ isSetPathImplicit) + ( refl ∣₂ , (sElim _ isSetPathImplicit) p cong ∣_∣₂ (isOfHLevelSuc 3 isGroupoidS¹ _ _ _ _ _ _ refl p)))))) (isContr→≡UnitGroup (subst isContr (cong (π 2) (sym IsoFiberTotalHopfS¹∙≡)) - ( refl ∣₂ , (sElim _ isSetPathImplicit) p + ( refl ∣₂ , (sElim _ isSetPathImplicit) p cong ∣_∣₂ (isGroupoidS¹ _ _ _ _ refl p)))))) (πLES.fib→A TotalHopf→∙S² 2) (πLES.A→B TotalHopf→∙S² 2) diff --git a/Cubical.Homotopy.Group.Pi4S3.BrunerieExperiments.html b/Cubical.Homotopy.Group.Pi4S3.BrunerieExperiments.html index 2d6b2f2e56..e4aae3ad2c 100644 --- a/Cubical.Homotopy.Group.Pi4S3.BrunerieExperiments.html +++ b/Cubical.Homotopy.Group.Pi4S3.BrunerieExperiments.html @@ -258,7 +258,7 @@ g9 = encodeTruncS¹ g10 : ∥₂ -g10 = SetTrunc.rec isSetℤ (idfun ) +g10 = SetTrunc.rec isSetℤ (idfun ) -- don't run me brunerie : diff --git a/Cubical.Homotopy.Group.Pi4S3.BrunerieNumber.html b/Cubical.Homotopy.Group.Pi4S3.BrunerieNumber.html index 94d57023fb..4f997dabbf 100644 --- a/Cubical.Homotopy.Group.Pi4S3.BrunerieNumber.html +++ b/Cubical.Homotopy.Group.Pi4S3.BrunerieNumber.html @@ -44,9 +44,9 @@ open import Cubical.HITs.PropositionalTruncation renaming (rec to pRec ; elim to pElim ; map to pMap) open import Cubical.HITs.SetTruncation - renaming (rec to sRec ; rec2 to sRec2 - ; elim to sElim ; elim2 to sElim2 ; elim3 to sElim3 - ; map to sMap) + renaming (rec to sRec ; rec2 to sRec2 + ; elim to sElim ; elim2 to sElim2 ; elim3 to sElim3 + ; map to sMap) open import Cubical.HITs.Truncation renaming (rec to trRec ; elim to trElim ; elim2 to trElim2 ; map to trMap) @@ -224,7 +224,7 @@ iso₂ : Iso (π 2 (hLevelTrunc∙ 4 (S₊∙ 3))) (π 2 TotalPushoutPath×∙) iso₂ = - (compIso (setTruncIso + (compIso (setTruncIso (equivToIso (_ , (isEquivΩ^→ 2 (fun iso₁ , refl) (isoToIsEquiv iso₁))))) (invIso (πTruncIso 2))) @@ -235,7 +235,7 @@ i ((sym (isContr→≡Unit (sphereConnected 3))) i) , transp j isContr→≡Unit (sphereConnected 3) (~ i j)) i north ) - ( refl ∣₂ , sElim _ isSetPathImplicit) + ( refl ∣₂ , sElim _ isSetPathImplicit) λ p cong ∣_∣₂ (isProp→isSet (isOfHLevelPath 1 isPropUnit _ _) _ _ _ p)) @@ -323,7 +323,7 @@ π'∘∙Hom 2 (fold∘W , refl) tripleComp≡ = Σ≡Prop _ isPropIsGroupHom _ _) - (funExt (sElim _ isSetPathImplicit) + (funExt (sElim _ isSetPathImplicit) λ f cong ∣_∣₂ (ΣPathP (refl , (cong (_∙ refl) j cong fst (rUnit (cong (fst TotalPushoutPath×∙→P) (rUnit (cong S³→TotalPushoutPath× (snd f)) (~ j))) (~ j)))))))) diff --git a/Cubical.Homotopy.Group.Pi4S3.DirectProof.html b/Cubical.Homotopy.Group.Pi4S3.DirectProof.html index 436a767961..97415fae0c 100644 --- a/Cubical.Homotopy.Group.Pi4S3.DirectProof.html +++ b/Cubical.Homotopy.Group.Pi4S3.DirectProof.html @@ -88,7 +88,7 @@ open import Cubical.HITs.Wedge open import Cubical.HITs.Pushout open import Cubical.HITs.SetTruncation - renaming (rec2 to sRec2 ; elim to sElim ; elim2 to sElim2 ; map to sMap) + renaming (rec2 to sRec2 ; elim to sElim ; elim2 to sElim2 ; map to sMap) open import Cubical.HITs.Truncation as Trunc renaming (rec to trRec) open import Cubical.HITs.PropositionalTruncation as PropTrunc open import Cubical.HITs.GroupoidTruncation as GroupoidTrunc @@ -288,11 +288,11 @@ fun π₃*Iso = sMap joinify inv π₃*Iso = sMap disjoin rightInv π₃*Iso = - sElim _ isSetPathImplicit) + sElim _ isSetPathImplicit) λ f to3ConnectedId con (funExt λ x cong (fst f) (Iso.leftInv (IsoSphereJoin 1 1) x)) leftInv π₃*Iso = - sElim _ isSetPathImplicit) + sElim _ isSetPathImplicit) λ f to3ConnectedId con (funExt x cong (fst f) (Iso.rightInv (IsoSphereJoin 1 1) x))) @@ -301,13 +301,13 @@ (π'Gr 2 A) (sRec2 squash₂ x y x +join y ∣₂)) (isoToEquiv π₃*Iso) - (sElim2 _ _ isSetPathImplicit) f g cong ∣_∣₂ (+join≡∙Π f g))) + (sElim2 _ _ isSetPathImplicit) f g cong ∣_∣₂ (+join≡∙Π f g))) π₃≅π₃* : GroupEquiv (π'Gr 2 A) π₃* π₃≅π₃* = InducedGroupEquivFromPres· (π'Gr 2 A) (sRec2 squash₂ x y x +join y ∣₂)) (isoToEquiv π₃*Iso) - (sElim2 _ _ isSetPathImplicit) f g cong ∣_∣₂ (+join≡∙Π f g))) + (sElim2 _ _ isSetPathImplicit) f g cong ∣_∣₂ (+join≡∙Π f g))) -- Induced homomorphisms (A →∙ B) → (π₃*(A) → π₃*(B)) @@ -318,7 +318,7 @@ fst postCompπ₃* = sMap (f ∘∙_) snd postCompπ₃* = makeIsGroupHom - (sElim2 _ _ isSetPathImplicit) + (sElim2 _ _ isSetPathImplicit) λ h g to3ConnectedId conB (funExt λ { (inl x) refl ; (inr x) refl @@ -350,10 +350,10 @@ fun h = fst (postCompπ₃* conA conB (≃∙map f)) inv h = fst (postCompπ₃* conB conA (≃∙map (invEquiv∙ f))) rightInv h = - sElim _ isSetPathImplicit) + sElim _ isSetPathImplicit) λ g to3ConnectedId conB (funExt λ x secEq (fst f) (fst g x)) leftInv h = - sElim _ isSetPathImplicit) + sElim _ isSetPathImplicit) λ g to3ConnectedId conA (funExt λ x retEq (fst f) (fst g x)) snd postCompπ₃*Equiv = snd (postCompπ₃* conA conB (≃∙map f)) @@ -485,7 +485,7 @@ (invEq (fst (π'Iso 2 (isoToEquiv Iso-joinS¹S¹-S³ , _ north)))) f))) fst GrEq .fst f - main = sElim _ isSetPathImplicit) + main = sElim _ isSetPathImplicit) λ f to3ConnectedId (sphereConnected 2) (funExt λ x i fst (JoinS¹S¹→TotalHopf (Iso.inv (IsoSphereJoin 1 1) @@ -495,7 +495,7 @@ idLem : fst π₃*joinS¹S¹→π₃*S²' fst π₃*joinS¹S¹→π₃*S² idLem = - funExt (sElim _ isSetPathImplicit) + funExt (sElim _ isSetPathImplicit) λ f to3ConnectedId (sphereConnected 2) (funExt λ x lem (fst f x))) where @@ -876,7 +876,7 @@ fun π₃*S³'≅π₁S¹→∙ΩS³'-raw = sMap map→ inv π₃*S³'≅π₁S¹→∙ΩS³'-raw = sMap map← rightInv π₃*S³'≅π₁S¹→∙ΩS³'-raw = - sElim _ isSetPathImplicit) + sElim _ isSetPathImplicit) λ f cong ∣_∣₂ (→∙Homogeneous≡ (subst isHomogeneous @@ -902,7 +902,7 @@ sym (rUnit refl)) ∙∙ sym (rUnit (f .fst x .fst y))))) leftInv π₃*S³'≅π₁S¹→∙ΩS³'-raw = - sElim _ isSetPathImplicit) + sElim _ isSetPathImplicit) λ f cong ∣_∣₂ (ΣPathP ((funExt { (inl x) sym (snd f) @@ -939,7 +939,7 @@ fst π₁S¹→∙ΩS³'≅π₃*S³' = invIso π₃*S³'≅π₁S¹→∙ΩS³'-raw snd π₁S¹→∙ΩS³'≅π₃*S³' = makeIsGroupHom - (sElim2 _ _ isSetPathImplicit) + (sElim2 _ _ isSetPathImplicit) λ f g cong ∣_∣₂ (ΣPathP ((funExt { (inl x) refl ; (inr x) refl @@ -1078,7 +1078,7 @@ π₁S¹→ℤ = compGroupHom ((sMap f basechange2⁻ _ (cong (fst f) loop))) - , makeIsGroupHom (sElim2 _ _ isSetPathImplicit) + , makeIsGroupHom (sElim2 _ _ isSetPathImplicit) λ f g i (basechange2⁻ (snd f (~ i)) (doubleCompPath-filler diff --git a/Cubical.Homotopy.Group.Pi4S3.S3PushoutIso.html b/Cubical.Homotopy.Group.Pi4S3.S3PushoutIso.html index b1a72edca1..cd087186f3 100644 --- a/Cubical.Homotopy.Group.Pi4S3.S3PushoutIso.html +++ b/Cubical.Homotopy.Group.Pi4S3.S3PushoutIso.html @@ -32,9 +32,9 @@ open import Cubical.Functions.Morphism open import Cubical.HITs.SetTruncation - renaming (rec to sRec ; rec2 to sRec2 - ; elim to sElim ; elim2 to sElim2 ; elim3 to sElim3 - ; map to sMap) + renaming (rec to sRec ; rec2 to sRec2 + ; elim to sElim ; elim2 to sElim2 ; elim3 to sElim3 + ; map to sMap) open import Cubical.HITs.Sn open import Cubical.HITs.Susp renaming (toSusp to σ) open import Cubical.HITs.S1 hiding (decode ; encode) diff --git a/Cubical.Homotopy.Group.PinSn.html b/Cubical.Homotopy.Group.PinSn.html index 1c937aa300..d830302014 100644 --- a/Cubical.Homotopy.Group.PinSn.html +++ b/Cubical.Homotopy.Group.PinSn.html @@ -21,8 +21,8 @@ open import Cubical.Foundations.Isomorphism open import Cubical.HITs.SetTruncation - renaming (elim to sElim ; elim2 to sElim2 - ; map to sMap) + renaming (elim to sElim ; elim2 to sElim2 + ; map to sMap) open import Cubical.HITs.Truncation renaming (elim to trElim ; elim2 to trElim2) open import Cubical.HITs.S1 @@ -79,7 +79,7 @@ GroupIso (π'Gr (suc n) (S₊∙ (2 + n))) (π'Gr (2 + n) (S₊∙ (3 + n))) fst (SphereSuspGrIso n) = SphereSuspIso n snd (SphereSuspGrIso n) = - makeIsGroupHom (sElim2 _ _ isSetPathImplicit) + makeIsGroupHom (sElim2 _ _ isSetPathImplicit) λ f g IsGroupHom.pres· (suspMapπ'Hom (suc n) .snd) f ∣₂ g ∣₂) private @@ -96,12 +96,12 @@ fun (fst (flipSquareIso n)) = sMap flipSquare inv (fst (flipSquareIso n)) = sMap flipSquare rightInv (fst (flipSquareIso n)) = - sElim _ isSetPathImplicit) λ _ refl + sElim _ isSetPathImplicit) λ _ refl leftInv (fst (flipSquareIso n)) = - sElim _ isSetPathImplicit) λ _ refl + sElim _ isSetPathImplicit) λ _ refl snd (flipSquareIso n) = makeIsGroupHom - (sElim2 _ _ isSetPathImplicit) + (sElim2 _ _ isSetPathImplicit) λ f g cong ∣_∣₂ ((sym (sym≡flipSquare (f g)) ∙∙ symDistr f g @@ -126,7 +126,7 @@ (invIso setTruncTrunc2Iso)) snd π₂S²≅π₁S¹ = makeIsGroupHom - (sElim2 _ _ isSetPathImplicit) + (sElim2 _ _ isSetPathImplicit) λ f g cong (inv setTruncTrunc2Iso) (cong (fun (PathIdTruncIso 2)) @@ -154,7 +154,7 @@ (Cubical.HITs.Truncation.map2 _∙_ p q) ·π 0 (inv setTruncTrunc2Iso p) (inv setTruncTrunc2Iso q) setTruncTrunc2IsoFunct = - trElim2 _ _ isSetPathImplicit) λ _ _ refl + trElim2 _ _ isSetPathImplicit) λ _ _ refl π₂'S²≅π₁'S¹ : GroupIso (π'Gr 1 (S₊∙ 2)) (π'Gr 0 (S₊∙ 1)) π₂'S²≅π₁'S¹ = @@ -167,7 +167,7 @@ πₙ'Sⁿ≅ℤ : (n : ) GroupIso (π'Gr n (S₊∙ (suc n))) ℤGroup πₙ'Sⁿ≅ℤ zero = compGroupIso (π'Gr≅πGr zero (S₊∙ 1)) - ((compIso (setTruncIdempotentIso (isGroupoidS¹ _ _)) ΩS¹Isoℤ) + ((compIso (setTruncIdempotentIso (isGroupoidS¹ _ _)) ΩS¹Isoℤ) , makeIsGroupHom (sElim2 _ _ isProp→isSet (isSetℤ _ _)) winding-hom)) πₙ'Sⁿ≅ℤ (suc zero) = compGroupIso π₂'S²≅π₁'S¹ (πₙ'Sⁿ≅ℤ zero) @@ -182,7 +182,7 @@ -- The goal now is to show that πₙ'Sⁿ≅ℤ takes idfun∙ : Sⁿ → Sⁿ to 1. -- For this, we need a bunch of identities: private - Isoπ₁S¹ℤ = (compIso (setTruncIdempotentIso (isGroupoidS¹ _ _)) ΩS¹Isoℤ) + Isoπ₁S¹ℤ = (compIso (setTruncIdempotentIso (isGroupoidS¹ _ _)) ΩS¹Isoℤ) π'₂S²≅π₂S²⁻-stLoop' : inv (fst (π'₂S²≅π₂S²)) stLoop₁flip idfun∙ _ ∣₂ π'₂S²≅π₂S²⁻-stLoop' = @@ -258,7 +258,7 @@ sym (leftInv Isoπ₁S¹ℤ (fun (fst π₂S²≅π₁S¹) stLoop₁)) ∙∙ cong (inv Isoπ₁S¹ℤ) compute - ∙∙ leftInv (compIso (setTruncIdempotentIso (isGroupoidS¹ _ _)) ΩS¹Isoℤ) + ∙∙ leftInv (compIso (setTruncIdempotentIso (isGroupoidS¹ _ _)) ΩS¹Isoℤ) loop ∣₂ where compute : fun Isoπ₁S¹ℤ (fun (fst π₂S²≅π₁S¹) stLoop₁) diff --git a/Cubical.Homotopy.Group.SuspensionMap.html b/Cubical.Homotopy.Group.SuspensionMap.html index e0b037b9db..664503e4e4 100644 --- a/Cubical.Homotopy.Group.SuspensionMap.html +++ b/Cubical.Homotopy.Group.SuspensionMap.html @@ -39,8 +39,8 @@ open import Cubical.HITs.PropositionalTruncation renaming (rec to pRec ; rec2 to pRec2 ; elim to pElim) open import Cubical.HITs.SetTruncation - renaming (rec to sRec ; rec2 to sRec2 ; elim to sElim - ; elim2 to sElim2 ; elim3 to sElim3 ; map to sMap) + renaming (rec to sRec ; rec2 to sRec2 ; elim to sElim + ; elim2 to sElim2 ; elim3 to sElim3 ; map to sMap) open import Cubical.HITs.Truncation renaming (rec to trRec) @@ -559,22 +559,22 @@ fst (suspMapπHom {A = A} n) = suspMapπ (suc n) snd (suspMapπHom {A = A} n) = makeIsGroupHom - (sElim2 _ _ isSetPathImplicit) + (sElim2 _ _ isSetPathImplicit) λ p q cong ∣_∣₂ (suspMapΩ→hom n p q)) suspMapπ'Hom : {} {A : Pointed } (n : ) GroupHom (π'Gr n A) (π'Gr (suc n) (Susp∙ (typ A))) fst (suspMapπ'Hom {A = A} n) = suspMapπ' n snd (suspMapπ'Hom {A = A} n) = - makeIsGroupHom (sElim2 _ _ isSetPathImplicit) + makeIsGroupHom (sElim2 _ _ isSetPathImplicit) λ f g cong ∣_∣₂ (isHom-suspMap n f g)) πGr≅π'Grᵣ : {} (n : ) (A : Pointed ) GroupIso (πGr (suc n) (Susp∙ (typ A))) (π'Gr (suc n) (Susp∙ (typ A))) -fst (πGr≅π'Grᵣ n A) = setTruncIso (IsoΩSphereMapᵣ (suc n)) +fst (πGr≅π'Grᵣ n A) = setTruncIso (IsoΩSphereMapᵣ (suc n)) snd (πGr≅π'Grᵣ n A) = - makeIsGroupHom (sElim2 _ _ isSetPathImplicit) + makeIsGroupHom (sElim2 _ _ isSetPathImplicit) λ f g cong ∣_∣₂ (isHom-IsoΩSphereMapᵣ n f g)) private diff --git a/Cubical.Homotopy.HopfInvariant.Base.html b/Cubical.Homotopy.HopfInvariant.Base.html index 44cadeb6e8..21365cf9d3 100644 --- a/Cubical.Homotopy.HopfInvariant.Base.html +++ b/Cubical.Homotopy.HopfInvariant.Base.html @@ -49,7 +49,7 @@ open import Cubical.HITs.Truncation renaming (rec to trRec) open import Cubical.HITs.SetTruncation - renaming (rec to sRec ; elim to sElim ; elim2 to sElim2 ; map to sMap) + renaming (rec to sRec ; elim to sElim ; elim2 to sElim2 ; map to sMap) open import Cubical.HITs.PropositionalTruncation renaming (rec to pRec) diff --git a/Cubical.Homotopy.HopfInvariant.Brunerie.html b/Cubical.Homotopy.HopfInvariant.Brunerie.html index aa5559fe5c..efa3b74fc8 100644 --- a/Cubical.Homotopy.HopfInvariant.Brunerie.html +++ b/Cubical.Homotopy.HopfInvariant.Brunerie.html @@ -47,7 +47,7 @@ open import Cubical.HITs.Wedge open import Cubical.HITs.Truncation open import Cubical.HITs.SetTruncation - renaming (elim to sElim ; elim2 to sElim2 ; map to sMap) + renaming (elim to sElim ; elim2 to sElim2 ; map to sMap) open import Cubical.HITs.PropositionalTruncation renaming (map to pMap ; rec to pRec) @@ -148,7 +148,7 @@ fst (fst isEquiv-qHom) = qHom .fst snd (fst isEquiv-qHom) = subst isEquiv - (funExt (sElim _ isSetPathImplicit) _ refl))) + (funExt (sElim _ isSetPathImplicit) _ refl))) (×UnitEquiv (isoToPath (invIso (fst (Hⁿ-Sᵐ≅0 3 1 λ p snotz (cong predℕ p))))) @@ -260,7 +260,7 @@ qpres⌣ : (x y : coHom 2 _) fst qHom (x y) fst (qHomGen 2) x fst (qHomGen 2) y - qpres⌣ = sElim2 _ _ isSetPathImplicit) λ _ _ refl + qpres⌣ = sElim2 _ _ isSetPathImplicit) λ _ _ refl α'↦x+y : fst (qHomGen 2) α' x +ₕ y α'↦x+y = lem ((coHomFun 2 (inv CHopfIso) α)) refl @@ -268,7 +268,7 @@ lem : (x' : coHom 2 (Pushout⋁↪fold⋁ (S₊∙ 2))) coHomFun 2 inr x' ∣_∣ ∣₂ fst (qHomGen 2) x' x +ₕ y - lem = sElim _ isSetΠ λ _ isSetPathImplicit) + lem = sElim _ isSetΠ λ _ isSetPathImplicit) λ f p Cubical.HITs.PropositionalTruncation.rec (squash₂ _ _) r cong ∣_∣₂ (funExt (uncurry @@ -277,7 +277,7 @@ ((λ x cong f (push (inl x)) ∙∙ funExt⁻ r x ∙∙ sym (rUnitₖ 2 x ∣ₕ))) (cong (_∙∙ funExt⁻ r north ∙∙ refl) (cong (cong f) λ j i push (push tt j) i)))))) - (fun PathIdTrunc₀Iso p) + (fun PathIdTrunc₀Iso p) mainEq : ((fst qHom) (α' α') qHom .fst (β' +ₕ β')) @@ -305,7 +305,7 @@ distLem : (x : coHom 4 (S₊ 2 × S₊ 2)) -ₕ ((-ₕ x) +ₕ (-ₕ x)) x +ₕ x distLem = - sElim _ isSetPathImplicit) + sElim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x cong -ₖ_ (sym (-distrₖ 4 (f x) (f x))) -ₖ^2 (f x +ₖ f x)) @@ -325,7 +325,7 @@ -ₕ'Id : (x : coHom 4 (S₊ 2 × S₊ 2)) (-ₕ'^ 2 · 2) x x -ₕ'Id = - sElim _ isSetPathImplicit) + sElim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x -ₖ'-gen-inl-left 2 2 tt (inl tt) (f x)) y⌣x≡x⌣y : y x x y diff --git a/Cubical.Homotopy.HopfInvariant.Homomorphism.html b/Cubical.Homotopy.HopfInvariant.Homomorphism.html index 072f143aff..3946d6ac14 100644 --- a/Cubical.Homotopy.HopfInvariant.Homomorphism.html +++ b/Cubical.Homotopy.HopfInvariant.Homomorphism.html @@ -47,7 +47,7 @@ open import Cubical.HITs.Wedge open import Cubical.HITs.Truncation open import Cubical.HITs.SetTruncation - renaming (elim to sElim ; elim2 to sElim2 ; map to sMap) + renaming (elim to sElim ; elim2 to sElim2 ; map to sMap) open import Cubical.HITs.PropositionalTruncation open PlusBis diff --git a/Cubical.Homotopy.HopfInvariant.HopfMap.html b/Cubical.Homotopy.HopfInvariant.HopfMap.html index 6ba2999d65..8149f70328 100644 --- a/Cubical.Homotopy.HopfInvariant.HopfMap.html +++ b/Cubical.Homotopy.HopfInvariant.HopfMap.html @@ -53,8 +53,8 @@ open import Cubical.HITs.Truncation renaming (rec to trRec ; elim to trElim) open import Cubical.HITs.SetTruncation - renaming (rec to sRec ; rec2 to sRec2 - ; elim to sElim ; elim2 to sElim2 ; map to sMap) + renaming (rec to sRec ; rec2 to sRec2 + ; elim to sElim ; elim2 to sElim2 ; map to sMap) open import Cubical.HITs.PropositionalTruncation renaming (rec to pRec) diff --git a/Cubical.Homotopy.Loopspace.html b/Cubical.Homotopy.Loopspace.html index c99ce03afe..78af9f8d9a 100644 --- a/Cubical.Homotopy.Loopspace.html +++ b/Cubical.Homotopy.Loopspace.html @@ -455,10 +455,10 @@ {- Homotopy group version -} π-comp : {} {A : Pointed } (n : ) typ ((Ω^ (suc n)) A) ∥₂ typ ((Ω^ (suc n)) A) ∥₂ typ ((Ω^ (suc n)) A) ∥₂ -π-comp n = elim2 _ _ isSetSetTrunc) λ p q p q ∣₂ +π-comp n = elim2 _ _ isSetSetTrunc) λ p q p q ∣₂ EH-π : {} {A : Pointed } (n : ) (p q : typ ((Ω^ (2 + n)) A) ∥₂) π-comp (1 + n) p q π-comp (1 + n) q p -EH-π n = elim2 x y isOfHLevelPath 2 isSetSetTrunc _ _) +EH-π n = elim2 x y isOfHLevelPath 2 isSetSetTrunc _ _) λ p q cong ∣_∣₂ (EH n p q) \ No newline at end of file diff --git a/Cubical.Homotopy.Whitehead.html b/Cubical.Homotopy.Whitehead.html index 9273d6d9ab..e6e4a3de18 100644 --- a/Cubical.Homotopy.Whitehead.html +++ b/Cubical.Homotopy.Whitehead.html @@ -97,7 +97,7 @@ [_∣_]π' : {} {X : Pointed } {n m : } π' (suc n) X π' (suc m) X π' (suc (n + m)) X -[_∣_]π' = elim2 _ _ squash₂) λ f g [ f g ] ∣₂ +[_∣_]π' = elim2 _ _ squash₂) λ f g [ f g ] ∣₂ -- We prove that the function joinTo⋁ used in the definition of the whitehead -- product gives an equivalence between (Susp A × Susp B) and the diff --git a/Cubical.Homotopy.WhiteheadsLemma.html b/Cubical.Homotopy.WhiteheadsLemma.html index f97484ac00..d35eb1ebe6 100644 --- a/Cubical.Homotopy.WhiteheadsLemma.html +++ b/Cubical.Homotopy.WhiteheadsLemma.html @@ -22,7 +22,7 @@ open import Cubical.Data.Nat open import Cubical.Data.Sigma open import Cubical.HITs.PropositionalTruncation hiding (map) -open import Cubical.HITs.SetTruncation renaming (rec to sRec ; elim to sElim) +open import Cubical.HITs.SetTruncation renaming (rec to sRec ; elim to sElim) open import Cubical.Homotopy.Group.Base open import Cubical.Homotopy.Loopspace @@ -123,16 +123,16 @@ Iso.inv (Iso-πΩ-π (1 + n)) (fst (πHom {A = (A , a)} {B = (B , f a)} (1 + n) (f , refl))) (Iso.fun (Iso-πΩ-π (1 + n))) - map (Iso.inv (invIso (flipΩIso (1 + n))) + map (Iso.inv (invIso (flipΩIso (1 + n))) fst ((Ω^→ (2 + n)) (f , refl)) Iso.fun (invIso (flipΩIso (1 + n)))) πHomπHomCongSquareAux {n = n} f = cong ( λ g g (Iso.fun (Iso-πΩ-π (1 + n)))) - ( mapFunctorial + ( mapFunctorial ( fst ((Ω^→ (2 + n)) (f , refl))) ( Iso.fun (flipΩIso (1 + n)))) - mapFunctorial + mapFunctorial ( Iso.inv (flipΩIso (1 + n))) ( Iso.fun (flipΩIso (1 + n)) fst ((Ω^→ (2 + n)) (f , refl))) @@ -209,8 +209,8 @@ (fst (πHom n (cong f , refl))) πHomπHomCongSquare {A = A} {B = B} {a = a} {n = n} f = πHomπHomCongSquareAux {A = A} {B = B} {a = a} {n = n} f - cong map (Ω+1ΩCongSquare {A = A} {B = B} {a = a} {n = n} f) - cong map (cong (fst (Ω^→ (1 + n))) + cong map (Ω+1ΩCongSquare {A = A} {B = B} {a = a} {n = n} f) + cong map (cong (fst (Ω^→ (1 + n))) ( funExt∙ ( a sym (rUnit (cong f a))) , rUnit (∙∙lCancel refl)))) @@ -233,21 +233,21 @@ private congEquiv→EquivAux : {A B : Type } (f : A B) - (hf0 : isEquiv (map f)) - (b : B) Σ[ a A ∥₂ ] ((map f) a b ∣₂) + (hf0 : isEquiv (map f)) + (b : B) Σ[ a A ∥₂ ] ((map f) a b ∣₂) congEquiv→EquivAux f hf0 b = fst (equiv-proof hf0 b ∣₂) congEquiv→EquivAux''' : {A B : Type } (f : A B) (b : B) - Σ[ a A ∥₂ ] ((map f) a b ∣₂) + Σ[ a A ∥₂ ] ((map f) a b ∣₂) Σ[ a A ] (f a b) ∥₁ congEquiv→EquivAux''' {A = A} f b (a , p) = ( sElim - { B = λ a ((map f) a b ∣₂) Σ[ a A ] (f a b) ∥₁} + { B = λ a ((map f) a b ∣₂) Σ[ a A ] (f a b) ∥₁} ( λ a isSet→ (isProp→isSet isPropPropTrunc)) ( λ a p rec isPropPropTrunc ( λ p' a , p' ∣₁) - ( Iso.fun PathIdTrunc₀Iso p)) + ( Iso.fun PathIdTrunc₀Iso p)) ( a)) ( p) @@ -280,7 +280,7 @@ -- Stronger statement congEquiv→Equiv : {A B : Type } (f : A B) - (hf0 : isEquiv (map f)) + (hf0 : isEquiv (map f)) (hf : (a b : A) isEquiv {A = (a b)} (cong f)) isEquiv f equiv-proof (congEquiv→Equiv f hf0 hf) b = @@ -289,17 +289,17 @@ ( congEquiv→EquivAux''' f b (congEquiv→EquivAux f hf0 b)) mapEquiv→imId→Id₋₁ : {A B : Type } {a b : A} (f : A B) - (hf0 : isEquiv (map f)) + (hf0 : isEquiv (map f)) (f a f b) a b ∥₁ mapEquiv→imId→Id₋₁ {a = a} {b = b} f hf0 p = - Iso.fun PathIdTrunc₀Iso + Iso.fun PathIdTrunc₀Iso ( sym (fst (PathPΣ (snd (equiv-proof hf0 f b ∣₂) ( a ∣₂ , cong ∣_∣₂ p)))) fst (PathPΣ (snd (equiv-proof hf0 f b ∣₂) ( b ∣₂ , refl)))) -- Stronger statement for Ω→ instead of cong ΩEquiv→Equiv : {A B : Type } (f : A B) - (hf0 : isEquiv (map f)) + (hf0 : isEquiv (map f)) (hf : (a : A) isEquiv ( fst (Ω→ {A = (A , a)} {B = (B , f a)} (f , refl)))) @@ -325,7 +325,7 @@ -- Proof similar to one there WhiteheadsLemma : {A B : Type } {n : } (hA : isOfHLevel n A) (hB : isOfHLevel n B) (f : A B) - (hf0 : isEquiv (map f)) + (hf0 : isEquiv (map f)) (hf : (a : A) (k : ) isEquiv (fst (πHom {A = (A , a)} {B = (B , f a)} k (f , refl)))) isEquiv f diff --git a/Cubical.Induction.WellFounded.html b/Cubical.Induction.WellFounded.html index 00191d6f73..c69155750b 100644 --- a/Cubical.Induction.WellFounded.html +++ b/Cubical.Induction.WellFounded.html @@ -5,45 +5,45 @@ open import Cubical.Foundations.Prelude -Rel : ∀{} Type ℓ' Type _ -Rel A = A A Type +module _ { ℓ'} {A : Type } (_<_ : A A Type ℓ') where + WFRec : ∀{ℓ''} (A Type ℓ'') A Type _ + WFRec P x = y y < x P y -module _ { ℓ'} {A : Type } (_<_ : A A Type ℓ') where - WFRec : ∀{ℓ''} (A Type ℓ'') A Type _ - WFRec P x = y y < x P y + data Acc (x : A) : Type (ℓ-max ℓ') where + acc : WFRec Acc x Acc x - data Acc (x : A) : Type (ℓ-max ℓ') where - acc : WFRec Acc x Acc x + WellFounded : Type _ + WellFounded = x Acc x - WellFounded : Type _ - WellFounded = x Acc x +module _ { ℓ'} {A : Type } {_<_ : A A Type ℓ'} where + isPropAcc : x isProp (Acc _<_ x) + isPropAcc x (acc p) (acc q) + = λ i acc y y<x isPropAcc y (p y y<x) (q y y<x) i) -module _ { ℓ'} {A : Type } {_<_ : A A Type ℓ'} where - isPropAcc : x isProp (Acc _<_ x) - isPropAcc x (acc p) (acc q) - = λ i acc y y<x isPropAcc y (p y y<x) (q y y<x) i) + isPropWellFounded : isProp (WellFounded _<_) + isPropWellFounded p q i a = isPropAcc a (p a) (q a) i - access : ∀{x} Acc _<_ x WFRec _<_ (Acc _<_) x - access (acc r) = r + access : ∀{x} Acc _<_ x WFRec _<_ (Acc _<_) x + access (acc r) = r - private - wfi : ∀{ℓ''} {P : A Type ℓ''} - x (wf : Acc _<_ x) - (∀ x (∀ y y < x P y) P x) - P x - wfi x (acc p) e = e x λ y y<x wfi y (p y y<x) e + private + wfi : ∀{ℓ''} {P : A Type ℓ''} + x (wf : Acc _<_ x) + (∀ x (∀ y y < x P y) P x) + P x + wfi x (acc p) e = e x λ y y<x wfi y (p y y<x) e - module WFI (wf : WellFounded _<_) where - module _ {ℓ''} {P : A Type ℓ''} (e : x (∀ y y < x P y) P x) where - private - wfi-compute : x ax wfi x ax e e x y _ wfi y (wf y) e) - wfi-compute x (acc p) - = λ i e x y y<x wfi y (isPropAcc y (p y y<x) (wf y) i) e) + module WFI (wf : WellFounded _<_) where + module _ {ℓ''} {P : A Type ℓ''} (e : x (∀ y y < x P y) P x) where + private + wfi-compute : x ax wfi x ax e e x y _ wfi y (wf y) e) + wfi-compute x (acc p) + = λ i e x y y<x wfi y (isPropAcc y (p y y<x) (wf y) i) e) - induction : x P x - induction x = wfi x (wf x) e + induction : x P x + induction x = wfi x (wf x) e - induction-compute : x induction x (e x λ y _ induction y) - induction-compute x = wfi-compute x (wf x) + induction-compute : x induction x (e x λ y _ induction y) + induction-compute x = wfi-compute x (wf x) \ No newline at end of file diff --git a/Cubical.Papers.Pi4S3.html b/Cubical.Papers.Pi4S3.html index 79e7137494..012edeeb20 100644 --- a/Cubical.Papers.Pi4S3.html +++ b/Cubical.Papers.Pi4S3.html @@ -151,7 +151,7 @@ isContr-πₙSᵐ-low n m l = transport (cong isContr (sym (ua h))) ( const∙ (S₊∙ n) _ ∣₂ - , ST.elim _ isOfHLevelPath 2 squash₂ _ _) + , ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ f refl) where open import Cubical.HITs.SetTruncation as ST diff --git a/Cubical.Papers.RepresentationIndependence.html b/Cubical.Papers.RepresentationIndependence.html index 80784eee85..b4f168f3d6 100644 --- a/Cubical.Papers.RepresentationIndependence.html +++ b/Cubical.Papers.RepresentationIndependence.html @@ -280,8 +280,8 @@ -- 5.1 Quasi-Equivalence Relations --Lemma (5.1) -open BinRel using (idPropRel ; invPropRel - ; compPropRel ; graphRel) public +open BinRel using (idPropRel ; invPropRel + ; compPropRel ; graphRel) public -- Definitions (5.2) and (5.3) open QER using (isZigZagComplete ; isQuasiEquivRel) public -- Lemma (5.4) diff --git a/Cubical.Relation.Binary.Base.html b/Cubical.Relation.Binary.Base.html index 77b63079bc..e13f9d1c4e 100644 --- a/Cubical.Relation.Binary.Base.html +++ b/Cubical.Relation.Binary.Base.html @@ -20,240 +20,245 @@ open import Cubical.Relation.Nullary.Base -private - variable - ℓA ℓ≅A ℓA' ℓ≅A' : Level +open import Cubical.Induction.WellFounded -Rel : {} (A B : Type ) (ℓ' : Level) Type (ℓ-max (ℓ-suc ℓ')) -Rel A B ℓ' = A B Type ℓ' +private + variable + ℓA ℓ≅A ℓA' ℓ≅A' : Level -PropRel : {} (A B : Type ) (ℓ' : Level) Type (ℓ-max (ℓ-suc ℓ')) -PropRel A B ℓ' = Σ[ R Rel A B ℓ' ] a b isProp (R a b) +Rel : {ℓa ℓb} (A : Type ℓa) (B : Type ℓb) (ℓ' : Level) Type (ℓ-max (ℓ-max ℓa ℓb) (ℓ-suc ℓ')) +Rel A B ℓ' = A B Type ℓ' -idPropRel : {} (A : Type ) PropRel A A -idPropRel A .fst a a' = a a' ∥₁ -idPropRel A .snd _ _ = squash₁ +PropRel : {} (A B : Type ) (ℓ' : Level) Type (ℓ-max (ℓ-suc ℓ')) +PropRel A B ℓ' = Σ[ R Rel A B ℓ' ] a b isProp (R a b) -invPropRel : { ℓ'} {A B : Type } - PropRel A B ℓ' PropRel B A ℓ' -invPropRel R .fst b a = R .fst a b -invPropRel R .snd b a = R .snd a b +idPropRel : {} (A : Type ) PropRel A A +idPropRel A .fst a a' = a a' ∥₁ +idPropRel A .snd _ _ = squash₁ -compPropRel : { ℓ' ℓ''} {A B C : Type } - PropRel A B ℓ' PropRel B C ℓ'' PropRel A C (ℓ-max (ℓ-max ℓ' ℓ'')) -compPropRel R S .fst a c = Σ[ b _ ] (R .fst a b × S .fst b c) ∥₁ -compPropRel R S .snd _ _ = squash₁ +invPropRel : { ℓ'} {A B : Type } + PropRel A B ℓ' PropRel B A ℓ' +invPropRel R .fst b a = R .fst a b +invPropRel R .snd b a = R .snd a b -graphRel : {} {A B : Type } (A B) Rel A B -graphRel f a b = f a b +compPropRel : { ℓ' ℓ''} {A B C : Type } + PropRel A B ℓ' PropRel B C ℓ'' PropRel A C (ℓ-max (ℓ-max ℓ' ℓ'')) +compPropRel R S .fst a c = Σ[ b _ ] (R .fst a b × S .fst b c) ∥₁ +compPropRel R S .snd _ _ = squash₁ -module HeterogenousRelation { ℓ' : Level} {A B : Type } (R : Rel A B ℓ') where - isUniversalRel : Type (ℓ-max ℓ') - isUniversalRel = (a : A) (b : B) R a b +graphRel : {} {A B : Type } (A B) Rel A B +graphRel f a b = f a b -module BinaryRelation { ℓ' : Level} {A : Type } (R : Rel A A ℓ') where - isRefl : Type (ℓ-max ℓ') - isRefl = (a : A) R a a +module HeterogenousRelation { ℓ' : Level} {A B : Type } (R : Rel A B ℓ') where + isUniversalRel : Type (ℓ-max ℓ') + isUniversalRel = (a : A) (b : B) R a b - isRefl' : Type (ℓ-max ℓ') - isRefl' = {a : A} R a a +module BinaryRelation { ℓ' : Level} {A : Type } (R : Rel A A ℓ') where + isRefl : Type (ℓ-max ℓ') + isRefl = (a : A) R a a - isIrrefl : Type (ℓ-max ℓ') - isIrrefl = (a : A) ¬ R a a + isRefl' : Type (ℓ-max ℓ') + isRefl' = {a : A} R a a - isSym : Type (ℓ-max ℓ') - isSym = (a b : A) R a b R b a + isIrrefl : Type (ℓ-max ℓ') + isIrrefl = (a : A) ¬ R a a - isAsym : Type (ℓ-max ℓ') - isAsym = (a b : A) R a b ¬ R b a + isSym : Type (ℓ-max ℓ') + isSym = (a b : A) R a b R b a - isAntisym : Type (ℓ-max ℓ') - isAntisym = (a b : A) R a b R b a a b + isAsym : Type (ℓ-max ℓ') + isAsym = (a b : A) R a b ¬ R b a - isTrans : Type (ℓ-max ℓ') - isTrans = (a b c : A) R a b R b c R a c + isAntisym : Type (ℓ-max ℓ') + isAntisym = (a b : A) R a b R b a a b - isTrans' : Type (ℓ-max ℓ') - isTrans' = {a b c : A} R a b R b c R a c + isTrans : Type (ℓ-max ℓ') + isTrans = (a b c : A) R a b R b c R a c - -- Sum types don't play nicely with props, so we truncate - isCotrans : Type (ℓ-max ℓ') - isCotrans = (a b c : A) R a b (R a c ⊔′ R b c) + isTrans' : Type (ℓ-max ℓ') + isTrans' = {a b c : A} R a b R b c R a c - isWeaklyLinear : Type (ℓ-max ℓ') - isWeaklyLinear = (a b c : A) R a b R a c ⊔′ R c b + -- Sum types don't play nicely with props, so we truncate + isCotrans : Type (ℓ-max ℓ') + isCotrans = (a b c : A) R a b (R a c ⊔′ R b c) - isConnected : Type (ℓ-max ℓ') - isConnected = (a b : A) ¬ (a b) R a b ⊔′ R b a + isWeaklyLinear : Type (ℓ-max ℓ') + isWeaklyLinear = (a b c : A) R a b R a c ⊔′ R c b - isStronglyConnected : Type (ℓ-max ℓ') - isStronglyConnected = (a b : A) R a b ⊔′ R b a + isConnected : Type (ℓ-max ℓ') + isConnected = (a b : A) ¬ (a b) R a b ⊔′ R b a - isStronglyConnected→isConnected : isStronglyConnected isConnected - isStronglyConnected→isConnected strong a b _ = strong a b + isStronglyConnected : Type (ℓ-max ℓ') + isStronglyConnected = (a b : A) R a b ⊔′ R b a - isIrrefl×isTrans→isAsym : isIrrefl × isTrans isAsym - isIrrefl×isTrans→isAsym (irrefl , trans) a₀ a₁ Ra₀a₁ Ra₁a₀ - = irrefl a₀ (trans a₀ a₁ a₀ Ra₀a₁ Ra₁a₀) + isStronglyConnected→isConnected : isStronglyConnected isConnected + isStronglyConnected→isConnected strong a b _ = strong a b - IrreflKernel : Rel A A (ℓ-max ℓ') - IrreflKernel a b = R a b × (¬ a b) + isIrrefl×isTrans→isAsym : isIrrefl × isTrans isAsym + isIrrefl×isTrans→isAsym (irrefl , trans) a₀ a₁ Ra₀a₁ Ra₁a₀ + = irrefl a₀ (trans a₀ a₁ a₀ Ra₀a₁ Ra₁a₀) - ReflClosure : Rel A A (ℓ-max ℓ') - ReflClosure a b = R a b (a b) + WellFounded→isIrrefl : WellFounded R isIrrefl + WellFounded→isIrrefl well = WFI.induction well λ a f Raa f a Raa Raa - SymKernel : Rel A A ℓ' - SymKernel a b = R a b × R b a + IrreflKernel : Rel A A (ℓ-max ℓ') + IrreflKernel a b = R a b × (¬ a b) - SymClosure : Rel A A ℓ' - SymClosure a b = R a b R b a + ReflClosure : Rel A A (ℓ-max ℓ') + ReflClosure a b = R a b (a b) - AsymKernel : Rel A A ℓ' - AsymKernel a b = R a b × (¬ R b a) + SymKernel : Rel A A ℓ' + SymKernel a b = R a b × R b a - NegationRel : Rel A A ℓ' - NegationRel a b = ¬ (R a b) + SymClosure : Rel A A ℓ' + SymClosure a b = R a b R b a - module _ - {ℓ'' : Level} - (P : Embedding A ℓ'') + AsymKernel : Rel A A ℓ' + AsymKernel a b = R a b × (¬ R b a) - where + NegationRel : Rel A A ℓ' + NegationRel a b = ¬ (R a b) - private - subtype : Type ℓ'' - subtype = (fst P) + module _ + {ℓ'' : Level} + (P : Embedding A ℓ'') - toA : subtype A - toA = fst (snd P) + where - InducedRelation : Rel subtype subtype ℓ' - InducedRelation a b = R (toA a) (toA b) + private + subtype : Type ℓ'' + subtype = (fst P) - record isEquivRel : Type (ℓ-max ℓ') where - constructor equivRel - field - reflexive : isRefl - symmetric : isSym - transitive : isTrans + toA : subtype A + toA = fst (snd P) - isUniversalRel→isEquivRel : HeterogenousRelation.isUniversalRel R isEquivRel - isUniversalRel→isEquivRel u .isEquivRel.reflexive a = u a a - isUniversalRel→isEquivRel u .isEquivRel.symmetric a b _ = u b a - isUniversalRel→isEquivRel u .isEquivRel.transitive a _ c _ _ = u a c + InducedRelation : Rel subtype subtype ℓ' + InducedRelation a b = R (toA a) (toA b) - isPropValued : Type (ℓ-max ℓ') - isPropValued = (a b : A) isProp (R a b) - - isSetValued : Type (ℓ-max ℓ') - isSetValued = (a b : A) isSet (R a b) - - isEffective : Type (ℓ-max ℓ') - isEffective = - (a b : A) isEquiv (eq/ {R = R} a b) - - - impliesIdentity : Type _ - impliesIdentity = {a a' : A} (R a a') (a a') - - inequalityImplies : Type _ - inequalityImplies = (a b : A) ¬ a b R a b - - -- the total space corresponding to the binary relation w.r.t. a - relSinglAt : (a : A) Type (ℓ-max ℓ') - relSinglAt a = Σ[ a' A ] (R a a') - - -- the statement that the total space is contractible at any a - contrRelSingl : Type (ℓ-max ℓ') - contrRelSingl = (a : A) isContr (relSinglAt a) - - isUnivalent : Type (ℓ-max ℓ') - isUnivalent = (a a' : A) (R a a') (a a') - - contrRelSingl→isUnivalent : isRefl contrRelSingl isUnivalent - contrRelSingl→isUnivalent ρ c a a' = isoToEquiv i - where - h : isProp (relSinglAt a) - h = isContr→isProp (c a) - aρa : relSinglAt a - aρa = a , ρ a - Q : (y : A) a y _ - Q y _ = R a y - i : Iso (R a a') (a a') - Iso.fun i r = cong fst (h aρa (a' , r)) - Iso.inv i = J Q (ρ a) - Iso.rightInv i = J y p cong fst (h aρa (y , J Q (ρ a) p)) p) - (J q _ cong fst (h aρa (a , q)) refl) - (J α _ cong fst α refl) refl - (isProp→isSet h _ _ refl (h _ _))) - (sym (JRefl Q (ρ a)))) - Iso.leftInv i r = J w β J Q (ρ a) (cong fst β) snd w) - (JRefl Q (ρ a)) (h aρa (a' , r)) - - isUnivalent→contrRelSingl : isUnivalent contrRelSingl - isUnivalent→contrRelSingl u a = q - where - abstract - f : (x : A) a x R a x - f x p = invEq (u a x) p - - t : singl a relSinglAt a - t (x , p) = x , f x p - - q : isContr (relSinglAt a) - q = isOfHLevelRespectEquiv 0 (t , totalEquiv _ _ f λ x invEquiv (u a x) .snd) - (isContrSingl a) - -EquivRel : {} (A : Type ) (ℓ' : Level) Type (ℓ-max (ℓ-suc ℓ')) -EquivRel A ℓ' = Σ[ R Rel A A ℓ' ] BinaryRelation.isEquivRel R - -EquivPropRel : {} (A : Type ) (ℓ' : Level) Type (ℓ-max (ℓ-suc ℓ')) -EquivPropRel A ℓ' = Σ[ R PropRel A A ℓ' ] BinaryRelation.isEquivRel (R .fst) - -record RelIso {A : Type ℓA} (_≅_ : Rel A A ℓ≅A) - {A' : Type ℓA'} (_≅'_ : Rel A' A' ℓ≅A') : Type (ℓ-max (ℓ-max ℓA ℓA') (ℓ-max ℓ≅A ℓ≅A')) where - constructor reliso - field - fun : A A' - inv : A' A - rightInv : (a' : A') fun (inv a') ≅' a' - leftInv : (a : A) inv (fun a) a - -open BinaryRelation - -RelIso→Iso : {A : Type ℓA} {A' : Type ℓA'} - (_≅_ : Rel A A ℓ≅A) (_≅'_ : Rel A' A' ℓ≅A') - (uni : impliesIdentity _≅_) (uni' : impliesIdentity _≅'_) - (f : RelIso _≅_ _≅'_) - Iso A A' -Iso.fun (RelIso→Iso _ _ _ _ f) = RelIso.fun f -Iso.inv (RelIso→Iso _ _ _ _ f) = RelIso.inv f -Iso.rightInv (RelIso→Iso _ _ uni uni' f) a' - = uni' (RelIso.rightInv f a') -Iso.leftInv (RelIso→Iso _ _ uni uni' f) a - = uni (RelIso.leftInv f a) - -isIrreflIrreflKernel : ∀{ ℓ'} {A : Type } (R : Rel A A ℓ') isIrrefl (IrreflKernel R) -isIrreflIrreflKernel _ _ (_ , ¬a≡a) = ¬a≡a refl - -isReflReflClosure : ∀{ ℓ'} {A : Type } (R : Rel A A ℓ') isRefl (ReflClosure R) -isReflReflClosure _ _ = inr refl - -isConnectedStronglyConnectedIrreflKernel : ∀{ ℓ'} {A : Type } (R : Rel A A ℓ') - isStronglyConnected R - isConnected (IrreflKernel R) -isConnectedStronglyConnectedIrreflKernel R strong a b ¬a≡b - = ∥₁.map x ⊎.rec Rab inl (Rab , ¬a≡b)) - Rba inr (Rba , b≡a ¬a≡b (sym b≡a)))) x) - (strong a b) - -isSymSymKernel : ∀{ ℓ'} {A : Type } (R : Rel A A ℓ') isSym (SymKernel R) -isSymSymKernel _ _ _ (Rab , Rba) = Rba , Rab - -isSymSymClosure : ∀{ ℓ'} {A : Type } (R : Rel A A ℓ') isSym (SymClosure R) -isSymSymClosure _ _ _ (inl Rab) = inr Rab -isSymSymClosure _ _ _ (inr Rba) = inl Rba - -isAsymAsymKernel : { ℓ'} {A : Type } (R : Rel A A ℓ') isAsym (AsymKernel R) -isAsymAsymKernel _ _ _ (Rab , _) (_ , ¬Rab) = ¬Rab Rab + record isEquivRel : Type (ℓ-max ℓ') where + constructor equivRel + field + reflexive : isRefl + symmetric : isSym + transitive : isTrans + + isUniversalRel→isEquivRel : HeterogenousRelation.isUniversalRel R isEquivRel + isUniversalRel→isEquivRel u .isEquivRel.reflexive a = u a a + isUniversalRel→isEquivRel u .isEquivRel.symmetric a b _ = u b a + isUniversalRel→isEquivRel u .isEquivRel.transitive a _ c _ _ = u a c + + isPropValued : Type (ℓ-max ℓ') + isPropValued = (a b : A) isProp (R a b) + + isSetValued : Type (ℓ-max ℓ') + isSetValued = (a b : A) isSet (R a b) + + isEffective : Type (ℓ-max ℓ') + isEffective = + (a b : A) isEquiv (eq/ {R = R} a b) + + + impliesIdentity : Type _ + impliesIdentity = {a a' : A} (R a a') (a a') + + inequalityImplies : Type _ + inequalityImplies = (a b : A) ¬ a b R a b + + -- the total space corresponding to the binary relation w.r.t. a + relSinglAt : (a : A) Type (ℓ-max ℓ') + relSinglAt a = Σ[ a' A ] (R a a') + + -- the statement that the total space is contractible at any a + contrRelSingl : Type (ℓ-max ℓ') + contrRelSingl = (a : A) isContr (relSinglAt a) + + isUnivalent : Type (ℓ-max ℓ') + isUnivalent = (a a' : A) (R a a') (a a') + + contrRelSingl→isUnivalent : isRefl contrRelSingl isUnivalent + contrRelSingl→isUnivalent ρ c a a' = isoToEquiv i + where + h : isProp (relSinglAt a) + h = isContr→isProp (c a) + aρa : relSinglAt a + aρa = a , ρ a + Q : (y : A) a y _ + Q y _ = R a y + i : Iso (R a a') (a a') + Iso.fun i r = cong fst (h aρa (a' , r)) + Iso.inv i = J Q (ρ a) + Iso.rightInv i = J y p cong fst (h aρa (y , J Q (ρ a) p)) p) + (J q _ cong fst (h aρa (a , q)) refl) + (J α _ cong fst α refl) refl + (isProp→isSet h _ _ refl (h _ _))) + (sym (JRefl Q (ρ a)))) + Iso.leftInv i r = J w β J Q (ρ a) (cong fst β) snd w) + (JRefl Q (ρ a)) (h aρa (a' , r)) + + isUnivalent→contrRelSingl : isUnivalent contrRelSingl + isUnivalent→contrRelSingl u a = q + where + abstract + f : (x : A) a x R a x + f x p = invEq (u a x) p + + t : singl a relSinglAt a + t (x , p) = x , f x p + + q : isContr (relSinglAt a) + q = isOfHLevelRespectEquiv 0 (t , totalEquiv _ _ f λ x invEquiv (u a x) .snd) + (isContrSingl a) + +EquivRel : {} (A : Type ) (ℓ' : Level) Type (ℓ-max (ℓ-suc ℓ')) +EquivRel A ℓ' = Σ[ R Rel A A ℓ' ] BinaryRelation.isEquivRel R + +EquivPropRel : {} (A : Type ) (ℓ' : Level) Type (ℓ-max (ℓ-suc ℓ')) +EquivPropRel A ℓ' = Σ[ R PropRel A A ℓ' ] BinaryRelation.isEquivRel (R .fst) + +record RelIso {A : Type ℓA} (_≅_ : Rel A A ℓ≅A) + {A' : Type ℓA'} (_≅'_ : Rel A' A' ℓ≅A') : Type (ℓ-max (ℓ-max ℓA ℓA') (ℓ-max ℓ≅A ℓ≅A')) where + constructor reliso + field + fun : A A' + inv : A' A + rightInv : (a' : A') fun (inv a') ≅' a' + leftInv : (a : A) inv (fun a) a + +open BinaryRelation + +RelIso→Iso : {A : Type ℓA} {A' : Type ℓA'} + (_≅_ : Rel A A ℓ≅A) (_≅'_ : Rel A' A' ℓ≅A') + (uni : impliesIdentity _≅_) (uni' : impliesIdentity _≅'_) + (f : RelIso _≅_ _≅'_) + Iso A A' +Iso.fun (RelIso→Iso _ _ _ _ f) = RelIso.fun f +Iso.inv (RelIso→Iso _ _ _ _ f) = RelIso.inv f +Iso.rightInv (RelIso→Iso _ _ uni uni' f) a' + = uni' (RelIso.rightInv f a') +Iso.leftInv (RelIso→Iso _ _ uni uni' f) a + = uni (RelIso.leftInv f a) + +isIrreflIrreflKernel : ∀{ ℓ'} {A : Type } (R : Rel A A ℓ') isIrrefl (IrreflKernel R) +isIrreflIrreflKernel _ _ (_ , ¬a≡a) = ¬a≡a refl + +isReflReflClosure : ∀{ ℓ'} {A : Type } (R : Rel A A ℓ') isRefl (ReflClosure R) +isReflReflClosure _ _ = inr refl + +isConnectedStronglyConnectedIrreflKernel : ∀{ ℓ'} {A : Type } (R : Rel A A ℓ') + isStronglyConnected R + isConnected (IrreflKernel R) +isConnectedStronglyConnectedIrreflKernel R strong a b ¬a≡b + = ∥₁.map x ⊎.rec Rab inl (Rab , ¬a≡b)) + Rba inr (Rba , b≡a ¬a≡b (sym b≡a)))) x) + (strong a b) + +isSymSymKernel : ∀{ ℓ'} {A : Type } (R : Rel A A ℓ') isSym (SymKernel R) +isSymSymKernel _ _ _ (Rab , Rba) = Rba , Rab + +isSymSymClosure : ∀{ ℓ'} {A : Type } (R : Rel A A ℓ') isSym (SymClosure R) +isSymSymClosure _ _ _ (inl Rab) = inr Rab +isSymSymClosure _ _ _ (inr Rba) = inl Rba + +isAsymAsymKernel : { ℓ'} {A : Type } (R : Rel A A ℓ') isAsym (AsymKernel R) +isAsymAsymKernel _ _ _ (Rab , _) (_ , ¬Rab) = ¬Rab Rab \ No newline at end of file diff --git a/Cubical.Relation.Binary.Extensionality.html b/Cubical.Relation.Binary.Extensionality.html index 53ad54c056..fa24dd9720 100644 --- a/Cubical.Relation.Binary.Extensionality.html +++ b/Cubical.Relation.Binary.Extensionality.html @@ -7,17 +7,51 @@ open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Foundations.Transport -open import Cubical.Data.Sigma -open import Cubical.Relation.Binary.Base +open import Cubical.Relation.Binary.Base -module _ { ℓ'} {A : Type } (_≺_ : Rel A A ℓ') where +open import Cubical.Data.Sigma - ≡→≺Equiv : (x y : A) x y z (z x) (z y) - ≡→≺Equiv _ _ p z = substEquiv (z ≺_) p +module _ { ℓ'} {A : Type } (_≺_ : Rel A A ℓ') where - isWeaklyExtensional : Type _ - isWeaklyExtensional = {x y} isEquiv (≡→≺Equiv x y) + ≡→≺Equiv : (x y : A) x y z (z x) (z y) + ≡→≺Equiv _ _ p z = substEquiv (z ≺_) p - isPropIsWeaklyExtensional : isProp isWeaklyExtensional - isPropIsWeaklyExtensional = isPropImplicitΠ2 λ _ _ isPropIsEquiv _ + isWeaklyExtensional : Type _ + isWeaklyExtensional = x y isEquiv (≡→≺Equiv x y) + + isPropIsWeaklyExtensional : isProp isWeaklyExtensional + isPropIsWeaklyExtensional = isPropΠ2 λ _ _ isPropIsEquiv _ + + {- HoTT Definition 10.3.9 has extensionality defined under these terms. + We prove that under those conditions, it implies our more hlevel-friendly + definition. + -} + + ≺Equiv→≡→isWeaklyExtensional : isSet A BinaryRelation.isPropValued _≺_ + ((x y : A) (∀ z ((z x) (z y))) x y) + isWeaklyExtensional + ≺Equiv→≡→isWeaklyExtensional setA prop f a b + = propBiimpl→Equiv (setA a b) + (isPropΠ z isOfHLevel≃ 1 + (prop z a) + (prop z b))) + (≡→≺Equiv a b) + g f a b λ z g z) .snd + + ≺×→≡→isWeaklyExtensional : isSet A BinaryRelation.isPropValued _≺_ + ((x y : A) (∀ z ((z x) (z y)) + × ((z y) (z x))) x y) + isWeaklyExtensional + ≺×→≡→isWeaklyExtensional setA prop f a b + = propBiimpl→Equiv (setA a b) + (isPropΠ z isOfHLevel≃ 1 + (prop z a) + (prop z b))) + (≡→≺Equiv a b) + g f a b λ z (g z .fst) , invEq (g z)) .snd + + isWeaklyExtensional→≺Equiv→≡ : isWeaklyExtensional + (x y : A) (∀ z (z x) (z y)) x y + isWeaklyExtensional→≺Equiv→≡ weak x y + = invIsEq (weak x y) \ No newline at end of file diff --git a/Cubical.Relation.Binary.Order.Apartness.Base.html b/Cubical.Relation.Binary.Order.Apartness.Base.html index d7f1f47504..a72f75c6ba 100644 --- a/Cubical.Relation.Binary.Order.Apartness.Base.html +++ b/Cubical.Relation.Binary.Order.Apartness.Base.html @@ -31,7 +31,7 @@ open import Cubical.HITs.PropositionalTruncation open Iso -open BinaryRelation +open BinaryRelation private @@ -44,10 +44,10 @@ field is-set : isSet A - is-prop-valued : isPropValued _#_ - is-irrefl : isIrrefl _#_ - is-cotrans : isCotrans _#_ - is-sym : isSym _#_ + is-prop-valued : isPropValued _#_ + is-irrefl : isIrrefl _#_ + is-cotrans : isCotrans _#_ + is-sym : isSym _#_ unquoteDecl IsApartnessIsoΣ = declareRecordIsoΣ IsApartnessIsoΣ (quote IsApartness) diff --git a/Cubical.Relation.Binary.Order.Apartness.Properties.html b/Cubical.Relation.Binary.Order.Apartness.Properties.html index e4595049d3..0f0ca76dfb 100644 --- a/Cubical.Relation.Binary.Order.Apartness.Properties.html +++ b/Cubical.Relation.Binary.Order.Apartness.Properties.html @@ -20,17 +20,17 @@ variable ℓ' ℓ'' : Level -open BinaryRelation +open BinaryRelation -isApartness→ImpliesInequality : {A : Type } {_#_ : Rel A A ℓ'} +isApartness→ImpliesInequality : {A : Type } {_#_ : Rel A A ℓ'} IsApartness _#_ x y x # y ¬ (x y) isApartness→ImpliesInequality {_#_ = _#_} apart x y x#y x≡y = IsApartness.is-irrefl apart y (subst a a # y) x≡y x#y) -isApartness→isEquivRelNegationRel : {A : Type } {_#_ : Rel A A ℓ'} - IsApartness _#_ isEquivRel (NegationRel _#_) +isApartness→isEquivRelNegationRel : {A : Type } {_#_ : Rel A A ℓ'} + IsApartness _#_ isEquivRel (NegationRel _#_) isApartness→isEquivRelNegationRel apart - = equivRel a a#a IsApartness.is-irrefl apart a a#a) + = equivRel a a#a IsApartness.is-irrefl apart a a#a) a b ¬a#b b#a ¬a#b (IsApartness.is-sym apart b a b#a)) λ a b c ¬a#b ¬b#c a#c ∥₁.rec isProp⊥ (⊎.rec ¬a#b @@ -39,13 +39,13 @@ module _ {A : Type } - {R : Rel A A ℓ'} + {R : Rel A A ℓ'} where - open BinaryRelation + open BinaryRelation isApartnessInduced : IsApartness R (B : Type ℓ'') (f : B A) - IsApartness (InducedRelation R (B , f)) + IsApartness (InducedRelation R (B , f)) isApartnessInduced apa B (f , emb) = isapartness (Embedding-into-isSet→isSet (f , emb) (IsApartness.is-set apa)) a b IsApartness.is-prop-valued apa (f a) (f b)) diff --git a/Cubical.Relation.Binary.Order.Loset.Base.html b/Cubical.Relation.Binary.Order.Loset.Base.html index 85aca22957..f0f6d6feba 100644 --- a/Cubical.Relation.Binary.Order.Loset.Base.html +++ b/Cubical.Relation.Binary.Order.Loset.Base.html @@ -32,7 +32,7 @@ open import Cubical.Relation.Nullary.Properties open Iso -open BinaryRelation +open BinaryRelation private @@ -45,12 +45,12 @@ field is-set : isSet A - is-prop-valued : isPropValued _<_ - is-irrefl : isIrrefl _<_ - is-trans : isTrans _<_ - is-asym : isAsym _<_ - is-weakly-linear : isWeaklyLinear _<_ - is-connected : isConnected _<_ + is-prop-valued : isPropValued _<_ + is-irrefl : isIrrefl _<_ + is-trans : isTrans _<_ + is-asym : isAsym _<_ + is-weakly-linear : isWeaklyLinear _<_ + is-connected : isConnected _<_ unquoteDecl IsLosetIsoΣ = declareRecordIsoΣ IsLosetIsoΣ (quote IsLoset) diff --git a/Cubical.Relation.Binary.Order.Loset.Properties.html b/Cubical.Relation.Binary.Order.Loset.Properties.html index 544862817f..945c89c87b 100644 --- a/Cubical.Relation.Binary.Order.Loset.Properties.html +++ b/Cubical.Relation.Binary.Order.Loset.Properties.html @@ -25,10 +25,10 @@ module _ {A : Type } - {R : Rel A A ℓ'} + {R : Rel A A ℓ'} where - open BinaryRelation + open BinaryRelation isLoset→isStrictPoset : IsLoset R IsStrictPoset R isLoset→isStrictPoset loset = isstrictposet @@ -39,18 +39,18 @@ (IsLoset.is-asym loset) private - transrefl : isTrans R isTrans (ReflClosure R) + transrefl : isTrans R isTrans (ReflClosure R) transrefl trans a b c (inl Rab) (inl Rbc) = inl (trans a b c Rab Rbc) transrefl trans a b c (inl Rab) (inr b≡c) = inl (subst (R a) b≡c Rab) transrefl trans a b c (inr a≡b) (inl Rbc) = inl (subst z R z c) (sym a≡b) Rbc) transrefl trans a b c (inr a≡b) (inr b≡c) = inr (a≡b b≡c) - antisym : isIrrefl R isTrans R isAntisym (ReflClosure R) + antisym : isIrrefl R isTrans R isAntisym (ReflClosure R) antisym irr trans a b (inl Rab) (inl Rba) = ⊥.rec (irr a (trans a b a Rab Rba)) antisym irr trans a b (inl _) (inr b≡a) = sym b≡a antisym irr trans a b (inr a≡b) _ = a≡b - isLoset→isTosetReflClosure : Discrete A IsLoset R IsToset (ReflClosure R) + isLoset→isTosetReflClosure : Discrete A IsLoset R IsToset (ReflClosure R) isLoset→isTosetReflClosure disc loset = istoset (IsLoset.is-set loset) a b isProp⊎ (IsLoset.is-prop-valued loset a b) @@ -58,7 +58,7 @@ λ Rab a≡b IsLoset.is-irrefl loset a (subst (R a) (sym a≡b) Rab)) - (isReflReflClosure R) + (isReflReflClosure R) (transrefl (IsLoset.is-trans loset)) (antisym (IsLoset.is-irrefl loset) (IsLoset.is-trans loset)) @@ -67,7 +67,7 @@ (IsLoset.is-connected loset a b ¬a≡b)) (disc a b) isLosetInduced : IsLoset R (B : Type ℓ'') (f : B A) - IsLoset (InducedRelation R (B , f)) + IsLoset (InducedRelation R (B , f)) isLosetInduced los B (f , emb) = isloset (Embedding-into-isSet→isSet (f , emb) (IsLoset.is-set los)) a b IsLoset.is-prop-valued los (f a) (f b)) @@ -87,7 +87,7 @@ Discrete (fst los) Toset (ℓ-max ℓ') Loset→Toset (_ , los) disc - = _ , tosetstr (BinaryRelation.ReflClosure (LosetStr._<_ los)) + = _ , tosetstr (BinaryRelation.ReflClosure (LosetStr._<_ los)) (isLoset→isTosetReflClosure disc (LosetStr.isLoset los)) \ No newline at end of file diff --git a/Cubical.Relation.Binary.Order.Poset.Base.html b/Cubical.Relation.Binary.Order.Poset.Base.html index c7f25ab44d..d599aa0c3d 100644 --- a/Cubical.Relation.Binary.Order.Poset.Base.html +++ b/Cubical.Relation.Binary.Order.Poset.Base.html @@ -24,7 +24,7 @@ open import Cubical.Relation.Binary.Base open Iso -open BinaryRelation +open BinaryRelation private @@ -37,10 +37,10 @@ field is-set : isSet A - is-prop-valued : isPropValued _≤_ - is-refl : isRefl _≤_ - is-trans : isTrans _≤_ - is-antisym : isAntisym _≤_ + is-prop-valued : isPropValued _≤_ + is-refl : isRefl _≤_ + is-trans : isTrans _≤_ + is-antisym : isAntisym _≤_ unquoteDecl IsPosetIsoΣ = declareRecordIsoΣ IsPosetIsoΣ (quote IsPoset) diff --git a/Cubical.Relation.Binary.Order.Poset.Properties.html b/Cubical.Relation.Binary.Order.Poset.Properties.html index 56ffe926e6..003735e9b4 100644 --- a/Cubical.Relation.Binary.Order.Poset.Properties.html +++ b/Cubical.Relation.Binary.Order.Poset.Properties.html @@ -22,10 +22,10 @@ module _ {A : Type } - {R : Rel A A ℓ'} + {R : Rel A A ℓ'} where - open BinaryRelation + open BinaryRelation isPoset→isPreorder : IsPoset R IsPreorder R isPoset→isPreorder poset = ispreorder @@ -35,25 +35,25 @@ (IsPoset.is-trans poset) private - transirrefl : isTrans R isAntisym R isTrans (IrreflKernel R) + transirrefl : isTrans R isAntisym R isTrans (IrreflKernel R) transirrefl trans anti a b c (Rab , ¬a≡b) (Rbc , ¬b≡c) = trans a b c Rab Rbc , λ a≡c ¬a≡b (anti a b Rab (subst (R b) (sym a≡c) Rbc)) - isPoset→isStrictPosetIrreflKernel : IsPoset R IsStrictPoset (IrreflKernel R) + isPoset→isStrictPosetIrreflKernel : IsPoset R IsStrictPoset (IrreflKernel R) isPoset→isStrictPosetIrreflKernel poset = isstrictposet (IsPoset.is-set poset) a b isProp× (IsPoset.is-prop-valued poset a b) (isProp¬ (a b))) - (isIrreflIrreflKernel R) + (isIrreflIrreflKernel R) (transirrefl (IsPoset.is-trans poset) (IsPoset.is-antisym poset)) - (isIrrefl×isTrans→isAsym (IrreflKernel R) - (isIrreflIrreflKernel R + (isIrrefl×isTrans→isAsym (IrreflKernel R) + (isIrreflIrreflKernel R , transirrefl (IsPoset.is-trans poset) (IsPoset.is-antisym poset))) - isPosetInduced : IsPoset R (B : Type ℓ'') (f : B A) IsPoset (InducedRelation R (B , f)) + isPosetInduced : IsPoset R (B : Type ℓ'') (f : B A) IsPoset (InducedRelation R (B , f)) isPosetInduced pos B (f , emb) = isposet (Embedding-into-isSet→isSet (f , emb) (IsPoset.is-set pos)) a b IsPoset.is-prop-valued pos (f a) (f b)) @@ -68,6 +68,6 @@ Poset→StrictPoset : Poset ℓ' StrictPoset (ℓ-max ℓ') Poset→StrictPoset (_ , pos) - = _ , strictposetstr (BinaryRelation.IrreflKernel (PosetStr._≤_ pos)) + = _ , strictposetstr (BinaryRelation.IrreflKernel (PosetStr._≤_ pos)) (isPoset→isStrictPosetIrreflKernel (PosetStr.isPoset pos)) \ No newline at end of file diff --git a/Cubical.Relation.Binary.Order.Preorder.Base.html b/Cubical.Relation.Binary.Order.Preorder.Base.html index dbbb8d3f3b..2718628b82 100644 --- a/Cubical.Relation.Binary.Order.Preorder.Base.html +++ b/Cubical.Relation.Binary.Order.Preorder.Base.html @@ -23,7 +23,7 @@ open import Cubical.Relation.Binary.Base open Iso -open BinaryRelation +open BinaryRelation private @@ -36,9 +36,9 @@ field is-set : isSet A - is-prop-valued : isPropValued _≲_ - is-refl : isRefl _≲_ - is-trans : isTrans _≲_ + is-prop-valued : isPropValued _≲_ + is-refl : isRefl _≲_ + is-trans : isTrans _≲_ unquoteDecl IsPreorderIsoΣ = declareRecordIsoΣ IsPreorderIsoΣ (quote IsPreorder) diff --git a/Cubical.Relation.Binary.Order.Preorder.Properties.html b/Cubical.Relation.Binary.Order.Preorder.Properties.html index 54c8b32e63..d2ae906356 100644 --- a/Cubical.Relation.Binary.Order.Preorder.Properties.html +++ b/Cubical.Relation.Binary.Order.Preorder.Properties.html @@ -21,21 +21,21 @@ module _ {A : Type } - {R : Rel A A ℓ'} + {R : Rel A A ℓ'} where - open BinaryRelation + open BinaryRelation - isPreorder→isEquivRelSymKernel : IsPreorder R isEquivRel (SymKernel R) + isPreorder→isEquivRelSymKernel : IsPreorder R isEquivRel (SymKernel R) isPreorder→isEquivRelSymKernel preorder - = equivRel a (IsPreorder.is-refl preorder a) + = equivRel a (IsPreorder.is-refl preorder a) , (IsPreorder.is-refl preorder a)) - (isSymSymKernel R) + (isSymSymKernel R) a b c (Rab , Rba) (Rbc , Rcb) IsPreorder.is-trans preorder a b c Rab Rbc , IsPreorder.is-trans preorder c b a Rcb Rba) - isPreorder→isStrictPosetAsymKernel : IsPreorder R IsStrictPoset (AsymKernel R) + isPreorder→isStrictPosetAsymKernel : IsPreorder R IsStrictPoset (AsymKernel R) isPreorder→isStrictPosetAsymKernel preorder = isstrictposet (IsPreorder.is-set preorder) a b isProp× (IsPreorder.is-prop-valued preorder a b) (isProp¬ (R b a))) @@ -43,9 +43,9 @@ a b c (Rab , ¬Rba) (Rbc , ¬Rcb) IsPreorder.is-trans preorder a b c Rab Rbc , λ Rca ¬Rcb (IsPreorder.is-trans preorder c a b Rca Rab)) - (isAsymAsymKernel R) + (isAsymAsymKernel R) - isPreorderInduced : IsPreorder R (B : Type ℓ'') (f : B A) IsPreorder (InducedRelation R (B , f)) + isPreorderInduced : IsPreorder R (B : Type ℓ'') (f : B A) IsPreorder (InducedRelation R (B , f)) isPreorderInduced pre B (f , emb) = ispreorder (Embedding-into-isSet→isSet (f , emb) (IsPreorder.is-set pre)) a b IsPreorder.is-prop-valued pre (f a) (f b)) @@ -54,6 +54,6 @@ Preorder→StrictPoset : Preorder ℓ' StrictPoset ℓ' Preorder→StrictPoset (_ , pre) - = _ , strictposetstr (BinaryRelation.AsymKernel (PreorderStr._≲_ pre)) + = _ , strictposetstr (BinaryRelation.AsymKernel (PreorderStr._≲_ pre)) (isPreorder→isStrictPosetAsymKernel (PreorderStr.isPreorder pre)) \ No newline at end of file diff --git a/Cubical.Relation.Binary.Order.Properties.html b/Cubical.Relation.Binary.Order.Properties.html index dc32dc62a4..a12836ae58 100644 --- a/Cubical.Relation.Binary.Order.Properties.html +++ b/Cubical.Relation.Binary.Order.Properties.html @@ -23,7 +23,7 @@ module _ {A : Type } - {_≲_ : Rel A A ℓ'} + {_≲_ : Rel A A ℓ'} (pre : IsPreorder _≲_) where @@ -168,7 +168,7 @@ module _ {A : Type } - {_≲_ : Rel A A ℓ'} + {_≲_ : Rel A A ℓ'} (pre : IsPreorder _≲_) where @@ -211,7 +211,7 @@ module _ {A : Type } - {_≤_ : Rel A A ℓ'} + {_≤_ : Rel A A ℓ'} (pos : IsPoset _≤_) where @@ -219,7 +219,7 @@ pre : IsPreorder _≤_ pre = isPoset→isPreorder pos - anti : BinaryRelation.isAntisym _≤_ + anti : BinaryRelation.isAntisym _≤_ anti = IsPoset.is-antisym pos module _ @@ -277,7 +277,7 @@ module _ {A : Type } {P : Embedding A ℓ''} - {_≤_ : Rel A A ℓ'} + {_≤_ : Rel A A ℓ'} (tos : IsToset _≤_) where @@ -285,7 +285,7 @@ prop : a b isProp (a b) prop = IsToset.is-prop-valued tos - conn : BinaryRelation.isStronglyConnected _≤_ + conn : BinaryRelation.isStronglyConnected _≤_ conn = IsToset.is-strongly-connected tos pre : IsPreorder _≤_ diff --git a/Cubical.Relation.Binary.Order.StrictPoset.Base.html b/Cubical.Relation.Binary.Order.StrictPoset.Base.html index 1a88f4de29..d0873dca60 100644 --- a/Cubical.Relation.Binary.Order.StrictPoset.Base.html +++ b/Cubical.Relation.Binary.Order.StrictPoset.Base.html @@ -28,7 +28,7 @@ open import Cubical.Relation.Nullary.Properties open Iso -open BinaryRelation +open BinaryRelation private @@ -41,10 +41,10 @@ field is-set : isSet A - is-prop-valued : isPropValued _<_ - is-irrefl : isIrrefl _<_ - is-trans : isTrans _<_ - is-asym : isAsym _<_ + is-prop-valued : isPropValued _<_ + is-irrefl : isIrrefl _<_ + is-trans : isTrans _<_ + is-asym : isAsym _<_ unquoteDecl IsStrictPosetIsoΣ = declareRecordIsoΣ IsStrictPosetIsoΣ (quote IsStrictPoset) diff --git a/Cubical.Relation.Binary.Order.StrictPoset.Properties.html b/Cubical.Relation.Binary.Order.StrictPoset.Properties.html index 170eb20ad2..336b3fa407 100644 --- a/Cubical.Relation.Binary.Order.StrictPoset.Properties.html +++ b/Cubical.Relation.Binary.Order.StrictPoset.Properties.html @@ -22,24 +22,24 @@ module _ {A : Type } - {R : Rel A A ℓ'} + {R : Rel A A ℓ'} where - open BinaryRelation + open BinaryRelation private - transrefl : isTrans R isTrans (ReflClosure R) + transrefl : isTrans R isTrans (ReflClosure R) transrefl trans a b c (inl Rab) (inl Rbc) = inl (trans a b c Rab Rbc) transrefl trans a b c (inl Rab) (inr b≡c) = inl (subst (R a) b≡c Rab) transrefl trans a b c (inr a≡b) (inl Rbc) = inl (subst z R z c) (sym a≡b) Rbc) transrefl trans a b c (inr a≡b) (inr b≡c) = inr (a≡b b≡c) - antisym : isIrrefl R isTrans R isAntisym (ReflClosure R) + antisym : isIrrefl R isTrans R isAntisym (ReflClosure R) antisym irr trans a b (inl Rab) (inl Rba) = ⊥.rec (irr a (trans a b a Rab Rba)) antisym irr trans a b (inl _) (inr b≡a) = sym b≡a antisym irr trans a b (inr a≡b) _ = a≡b - isStrictPoset→isPosetReflClosure : IsStrictPoset R IsPoset (ReflClosure R) + isStrictPoset→isPosetReflClosure : IsStrictPoset R IsPoset (ReflClosure R) isStrictPoset→isPosetReflClosure strictposet = isposet (IsStrictPoset.is-set strictposet) a b isProp⊎ (IsStrictPoset.is-prop-valued strictposet a b) @@ -47,14 +47,14 @@ λ Rab a≡b IsStrictPoset.is-irrefl strictposet a (subst (R a) (sym a≡b) Rab)) - (isReflReflClosure R) + (isReflReflClosure R) (transrefl (IsStrictPoset.is-trans strictposet)) (antisym (IsStrictPoset.is-irrefl strictposet) (IsStrictPoset.is-trans strictposet)) isStrictPoset→isApartnessSymClosure : IsStrictPoset R - isWeaklyLinear R - IsApartness (SymClosure R) + isWeaklyLinear R + IsApartness (SymClosure R) isStrictPoset→isApartnessSymClosure strictposet weak = isapartness (IsStrictPoset.is-set strictposet) a b isProp⊎ (IsStrictPoset.is-prop-valued strictposet a b) @@ -69,10 +69,10 @@ y ⊎.rec Rbc inr (inl Rbc)) Rca inl (inr Rca)) y ∣₁) (weak b a c Rba)) x) - (isSymSymClosure R) + (isSymSymClosure R) isStrictPosetInduced : IsStrictPoset R (B : Type ℓ'') (f : B A) - IsStrictPoset (InducedRelation R (B , f)) + IsStrictPoset (InducedRelation R (B , f)) isStrictPosetInduced strictpos B (f , emb) = isstrictposet (Embedding-into-isSet→isSet (f , emb) (IsStrictPoset.is-set strictpos)) @@ -83,14 +83,14 @@ StrictPoset→Poset : StrictPoset ℓ' Poset (ℓ-max ℓ') StrictPoset→Poset (_ , strictpos) - = _ , posetstr (BinaryRelation.ReflClosure (StrictPosetStr._<_ strictpos)) + = _ , posetstr (BinaryRelation.ReflClosure (StrictPosetStr._<_ strictpos)) (isStrictPoset→isPosetReflClosure (StrictPosetStr.isStrictPoset strictpos)) StrictPoset→Apartness : (R : StrictPoset ℓ') - BinaryRelation.isWeaklyLinear (StrictPosetStr._<_ (snd R)) + BinaryRelation.isWeaklyLinear (StrictPosetStr._<_ (snd R)) Apartness ℓ' StrictPoset→Apartness (_ , strictpos) weak - = _ , apartnessstr (BinaryRelation.SymClosure (StrictPosetStr._<_ strictpos)) + = _ , apartnessstr (BinaryRelation.SymClosure (StrictPosetStr._<_ strictpos)) (isStrictPoset→isApartnessSymClosure (StrictPosetStr.isStrictPoset strictpos) weak) \ No newline at end of file diff --git a/Cubical.Relation.Binary.Order.Toset.Base.html b/Cubical.Relation.Binary.Order.Toset.Base.html index c4abf87e10..2eb9b94336 100644 --- a/Cubical.Relation.Binary.Order.Toset.Base.html +++ b/Cubical.Relation.Binary.Order.Toset.Base.html @@ -30,7 +30,7 @@ open import Cubical.Relation.Binary.Base open Iso -open BinaryRelation +open BinaryRelation private @@ -43,11 +43,11 @@ field is-set : isSet A - is-prop-valued : isPropValued _≤_ - is-refl : isRefl _≤_ - is-trans : isTrans _≤_ - is-antisym : isAntisym _≤_ - is-strongly-connected : isStronglyConnected _≤_ + is-prop-valued : isPropValued _≤_ + is-refl : isRefl _≤_ + is-trans : isTrans _≤_ + is-antisym : isAntisym _≤_ + is-strongly-connected : isStronglyConnected _≤_ unquoteDecl IsTosetIsoΣ = declareRecordIsoΣ IsTosetIsoΣ (quote IsToset) diff --git a/Cubical.Relation.Binary.Order.Toset.Properties.html b/Cubical.Relation.Binary.Order.Toset.Properties.html index d0dde1069f..3fabe3ca0c 100644 --- a/Cubical.Relation.Binary.Order.Toset.Properties.html +++ b/Cubical.Relation.Binary.Order.Toset.Properties.html @@ -25,10 +25,10 @@ module _ {A : Type } - {R : Rel A A ℓ'} + {R : Rel A A ℓ'} where - open BinaryRelation + open BinaryRelation isToset→isPoset : IsToset R IsPoset R isToset→isPoset toset = isposet @@ -38,21 +38,21 @@ (IsToset.is-trans toset) (IsToset.is-antisym toset) private - transirrefl : isTrans R isAntisym R isTrans (IrreflKernel R) + transirrefl : isTrans R isAntisym R isTrans (IrreflKernel R) transirrefl trans anti a b c (Rab , ¬a≡b) (Rbc , ¬b≡c) = trans a b c Rab Rbc , λ a≡c ¬a≡b (anti a b Rab (subst (R b) (sym a≡c) Rbc)) - isToset→isLosetIrreflKernel : Discrete A IsToset R IsLoset (IrreflKernel R) + isToset→isLosetIrreflKernel : Discrete A IsToset R IsLoset (IrreflKernel R) isToset→isLosetIrreflKernel disc toset = isloset (IsToset.is-set toset) a b isProp× (IsToset.is-prop-valued toset a b) (isProp¬ (a b))) - (isIrreflIrreflKernel R) + (isIrreflIrreflKernel R) (transirrefl (IsToset.is-trans toset) (IsToset.is-antisym toset)) - (isIrrefl×isTrans→isAsym (IrreflKernel R) - (isIrreflIrreflKernel R + (isIrrefl×isTrans→isAsym (IrreflKernel R) + (isIrreflIrreflKernel R , transirrefl (IsToset.is-trans toset) (IsToset.is-antisym toset))) a c b (Rac , ¬a≡c) @@ -67,11 +67,11 @@ (subst x R a x) (sym b≡c) Rac) Rba))) (IsToset.is-strongly-connected toset a b)) (disc a b)) - (isConnectedStronglyConnectedIrreflKernel R + (isConnectedStronglyConnectedIrreflKernel R (IsToset.is-strongly-connected toset)) isTosetInduced : IsToset R (B : Type ℓ'') (f : B A) - IsToset (InducedRelation R (B , f)) + IsToset (InducedRelation R (B , f)) isTosetInduced tos B (f , emb) = istoset (Embedding-into-isSet→isSet (f , emb) (IsToset.is-set tos)) a b IsToset.is-prop-valued tos (f a) (f b)) @@ -87,7 +87,7 @@ Toset→Loset : (tos : Toset ℓ') Discrete (fst tos) Loset (ℓ-max ℓ') Toset→Loset (_ , tos) disc - = _ , losetstr (BinaryRelation.IrreflKernel (TosetStr._≤_ tos)) + = _ , losetstr (BinaryRelation.IrreflKernel (TosetStr._≤_ tos)) (isToset→isLosetIrreflKernel disc (TosetStr.isToset tos)) \ No newline at end of file diff --git a/Cubical.Relation.Binary.Order.Woset.Base.html b/Cubical.Relation.Binary.Order.Woset.Base.html new file mode 100644 index 0000000000..4d6d7704ca --- /dev/null +++ b/Cubical.Relation.Binary.Order.Woset.Base.html @@ -0,0 +1,208 @@ + +Cubical.Relation.Binary.Order.Woset.Base
{-# OPTIONS --safe #-}
+module Cubical.Relation.Binary.Order.Woset.Base where
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Equiv
+open import Cubical.Foundations.Equiv.HalfAdjoint
+open import Cubical.Foundations.HLevels
+open import Cubical.Foundations.Isomorphism
+open import Cubical.Foundations.Univalence
+open import Cubical.Foundations.Transport
+open import Cubical.Foundations.SIP
+
+open import Cubical.HITs.PropositionalTruncation
+
+open import Cubical.Data.Sigma
+
+open import Cubical.Reflection.RecordEquiv
+open import Cubical.Reflection.StrictEquiv
+
+open import Cubical.Displayed.Base
+open import Cubical.Displayed.Auto
+open import Cubical.Displayed.Record
+open import Cubical.Displayed.Universe
+
+open import Cubical.Relation.Binary.Base
+open import Cubical.Relation.Binary.Extensionality
+
+open import Cubical.Induction.WellFounded
+
+open Iso
+open BinaryRelation
+
+
+private
+  variable
+     ℓ' ℓ'' ℓ₀ ℓ₀' ℓ₁ ℓ₁' ℓ₂ ℓ₂' : Level
+
+record IsWoset {A : Type } (_≺_ : A  A  Type ℓ') : Type (ℓ-max  ℓ') where
+  no-eta-equality
+  constructor iswoset
+
+  field
+    is-set : isSet A
+    is-prop-valued : isPropValued _≺_
+    is-well-founded : WellFounded _≺_
+    is-weakly-extensional : isWeaklyExtensional _≺_
+    is-trans : isTrans _≺_
+
+unquoteDecl IsWosetIsoΣ = declareRecordIsoΣ IsWosetIsoΣ (quote IsWoset)
+
+
+record WosetStr (ℓ' : Level) (A : Type ) : Type (ℓ-max  (ℓ-suc ℓ')) where
+
+  constructor wosetstr
+
+  field
+    _≺_     : A  A  Type ℓ'
+    isWoset : IsWoset _≺_
+
+  infixl 7 _≺_
+
+  open IsWoset isWoset public
+
+Woset :   ℓ'  Type (ℓ-max (ℓ-suc ) (ℓ-suc ℓ'))
+Woset  ℓ' = TypeWithStr  (WosetStr ℓ')
+
+woset : (A : Type ) (_≺_ : A  A  Type ℓ') (h : IsWoset _≺_)  Woset  ℓ'
+woset A _≺_ h = A , wosetstr _≺_ h
+
+record IsWosetEquiv {A : Type ℓ₀} {B : Type ℓ₁}
+  (M : WosetStr ℓ₀' A) (e : A  B) (N : WosetStr ℓ₁' B)
+  : Type (ℓ-max (ℓ-max ℓ₀ ℓ₀') ℓ₁')
+  where
+  constructor
+   iswosetequiv
+  -- Shorter qualified names
+  private
+    module M = WosetStr M
+    module N = WosetStr N
+
+  field
+    pres≺ : (x y : A)  x M.≺ y  equivFun e x N.≺ equivFun e y
+
+  pres≺⁻ : (x y : B)  x N.≺ y  invEq e x M.≺ invEq e y
+  pres≺⁻ x y = invEquiv
+                 (pres≺ (invEq e x) (invEq e y) ∙ₑ
+                  substEquiv (N._≺ equivFun e (invEq e y)) (secEq e x) ∙ₑ
+                  substEquiv (x N.≺_) (secEq e y))
+
+
+WosetEquiv : (M : Woset ℓ₀ ℓ₀') (M : Woset ℓ₁ ℓ₁')  Type (ℓ-max (ℓ-max ℓ₀ ℓ₀') (ℓ-max ℓ₁ ℓ₁'))
+WosetEquiv M N = Σ[ e   M    N  ] IsWosetEquiv (M .snd) e (N .snd)
+
+invWosetEquiv : {M : Woset ℓ₀ ℓ₀'} {N : Woset ℓ₁ ℓ₁'}  WosetEquiv M N  WosetEquiv N M
+invWosetEquiv (M≃N , iswq) = invEquiv M≃N , iswosetequiv (IsWosetEquiv.pres≺⁻ iswq)
+
+compWosetEquiv : {M : Woset ℓ₀ ℓ₀'} {N : Woset ℓ₁ ℓ₁'} {O : Woset ℓ₂ ℓ₂'}
+                WosetEquiv M N  WosetEquiv N O  WosetEquiv M O
+compWosetEquiv (M≃N , wqMN) (N≃O , wqNO) = (compEquiv M≃N N≃O)
+               , (iswosetequiv  x y
+                compEquiv (IsWosetEquiv.pres≺ wqMN x y)
+                           (IsWosetEquiv.pres≺ wqNO (equivFun M≃N x) (equivFun M≃N y))))
+
+reflWosetEquiv : {M : Woset ℓ₀ ℓ₀'}  WosetEquiv M M
+reflWosetEquiv {M = M} = (idEquiv  M ) , (iswosetequiv  _ _  idEquiv _))
+
+isPropIsWoset : {A : Type } (_≺_ : A  A  Type ℓ')  isProp (IsWoset _≺_)
+isPropIsWoset _≺_ = isOfHLevelRetractFromIso 1 IsWosetIsoΣ
+  (isPropΣ isPropIsSet
+    λ isSetA  isPropΣ (isPropΠ2  _ _  isPropIsProp))
+      λ isPropValued≺  isProp×2
+                         isPropWellFounded
+                         (isPropIsWeaklyExtensional _≺_)
+                         (isPropΠ5 λ x _ z _ _  isPropValued≺ x z))
+
+private
+  unquoteDecl IsWosetEquivIsoΣ = declareRecordIsoΣ IsWosetEquivIsoΣ (quote IsWosetEquiv)
+
+isPropIsWosetEquiv : {A : Type ℓ₀} {B : Type ℓ₁}
+                    (M : WosetStr ℓ₀' A) (e : A  B) (N : WosetStr ℓ₁' B)
+                    isProp (IsWosetEquiv M e N)
+isPropIsWosetEquiv M e N = isOfHLevelRetractFromIso 1 IsWosetEquivIsoΣ
+  (isPropΠ2 λ x y  isOfHLevel≃ 1
+    (IsWoset.is-prop-valued (WosetStr.isWoset M) x y)
+    (IsWoset.is-prop-valued (WosetStr.isWoset N) (e .fst x) (e .fst y)))
+
+𝒮ᴰ-Woset : DUARel (𝒮-Univ ) (WosetStr ℓ') (ℓ-max  ℓ')
+𝒮ᴰ-Woset =
+  𝒮ᴰ-Record (𝒮-Univ _) IsWosetEquiv
+    (fields:
+      data[ _≺_  autoDUARel _ _  pres≺ ]
+      prop[ isWoset   _ _  isPropIsWoset _) ])
+    where
+    open WosetStr
+    open IsWoset
+    open IsWosetEquiv
+
+WosetPath : (M N : Woset  ℓ')  WosetEquiv M N  (M  N)
+WosetPath =  𝒮ᴰ-Woset .UARel.ua
+
+isSetWoset : isSet (Woset  ℓ')
+isSetWoset M N = isOfHLevelRespectEquiv 1 (WosetPath M N)
+  λ ((f , eqf) , wqf) ((g , eqg) , wqg)
+     Σ≡Prop  e  isPropIsWosetEquiv (str M) e (str N))
+      (Σ≡Prop  _  isPropIsEquiv _)
+        (funExt (WFI.induction wellM λ a ind
+           isWeaklyExtensional→≺Equiv→≡ _≺ₙ_ weakN (f a) (g a) λ c
+             propBiimpl→Equiv (propN c (f a)) (propN c (g a))
+   c≺ₙfa  subst (_≺ₙ g a) (secEq (g , eqg) c)
+               (equivFun (IsWosetEquiv.pres≺ wqg (invEq (g , eqg) c) a)
+                (subst (_≺ₘ a)
+                 (sym
+                  (cong (invEq (g , eqg))
+                   (sym (secEq (f , eqf) c)
+                    ind (invEq (f , eqf) c)
+                    (subst (invEq (f , eqf) c ≺ₘ_) (retEq (f , eqf) a)
+                     (equivFun (IsWosetEquiv.pres≺⁻ wqf c (f a)) c≺ₙfa)))
+                    retEq (g , eqg) (invEq (f , eqf) c)))
+                 (subst (invEq (f , eqf) c ≺ₘ_)
+                   (retEq (f , eqf) a)
+                     (equivFun
+                       (IsWosetEquiv.pres≺⁻ wqf c (f a)) c≺ₙfa)))))
+   λ c≺ₙga  subst (_≺ₙ f a) (secEq (f , eqf) c)
+               (equivFun (IsWosetEquiv.pres≺ wqf (invEq (f , eqf) c) a)
+                 (subst (_≺ₘ a)
+                   (sym
+                     (retEq (f , eqf) (invEq (g , eqg) c))
+                      cong (invEq (f , eqf))
+                      (ind (invEq (g , eqg) c)
+                       (subst (invEq (g , eqg) c ≺ₘ_) (retEq (g , eqg) a)
+                        (equivFun (IsWosetEquiv.pres≺⁻ wqg c (g a)) c≺ₙga))
+                        secEq (g , eqg) c))
+                   (subst (invEq (g , eqg) c ≺ₘ_)
+                     (retEq (g , eqg) a)
+                       (equivFun
+                         (IsWosetEquiv.pres≺⁻ wqg c (g a)) c≺ₙga)))))))
+  where _≺ₘ_ = WosetStr._≺_ (str M)
+        _≺ₙ_ = WosetStr._≺_ (str N)
+
+        wosM = WosetStr.isWoset (str M)
+        wosN = WosetStr.isWoset (str N)
+
+        wellM = IsWoset.is-well-founded (wosM)
+
+        weakN = IsWoset.is-weakly-extensional (wosN)
+
+        propN = IsWoset.is-prop-valued (wosN)
+
+-- an easier way of establishing an equivalence of wosets
+module _ {P : Woset ℓ₀ ℓ₀'} {S : Woset ℓ₁ ℓ₁'} (e :  P    S ) where
+  private
+    module P = WosetStr (P .snd)
+    module S = WosetStr (S .snd)
+
+  module _ (isMon :  x y  x P.≺ y  equivFun e x S.≺ equivFun e y)
+           (isMonInv :  x y  x S.≺ y  invEq e x P.≺ invEq e y) where
+    open IsWosetEquiv
+    open IsWoset
+
+    makeIsWosetEquiv : IsWosetEquiv (P .snd) e (S .snd)
+    pres≺ makeIsWosetEquiv x y = propBiimpl→Equiv (P.isWoset .is-prop-valued _ _)
+                                                  (S.isWoset .is-prop-valued _ _)
+                                                  (isMon _ _) (isMonInv' _ _)
+      where
+      isMonInv' :  x y  equivFun e x S.≺ equivFun e y  x P.≺ y
+      isMonInv' x y ex≺ey = transport  i  retEq e x i P.≺ retEq e y i) (isMonInv _ _ ex≺ey)
+
\ No newline at end of file diff --git a/Cubical.Relation.Binary.Order.Woset.Properties.html b/Cubical.Relation.Binary.Order.Woset.Properties.html new file mode 100644 index 0000000000..c354bc0223 --- /dev/null +++ b/Cubical.Relation.Binary.Order.Woset.Properties.html @@ -0,0 +1,39 @@ + +Cubical.Relation.Binary.Order.Woset.Properties
{-# OPTIONS --safe #-}
+module Cubical.Relation.Binary.Order.Woset.Properties where
+
+open import Cubical.Foundations.Prelude
+
+open import Cubical.Relation.Binary.Base
+open import Cubical.Relation.Binary.Order.Woset.Base
+open import Cubical.Relation.Binary.Order.StrictPoset.Base
+
+open import Cubical.Induction.WellFounded
+
+private
+  variable
+     ℓ' ℓ'' : Level
+
+module _
+  {A : Type }
+  {R : Rel A A ℓ'}
+  where
+
+  open BinaryRelation
+
+  isWoset→isStrictPoset : IsWoset R  IsStrictPoset R
+  isWoset→isStrictPoset wos = isstrictposet
+                              (IsWoset.is-set wos)
+                              (IsWoset.is-prop-valued wos)
+                              irrefl
+                              (IsWoset.is-trans wos)
+                              (isIrrefl×isTrans→isAsym R
+                                (irrefl , (IsWoset.is-trans wos)))
+                        where irrefl : isIrrefl R
+                              irrefl = WellFounded→isIrrefl R
+                                       (IsWoset.is-well-founded wos)
+
+Woset→StrictPoset : Woset  ℓ'  StrictPoset  ℓ'
+Woset→StrictPoset (_ , wos) = _ , strictposetstr (WosetStr._≺_ wos)
+                                  (isWoset→isStrictPoset (WosetStr.isWoset wos))
+
\ No newline at end of file diff --git a/Cubical.Relation.Binary.Order.Woset.Simulation.html b/Cubical.Relation.Binary.Order.Woset.Simulation.html new file mode 100644 index 0000000000..5ce44380c0 --- /dev/null +++ b/Cubical.Relation.Binary.Order.Woset.Simulation.html @@ -0,0 +1,933 @@ + +Cubical.Relation.Binary.Order.Woset.Simulation
{-# OPTIONS --safe #-}
+{-
+  This treatment of well-orderings follows chapter 10.3 of the HoTT book
+-}
+module Cubical.Relation.Binary.Order.Woset.Simulation where
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Equiv
+open import Cubical.Foundations.Function
+open import Cubical.Foundations.HLevels
+open import Cubical.Foundations.Isomorphism
+open import Cubical.Foundations.Structure
+
+open import Cubical.HITs.PropositionalTruncation as ∥₁
+open import Cubical.HITs.SetQuotients as /₂
+
+open import Cubical.Induction.WellFounded
+
+open import Cubical.Functions.Embedding
+
+open import Cubical.Data.Sigma
+
+open import Cubical.Relation.Binary.Order.Woset.Base
+open import Cubical.Relation.Binary.Order.Poset
+open import Cubical.Relation.Binary.Base
+open import Cubical.Relation.Binary.Extensionality
+open import Cubical.Relation.Binary.Order.Properties
+
+private
+  variable
+     ℓ' ℓa ℓa' ℓb ℓb' ℓc ℓc' ℓd ℓd' : Level
+
+-- We start with the presumption that the lifting property for a simulation
+-- must be truncated, but will prove subsequently that simulations are embeddings
+-- and that no truncation is needed
+isSimulation∃ : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb') (f :  A    B )
+               Type (ℓ-max (ℓ-max (ℓ-max ℓa ℓa') ℓb) ℓb')
+isSimulation∃ A B f = monotone × ∃lifting
+  where _≺ᵣ_ = WosetStr._≺_ (str A)
+        _≺ₛ_ = WosetStr._≺_ (str B)
+
+        monotone =  a a'  a ≺ᵣ a'  (f a) ≺ₛ (f a')
+
+        less :  a  Type _
+        less a = Σ[ a'   A  ] a' ≺ᵣ a
+
+        ∃lifting =  a b  b ≺ₛ (f a)  ∃[ (a' , _)  less a ] f a'  b
+
+isSimulation∃→isEmbedding : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb')   f
+                           isSimulation∃ A B f  isEmbedding f
+isSimulation∃→isEmbedding A B f (rrel , efib)
+  = injEmbedding setB
+    λ {a b}  WFI.induction wellR {P = λ a'   b'  f a'  f b'  a'  b'}
+               a' ind b' fa'≡fb'
+                  isWeaklyExtensional→≺Equiv→≡ _≺ᵣ_ weakR a' b'
+                   λ c  propBiimpl→Equiv (propR c a') (propR c b')
+                      c≺ᵣa'  ∥₁.rec (propR c b')
+                                        ((a'' , fa''≺ᵣb') , fc≡fa'')
+                                        subst (_≺ᵣ b') (sym
+                                               (ind c c≺ᵣa' a'' (sym fc≡fa'')))
+                                         fa''≺ᵣb')
+                                  (efib b' (f c) (subst (f c ≺ₛ_) fa'≡fb'
+                                                        (rrel c a' c≺ᵣa'))))
+                     λ c≺ᵣb'  ∥₁.rec (propR c a')
+                                       ((b'' , fb''≺ᵣa') , fc≡fb'')
+                                       subst (_≺ᵣ a')
+                                              (ind b'' fb''≺ᵣa' c
+                                                fc≡fb'') fb''≺ᵣa')
+                                 (efib a' (f c) (subst (f c ≺ₛ_)
+                                       (sym fa'≡fb') (rrel c b' c≺ᵣb')))) a b
+    where _≺ᵣ_ = WosetStr._≺_ (str A)
+          _≺ₛ_ = WosetStr._≺_ (str B)
+
+          wosR = WosetStr.isWoset (str A)
+          wosS = WosetStr.isWoset (str B)
+
+          setB = IsWoset.is-set wosS
+
+          wellR = IsWoset.is-well-founded wosR
+          weakR = IsWoset.is-weakly-extensional wosR
+          propR = IsWoset.is-prop-valued wosR
+
+-- With the fact that it's an embedding, we can do away with the truncation
+isSimulation : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb') (f :  A    B )
+              Type (ℓ-max (ℓ-max (ℓ-max ℓa ℓa') ℓb) ℓb')
+isSimulation A B f = monotone × lifting
+  where _≺ᵣ_ = WosetStr._≺_ (str A)
+        _≺ₛ_ = WosetStr._≺_ (str B)
+
+        monotone =  a a'  a ≺ᵣ a'  (f a) ≺ₛ (f a')
+
+        less :  a  Type _
+        less a = Σ[ a'   A  ] a' ≺ᵣ a
+
+        lifting =  a b  b ≺ₛ (f a)  fiber {A = less a} (f  fst) b
+
+isSimulation∃→isSimulation : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb')   f
+                            isSimulation∃ A B f  isSimulation A B f
+isSimulation∃→isSimulation A B f (mono , lifting) = mono
+                           ,  a b b≺fa  ∥₁.rec
+                           (isEmbedding→hasPropFibers (isEmbedding-∘
+                             (isSimulation∃→isEmbedding A B f (mono , lifting))
+                              _ _  isEmbeddingFstΣProp λ _  propR _ _)) b)
+                              x  x) (lifting a b b≺fa))
+                           where propR = IsWoset.is-prop-valued (WosetStr.isWoset (str A))
+
+isSimulation→isEmbedding : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb')   f
+                          isSimulation A B f  isEmbedding f
+isSimulation→isEmbedding A B f (rrel , efib)
+  = injEmbedding setB
+    λ {a b}  WFI.induction wellR {P = λ a'   b'  f a'  f b'  a'  b'}
+             a' ind b' fa'≡fb'  isWeaklyExtensional→≺Equiv→≡
+               _≺ᵣ_ weakR a' b' λ c  propBiimpl→Equiv
+                 (propR c a') (propR c b')
+                  c≺ᵣa'  subst (_≺ᵣ b')
+                            (sym (ind c c≺ᵣa'
+                                 (efib b' (f c)
+                                   (subst (f c ≺ₛ_) fa'≡fb'
+                                          (rrel c a' c≺ᵣa')) .fst .fst)
+                                 (sym (efib b' (f c) (subst (f c ≺ₛ_)
+                                      fa'≡fb' (rrel c a' c≺ᵣa')) .snd))))
+                            (efib b' (f c) (subst (f c ≺ₛ_) fa'≡fb'
+                                             (rrel c a' c≺ᵣa')) .fst .snd))
+                  λ c≺ᵣb'  subst (_≺ᵣ a')
+                            (ind (efib a' (f c) (subst (f c ≺ₛ_)
+                              (sym fa'≡fb') (rrel c b' c≺ᵣb')) .fst .fst)
+                                (efib a' (f c) (subst (f c ≺ₛ_)
+                                  (sym fa'≡fb') (rrel c b' c≺ᵣb')) .fst .snd)
+                                c (efib a' (f c) (subst (f c ≺ₛ_)
+                                  (sym fa'≡fb') (rrel c b' c≺ᵣb')) .snd))
+                              (efib a' (f c) (subst (f c ≺ₛ_)
+                                (sym fa'≡fb') (rrel c b' c≺ᵣb')) .fst .snd)) a b
+    where _≺ᵣ_ = WosetStr._≺_ (str A)
+          _≺ₛ_ = WosetStr._≺_ (str B)
+
+          wosR = WosetStr.isWoset (str A)
+          wosS = WosetStr.isWoset (str B)
+
+          setB = IsWoset.is-set wosS
+
+          wellR = IsWoset.is-well-founded wosR
+          weakR = IsWoset.is-weakly-extensional wosR
+          propR = IsWoset.is-prop-valued wosR
+
+isSimulationUnique : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb')
+                     f g  isSimulation A B f  isSimulation A B g
+                    f  g
+isSimulationUnique A B f g (rreff , fibf) (rrefg , fibg) =
+           (funExt (WFI.induction wellR λ a ind
+                    isWeaklyExtensional→≺Equiv→≡ _≺ₛ_ weakS (f a) (g a) λ b
+                      propBiimpl→Equiv (propS b (f a)) (propS b (g a))
+                        b≺ₛfa  subst (_≺ₛ g a)
+                          (sym (sym (fibf a b b≺ₛfa .snd)
+                             ind (fibf a b b≺ₛfa .fst .fst)
+                                  (fibf a b b≺ₛfa .fst .snd)))
+                          (rrefg (fibf a b b≺ₛfa .fst .fst) a
+                                 (fibf a b b≺ₛfa .fst .snd)))
+                          λ b≺ₛga  subst (_≺ₛ f a)
+                          (ind (fibg a b b≺ₛga .fst .fst)
+                               (fibg a b b≺ₛga .fst .snd)
+                                fibg a b b≺ₛga .snd)
+                          (rreff (fibg a b b≺ₛga .fst .fst) a
+                                 (fibg a b b≺ₛga .fst .snd))))
+  where _≺ₛ_ = WosetStr._≺_ (str B)
+
+        wosR = WosetStr.isWoset (str A)
+        wosS = WosetStr.isWoset (str B)
+
+        wellR = IsWoset.is-well-founded wosR
+
+        weakS = IsWoset.is-weakly-extensional wosS
+
+        propS = IsWoset.is-prop-valued wosS
+
+isPropIsSimulation : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb')
+                     f  isProp (isSimulation A B f)
+isPropIsSimulation A B f sim₀
+  = isProp× (isPropΠ3 λ _ _ _  propS _ _)
+            (isPropΠ3  _ b _  isEmbedding→hasPropFibers
+                                 (isEmbedding-∘
+                                 (isSimulation→isEmbedding A B f sim₀)
+                                 λ _ _  isEmbeddingFstΣProp
+                                         λ _  propR _ _) b)) sim₀
+  where propR = IsWoset.is-prop-valued (WosetStr.isWoset (str A))
+        propS = IsWoset.is-prop-valued (WosetStr.isWoset (str B))
+
+_≼_ : Rel (Woset ℓa ℓa') (Woset ℓb ℓb') (ℓ-max (ℓ-max (ℓ-max ℓa ℓa') ℓb) ℓb')
+A  B = Σ[ f  ( A    B ) ] isSimulation A B f
+
+-- Necessary intermediary steps to prove that simulations form a poset
+isRefl≼ : BinaryRelation.isRefl {A = Woset  ℓ'} _≼_
+isRefl≼ A = (idfun  A ) , ((λ _ _ a≺ᵣa'  a≺ᵣa')
+                          , λ _ b b≺ₛfa  (b , b≺ₛfa) , refl)
+
+isSimulation-∘ : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb') (C : Woset ℓc ℓc')
+                 f g
+                isSimulation A B f
+                isSimulation B C g
+                isSimulation A C (g  f)
+isSimulation-∘ A B C f g (rreff , fibf) (rrefg , fibg)
+  =  a a' a≺ᵣa'  rrefg (f a) (f a') (rreff a a' a≺ᵣa'))
+  , λ a c c≺ₜgfa  ((fibf a (fibg (f a) c c≺ₜgfa .fst .fst)
+                            (fibg (f a) c c≺ₜgfa .fst .snd) .fst .fst)
+                   , fibf a (fibg (f a) c c≺ₜgfa .fst .fst)
+                            (fibg (f a) c c≺ₜgfa .fst .snd) .fst .snd)
+                   , cong g (fibf a (fibg (f a) c c≺ₜgfa .fst .fst)
+                            (fibg (f a) c c≺ₜgfa .fst .snd) .snd)
+                    fibg (f a) c c≺ₜgfa .snd
+
+isTrans≼ : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb') (C : Woset ℓc ℓc')
+          A  B  B  C  A  C
+isTrans≼ A B C (f , simf) (g , simg)
+  = (g  f) , (isSimulation-∘ A B C f g simf simg)
+
+isPropValued≼ : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb')  isProp (A  B)
+isPropValued≼ A B (f , simf) (g , simg)
+  = Σ≡Prop  _  isPropIsSimulation A B _)
+           (isSimulationUnique A B f g simf simg)
+
+isAntisym≼Equiv : (A : Woset ℓa ℓa') (B  : Woset ℓb ℓb')
+                 A  B  B  A  WosetEquiv A B
+isAntisym≼Equiv A B (f , simf) (g , simg)
+  = (isoToEquiv is
+  , (makeIsWosetEquiv (isoToEquiv is)
+                      (fst simf)
+                      (fst simg)))
+  where is : Iso  A   B 
+        Iso.fun is = f
+        Iso.inv is = g
+        Iso.rightInv is b i
+          = cong (_$_  fst)
+            (isPropValued≼ B B (isTrans≼ B A B (g , simg) (f , simf))
+              (isRefl≼ B)) i b
+        Iso.leftInv is a i
+          = cong (_$_  fst)
+            (isPropValued≼ A A (isTrans≼ A B A (f , simf) (g , simg))
+              (isRefl≼ A)) i a
+
+isAntisym≼ : BinaryRelation.isAntisym {A = Woset  ℓ'} _≼_
+isAntisym≼ A B A≼B B≼A = equivFun (WosetPath A B) (isAntisym≼Equiv A B A≼B B≼A)
+
+isPoset≼ : IsPoset {A = Woset  ℓ'} _≼_
+isPoset≼ = isposet
+           isSetWoset
+           isPropValued≼
+           isRefl≼
+           isTrans≼
+           isAntisym≼
+
+isWosetEquiv→isSimulation : {A : Woset ℓa ℓa'} {B : Woset ℓb ℓb'}
+                           ((eq , _) : WosetEquiv A B)
+                           isSimulation A B (equivFun eq)
+isWosetEquiv→isSimulation {A = A} (A≃B , wqAB)
+                          = ((λ a a'  equivFun (IsWosetEquiv.pres≺ wqAB a a'))
+                          , λ a b b≺fa  ((invEq A≃B b)
+                          , subst (invEq A≃B b ≺ᵣ_) (retEq A≃B a)
+                            (equivFun (IsWosetEquiv.pres≺⁻ wqAB b
+                                      (equivFun A≃B a)) b≺fa))
+                          , secEq A≃B b)
+                          where _≺ᵣ_ = WosetStr._≺_ (str A)
+
+WosetEquiv→≼ : {A : Woset ℓa ℓa'} {B : Woset ℓb ℓb'}
+              WosetEquiv A B
+              A  B
+WosetEquiv→≼ (A≃B , wqAB) = (equivFun A≃B) , isWosetEquiv→isSimulation (A≃B , wqAB)
+
+isPropValuedWosetEquiv : {A : Woset ℓa ℓa'} {B : Woset ℓb ℓb'}
+                        (M : WosetEquiv A B)
+                        (N : WosetEquiv A B)
+                        M  N
+isPropValuedWosetEquiv {A = A} {B = B} M N
+  = Σ≡Prop  _  isPropIsWosetEquiv _ _ _)
+    (Σ≡Prop  _  isPropIsEquiv _)
+    (isSimulationUnique A B (M .fst .fst) (N .fst .fst)
+      (isWosetEquiv→isSimulation M)
+      (isWosetEquiv→isSimulation N)))
+
+_↓_ : (A : Woset  ℓ')  (a :  A  )  Woset (ℓ-max  ℓ') ℓ'
+A  a = (Σ[ b   A  ] b  a)
+      , wosetstr _≺ᵢ_ (iswoset
+        setᵢ
+        propᵢ
+         (x , x≺a)
+         WFI.induction well {P = λ x'  (x'≺a : x'  a)
+                                        Acc _≺ᵢ_ (x' , x'≺a)}
+             _ ind _  acc  (y , y≺a) y≺x'
+                        ind y y≺x' y≺a)) x x≺a)
+        (≺×→≡→isWeaklyExtensional _≺ᵢ_ setᵢ propᵢ
+           (x , x≺a) (y , y≺a) f
+            Σ≡Prop  b  prop b a)
+             (isWeaklyExtensional→≺Equiv→≡ _≺_ weak x y
+              λ c  propBiimpl→Equiv (prop c x) (prop c y)
+                c≺x  f (c , trans c x a c≺x x≺a) .fst c≺x)
+                λ c≺y  f (c , trans c y a c≺y y≺a) .snd c≺y)))
+         λ (x , _) (y , _) (z , _) x≺y y≺z  trans x y z x≺y y≺z)
+  where _≺_ = WosetStr._≺_ (str A)
+        wos = WosetStr.isWoset (str A)
+        set = IsWoset.is-set wos
+        prop = IsWoset.is-prop-valued wos
+        well = IsWoset.is-well-founded wos
+        weak = IsWoset.is-weakly-extensional wos
+        trans = IsWoset.is-trans wos
+
+        _≺ᵢ_ = BinaryRelation.InducedRelation _≺_
+               ((Σ[ b   A  ] b  a)
+               , EmbeddingΣProp λ b  prop b a)
+        setᵢ = isSetΣ set  b  isProp→isSet (prop b a))
+        propᵢ = λ (x , _) (y , _)  prop x y
+
+isEmbedding↓ : (A : Woset  ℓ')  isEmbedding (A ↓_)
+isEmbedding↓ A = injEmbedding isSetWoset (unique _ _)
+  where _≺_ = WosetStr._≺_ (str A)
+        wos = WosetStr.isWoset (str A)
+        prop = IsWoset.is-prop-valued wos
+        well = IsWoset.is-well-founded wos
+        weak = IsWoset.is-weakly-extensional wos
+        trans = IsWoset.is-trans wos
+
+        unique :  a b  (A  a)  (A  b)  a  b
+        unique a b p = isWeaklyExtensional→≺Equiv→≡ _≺_ weak a b λ c
+           propBiimpl→Equiv (prop c a) (prop c b)
+             c≺a  subst (_≺ b) (sym (to≡ c c≺a)) (snd (to (c , c≺a))))
+            λ c≺b  subst (_≺ a) (sym (inv≡ c c≺b)) (snd (inv (c , c≺b)))
+          where weq = invEq (WosetPath (A  a) (A  b)) p
+                to = equivFun (fst weq)
+                inv = invEq (fst weq)
+
+                pres≺ = IsWosetEquiv.pres≺ (snd weq)
+                pres≺⁻ = IsWosetEquiv.pres≺⁻ (snd weq)
+
+                to≡ :  c  (c≺a : c  a)  c  fst (to (c , c≺a))
+                to≡ = WFI.induction well λ a' ind a'≺a
+                   isWeaklyExtensional→≺Equiv→≡ _≺_ weak
+                    a' _ λ c
+                     propBiimpl→Equiv (prop c a') (prop c _)
+                     c≺a'  subst (_≺ fst (to (a' , a'≺a)))
+                      (sym (ind c c≺a' (trans c a' a c≺a' a'≺a)))
+                      (equivFun (pres≺ (c , trans c a' a c≺a' a'≺a)
+                                        (a' , a'≺a)) c≺a'))
+                     λ c≺toa'  subst (_≺ a') (ind (fst (inv (c , c≺b c≺toa')))
+                       (subst (fst (inv (c , c≺b c≺toa')) ≺_) (invtoa'≡a' a'≺a)
+                       (equivFun (pres≺⁻ (c , c≺b c≺toa') (to (a' , a'≺a))) c≺toa'))
+                       (snd (inv (c , c≺b c≺toa')))  invc≡toinvc (c≺b c≺toa'))
+                       (subst (fst (inv (c , c≺b c≺toa')) ≺_) (invtoa'≡a' a'≺a)
+                       (equivFun (pres≺⁻ (c , (c≺b c≺toa')) (to (a' , a'≺a))) c≺toa'))
+                  where c≺b :  {c a'}
+                                {a'≺a : a'  a}
+                                c  fst (to (a' , a'≺a))
+                                c  b
+                        c≺b {c} {a'} {a'≺a} c≺toa'
+                          = trans c _ b c≺toa' (snd (to (a' , a'≺a)))
+
+                        invtoa'≡a' :  {a'}
+                                    (a'≺a : a'  a)
+                                    fst (inv (to (a' , a'≺a)))  a'
+                        invtoa'≡a' {a'} a'≺a
+                          = fst (PathPΣ (retEq (fst weq) (a' , a'≺a)))
+
+                        invc≡toinvc :  {c}
+                                      (c≺b : c  b)
+                                      fst (to (inv (c , c≺b)))  c
+                        invc≡toinvc {c} c≺b
+                          = fst (PathPΣ (secEq (fst weq) (c , c≺b)))
+
+                inv≡ :  c  (c≺b : c  b)  c  fst (inv (c , c≺b))
+                inv≡ = WFI.induction well λ b' ind b'≺b
+                   isWeaklyExtensional→≺Equiv→≡ _≺_ weak
+                    b' _ λ c
+                     propBiimpl→Equiv (prop c b') (prop c _)
+                     c≺b'  subst (_≺ fst (inv (b' , b'≺b)))
+                      (sym (ind c c≺b' (trans c b' b c≺b' b'≺b)))
+                      (equivFun (pres≺⁻ (c , trans c b' b c≺b' b'≺b)
+                                         (b' , b'≺b)) c≺b'))
+                     λ c≺invb'  subst (_≺ b') (ind (fst (to (c , c≺a c≺invb')))
+                       (subst (fst (to (c , c≺a c≺invb')) ≺_) (toinvb'≡b' b'≺b)
+                       (equivFun (pres≺ (c , c≺a c≺invb') (inv (b' , b'≺b))) c≺invb'))
+                       (snd (to (c , c≺a c≺invb')))  toc≡invtoc (c≺a c≺invb'))
+                       (subst (fst (to (c , c≺a c≺invb')) ≺_) (toinvb'≡b' b'≺b)
+                       (equivFun (pres≺ (c , (c≺a c≺invb')) (inv (b' , b'≺b))) c≺invb'))
+                  where c≺a :  {c b'}
+                                {b'≺b : b'  b}
+                                c  fst (inv (b' , b'≺b))
+                                c  a
+                        c≺a {c} {b'} {b'≺b} c≺invb'
+                          = trans c _ a c≺invb' (snd (inv (b' , b'≺b)))
+
+                        toinvb'≡b' :  {b'}
+                                    (b'≺b : b'  b)
+                                    fst (to (inv (b' , b'≺b)))  b'
+                        toinvb'≡b' {b'} b'≺b
+                          = fst (PathPΣ (secEq (fst weq) (b' , b'≺b)))
+
+                        toc≡invtoc :  {c}
+                                      (c≺a : c  a)
+                                      fst (inv (to (c , c≺a)))  c
+                        toc≡invtoc {c} c≺a
+                          = fst (PathPΣ (retEq (fst weq) (c , c≺a)))
+
+↓Absorb : (A : Woset  ℓ')   a b
+         (b≺a : WosetStr._≺_ (str A) b a)
+         (A  a)  (b , b≺a)  A  b
+↓Absorb A a b b≺a = isAntisym≼ _ _ (f , simf) (g , simg)
+  where _≺_ = WosetStr._≺_ (str A)
+        wos = WosetStr.isWoset (str A)
+        prop = IsWoset.is-prop-valued wos
+        trans = IsWoset.is-trans wos
+
+        f :  (A  a)  (b , b≺a)    A  b 
+        f ((c , c≺a) , c≺b) = (c , c≺b)
+
+        simf : isSimulation ((A  a)  (b , b≺a)) (A  b) f
+        simf =  _ _ p  p)
+          , λ ((a' , a'≺a) , a'≺b) (b' , b'≺b) b'≺fa
+           (((b' , trans b' b a b'≺b b≺a) , b'≺b) , b'≺fa) , refl
+
+        g :  A  b    (A  a)  (b , b≺a) 
+        g (c , c≺b) = ((c , trans c b a c≺b b≺a) , c≺b)
+
+        simg : isSimulation (A  b) ((A  a)  (b , b≺a)) g
+        simg =  _ _ p  p)
+          , λ (a' , a'≺b) ((b' , b'≺a) , b'≺b) b'≺ga
+           ((b' , b'≺b) , b'≺ga)
+          , Σ≡Prop  _  prop _ _)
+           (Σ≡Prop  _  prop _ _) refl)
+
+↓AbsorbEquiv : (A : Woset  ℓ')   a b
+              (b≺a : WosetStr._≺_ (str A) b a)
+              WosetEquiv ((A  a)  (b , b≺a)) (A  b)
+↓AbsorbEquiv A a b b≺a = subst  x  WosetEquiv ((A  a)  (b , b≺a)) x)
+                               (↓Absorb A a b b≺a) reflWosetEquiv
+
+↓Monotone : (A : Woset  ℓ')   a
+           (A  a)  A
+↓Monotone A a = f , sim
+  where _≺ᵣ_ = WosetStr._≺_ (str (A  a))
+        _≺ₛ_ = WosetStr._≺_ (str A)
+
+        trans = IsWoset.is-trans (WosetStr.isWoset (str A))
+
+        f :  A  a    A 
+        f (a' , _) = a'
+
+        sim : isSimulation (A  a) A f
+        sim = mono , lifting
+          where mono :  a' a''  a' ≺ᵣ a''  (f a') ≺ₛ (f a'')
+                mono _ _ a'≺ᵣa'' = a'≺ᵣa''
+
+                lifting :  a' b  b ≺ₛ (f a')
+                         fiber {A = Σ[ a''   A  a  ] a'' ≺ᵣ a'} (f  fst) b
+                lifting (a' , a'≺ᵣa) b b≺ₛfa'
+                  = ((b , trans b a' a b≺ₛfa' a'≺ᵣa) , b≺ₛfa') , refl
+
+-- To avoid having this wind up in a higher universe, we define with an equivalence
+_≺_ : Rel (Woset ℓa ℓa') (Woset ℓb ℓb') (ℓ-max (ℓ-max (ℓ-max ℓa ℓa') ℓb) ℓb')
+A  B = Σ[ b   B  ] WosetEquiv (B  b) A
+
+↓Decreasing : (A : Woset  ℓ')   a
+              (A  a)  A
+↓Decreasing A a = a , (invEq (WosetPath (A  a) (A  a)) refl)
+
+↓Respects≺ : (A : Woset  ℓ')   a b
+             WosetStr._≺_ (str A) a b
+             (A  a)  (A  b)
+↓Respects≺ A a b a≺b = (a , a≺b) , (invEq (WosetPath _ (A  a)) (↓Absorb A b a a≺b))
+
+↓Respects≺⁻ : (A : Woset  ℓ')   a b
+               (A  a)  (A  b)
+               WosetStr._≺_ (str A) a b
+↓Respects≺⁻ A a b ((c , c≺b) , A↓b↓c≃A↓a)
+  = subst (_≺ᵣ b)
+      (isEmbedding→Inj (isEmbedding↓ A) c a
+       (sym (↓Absorb A b c c≺b)  A↓b↓c≡A↓a))
+      c≺b
+  where _≺ᵣ_ = WosetStr._≺_ (str A)
+        A↓b↓c≡A↓a = equivFun (WosetPath _ (A  a)) A↓b↓c≃A↓a
+
+↓RespectsEquiv : {A : Woset ℓa ℓa'} {B : Woset ℓb ℓb'}
+                (e : WosetEquiv A B)
+                 a  WosetEquiv (A  a) (B  equivFun (fst e) a)
+↓RespectsEquiv {A = A} {B = B} e a = eq
+               , makeIsWosetEquiv eq
+                  (x , _) (y , _) x≺y
+                  equivFun (IsWosetEquiv.pres≺ (snd e) x y) x≺y)
+                 λ (x , _) (y , _) x≺y
+                  equivFun (IsWosetEquiv.pres≺⁻ (snd e) x y) x≺y
+  where wosA = WosetStr.isWoset (str A)
+        wosB = WosetStr.isWoset (str B)
+
+        propA = IsWoset.is-prop-valued wosA
+        propB = IsWoset.is-prop-valued wosB
+
+        eq :  A  a    B  equivFun (fst e) a 
+        eq = Σ-cong-equiv (fst e)
+             λ x  propBiimpl→Equiv (propA _ _) (propB _ _)
+                   (equivFun (IsWosetEquiv.pres≺ (snd e) x a))
+                   (invEq (IsWosetEquiv.pres≺ (snd e) x a))
+
+↓RespectsEquiv⁻ : {A : Woset ℓa ℓa'} {B : Woset ℓb ℓb'}
+                 (e : WosetEquiv A B)
+                  b  WosetEquiv (A  invEq (fst e) b) (B  b)
+↓RespectsEquiv⁻ {A = A} {B = B} e b = eq
+                , makeIsWosetEquiv eq
+                   (x , _) (y , _) x≺y
+                   equivFun (IsWosetEquiv.pres≺ (snd e) x y) x≺y)
+                  λ (x , _) (y , _) x≺y
+                   equivFun (IsWosetEquiv.pres≺⁻ (snd e) x y) x≺y
+  where wosA = WosetStr.isWoset (str A)
+        wosB = WosetStr.isWoset (str B)
+
+        propA = IsWoset.is-prop-valued wosA
+        propB = IsWoset.is-prop-valued wosB
+
+        eq :  A  invEq (fst e) b    B  b 
+        eq = invEquiv (Σ-cong-equiv (invEquiv (fst e))
+             λ x  propBiimpl→Equiv (propB _ _) (propA _ _)
+                   (equivFun (IsWosetEquiv.pres≺⁻ (snd e) x b))
+                   (invEq (IsWosetEquiv.pres≺⁻ (snd e) x b)))
+
+≺Absorb↓ : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb')
+            Σ[ b   B  ] A  (B  b)
+            A  B
+≺Absorb↓ A B (b , (b' , b'≺b) , B↓b↓b'≃A) = b'
+          , subst  x  WosetEquiv x A) (↓Absorb B b b' b'≺b) B↓b↓b'≃A
+
+≺Weaken≼ : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb')
+            A  B
+            A  B
+≺Weaken≼ A B (b , B↓b≃A) = isTrans≼ A (B  b) B
+  (WosetEquiv→≼ (invWosetEquiv B↓b≃A)) (↓Monotone B b)
+
+≺Trans≼ : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb') (C : Woset ℓc ℓc')
+          A  B
+          B  C
+          A  C
+≺Trans≼ A B C (b , B↓b≃A) (f , (mono , lifting))
+  = (f b) , compWosetEquiv eq B↓b≃A
+    where _≺ᵣ_ = WosetStr._≺_ (str C)
+          _≺ₛ_ = WosetStr._≺_ (str B)
+
+          wosC = WosetStr.isWoset (str C)
+          wosB = WosetStr.isWoset (str B)
+
+          propC = IsWoset.is-prop-valued wosC
+          propB = IsWoset.is-prop-valued wosB
+
+          transB = IsWoset.is-trans wosB
+
+          eq : WosetEquiv (C  f b) (B  b)
+          eq = isAntisym≼Equiv (C  f b) (B  b)
+               (fun , simf)
+               (inv , simg)
+             where fun :  C  f b    B  b 
+                   fun (c , c≺fb) = lifting b c c≺fb .fst
+
+                   funIdem :  b'  (ineq : ((f b') ≺ᵣ (f b)))
+                            fun (f b' , ineq) .fst  b'
+                   funIdem b' fb'≺fb
+                     = isEmbedding→Inj (isSimulation→isEmbedding B C f
+                                       (mono , lifting)) _ b'
+                       (lifting b (f b') fb'≺fb .snd)
+
+                   simf : isSimulation (C  f b) (B  b) fun
+                   simf = m
+                        , λ (c , c≺fb) (b' , b'≺b) b'≺func
+                         (((f b') , (mono b' b b'≺b))
+                        , (subst (f b' ≺ᵣ_) (lifting b c c≺fb .snd)
+                          (mono b' (fun (c , c≺fb) .fst) b'≺func)))
+                        , Σ≡Prop  _  propB _ _)
+                          (funIdem b' (mono b' b b'≺b))
+                        where m :  c c'  c .fst ≺ᵣ c' .fst
+                                 fun c .fst ≺ₛ fun c' .fst
+                              m (c , c≺fb) (c' , c'≺fb) c≺c'
+                                = subst (_≺ₛ fun (c' , c'≺fb) .fst)
+                                        b'''≡b'
+                                        b'''≺b'
+                                  where b' = fun (c , c≺fb) .fst
+                                        b'' = fun (c' , c'≺fb) .fst
+
+                                        fb'≡c = lifting b c c≺fb .snd
+                                        fb''≡c' = lifting b c' c'≺fb .snd
+
+                                        fb'≺fb'' = subst2 (_≺ᵣ_)
+                                                   (sym fb'≡c)
+                                                   (sym fb''≡c')
+                                                   c≺c'
+
+                                        b''' = lifting b'' (f b')
+                                                       fb'≺fb'' .fst .fst
+
+                                        b'''≺b' = lifting b'' (f b')
+                                                          fb'≺fb'' .fst .snd
+
+                                        fb'''≡fb' = lifting b'' (f b')
+                                                            fb'≺fb'' .snd
+
+                                        b'''≡b' = isEmbedding→Inj
+                                                  (isSimulation→isEmbedding B C
+                                                    f (mono , lifting))
+                                                  b''' b' fb'''≡fb'
+
+                   inv :  B  b    C  f b 
+                   inv (b' , b'≺b) = (f b') , (mono b' b b'≺b)
+
+                   simg : isSimulation (B  b) (C  f b) inv
+                   simg =  (b' , _) (b'' , _) b'≺b''  mono b' b'' b'≺b'')
+                           , λ (b' , b'≺b) (c , c≺fb) c≺fb'
+                            (((lifting b' c c≺fb' .fst .fst)
+                           , transB _ b' b (lifting b' c c≺fb' .fst .snd) b'≺b)
+                           , lifting b' c c≺fb' .fst .snd)
+                           , Σ≡Prop  _  propC _ _) (lifting b' c c≺fb' .snd)
+
+≺RespectsEquivL : {A : Woset ℓa ℓa'} {B : Woset ℓb ℓb'} (C : Woset ℓc ℓc')
+                  WosetEquiv A B
+                  A  C
+                  B  C
+≺RespectsEquivL _ A≃B (c , C↓c≃A) = c , compWosetEquiv C↓c≃A A≃B
+
+≺RespectsEquivR : (A : Woset ℓa ℓa') {B : Woset ℓb ℓb'} {C : Woset ℓc ℓc'}
+                  WosetEquiv B C
+                  A  B
+                  A  C
+≺RespectsEquivR _ B≃C (b , B↓b≃A)
+  = (equivFun (B≃C .fst) b)
+  , (compWosetEquiv (invWosetEquiv (↓RespectsEquiv B≃C b)) B↓b≃A)
+
+≺RespectsEquiv : {A : Woset ℓa ℓa'} {B : Woset ℓb ℓb'}
+                  {C : Woset ℓc ℓc'} {D : Woset ℓd ℓd'}
+                 WosetEquiv A C
+                 WosetEquiv B D
+                 A  B
+                 C  D
+≺RespectsEquiv {B = B} {C = C} A≃C B≃D A≺'B
+  = ≺RespectsEquivR C B≃D (≺RespectsEquivL B A≃C A≺'B)
+
+-- Necessary intermediates to show that _≺_ is well-ordered
+
+isPropValued≺ : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb')
+                isProp (A  B)
+isPropValued≺ A B (b , p) (b' , q)
+  = Σ≡Prop  _  isPropValuedWosetEquiv)
+    (isEmbedding→Inj (isEmbedding↓ B) b b'
+      (equivFun (WosetPath (B  b) (B  b'))
+        (compWosetEquiv p (invWosetEquiv q))))
+
+isWellFounded≺ : WellFounded (_≺_ {ℓa = } {ℓa' = })
+isWellFounded≺ A = acc  B (a , A↓a≃B)
+                     subst (Acc _≺_)
+                            (equivFun (WosetPath (A  a) B) A↓a≃B)
+                            (isAcc↓ A a))
+  where isAcc↓ : (A : Woset  )   a  Acc _≺_ (A  a)
+        isAcc↓ A = WFI.induction well λ a ind
+                  acc  B ((a' , a'≺a) , A↓a↓a'≃B)
+                  subst (Acc _≺_)
+                   (sym (↓Absorb A a a' a'≺a)
+                      equivFun (WosetPath _ B) A↓a↓a'≃B)
+                   (ind a' a'≺a))
+          where _≺ᵣ_ = WosetStr._≺_ (str A)
+                wos = WosetStr.isWoset (str A)
+                well = IsWoset.is-well-founded wos
+
+isTrans≺ : (A : Woset ℓa ℓa') (B : Woset ℓb ℓb') (C : Woset ℓc ℓc')
+           A  B  B  C  A  C
+isTrans≺ A B C (b , B↓b≃A) (c , C↓c≃B) = ≺Absorb↓ A C (c , (invEq (fst C↓c≃B) b
+                                 , compWosetEquiv (↓RespectsEquiv⁻ C↓c≃B b) B↓b≃A))
+
+isWeaklyExtensional≺ : isWeaklyExtensional (_≺_ {ℓa = } {ℓa' = })
+isWeaklyExtensional≺
+  = ≺Equiv→≡→isWeaklyExtensional _≺_ isSetWoset isPropValued≺
+      λ A B ex  path A B ex
+  where path : (A B : Woset  )
+              ((C : Woset  )  (C  A)  (C  B))
+              A  B
+        path A B ex = equivFun (WosetPath A B)
+                      (eq , (makeIsWosetEquiv eq
+                             a a' a≺a'
+                               ↓Respects≺⁻ B (equivFun eq a) (equivFun eq a')
+                                (≺RespectsEquiv
+                                  (invWosetEquiv (equivFun (ex (A  a))
+                                                 (↓Decreasing A a) .snd))
+                                  (invWosetEquiv (equivFun (ex (A  a'))
+                                                 (↓Decreasing A a') .snd))
+                                  (↓Respects≺ A a a' a≺a')))
+                             b b' b≺b'
+                               ↓Respects≺⁻ A (invEq eq b) (invEq eq b')
+                                (≺RespectsEquiv
+                                   (invWosetEquiv (invEq (ex (B  b))
+                                                  (↓Decreasing B b) .snd))
+                                   (invWosetEquiv (invEq (ex (B  b'))
+                                                  (↓Decreasing B b') .snd))
+                                   (↓Respects≺ B b b' b≺b')))))
+          where is : Iso  A   B 
+                Iso.fun is a = equivFun (ex (A  a)) (↓Decreasing A a) .fst
+                Iso.inv is b = invEq (ex (B  b)) (↓Decreasing B b) .fst
+                Iso.rightInv is p = isEmbedding→Inj (isEmbedding↓ B) q p
+                                    (equivFun (WosetPath (B  q) (B  p))
+                                      (compWosetEquiv
+                                        (equivFun (ex (A  (Iso.inv is p)))
+                                                  (↓Decreasing A (Iso.inv is p)) .snd)
+                                        (invEq (ex (B  p)) (↓Decreasing B p) .snd)))
+                                      where q = Iso.fun is (Iso.inv is p)
+                Iso.leftInv  is p = isEmbedding→Inj (isEmbedding↓ A) q p
+                                    (equivFun (WosetPath (A  q) (A  p))
+                                      (compWosetEquiv
+                                        (invEq (ex (B  (Iso.fun is p)))
+                                               (↓Decreasing B (Iso.fun is p)) .snd)
+                                        (equivFun (ex (A  p)) (↓Decreasing A p) .snd)))
+                                      where q = Iso.inv is (Iso.fun is p)
+
+                eq :  A    B 
+                eq = isoToEquiv is
+
+isWoset≺ : IsWoset (_≺_ {ℓa = } {ℓa' = })
+isWoset≺ = iswoset
+           isSetWoset
+           isPropValued≺
+           isWellFounded≺
+           isWeaklyExtensional≺
+           isTrans≺
+
+{- With all of the above handled, we now need the notion of suprema.
+   For that, though, we will expand upon the direction taken in
+   lemma 10.3.22 of the HoTT book by Tom de Jong in
+   https://www.cs.bham.ac.uk/~mhe/agda/Ordinals.OrdinalOfOrdinalsSuprema.html
+-}
+
+private
+  module _
+    { I : Type ℓ' }
+    ( F : I  Woset  )
+    where
+
+    open BinaryRelation
+
+    ΣF : Type (ℓ-max  ℓ')
+    ΣF = Σ[ i  I ]  F i 
+
+    _≈_ : ΣF  ΣF  Type 
+    (i , x)  (j , y) = WosetEquiv (F i  x) (F j  y)
+
+    _<_ : ΣF  ΣF  Type 
+    (i , x) < (j , y) = (F i  x)  (F j  y)
+
+    isPropValued< : isPropValued _<_
+    isPropValued< (i , x) (j , y) = isPropValued≺ (F i  x) (F j  y)
+
+    isTrans< : isTrans _<_
+    isTrans< (i , x) (j , y) (k , z)
+      = isTrans≺ (F i  x) (F j  y) (F k  z)
+
+    isWellFounded< : WellFounded _<_
+    isWellFounded< (i , x) = WFI.induction isWellFounded≺
+      {P = λ a  ((i , x) : ΣF)  (WosetEquiv a (F i  x))  Acc _<_ (i , x)}
+       a ind (i' , x') a≃Fi'↓x'  acc  (j , y) y'≺x'
+        ind (F j  y) (≺RespectsEquivR _ (invWosetEquiv a≃Fi'↓x') y'≺x')
+             (j , y) (reflWosetEquiv)))
+      (F i  x) (i , x) (reflWosetEquiv)
+
+    -- We get weak extensionality up to ≈
+    isWeaklyExtensionalUpTo≈< : (α β : ΣF)
+                                (∀ γ  (γ < α  γ < β) × (γ < β  γ < α))
+                                α  β
+    isWeaklyExtensionalUpTo≈< (i , x) (j , y) ex
+      = invEq (WosetPath _ _)
+        (isWeaklyExtensional→≺Equiv→≡ _≺_ isWeaklyExtensional≺
+        (F i  x) (F j  y) λ z
+         propBiimpl→Equiv (isPropValued≺ z (F i  x))
+                           (isPropValued≺ z (F j  y))
+           ((x' , x'≺x) , p)  ≺RespectsEquivL (F j  y)
+            (subst  x  WosetEquiv x z) (↓Absorb (F i) x x' x'≺x) p)
+                   (ex (i , x') .fst ((x' , x'≺x)
+            , ↓AbsorbEquiv (F i) x x' x'≺x)))
+          λ ((y' , y'≺y) , q)  ≺RespectsEquivL (F i  x)
+            (subst  x  WosetEquiv x z) (↓Absorb (F j) y y' y'≺y) q)
+                   (ex (j , y') .snd ((y' , y'≺y)
+            , ↓AbsorbEquiv (F j) y y' y'≺y)))
+
+  {- Given the above, it seems apparent that this will properly be an ordinal
+     under the set quotient. Before that, we want to show this will be
+     the supremum.
+  -}
+
+    ι : (i : I)   F i   ΣF
+    ι i x = (i , x)
+
+    ιPreservesOrder : (i : I) (x y :  F i )
+                     WosetStr._≺_ (str (F i)) x y  ι i x < ι i y
+    ιPreservesOrder i x y x≺y = ↓Respects≺ (F i) x y x≺y
+
+    ι≈↓ : (i : I) (x :  F i ) ((j , y) : ΣF)
+         (j , y) < ι i x
+         Σ[ x'   F i  ] WosetStr._≺_ (str (F i)) x' x × ι i x'  (j , y)
+    ι≈↓ i x (j , y) ((x' , x'≺x) , e) = x' , x'≺x
+        , compWosetEquiv (invWosetEquiv (↓AbsorbEquiv (F (fst (ι i x))) x x' x'≺x)) e
+
+    module _
+      (β : Woset  )
+      (upβ : (i : I)  F i  β)
+      where
+
+      f : (i : I)   F i    β 
+      f i x = upβ i .fst x
+
+      fCommF : (i : I) (x :  F i )  F i  x  β  (f i x)
+      fCommF i x = sym (equivFun (WosetPath (β  (f i x)) (F i  x))
+        (≺Trans≼ (F i  x) (F i) β (↓Decreasing (F i) x) (upβ i) .snd))
+
+      f⃕ : ΣF   β 
+      f⃕ (i , x) = f i x
+
+      f⃕Respects≈ : {p q : ΣF}  p  q  f⃕ p  f⃕ q
+      f⃕Respects≈ {(i , x)} {(j , y)} e
+        = isEmbedding→Inj (isEmbedding↓ β) (f⃕ (i , x)) (f⃕ (j , y))
+          ((β  f⃕ (i , x)) ≡⟨ sym (fCommF i x) 
+           (F i  x)        ≡⟨ equivFun (WosetPath (F i  x) (F j  y)) e 
+           (F j  y)        ≡⟨ fCommF j y 
+           (β  f⃕ (j , y)) )
+
+      f⃕presβ≺ : (p q : ΣF)  p < q  WosetStr._≺_ (str β) (f⃕ p) (f⃕ q)
+      f⃕presβ≺ (i , x) (j , y) p<q = ↓Respects≺⁻ β (f⃕ (i , x)) (f⃕ (j , y))
+        (subst2 _≺_ (fCommF i x) (fCommF j y) p<q)
+
+      f⃕InitialSegment : (p : ΣF) (b :  β )
+                        WosetStr._≺_ (str β) b (f⃕ p)
+                        fiber {A = Σ[ q  ΣF ] q < p} (f⃕  fst) b
+      f⃕InitialSegment (i , x) b b≺fp  = ((i , x') , u) , v
+        where lemma = upβ i .snd .snd
+
+              x' = lemma x b b≺fp .fst .fst
+              x'<x = lemma x b b≺fp .fst .snd
+
+              u = ↓Respects≺ (F i) x' x x'<x
+              v = lemma x b b≺fp .snd
+
+    -- A quick proof that ≈ is an equivalence relation
+     : isEquivRel _≈_
+    isEquivRel.reflexive  = λ _  reflWosetEquiv
+    isEquivRel.symmetric  = λ _ _  invWosetEquiv
+    isEquivRel.transitive  = λ _ _ _  compWosetEquiv
+
+    -- And now, we forge our quotient type
+
+    F/ : Type (ℓ-max  ℓ')
+    F/ = ΣF / _≈_
+
+    _<'_ : ΣF  ΣF  hProp _
+    x <' y = (x < y , isPropValued< x y)
+
+    <Congruence : { p q p' q' : ΣF}  p  p'  q  q'
+                 p <' q  p' <' q'
+    <Congruence {(i , x)} {(j , y)} {(i' , x')} {(j' , y')} eqp eqq
+      = Σ≡Prop  _  isPropIsProp)
+        (isoToPath (isProp→Iso (isPropValued< _ _) (isPropValued< _ _)
+         x<y  ≺RespectsEquiv eqp eqq x<y)
+        λ y<x  ≺RespectsEquiv (invWosetEquiv eqp) (invWosetEquiv eqq) y<x))
+
+    _</'_ : F/  F/  hProp _
+    x </' y = /₂.rec2 isSetHProp _<'_
+               _ _ c a≈b  <Congruence a≈b (isEquivRel.reflexive  c))
+               a _ _ b≈c  <Congruence (isEquivRel.reflexive  a) b≈c) x y
+
+    _</_ : F/  F/  Type 
+    x </ y =  x </' y 
+
+    isPropValued</ : isPropValued _</_
+    isPropValued</ x y = str (x </' y)
+
+    isTrans</ : isTrans _</_
+    isTrans</ = elimProp3  x _ z  isPropΠ2 λ _ _  isPropValued</ x z) isTrans<
+
+    isWeaklyExtensional</ : isWeaklyExtensional _</_
+    isWeaklyExtensional</ = ≺×→≡→isWeaklyExtensional _</_ squash/ isPropValued</
+      (elimProp2  _ _  isPropΠ λ _  squash/ _ _)
+      λ a b z  eq/ a b (isWeaklyExtensionalUpTo≈< a b
+        λ c  z [ c ]))
+
+    isWellFounded</ : WellFounded _</_
+    isWellFounded</ = elimProp  _  isPropAcc _)
+      (WFI.induction isWellFounded< λ a ind
+         acc (elimProp  _  isPropΠ λ _  isPropAcc _)
+              λ b b<a  ind b b<a))
+
+    isWoset</ : IsWoset _</_
+    isWoset</ = iswoset squash/
+                        isPropValued</
+                        isWellFounded</
+                        isWeaklyExtensional</
+                        isTrans</
+
+    F/-Ord : Woset (ℓ-max ℓ' ) 
+    F/-Ord = F/ , wosetstr _</_ isWoset</
+
+    -- Now we verify that it's an upper bound
+    F/IsUpperBound : (i : I)  F i  F/-Ord
+    F/IsUpperBound i = [_]  ι i
+      , isSimulation∃→isSimulation (F i) F/-Ord ([_]  ι i)
+       (ιPreservesOrder i
+      , λ x  elimProp  _  isPropΠ λ _  isPropPropTrunc)
+        λ (j , y) l   ((ι≈↓ i x (j , y) l .fst)
+                      , (ι≈↓ i x (j , y) l .snd .fst))
+                      , (eq/ (i , l .fst .fst) (j , y)
+                        (ι≈↓ i x (j , y) l .snd .snd)) ∣₁)
+
+    -- And that more specifically, it's the supremum
+    F/IsSupremum : (β : Woset  )
+                  ((i : I)  F i  β)
+                  F/-Ord  β
+    F/IsSupremum β upβ = f/ , sim
+      where wosβ = WosetStr.isWoset (str β)
+            setβ = IsWoset.is-set wosβ
+            propβ = IsWoset.is-prop-valued wosβ
+
+            f/ :  F/-Ord    β 
+            f/ = /₂.rec setβ
+                        (f⃕ β upβ)
+                        λ a b  f⃕Respects≈ β upβ {a} {b}
+
+            sim : isSimulation F/-Ord β f/
+            sim = isSimulation∃→isSimulation F/-Ord β f/
+                  ((elimProp2  _ _  isPropΠ λ _  propβ _ _)
+                    (f⃕presβ≺ β upβ))
+                , elimProp  _  isPropΠ2 λ _ _  isPropPropTrunc)
+                  λ a b b≺fa   ([ f⃕InitialSegment β upβ a b b≺fa .fst .fst ]
+                                 , (f⃕InitialSegment β upβ a b b≺fa .fst .snd))
+                                 , (f⃕InitialSegment β upβ a b b≺fa .snd) ∣₁)
+
+-- With all of that done, we can now define supremum of small ordinal collections
+sup : {I : Type ℓ'} (F : I  Woset  )
+     Σ[ β  Woset (ℓ-max ℓ' )  ]
+         ((i : I)  F i  β)
+       × ((γ : Woset  )  ((i : I)  F i  γ)  β  γ)
+sup F = (F/-Ord F) , (F/IsUpperBound F) , (F/IsSupremum F)
+
\ No newline at end of file diff --git a/Cubical.Relation.Binary.Order.Woset.html b/Cubical.Relation.Binary.Order.Woset.html new file mode 100644 index 0000000000..bfaef74ce2 --- /dev/null +++ b/Cubical.Relation.Binary.Order.Woset.html @@ -0,0 +1,7 @@ + +Cubical.Relation.Binary.Order.Woset
{-# OPTIONS --safe #-}
+module Cubical.Relation.Binary.Order.Woset where
+
+open import Cubical.Relation.Binary.Order.Woset.Base public
+open import Cubical.Relation.Binary.Order.Woset.Properties public
+
\ No newline at end of file diff --git a/Cubical.Relation.Binary.Properties.html b/Cubical.Relation.Binary.Properties.html index 60652273c6..be095a6ff9 100644 --- a/Cubical.Relation.Binary.Properties.html +++ b/Cubical.Relation.Binary.Properties.html @@ -25,31 +25,31 @@ module _ (f : A B) - (R : Rel B B ) + (R : Rel B B ) where - open BinaryRelation + open BinaryRelation - pulledbackRel : Rel A A + pulledbackRel : Rel A A pulledbackRel x y = R (f x) (f y) - isReflPulledbackRel : isRefl R isRefl pulledbackRel + isReflPulledbackRel : isRefl R isRefl pulledbackRel isReflPulledbackRel isReflR a = isReflR (f a) - isSymPulledbackRel : isSym R isSym pulledbackRel + isSymPulledbackRel : isSym R isSym pulledbackRel isSymPulledbackRel isSymR a a' = isSymR (f a) (f a') - isTransPulledbackRel : isTrans R isTrans pulledbackRel + isTransPulledbackRel : isTrans R isTrans pulledbackRel isTransPulledbackRel isTransR a a' a'' = isTransR (f a) (f a') (f a'') - open isEquivRel + open isEquivRel - isEquivRelPulledbackRel : isEquivRel R isEquivRel pulledbackRel - reflexive (isEquivRelPulledbackRel isEquivRelR) = isReflPulledbackRel (reflexive isEquivRelR) - symmetric (isEquivRelPulledbackRel isEquivRelR) = isSymPulledbackRel (symmetric isEquivRelR) - transitive (isEquivRelPulledbackRel isEquivRelR) = isTransPulledbackRel (transitive isEquivRelR) + isEquivRelPulledbackRel : isEquivRel R isEquivRel pulledbackRel + reflexive (isEquivRelPulledbackRel isEquivRelR) = isReflPulledbackRel (reflexive isEquivRelR) + symmetric (isEquivRelPulledbackRel isEquivRelR) = isSymPulledbackRel (symmetric isEquivRelR) + transitive (isEquivRelPulledbackRel isEquivRelR) = isTransPulledbackRel (transitive isEquivRelR) -module _ {A B : Type } (e : A B) {_∼_ : Rel A A ℓ'} {_∻_ : Rel B B ℓ'} +module _ {A B : Type } (e : A B) {_∼_ : Rel A A ℓ'} {_∻_ : Rel B B ℓ'} (_h_ : x y (x y) ((fst e x) (fst e y))) where RelPathP : PathP i ua e i ua e i Type _) diff --git a/Cubical.Relation.Everything.html b/Cubical.Relation.Everything.html index f181f08095..df8d12868b 100644 --- a/Cubical.Relation.Everything.html +++ b/Cubical.Relation.Everything.html @@ -5,9 +5,11 @@ import Cubical.Relation.Binary import Cubical.Relation.Binary.Extensionality import Cubical.Relation.Binary.Order -import Cubical.Relation.Nullary -import Cubical.Relation.Nullary.DecidablePropositions -import Cubical.Relation.Nullary.HLevels -import Cubical.Relation.ZigZag.Applications.MultiSet -import Cubical.Relation.ZigZag.Base +import Cubical.Relation.Binary.Order.Woset +import Cubical.Relation.Binary.Order.Woset.Simulation +import Cubical.Relation.Nullary +import Cubical.Relation.Nullary.DecidablePropositions +import Cubical.Relation.Nullary.HLevels +import Cubical.Relation.ZigZag.Applications.MultiSet +import Cubical.Relation.ZigZag.Base \ No newline at end of file diff --git a/Cubical.Relation.ZigZag.Base.html b/Cubical.Relation.ZigZag.Base.html index 4e1e7c8f4a..dc468a10a3 100644 --- a/Cubical.Relation.ZigZag.Base.html +++ b/Cubical.Relation.ZigZag.Base.html @@ -14,8 +14,8 @@ open import Cubical.HITs.PropositionalTruncation as Trunc open import Cubical.Relation.Binary.Base -open BinaryRelation -open isEquivRel +open BinaryRelation +open isEquivRel private variable @@ -37,20 +37,20 @@ QuasiEquivRel : (A B : Type ) (ℓ' : Level) Type (ℓ-max (ℓ-suc ℓ')) QuasiEquivRel A B ℓ' = - Σ[ R PropRel A B ℓ' ] isQuasiEquivRel (R .fst) + Σ[ R PropRel A B ℓ' ] isQuasiEquivRel (R .fst) invQER : {A B : Type } {ℓ' : Level} QuasiEquivRel A B ℓ' QuasiEquivRel B A ℓ' -invQER (R , qer) .fst = invPropRel R +invQER (R , qer) .fst = invPropRel R invQER (R , qer) .snd .zigzag aRb aRb' a'Rb' = qer .zigzag a'Rb' aRb' aRb invQER (R , qer) .snd .fwd = qer .bwd invQER (R , qer) .snd .bwd = qer .fwd QER→EquivRel : {A B : Type } - QuasiEquivRel A B ℓ' EquivPropRel A (ℓ-max ℓ') -QER→EquivRel (R , sim) .fst = compPropRel R (invPropRel R) -QER→EquivRel (R , sim) .snd .reflexive a = Trunc.map {(b , r) b , r , r}) (sim .fwd a) -QER→EquivRel (R , sim) .snd .symmetric _ _ = Trunc.map {(b , r₀ , r₁) b , r₁ , r₀}) -QER→EquivRel (R , sim) .snd .transitive _ _ _ = + QuasiEquivRel A B ℓ' EquivPropRel A (ℓ-max ℓ') +QER→EquivRel (R , sim) .fst = compPropRel R (invPropRel R) +QER→EquivRel (R , sim) .snd .reflexive a = Trunc.map {(b , r) b , r , r}) (sim .fwd a) +QER→EquivRel (R , sim) .snd .symmetric _ _ = Trunc.map {(b , r₀ , r₁) b , r₁ , r₀}) +QER→EquivRel (R , sim) .snd .transitive _ _ _ = Trunc.map2 {(b , r₀ , r₁) (b' , r₀' , r₁') b , r₀ , sim .zigzag r₁' r₀' r₁}) -- The following result is due to Carlo Angiuli @@ -168,25 +168,25 @@ -- which propagated to "Internalizing representation independence with univalence" -- https://doi.org/10.1145/3434293, just above Definition 5.3 -- -open HeterogenousRelation +open HeterogenousRelation -module Universal→ZigZag {A B : Type } (R : PropRel A B ℓ') where +module Universal→ZigZag {A B : Type } (R : PropRel A B ℓ') where - Rᴸ = compPropRel R (invPropRel R) - Rᴿ = compPropRel (invPropRel R) R + Rᴸ = compPropRel R (invPropRel R) + Rᴿ = compPropRel (invPropRel R) R - Claim = isUniversalRel (Rᴸ .fst) isUniversalRel (Rᴿ .fst) isZigZagComplete (R .fst) + Claim = isUniversalRel (Rᴸ .fst) isUniversalRel (Rᴿ .fst) isZigZagComplete (R .fst) open import Cubical.Data.Empty using (; isProp⊥) -¬Universal→ZigZag : (∀ { ℓ'} (A B : Type ) (R : PropRel A B ℓ') Universal→ZigZag.Claim R) +¬Universal→ZigZag : (∀ { ℓ'} (A B : Type ) (R : PropRel A B ℓ') Universal→ZigZag.Claim R) ¬Universal→ZigZag p = ¬R-zigzag {a} {b} {a'} {b'} p Bool Bool R Rᴸ-universal Rᴿ-universal {a} {b} {a'} {b'}) where open import Cubical.Data.Unit open import Cubical.Data.Bool -- zig... - R : PropRel Bool Bool ℓ-zero + R : PropRel Bool Bool ℓ-zero R .fst false false = Unit R .fst false true = R .fst true b = Unit @@ -199,16 +199,16 @@ ¬R-zigzag : isZigZagComplete (R .fst) ¬R-zigzag p = p {a = false} {b = false} {a' = true} {b' = true} tt tt tt - Rᴸ = compPropRel R (invPropRel R) - Rᴿ = compPropRel (invPropRel R) R + Rᴸ = compPropRel R (invPropRel R) + Rᴿ = compPropRel (invPropRel R) R - Rᴸ-universal : isUniversalRel (Rᴸ .fst) + Rᴸ-universal : isUniversalRel (Rᴸ .fst) Rᴸ-universal false false = false , tt , tt ∣₁ Rᴸ-universal false true = false , tt , tt ∣₁ Rᴸ-universal true false = false , tt , tt ∣₁ Rᴸ-universal true true = false , tt , tt ∣₁ - Rᴿ-universal : isUniversalRel (Rᴿ .fst) + Rᴿ-universal : isUniversalRel (Rᴿ .fst) Rᴿ-universal false false = true , tt , tt ∣₁ Rᴿ-universal false true = true , tt , tt ∣₁ Rᴿ-universal true false = true , tt , tt ∣₁ diff --git a/Cubical.Structures.Relational.Equalizer.html b/Cubical.Structures.Relational.Equalizer.html index f325492086..6dce78304c 100644 --- a/Cubical.Structures.Relational.Equalizer.html +++ b/Cubical.Structures.Relational.Equalizer.html @@ -59,7 +59,7 @@ cong fst (quo₂ .snd ( g _ (quo₁ .fst .fst) - , subst t ρ₂ (graphRel [_]) t (g _ (quo₁ .fst .fst))) (sym p) (αg (quo₁ .fst .snd)) + , subst t ρ₂ (graphRel [_]) t (g _ (quo₁ .fst .fst))) (sym p) (αg (quo₁ .fst .snd)) )) equalizerSuitableRel _ _ θ₁ _ .symmetric R = θ₁ .symmetric R equalizerSuitableRel _ _ θ₁ _ .transitive R R' = θ₁ .transitive R R' diff --git a/Cubical.Structures.Relational.Function.html b/Cubical.Structures.Relational.Function.html index f43404f204..e4aca35ada 100644 --- a/Cubical.Structures.Relational.Function.html +++ b/Cubical.Structures.Relational.Function.html @@ -33,20 +33,20 @@ FunctionRelStr ρ₁ ρ₂ R f g = {x y} ρ₁ R x y ρ₂ R (f x) (g y) -open BinaryRelation -open isEquivRel +open BinaryRelation +open isEquivRel private - composeWith[_] : {A : Type } (R : EquivPropRel A ) - compPropRel (R .fst) (quotientPropRel (R .fst .fst)) .fst graphRel [_] + composeWith[_] : {A : Type } (R : EquivPropRel A ) + compPropRel (R .fst) (quotientPropRel (R .fst .fst)) .fst graphRel [_] composeWith[_] R = funExt₂ λ a t hPropExt squash₁ (squash/ _ _) (Trunc.rec (squash/ _ _) {(b , r , p) eq/ a b r p })) - p a , R .snd .reflexive a , p ∣₁) + p a , R .snd .reflexive a , p ∣₁) - [_]∙[_]⁻¹ : {A : Type } (R : EquivPropRel A ) - compPropRel (quotientPropRel (R .fst .fst)) (invPropRel (quotientPropRel (R .fst .fst))) .fst + [_]∙[_]⁻¹ : {A : Type } (R : EquivPropRel A ) + compPropRel (quotientPropRel (R .fst .fst)) (invPropRel (quotientPropRel (R .fst .fst))) .fst R .fst .fst [_]∙[_]⁻¹ R = funExt₂ λ a b @@ -84,8 +84,8 @@ θ₂ .set squash/ _ _ (cong [f] p) (cong [f] q) j i relLemma : (s : S X) (t : S X) - ρ₁ (graphRel [_]) s (funIsEq (σ₁ .quo R) [ t ]) - ρ₂ (graphRel [_]) (f s) ([f] [ t ]) + ρ₁ (graphRel [_]) s (funIsEq (σ₁ .quo R) [ t ]) + ρ₂ (graphRel [_]) (f s) ([f] [ t ]) relLemma s t r = subst R' ρ₂ R' (f s) ([f] [ t ])) (composeWith[_] R) @@ -98,17 +98,17 @@ subst R' ρ₁ R' s t) ([_]∙[_]⁻¹ R) (θ₁ .transitive (quotientPropRel (R .fst .fst)) - (invPropRel (quotientPropRel (R .fst .fst))) + (invPropRel (quotientPropRel (R .fst .fst))) r (θ₁ .symmetric (quotientPropRel (R .fst .fst)) (subst - t' ρ₁ (graphRel [_]) t' (funIsEq (σ₁ .quo R) [ t ])) + t' ρ₁ (graphRel [_]) t' (funIsEq (σ₁ .quo R) [ t ])) (σ₁ .act .actStrId t) (σ₁ .act .actRel eq/ t t (ref t))))) quoRelLemma : (s : S X) (t : S X / ρ₁ (R .fst .fst)) - ρ₁ (graphRel [_]) s (funIsEq (σ₁ .quo R) t) - ρ₂ (graphRel [_]) (f s) ([f] t) + ρ₁ (graphRel [_]) s (funIsEq (σ₁ .quo R) t) + ρ₂ (graphRel [_]) (f s) ([f] t) quoRelLemma s = elimProp _ isPropΠ λ _ θ₂ .prop _ _ squash/ _ _) _ _) (relLemma s) @@ -118,7 +118,7 @@ final .fst .snd {s} {t} r = quoRelLemma s (invIsEq (σ₁ .quo R) t) - (subst (ρ₁ (graphRel [_]) s) (sym (secIsEq (σ₁ .quo R) t)) r) + (subst (ρ₁ (graphRel [_]) s) (sym (secIsEq (σ₁ .quo R) t)) r) final .snd (f' , c) = Σ≡Prop _ isPropImplicitΠ λ s @@ -137,12 +137,12 @@ ( f' (funIsEq (σ₁ .quo R) [ s ]) , c (subst - s' ρ₁ (graphRel [_]) s' (funIsEq (σ₁ .quo R) [ s ])) + s' ρ₁ (graphRel [_]) s' (funIsEq (σ₁ .quo R) [ s ])) (σ₁ .act .actStrId s) (σ₁ .act .actRel eq/ s s (ref s))) ))) functionSuitableRel {ρ₁ = ρ₁} {ρ₂} θ₁ σ θ₂ .symmetric R h r = - θ₂ .symmetric R (h (θ₁ .symmetric (invPropRel R) r)) + θ₂ .symmetric R (h (θ₁ .symmetric (invPropRel R) r)) functionSuitableRel {ρ₁ = ρ₁} {ρ₂} θ₁ σ θ₂ .transitive R R' h h' rr' = Trunc.rec (θ₂ .prop _ _ squash₁) _ _) diff --git a/Cubical.ZCohomology.CohomologyRings.CP2.html b/Cubical.ZCohomology.CohomologyRings.CP2.html index 682b8a25a5..fcba41cb65 100644 --- a/Cubical.ZCohomology.CohomologyRings.CP2.html +++ b/Cubical.ZCohomology.CohomologyRings.CP2.html @@ -435,7 +435,7 @@ ϕ₀-pres1 = refl ϕ₀-gen : (n : ) (f : coHom n CP²) ϕ₀ (pos 1) f f -ϕ₀-gen n = ST.elim _ isProp→isSet (GroupStr.is-set (snd (coHomGr n CP²)) _ _)) +ϕ₀-gen n = ST.elim _ isProp→isSet (GroupStr.is-set (snd (coHomGr n CP²)) _ _)) λ f cong ∣_∣₂ (funExt x rUnitₖ n (f x))) ϕ₂⌣ϕ₂≡ϕ₄ : ϕ₂ (pos 1) ϕ₂ (pos 1) ϕ₄ (pos 1) diff --git a/Cubical.ZCohomology.CohomologyRings.Coproduct.html b/Cubical.ZCohomology.CohomologyRings.Coproduct.html index 67c29ed518..e1939065d1 100644 --- a/Cubical.ZCohomology.CohomologyRings.Coproduct.html +++ b/Cubical.ZCohomology.CohomologyRings.Coproduct.html @@ -275,14 +275,14 @@ helperX : {n : } {m : } (a : coHom n (X Y)) (b : coHom m (X Y)) fst (T (a b)) (fst (T a)) (fst (T b)) - helperX = ST.elim x isProp→isSet λ u v i y squash₂ _ _ (u y) (v y) i ) - λ g ST.elim _ isProp→isSet (squash₂ _ _)) + helperX = ST.elim x isProp→isSet λ u v i y squash₂ _ _ (u y) (v y) i ) + λ g ST.elim _ isProp→isSet (squash₂ _ _)) h refl) helperY : {n : } {m : } (a : coHom n (X Y)) (b : coHom m (X Y)) snd (T (a b)) (snd (T a)) (snd (T b)) - helperY = ST.elim x isProp→isSet λ u v i y squash₂ _ _ (u y) (v y) i ) - λ g ST.elim _ isProp→isSet (squash₂ _ _)) + helperY = ST.elim x isProp→isSet λ u v i y squash₂ _ _ (u y) (v y) i ) + λ g ST.elim _ isProp→isSet (squash₂ _ _)) h refl) diff --git a/Cubical.ZCohomology.CohomologyRings.KleinBottle.html b/Cubical.ZCohomology.CohomologyRings.KleinBottle.html index 6df807bb87..a83d7f901e 100644 --- a/Cubical.ZCohomology.CohomologyRings.KleinBottle.html +++ b/Cubical.ZCohomology.CohomologyRings.KleinBottle.html @@ -275,7 +275,7 @@ ϕ₀-gen : (n : ) (f : coHom n KleinBottle) ϕ₀ (pos 1) f f - ϕ₀-gen n = ST.elim _ isProp→isSet (GroupStr.is-set (snd (coHomGr n KleinBottle)) _ _)) + ϕ₀-gen n = ST.elim _ isProp→isSet (GroupStr.is-set (snd (coHomGr n KleinBottle)) _ _)) f cong ∣_∣₂ (funExt x rUnitₖ n (f x)))) -- note that the proof might be simplified by adding a second partition on T diff --git a/Cubical.ZCohomology.CohomologyRings.RP2wedgeS1.html b/Cubical.ZCohomology.CohomologyRings.RP2wedgeS1.html index 652fdd7b7a..990540c8b7 100644 --- a/Cubical.ZCohomology.CohomologyRings.RP2wedgeS1.html +++ b/Cubical.ZCohomology.CohomologyRings.RP2wedgeS1.html @@ -276,7 +276,7 @@ ϕ₀-gen : (n : ) (f : coHom n RP²⋁S¹) ϕ₀ (pos 1) f f - ϕ₀-gen n = ST.elim _ isProp→isSet (GroupStr.is-set (snd (coHomGr n RP²⋁S¹)) _ _)) + ϕ₀-gen n = ST.elim _ isProp→isSet (GroupStr.is-set (snd (coHomGr n RP²⋁S¹)) _ _)) f cong ∣_∣₂ (funExt x rUnitₖ n (f x)))) -- note that the proof might be simpliale by adding a second partition on T diff --git a/Cubical.ZCohomology.CohomologyRings.S1.html b/Cubical.ZCohomology.CohomologyRings.S1.html index 283640a75b..5e7704d95c 100644 --- a/Cubical.ZCohomology.CohomologyRings.S1.html +++ b/Cubical.ZCohomology.CohomologyRings.S1.html @@ -183,7 +183,7 @@ ℤ[x]→H*-S¹-pres+ x y = refl ϕ₀-gen : (n : ) (f : coHom n (S₊ 1)) ϕ₀ (pos 1) f f - ϕ₀-gen n = ST.elim _ isProp→isSet (GroupStr.is-set (snd (coHomGr n (S₊ 1))) _ _)) + ϕ₀-gen n = ST.elim _ isProp→isSet (GroupStr.is-set (snd (coHomGr n (S₊ 1))) _ _)) λ f cong ∣_∣₂ (funExt x rUnitₖ n (f x))) open pres⌣ diff --git a/Cubical.ZCohomology.CohomologyRings.S2wedgeS4.html b/Cubical.ZCohomology.CohomologyRings.S2wedgeS4.html index f142b56b0f..4e284acf74 100644 --- a/Cubical.ZCohomology.CohomologyRings.S2wedgeS4.html +++ b/Cubical.ZCohomology.CohomologyRings.S2wedgeS4.html @@ -283,7 +283,7 @@ ϕ₀-gen : (n : ) (f : coHom n S²⋁S⁴) ϕ₀ (pos 1) f f - ϕ₀-gen n = ST.elim _ isProp→isSet (GroupStr.is-set (snd (coHomGr n S²⋁S⁴)) _ _)) + ϕ₀-gen n = ST.elim _ isProp→isSet (GroupStr.is-set (snd (coHomGr n S²⋁S⁴)) _ _)) f cong ∣_∣₂ (funExt x rUnitₖ n (f x)))) -- note that the proof might be simpliale by adding a second partition on T diff --git a/Cubical.ZCohomology.EilenbergSteenrodZ.html b/Cubical.ZCohomology.EilenbergSteenrodZ.html index 7592b6dbca..17a03cb573 100644 --- a/Cubical.ZCohomology.EilenbergSteenrodZ.html +++ b/Cubical.ZCohomology.EilenbergSteenrodZ.html @@ -100,7 +100,7 @@ H0-susp : {} {A : Pointed } isContr (coHomRed 0 (Susp (typ A) , north)) fst H0-susp = 0ₕ∙ _ snd (H0-susp {A = A}) = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ {(f , p) cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) (funExt λ {north sym p @@ -153,11 +153,11 @@ suspFunCharac : {} {A : Pointed } (n : ) Iso (coHom (suc (suc n)) (Susp (typ A))) (coHom (suc n) (typ A)) fun (suspFunCharac {A = A} n) = - ST.map λ f suspFunCharacFun {A = A} (suc n) f -inv (suspFunCharac {A = A} n) = ST.map (suspΩFun (suc n)) + ST.map λ f suspFunCharacFun {A = A} (suc n) f +inv (suspFunCharac {A = A} n) = ST.map (suspΩFun (suc n)) rightInv (suspFunCharac {A = A} n) = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - λ f T.rec (isProp→isOfHLevelSuc n (isSetSetTrunc _ _)) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + λ f T.rec (isProp→isOfHLevelSuc n (isSetSetTrunc _ _)) fId cong ∣_∣₂ (funExt x cong (ΩKn+1→Kn (suc n)) ((λ i sym (rCancel≡refl n i) ∙∙ cong x suspΩFun (suc n) f x +ₖ 0ₖ _) @@ -175,22 +175,22 @@ rUnitₖ _ (f x)))) (fst (isConnectedPathKn n (f (pt A)) (0ₖ _))) leftInv (suspFunCharac {A = A} n) = - SuspCohomElim {A = A} _ _ isSetSetTrunc _ _) + SuspCohomElim {A = A} _ _ isSetSetTrunc _ _) λ f fId cong ∣_∣₂ (funExt (linvLem (suc n) f fId)) -- We also need that H¹(Susp A) ≃ Ĥ⁰(A) suspFunCharac0 : {} {A : Pointed } Iso ( ((Susp (typ A)) coHomK 1) ∥₂) A →∙ ( , 0) ∥₂ fun (suspFunCharac0 {A = A}) = - ST.map λ f suspFunCharacFun {A = A} 0 f + ST.map λ f suspFunCharacFun {A = A} 0 f , (cong (ΩKn+1→Kn 0) ((λ i sym (rCancelₖ _ (f north)) ∙∙ cong x f x -ₖ f north) (rCancel (merid (pt A)) i) ∙∙ rCancelₖ _ (f north)) ∙∙ (doubleCompPath-elim (sym (rCancelₖ _ (f north))) refl (rCancelₖ _ (f north))) ∙∙ (cong (_∙ (rCancelₖ _ (f north))) (sym (rUnit (sym (rCancelₖ _ (f north)))))) (lCancel (rCancelₖ _ (f north))))) -inv suspFunCharac0 = ST.map λ f suspΩFun 0 (fst f) +inv suspFunCharac0 = ST.map λ f suspΩFun 0 (fst f) rightInv (suspFunCharac0 {A = A}) = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ {(f , p) cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) (funExt x j transp i helix (wedgeMapS¹ (intLoop (p j) (~ i)) base)) j @@ -199,7 +199,7 @@ (pos 0)))) windingℤLoop (f x))))} leftInv (suspFunCharac0 {A = A}) = - SuspCohomElim {A = A} _ _ isSetSetTrunc _ _) + SuspCohomElim {A = A} _ _ isSetSetTrunc _ _) λ f fId cong ∣_∣₂ (funExt (linvLem 0 f fId)) -- We now prove that the alternative definition of cohomology is a cohomology theory. @@ -207,10 +207,10 @@ -- First, we need to that coHomFunctor' is contravariant theMorph : {} (n : ) {A B : Pointed } (f : A →∙ B) AbGroupHom (coHomFunctor' n B) (coHomFunctor' n A) - fst (theMorph (pos zero) f) = ST.map λ g x fst g (fst f x)) , cong (fst g) (snd f) snd g + fst (theMorph (pos zero) f) = ST.map λ g x fst g (fst f x)) , cong (fst g) (snd f) snd g snd (theMorph (pos zero) f) = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 isSetSetTrunc _ _) + (ST.elim2 _ _ isOfHLevelPath 2 isSetSetTrunc _ _) λ f g cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) refl)) theMorph (pos (suc n)) f = coHomMorph _ (fst f) fst (theMorph (negsuc n) f) = idfun _ @@ -219,20 +219,20 @@ compMorph : {} (n : ) {A B C : Pointed } (g : B →∙ C) (f : A →∙ B) compGroupHom (theMorph n g) (theMorph n f) theMorph n (g ∘∙ f) compMorph (pos zero) g f = - Σ≡Prop _ isPropIsGroupHom _ _) (funExt (ST.elim _ isSetPathImplicit) + Σ≡Prop _ isPropIsGroupHom _ _) (funExt (ST.elim _ isSetPathImplicit) λ _ cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) refl))) compMorph (pos (suc n)) f g = - Σ≡Prop _ isPropIsGroupHom _ _) (funExt (ST.elim _ isSetPathImplicit) + Σ≡Prop _ isPropIsGroupHom _ _) (funExt (ST.elim _ isSetPathImplicit) λ _ refl)) compMorph (negsuc n) g f = Σ≡Prop _ isPropIsGroupHom _ _) refl idMorph : {} (n : ) {A : Pointed } theMorph n (idfun∙ A) idGroupHom idMorph (pos zero) = Σ≡Prop _ isPropIsGroupHom _ _) - (funExt (ST.elim _ isSetPathImplicit) + (funExt (ST.elim _ isSetPathImplicit) λ _ cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) refl))) idMorph (pos (suc n)) = Σ≡Prop _ isPropIsGroupHom _ _) - (funExt (ST.elim _ isSetPathImplicit) λ _ refl)) + (funExt (ST.elim _ isSetPathImplicit) λ _ refl)) idMorph (negsuc n) = refl open coHomTheory @@ -248,7 +248,7 @@ (GroupIso→GroupEquiv ( invIso suspFunCharac0 , makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 isSetSetTrunc _ _) + (ST.elim2 _ _ isOfHLevelPath 2 isSetSetTrunc _ _) λ f g cong ∣_∣₂ (funExt λ { north refl ; south refl ; (merid a i) j helper a (fst f) (fst g) j i})))) @@ -263,7 +263,7 @@ (GroupIso→GroupEquiv ( invIso (suspFunCharac {A = A} n) , makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 isSetSetTrunc _ _) + (ST.elim2 _ _ isOfHLevelPath 2 isSetSetTrunc _ _) λ f g cong ∣_∣₂ (funExt λ { north refl ; south refl ; (merid a i) j helper a f g j i})))) @@ -281,12 +281,12 @@ -- naturality of the suspension isomorphism snd (Suspension (isCohomTheoryZ' {})) (f , p) (pos zero) = - funExt (ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + funExt (ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ {(f , _) cong ∣_∣₂ (funExt λ {north refl ; south refl ; (merid a i) refl})}) snd (Suspension (isCohomTheoryZ' {})) (f , p) (pos (suc n)) = - funExt (ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + funExt (ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ f cong ∣_∣₂ (funExt λ {north refl ; south refl ; (merid a i) refl})) @@ -299,41 +299,41 @@ exactnessIso : (n : ) (f : A →∙ B) Iso (Ker (theMorph n f)) (Im (theMorph n (cfcod (fst f) , refl))) fun (exactnessIso (pos zero) (f , p)) = - uncurry (ST.elim _ isSetΠ λ _ isSetΣ isSetSetTrunc λ _ isProp→isSet isPropPropTrunc) + uncurry (ST.elim _ isSetΠ λ _ isSetΣ isSetSetTrunc λ _ isProp→isSet isPropPropTrunc) λ {(g , q) inker g , q ∣₂ , PT.rec isPropPropTrunc gId { (inl tt) 0 ; (inr b) g b ; (push a i) funExt⁻ (cong fst gId) a (~ i)}) , q ∣₂ , cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) refl) ∣₁) - (Iso.fun PathIdTrunc₀Iso inker)}) + (Iso.fun PathIdTrunc₀Iso inker)}) inv (exactnessIso (pos zero) (f , p)) = - uncurry (ST.elim _ isSetΠ λ _ isSetΣ isSetSetTrunc λ _ isOfHLevelPath 2 isSetSetTrunc _ _) + uncurry (ST.elim _ isSetΠ λ _ isSetΣ isSetSetTrunc λ _ isOfHLevelPath 2 isSetSetTrunc _ _) λ {(g , q) inim' g , q ∣₂ - , PT.rec (isSetSetTrunc _ _) + , PT.rec (isSetSetTrunc _ _) (uncurry - (ST.elim _ isSetΠ _ isOfHLevelPath 2 isSetSetTrunc _ _)) + (ST.elim _ isSetΠ _ isOfHLevelPath 2 isSetSetTrunc _ _)) pushmap pushId' - PT.rec (isSetSetTrunc _ _) + PT.rec (isSetSetTrunc _ _) pushId cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) (funExt λ x sym (funExt⁻ (cong fst pushId) (f x)) ∙∙ cong (fst pushmap) (sym (push x) push (pt A)) ∙∙ (cong (fst pushmap inr) p snd pushmap)))) - (Iso.fun PathIdTrunc₀Iso pushId')))) + (Iso.fun PathIdTrunc₀Iso pushId')))) inim'}) rightInv (exactnessIso (pos zero) (f , p)) = - uncurry (ST.elim _ isSetΠ λ _ isOfHLevelPath 2 - (isSetΣ isSetSetTrunc + uncurry (ST.elim _ isSetΠ λ _ isOfHLevelPath 2 + (isSetΣ isSetSetTrunc _ isProp→isSet isPropPropTrunc)) _ _) λ {(p , q) _ Σ≡Prop _ isPropPropTrunc) refl}) leftInv (exactnessIso (pos zero) (f , p)) = - uncurry (ST.elim _ isSetΠ λ _ isOfHLevelPath 2 - (isSetΣ isSetSetTrunc - _ isProp→isSet (isSetSetTrunc _ _))) _ _) - λ {(p , q) _ Σ≡Prop _ isSetSetTrunc _ _) refl}) + uncurry (ST.elim _ isSetΠ λ _ isOfHLevelPath 2 + (isSetΣ isSetSetTrunc + _ isProp→isSet (isSetSetTrunc _ _))) _ _) + λ {(p , q) _ Σ≡Prop _ isSetSetTrunc _ _) refl}) fun (exactnessIso (pos (suc n)) f) ker = (fst ker) , inIm-helper (fst ker) (snd ker) where inIm-helper : (x : coHom (suc n) (typ B)) @@ -346,28 +346,28 @@ ; (inr b) g b ; (push a i) funExt⁻ gIdTot a (~ i)}) ∣₂ , cong ∣_∣₂ (funExt λ b refl) ∣₁) - (Iso.fun PathIdTrunc₀Iso inker) + (Iso.fun PathIdTrunc₀Iso inker) inv (exactnessIso (pos (suc n)) f) im = fst im , inKer-helper (fst im) (snd im) where inKer-helper : (x : coHom (suc n) (typ B)) isInIm (theMorph (pos (suc n)) {A = B} {B = _ , inr (pt B)} (cfcod (fst f) , refl)) x isInKer (theMorph (pos (suc n)) {A = A} {B = B} f) x inKer-helper = - coHomPointedElim _ (pt B) _ isPropΠ λ _ isSetSetTrunc _ _) - λ g gId PT.rec (isSetSetTrunc _ _) + coHomPointedElim _ (pt B) _ isPropΠ λ _ isSetSetTrunc _ _) + λ g gId PT.rec (isSetSetTrunc _ _) (uncurry λ cg p subst (isInKer (coHomMorph (suc n) (fst f))) p (helper cg)) where helper : (cg : _) coHomFun (suc n) (fst f) (coHomFun (suc n) (cfcod (fst f)) cg) 0ₕ _ - helper = ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - λ cg T.rec (isProp→isOfHLevelSuc n (isSetSetTrunc _ _)) + helper = ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + λ cg T.rec (isProp→isOfHLevelSuc n (isSetSetTrunc _ _)) p (cong ∣_∣₂ (funExt λ x cong cg (sym (push x)) p))) (isConnectedPathKn _ (cg (inl tt)) (0ₖ (suc n)) .fst) rightInv (exactnessIso (pos (suc n)) f) _ = Σ≡Prop _ isPropPropTrunc) refl - leftInv (exactnessIso (pos (suc n)) f) _ = Σ≡Prop _ isSetSetTrunc _ _) refl + leftInv (exactnessIso (pos (suc n)) f) _ = Σ≡Prop _ isSetSetTrunc _ _) refl exactnessIso (negsuc n) (f , p) = isContr→Iso ((tt* , refl) , λ {(tt* , p) Σ≡Prop _ isOfHLevelPath 1 isPropUnit* _ _) @@ -380,9 +380,9 @@ Dimension isCohomTheoryZ' (pos zero) p = ⊥.rec (p refl) fst (Dimension isCohomTheoryZ' (pos (suc n)) _) = 0ₕ _ snd (Dimension isCohomTheoryZ' (pos (suc n)) _) = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - f T.rec (isProp→isOfHLevelSuc n (isSetSetTrunc _ _)) - f-true T.rec (isProp→isOfHLevelSuc n (isSetSetTrunc _ _)) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + f T.rec (isProp→isOfHLevelSuc n (isSetSetTrunc _ _)) + f-true T.rec (isProp→isOfHLevelSuc n (isSetSetTrunc _ _)) f-false cong ∣_∣₂ (funExt {(lift true) f-true ; (lift false) f-false}))) (isConnectedPathKn n (0ₖ _) (f (lift false)) .fst)) diff --git a/Cubical.ZCohomology.GroupStructure.html b/Cubical.ZCohomology.GroupStructure.html index 0648790752..ac75088d3e 100644 --- a/Cubical.ZCohomology.GroupStructure.html +++ b/Cubical.ZCohomology.GroupStructure.html @@ -29,7 +29,7 @@ open import Cubical.HITs.S1 open import Cubical.HITs.Sn open import Cubical.HITs.Susp -open import Cubical.HITs.SetTruncation as ST renaming (isSetSetTrunc to §) +open import Cubical.HITs.SetTruncation as ST renaming (isSetSetTrunc to §) open import Cubical.HITs.Truncation as T open import Cubical.Homotopy.Loopspace @@ -425,13 +425,13 @@ ---- Group structure of cohomology groups _+ₕ_ : {n : } coHom n A coHom n A coHom n A -_+ₕ_ {n = n} = ST.rec2 § λ a b x a x +[ n ]ₖ b x) ∣₂ +_+ₕ_ {n = n} = ST.rec2 § λ a b x a x +[ n ]ₖ b x) ∣₂ -ₕ_ : {n : } coHom n A coHom n A --ₕ_ {n = n} = ST.rec § λ a x -[ n ]ₖ a x) ∣₂ +-ₕ_ {n = n} = ST.rec § λ a x -[ n ]ₖ a x) ∣₂ _-ₕ_ : {n : } coHom n A coHom n A coHom n A -_-ₕ_ {n = n} = ST.rec2 § λ a b x a x -[ n ]ₖ b x) ∣₂ +_-ₕ_ {n = n} = ST.rec2 § λ a b x a x -[ n ]ₖ b x) ∣₂ +ₕ-syntax : (n : ) coHom n A coHom n A coHom n A +ₕ-syntax n = _+ₕ_ {n = n} @@ -453,57 +453,57 @@ _+'ₕ_ {n = n} x y = (x +ₕ 0ₕ _) +ₕ y +ₕ 0ₕ _ rUnitₕ : (n : ) (x : coHom n A) x +[ n ]ₕ (0ₕ n) x -rUnitₕ n = ST.elim _ isOfHLevelPath 1 (§ _ _)) +rUnitₕ n = ST.elim _ isOfHLevelPath 1 (§ _ _)) λ a i funExt x rUnitₖ n (a x)) i ∣₂ lUnitₕ : (n : ) (x : coHom n A) (0ₕ n) +[ n ]ₕ x x -lUnitₕ n = ST.elim _ isOfHLevelPath 1 (§ _ _)) +lUnitₕ n = ST.elim _ isOfHLevelPath 1 (§ _ _)) λ a i funExt x lUnitₖ n (a x)) i ∣₂ rCancelₕ : (n : ) (x : coHom n A) x +[ n ]ₕ (-[ n ]ₕ x) 0ₕ n -rCancelₕ n = ST.elim _ isOfHLevelPath 1 (§ _ _)) +rCancelₕ n = ST.elim _ isOfHLevelPath 1 (§ _ _)) λ a i funExt x rCancelₖ n (a x)) i ∣₂ lCancelₕ : (n : ) (x : coHom n A) (-[ n ]ₕ x) +[ n ]ₕ x 0ₕ n -lCancelₕ n = ST.elim _ isOfHLevelPath 1 (§ _ _)) +lCancelₕ n = ST.elim _ isOfHLevelPath 1 (§ _ _)) λ a i funExt x lCancelₖ n (a x)) i ∣₂ assocₕ : (n : ) (x y z : coHom n A) (x +[ n ]ₕ (y +[ n ]ₕ z)) ((x +[ n ]ₕ y) +[ n ]ₕ z) -assocₕ n = ST.elim3 _ _ _ isOfHLevelPath 1 (§ _ _)) +assocₕ n = ST.elim3 _ _ _ isOfHLevelPath 1 (§ _ _)) λ a b c i funExt x assocₖ n (a x) (b x) (c x)) i ∣₂ commₕ : (n : ) (x y : coHom n A) (x +[ n ]ₕ y) (y +[ n ]ₕ x) -commₕ n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) +commₕ n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) λ a b i funExt x commₖ n (a x) (b x)) i ∣₂ -cancelLₕ : (n : ) (x y : coHom n A) (x +[ n ]ₕ y) -[ n ]ₕ x y --cancelLₕ n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) +-cancelLₕ n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) λ a b i x -cancelLₖ n (a x) (b x) i) ∣₂ -cancelRₕ : (n : ) (x y : coHom n A) (y +[ n ]ₕ x) -[ n ]ₕ x y --cancelRₕ n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) +-cancelRₕ n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) λ a b i x -cancelRₖ n (a x) (b x) i) ∣₂ -+cancelₕ : (n : ) (x y : coHom n A) (x -[ n ]ₕ y) +[ n ]ₕ y x --+cancelₕ n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) +-+cancelₕ n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) λ a b i x -+cancelₖ n (a x) (b x) i) ∣₂ -- Group structure of reduced cohomology groups (in progress - might need K to compute properly first) _+ₕ∙_ : {A : Pointed } {n : } coHomRed n A coHomRed n A coHomRed n A -_+ₕ∙_ {n = zero} = ST.rec2 § λ { (a , pa) (b , pb) x a x +[ zero ]ₖ b x) +_+ₕ∙_ {n = zero} = ST.rec2 § λ { (a , pa) (b , pb) x a x +[ zero ]ₖ b x) , i (pa i +[ zero ]ₖ pb i)) ∣₂ } -_+ₕ∙_ {n = (suc zero)} = ST.rec2 § λ { (a , pa) (b , pb) x a x +[ 1 ]ₖ b x) +_+ₕ∙_ {n = (suc zero)} = ST.rec2 § λ { (a , pa) (b , pb) x a x +[ 1 ]ₖ b x) , i pa i +[ 1 ]ₖ pb i) ∣₂ } _+ₕ∙_ {n = (suc (suc n))} = - ST.rec2 § λ { (a , pa) (b , pb) x a x +[ (2 + n) ]ₖ b x) + ST.rec2 § λ { (a , pa) (b , pb) x a x +[ (2 + n) ]ₖ b x) , i pa i +[ (2 + n) ]ₖ pb i) ∣₂ } -ₕ∙_ : {A : Pointed } {n : } coHomRed n A coHomRed n A --ₕ∙_ {n = zero} = ST.rec § λ {(f , p) x -[ 0 ]ₖ (f x)) +-ₕ∙_ {n = zero} = ST.rec § λ {(f , p) x -[ 0 ]ₖ (f x)) , cong x -[ 0 ]ₖ x) p ∣₂} --ₕ∙_ {n = suc zero} = ST.rec § λ {(f , p) x -ₖ (f x)) +-ₕ∙_ {n = suc zero} = ST.rec § λ {(f , p) x -ₖ (f x)) , cong -ₖ_ p ∣₂} --ₕ∙_ {n = suc (suc n)} = ST.rec § λ {(f , p) x -ₖ (f x)) +-ₕ∙_ {n = suc (suc n)} = ST.rec § λ {(f , p) x -ₖ (f x)) , cong -ₖ_ p ∣₂} 0ₕ∙ : {A : Pointed } (n : ) coHomRed n A @@ -524,16 +524,16 @@ commₕ∙ : {A : Pointed } (n : ) (x y : coHomRed n A) x +[ n ]ₕ∙ y y +[ n ]ₕ∙ x commₕ∙ zero = - ST.elim2 _ _ isOfHLevelPath 2 § _ _) + ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ {(f , p) (g , q) cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) λ i x commₖ 0 (f x) (g x) i)} commₕ∙ (suc zero) = - ST.elim2 _ _ isOfHLevelPath 2 § _ _) + ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ {(f , p) (g , q) cong ∣_∣₂ (ΣPathP ((λ i x commₖ 1 (f x) (g x) i) , λ i j commₖ 1 (p j) (q j) i))} commₕ∙ {A = A} (suc (suc n)) = - ST.elim2 _ _ isOfHLevelPath 2 § _ _) + ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ {(f , p) (g , q) cong ∣_∣₂ (ΣPathP ((λ i x commₖ (2 + n) (f x) (g x) i) , λ i j hcomp k λ {(i = i0) p j +ₖ q j @@ -544,24 +544,24 @@ rUnitₕ∙ : {A : Pointed } (n : ) (x : coHomRed n A) x +[ n ]ₕ∙ 0ₕ∙ n x rUnitₕ∙ zero = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) λ i x rUnitₖ zero (f x) i)} rUnitₕ∙ (suc zero) = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (ΣPathP ((λ i x rUnitₖ 1 (f x) i) , λ i j rUnitₖ 1 (p j) i))} rUnitₕ∙ (suc (suc n)) = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (ΣPathP ((λ i x rUnitₖ (2 + n) (f x) i) , λ i j rUnitₖ (2 + n) (p j) i))} lUnitₕ∙ : {A : Pointed } (n : ) (x : coHomRed n A) 0ₕ∙ n +[ n ]ₕ∙ x x lUnitₕ∙ zero = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) λ i x lUnitₖ zero (f x) i)} lUnitₕ∙ (suc zero) = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (ΣPathP ((λ i x lUnitₖ 1 (f x) i) , λ i j lUnitₖ 1 (p j) i))} lUnitₕ∙ (suc (suc n)) = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (ΣPathP ((λ i x lUnitₖ (2 + n) (f x) i) , λ i j lUnitₖ (2 + n) (p j) i))} @@ -579,28 +579,28 @@ rCancelₕ∙ : {A : Pointed } (n : ) (x : coHomRed n A) x +[ n ]ₕ∙ (-[ n ]ₕ∙ x) 0ₕ∙ n rCancelₕ∙ zero = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) λ i x rCancelₖ zero (f x) i)} rCancelₕ∙ {A = A} (suc zero) = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (ΣPathP ((λ i x rCancelₖ 1 (f x) i) , λ i j rCancelₖ 1 (p j) i))} rCancelₕ∙ {A = A} (suc (suc n)) = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (ΣPathP ((λ i x rCancelₖ (2 + n) (f x) i) , pp n f p))} lCancelₕ∙ : {A : Pointed } (n : ) (x : coHomRed n A) (-[ n ]ₕ∙ x) +[ n ]ₕ∙ x 0ₕ∙ n lCancelₕ∙ zero = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) λ i x lCancelₖ zero (f x) i)} lCancelₕ∙ {A = A} (suc zero) = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (ΣPathP ((λ i x lCancelₖ 1 (f x) i) , λ i j (lCancelₖ 1 (p j) i)))} lCancelₕ∙ {A = A} (suc (suc n)) = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (ΣPathP ((λ i x lCancelₖ (2 + n) (f x) i) , λ i j lCancelₖ (2 + n) (p j) i))} @@ -608,17 +608,17 @@ assocₕ∙ : {A : Pointed } (n : ) (x y z : coHomRed n A) (x +[ n ]ₕ∙ (y +[ n ]ₕ∙ z)) ((x +[ n ]ₕ∙ y) +[ n ]ₕ∙ z) assocₕ∙ zero = - ST.elim3 _ _ _ isOfHLevelPath 2 § _ _) + ST.elim3 _ _ _ isOfHLevelPath 2 § _ _) λ {(f , p) (g , q) (h , r) cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) i x assocₖ zero (f x) (g x) (h x) i))} assocₕ∙ (suc zero) = - ST.elim3 _ _ _ isOfHLevelPath 2 § _ _) + ST.elim3 _ _ _ isOfHLevelPath 2 § _ _) λ {(f , p) (g , q) (h , r) cong ∣_∣₂ (ΣPathP ((λ i x assocₖ 1 (f x) (g x) (h x) i) , λ i j assocₖ 1 (p j) (q j) (r j) i))} assocₕ∙ (suc (suc n)) = - ST.elim3 _ _ _ isOfHLevelPath 2 § _ _) + ST.elim3 _ _ _ isOfHLevelPath 2 § _ _) λ {(f , p) (g , q) (h , r) cong ∣_∣₂ (ΣPathP ((λ i x assocₖ (2 + n) (f x) (g x) (h x) i) , λ i j assocₖ (2 + n) (p j) (q j) (r j) i))} @@ -671,30 +671,30 @@ -- Induced map coHomFun : { ℓ'} {A : Type } {B : Type ℓ'} (n : ) (f : A B) coHom n B coHom n A -coHomFun n f = ST.rec § λ β β f ∣₂ +coHomFun n f = ST.rec § λ β β f ∣₂ coHomFunId : {} {A : Type } (n : ) coHomFun {A = A} n (idfun A) idfun _ coHomFunId n = - funExt (ST.elim _ isSetPathImplicit) λ _ refl) + funExt (ST.elim _ isSetPathImplicit) λ _ refl) coHomMorph : { ℓ'} {A : Type } {B : Type ℓ'} (n : ) (f : A B) GroupHom (coHomGr n B) (coHomGr n A) fst (coHomMorph n f) = coHomFun n f snd (coHomMorph n f) = makeIsGroupHom (helper n) where helper : _ - helper zero = ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ _ _ refl - helper (suc zero) = ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ _ _ refl - helper (suc (suc n)) = ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ _ _ refl + helper zero = ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ _ _ refl + helper (suc zero) = ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ _ _ refl + helper (suc (suc n)) = ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ _ _ refl coHomIso : { ℓ'} {A : Type } {B : Type ℓ'} (n : ) Iso A B GroupIso (coHomGr n B) (coHomGr n A) fun (fst (coHomIso n is)) = fst (coHomMorph n (fun is)) inv' (fst (coHomIso n is)) = fst (coHomMorph n (inv' is)) rightInv (fst (coHomIso n is)) = - ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x cong f (leftInv is x)) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x cong f (leftInv is x)) leftInv (fst (coHomIso n is)) = - ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x cong f (rightInv is x)) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x cong f (rightInv is x)) snd (coHomIso n is) = snd (coHomMorph n (fun is)) -- Alternative definition of cohomology using ΩKₙ instead. Useful for breaking proofs of group isos @@ -704,20 +704,20 @@ where coHomGrnA : GroupStr (A typ (Ω (coHomK-ptd (suc n)))) ∥₂ 1g coHomGrnA = _ refl) ∣₂ - GroupStr._·_ coHomGrnA = ST.rec2 § λ p q x p x q x) ∣₂ - inv coHomGrnA = ST.map λ f x sym (f x) + GroupStr._·_ coHomGrnA = ST.rec2 § λ p q x p x q x) ∣₂ + inv coHomGrnA = ST.map λ f x sym (f x) isGroup coHomGrnA = helper where abstract helper : IsGroup {G = (A typ (Ω (coHomK-ptd (suc n)))) ∥₂} - ( _ refl) ∣₂) (ST.rec2 § λ p q x p x q x) ∣₂) (ST.map λ f x sym (f x)) - helper = makeIsGroup § (ST.elim3 _ _ _ isOfHLevelPath 2 § _ _) + ( _ refl) ∣₂) (ST.rec2 § λ p q x p x q x) ∣₂) (ST.map λ f x sym (f x)) + helper = makeIsGroup § (ST.elim3 _ _ _ isOfHLevelPath 2 § _ _) p q r cong ∣_∣₂ (funExt λ x assoc∙ (p x) (q x) (r x)))) - (ST.elim _ isOfHLevelPath 2 § _ _) λ p cong ∣_∣₂ (funExt λ x sym (rUnit (p x)))) - (ST.elim _ isOfHLevelPath 2 § _ _) λ p cong ∣_∣₂ (funExt λ x sym (lUnit (p x)))) - (ST.elim _ isOfHLevelPath 2 § _ _) λ p cong ∣_∣₂ (funExt λ x rCancel (p x))) - (ST.elim _ isOfHLevelPath 2 § _ _) λ p cong ∣_∣₂ (funExt λ x lCancel (p x))) + (ST.elim _ isOfHLevelPath 2 § _ _) λ p cong ∣_∣₂ (funExt λ x sym (rUnit (p x)))) + (ST.elim _ isOfHLevelPath 2 § _ _) λ p cong ∣_∣₂ (funExt λ x sym (lUnit (p x)))) + (ST.elim _ isOfHLevelPath 2 § _ _) λ p cong ∣_∣₂ (funExt λ x rCancel (p x))) + (ST.elim _ isOfHLevelPath 2 § _ _) λ p cong ∣_∣₂ (funExt λ x lCancel (p x))) --- the loopspace of Kₙ is commutative regardless of base addIso : (n : ) (x : coHomK n) Iso (coHomK n) (coHomK n) @@ -868,48 +868,48 @@ -- cohom +H : (n : ) (x y : coHom n A) coHom n A - +H n = ST.rec2 § λ a b x +K n (a x) (b x)) ∣₂ + +H n = ST.rec2 § λ a b x +K n (a x) (b x)) ∣₂ -H : (n : ) (x : coHom n A) coHom n A - -H n = ST.rec § λ a x -K n (a x)) ∣₂ + -H n = ST.rec § λ a x -K n (a x)) ∣₂ -Hbin : (n : ) coHom n A coHom n A coHom n A - -Hbin n = ST.rec2 § λ a b x -Kbin n (a x) (b x)) ∣₂ + -Hbin n = ST.rec2 § λ a b x -Kbin n (a x) (b x)) ∣₂ rUnitH : (n : ) (x : coHom n A) +H n x (0ₕ n) x - rUnitH n = ST.elim _ isOfHLevelPath 1 (§ _ _)) + rUnitH n = ST.elim _ isOfHLevelPath 1 (§ _ _)) λ a i funExt x rUnitK n (a x)) i ∣₂ lUnitH : (n : ) (x : coHom n A) +H n (0ₕ n) x x - lUnitH n = ST.elim _ isOfHLevelPath 1 (§ _ _)) + lUnitH n = ST.elim _ isOfHLevelPath 1 (§ _ _)) λ a i funExt x lUnitK n (a x)) i ∣₂ rCancelH : (n : ) (x : coHom n A) +H n x (-H n x) 0ₕ n - rCancelH n = ST.elim _ isOfHLevelPath 1 (§ _ _)) + rCancelH n = ST.elim _ isOfHLevelPath 1 (§ _ _)) λ a i funExt x rCancelK n (a x)) i ∣₂ lCancelH : (n : ) (x : coHom n A) +H n (-H n x) x 0ₕ n - lCancelH n = ST.elim _ isOfHLevelPath 1 (§ _ _)) + lCancelH n = ST.elim _ isOfHLevelPath 1 (§ _ _)) λ a i funExt x lCancelK n (a x)) i ∣₂ assocH : (n : ) (x y z : coHom n A) (+H n x (+H n y z)) (+H n (+H n x y) z) - assocH n = ST.elim3 _ _ _ isOfHLevelPath 1 (§ _ _)) + assocH n = ST.elim3 _ _ _ isOfHLevelPath 1 (§ _ _)) λ a b c i funExt x assocK n (a x) (b x) (c x)) i ∣₂ commH : (n : ) (x y : coHom n A) (+H n x y) (+H n y x) - commH n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) + commH n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) λ a b i funExt x commK n (a x) (b x)) i ∣₂ -cancelRH : (n : ) (x y : coHom n A) -Hbin n (+H n y x) x y - -cancelRH n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) + -cancelRH n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) λ a b i x -cancelRK n (a x) (b x) i) ∣₂ -cancelLH : (n : ) (x y : coHom n A) -Hbin n (+H n x y) x y - -cancelLH n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) + -cancelLH n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) λ a b i x -cancelLK n (a x) (b x) i) ∣₂ -+cancelH : (n : ) (x y : coHom n A) +H n (-Hbin n x y) y x - -+cancelH n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) + -+cancelH n = ST.elim2 _ _ isOfHLevelPath 1 (§ _ _)) λ a b i x -+cancelK n (a x) (b x) i) ∣₂ lUnitK≡rUnitK : (key : Unit') (n : ) lockedCohom.lUnitK key n (0ₖ n) lockedCohom.rUnitK key n (0ₖ n) diff --git a/Cubical.ZCohomology.Groups.CP2.html b/Cubical.ZCohomology.Groups.CP2.html index 916626fed3..f27af0542b 100644 --- a/Cubical.ZCohomology.Groups.CP2.html +++ b/Cubical.ZCohomology.Groups.CP2.html @@ -86,12 +86,12 @@ where isContrH¹TotalHopf : isContr (coHom 1 TotalHopf) isContrH¹TotalHopf = - isOfHLevelRetractFromIso 0 (setTruncIso (domIso (invIso (IsoS³TotalHopf)))) + isOfHLevelRetractFromIso 0 (setTruncIso (domIso (invIso (IsoS³TotalHopf)))) (isOfHLevelRetractFromIso 0 ((fst (H¹-Sⁿ≅0 1))) isContrUnit) isContrH²TotalHopf : isContr (coHom 2 TotalHopf) isContrH²TotalHopf = - isOfHLevelRetractFromIso 0 (setTruncIso (domIso (invIso (IsoS³TotalHopf)))) + isOfHLevelRetractFromIso 0 (setTruncIso (domIso (invIso (IsoS³TotalHopf)))) ((isOfHLevelRetractFromIso 0 (fst (Hⁿ-Sᵐ≅0 1 2 λ p snotz (sym (cong predℕ p)))) isContrUnit)) @@ -162,25 +162,25 @@ H¹-CP²≅0 : GroupIso (coHomGr 1 CP²) UnitGroup₀ H¹-CP²≅0 = contrGroupIsoUnit - (isOfHLevelRetractFromIso 0 (setTruncIso characFunSpaceCP²) + (isOfHLevelRetractFromIso 0 (setTruncIso characFunSpaceCP²) (isOfHLevelRetractFromIso 0 lem₂ lem₃)) where lem₁ : (f : (Susp coHomK 1)) _ 0ₖ _) f ∥₁ lem₁ f = PT.map p p) - (Iso.fun PathIdTrunc₀Iso (isOfHLevelRetractFromIso 1 + (Iso.fun PathIdTrunc₀Iso (isOfHLevelRetractFromIso 1 (fst (Hⁿ-Sᵐ≅0 0 1 p snotz (sym p)))) isPropUnit (0ₕ _) f ∣₂)) lem₂ : Iso (Σ[ x coHomK 1 ] ( Σ[ f (Susp coHomK 1) ] ((y : TotalHopf) f (fst y) x))) ∥₂ (Σ[ f (Susp coHomK 1) ] ((y : TotalHopf) f (fst y) 0ₖ 1)) ∥₂ - fun lem₂ = ST.map (uncurry λ x uncurry λ f p y (-ₖ x) +ₖ f y) , λ y cong ((-ₖ x) +ₖ_) (p y) lCancelₖ _ x) - inv lem₂ = ST.map λ p 0ₖ _ , p + fun lem₂ = ST.map (uncurry λ x uncurry λ f p y (-ₖ x) +ₖ f y) , λ y cong ((-ₖ x) +ₖ_) (p y) lCancelₖ _ x) + inv lem₂ = ST.map λ p 0ₖ _ , p rightInv lem₂ = - ST.elim _ isOfHLevelPath 2 squash₂ _ _) + ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ {(f , p) cong ∣_∣₂ (ΣPathP ((funExt x lUnitₖ _ (f x))) , (funExt y sym (rUnit i (-ₖ 0ₖ 1) +ₖ p y i))) λ j y i lUnitₖ _ (p y i) j)))} leftInv lem₂ = - ST.elim _ isOfHLevelPath 2 squash₂ _ _) + ST.elim _ isOfHLevelPath 2 squash₂ _ _) (uncurry (coHomK-elim _ _ isPropΠ _ squash₂ _ _)) (uncurry λ f p cong ∣_∣₂ (ΣPathP (refl , (ΣPathP ((funExt x lUnitₖ _ (f x))) , ((funExt y sym (rUnit i (-ₖ 0ₖ 1) +ₖ p y i))) @@ -189,7 +189,7 @@ lem₃ : isContr _ fst lem₃ = _ 0ₖ 1) , _ refl) ∣₂ snd lem₃ = - ST.elim _ isOfHLevelPath 2 squash₂ _ _) + ST.elim _ isOfHLevelPath 2 squash₂ _ _) (uncurry λ f PT.rec (isPropΠ _ squash₂ _ _)) (J f _ (y : (y₁ : TotalHopf) f (fst y₁) 0ₖ 1) _ 0ₖ 1) , _ _ 0ₖ 1) ∣₂ f , y ∣₂) diff --git a/Cubical.ZCohomology.Groups.Connected.html b/Cubical.ZCohomology.Groups.Connected.html index 51bc3b35d9..e59c0e7b6e 100644 --- a/Cubical.ZCohomology.Groups.Connected.html +++ b/Cubical.ZCohomology.Groups.Connected.html @@ -30,22 +30,22 @@ private H⁰-connected-type : {} {A : Type } (a : A) isConnected 2 A Iso (coHom 0 A) - Iso.fun (H⁰-connected-type a con) = ST.rec isSetℤ λ f f a + Iso.fun (H⁰-connected-type a con) = ST.rec isSetℤ λ f f a Iso.inv (H⁰-connected-type a con) b = x b) ∣₂ Iso.rightInv (H⁰-connected-type a con) b = refl Iso.leftInv (H⁰-connected-type a con) = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ f cong ∣_∣₂ (funExt λ x T.rec₊ (isSetℤ _ _) (cong f) (isConnectedPath 1 con a x .fst)) open IsGroupHom open Iso H⁰-connected : {} {A : Type } (a : A) ((x : A) a x ∥₁) GroupIso (coHomGr 0 A) ℤGroup -fun (fst (H⁰-connected a con)) = ST.rec isSetℤ f f a) +fun (fst (H⁰-connected a con)) = ST.rec isSetℤ f f a) inv (fst (H⁰-connected a con)) b = _ b) ∣₂ rightInv (fst (H⁰-connected a con)) _ = refl leftInv (fst (H⁰-connected a con)) = - ST.elim _ isProp→isSet (isSetSetTrunc _ _)) + ST.elim _ isProp→isSet (isSetSetTrunc _ _)) f cong ∣_∣₂ (funExt λ x PT.rec (isSetℤ _ _) (cong f) (con x))) -snd (H⁰-connected a con) = makeIsGroupHom (ST.elim2 _ _ isProp→isSet (isSetℤ _ _)) λ x y refl) +snd (H⁰-connected a con) = makeIsGroupHom (ST.elim2 _ _ isProp→isSet (isSetℤ _ _)) λ x y refl) \ No newline at end of file diff --git a/Cubical.ZCohomology.Groups.Coproduct.html b/Cubical.ZCohomology.Groups.Coproduct.html index d23eb735c4..068c40dbfb 100644 --- a/Cubical.ZCohomology.Groups.Coproduct.html +++ b/Cubical.ZCohomology.Groups.Coproduct.html @@ -36,18 +36,18 @@ open GroupStr Equiv-Coproduct-CoHom : {n : } GroupIso (coHomGr n (X Y)) (DirProd (coHomGr n X) (coHomGr n Y)) - Iso.fun (fst Equiv-Coproduct-CoHom) = ST.rec (isSet× squash₂ squash₂) f f inl ∣₂ , (f inr) ∣₂) + Iso.fun (fst Equiv-Coproduct-CoHom) = ST.rec (isSet× squash₂ squash₂) f f inl ∣₂ , (f inr) ∣₂) Iso.inv (fst Equiv-Coproduct-CoHom) = uncurry - (ST.rec u v p q i j y squash₂ (u y) (v y) X p X y) X q X y) i j) - g ST.rec squash₂ h Sum.rec g h ∣₂))) + (ST.rec u v p q i j y squash₂ (u y) (v y) X p X y) X q X y) i j) + g ST.rec squash₂ h Sum.rec g h ∣₂))) Iso.rightInv (fst Equiv-Coproduct-CoHom) = uncurry - (ST.elim x isProp→isSet λ u v i y isSet× squash₂ squash₂ _ _ (u y) (v y) i) - g ST.elim _ isProp→isSet (isSet× squash₂ squash₂ _ _)) + (ST.elim x isProp→isSet λ u v i y isSet× squash₂ squash₂ _ _ (u y) (v y) i) + g ST.elim _ isProp→isSet (isSet× squash₂ squash₂ _ _)) h refl))) - Iso.leftInv (fst Equiv-Coproduct-CoHom) = ST.elim _ isProp→isSet (squash₂ _ _)) + Iso.leftInv (fst Equiv-Coproduct-CoHom) = ST.elim _ isProp→isSet (squash₂ _ _)) λ f cong ∣_∣₂ (funExt (Sum.elim x refl) x refl))) snd Equiv-Coproduct-CoHom = makeIsGroupHom - (ST.elim x isProp→isSet λ u v i y isSet× squash₂ squash₂ _ _ (u y) (v y) i) - g ST.elim _ isProp→isSet (isSet× squash₂ squash₂ _ _)) + (ST.elim x isProp→isSet λ u v i y isSet× squash₂ squash₂ _ _ (u y) (v y) i) + g ST.elim _ isProp→isSet (isSet× squash₂ squash₂ _ _)) λ h refl)) \ No newline at end of file diff --git a/Cubical.ZCohomology.Groups.KleinBottle.html b/Cubical.ZCohomology.Groups.KleinBottle.html index be1755a9cf..c19acb20a8 100644 --- a/Cubical.ZCohomology.Groups.KleinBottle.html +++ b/Cubical.ZCohomology.Groups.KleinBottle.html @@ -100,11 +100,11 @@ ------ H⁰(𝕂²) ≅ ℤ -------------- H⁰-𝕂²≅ℤ : GroupIso (coHomGr 0 KleinBottle) ℤGroup -fun (fst H⁰-𝕂²≅ℤ) = ST.rec isSetℤ λ f f point +fun (fst H⁰-𝕂²≅ℤ) = ST.rec isSetℤ λ f f point inv (fst H⁰-𝕂²≅ℤ) x = _ x) ∣₂ rightInv (fst H⁰-𝕂²≅ℤ) _ = refl leftInv (fst H⁰-𝕂²≅ℤ) = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ f cong ∣_∣₂ (funExt {point refl ; (line1 i) j isSetℤ (f point) (f point) refl (cong f line1) j i ; (line2 i) j isSetℤ (f point) (f point) refl (cong f line2) j i @@ -119,7 +119,7 @@ λ i j f (square i j) helper f = isGroupoid→isGroupoid' (isOfHLevelSuc 2 isSetℤ) _ _ _ _ _ _ snd H⁰-𝕂²≅ℤ = - makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 isSetℤ _ _) λ _ _ refl) + makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 isSetℤ _ _) λ _ _ refl) ------ H¹(𝕂²) ≅ ℤ ------------ {- @@ -183,7 +183,7 @@ where theIso : Iso (coHom 1 KleinBottle) (coHom 1 ) theIso = - setTruncIso ( + setTruncIso ( compIso (characFunSpace𝕂² (coHomK 1)) (compIso (Σ-cong-iso-snd x Σ-cong-iso-snd @@ -195,7 +195,7 @@ is-hom : IsGroupHom (coHomGr 1 KleinBottle .snd) (fun theIso) (coHomGr 1 .snd) is-hom = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 isSetSetTrunc _ _) + (ST.elim2 _ _ isOfHLevelPath 2 isSetSetTrunc _ _) λ f g cong ∣_∣₂ (funExt λ {base refl ; (loop i) refl})) theGroupIso : GroupIso (coHomGr 1 KleinBottle) (coHomGr 1 ) @@ -216,29 +216,29 @@ Iso-H²-𝕂²₁ : Iso Σ[ x coHomK 2 ] Σ[ p x x ] Σ[ q x x ] p p refl ∥₂ Σ[ p 0ₖ 2 0ₖ 2 ] p p refl ∥₂ fun Iso-H²-𝕂²₁ = - ST.rec isSetSetTrunc - (uncurry (T.elim _ is2GroupoidΠ λ _ isOfHLevelPlus {n = 2} 2 isSetSetTrunc) - (sphereElim _ _ isSetΠ λ _ isSetSetTrunc) + ST.rec isSetSetTrunc + (uncurry (T.elim _ is2GroupoidΠ λ _ isOfHLevelPlus {n = 2} 2 isSetSetTrunc) + (sphereElim _ _ isSetΠ λ _ isSetSetTrunc) λ y fst y , snd (snd y) ∣₂))) inv Iso-H²-𝕂²₁ = - ST.map λ p (0ₖ 2) , ((fst p) , (refl , (snd p))) + ST.map λ p (0ₖ 2) , ((fst p) , (refl , (snd p))) rightInv Iso-H²-𝕂²₁ = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ p refl leftInv Iso-H²-𝕂²₁ = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - (uncurry (T.elim _ is2GroupoidΠ λ _ isOfHLevelPlus {n = 1} 3 (isSetSetTrunc _ _)) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + (uncurry (T.elim _ is2GroupoidΠ λ _ isOfHLevelPlus {n = 1} 3 (isSetSetTrunc _ _)) (sphereToPropElim _ - _ isPropΠ λ _ isSetSetTrunc _ _) + _ isPropΠ λ _ isSetSetTrunc _ _) λ {(p , (q , sq)) - T.rec (isSetSetTrunc _ _) + T.rec (isSetSetTrunc _ _) qid cong ∣_∣₂ (ΣPathP (refl , (ΣPathP (refl , (ΣPathP (sym qid , refl))))))) (fun (PathIdTruncIso _) (isContr→isProp (isConnectedPathKn 1 (0ₖ 2) (0ₖ 2)) q refl ))}))) {- Step two : ∥ Σ[ p ∈ x ≡ x ] p ∙ p ≡ refl ∥₂ ≡ ∥ Σ[ x ∈ K₁ ] x + x ≡ 0 ∥₂ -} Iso-H²-𝕂²₂ : Iso (Σ[ p 0ₖ 2 0ₖ 2 ] p p refl) ∥₂ Σ[ x coHomK 1 ] x +ₖ x 0ₖ 1 ∥₂ -Iso-H²-𝕂²₂ = setTruncIso (Σ-cong-iso {B' = λ x x +ₖ x 0ₖ 1} (invIso (Iso-Kn-ΩKn+1 1)) +Iso-H²-𝕂²₂ = setTruncIso (Σ-cong-iso {B' = λ x x +ₖ x 0ₖ 1} (invIso (Iso-Kn-ΩKn+1 1)) λ p compIso (congIso (invIso (Iso-Kn-ΩKn+1 1))) (pathToIso λ i ΩKn+1→Kn-hom 1 p p i 0ₖ 1)) @@ -298,13 +298,13 @@ private _*_ : Σ[ x coHomK 1 ] x +ₖ x 0ₖ 1 ∥₂ Σ[ x coHomK 1 ] x +ₖ x 0ₖ 1 ∥₂ Σ[ x coHomK 1 ] x +ₖ x 0ₖ 1 ∥₂ - _*_ = ST.rec (isSetΠ _ isSetSetTrunc)) λ a ST.rec isSetSetTrunc λ b *' (fst a) (fst b) (snd a) (snd b) + _*_ = ST.rec (isSetΠ _ isSetSetTrunc)) λ a ST.rec isSetSetTrunc λ b *' (fst a) (fst b) (snd a) (snd b) where *' : (x y : coHomK 1) (p : x +ₖ x 0ₖ 1) (q : y +ₖ y 0ₖ 1) Σ[ x coHomK 1 ] x +ₖ x 0ₖ 1 ∥₂ *' = - T.elim2 _ _ isGroupoidΠ2 λ _ _ isOfHLevelSuc 2 isSetSetTrunc) + T.elim2 _ _ isGroupoidΠ2 λ _ _ isOfHLevelSuc 2 isSetSetTrunc) (wedgeconFun _ _ - _ _ isSetΠ2 λ _ _ isSetSetTrunc) + _ _ isSetΠ2 λ _ _ isSetSetTrunc) x p q x , cong₂ _+ₖ_ p q ∣₂) y p q y , sym (rUnitₖ 1 ( y +ₖ y )) cong₂ _+ₖ_ p q ∣₂) (funExt λ p funExt λ q cong ∣_∣₂ (ΣPathP (refl , (sym (lUnit _)))))) @@ -375,15 +375,15 @@ Bool→ΣKₙNilpot true = 0ₖ 1 , refl ∣₂ testIso : Iso Σ[ x coHomK 1 ] x +ₖ x 0ₖ 1 ∥₂ Bool -fun testIso = ST.rec isSetBool ΣKₙNilpot→Bool +fun testIso = ST.rec isSetBool ΣKₙNilpot→Bool inv testIso = Bool→ΣKₙNilpot rightInv testIso false = refl rightInv testIso true = refl leftInv testIso = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) (uncurry (T.elim - _ isGroupoidΠ λ _ isOfHLevelPlus {n = 1} 2 (isSetSetTrunc _ _)) - (toPropElim _ isPropΠ _ isSetSetTrunc _ _)) + _ isGroupoidΠ λ _ isOfHLevelPlus {n = 1} 2 (isSetSetTrunc _ _)) + (toPropElim _ isPropΠ _ isSetSetTrunc _ _)) p path p (isEven (ΩKn+1→Kn 0 p)) refl)))) where path : (p : 0ₖ 1 0ₖ 1) (b : Bool) (isEven (ΩKn+1→Kn 0 p) b) @@ -403,7 +403,7 @@ where theIso : Iso _ _ theIso = - compIso (setTruncIso + compIso (setTruncIso (compIso (characFunSpace𝕂² (coHomK 2)) (Σ-cong-iso-snd λ x Σ-cong-iso-snd @@ -418,7 +418,7 @@ isContrHⁿ-𝕂² : (n : ) isContr (coHom (3 + n) KleinBottle) isContrHⁿ-𝕂² n = isOfHLevelRetractFromIso 0 - (setTruncIso (characFunSpace𝕂² (coHomK _))) + (setTruncIso (characFunSpace𝕂² (coHomK _))) isContrΣ-help where helper : (x : coHomK (3 + n))(p : x x) (refl p) (q : x x) (refl q) @@ -427,8 +427,8 @@ x , p , q , P ∣₂ 0ₖ _ , refl , refl , sym (rUnit refl) ∣₂ helper = - T.elim _ isProp→isOfHLevelSuc (4 + n) (isPropΠ4 λ _ _ _ _ isPropΠ λ _ isSetSetTrunc _ _)) - (sphereToPropElim _ _ isPropΠ4 λ _ _ _ _ isPropΠ λ _ isSetSetTrunc _ _) + T.elim _ isProp→isOfHLevelSuc (4 + n) (isPropΠ4 λ _ _ _ _ isPropΠ λ _ isSetSetTrunc _ _)) + (sphereToPropElim _ _ isPropΠ4 λ _ _ _ _ isPropΠ λ _ isSetSetTrunc _ _) λ p J p _ (q : 0ₖ _ 0ₖ _) (refl q) (P : p ∙∙ q ∙∙ p q) Path (Σ[ x coHomK (3 + n) ] Σ[ p x x ] Σ[ q x x ] p ∙∙ q ∙∙ p q) ∥₂ @@ -438,7 +438,7 @@ Path (Σ[ x coHomK (3 + n) ] Σ[ p x x ] Σ[ q x x ] p ∙∙ q ∙∙ p q) ∥₂ 0ₖ _ , refl , q , P ∣₂ 0ₖ _ , refl , refl , sym (rUnit refl) ∣₂) - λ P T.rec (isProp→isOfHLevelSuc n (isSetSetTrunc _ _)) + λ P T.rec (isProp→isOfHLevelSuc n (isSetSetTrunc _ _)) P≡rUnitrefl i 0ₖ (3 + n) , refl , refl , P≡rUnitrefl i ∣₂) (fun (PathIdTruncIso _) (isContr→isProp (isConnectedPath _ (isConnectedPathKn (2 + n) _ _) @@ -448,10 +448,10 @@ isContrΣ-help : isContr (Σ[ x coHomK (3 + n) ] Σ[ p x x ] Σ[ q x x ] p ∙∙ q ∙∙ p q) ∥₂ fst isContrΣ-help = 0ₖ _ , refl , refl , sym (rUnit refl) ∣₂ snd isContrΣ-help = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ {(x , p , q , P) - T.rec (isProp→isOfHLevelSuc (suc n) (isSetSetTrunc _ _)) - pId T.rec (isProp→isOfHLevelSuc (suc n) (isSetSetTrunc _ _)) + T.rec (isProp→isOfHLevelSuc (suc n) (isSetSetTrunc _ _)) + pId T.rec (isProp→isOfHLevelSuc (suc n) (isSetSetTrunc _ _)) qId sym (helper x p pId q qId P)) (fun (PathIdTruncIso (2 + n)) (isContr→isProp (isConnectedPathKn (2 + n) _ _) refl q ))) diff --git a/Cubical.ZCohomology.Groups.RP2.html b/Cubical.ZCohomology.Groups.RP2.html index 74f2164981..b910d6614b 100644 --- a/Cubical.ZCohomology.Groups.RP2.html +++ b/Cubical.ZCohomology.Groups.RP2.html @@ -87,10 +87,10 @@ isContr-H¹-RP²-helper : isContr Σ[ x coHomK 1 ] Σ[ p x x ] p p refl ∥₂ fst isContr-H¹-RP²-helper = 0ₖ 1 , refl , sym (rUnit refl) ∣₂ snd isContr-H¹-RP²-helper = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) (uncurry - (T.elim _ isGroupoidΠ λ _ isOfHLevelPlus {n = 1} 2 (isSetSetTrunc _ _)) - (toPropElim _ isPropΠ _ isSetSetTrunc _ _)) + (T.elim _ isGroupoidΠ λ _ isOfHLevelPlus {n = 1} 2 (isSetSetTrunc _ _)) + (toPropElim _ isPropΠ _ isSetSetTrunc _ _)) λ {(p , nilp) cong ∣_∣₂ (ΣPathP (refl , Σ≡Prop _ isOfHLevelTrunc 3 _ _ _ _) (rUnit refl @@ -103,7 +103,7 @@ H¹-RP²≅0 = contrGroupIsoUnit (isOfHLevelRetractFromIso 0 - (setTruncIso (compIso funSpaceIso-RP² + (setTruncIso (compIso funSpaceIso-RP² (Σ-cong-iso-snd _ Σ-cong-iso-snd λ _ pathIso)))) isContr-H¹-RP²-helper) @@ -112,28 +112,28 @@ Iso-H²-RP²₁ : Iso Σ[ x coHomK 2 ] Σ[ p x x ] p sym p ∥₂ Σ[ p 0ₖ 2 0ₖ 2 ] p sym p ∥₂ Iso.fun Iso-H²-RP²₁ = - ST.rec isSetSetTrunc + ST.rec isSetSetTrunc (uncurry - (T.elim _ is2GroupoidΠ λ _ isOfHLevelPlus {n = 2} 2 isSetSetTrunc) - (sphereElim _ _ isSetΠ _ isSetSetTrunc)) + (T.elim _ is2GroupoidΠ λ _ isOfHLevelPlus {n = 2} 2 isSetSetTrunc) + (sphereElim _ _ isSetΠ _ isSetSetTrunc)) λ p fst p , snd p ∣₂))) -Iso.inv Iso-H²-RP²₁ = ST.map λ p (0ₖ 2) , p -Iso.rightInv Iso-H²-RP²₁ = ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) +Iso.inv Iso-H²-RP²₁ = ST.map λ p (0ₖ 2) , p +Iso.rightInv Iso-H²-RP²₁ = ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ _ refl Iso.leftInv Iso-H²-RP²₁ = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - (uncurry (T.elim _ is2GroupoidΠ λ _ isOfHLevelPlus {n = 1} 3 (isSetSetTrunc _ _)) - (sphereToPropElim _ _ isPropΠ _ isSetSetTrunc _ _)) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + (uncurry (T.elim _ is2GroupoidΠ λ _ isOfHLevelPlus {n = 1} 3 (isSetSetTrunc _ _)) + (sphereToPropElim _ _ isPropΠ _ isSetSetTrunc _ _)) λ p refl))) Iso-H²-RP²₂ : Iso Σ[ p 0ₖ 2 0ₖ 2 ] p sym p ∥₂ Bool -Iso-H²-RP²₂ = compIso (setTruncIso (Σ-cong-iso-snd λ _ pathIso)) +Iso-H²-RP²₂ = compIso (setTruncIso (Σ-cong-iso-snd λ _ pathIso)) (compIso Iso-H²-𝕂²₂ testIso) H²-RP²≅Bool : GroupIso (coHomGr 2 RP²) BoolGroup H²-RP²≅Bool = invGroupIso (≅Bool (compIso - (compIso (setTruncIso funSpaceIso-RP²) + (compIso (setTruncIso funSpaceIso-RP²) Iso-H²-RP²₁) Iso-H²-RP²₂)) @@ -141,7 +141,7 @@ Hⁿ-RP²Contr : (n : ) isContr (coHom (3 + n) RP²) Hⁿ-RP²Contr n = subst isContr - (isoToPath (setTruncIso (invIso (funSpaceIso-RP²)))) + (isoToPath (setTruncIso (invIso (funSpaceIso-RP²)))) ( c ∣₂ , c-id) where c : Σ[ x coHomK (3 + n) ] Σ[ p x x ] p sym p @@ -149,7 +149,7 @@ c-id : (p : _ ∥₂) c ∣₂ p c-id = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) (uncurry (coHomK-elim _ _ isOfHLevelΠ (3 + n) λ _ isProp→isOfHLevelSuc (2 + n) (squash₂ _ _)) (uncurry λ p q diff --git a/Cubical.ZCohomology.Groups.Sn.html b/Cubical.ZCohomology.Groups.Sn.html index 79fc4196d0..cf1ca7792f 100644 --- a/Cubical.ZCohomology.Groups.Sn.html +++ b/Cubical.ZCohomology.Groups.Sn.html @@ -64,7 +64,7 @@ suspensionAx-Sn : (n m : ) GroupIso (coHomGr (2 + n) (S₊ (2 + m))) (coHomGr (suc n) (S₊ (suc m))) suspensionAx-Sn n m = - compIso (setTruncIso (invIso funSpaceSuspIso)) helperIso , + compIso (setTruncIso (invIso funSpaceSuspIso)) helperIso , makeIsGroupHom funIsHom where helperIso : Iso (Σ[ x coHomK (2 + n) ] @@ -72,43 +72,43 @@ (S₊ (suc m) x y)) ∥₂ (coHom (suc n) (S₊ (suc m))) Iso.fun helperIso = - ST.rec isSetSetTrunc + ST.rec isSetSetTrunc (uncurry (coHomK-elim _ _ isOfHLevelΠ (2 + n) - λ _ isOfHLevelPlus' {n = n} 2 isSetSetTrunc) + λ _ isOfHLevelPlus' {n = n} 2 isSetSetTrunc) (uncurry (coHomK-elim _ _ isOfHLevelΠ (2 + n) - λ _ isOfHLevelPlus' {n = n} 2 isSetSetTrunc) + λ _ isOfHLevelPlus' {n = n} 2 isSetSetTrunc) λ f x ΩKn+1→Kn (suc n) (f x)) ∣₂)))) Iso.inv helperIso = - ST.map λ f (0ₖ _) , (0ₖ _ , λ x Kn→ΩKn+1 (suc n) (f x)) + ST.map λ f (0ₖ _) , (0ₖ _ , λ x Kn→ΩKn+1 (suc n) (f x)) Iso.rightInv helperIso = - coHomPointedElim _ (ptSn (suc m)) _ isSetSetTrunc _ _) + coHomPointedElim _ (ptSn (suc m)) _ isSetSetTrunc _ _) λ f fId cong ∣_∣₂ (funExt x Iso.leftInv (Iso-Kn-ΩKn+1 _) (f x))) Iso.leftInv helperIso = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) (uncurry (coHomK-elim _ - _ isProp→isOfHLevelSuc (suc n) (isPropΠ λ _ isSetSetTrunc _ _)) + _ isProp→isOfHLevelSuc (suc n) (isPropΠ λ _ isSetSetTrunc _ _)) (uncurry (coHomK-elim _ - _ isProp→isOfHLevelSuc (suc n) (isPropΠ λ _ isSetSetTrunc _ _)) + _ isProp→isOfHLevelSuc (suc n) (isPropΠ λ _ isSetSetTrunc _ _)) λ f cong ∣_∣₂ (ΣPathP (refl , ΣPathP (refl , i x Iso.rightInv (Iso-Kn-ΩKn+1 (suc n)) (f x) i)))))))) theFun : coHom (2 + n) (S₊ (2 + m)) coHom (suc n) (S₊ (suc m)) - theFun = Iso.fun (compIso (setTruncIso (invIso funSpaceSuspIso)) + theFun = Iso.fun (compIso (setTruncIso (invIso funSpaceSuspIso)) helperIso) funIsHom : (x y : coHom (2 + n) (S₊ (2 + m))) theFun (x +ₕ y) theFun x +ₕ theFun y funIsHom = - coHomPointedElimSⁿ _ _ _ isPropΠ λ _ isSetSetTrunc _ _) - λ f coHomPointedElimSⁿ _ _ _ isSetSetTrunc _ _) + coHomPointedElimSⁿ _ _ _ isPropΠ λ _ isSetSetTrunc _ _) + λ f coHomPointedElimSⁿ _ _ _ isSetSetTrunc _ _) λ g cong ∣_∣₂ (funExt λ x cong (ΩKn+1→Kn (suc n)) (sym (∙≡+₂ n (f x) (g x))) ΩKn+1→Kn-hom (suc n) (f x) (g x)) @@ -129,11 +129,11 @@ coHomPushout≅coHomSn : (n m : ) GroupIso (coHomGr m (S₊ (suc n))) (coHomGr m (Pushout {A = S₊ n} _ tt) λ _ tt)) coHomPushout≅coHomSn zero m = - setTruncIso (domIso S1Iso) , - makeIsGroupHom (ST.elim2 _ _ isSet→isGroupoid isSetSetTrunc _ _) _ _ refl)) + setTruncIso (domIso S1Iso) , + makeIsGroupHom (ST.elim2 _ _ isSet→isGroupoid isSetSetTrunc _ _) _ _ refl)) coHomPushout≅coHomSn (suc n) m = - setTruncIso (domIso (invIso PushoutSuspIsoSusp)) , - makeIsGroupHom (ST.elim2 _ _ isSet→isGroupoid isSetSetTrunc _ _) _ _ refl)) + setTruncIso (domIso (invIso PushoutSuspIsoSusp)) , + makeIsGroupHom (ST.elim2 _ _ isSet→isGroupoid isSetSetTrunc _ _) _ _ refl)) -------------------------- H⁰(S⁰) ----------------------------- S0→ℤ : (a : × ) S₊ 0 @@ -141,15 +141,15 @@ S0→ℤ a false = snd a H⁰-S⁰≅ℤ×ℤ : GroupIso (coHomGr 0 (S₊ 0)) (DirProd ℤGroup ℤGroup) -fun (fst H⁰-S⁰≅ℤ×ℤ) = ST.rec (isSet× isSetℤ isSetℤ) λ f (f true) , (f false) +fun (fst H⁰-S⁰≅ℤ×ℤ) = ST.rec (isSet× isSetℤ isSetℤ) λ f (f true) , (f false) inv (fst H⁰-S⁰≅ℤ×ℤ) a = S0→ℤ a ∣₂ rightInv (fst H⁰-S⁰≅ℤ×ℤ) _ = refl leftInv (fst H⁰-S⁰≅ℤ×ℤ) = - ST.elim _ isSet→isGroupoid isSetSetTrunc _ _) + ST.elim _ isSet→isGroupoid isSetSetTrunc _ _) f cong ∣_∣₂ (funExt {true refl ; false refl}))) snd H⁰-S⁰≅ℤ×ℤ = makeIsGroupHom - (ST.elim2 _ _ isSet→isGroupoid (isSet× isSetℤ isSetℤ) _ _) λ a b refl) + (ST.elim2 _ _ isSet→isGroupoid (isSet× isSetℤ isSetℤ) _ _) λ a b refl) ------------------------- Hⁿ(S⁰) ≅ 0 for n ≥ 1 ------------------------------- @@ -164,27 +164,27 @@ Iso.leftInv (Hⁿ-S0≃Kₙ×Kₙ n) b = funExt λ {true refl ; false refl} isContrHⁿ-S0 : (n : ) isContr (coHom (suc n) (S₊ 0)) - isContrHⁿ-S0 n = isContrRetract (Iso.fun (setTruncIso (Hⁿ-S0≃Kₙ×Kₙ n))) - (Iso.inv (setTruncIso (Hⁿ-S0≃Kₙ×Kₙ n))) - (Iso.leftInv (setTruncIso (Hⁿ-S0≃Kₙ×Kₙ n))) + isContrHⁿ-S0 n = isContrRetract (Iso.fun (setTruncIso (Hⁿ-S0≃Kₙ×Kₙ n))) + (Iso.inv (setTruncIso (Hⁿ-S0≃Kₙ×Kₙ n))) + (Iso.leftInv (setTruncIso (Hⁿ-S0≃Kₙ×Kₙ n))) (isContrHelper n) where isContrHelper : (n : ) isContr ( (coHomK (suc n) × coHomK (suc n)) ∥₂) fst (isContrHelper zero) = (0₁ , 0₁) ∣₂ - snd (isContrHelper zero) = ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + snd (isContrHelper zero) = ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ y T.elim2 {B = λ x y (0₁ , 0₁) ∣₂ (x , y) ∣₂ } - _ _ isOfHLevelPlus {n = 2} 2 isSetSetTrunc _ _) - (toPropElim2 _ _ isSetSetTrunc _ _) refl) (fst y) (snd y) + _ _ isOfHLevelPlus {n = 2} 2 isSetSetTrunc _ _) + (toPropElim2 _ _ isSetSetTrunc _ _) refl) (fst y) (snd y) isContrHelper (suc zero) = (0₂ , 0₂) ∣₂ - , ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + , ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ y T.elim2 {B = λ x y (0₂ , 0₂) ∣₂ (x , y) ∣₂ } - _ _ isOfHLevelPlus {n = 2} 3 isSetSetTrunc _ _) - (suspToPropElim2 base _ _ isSetSetTrunc _ _) refl) (fst y) (snd y) + _ _ isOfHLevelPlus {n = 2} 3 isSetSetTrunc _ _) + (suspToPropElim2 base _ _ isSetSetTrunc _ _) refl) (fst y) (snd y) isContrHelper (suc (suc n)) = (0ₖ (3 + n) , 0ₖ (3 + n)) ∣₂ - , ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + , ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ y T.elim2 {B = λ x y (0ₖ (3 + n) , 0ₖ (3 + n)) ∣₂ (x , y) ∣₂ } - _ _ isProp→isOfHLevelSuc (4 + n) (isSetSetTrunc _ _)) - (suspToPropElim2 north _ _ isSetSetTrunc _ _) refl) (fst y) (snd y) + _ _ isProp→isOfHLevelSuc (4 + n) (isSetSetTrunc _ _)) + (suspToPropElim2 north _ _ isSetSetTrunc _ _) refl) (fst y) (snd y) Hⁿ-S⁰≅0 : (n : ) GroupIso (coHomGr (suc n) (S₊ 0)) UnitGroup₀ Hⁿ-S⁰≅0 n = contrGroupIsoUnit (isContrHⁿ-S0 n) @@ -197,15 +197,15 @@ (_ , helper2)) where helper : Iso coHomGr (2 + n) (S₊ 1) Σ (hLevelTrunc (4 + n) (S₊ (2 + n))) x x x ∥₂) ∥₂ - helper = compIso (setTruncIso IsoFunSpaceS¹) IsoSetTruncateSndΣ + helper = compIso (setTruncIso IsoFunSpaceS¹) IsoSetTruncateSndΣ helper2 : (x : Σ (hLevelTrunc (4 + n) (S₊ (2 + n))) x x x ∥₂) ∥₂) north , refl ∣₂ ∣₂ x helper2 = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) (uncurry - (T.elim _ isOfHLevelΠ (4 + n) λ _ isProp→isOfHLevelSuc (3 + n) (isSetSetTrunc _ _)) - (suspToPropElim (ptSn (suc n)) _ isPropΠ λ _ isSetSetTrunc _ _) - (ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + (T.elim _ isOfHLevelΠ (4 + n) λ _ isProp→isOfHLevelSuc (3 + n) (isSetSetTrunc _ _)) + (suspToPropElim (ptSn (suc n)) _ isPropΠ λ _ isSetSetTrunc _ _) + (ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ p cong ∣_∣₂ (ΣPathP (refl , isContr→isProp helper3 _ _)))))) where @@ -224,13 +224,13 @@ where isContrH¹S² : isContr coHomGr 1 (S₊ 2) isContrH¹S² = _ base ) ∣₂ - , coHomPointedElim 0 north _ isSetSetTrunc _ _) + , coHomPointedElim 0 north _ isSetSetTrunc _ _) λ f p cong ∣_∣₂ (funExt λ x sym p ∙∙ sym (spoke f north) ∙∙ spoke f x) H¹-Sⁿ≅0 (suc n) = contrGroupIsoUnit isContrH¹S³⁺ⁿ where anIso : Iso coHomGr 1 (S₊ (3 + n)) (S₊ (3 + n) hLevelTrunc (4 + n) (coHomK 1)) ∥₂ anIso = - setTruncIso + setTruncIso (codomainIso (invIso (truncIdempotentIso (4 + n) (isOfHLevelPlus' {n = 1 + n} 3 (isOfHLevelTrunc 3))))) @@ -241,16 +241,16 @@ ind-helper : (x : hLevelTrunc (4 + n) (coHomK 1)) x f north _ base ) ∣₂ f ∣₂ - ind-helper = T.elim _ isOfHLevelΠ (4 + n) λ _ isOfHLevelPlus' {n = (3 + n)} 1 (isSetSetTrunc _ _)) - (T.elim _ isOfHLevelΠ 3 λ _ isOfHLevelPlus {n = 1} 2 (isSetSetTrunc _ _)) - (toPropElim _ isPropΠ λ _ isSetSetTrunc _ _) + ind-helper = T.elim _ isOfHLevelΠ (4 + n) λ _ isOfHLevelPlus' {n = (3 + n)} 1 (isSetSetTrunc _ _)) + (T.elim _ isOfHLevelΠ 3 λ _ isOfHLevelPlus {n = 1} 2 (isSetSetTrunc _ _)) + (toPropElim _ isPropΠ λ _ isSetSetTrunc _ _) λ p cong ∣_∣₂ (funExt λ x p ∙∙ sym (spoke f north) ∙∙ spoke f x))) isContrH¹S³⁺ⁿ : isContr coHomGr 1 (S₊ (3 + n)) isContrH¹S³⁺ⁿ = isOfHLevelRetractFromIso 0 anIso ( _ base ) ∣₂ - , ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) isContrH¹S³⁺ⁿ-ish) + , ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) isContrH¹S³⁺ⁿ-ish) --------- H¹(S¹) ≅ ℤ ------- {- @@ -268,14 +268,14 @@ F⁻ = Iso.inv S¹→S¹≡S¹×ℤ theIso : GroupIso (coHomGr 1 (S₊ 1)) ℤGroup - fun (fst theIso) = ST.rec isSetℤ f snd (F f)) + fun (fst theIso) = ST.rec isSetℤ f snd (F f)) inv (fst theIso) a = (F⁻ (base , a)) ∣₂ rightInv (fst theIso) a = cong snd (Iso.rightInv S¹→S¹≡S¹×ℤ (base , a)) leftInv (fst theIso) = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - λ f cong ((ST.rec isSetSetTrunc ∣_∣₂) - ST.rec isSetSetTrunc λ x F⁻ (x , (snd (F f))) ∣₂) - (Iso.inv PathIdTrunc₀Iso (isConnectedS¹ (fst (F f)))) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + λ f cong ((ST.rec isSetSetTrunc ∣_∣₂) + ST.rec isSetSetTrunc λ x F⁻ (x , (snd (F f))) ∣₂) + (Iso.inv PathIdTrunc₀Iso (isConnectedS¹ (fst (F f)))) cong ∣_∣₂ (Iso.leftInv S¹→S¹≡S¹×ℤ f) snd theIso = makeIsGroupHom diff --git a/Cubical.ZCohomology.Groups.SphereProduct.html b/Cubical.ZCohomology.Groups.SphereProduct.html index 542cde36d7..638bf3bec0 100644 --- a/Cubical.ZCohomology.Groups.SphereProduct.html +++ b/Cubical.ZCohomology.Groups.SphereProduct.html @@ -84,7 +84,7 @@ ¬ (n m) f _ 0ₖ (suc n)) ∥₁ ∥HⁿSᵐPath∥ n m f p = - fun PathIdTrunc₀Iso + fun PathIdTrunc₀Iso (isContr→isProp (isOfHLevelRetractFromIso 0 (fst (Hⁿ-Sᵐ≅0 n m p)) isContrUnit) f ∣₂ (0ₕ _)) @@ -96,12 +96,12 @@ (coHomGr (suc (suc ((suc n) + m))) (S₊ (suc (suc n)) × S₊ (suc m))) fun (fst (×leftSuspensionIso n m)) = - ST.map (uncurry ↑Sⁿ×Sᵐ→Kₙ₊ₘ n m curry) + ST.map (uncurry ↑Sⁿ×Sᵐ→Kₙ₊ₘ n m curry) inv (fst (×leftSuspensionIso n m)) = - ST.map ((uncurry ↓Sⁿ×Sᵐ→Kₙ₊ₘ n m curry)) + ST.map ((uncurry ↓Sⁿ×Sᵐ→Kₙ₊ₘ n m curry)) rightInv (fst (×leftSuspensionIso n m)) = - ST.elim _ isSetPathImplicit) - λ f inv PathIdTrunc₀Iso + ST.elim _ isSetPathImplicit) + λ f inv PathIdTrunc₀Iso (PT.rec squash₁ (uncurry g p PT.map gid funExt λ {(x , y) @@ -155,11 +155,11 @@ typ (Ω (coHomK-ptd (suc (suc (suc n + m)))))) (g (ptSn _)) _ refl) ∥₁ ∥Path∥ g = - fun PathIdTrunc₀Iso + fun PathIdTrunc₀Iso (isContr→isProp (isOfHLevelRetractFromIso 0 ((invIso (fst (coHom≅coHomΩ _ (S₊ (suc m)))))) - (0ₕ _ , ST.elim _ isProp→isSet (squash₂ _ _)) + (0ₕ _ , ST.elim _ isProp→isSet (squash₂ _ _)) λ f PT.rec (squash₂ _ _) (sym cong ∣_∣₂) (∥HⁿSᵐPath∥ _ _ f (¬lem n m)))) g (ptSn (suc n)) ∣₂ _ refl) ∣₂) @@ -186,7 +186,7 @@ ∙∙ (cong (g a y ∙_) (cong sym (funExt⁻ gid y)) sym (rUnit (g a y))) leftInv (fst (×leftSuspensionIso n m)) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f PT.rec (squash₂ _ _) id cong ∣_∣₂ @@ -206,7 +206,7 @@ (∥HⁿSᵐPath∥ (suc n + m) m x f (ptSn _ , x)) (¬lem n m)) snd (×leftSuspensionIso n m) = - makeIsGroupHom (ST.elim2 _ _ isSetPathImplicit) + makeIsGroupHom (ST.elim2 _ _ isSetPathImplicit) λ f g cong ∣_∣₂ (funExt λ { (north , y) refl ; (south , y) refl @@ -237,11 +237,11 @@ Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ : (m : ) GroupIso (coHomGr (suc m) (S₊ (suc m))) (coHomGr (suc (suc m)) (S₊ (suc zero) × S₊ (suc m))) -fun (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = ST.map (uncurry Hⁿ-S¹×Sⁿ→Hⁿ-Sⁿ m) -inv (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = ST.map (Hⁿ-Sⁿ→Hⁿ-S¹×Sⁿ m curry) +fun (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = ST.map (uncurry Hⁿ-S¹×Sⁿ→Hⁿ-Sⁿ m) +inv (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = ST.map (Hⁿ-Sⁿ→Hⁿ-S¹×Sⁿ m curry) rightInv (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = - ST.elim _ isSetPathImplicit) - λ f inv PathIdTrunc₀Iso + ST.elim _ isSetPathImplicit) + λ f inv PathIdTrunc₀Iso (PT.map (uncurry g p funExt λ {(x , y) i uncurry @@ -301,7 +301,7 @@ (funExt⁻ p x) j i)}) (∥HⁿSᵐPath∥ (suc m) m x f (base , x)) (lem m)) leftInv (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = - ST.elim _ isSetPathImplicit) + ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x cong (ΩKn+1→Kn (suc m)) @@ -311,8 +311,8 @@ leftInv (Iso-Kn-ΩKn+1 _) (f x)) snd (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m) = makeIsGroupHom - (ST.elim2 - _ _ isSetPathImplicit) + (ST.elim2 + _ _ isSetPathImplicit) λ f g cong ∣_∣₂ (funExt λ { (base , y) refl ; (loop i , y) j diff --git a/Cubical.ZCohomology.Groups.Torus.html b/Cubical.ZCohomology.Groups.Torus.html index 1213901c00..bade6dbb33 100644 --- a/Cubical.ZCohomology.Groups.Torus.html +++ b/Cubical.ZCohomology.Groups.Torus.html @@ -163,16 +163,16 @@ H¹-T²≅ℤ×ℤ = theIso GroupIsoDirProd (Hⁿ-Sⁿ≅ℤ 0) (H⁰-Sⁿ≅ℤ 0) where typIso : Iso _ _ - typIso = setTruncIso (curryIso codomainIso S1→K₁≡S1×ℤ toProdIso) - setTruncOfProdIso + typIso = setTruncIso (curryIso codomainIso S1→K₁≡S1×ℤ toProdIso) + setTruncOfProdIso theIso : GroupIso _ _ fst theIso = typIso snd theIso = makeIsGroupHom - (coHomPointedElimT² _ _ isPropΠ λ _ isSet× isSetSetTrunc isSetSetTrunc _ _) + (coHomPointedElimT² _ _ isPropΠ λ _ isSet× isSetSetTrunc isSetSetTrunc _ _) λ pf qf Pf - coHomPointedElimT² _ _ isSet× isSetSetTrunc isSetSetTrunc _ _) + coHomPointedElimT² _ _ isSet× isSetSetTrunc isSetSetTrunc _ _) λ pg qg Pg i funExt (helperFst pf qf pg qg Pg Pf) i ∣₂ , funExt (helperSnd pf qf pg qg Pg Pf) i ∣₂) where @@ -213,15 +213,15 @@ , refl) rightInv helper _ = refl theIso : Iso (coHom 2 ( × )) (coHom 1 ) - theIso = setTruncIso (curryIso codomainIso S1→K2≡K2×K1 toProdIso) - setTruncOfProdIso + theIso = setTruncIso (curryIso codomainIso S1→K2≡K2×K1 toProdIso) + setTruncOfProdIso helper helper2 : GroupIso (coHomGr 2 ( × )) (coHomGr 1 ) helper2 .fst = theIso helper2 .snd = makeIsGroupHom ( - coHomPointedElimT²'' 0 _ isPropΠ λ _ isSetSetTrunc _ _) - λ P coHomPointedElimT²'' 0 _ isSetSetTrunc _ _) + coHomPointedElimT²'' 0 _ isPropΠ λ _ isSetSetTrunc _ _) + λ P coHomPointedElimT²'' 0 _ isSetSetTrunc _ _) λ Q ((λ i a ΩKn+1→Kn 1 (sym (rCancel≡refl 0 i) ∙∙ cong x (elimFunT²' 1 P (a , x) +ₖ elimFunT²' 1 Q (a , x)) -ₖ north ) loop ∙∙ rCancel≡refl 0 i)) ∣₂)) diff --git a/Cubical.ZCohomology.Groups.Unit.html b/Cubical.ZCohomology.Groups.Unit.html index 8f4e9cda51..672e225253 100644 --- a/Cubical.ZCohomology.Groups.Unit.html +++ b/Cubical.ZCohomology.Groups.Unit.html @@ -34,11 +34,11 @@ open Iso H⁰-Unit≅ℤ : GroupIso (coHomGr 0 Unit) ℤGroup -fun (fst H⁰-Unit≅ℤ) = ST.rec isSetℤ f f tt) +fun (fst H⁰-Unit≅ℤ) = ST.rec isSetℤ f f tt) inv (fst H⁰-Unit≅ℤ) a = _ a) ∣₂ rightInv (fst H⁰-Unit≅ℤ) _ = refl -leftInv (fst H⁰-Unit≅ℤ) = ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ a refl -snd H⁰-Unit≅ℤ = makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 isSetℤ _ _) λ a b refl) +leftInv (fst H⁰-Unit≅ℤ) = ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ a refl +snd H⁰-Unit≅ℤ = makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 isSetℤ _ _) λ a b refl) {- Hⁿ(Unit) for n ≥ 1 -} isContrHⁿ-Unit : (n : ) isContr (coHom (suc n) Unit) @@ -69,8 +69,8 @@ private Hⁿ-contrTypeIso : {} {A : Type } (n : ) isContr A Iso (coHom (suc n) A) (coHom (suc n) Unit) - Hⁿ-contrTypeIso n contr = compIso (setTruncIso (isContr→Iso2 contr)) - (setTruncIso (invIso (isContr→Iso2 isContrUnit))) + Hⁿ-contrTypeIso n contr = compIso (setTruncIso (isContr→Iso2 contr)) + (setTruncIso (invIso (isContr→Iso2 isContrUnit))) Hⁿ-contrType≅0 : {} {A : Type } (n : ) isContr A GroupIso (coHomGr (suc n) A) UnitGroup₀ @@ -89,7 +89,7 @@ isContr-HⁿRed-Unit : (n : ) isContr (coHomRed n (Unit , tt)) fst (isContr-HⁿRed-Unit n) = 0ₕ∙ _ snd (isContr-HⁿRed-Unit n) = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ {(f , p) cong ∣_∣₂ (ΣPathP (funExt _ sym p) , λ i j p (~ i j)))} diff --git a/Cubical.ZCohomology.Groups.Wedge.html b/Cubical.ZCohomology.Groups.Wedge.html index c04af235ac..d289502ee6 100644 --- a/Cubical.ZCohomology.Groups.Wedge.html +++ b/Cubical.ZCohomology.Groups.Wedge.html @@ -116,20 +116,20 @@ Hⁿ-⋁ : (n : ) GroupIso (coHomGr (suc n) (A B)) (×coHomGr (suc n) (typ A) (typ B)) fun (fst (Hⁿ-⋁ zero)) = - ST.elim _ isSet× isSetSetTrunc isSetSetTrunc) + ST.elim _ isSet× isSetSetTrunc isSetSetTrunc) λ f x f (inl x)) ∣₂ , x f (inr x)) ∣₂ inv (fst (Hⁿ-⋁ zero)) = - uncurry (ST.elim2 _ _ isSetSetTrunc) + uncurry (ST.elim2 _ _ isSetSetTrunc) λ f g wedgeFun⁻ 0 f g ∣₂) rightInv (fst (Hⁿ-⋁ zero)) = uncurry - (coHomPointedElim _ (pt A) _ isPropΠ λ _ isSet× isSetSetTrunc isSetSetTrunc _ _) - λ f fId coHomPointedElim _ (pt B) _ isSet× isSetSetTrunc isSetSetTrunc _ _) + (coHomPointedElim _ (pt A) _ isPropΠ λ _ isSet× isSetSetTrunc isSetSetTrunc _ _) + λ f fId coHomPointedElim _ (pt B) _ isSet× isSetSetTrunc isSetSetTrunc _ _) λ g gId ΣPathP ((cong ∣_∣₂ (funExt x cong (f x +ₖ_) gId rUnitₖ 1 (f x)))) , cong ∣_∣₂ (funExt x cong (_+ₖ g x) fId lUnitₖ 1 (g x))))) leftInv (fst (Hⁿ-⋁ zero)) = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - f PT.rec (isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + f PT.rec (isSetSetTrunc _ _) fId cong ∣_∣₂ (sym fId)) (helper f _ refl)) where @@ -161,23 +161,23 @@ λ i _ (refl _ 0ₖ 1)) i snd (Hⁿ-⋁ zero) = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) + (ST.elim2 _ _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) λ _ _ refl) fun (fst (Hⁿ-⋁ (suc n))) = - ST.elim _ isSet× isSetSetTrunc isSetSetTrunc) + ST.elim _ isSet× isSetSetTrunc isSetSetTrunc) λ f x f (inl x)) ∣₂ , x f (inr x)) ∣₂ inv (fst (Hⁿ-⋁ (suc n))) = - uncurry (ST.elim2 _ _ isSetSetTrunc) + uncurry (ST.elim2 _ _ isSetSetTrunc) λ f g wedgeFun⁻ (suc n) f g ∣₂) rightInv (fst (Hⁿ-⋁ (suc n))) = uncurry - (coHomPointedElim _ (pt A) _ isPropΠ λ _ isSet× isSetSetTrunc isSetSetTrunc _ _) - λ f fId coHomPointedElim _ (pt B) _ isSet× isSetSetTrunc isSetSetTrunc _ _) + (coHomPointedElim _ (pt A) _ isPropΠ λ _ isSet× isSetSetTrunc isSetSetTrunc _ _) + λ f fId coHomPointedElim _ (pt B) _ isSet× isSetSetTrunc isSetSetTrunc _ _) λ g gId ΣPathP ((cong ∣_∣₂ (funExt x cong (f x +ₖ_) gId rUnitₖ (2 + n) (f x)))) , cong ∣_∣₂ (funExt x cong (_+ₖ g x) fId lUnitₖ (2 + n) (g x))))) leftInv (fst (Hⁿ-⋁ (suc n))) = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) - f PT.rec (isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + f PT.rec (isSetSetTrunc _ _) fId cong ∣_∣₂ (sym fId)) (helper f _ refl)) where @@ -209,28 +209,28 @@ λ i j ((λ _ north ) refl) i snd (Hⁿ-⋁ (suc n)) = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) + (ST.elim2 _ _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) λ _ _ refl) H⁰Red-⋁ : GroupIso (coHomRedGrDir 0 (A B , inl (pt A))) (DirProd (coHomRedGrDir 0 A) (coHomRedGrDir 0 B)) fun (fst H⁰Red-⋁) = - ST.rec (isSet× isSetSetTrunc isSetSetTrunc) + ST.rec (isSet× isSetSetTrunc isSetSetTrunc) λ {(f , p) (f inl) , p ∣₂ , (f inr) , cong f (sym (push tt)) p ∣₂} inv (fst H⁰Red-⋁) = - uncurry (ST.rec2 isSetSetTrunc + uncurry (ST.rec2 isSetSetTrunc λ {(f , p) (g , q) {(inl a) f a ; (inr b) g b ; (push tt i) (p sym q) i}) , p ∣₂}) rightInv (fst H⁰Red-⋁) = uncurry - (ST.elim2 _ _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) + (ST.elim2 _ _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) λ {(_ , _) (_ , _) ΣPathP (cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) refl) , cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) refl))}) leftInv (fst H⁰Red-⋁) = - ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) + ST.elim _ isOfHLevelPath 2 isSetSetTrunc _ _) λ {(f , p) cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) (funExt λ {(inl a) refl ; (inr b) refl @@ -241,7 +241,7 @@ -- Alt. use isOfHLevel→isOfHLevelDep snd H⁰Red-⋁ = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) + (ST.elim2 _ _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) λ {(f , p) (g , q) ΣPathP (cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) refl) , cong ∣_∣₂ (Σ≡Prop _ isSetℤ _ _) refl))}) diff --git a/Cubical.ZCohomology.Gysin.html b/Cubical.ZCohomology.Gysin.html index 9050aa6704..a0162a9888 100644 --- a/Cubical.ZCohomology.Gysin.html +++ b/Cubical.ZCohomology.Gysin.html @@ -140,18 +140,18 @@ -- πS is equivalent to (coHomRed n (S₊∙ n)) K : (n : ) GroupIso (coHomRedGrDir n (S₊∙ n)) (πS n) -fst (K n) = setTruncIdempotentIso (isSetπS n) +fst (K n) = setTruncIdempotentIso (isSetπS n) snd (K zero) = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 (isSetπS 0) _ _) + (ST.elim2 _ _ isOfHLevelPath 2 (isSetπS 0) _ _) λ f g →∙Homogeneous≡ (isHomogeneousKn 0) refl) snd (K (suc zero)) = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 (isSetπS 1) _ _) + (ST.elim2 _ _ isOfHLevelPath 2 (isSetπS 1) _ _) λ f g →∙Homogeneous≡ (isHomogeneousKn 1) refl) snd (K (suc (suc n))) = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 (isSetπS _) _ _) + (ST.elim2 _ _ isOfHLevelPath 2 (isSetπS _) _ _) λ f g →∙Homogeneous≡ (isHomogeneousKn _) refl) -- πS has the following generator @@ -174,7 +174,7 @@ (Hⁿ-Sⁿ≅ℤ n)) Iso-πS-ℤ : (n : ) Iso (S₊∙ (suc n) →∙ coHomK-ptd (suc n)) -Iso-πS-ℤ n = compIso (invIso (setTruncIdempotentIso (isOfHLevel↑∙' 0 n))) +Iso-πS-ℤ n = compIso (invIso (setTruncIdempotentIso (isOfHLevel↑∙' 0 n))) (compIso (equivToIso (fst (coHomGr≅coHomRedGr n (S₊∙ (suc n))))) (fst (Hⁿ-Sⁿ≅ℤ n))) @@ -568,7 +568,7 @@ is-setQ→K : (b : typ B) isSet (Q b →∙ coHomK-ptd n) is-setQ→K b = - ST.rec (isProp→isOfHLevelSuc 1 isPropIsSet) + ST.rec (isProp→isOfHLevelSuc 1 isPropIsSet) (J b _ isSet (Q b →∙ coHomK-ptd n)) (subst isSet (cong (_→∙ coHomK-ptd n) (ua∙ (isoToEquiv (invIso Q-is)) @@ -581,7 +581,7 @@ fst isConnB = pt B snd isConnB = T.elim _ isOfHLevelPath 3 (isOfHLevelTrunc 3) _ _) - λ a ST.rec (isOfHLevelTrunc 3 _ _) (cong ∣_∣ₕ) (conB (pt B) a) + λ a ST.rec (isOfHLevelTrunc 3 _ _) (cong ∣_∣ₕ) (conB (pt B) a) isPropPath : isProp ( pt B pt B ∥₂) isPropPath = @@ -593,13 +593,13 @@ c* : Σ[ c ((b : typ B) (Q b →∙ coHomK-ptd n)) ] (c (pt B) .fst ((λ x genFunSpace n .fst (Iso.fun Q-is x)))) fst c* b = - ST.rec (is-setQ→K b) + ST.rec (is-setQ→K b) (J b _ Q b →∙ coHomK-ptd n) ((λ x genFunSpace n .fst (Iso.fun Q-is x)) , cong (genFunSpace n .fst) Q-is-ptd genFunSpace n .snd)) (conB (pt B) b) snd c* = - funExt λ x i ST.rec (is-setQ→K (pt B)) + funExt λ x i ST.rec (is-setQ→K (pt B)) (J b _ Q b →∙ coHomK-ptd n) ((λ x₁ genFunSpace n .fst (Iso.fun Q-is x₁)) , i genFunSpace n .fst (Q-is-ptd i)) @@ -617,21 +617,21 @@ -- This form of c* will make things somewhat easier to work with later on. c≡ : (b : fst B) (p : pt B b ∥₂) (c* .fst b) - ST.rec (is-setQ→K b) + ST.rec (is-setQ→K b) pp qb genFunSpace n .fst (Iso.fun Q-is (subst (fst Q) (sym pp) qb))) , cong (genFunSpace n .fst Iso.fun Q-is) (p-help pp) ((λ i genFunSpace n .fst (Q-is-ptd i)) genFunSpace n .snd)) p c≡ b = - ST.elim _ isOfHLevelPath 2 (is-setQ→K b) _ _) + ST.elim _ isOfHLevelPath 2 (is-setQ→K b) _ _) (J b a c* .fst b - ST.rec (is-setQ→K b) pp + ST.rec (is-setQ→K b) pp qb genFunSpace n .fst (Iso.fun Q-is (subst (fst Q) (sym pp) qb))) , cong (genFunSpace n .fst Iso.fun Q-is) (p-help pp) i genFunSpace n .fst (Q-is-ptd i)) genFunSpace n .snd) a ∣₂) - ((λ i ST.rec (is-setQ→K (pt B)) + ((λ i ST.rec (is-setQ→K (pt B)) (J b₁ _ Q b₁ →∙ coHomK-ptd n) ((λ x genFunSpace n .fst (Iso.fun Q-is x)) , i genFunSpace n .fst (Q-is-ptd i)) genFunSpace n .snd)) @@ -794,7 +794,7 @@ (coHomRedGrDir (i +' n) (preThom.Ẽ B P , inl tt)) fst (ϕ i) = isoToEquiv - (setTruncIso + (setTruncIso (compIso (codomainIsoDep λ b @@ -803,7 +803,7 @@ (preThom.ι B P (i +' n)))) snd (ϕ i) = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) + (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ F G cong ∣_∣₂ (cong (Iso.fun (preThom.ι B P (i +' n))) (funExt a @@ -820,7 +820,7 @@ where 0-connB : (x y : typ B) x y ∥₁ - 0-connB x y = ST.rec (isProp→isSet squash₁) (∥_∥₁.∣_∣₁) (conB x y) + 0-connB x y = ST.rec (isProp→isSet squash₁) (∥_∥₁.∣_∣₁) (conB x y) c = (c* B (preThom.Q B P) conB n Q-is Q-is-ptd .fst) c-ptd = (c* B (preThom.Q B P) conB n Q-is Q-is-ptd .snd) @@ -855,11 +855,11 @@ E-susp : (i : ) GroupHom (coHomGr i E') (coHomRedGrDir (suc i) (E'̃ , inl tt)) fst (E-susp i) = - ST.map λ f { (inl x) 0ₖ _ + ST.map λ f { (inl x) 0ₖ _ ; (inr x) 0ₖ _ ; (push a j) Kn→ΩKn+1 _ (f a) j}) , refl snd (E-susp zero) = - makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) + makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ f g cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousKn 1) (funExt λ { (inl x) refl @@ -868,7 +868,7 @@ (Kn→ΩKn+1-hom zero (f a) (g a) ∙≡+₁ (Kn→ΩKn+1 _ (f a)) (Kn→ΩKn+1 _ (g a))) k j}))) snd (E-susp (suc i)) = - makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) + makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ f g cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousKn _) (funExt λ { (inl x) refl @@ -880,42 +880,42 @@ module cofibSeq where j* : (i : ) GroupHom (coHomRedGrDir i (E'̃ , (inl tt))) (coHomGr i (typ B)) - fst (j* i) = ST.map λ f λ x fst f (inr x) + fst (j* i) = ST.map λ f λ x fst f (inr x) snd (j* zero) = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ _ _ refl) + (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ _ _ refl) snd (j* (suc zero)) = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ _ _ refl) + (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ _ _ refl) snd (j* (suc (suc i₁))) = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ _ _ refl) + (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ _ _ refl) Im-j⊂Ker-p : (i : ) (x : _) isInIm (j* i) x isInKer (p-hom i) x Im-j⊂Ker-p i = - ST.elim _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) + ST.elim _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) λ f PT.rec (squash₂ _ _) - (uncurry (ST.elim _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) + (uncurry (ST.elim _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) λ g P subst (isInKer (p-hom i)) P (cong ∣_∣₂ (funExt λ x cong (g .fst) (sym (push x)) g .snd)))) Ker-p⊂Im-j : (i : ) (x : _) isInKer (p-hom i) x isInIm (j* i) x Ker-p⊂Im-j i = - ST.elim _ isSetΠ _ isProp→isSet squash₁)) + ST.elim _ isSetΠ _ isProp→isSet squash₁)) λ f ker PT.rec squash₁ id { (inl x) 0ₖ _ ; (inr x) f x ; (push a i₁) funExt⁻ id a (~ i₁)}) , refl ∣₂ , refl ∣₁) - (Iso.fun PathIdTrunc₀Iso ker) + (Iso.fun PathIdTrunc₀Iso ker) Im-p⊂Ker-Susp : (i : ) (x : _) isInIm (p-hom i) x isInKer (E-susp i) x Im-p⊂Ker-Susp i = - ST.elim _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) + ST.elim _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) λ f PT.rec (squash₂ _ _) - (uncurry (ST.elim _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) + (uncurry (ST.elim _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) λ g y subst (isInKer (E-susp i)) y (cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousKn _) (funExt λ { (inl x) refl @@ -925,7 +925,7 @@ Ker-Susp⊂Im-p : (i : ) (x : _) isInKer (E-susp i) x isInIm (p-hom i) x Ker-Susp⊂Im-p i = - ST.elim _ isSetΠ _ isProp→isSet squash₁)) + ST.elim _ isSetΠ _ isProp→isSet squash₁)) λ f ker PT.rec squash₁ id x ΩKn+1→Kn i (sym (funExt⁻ (cong fst id) (inr x)))) ∣₂ , cong ∣_∣₂ (funExt { (a , b) @@ -941,23 +941,23 @@ ∙∙ cong (Kn→ΩKn+1 i (f (a , b)) ∙_) (rCancel _) ∙∙ sym (rUnit _))) Iso.leftInv (Iso-Kn-ΩKn+1 _) (f (a , b))})) ∣₁) - (Iso.fun PathIdTrunc₀Iso ker) + (Iso.fun PathIdTrunc₀Iso ker) Im-Susp⊂Ker-j : (i : ) (x : _) isInIm (E-susp i) x isInKer (cofibSeq.j* (suc i)) x Im-Susp⊂Ker-j i = - ST.elim _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) + ST.elim _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) λ g PT.rec (squash₂ _ _) - (uncurry (ST.elim _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) + (uncurry (ST.elim _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) λ f id PT.rec (squash₂ _ _) P subst (isInKer (cofibSeq.j* (suc i))) (cong ∣_∣₂ P) (cong ∣_∣₂ refl)) - (Iso.fun PathIdTrunc₀Iso id))) + (Iso.fun PathIdTrunc₀Iso id))) Ker-j⊂Im-Susp : (i : ) (x : _) isInKer (cofibSeq.j* (suc i)) x isInIm (E-susp i) x Ker-j⊂Im-Susp i = - ST.elim _ isSetΠ _ isProp→isSet squash₁)) + ST.elim _ isSetΠ _ isProp→isSet squash₁)) λ f ker PT.rec squash₁ p x ΩKn+1→Kn _ (sym (snd f) @@ -967,7 +967,7 @@ (funExt { (inl x) sym (snd f) ; (inr x) sym (funExt⁻ p x) ; (push a j) k h3 f p a k j}))) ∣₁) - (Iso.fun PathIdTrunc₀Iso ker) + (Iso.fun PathIdTrunc₀Iso ker) where h3 : (f : (E'̃ , inl tt) →∙ coHomK-ptd (suc i)) (p : (fst f inr) _ 0ₖ (suc i))) @@ -1111,7 +1111,7 @@ ϕ∘j≡ : (i : ) ϕ∘j i ⌣-hom i ϕ∘j≡ i = Σ≡Prop _ isPropIsGroupHom _ _) - (funExt (ST.elim _ isOfHLevelPath 2 squash₂ _ _) + (funExt (ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ _ refl)) -- We can now restate the previous resluts for (λ x → x ⌣ e) diff --git a/Cubical.ZCohomology.MayerVietorisUnreduced.html b/Cubical.ZCohomology.MayerVietorisUnreduced.html index 4b11c618e1..4c0e8d7d13 100644 --- a/Cubical.ZCohomology.MayerVietorisUnreduced.html +++ b/Cubical.ZCohomology.MayerVietorisUnreduced.html @@ -40,11 +40,11 @@ private i* : (n : ) coHom n (Pushout f g) coHom n A × coHom n B - i* n = ST.rec (isSet× isSetSetTrunc isSetSetTrunc) λ δ x δ (inl x)) ∣₂ , x δ (inr x)) ∣₂ + i* n = ST.rec (isSet× isSetSetTrunc isSetSetTrunc) λ δ x δ (inl x)) ∣₂ , x δ (inr x)) ∣₂ iIsHom : (n : ) IsGroupHom (coHomGr n (Pushout f g) .snd) (i* n) (×coHomGr n A B .snd) iIsHom n = - makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) λ _ _ refl) + makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) λ _ _ refl) i : (n : ) GroupHom (coHomGr n (Pushout f g)) (×coHomGr n A B) fst (i n) = i* n @@ -64,7 +64,7 @@ Δ'-isMorph : (n : ) IsGroupHom (×coHomGr n A B .snd) (Δ' n) (coHomGr n C .snd) Δ'-isMorph n = makeIsGroupHom - (prodElim2 _ _ isOfHLevelPath 2 isSetSetTrunc _ _ ) + (prodElim2 _ _ isOfHLevelPath 2 isSetSetTrunc _ _ ) λ f' x1 g' x2 i x distrLem n (f' (f x)) (g' (f x)) (x1 (g x)) (x2 (g x)) i) ∣₂) Δ : (n : ) GroupHom (×coHomGr n A B) (coHomGr n C) @@ -93,24 +93,24 @@ ; (j = i1) (Kn→ΩKn+1 n (h a) i) +[ (suc n) ]ₖ coHom-pt (suc n)}) (rUnitₖ (suc n) (Kn→ΩKn+1 n (h a) i) (~ j)))) - dIsHom : (n : ) IsGroupHom (coHomGr n C .snd) (ST.rec isSetSetTrunc λ a d-pre n a ∣₂) (coHomGr (suc n) (Pushout f g) .snd) + dIsHom : (n : ) IsGroupHom (coHomGr n C .snd) (ST.rec isSetSetTrunc λ a d-pre n a ∣₂) (coHomGr (suc n) (Pushout f g) .snd) dIsHom n = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 isSetSetTrunc _ _) + (ST.elim2 _ _ isOfHLevelPath 2 isSetSetTrunc _ _) λ f g i funExt x dHomHelper n f g x) i ∣₂) d : (n : ) GroupHom (coHomGr n C) (coHomGr (suc n) (Pushout f g)) - fst (d n) = ST.rec isSetSetTrunc λ a d-pre n a ∣₂ + fst (d n) = ST.rec isSetSetTrunc λ a d-pre n a ∣₂ snd (d n) = dIsHom n -- The long exact sequence Im-d⊂Ker-i : (n : ) (x : (coHomGr (suc n) (Pushout f g)) ) isInIm (d n) x isInKer (i (suc n)) x - Im-d⊂Ker-i n = ST.elim _ isSetΠ λ _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) - λ a PT.rec (isOfHLevelPath' 1 (isSet× isSetSetTrunc isSetSetTrunc) _ _) - (sigmaElim _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) - λ δ b i ST.rec (isSet× isSetSetTrunc isSetSetTrunc) + Im-d⊂Ker-i n = ST.elim _ isSetΠ λ _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) + λ a PT.rec (isOfHLevelPath' 1 (isSet× isSetSetTrunc isSetSetTrunc) _ _) + (sigmaElim _ isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) + λ δ b i ST.rec (isSet× isSetSetTrunc isSetSetTrunc) δ x δ (inl x)) ∣₂ , x δ (inr x)) ∣₂ ) (b (~ i))) @@ -118,15 +118,15 @@ isInKer (i (suc n)) x isInIm (d n) x Ker-i⊂Im-d n = - ST.elim _ isSetΠ λ _ isProp→isSet isPropPropTrunc) + ST.elim _ isSetΠ λ _ isProp→isSet isPropPropTrunc) λ a p PT.rec {A = x a (inl x)) λ _ 0ₖ (suc n)} (isProp→ isPropPropTrunc) p1 PT.rec isPropPropTrunc λ p2 c ΩKn+1→Kn n (sym (cong F F (f c)) p1) ∙∙ cong a (push c) ∙∙ cong F F (g c)) p2)) ∣₂ , cong ∣_∣₂ (funExt δ helper a p1 p2 δ)) ∣₁) - (Iso.fun PathIdTrunc₀Iso (cong fst p)) - (Iso.fun PathIdTrunc₀Iso (cong snd p)) + (Iso.fun PathIdTrunc₀Iso (cong fst p)) + (Iso.fun PathIdTrunc₀Iso (cong snd p)) where helper : (F : (Pushout f g) coHomK (suc n)) @@ -152,12 +152,12 @@ isInIm (i n) x isInKer (Δ n) x Im-i⊂Ker-Δ n (Fa , Fb) = - ST.elim {B = λ Fa (Fb : _) isInIm (i n) (Fa , Fb) + ST.elim {B = λ Fa (Fb : _) isInIm (i n) (Fa , Fb) isInKer (Δ n) (Fa , Fb)} - _ isSetΠ2 λ _ _ isOfHLevelPath 2 isSetSetTrunc _ _) - Fa ST.elim _ isSetΠ λ _ isOfHLevelPath 2 isSetSetTrunc _ _) - λ Fb PT.rec (isSetSetTrunc _ _) - (sigmaElim x isProp→isSet (isSetSetTrunc _ _)) + _ isSetΠ2 λ _ _ isOfHLevelPath 2 isSetSetTrunc _ _) + Fa ST.elim _ isSetΠ λ _ isOfHLevelPath 2 isSetSetTrunc _ _) + λ Fb PT.rec (isSetSetTrunc _ _) + (sigmaElim x isProp→isSet (isSetSetTrunc _ _)) λ Fd p helper n Fa Fb Fd p)) Fa Fb @@ -172,7 +172,7 @@ Ker-Δ⊂Im-i : (n : ) (a : ×coHomGr n A B ) isInKer (Δ n) a isInIm (i n) a - Ker-Δ⊂Im-i n = prodElim _ isSetΠ _ isProp→isSet isPropPropTrunc)) + Ker-Δ⊂Im-i n = prodElim _ isSetΠ _ isProp→isSet isPropPropTrunc)) Fa Fb p PT.rec isPropPropTrunc q helpFun Fa Fb q ∣₂ , refl ∣₁) (helper Fa Fb p)) @@ -180,7 +180,7 @@ helper : (Fa : A coHomK n) (Fb : B coHomK n) fst (Δ n) ( Fa ∣₂ , Fb ∣₂) 0ₕ n Path (_ _) c Fa (f c)) c Fb (g c)) ∥₁ - helper Fa Fb p = Iso.fun PathIdTrunc₀Iso + helper Fa Fb p = Iso.fun PathIdTrunc₀Iso (sym (cong ∣_∣₂ (funExt x sym (assocₖ n _ _ _) ∙∙ cong y Fa (f x) +[ n ]ₖ y) (lCancelₖ n (Fb (g x))) ∙∙ rUnitₖ n (Fa (f x))))) @@ -212,11 +212,11 @@ isInKer (d n) a isInIm (Δ n) a Ker-d⊂Im-Δ n = - ST.elim _ isOfHLevelΠ 2 λ _ isOfHLevelSuc 1 isPropPropTrunc) + ST.elim _ isOfHLevelΠ 2 λ _ isOfHLevelSuc 1 isPropPropTrunc) λ Fc p PT.rec isPropPropTrunc p ( a ΩKn+1→Kn n (cong f f (inl a)) p)) ∣₂ , b ΩKn+1→Kn n (cong f f (inr b)) p)) ∣₂) , - Iso.inv (PathIdTrunc₀Iso) funExt c helper2 Fc p c) ∣₁ ∣₁) - (Iso.fun (PathIdTrunc₀Iso) p) + Iso.inv (PathIdTrunc₀Iso) funExt c helper2 Fc p c) ∣₁ ∣₁) + (Iso.fun (PathIdTrunc₀Iso) p) where @@ -232,12 +232,12 @@ isInIm (Δ n) a isInKer (d n) a Im-Δ⊂Ker-d n = - ST.elim _ isOfHLevelΠ 2 λ _ isOfHLevelPath 2 isSetSetTrunc _ _) - λ Fc PT.rec (isOfHLevelPath' 1 isSetSetTrunc _ _) - (sigmaProdElim _ isOfHLevelPath 2 isSetSetTrunc _ _) - λ Fa Fb p PT.rec (isOfHLevelPath' 1 isSetSetTrunc _ _) + ST.elim _ isOfHLevelΠ 2 λ _ isOfHLevelPath 2 isSetSetTrunc _ _) + λ Fc PT.rec (isOfHLevelPath' 1 isSetSetTrunc _ _) + (sigmaProdElim _ isOfHLevelPath 2 isSetSetTrunc _ _) + λ Fa Fb p PT.rec (isOfHLevelPath' 1 isSetSetTrunc _ _) q ((λ i fst (d n) (q (~ i)) ∣₂) dΔ-Id n Fa Fb)) - (Iso.fun (PathIdTrunc₀Iso) p)) + (Iso.fun (PathIdTrunc₀Iso) p)) where d-preLeftId : (n : ) (Fa : A coHomK n)(d : (Pushout f g)) diff --git a/Cubical.ZCohomology.Properties.html b/Cubical.ZCohomology.Properties.html index e4ee136518..72fee478cb 100644 --- a/Cubical.ZCohomology.Properties.html +++ b/Cubical.ZCohomology.Properties.html @@ -41,7 +41,7 @@ open import Cubical.Algebra.AbGroup open import Cubical.HITs.Truncation as T -open import Cubical.HITs.SetTruncation as ST renaming (isSetSetTrunc to §) +open import Cubical.HITs.SetTruncation as ST renaming (isSetSetTrunc to §) open import Cubical.HITs.S1 hiding (encode ; decode ; _·_) open import Cubical.HITs.Sn open import Cubical.HITs.Susp @@ -104,7 +104,7 @@ ((f : A coHomK (suc n)) f a coHom-pt (suc n) B f ∣₂) (x : coHom (suc n) A) B x coHomPointedElim {ℓ' = ℓ'} {A = A} n a isprop indp = - ST.elim _ isOfHLevelSuc 1 (isprop _)) + ST.elim _ isOfHLevelSuc 1 (isprop _)) λ f helper n isprop indp f (f a) refl where helper : (n : ) {B : coHom (suc n) A Type ℓ'} @@ -132,7 +132,7 @@ ((x y : coHom (suc n) A) isProp (B x y)) ((f g : A coHomK (suc n)) f a coHom-pt (suc n) g a coHom-pt (suc n) B f ∣₂ g ∣₂) (x y : coHom (suc n) A) B x y -coHomPointedElim2 {ℓ' = ℓ'} {A = A} n a isprop indp = ST.elim2 _ _ isOfHLevelSuc 1 (isprop _ _)) +coHomPointedElim2 {ℓ' = ℓ'} {A = A} n a isprop indp = ST.elim2 _ _ isOfHLevelSuc 1 (isprop _ _)) λ f g helper n a isprop indp f g (f a) (g a) refl refl where helper : (n : ) (a : A) {B : coHom (suc n) A coHom (suc n) A Type ℓ'} @@ -195,15 +195,15 @@ coHomRed+1Equiv (suc (suc n)) A i = coHomRed+1.helpLemma A i {C = (coHomK (2 + n) , north )} i ∥₂ Iso-coHom-coHomRed : {} {A : Pointed } (n : ) Iso (coHomRed (suc n) A) (coHom (suc n) (typ A)) -fun (Iso-coHom-coHomRed {A = A , a} n) = ST.map fst -inv' (Iso-coHom-coHomRed {A = A , a} n) = ST.map λ f x f x -ₖ f a) , rCancelₖ _ _ +fun (Iso-coHom-coHomRed {A = A , a} n) = ST.map fst +inv' (Iso-coHom-coHomRed {A = A , a} n) = ST.map λ f x f x -ₖ f a) , rCancelₖ _ _ rightInv (Iso-coHom-coHomRed {A = A , a} n) = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ f T.rec (isProp→isOfHLevelSuc _ (§ _ _)) p cong ∣_∣₂ (funExt λ x cong y f x +ₖ y) (cong -ₖ_ p -0ₖ) rUnitₖ _ (f x))) (Iso.fun (PathIdTruncIso (suc n)) (isContr→isProp (isConnectedKn n) f a 0ₖ _ )) leftInv (Iso-coHom-coHomRed {A = A , a} n) = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ {(f , p) cong ∣_∣₂ (ΣPathP (((funExt λ x (cong y f x -ₖ y) p ∙∙ cong y f x +ₖ y) -0ₖ ∙∙ rUnitₖ _ (f x)) refl)) @@ -226,8 +226,8 @@ Iso.fun (Iso-coHom-coHomRed n) (x +ₕ∙ y) Iso.fun (Iso-coHom-coHomRed n) x +ₕ Iso.fun (Iso-coHom-coHomRed n) y -+∙≡+ zero = ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ _ _ refl -+∙≡+ (suc n) = ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ _ _ refl ++∙≡+ zero = ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ _ _ refl ++∙≡+ (suc n) = ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ _ _ refl private homhelp : {} (n : ) (A : Pointed ) (x y : coHom (suc n) (typ A)) @@ -502,17 +502,17 @@ open IsGroupHom coHom≅coHomΩ : {} (n : ) (A : Type ) GroupIso (coHomGr n A) (coHomGrΩ n A) -fun (fst (coHom≅coHomΩ n A)) = ST.map λ f a Kn→ΩKn+1 n (f a) -inv' (fst (coHom≅coHomΩ n A)) = ST.map λ f a ΩKn+1→Kn n (f a) +fun (fst (coHom≅coHomΩ n A)) = ST.map λ f a Kn→ΩKn+1 n (f a) +inv' (fst (coHom≅coHomΩ n A)) = ST.map λ f a ΩKn+1→Kn n (f a) rightInv (fst (coHom≅coHomΩ n A)) = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ f cong ∣_∣₂ (funExt λ x rightInv (Iso-Kn-ΩKn+1 n) (f x)) leftInv (fst (coHom≅coHomΩ n A)) = - ST.elim _ isOfHLevelPath 2 § _ _) + ST.elim _ isOfHLevelPath 2 § _ _) λ f cong ∣_∣₂ (funExt λ x leftInv (Iso-Kn-ΩKn+1 n) (f x)) snd (coHom≅coHomΩ n A) = makeIsGroupHom - (ST.elim2 _ _ isOfHLevelPath 2 § _ _) + (ST.elim2 _ _ isOfHLevelPath 2 § _ _) λ f g cong ∣_∣₂ (funExt λ x Kn→ΩKn+1-hom n (f x) (g x))) module lockedKnIso (key : Unit') where @@ -656,9 +656,9 @@ isoType→isoCohom : {A : Type } {B : Type ℓ'} (n : ) Iso A B GroupIso (coHomGr n A) (coHomGr n B) -fst (isoType→isoCohom n is) = setTruncIso (domIso is) +fst (isoType→isoCohom n is) = setTruncIso (domIso is) snd (isoType→isoCohom n is) = - makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) + makeIsGroupHom (ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) _ _ refl)) -- Explicit index swapping for cohomology groups diff --git a/Cubical.ZCohomology.RingStructure.CohomologyRing.html b/Cubical.ZCohomology.RingStructure.CohomologyRing.html index e317158222..fe2b38f32b 100644 --- a/Cubical.ZCohomology.RingStructure.CohomologyRing.html +++ b/Cubical.ZCohomology.RingStructure.CohomologyRing.html @@ -142,13 +142,13 @@ fst (coHomGr-Iso {n}) = is where is : Iso (coHom n X) (coHom n Y) - fun is = ST.rec squash₂ f y f (inv e y)) ∣₂) - inv is = ST.rec squash₂ g x g (fun e x)) ∣₂) - rightInv is = ST.elim _ isProp→isSet (squash₂ _ _)) f cong ∣_∣₂ (funExt y cong f (rightInv e y)))) - leftInv is = ST.elim _ isProp→isSet (squash₂ _ _)) g cong ∣_∣₂ (funExt x cong g (leftInv e x)))) + fun is = ST.rec squash₂ f y f (inv e y)) ∣₂) + inv is = ST.rec squash₂ g x g (fun e x)) ∣₂) + rightInv is = ST.elim _ isProp→isSet (squash₂ _ _)) f cong ∣_∣₂ (funExt y cong f (rightInv e y)))) + leftInv is = ST.elim _ isProp→isSet (squash₂ _ _)) g cong ∣_∣₂ (funExt x cong g (leftInv e x)))) snd (coHomGr-Iso {n}) = makeIsGroupHom - (ST.elim _ isProp→isSet λ u v i y squash₂ _ _ (u y) (v y) i) - f ST.elim _ isProp→isSet (squash₂ _ _)) + (ST.elim _ isProp→isSet λ u v i y squash₂ _ _ (u y) (v y) i) + f ST.elim _ isProp→isSet (squash₂ _ _)) f' refl))) H*-X→H*-Y : H* X H* Y @@ -194,10 +194,10 @@ H*-X→H*-Y-pres· : (x x' : H* X) H*-X→H*-Y (x cupX x') H*-X→H*-Y x cupY H*-X→H*-Y x' H*-X→H*-Y-pres· = DS-Ind-Prop.f _ _ _ _ x u v i y isSetH*Y _ _ (u y) (v y) i) _ refl) - n ST.elim x isProp→isSet λ u v i y isSetH*Y _ _ (u y) (v y) i) + n ST.elim x isProp→isSet λ u v i y isSetH*Y _ _ (u y) (v y) i) f DS-Ind-Prop.f _ _ _ _ _ isSetH*Y _ _) refl - m ST.elim _ isProp→isSet (isSetH*Y _ _)) + m ST.elim _ isProp→isSet (isSetH*Y _ _)) g refl)) λ {U V} ind-U ind-V cong₂ _+H*Y_ ind-U ind-V) ) {U V} ind-U ind-V y cong₂ _+H*Y_ (ind-U y) (ind-V y)) diff --git a/Cubical.ZCohomology.RingStructure.CupProduct.html b/Cubical.ZCohomology.RingStructure.CupProduct.html index 6a9eef9bd0..c9981c6172 100644 --- a/Cubical.ZCohomology.RingStructure.CupProduct.html +++ b/Cubical.ZCohomology.RingStructure.CupProduct.html @@ -79,5 +79,5 @@ -- Cup product _⌣_ : {} {A : Type } {n m : } coHom n A coHom m A coHom (n +' m) A -_⌣_ = ST.rec2 squash₂ λ f g x f x ⌣ₖ g x) ∣₂ +_⌣_ = ST.rec2 squash₂ λ f g x f x ⌣ₖ g x) ∣₂ \ No newline at end of file diff --git a/Cubical.ZCohomology.RingStructure.GradedCommutativity.html b/Cubical.ZCohomology.RingStructure.GradedCommutativity.html index 96341bb7cc..1eadaab2be 100644 --- a/Cubical.ZCohomology.RingStructure.GradedCommutativity.html +++ b/Cubical.ZCohomology.RingStructure.GradedCommutativity.html @@ -100,7 +100,7 @@ -- cohomology version -ₕ'^_·_ : {k : } {A : Type } (n m : ) coHom k A coHom k A --ₕ'^_·_ n m = ST.map λ f x (-ₖ'^ n · m) (f x) +-ₕ'^_·_ n m = ST.map λ f x (-ₖ'^ n · m) (f x) -- -ₖ'ⁿ̇*ᵐ = -ₖ' for n m odd -ₖ'-gen-inr≡-ₖ' : {k : } (n m : ) (p : _) (q : _) (x : coHomK k) @@ -1097,7 +1097,7 @@ gradedComm'-⌣ : {A : Type } (n m : ) (a : coHom n A) (b : coHom m A) a b (-ₕ'^ n · m) (subst n coHom n A) (+'-comm m n) (b a)) gradedComm'-⌣ n m = - ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) + ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ f g cong ∣_∣₂ (funExt x gradedComm'-⌣ₖ n m (f x) (g x) @@ -1122,10 +1122,10 @@ -ₕ^-gen-eq : {} {k : } {A : Type } (n m : ) (p : isEvenT n isOddT n) (q : isEvenT m isOddT m) (x : coHom k A) - -ₕ^-gen n m p q x (ST.map λ f x (-ₖ'-gen n m p q) (f x)) x --ₕ^-gen-eq {k = k} n m (inl p) q = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x sym (-ₖ'-gen-inl-left n m p q (f x))) --ₕ^-gen-eq {k = k} n m (inr p) (inl q) = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ z sym (-ₖ'-gen-inl-right n m (inr p) q (f z))) --ₕ^-gen-eq {k = k} n m (inr p) (inr q) = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ z sym (-ₖ'-gen-inr≡-ₖ' n m p q (f z))) + -ₕ^-gen n m p q x (ST.map λ f x (-ₖ'-gen n m p q) (f x)) x +-ₕ^-gen-eq {k = k} n m (inl p) q = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ x sym (-ₖ'-gen-inl-left n m p q (f x))) +-ₕ^-gen-eq {k = k} n m (inr p) (inl q) = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ z sym (-ₖ'-gen-inl-right n m (inr p) q (f z))) +-ₕ^-gen-eq {k = k} n m (inr p) (inr q) = ST.elim _ isSetPathImplicit) λ f cong ∣_∣₂ (funExt λ z sym (-ₖ'-gen-inr≡-ₖ' n m p q (f z))) -ₕ^-eq : {} {k : } {A : Type } (n m : ) (a : coHom k A) (-ₕ^ n · m) a (-ₕ'^ n · m) a diff --git a/Cubical.ZCohomology.RingStructure.RingLaws.html b/Cubical.ZCohomology.RingStructure.RingLaws.html index edb67be1f5..98dd0b3fc5 100644 --- a/Cubical.ZCohomology.RingStructure.RingLaws.html +++ b/Cubical.ZCohomology.RingStructure.RingLaws.html @@ -590,33 +590,33 @@ -- Ring laws for ⌣ module _ {A : Type } (n m : ) where ⌣-0ₕ : (f : coHom n A) (f 0ₕ m) 0ₕ _ - ⌣-0ₕ = ST.elim _ isOfHLevelPath 2 squash₂ _ _) + ⌣-0ₕ = ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ f cong ∣_∣₂ (funExt λ x ⌣ₖ-0ₖ n m (f x)) 0ₕ-⌣ : (f : coHom m A) (0ₕ n f) 0ₕ _ - 0ₕ-⌣ = ST.elim _ isOfHLevelPath 2 squash₂ _ _) + 0ₕ-⌣ = ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ f cong ∣_∣₂ (funExt λ x 0ₖ-⌣ₖ n m (f x)) leftDistr-⌣ : (f : coHom n A) (g h : coHom m A) f (g +ₕ h) f g +ₕ f h leftDistr-⌣ = - ST.elim _ isSetΠ2 λ _ _ isOfHLevelPath 2 squash₂ _ _) - λ f ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) + ST.elim _ isSetΠ2 λ _ _ isOfHLevelPath 2 squash₂ _ _) + λ f ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ g h cong ∣_∣₂ (funExt λ x leftDistr-⌣ₖ n m (f x) (g x) (h x)) rightDistr-⌣ : (g h : coHom n A) (f : coHom m A) (g +ₕ h) f g f +ₕ h f rightDistr-⌣ = - ST.elim2 _ _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) - λ g h ST.elim _ isOfHLevelPath 2 squash₂ _ _) + ST.elim2 _ _ isSetΠ _ isOfHLevelPath 2 squash₂ _ _)) + λ g h ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ f cong ∣_∣₂ (funExt λ x rightDistr-⌣ₖ n m (g x) (h x) (f x)) assoc-⌣ : (l : ) (f : coHom n A) (g : coHom m A) (h : coHom l A) f g h subst x coHom x A) (sym (+'-assoc n m l)) ((f g) h) assoc-⌣ l = - ST.elim _ isSetΠ2 λ _ _ isOfHLevelPath 2 squash₂ _ _) - λ f ST.elim _ isSetΠ λ _ isOfHLevelPath 2 squash₂ _ _) - λ g ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ h + ST.elim _ isSetΠ2 λ _ _ isOfHLevelPath 2 squash₂ _ _) + λ f ST.elim _ isSetΠ λ _ isOfHLevelPath 2 squash₂ _ _) + λ g ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ h cong ∣_∣₂ ((funExt x assoc-⌣ₖ n m l (f x) (g x) (h x) cong (subst coHomK (sym (+'-assoc n m l))) λ i (f (transportRefl x (~ i)) ⌣ₖ g (transportRefl x (~ i))) @@ -625,12 +625,12 @@ -- Additive unit(s) 0⌣ : {} {A : Type } (n m : ) (x : coHom n A) x (0ₕ m) 0ₕ _ -0⌣ n m = ST.elim _ isOfHLevelPath 2 squash₂ _ _) +0⌣ n m = ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ f cong ∣_∣₂ (funExt λ x ⌣ₖ-0ₖ n m (f x)) ⌣0 : {} {A : Type } (n m : ) (x : coHom n A) (0ₕ m) x 0ₕ _ -⌣0 n m = ST.elim _ isOfHLevelPath 2 squash₂ _ _) +⌣0 n m = ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ f cong ∣_∣₂ (funExt λ x 0ₖ-⌣ₖ m n (f x)) -- Multiplicative unit @@ -643,31 +643,31 @@ lUnit⌣ : {} {A : Type } (n : ) (x : coHom n A) x 1⌣ subst n coHom n A) (sym (+'-rid n)) x -lUnit⌣ zero = ST.elim _ isOfHLevelPath 2 squash₂ _ _) +lUnit⌣ zero = ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ f cong ∣_∣₂ (funExt x comm-·₀ (f x) (pos 1))) sym (transportRefl f ∣₂) lUnit⌣ (suc n) = - ST.elim _ isOfHLevelPath 2 squash₂ _ _) + ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ f cong ∣_∣₂ (funExt x cong (f x +ₖ_) (0ₖ-⌣ₖ zero _ (f x)) rUnitₖ _ (f x))) sym (transportRefl f ∣₂) rUnit⌣ : {} {A : Type } (n : ) (x : coHom n A) 1⌣ x x -rUnit⌣ zero = ST.elim _ isOfHLevelPath 2 squash₂ _ _) +rUnit⌣ zero = ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ f refl rUnit⌣ (suc n) = - ST.elim _ isOfHLevelPath 2 squash₂ _ _) + ST.elim _ isOfHLevelPath 2 squash₂ _ _) λ f cong ∣_∣₂ (funExt λ x rUnitₖ _ (f x)) -ₕDistᵣ : {} {A : Type } (n m : ) (x : coHom n A) (y : coHom m A) (-ₕ (x y)) x (-ₕ y) -ₕDistᵣ n m = - ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) + ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ f g cong ∣_∣₂ (funExt λ x -Distᵣ n m (f x) (g x)) -ₕDistₗ : {} {A : Type } (n m : ) (x : coHom n A) (y : coHom m A) (-ₕ (x y)) (-ₕ x) y -ₕDistₗ n m = - ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) + ST.elim2 _ _ isOfHLevelPath 2 squash₂ _ _) λ f g cong ∣_∣₂ (funExt λ x -Distₗ n m (f x) (g x)) -ₕDistₗᵣ : {} {A : Type } (n m : ) @@ -675,7 +675,7 @@ -ₕDistₗᵣ n m x y = sym (-ₕDistₗ n m x (-ₕ y)) ∙∙ cong -ₕ_ (sym (-ₕDistᵣ n m x y)) - ∙∙ ST.elim2 {C = λ x y (-ₕ (-ₕ (x y))) x y} - _ _ isSetPathImplicit) + ∙∙ ST.elim2 {C = λ x y (-ₕ (-ₕ (x y))) x y} + _ _ isSetPathImplicit) f g cong ∣_∣₂ (funExt λ _ -ₖ^2 _)) x y \ No newline at end of file