From e68299e7ddc93f5d4cef7a8d9478b180a5fc5eea Mon Sep 17 00:00:00 2001 From: LorenzoMolena <164308953+LorenzoMolena@users.noreply.github.com> Date: Wed, 19 Nov 2025 09:52:58 +0100 Subject: [PATCH 01/11] Fast int properties with pl and ocr instances (#23) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add fast implementation of integers and their properties * move properties of min and max over `ℕ` to the appropriate file * reorganize and format code * remove `--safe` flag * remove `--safe` flag * Fast int (#2) * direct solver application * direct solver application --------- Co-authored-by: Marcin Jan Turek-Grzybowski * add fast implementation of integers and their properties * move properties of min and max over `ℕ` to the appropriate file * reorganize and format code * remove `--safe` flag * remove `--safe` flag * remove `--safe` flag * Fast int (#2) * direct solver application * direct solver application --------- Co-authored-by: Marcin Jan Turek-Grzybowski * fix compatibility with the library * fix compatibility after rebase, start proving properties of fast integer min and max * add instances of `Nat` and `Int` as `Pseudolattice`, and of `Int` as `OrderedCommRing` * fix typo, add better make from Posets to Pseudolattices * update `makePseudolatticeFromPoset` and instances built using it * move `maxLUB` and `minGLB` to `Data.Nat.Order`, remove unnecessary imports * rewrite properties from `minAssoc` to `-max`, add temporary lemmas in `Nat`, add `UsingEq` into `min` and `max` over the Naturals * fix naming clash on import * rewrite properties from `pos+posLposMin` to `·DistNegsucLMax` * start work on Order: adapt properties from `isProp≤` to `≤SumLeftPos`, add boolean order, suggest alternative definition `_≤'_` * use more efficient implementation of quotient and remainder in `Int.Fast.Divisibility` * adapt properties from `pred-≤-pred` to `0≤o→≤-·o`, move import of `Bool.Base` together with the other imports * adapt properties from `<-·o` to `predℤ-≤-predℤ` * adapt properties from `¬m+posk Co-authored-by: Marcin Jan Turek-Grzybowski --- .../Algebra/AbGroup/Instances/Int/Fast.agda | 9 + .../Algebra/CommRing/Instances/Int/Fast.agda | 23 + Cubical/Algebra/Group/Instances/Int/Fast.agda | 56 + Cubical/Algebra/OrderedCommRing/Base.agda | 2 +- .../OrderedCommRing/Instances/Int.agda | 66 + .../OrderedCommRing/Instances/Int/Fast.agda | 69 + Cubical/Data/Int/Base.agda | 5 + Cubical/Data/Int/Fast.agda | 6 + Cubical/Data/Int/Fast/Base.agda | 30 +- Cubical/Data/Int/Fast/Divisibility.agda | 441 +++++++ Cubical/Data/Int/Fast/IsEven.agda | 137 ++ Cubical/Data/Int/Fast/Order.agda | 609 +++++++++ Cubical/Data/Int/Fast/Properties.agda | 1163 +++++++++++++++++ Cubical/Data/Int/Order.agda | 13 + Cubical/Data/Int/Properties.agda | 5 + Cubical/Data/Nat/Order.agda | 14 + Cubical/Data/Nat/Properties.agda | 12 +- Cubical/Foundations/Prelude.agda | 3 + Cubical/Relation/Binary/Base.agda | 5 + .../Order/Loset/Instances/Int/Fast.agda | 40 + .../Order/Poset/Instances/Int/Fast.agda | 11 + .../Order/Proset/Instances/Int/Fast.agda | 11 + .../Relation/Binary/Order/Pseudolattice.agda | 1 + .../Binary/Order/Pseudolattice/Base.agda | 35 + .../Order/Pseudolattice/Instances/Int.agda | 18 + .../Pseudolattice/Instances/Int/Fast.agda | 18 + .../Order/Pseudolattice/Instances/Nat.agda | 18 + .../Order/Pseudolattice/Properties.agda | 93 ++ .../Order/Quoset/Instances/Int/Fast.agda | 11 + .../Order/StrictOrder/Instances/Int/Fast.agda | 11 + .../Order/Toset/Instances/Int/Fast.agda | 34 + 31 files changed, 2951 insertions(+), 18 deletions(-) create mode 100644 Cubical/Algebra/AbGroup/Instances/Int/Fast.agda create mode 100644 Cubical/Algebra/CommRing/Instances/Int/Fast.agda create mode 100644 Cubical/Algebra/Group/Instances/Int/Fast.agda create mode 100644 Cubical/Algebra/OrderedCommRing/Instances/Int.agda create mode 100644 Cubical/Algebra/OrderedCommRing/Instances/Int/Fast.agda create mode 100644 Cubical/Data/Int/Fast.agda create mode 100644 Cubical/Data/Int/Fast/Divisibility.agda create mode 100644 Cubical/Data/Int/Fast/IsEven.agda create mode 100644 Cubical/Data/Int/Fast/Order.agda create mode 100644 Cubical/Data/Int/Fast/Properties.agda create mode 100644 Cubical/Relation/Binary/Order/Loset/Instances/Int/Fast.agda create mode 100644 Cubical/Relation/Binary/Order/Poset/Instances/Int/Fast.agda create mode 100644 Cubical/Relation/Binary/Order/Proset/Instances/Int/Fast.agda create mode 100644 Cubical/Relation/Binary/Order/Pseudolattice/Instances/Int.agda create mode 100644 Cubical/Relation/Binary/Order/Pseudolattice/Instances/Int/Fast.agda create mode 100644 Cubical/Relation/Binary/Order/Pseudolattice/Instances/Nat.agda create mode 100644 Cubical/Relation/Binary/Order/Pseudolattice/Properties.agda create mode 100644 Cubical/Relation/Binary/Order/Quoset/Instances/Int/Fast.agda create mode 100644 Cubical/Relation/Binary/Order/StrictOrder/Instances/Int/Fast.agda create mode 100644 Cubical/Relation/Binary/Order/Toset/Instances/Int/Fast.agda diff --git a/Cubical/Algebra/AbGroup/Instances/Int/Fast.agda b/Cubical/Algebra/AbGroup/Instances/Int/Fast.agda new file mode 100644 index 0000000000..671cf2230e --- /dev/null +++ b/Cubical/Algebra/AbGroup/Instances/Int/Fast.agda @@ -0,0 +1,9 @@ +module Cubical.Algebra.AbGroup.Instances.Int.Fast where + +open import Cubical.Foundations.Prelude +open import Cubical.Data.Int.Fast +open import Cubical.Algebra.AbGroup.Base +open import Cubical.Algebra.Group.Instances.Int.Fast + +ℤAbGroup : AbGroup ℓ-zero +ℤAbGroup = Group→AbGroup ℤGroup +Comm diff --git a/Cubical/Algebra/CommRing/Instances/Int/Fast.agda b/Cubical/Algebra/CommRing/Instances/Int/Fast.agda new file mode 100644 index 0000000000..240bf9036b --- /dev/null +++ b/Cubical/Algebra/CommRing/Instances/Int/Fast.agda @@ -0,0 +1,23 @@ +module Cubical.Algebra.CommRing.Instances.Int.Fast where + +open import Cubical.Foundations.Prelude + +open import Cubical.Algebra.CommRing +open import Cubical.Data.Int.Fast as Int renaming (_+_ to _+ℤ_; _·_ to _·ℤ_ ; -_ to -ℤ_) + +open CommRingStr using (0r ; 1r ; _+_ ; _·_ ; -_ ; isCommRing) + +ℤCommRing : CommRing ℓ-zero +fst ℤCommRing = ℤ +0r (snd ℤCommRing) = pos 0 +1r (snd ℤCommRing) = pos 1 +_+_ (snd ℤCommRing) = _+ℤ_ +_·_ (snd ℤCommRing) = _·ℤ_ +- snd ℤCommRing = -ℤ_ +isCommRing (snd ℤCommRing) = isCommRingℤ + where + abstract + isCommRingℤ : IsCommRing (pos 0) (pos 1) _+ℤ_ _·ℤ_ -ℤ_ + isCommRingℤ = makeIsCommRing isSetℤ Int.+Assoc +IdR + -Cancel Int.+Comm Int.·Assoc + Int.·IdR ·DistR+ Int.·Comm diff --git a/Cubical/Algebra/Group/Instances/Int/Fast.agda b/Cubical/Algebra/Group/Instances/Int/Fast.agda new file mode 100644 index 0000000000..fcd563bc44 --- /dev/null +++ b/Cubical/Algebra/Group/Instances/Int/Fast.agda @@ -0,0 +1,56 @@ +module Cubical.Algebra.Group.Instances.Int.Fast where + +open import Cubical.Foundations.Prelude +open import Cubical.Foundations.Isomorphism +open import Cubical.Foundations.Function + +open import Cubical.Data.Int.Fast renaming (_+_ to _+ℤ_ ; _-_ to _-ℤ_ ; _·_ to _·ℤ_ ; -_ to -ℤ_) + +open import Cubical.Data.Nat using (ℕ ; zero ; suc) +open import Cubical.Data.Fin.Inductive.Base + +open import Cubical.Algebra.Group.Base +open import Cubical.Algebra.Group.Properties +open import Cubical.Algebra.Group.Morphisms +open import Cubical.Algebra.Group.MorphismProperties + + +open GroupStr + +ℤGroup : Group₀ +fst ℤGroup = ℤ +1g (snd ℤGroup) = 0 +_·_ (snd ℤGroup) = _+ℤ_ +inv (snd ℤGroup) = -ℤ_ +isGroup (snd ℤGroup) = isGroupℤ + where + abstract + isGroupℤ : IsGroup (pos 0) (_+ℤ_) (-ℤ_) + isGroupℤ = makeIsGroup isSetℤ + +Assoc +IdR +IdL + -Cancel -Cancel' + +ℤHom : (n : ℤ) → GroupHom ℤGroup ℤGroup +fst (ℤHom n) x = n ·ℤ x +snd (ℤHom n) = + makeIsGroupHom λ x y → ·DistR+ n x y + +negEquivℤ : GroupEquiv ℤGroup ℤGroup +fst negEquivℤ = + isoToEquiv + (iso (GroupStr.inv (snd ℤGroup)) + (GroupStr.inv (snd ℤGroup)) + (GroupTheory.invInv ℤGroup) + (GroupTheory.invInv ℤGroup)) +snd negEquivℤ = + makeIsGroupHom -Dist+ + +sumFinGroupℤComm : (G : Group₀) (h : GroupIso G ℤGroup) {n : ℕ} + (f : Fin n → fst G) → sumFinℤ {n = n} (λ a → Iso.fun (fst h) (f a)) + ≡ Iso.fun (fst h) (sumFinGroup G {n = n} f) +sumFinGroupℤComm G h {n = zero} f = sym (IsGroupHom.pres1 (snd h)) +sumFinGroupℤComm G h {n = suc n} f = + cong₂ _+ℤ_ (λ _ → Iso.fun (fst h) (f flast)) + (sumFinGroupℤComm G h {n = n} (f ∘ injectSuc {n = n})) + ∙ sym (IsGroupHom.pres· (snd h) (f flast) + (sumFinGroup G {n = n} (λ x → f (injectSuc {n = n} x)))) diff --git a/Cubical/Algebra/OrderedCommRing/Base.agda b/Cubical/Algebra/OrderedCommRing/Base.agda index 98c46bd005..29cd5dbb4b 100644 --- a/Cubical/Algebra/OrderedCommRing/Base.agda +++ b/Cubical/Algebra/OrderedCommRing/Base.agda @@ -1,6 +1,6 @@ module Cubical.Algebra.OrderedCommRing.Base where {- - Definition of an commutative ordered ring. + Definition of an ordered commutative ring. -} open import Cubical.Foundations.Prelude diff --git a/Cubical/Algebra/OrderedCommRing/Instances/Int.agda b/Cubical/Algebra/OrderedCommRing/Instances/Int.agda new file mode 100644 index 0000000000..f4cda9a69b --- /dev/null +++ b/Cubical/Algebra/OrderedCommRing/Instances/Int.agda @@ -0,0 +1,66 @@ +module Cubical.Algebra.OrderedCommRing.Instances.Int where + +open import Cubical.Foundations.Prelude +open import Cubical.Foundations.Function +open import Cubical.Foundations.Equiv + +open import Cubical.Data.Empty as ⊥ + +open import Cubical.HITs.PropositionalTruncation + +open import Cubical.Data.Int as ℤ + renaming (_+_ to _+ℤ_ ; _-_ to _-ℤ_; -_ to -ℤ_ ; _·_ to _·ℤ_) +open import Cubical.Data.Int.Order + renaming (_<_ to _<ℤ_ ; _≤_ to _≤ℤ_) + +open import Cubical.Algebra.CommRing +open import Cubical.Algebra.CommRing.Instances.Int + +open import Cubical.Algebra.OrderedCommRing + +open import Cubical.Relation.Nullary + +open import Cubical.Relation.Binary.Order.StrictOrder +open import Cubical.Relation.Binary.Order.StrictOrder.Instances.Int + +open import Cubical.Relation.Binary.Order.Pseudolattice +open import Cubical.Relation.Binary.Order.Pseudolattice.Instances.Int + +open CommRingStr +open OrderedCommRingStr +open PseudolatticeStr +open StrictOrderStr + +ℤOrderedCommRing : OrderedCommRing ℓ-zero ℓ-zero +fst ℤOrderedCommRing = ℤ +0r (snd ℤOrderedCommRing) = 0 +1r (snd ℤOrderedCommRing) = 1 +_+_ (snd ℤOrderedCommRing) = _+ℤ_ +_·_ (snd ℤOrderedCommRing) = _·ℤ_ +-_ (snd ℤOrderedCommRing) = -ℤ_ +_<_ (snd ℤOrderedCommRing) = _<ℤ_ +_≤_ (snd ℤOrderedCommRing) = _≤ℤ_ +isOrderedCommRing (snd ℤOrderedCommRing) = isOrderedCommRingℤ + where + open IsOrderedCommRing + + isOrderedCommRingℤ : IsOrderedCommRing 0 1 _+ℤ_ _·ℤ_ -ℤ_ _<ℤ_ _≤ℤ_ + isOrderedCommRingℤ .isCommRing = ℤCommRing .snd .isCommRing + isOrderedCommRingℤ .isPseudolattice = ℤ≤Pseudolattice .snd .is-pseudolattice + isOrderedCommRingℤ .isStrictOrder = ℤ = λ x y → + propBiimpl→Equiv isProp≤ (isProp¬ (y <ℤ x)) + (λ x≤y y = λ x y → + propBiimpl→Equiv (isProp≤ {x} {y}) (isProp¬ (y <ℤ x)) + (λ x≤y y_ + +_≤_ : ℤ → ℤ → Type₀ +m ≤ n = Σ[ k ∈ ℕ ] m ℤ.+ pos k ≡ n + +_<_ : ℤ → ℤ → Type₀ +m < n = sucℤ m ≤ n + +_≥_ : ℤ → ℤ → Type₀ +m ≥ n = n ≤ m + +_>_ : ℤ → ℤ → Type₀ +m > n = n < m + +-- Recursive order + +_≤ᵗ_ : ℤ → ℤ → Type₀ +pos m ≤ᵗ pos n = m ℕrec.≤ n +pos m ≤ᵗ negsuc n = ⊥ +negsuc m ≤ᵗ pos n = Unit +negsuc m ≤ᵗ negsuc n = n ℕrec.≤ m + +_<ᵗ_ : ℤ → ℤ → Type₀ +pos m <ᵗ pos n = m ℕrec.< n +pos m <ᵗ negsuc n = ⊥ +negsuc m <ᵗ pos n = Unit +negsuc m <ᵗ negsuc n = n ℕrec.< m + +_≥ᵗ_ : ℤ → ℤ → Type₀ +m ≥ᵗ n = n ≤ᵗ m + +_>ᵗ_ : ℤ → ℤ → Type₀ +m >ᵗ n = n <ᵗ m + +-- Boolen order + +_<ᵇ_ : ℤ → ℤ → Bool +pos m <ᵇ pos n = m ℕ.<ᵇ n +pos m <ᵇ negsuc n = false +negsuc m <ᵇ pos n = true +negsuc m <ᵇ negsuc n = n ℕ.<ᵇ m + +_≤ᵇ_ : ℤ → ℤ → Bool +pos m ≤ᵇ pos n = m ℕ.≤ᵇ n +pos m ≤ᵇ negsuc n = false +negsuc m ≤ᵇ pos n = true +negsuc m ≤ᵇ negsuc n = n ℕ.≤ᵇ m + +_>ᵇ_ : ℤ → ℤ → Bool +m >ᵇ n = n <ᵇ m + +_≥ᵇ_ : ℤ → ℤ → Bool +m ≥ᵇ n = n ≤ᵇ m + +-- The recursive and boolean order normalize in the same way: +≤ᵗ≡≤ᵇ : ∀ x y → x ≤ᵗ y ≡ Bool→Type (x ≤ᵇ y) +≤ᵗ≡≤ᵇ (pos zero) (pos n) = refl +≤ᵗ≡≤ᵇ (pos (suc m)) (pos zero) = refl +≤ᵗ≡≤ᵇ (pos (suc m)) (pos (suc n)) = ≤ᵗ≡≤ᵇ (pos m) (pos n) +≤ᵗ≡≤ᵇ (pos m) (negsuc n) = refl +≤ᵗ≡≤ᵇ (negsuc m) (pos n) = refl +≤ᵗ≡≤ᵇ (negsuc m) (negsuc zero) = refl +≤ᵗ≡≤ᵇ (negsuc zero) (negsuc (suc n)) = refl +≤ᵗ≡≤ᵇ (negsuc (suc m)) (negsuc (suc n)) = ≤ᵗ≡≤ᵇ (negsuc m) (negsuc n) + +data Trichotomy (m n : ℤ) : Type₀ where + lt : m < n → Trichotomy m n + eq : m ≡ n → Trichotomy m n + gt : n < m → Trichotomy m n + +private + variable + m n o s : ℤ + k l : ℕ + +private + witness-prop : ∀ j → isProp (m ℤ.+ pos j ≡ n) + witness-prop {m} {n} j = isSetℤ (m ℤ.+ pos j) n + +isProp≤ : isProp (m ≤ n) +isProp≤ {m} {n} (k , p) (l , q) + = Σ≡Prop (witness-prop {m} {n}) lemma + where + lemma : k ≡ l + lemma = injPos (inj-z+ {m} {pos k} {pos l} (p ∙ sym q)) + +isProp< : isProp (m < n) +isProp< {m} = isProp≤ {sucℤ m} + +zero-≤pos : 0 ≤ pos l +zero-≤pos {l} = l , (sym (pos0+ (pos l))) + +negsuc≤-zero : negsuc k ≤ 0 +negsuc≤-zero {k} = suc k , nℕ-n≡0 k + +¬-pos<-zero : ¬ (pos k) < 0 +¬-pos<-zero {k} (i , p) = snotz (injPos (pos+ (suc k) i ∙ p)) + +negsuc<-zero : negsuc k < 0 +negsuc<-zero {k} .fst = k +negsuc<-zero {k} .snd = + sucℤ (negsuc k) ℤ.+ pos k ≡⟨ sym (sucℤ+ (negsuc k) (pos k)) ⟩ + sucℤ (negsuc k ℤ.+ pos k) ≡⟨ +sucℤ (negsuc k) (pos k) ⟩ + neg (suc k) ℤ.+ pos (suc k) ≡⟨ -Cancel' (pos (suc k)) ⟩ + pos zero ∎ + +¬pos≤negsuc : ¬ (pos k) ≤ negsuc l +¬pos≤negsuc {k} {l} (i , p) = posNotnegsuc (k ℕ.+ i) l (pos+ k i ∙ p) + +negsuc≤pos : negsuc k ≤ pos l +negsuc≤pos {k} {l} .fst = l ℕ.+ suc k +negsuc≤pos {k} {l} .snd = plusMinus (pos (suc k)) (pos l) + +negsucn = gt (ℕ≤→≤ m>n) +pos m ≟ negsuc n = gt (negsucm = gt (-Dist< (suc-≤-suc {pos (suc m)} (ℕ≤→≤ n>m))) + +-- alternative proof +_≟'_ : ∀ m n → Trichotomy m n +pos zero ≟' pos zero = eq refl +pos zero ≟' pos (suc n) = lt (suc-≤-suc {0} {pos n} zero-≤pos) +pos (suc m) ≟' pos zero = gt (suc-≤-suc {0} {pos m} zero-≤pos) +pos (suc m) ≟' pos (suc n) = Trichotomy-suc (pos m ≟' pos n) +pos m ≟' negsuc n = gt (negsuc_UsingEqP -- Similar to `inspect`, but more convenient when `a` is not a function -- application, or when the applied function is not relevant +-- Note: when defining a term with `UsingEq`, it's still possible to prove its properties +-- using a with-abstraction without `UsingEq`, but not the other way around. +-- See `min`/`max` and their properties in Data.Nat.Properties for examples of this. _UsingEq : (a : A) → singl a a UsingEq = isContrSingl a .fst diff --git a/Cubical/Relation/Binary/Base.agda b/Cubical/Relation/Binary/Base.agda index 500c849b9c..c22dd0cb3d 100644 --- a/Cubical/Relation/Binary/Base.agda +++ b/Cubical/Relation/Binary/Base.agda @@ -45,6 +45,11 @@ compPropRel R S .snd _ _ = squash₁ graphRel : ∀ {ℓ} {A B : Type ℓ} → (A → B) → Rel A B ℓ graphRel f a b = f a ≡ b +data Ordering : Type where + LT : Ordering + EQ : Ordering + GT : Ordering + module HeterogenousRelation {ℓ ℓ' : Level} {A B : Type ℓ} (R : Rel A B ℓ') where isUniversalRel : Type (ℓ-max ℓ ℓ') isUniversalRel = (a : A) (b : B) → R a b diff --git a/Cubical/Relation/Binary/Order/Loset/Instances/Int/Fast.agda b/Cubical/Relation/Binary/Order/Loset/Instances/Int/Fast.agda new file mode 100644 index 0000000000..e274b66da3 --- /dev/null +++ b/Cubical/Relation/Binary/Order/Loset/Instances/Int/Fast.agda @@ -0,0 +1,40 @@ +module Cubical.Relation.Binary.Order.Loset.Instances.Int.Fast where + +open import Cubical.Foundations.Prelude + +open import Cubical.Data.Sum +open import Cubical.HITs.PropositionalTruncation + +open import Cubical.Data.Empty as ⊥ + +open import Cubical.Data.Int.Fast +open import Cubical.Data.Int.Fast.Order renaming (_<_ to _<ℤ_) + +open import Cubical.Relation.Binary.Order.Loset + +open import Cubical.Relation.Binary +open BinaryRelation + +open LosetStr + +ℤ Date: Sat, 22 Nov 2025 19:15:50 +0100 Subject: [PATCH 02/11] =?UTF-8?q?edit=20`zero-=E2=89=A4pos`,=20using=20an?= =?UTF-8?q?=20easier=20proof,=20add=20=20`zero- Date: Sat, 13 Dec 2025 07:35:29 +0100 Subject: [PATCH 03/11] remove `Int.Fast.Order` and related instances ; merge properties of Pseudolattices and simplify some proofs about min/max in `Int.Fast.Properties` --- .../OrderedCommRing/Instances/Int/Fast.agda | 69 -- Cubical/Data/Int/Fast/Order.agda | 613 ------------------ Cubical/Data/Int/Fast/Properties.agda | 56 +- .../Order/Loset/Instances/Int/Fast.agda | 40 -- .../Order/Poset/Instances/Int/Fast.agda | 11 - .../Order/Proset/Instances/Int/Fast.agda | 11 - .../Binary/Order/Pseudolattice/Base.agda | 92 ++- .../Pseudolattice/Instances/Int/Fast.agda | 18 - .../Order/Pseudolattice/Properties.agda | 90 ++- .../Order/Quoset/Instances/Int/Fast.agda | 11 - .../Order/StrictOrder/Instances/Int/Fast.agda | 11 - .../Order/Toset/Instances/Int/Fast.agda | 34 - 12 files changed, 187 insertions(+), 869 deletions(-) delete mode 100644 Cubical/Algebra/OrderedCommRing/Instances/Int/Fast.agda delete mode 100644 Cubical/Data/Int/Fast/Order.agda delete mode 100644 Cubical/Relation/Binary/Order/Loset/Instances/Int/Fast.agda delete mode 100644 Cubical/Relation/Binary/Order/Poset/Instances/Int/Fast.agda delete mode 100644 Cubical/Relation/Binary/Order/Proset/Instances/Int/Fast.agda delete mode 100644 Cubical/Relation/Binary/Order/Pseudolattice/Instances/Int/Fast.agda delete mode 100644 Cubical/Relation/Binary/Order/Quoset/Instances/Int/Fast.agda delete mode 100644 Cubical/Relation/Binary/Order/StrictOrder/Instances/Int/Fast.agda delete mode 100644 Cubical/Relation/Binary/Order/Toset/Instances/Int/Fast.agda diff --git a/Cubical/Algebra/OrderedCommRing/Instances/Int/Fast.agda b/Cubical/Algebra/OrderedCommRing/Instances/Int/Fast.agda deleted file mode 100644 index b1913c55c4..0000000000 --- a/Cubical/Algebra/OrderedCommRing/Instances/Int/Fast.agda +++ /dev/null @@ -1,69 +0,0 @@ -module Cubical.Algebra.OrderedCommRing.Instances.Int.Fast where - -open import Cubical.Foundations.Prelude -open import Cubical.Foundations.Function -open import Cubical.Foundations.Equiv - -open import Cubical.Data.Empty as ⊥ - -open import Cubical.HITs.PropositionalTruncation - -open import Cubical.Data.Int.Fast as ℤ - renaming (_+_ to _+ℤ_ ; _-_ to _-ℤ_; -_ to -ℤ_ ; _·_ to _·ℤ_) -open import Cubical.Data.Int.Fast.Order - renaming (_<_ to _<ℤ_ ; _≤_ to _≤ℤ_) - -open import Cubical.Algebra.CommRing -open import Cubical.Algebra.CommRing.Instances.Int.Fast - -open import Cubical.Algebra.OrderedCommRing - -open import Cubical.Relation.Nullary - -open import Cubical.Relation.Binary.Order.StrictOrder -open import Cubical.Relation.Binary.Order.StrictOrder.Instances.Int.Fast - -open import Cubical.Relation.Binary.Order.Pseudolattice -open import Cubical.Relation.Binary.Order.Pseudolattice.Instances.Int.Fast - -open import Cubical.Relation.Binary -open BinaryRelation - -open CommRingStr -open OrderedCommRingStr -open PseudolatticeStr -open StrictOrderStr - -ℤOrderedCommRing : OrderedCommRing ℓ-zero ℓ-zero -fst ℤOrderedCommRing = ℤ -0r (snd ℤOrderedCommRing) = 0 -1r (snd ℤOrderedCommRing) = 1 -_+_ (snd ℤOrderedCommRing) = _+ℤ_ -_·_ (snd ℤOrderedCommRing) = _·ℤ_ --_ (snd ℤOrderedCommRing) = -ℤ_ -_<_ (snd ℤOrderedCommRing) = _<ℤ_ -_≤_ (snd ℤOrderedCommRing) = _≤ℤ_ -isOrderedCommRing (snd ℤOrderedCommRing) = isOrderedCommRingℤ - where - open IsOrderedCommRing - - isOrderedCommRingℤ : IsOrderedCommRing 0 1 _+ℤ_ _·ℤ_ -ℤ_ _<ℤ_ _≤ℤ_ - isOrderedCommRingℤ .isCommRing = ℤCommRing .snd .isCommRing - isOrderedCommRingℤ .isPseudolattice = ℤ≤Pseudolattice .snd .is-pseudolattice - isOrderedCommRingℤ .isStrictOrder = ℤ = λ x y → - propBiimpl→Equiv (isProp≤ {x} {y}) (isProp¬ (y <ℤ x)) - (λ x≤y y_ - -_≤_ : ℤ → ℤ → Type₀ -m ≤ n = Σ[ k ∈ ℕ ] m ℤ.+ pos k ≡ n - -_<_ : ℤ → ℤ → Type₀ -m < n = sucℤ m ≤ n - -_≥_ : ℤ → ℤ → Type₀ -m ≥ n = n ≤ m - -_>_ : ℤ → ℤ → Type₀ -m > n = n < m - --- Recursive order - -_≤ᵗ_ : ℤ → ℤ → Type₀ -pos m ≤ᵗ pos n = m ℕrec.≤ n -pos m ≤ᵗ negsuc n = ⊥ -negsuc m ≤ᵗ pos n = Unit -negsuc m ≤ᵗ negsuc n = n ℕrec.≤ m - -_<ᵗ_ : ℤ → ℤ → Type₀ -pos m <ᵗ pos n = m ℕrec.< n -pos m <ᵗ negsuc n = ⊥ -negsuc m <ᵗ pos n = Unit -negsuc m <ᵗ negsuc n = n ℕrec.< m - -_≥ᵗ_ : ℤ → ℤ → Type₀ -m ≥ᵗ n = n ≤ᵗ m - -_>ᵗ_ : ℤ → ℤ → Type₀ -m >ᵗ n = n <ᵗ m - --- Boolen order - -_<ᵇ_ : ℤ → ℤ → Bool -pos m <ᵇ pos n = m ℕ.<ᵇ n -pos m <ᵇ negsuc n = false -negsuc m <ᵇ pos n = true -negsuc m <ᵇ negsuc n = n ℕ.<ᵇ m - -_≤ᵇ_ : ℤ → ℤ → Bool -pos m ≤ᵇ pos n = m ℕ.≤ᵇ n -pos m ≤ᵇ negsuc n = false -negsuc m ≤ᵇ pos n = true -negsuc m ≤ᵇ negsuc n = n ℕ.≤ᵇ m - -_>ᵇ_ : ℤ → ℤ → Bool -m >ᵇ n = n <ᵇ m - -_≥ᵇ_ : ℤ → ℤ → Bool -m ≥ᵇ n = n ≤ᵇ m - --- The recursive and boolean order normalize in the same way: -≤ᵗ≡≤ᵇ : ∀ x y → x ≤ᵗ y ≡ Bool→Type (x ≤ᵇ y) -≤ᵗ≡≤ᵇ (pos zero) (pos n) = refl -≤ᵗ≡≤ᵇ (pos (suc m)) (pos zero) = refl -≤ᵗ≡≤ᵇ (pos (suc m)) (pos (suc n)) = ≤ᵗ≡≤ᵇ (pos m) (pos n) -≤ᵗ≡≤ᵇ (pos m) (negsuc n) = refl -≤ᵗ≡≤ᵇ (negsuc m) (pos n) = refl -≤ᵗ≡≤ᵇ (negsuc m) (negsuc zero) = refl -≤ᵗ≡≤ᵇ (negsuc zero) (negsuc (suc n)) = refl -≤ᵗ≡≤ᵇ (negsuc (suc m)) (negsuc (suc n)) = ≤ᵗ≡≤ᵇ (negsuc m) (negsuc n) - -data Trichotomy (m n : ℤ) : Type₀ where - lt : m < n → Trichotomy m n - eq : m ≡ n → Trichotomy m n - gt : n < m → Trichotomy m n - -private - variable - m n o s : ℤ - k l : ℕ - -private - witness-prop : ∀ j → isProp (m ℤ.+ pos j ≡ n) - witness-prop {m} {n} j = isSetℤ (m ℤ.+ pos j) n - -isProp≤ : isProp (m ≤ n) -isProp≤ {m} {n} (k , p) (l , q) - = Σ≡Prop (witness-prop {m} {n}) lemma - where - lemma : k ≡ l - lemma = injPos (inj-z+ {m} {pos k} {pos l} (p ∙ sym q)) - -isProp< : isProp (m < n) -isProp< {m} = isProp≤ {sucℤ m} - --- this proof warrants the particular order of summands in the definition of order -zero-≤pos : 0 ≤ pos l -zero-≤pos {l} = l , refl - -zero-n = gt (ℕ≤→≤ m>n) -pos m ≟ negsuc n = gt (negsucm = gt (-Dist< (suc-≤-suc {pos (suc m)} (ℕ≤→≤ n>m))) - --- alternative proof -_≟'_ : ∀ m n → Trichotomy m n -pos zero ≟' pos zero = eq refl -pos zero ≟' pos (suc n) = lt (suc-≤-suc {0} {pos n} zero-≤pos) -pos (suc m) ≟' pos zero = gt (suc-≤-suc {0} {pos m} zero-≤pos) -pos (suc m) ≟' pos (suc n) = Trichotomy-suc (pos m ≟' pos n) -pos m ≟' negsuc n = gt (negsuc Date: Sat, 13 Dec 2025 08:48:51 +0100 Subject: [PATCH 04/11] move `Fast` Integer files to `Fast` folder, and similarly for the algebraic instances --- Cubical/Algebra/AbGroup/Instances/{Int => Fast}/Fast.agda | 0 Cubical/Algebra/CommRing/Instances/{Int => Fast}/Fast.agda | 0 Cubical/Algebra/Group/Instances/{Int => Fast}/Fast.agda | 0 Cubical/Data/{Int => Fast}/Fast.agda | 0 Cubical/Data/{Int/Fast => Fast/Int}/Base.agda | 0 Cubical/Data/{Int/Fast => Fast/Int}/Divisibility.agda | 0 Cubical/Data/{Int/Fast => Fast/Int}/IsEven.agda | 0 Cubical/Data/{Int/Fast => Fast/Int}/Properties.agda | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename Cubical/Algebra/AbGroup/Instances/{Int => Fast}/Fast.agda (100%) rename Cubical/Algebra/CommRing/Instances/{Int => Fast}/Fast.agda (100%) rename Cubical/Algebra/Group/Instances/{Int => Fast}/Fast.agda (100%) rename Cubical/Data/{Int => Fast}/Fast.agda (100%) rename Cubical/Data/{Int/Fast => Fast/Int}/Base.agda (100%) rename Cubical/Data/{Int/Fast => Fast/Int}/Divisibility.agda (100%) rename Cubical/Data/{Int/Fast => Fast/Int}/IsEven.agda (100%) rename Cubical/Data/{Int/Fast => Fast/Int}/Properties.agda (100%) diff --git a/Cubical/Algebra/AbGroup/Instances/Int/Fast.agda b/Cubical/Algebra/AbGroup/Instances/Fast/Fast.agda similarity index 100% rename from Cubical/Algebra/AbGroup/Instances/Int/Fast.agda rename to Cubical/Algebra/AbGroup/Instances/Fast/Fast.agda diff --git a/Cubical/Algebra/CommRing/Instances/Int/Fast.agda b/Cubical/Algebra/CommRing/Instances/Fast/Fast.agda similarity index 100% rename from Cubical/Algebra/CommRing/Instances/Int/Fast.agda rename to Cubical/Algebra/CommRing/Instances/Fast/Fast.agda diff --git a/Cubical/Algebra/Group/Instances/Int/Fast.agda b/Cubical/Algebra/Group/Instances/Fast/Fast.agda similarity index 100% rename from Cubical/Algebra/Group/Instances/Int/Fast.agda rename to Cubical/Algebra/Group/Instances/Fast/Fast.agda diff --git a/Cubical/Data/Int/Fast.agda b/Cubical/Data/Fast/Fast.agda similarity index 100% rename from Cubical/Data/Int/Fast.agda rename to Cubical/Data/Fast/Fast.agda diff --git a/Cubical/Data/Int/Fast/Base.agda b/Cubical/Data/Fast/Int/Base.agda similarity index 100% rename from Cubical/Data/Int/Fast/Base.agda rename to Cubical/Data/Fast/Int/Base.agda diff --git a/Cubical/Data/Int/Fast/Divisibility.agda b/Cubical/Data/Fast/Int/Divisibility.agda similarity index 100% rename from Cubical/Data/Int/Fast/Divisibility.agda rename to Cubical/Data/Fast/Int/Divisibility.agda diff --git a/Cubical/Data/Int/Fast/IsEven.agda b/Cubical/Data/Fast/Int/IsEven.agda similarity index 100% rename from Cubical/Data/Int/Fast/IsEven.agda rename to Cubical/Data/Fast/Int/IsEven.agda diff --git a/Cubical/Data/Int/Fast/Properties.agda b/Cubical/Data/Fast/Int/Properties.agda similarity index 100% rename from Cubical/Data/Int/Fast/Properties.agda rename to Cubical/Data/Fast/Int/Properties.agda From 37f7203c968b4fd9e09744339dc03ccc26bdfa47 Mon Sep 17 00:00:00 2001 From: Lorenzo Molena Date: Sat, 13 Dec 2025 08:55:57 +0100 Subject: [PATCH 05/11] rename the algebraic instances of fast integers --- Cubical/Algebra/AbGroup/Instances/Fast/{Fast.agda => Int.agda} | 0 Cubical/Algebra/CommRing/Instances/Fast/{Fast.agda => Int.agda} | 0 Cubical/Algebra/Group/Instances/Fast/{Fast.agda => Int.agda} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename Cubical/Algebra/AbGroup/Instances/Fast/{Fast.agda => Int.agda} (100%) rename Cubical/Algebra/CommRing/Instances/Fast/{Fast.agda => Int.agda} (100%) rename Cubical/Algebra/Group/Instances/Fast/{Fast.agda => Int.agda} (100%) diff --git a/Cubical/Algebra/AbGroup/Instances/Fast/Fast.agda b/Cubical/Algebra/AbGroup/Instances/Fast/Int.agda similarity index 100% rename from Cubical/Algebra/AbGroup/Instances/Fast/Fast.agda rename to Cubical/Algebra/AbGroup/Instances/Fast/Int.agda diff --git a/Cubical/Algebra/CommRing/Instances/Fast/Fast.agda b/Cubical/Algebra/CommRing/Instances/Fast/Int.agda similarity index 100% rename from Cubical/Algebra/CommRing/Instances/Fast/Fast.agda rename to Cubical/Algebra/CommRing/Instances/Fast/Int.agda diff --git a/Cubical/Algebra/Group/Instances/Fast/Fast.agda b/Cubical/Algebra/Group/Instances/Fast/Int.agda similarity index 100% rename from Cubical/Algebra/Group/Instances/Fast/Fast.agda rename to Cubical/Algebra/Group/Instances/Fast/Int.agda From 0218afbca1ab1f8d189fe4cbe57908a1f31c58aa Mon Sep 17 00:00:00 2001 From: Lorenzo Molena Date: Sat, 13 Dec 2025 08:59:08 +0100 Subject: [PATCH 06/11] another rename --- Cubical/Data/Fast/{Fast.agda => Int.agda} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Cubical/Data/Fast/{Fast.agda => Int.agda} (100%) diff --git a/Cubical/Data/Fast/Fast.agda b/Cubical/Data/Fast/Int.agda similarity index 100% rename from Cubical/Data/Fast/Fast.agda rename to Cubical/Data/Fast/Int.agda From d47295e8b315528d47e085d74d3f8873c0a4a1b6 Mon Sep 17 00:00:00 2001 From: Lorenzo Molena Date: Sat, 13 Dec 2025 09:25:19 +0100 Subject: [PATCH 07/11] fix imports, remove unnecessary code in `Pseudolattice.Properties` --- Cubical/Algebra/AbGroup/Instances/Fast/Int.agda | 6 +++--- Cubical/Algebra/CommRing/Instances/Fast/Int.agda | 4 ++-- Cubical/Algebra/Group/Instances/Fast/Int.agda | 4 ++-- Cubical/Data/Fast/Int.agda | 6 +++--- Cubical/Data/Fast/Int/Base.agda | 2 +- Cubical/Data/Fast/Int/Divisibility.agda | 8 ++++---- Cubical/Data/Fast/Int/IsEven.agda | 10 ++++------ Cubical/Data/Fast/Int/Properties.agda | 4 ++-- .../Binary/Order/Pseudolattice/Properties.agda | 5 ----- 9 files changed, 21 insertions(+), 28 deletions(-) diff --git a/Cubical/Algebra/AbGroup/Instances/Fast/Int.agda b/Cubical/Algebra/AbGroup/Instances/Fast/Int.agda index 671cf2230e..262535dcb3 100644 --- a/Cubical/Algebra/AbGroup/Instances/Fast/Int.agda +++ b/Cubical/Algebra/AbGroup/Instances/Fast/Int.agda @@ -1,9 +1,9 @@ -module Cubical.Algebra.AbGroup.Instances.Int.Fast where +module Cubical.Algebra.AbGroup.Instances.Fast.Int where open import Cubical.Foundations.Prelude -open import Cubical.Data.Int.Fast +open import Cubical.Data.Fast.Int open import Cubical.Algebra.AbGroup.Base -open import Cubical.Algebra.Group.Instances.Int.Fast +open import Cubical.Algebra.Group.Instances.Fast.Int ℤAbGroup : AbGroup ℓ-zero ℤAbGroup = Group→AbGroup ℤGroup +Comm diff --git a/Cubical/Algebra/CommRing/Instances/Fast/Int.agda b/Cubical/Algebra/CommRing/Instances/Fast/Int.agda index 240bf9036b..e01dde2d62 100644 --- a/Cubical/Algebra/CommRing/Instances/Fast/Int.agda +++ b/Cubical/Algebra/CommRing/Instances/Fast/Int.agda @@ -1,9 +1,9 @@ -module Cubical.Algebra.CommRing.Instances.Int.Fast where +module Cubical.Algebra.CommRing.Instances.Fast.Int where open import Cubical.Foundations.Prelude open import Cubical.Algebra.CommRing -open import Cubical.Data.Int.Fast as Int renaming (_+_ to _+ℤ_; _·_ to _·ℤ_ ; -_ to -ℤ_) +open import Cubical.Data.Fast.Int as Int renaming (_+_ to _+ℤ_; _·_ to _·ℤ_ ; -_ to -ℤ_) open CommRingStr using (0r ; 1r ; _+_ ; _·_ ; -_ ; isCommRing) diff --git a/Cubical/Algebra/Group/Instances/Fast/Int.agda b/Cubical/Algebra/Group/Instances/Fast/Int.agda index fcd563bc44..b1ad0290ad 100644 --- a/Cubical/Algebra/Group/Instances/Fast/Int.agda +++ b/Cubical/Algebra/Group/Instances/Fast/Int.agda @@ -1,10 +1,10 @@ -module Cubical.Algebra.Group.Instances.Int.Fast where +module Cubical.Algebra.Group.Instances.Fast.Int where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Function -open import Cubical.Data.Int.Fast renaming (_+_ to _+ℤ_ ; _-_ to _-ℤ_ ; _·_ to _·ℤ_ ; -_ to -ℤ_) +open import Cubical.Data.Fast.Int renaming (_+_ to _+ℤ_ ; _-_ to _-ℤ_ ; _·_ to _·ℤ_ ; -_ to -ℤ_) open import Cubical.Data.Nat using (ℕ ; zero ; suc) open import Cubical.Data.Fin.Inductive.Base diff --git a/Cubical/Data/Fast/Int.agda b/Cubical/Data/Fast/Int.agda index b529c7272a..9b344a0889 100644 --- a/Cubical/Data/Fast/Int.agda +++ b/Cubical/Data/Fast/Int.agda @@ -1,6 +1,6 @@ -- This is the fast version of the integers. -- It uses the preferred version of the integers, but with more efficient operations. -module Cubical.Data.Int.Fast where +module Cubical.Data.Fast.Int where -open import Cubical.Data.Int.Fast.Base public -open import Cubical.Data.Int.Fast.Properties public +open import Cubical.Data.Fast.Int.Base public +open import Cubical.Data.Fast.Int.Properties public diff --git a/Cubical/Data/Fast/Int/Base.agda b/Cubical/Data/Fast/Int/Base.agda index bd33905d08..794cce2cac 100644 --- a/Cubical/Data/Fast/Int/Base.agda +++ b/Cubical/Data/Fast/Int/Base.agda @@ -1,4 +1,4 @@ -module Cubical.Data.Int.Fast.Base where +module Cubical.Data.Fast.Int.Base where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat as ℕ hiding (_+_ ; _·_) diff --git a/Cubical/Data/Fast/Int/Divisibility.agda b/Cubical/Data/Fast/Int/Divisibility.agda index 765557f531..b0ee19f2c4 100644 --- a/Cubical/Data/Fast/Int/Divisibility.agda +++ b/Cubical/Data/Fast/Int/Divisibility.agda @@ -3,7 +3,7 @@ Base facts about that the ring ℤ is Bézout domain -} -module Cubical.Data.Int.Fast.Divisibility where +module Cubical.Data.Fast.Int.Divisibility where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv @@ -21,9 +21,9 @@ open import Cubical.Data.Nat.Mod renaming ( quotient'_/_ to quotient_/_ ; remainder'_/_ to remainder_/_ ; ≡remainder'+quotient' to ≡remainder+quotient ; mod'< to mod< ) hiding (quotient_/_ ; remainder_/_ ; ≡remainder+quotient ; mod<) -open import Cubical.Data.Int.Base as ℤ +open import Cubical.Data.Fast.Int.Base as ℤ hiding (_+_ ; _·_ ; _-_ ; -_) -open import Cubical.Data.Int.Fast.Properties as ℤ +open import Cubical.Data.Fast.Int.Properties as ℤ hiding (addEq ; ·Comm ; ·Assoc ; +Comm ; +Assoc ; ·DistL+) open import Cubical.Data.Empty as Empty @@ -34,7 +34,7 @@ open import Cubical.HITs.PropositionalTruncation as Prop open import Cubical.Relation.Nullary open import Cubical.Algebra.CommRing -open import Cubical.Algebra.CommRing.Instances.Int.Fast +open import Cubical.Algebra.CommRing.Instances.Fast.Int open import Cubical.Tactics.CommRingSolver private diff --git a/Cubical/Data/Fast/Int/IsEven.agda b/Cubical/Data/Fast/Int/IsEven.agda index 8ff7ec6f36..eac8938dad 100644 --- a/Cubical/Data/Fast/Int/IsEven.agda +++ b/Cubical/Data/Fast/Int/IsEven.agda @@ -1,4 +1,4 @@ -module Cubical.Data.Int.Fast.IsEven where +module Cubical.Data.Fast.Int.IsEven where open import Cubical.Foundations.Prelude @@ -15,17 +15,15 @@ open import Cubical.Data.Nat isOdd to isOddℕ) import Cubical.Data.Nat.IsEven as ℕeven -open import Cubical.Data.Int.Base as ℤ - hiding (_+_ ; _·_ ; _-_ ; _ℕ-_ ; sumFinℤ ; sumFinℤId) -open import Cubical.Data.Int.Fast.Base as ℤ -open import Cubical.Data.Int.Fast.Properties +open import Cubical.Data.Fast.Int.Base as ℤ +open import Cubical.Data.Fast.Int.Properties open import Cubical.Data.Sum open import Cubical.Algebra.Group open import Cubical.Algebra.Group.Morphisms open import Cubical.Algebra.Group.MorphismProperties open import Cubical.Algebra.Group.Instances.Bool -open import Cubical.Algebra.Group.Instances.Int.Fast +open import Cubical.Algebra.Group.Instances.Fast.Int open GroupStr (snd BoolGroup) using () renaming ( _·_ to _+Bool_ ) diff --git a/Cubical/Data/Fast/Int/Properties.agda b/Cubical/Data/Fast/Int/Properties.agda index 09cb879eb6..4850c86f79 100644 --- a/Cubical/Data/Fast/Int/Properties.agda +++ b/Cubical/Data/Fast/Int/Properties.agda @@ -1,4 +1,4 @@ -module Cubical.Data.Int.Fast.Properties where +module Cubical.Data.Fast.Int.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function @@ -32,7 +32,7 @@ open import Cubical.Data.Int.Properties as P public using ( ; ind-assoc ; ind-comm ; sucPathℤ ; addEq ; predPathℤ ; subEq ; _+'_ ; isEquivAddℤ' ; abs→⊎ ; ⊎→abs ; abs≡0 ; ¬x≡0→¬abs≡0 ; abs- ; 0≢1-ℤ ; clamp) -open import Cubical.Data.Int.Fast.Base +open import Cubical.Data.Fast.Int.Base open MeetProperties ℕ≤Pseudolattice open JoinProperties ℕ≤Pseudolattice diff --git a/Cubical/Relation/Binary/Order/Pseudolattice/Properties.agda b/Cubical/Relation/Binary/Order/Pseudolattice/Properties.agda index 0c0016cbf5..64893cbaf6 100644 --- a/Cubical/Relation/Binary/Order/Pseudolattice/Properties.agda +++ b/Cubical/Relation/Binary/Order/Pseudolattice/Properties.agda @@ -134,8 +134,3 @@ module JoinProperties (L≤ : Pseudolattice ℓ ℓ') where module PseudolatticeTheory (L≤ : Pseudolattice ℓ ℓ') where open MeetProperties L≤ public open JoinProperties L≤ public - private - L = L≤ .fst - open PseudolatticeStr (L≤ .snd) - variable - a b c x : L From f2971e0ad40c368ed97410d2e72ccf2ceb97f1a5 Mon Sep 17 00:00:00 2001 From: Lorenzo Molena Date: Sun, 14 Dec 2025 00:22:20 +0100 Subject: [PATCH 08/11] remove `Ordering` data type (I'll leave it for the PR with fast integer order) --- Cubical/Relation/Binary/Base.agda | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Cubical/Relation/Binary/Base.agda b/Cubical/Relation/Binary/Base.agda index c22dd0cb3d..500c849b9c 100644 --- a/Cubical/Relation/Binary/Base.agda +++ b/Cubical/Relation/Binary/Base.agda @@ -45,11 +45,6 @@ compPropRel R S .snd _ _ = squash₁ graphRel : ∀ {ℓ} {A B : Type ℓ} → (A → B) → Rel A B ℓ graphRel f a b = f a ≡ b -data Ordering : Type where - LT : Ordering - EQ : Ordering - GT : Ordering - module HeterogenousRelation {ℓ ℓ' : Level} {A B : Type ℓ} (R : Rel A B ℓ') where isUniversalRel : Type (ℓ-max ℓ ℓ') isUniversalRel = (a : A) (b : B) → R a b From a8b1cca79dfa3cd0c0fb9c682187b6b0bac5b622 Mon Sep 17 00:00:00 2001 From: LorenzoMolena <164308953+LorenzoMolena@users.noreply.github.com> Date: Sat, 24 Jan 2026 14:33:58 +0100 Subject: [PATCH 09/11] rebase and fix imports related to `Fin` (#33) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Resolve naming inconsistency between Iso and Category.isIso (#1274) s/leftInv/ret; s/rightInv/sec --------- Co-authored-by: Madeleine Sydney Ślaga * isIso name change fix (#1281) * Update fin (#1279) * Exchange Fin in Cubical.Data.Fin for the deifinition from Cubical.Data.Fin.Inductive. WIP * Fixed finj, predFin, inject<, flast, ¬Fin0 to work with new definition of Fin. * Minor changes * Fix sumFinGen * fix any? * Everything type checks now. Important changes: - Implicit argument added to toN - Implicit arguments in toN-injective slightly changed - Argument changed from implicit to explicit in elim * some formatting * change ¬Fin0 * remove comments * Add <ᵗ-asym * make properties type check * Remove dependencies on Cubical.Data.Fin.Inductive.Base * Things that work * Properties type check * more working files * factorEquiv * comment fix * LehmerCode type checks * SumFin.Base type checks * some cleanup and Axiom.Choice type checks not reliant on old Fin * Remove dependence on Fin.Inductive * Remove dependence on Fin.Inductive * Remove dependency on Fin.Infuctive * Remove dependency on Fin.Inductive * Remove dependencies on Fin.Inductive * type check * fix FinSet * _<ᵗ_ is well founded * type checks with new Fin * Everything builds * Move everything from Fin.Inductive.Properties to Fin.Properties and remove Fin.Inductive, Fin.Inductive.Base, Fin.Inductive.Properties * some cleanup * more cleanup * fix trailing whitespaces * files end with newline --------- Co-authored-by: croos <76143n@gmail.com> * fix defintions of `min` and `max`, add comment on limitations of `UsingEq` (#1270) * Change implementation of Inductive Order on Nat (#1283) * use boolean comparison in `Nat.Order.Inductive`, add non-strict and flipped inductive order, make faster instance search in `Fin.Literals` * fix typo * Place holder for paper (#1286) * placeholder * whitespae * Cellpaper2 (#1287) * placeholder * whitespae * form * fix imports: `Fin.Inductive.Base/Properties` → `Fin.Base/Properties` --------- Co-authored-by: Madeleine Sydney Ślaga <65362461+msyds@users.noreply.github.com> Co-authored-by: Madeleine Sydney Ślaga Co-authored-by: Max S. New Co-authored-by: Caroline Roos Co-authored-by: croos <76143n@gmail.com> Co-authored-by: Axel Ljungström <49276137+aljungstrom@users.noreply.github.com> --- .../AbGroup/Instances/FreeAbGroup.agda | 14 +- Cubical/Algebra/AbGroup/Instances/IntMod.agda | 19 +- Cubical/Algebra/AbGroup/Properties.agda | 2 +- Cubical/Algebra/AbGroup/TensorProduct.agda | 12 +- Cubical/Algebra/Algebra/Properties.agda | 8 +- Cubical/Algebra/ChainComplex/Finite.agda | 2 +- Cubical/Algebra/ChainComplex/Homology.agda | 26 +- .../AsModule/FreeCommAlgebra/OnCoproduct.agda | 2 +- .../AsModule/FreeCommAlgebra/Properties.agda | 6 +- .../AsModule/Instances/Initial.agda | 4 +- .../CommAlgebra/AsModule/Localisation.agda | 4 +- .../CommAlgebra/AsModule/Properties.agda | 8 +- .../CommAlgebra/Instances/Initial.agda | 4 +- Cubical/Algebra/CommAlgebra/Localisation.agda | 4 +- Cubical/Algebra/CommAlgebra/Polynomials.agda | 6 +- Cubical/Algebra/CommRing/Properties.agda | 6 +- Cubical/Algebra/CommRing/Univalence.agda | 8 +- .../Algebra/DirectSum/Equiv-DSHIT-DSFun.agda | 4 +- .../Instances/TrivialGradedRing.agda | 4 +- .../Abelianization/AbelianizationAsCoeq.agda | 2 +- .../Group/Abelianization/Properties.agda | 8 +- Cubical/Algebra/Group/Base.agda | 2 +- Cubical/Algebra/Group/Five.agda | 4 +- Cubical/Algebra/Group/Free.agda | 8 +- Cubical/Algebra/Group/Instances/Bool.agda | 8 +- Cubical/Algebra/Group/Instances/Fast/Int.agda | 2 +- Cubical/Algebra/Group/Instances/Int.agda | 2 +- Cubical/Algebra/Group/Instances/IntMod.agda | 94 ++- Cubical/Algebra/Group/Instances/Pi.agda | 4 +- Cubical/Algebra/Group/Instances/Unit.agda | 20 +- .../Algebra/Group/IsomorphismTheorems.agda | 4 +- Cubical/Algebra/Group/MorphismProperties.agda | 12 +- Cubical/Algebra/Group/Properties.agda | 8 +- Cubical/Algebra/Group/QuotientGroup.agda | 16 +- Cubical/Algebra/Group/ZAction.agda | 13 +- Cubical/Algebra/Matrix.agda | 4 +- .../EquivCarac/AB-An[X]Bn[X].agda | 4 +- .../Multivariate/EquivCarac/A[X]X-A.agda | 4 +- .../EquivCarac/An[Am[X]]-Anm[X].agda | 4 +- .../Multivariate/EquivCarac/An[X]X-A.agda | 4 +- .../Multivariate/EquivCarac/Poly0-A.agda | 4 +- .../EquivUnivariateListPoly.agda | 4 +- .../UnivariateList/Poly1-1Poly.agda | 4 +- .../Functorial/ZFunctors/Base.agda | 10 +- .../Functorial/ZFunctors/CompactOpen.agda | 10 +- .../Functorial/ZFunctors/OpenSubscheme.agda | 2 +- Cubical/Axiom/Choice.agda | 43 +- Cubical/Axiom/Omniscience.agda | 4 +- Cubical/CW/Approximation.agda | 9 +- Cubical/CW/Base.agda | 2 +- Cubical/CW/ChainComplex.agda | 12 +- Cubical/CW/Connected.agda | 36 +- Cubical/CW/Homology/Base.agda | 10 +- .../Groups/CofibFinSphereBouquetMap.agda | 30 +- Cubical/CW/Homology/Groups/Sn.agda | 7 +- Cubical/CW/Homology/Groups/Subcomplex.agda | 6 +- Cubical/CW/Homotopy.agda | 8 +- Cubical/CW/HurewiczTheorem.agda | 8 +- Cubical/CW/Instances/Empty.agda | 2 +- Cubical/CW/Instances/Pushout.agda | 17 +- Cubical/CW/Instances/Sn.agda | 37 +- Cubical/CW/Instances/SphereBouquetMap.agda | 2 +- Cubical/CW/Instances/Unit.agda | 3 +- Cubical/CW/Map.agda | 18 +- Cubical/CW/Properties.agda | 12 +- Cubical/CW/Strictification.agda | 2 +- Cubical/CW/Subcomplex.agda | 8 +- Cubical/Categories/Adjoint.agda | 24 +- Cubical/Categories/Category/Path.agda | 10 +- .../Categories/Constructions/Slice/Base.agda | 22 +- .../Constructions/Slice/Functor.agda | 14 +- Cubical/Categories/Dagger/Properties.agda | 8 +- .../Categories/Equivalence/Properties.agda | 6 +- .../Equivalence/WeakEquivalence.agda | 4 +- Cubical/Categories/Functor/Base.agda | 4 +- Cubical/Categories/Functor/Properties.agda | 10 +- Cubical/Categories/Instances/CommRings.agda | 22 +- .../Categories/Instances/EilenbergMoore.agda | 4 +- .../Categories/Instances/FunctorAlgebras.agda | 4 +- Cubical/Categories/Instances/Functors.agda | 8 +- .../Instances/Functors/Currying.agda | 4 +- Cubical/Categories/Instances/Groups.agda | 4 +- Cubical/Categories/Instances/Sets.agda | 22 +- Cubical/Categories/Limits/Initial.agda | 2 +- .../NaturalTransformation/Properties.agda | 18 +- Cubical/Categories/Presheaf/Properties.agda | 8 +- .../Categories/Presheaf/Representable.agda | 18 +- .../RezkCompletion/Construction.agda | 8 +- .../Site/Instances/ZariskiCommRing.agda | 4 +- Cubical/Categories/Yoneda.agda | 18 +- Cubical/Codata/Conat/Bounded.agda | 10 +- Cubical/Codata/Containers/Coalgebras.agda | 4 +- Cubical/Codata/M/M/Base.agda | 18 +- Cubical/Codata/M/M/Properties.agda | 4 +- Cubical/Cohomology/EilenbergMacLane/Base.agda | 20 +- .../EilenbergMacLane/EilenbergSteenrod.agda | 32 +- .../EilenbergMacLane/Groups/Connected.agda | 4 +- .../EilenbergMacLane/Groups/KleinBottle.agda | 36 +- .../EilenbergMacLane/Groups/RP2.agda | 38 +- .../EilenbergMacLane/Groups/RPinf.agda | 4 +- .../EilenbergMacLane/Groups/Sn.agda | 20 +- .../EilenbergMacLane/Groups/Torus.agda | 4 +- .../EilenbergMacLane/Groups/Wedge.agda | 4 +- .../Cohomology/EilenbergMacLane/Gysin.agda | 64 +- .../EilenbergMacLane/MayerVietoris.agda | 4 +- .../EilenbergMacLane/RingStructure.agda | 12 +- .../EilenbergMacLane/Rings/KleinBottle.agda | 6 +- .../EilenbergMacLane/Rings/RP2.agda | 2 +- .../EilenbergMacLane/Rings/RP2wedgeS1.agda | 18 +- .../Cohomology/EilenbergMacLane/Rings/Sn.agda | 4 +- Cubical/Data/Bool/Properties.agda | 30 +- Cubical/Data/Cardinal/Properties.agda | 12 +- Cubical/Data/Containers/Algebras.agda | 4 +- Cubical/Data/Containers/Base.agda | 2 +- .../Containers/ContainerExtensionProofs.agda | 6 +- Cubical/Data/Empty/Properties.agda | 4 +- Cubical/Data/Equality/Conversion.agda | 4 +- Cubical/Data/Fast/Int/Base.agda | 2 +- Cubical/Data/Fast/Int/Properties.agda | 4 +- Cubical/Data/Fin/Arithmetic.agda | 28 +- Cubical/Data/Fin/Base.agda | 78 +-- Cubical/Data/Fin/Inductive.agda | 5 - Cubical/Data/Fin/Inductive/Base.agda | 44 -- Cubical/Data/Fin/Inductive/Properties.agda | 355 ----------- Cubical/Data/Fin/LehmerCode.agda | 114 ++-- Cubical/Data/Fin/Literals.agda | 10 +- Cubical/Data/Fin/Properties.agda | 576 +++++++++++++----- Cubical/Data/Fin/Recursive/Properties.agda | 10 +- Cubical/Data/FinData/FinSet.agda | 11 +- Cubical/Data/FinData/Properties.agda | 36 +- Cubical/Data/FinSequence/Base.agda | 2 +- Cubical/Data/FinSequence/Properties.agda | 2 +- Cubical/Data/FinSet/Binary/Large.agda | 4 +- .../Data/FinSet/Binary/Small/Properties.agda | 6 +- Cubical/Data/FinSet/Cardinality.agda | 8 +- Cubical/Data/FinSet/Quotients.agda | 14 +- Cubical/Data/FinWeak/Properties.agda | 4 +- Cubical/Data/Int/Base.agda | 2 +- .../Int/MoreInts/BiInvInt/Properties.agda | 12 +- .../Data/Int/MoreInts/QuoInt/Properties.agda | 6 +- Cubical/Data/Int/Properties.agda | 4 +- Cubical/Data/List/Dependent.agda | 8 +- Cubical/Data/List/FinData.agda | 4 +- Cubical/Data/List/Properties.agda | 4 +- Cubical/Data/Maybe/Properties.agda | 12 +- .../Nat/Bijections/IncreasingFunction.agda | 4 +- Cubical/Data/Nat/Bijections/Product.agda | 4 +- Cubical/Data/Nat/Bijections/Sum.agda | 10 +- Cubical/Data/Nat/Bijections/Triangle.agda | 4 +- Cubical/Data/Nat/GCD.agda | 10 +- Cubical/Data/Nat/Lower.agda | 10 +- Cubical/Data/Nat/Order/Inductive.agda | 50 +- Cubical/Data/Nat/Properties.agda | 8 +- Cubical/Data/Ordinal/Properties.agda | 8 +- Cubical/Data/Prod/Properties.agda | 22 +- .../MoreRationals/SigmaQ/Properties.agda | 4 +- Cubical/Data/Sigma/Properties.agda | 88 +-- Cubical/Data/Sum/Properties.agda | 94 +-- Cubical/Data/SumFin/Properties.agda | 35 +- Cubical/Data/Unit/Properties.agda | 16 +- Cubical/Data/Vec/DepVec.agda | 4 +- Cubical/Data/Vec/NAry.agda | 4 +- Cubical/Data/Vec/Properties.agda | 4 +- Cubical/Data/W/Indexed.agda | 16 +- Cubical/Displayed/Properties.agda | 2 +- Cubical/Displayed/Subst.agda | 2 +- Cubical/Experiments/CohomologyGroups.agda | 10 +- Cubical/Experiments/IsoInt/Base.agda | 2 +- Cubical/Experiments/Poset.agda | 4 +- .../ZCohomologyOld/Properties.agda | 64 +- Cubical/Foundations/Equiv.agda | 24 +- Cubical/Foundations/Equiv/BiInvertible.agda | 14 +- Cubical/Foundations/Equiv/Dependent.agda | 30 +- Cubical/Foundations/Equiv/Fiberwise.agda | 4 +- Cubical/Foundations/Equiv/HalfAdjoint.agda | 20 +- Cubical/Foundations/Equiv/PathSplit.agda | 4 +- Cubical/Foundations/Equiv/Properties.agda | 8 +- Cubical/Foundations/HLevels.agda | 34 +- Cubical/Foundations/Isomorphism.agda | 78 +-- Cubical/Foundations/Path.agda | 12 +- Cubical/Foundations/Pointed/Base.agda | 8 +- Cubical/Foundations/Pointed/FunExt.agda | 4 +- Cubical/Foundations/Pointed/Properties.agda | 16 +- Cubical/Foundations/Transport.agda | 4 +- Cubical/Foundations/Univalence.agda | 8 +- Cubical/Foundations/Univalence/Universe.agda | 8 +- Cubical/Functions/Fibration.agda | 8 +- Cubical/Functions/FunExtEquiv.agda | 12 +- Cubical/Functions/Image.agda | 4 +- Cubical/Functions/Implicit.agda | 4 +- Cubical/Functions/Involution.agda | 4 +- Cubical/Functions/Preimage.agda | 4 +- .../HITs/2GroupoidTruncation/Properties.agda | 4 +- Cubical/HITs/AbPath/Properties.agda | 4 +- Cubical/HITs/Bouquet/Discrete.agda | 4 +- .../HITs/Bouquet/FundamentalGroupProof.agda | 12 +- Cubical/HITs/Bouquet/Properties.agda | 20 +- Cubical/HITs/Colimit/Base.agda | 4 +- Cubical/HITs/Delooping/Two/Properties.agda | 2 +- Cubical/HITs/FreeAbGroup/Base.agda | 4 +- Cubical/HITs/FreeGroup/NormalForm.agda | 6 +- Cubical/HITs/FreeGroupoid/Properties.agda | 10 +- .../HITs/GroupoidTruncation/Properties.agda | 4 +- Cubical/HITs/InfNat/Properties.agda | 4 +- Cubical/HITs/Join/Base.agda | 4 +- Cubical/HITs/Join/Properties.agda | 28 +- Cubical/HITs/KleinBottle/Properties.agda | 4 +- Cubical/HITs/MappingCones/Properties.agda | 24 +- Cubical/HITs/Modulo/FinEquiv.agda | 17 +- Cubical/HITs/Modulo/Properties.agda | 8 +- Cubical/HITs/Nullification/Properties.agda | 12 +- .../PropositionalTruncation/Properties.agda | 20 +- Cubical/HITs/Pushout/Base.agda | 32 +- Cubical/HITs/Pushout/Properties.agda | 124 ++-- Cubical/HITs/Pushout/PushoutProduct.agda | 6 +- Cubical/HITs/RPn/Base.agda | 4 +- Cubical/HITs/Replacement/Base.agda | 2 +- Cubical/HITs/S1/Base.agda | 12 +- Cubical/HITs/S1/Properties.agda | 4 +- Cubical/HITs/S2/Properties.agda | 4 +- Cubical/HITs/S3/Base.agda | 4 +- Cubical/HITs/SequentialColimit/Base.agda | 2 +- .../HITs/SequentialColimit/Properties.agda | 60 +- Cubical/HITs/SetQuotients/EqClass.agda | 12 +- Cubical/HITs/SetQuotients/Properties.agda | 24 +- Cubical/HITs/SetTruncation/Fibers.agda | 4 +- Cubical/HITs/SetTruncation/Properties.agda | 24 +- Cubical/HITs/SmashProduct/Base.agda | 68 +-- .../HITs/SmashProduct/SymmetricMonoidal.agda | 6 +- .../SmashProduct/SymmetricMonoidalCat.agda | 2 +- Cubical/HITs/Sn/Degree.agda | 32 +- Cubical/HITs/Sn/Multiplication.agda | 16 +- Cubical/HITs/SphereBouquet/Base.agda | 2 +- Cubical/HITs/SphereBouquet/Degree.agda | 6 +- Cubical/HITs/SphereBouquet/Properties.agda | 36 +- Cubical/HITs/Susp/Base.agda | 36 +- Cubical/HITs/Susp/Properties.agda | 44 +- .../Truncation/FromNegTwo/Properties.agda | 36 +- Cubical/HITs/Truncation/Properties.agda | 52 +- Cubical/HITs/UnorderedPair/Properties.agda | 4 +- Cubical/HITs/Wedge/Properties.agda | 110 ++-- Cubical/Homotopy/BlakersMassey.agda | 4 +- Cubical/Homotopy/Connected.agda | 36 +- .../Homotopy/EilenbergMacLane/CupProduct.agda | 8 +- .../EilenbergMacLane/GradedCommTensor.agda | 10 +- .../EilenbergMacLane/GroupStructure.agda | 4 +- .../Homotopy/EilenbergMacLane/Properties.agda | 60 +- Cubical/Homotopy/Group/Base.agda | 44 +- Cubical/Homotopy/Group/Join.agda | 20 +- Cubical/Homotopy/Group/LES.agda | 12 +- Cubical/Homotopy/Group/Pi3S2.agda | 4 +- .../Homotopy/Group/Pi4S3/BrunerieNumber.agda | 6 +- Cubical/Homotopy/Group/Pi4S3/DirectProof.agda | 8 +- .../Homotopy/Group/Pi4S3/S3PushoutIso.agda | 8 +- .../Group/PiAbCofibFinSphereBouquetMap.agda | 22 +- .../Group/PiCofibFinSphereBouquetMap.agda | 6 +- Cubical/Homotopy/Group/PiSphereBouquet.agda | 15 +- Cubical/Homotopy/Group/PinSn.agda | 26 +- Cubical/Homotopy/Group/SuspensionMap.agda | 6 +- Cubical/Homotopy/HSpace.agda | 16 +- Cubical/Homotopy/Hopf.agda | 52 +- Cubical/Homotopy/HopfInvariant/Base.agda | 10 +- Cubical/Homotopy/HopfInvariant/Brunerie.agda | 22 +- .../Homotopy/HopfInvariant/Homomorphism.agda | 24 +- Cubical/Homotopy/HopfInvariant/HopfMap.agda | 10 +- Cubical/Homotopy/Loopspace.agda | 20 +- Cubical/Homotopy/Whitehead.agda | 68 +-- Cubical/Homotopy/WhiteheadsLemma.agda | 4 +- Cubical/Modalities/Lex.agda | 4 +- Cubical/Modalities/Modality.agda | 8 +- Cubical/Papers/CellularMethods.agda | 73 +++ Cubical/Papers/ZCohomology.agda | 6 +- Cubical/Reflection/RecordEquiv.agda | 4 +- Cubical/Relation/Binary/Base.agda | 16 +- .../Relation/Binary/Order/Poset/Covering.agda | 12 +- .../Binary/Order/Woset/Simulation.agda | 8 +- Cubical/Relation/Nullary/Properties.agda | 2 +- Cubical/Structures/Maybe.agda | 4 +- Cubical/Structures/Record.agda | 4 +- Cubical/Structures/Relational/Constant.agda | 4 +- Cubical/Structures/Relational/Function.agda | 6 +- Cubical/Structures/Relational/Maybe.agda | 6 +- Cubical/Structures/Relational/Pointed.agda | 4 +- Cubical/Structures/Relational/Product.agda | 4 +- Cubical/ZCohomology/CohomologyRings/CP2.agda | 16 +- .../CohomologyRings/Coproduct.agda | 14 +- .../CohomologyRings/CupProductProperties.agda | 2 +- .../CohomologyRings/KleinBottle.agda | 16 +- Cubical/ZCohomology/CohomologyRings/RP2.agda | 12 +- .../CohomologyRings/RP2wedgeS1.agda | 16 +- Cubical/ZCohomology/CohomologyRings/S1.agda | 12 +- .../CohomologyRings/S2wedgeS4.agda | 16 +- Cubical/ZCohomology/CohomologyRings/Sn.agda | 12 +- Cubical/ZCohomology/CohomologyRings/Unit.agda | 8 +- Cubical/ZCohomology/EilenbergSteenrodZ.agda | 22 +- Cubical/ZCohomology/GroupStructure.agda | 22 +- Cubical/ZCohomology/Groups/CP2.agda | 18 +- Cubical/ZCohomology/Groups/Connected.agda | 8 +- Cubical/ZCohomology/Groups/Coproduct.agda | 4 +- Cubical/ZCohomology/Groups/KleinBottle.agda | 36 +- Cubical/ZCohomology/Groups/Prelims.agda | 14 +- Cubical/ZCohomology/Groups/RP2.agda | 14 +- Cubical/ZCohomology/Groups/RP2wedgeS1.agda | 4 +- Cubical/ZCohomology/Groups/S2wedgeS4.agda | 2 +- Cubical/ZCohomology/Groups/Sn.agda | 30 +- Cubical/ZCohomology/Groups/SphereProduct.agda | 18 +- Cubical/ZCohomology/Groups/Torus.agda | 8 +- Cubical/ZCohomology/Groups/Unit.agda | 18 +- Cubical/ZCohomology/Groups/Wedge.agda | 12 +- Cubical/ZCohomology/Gysin.agda | 54 +- .../ZCohomology/MayerVietorisUnreduced.agda | 4 +- Cubical/ZCohomology/Properties.agda | 26 +- .../RingStructure/CohomologyRing.agda | 12 +- .../RingStructure/GradedCommutativity.agda | 4 +- 314 files changed, 2799 insertions(+), 2760 deletions(-) delete mode 100644 Cubical/Data/Fin/Inductive.agda delete mode 100644 Cubical/Data/Fin/Inductive/Base.agda delete mode 100644 Cubical/Data/Fin/Inductive/Properties.agda create mode 100644 Cubical/Papers/CellularMethods.agda diff --git a/Cubical/Algebra/AbGroup/Instances/FreeAbGroup.agda b/Cubical/Algebra/AbGroup/Instances/FreeAbGroup.agda index a72ba69860..28816e3d3f 100644 --- a/Cubical/Algebra/AbGroup/Instances/FreeAbGroup.agda +++ b/Cubical/Algebra/AbGroup/Instances/FreeAbGroup.agda @@ -12,7 +12,7 @@ open import Cubical.Data.Nat hiding (_·_) renaming (_+_ to _+ℕ_) open import Cubical.Data.Nat.Order open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Int renaming (_·_ to _·ℤ_ ; -_ to -ℤ_) -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin hiding (_/_) open import Cubical.Data.Empty as ⊥ open import Cubical.HITs.FreeAbGroup @@ -82,12 +82,12 @@ module _ {A : Type ℓ} where AbelienizeFreeGroup→FreeAbGroup .fst Iso.inv (fst GroupIso-AbelienizeFreeGroup→FreeAbGroup) = FreeAbGroup→AbelienizeFreeGroup .fst - Iso.rightInv (fst GroupIso-AbelienizeFreeGroup→FreeAbGroup) x i = + Iso.sec (fst GroupIso-AbelienizeFreeGroup→FreeAbGroup) x i = FAGAbGroupGroupHom≡ (compGroupHom FreeAbGroup→AbelienizeFreeGroup AbelienizeFreeGroup→FreeAbGroup) idGroupHom (λ _ → refl) i .fst x - Iso.leftInv (fst GroupIso-AbelienizeFreeGroup→FreeAbGroup) = + Iso.ret (fst GroupIso-AbelienizeFreeGroup→FreeAbGroup) = Abi.elimProp _ (λ _ → isset _ _) (funExt⁻ (cong fst (freeGroupHom≡ {f = compGroupHom freeGroup→freeAbGroup FreeAbGroup→AbelienizeFreeGroup} @@ -287,7 +287,7 @@ sumFinℤFinGenerator≡1 (suc n) = elimFin (basec n) indstep where - basec : (n : ℕ) → sumFinGen _·_ ε (λ x → ·Free (ℤFinGenerator (flast {m = n}) x) x) ≡ ⟦ flast ⟧ + basec : (n : ℕ) → sumFinGen _·_ ε (λ x → ·Free (ℤFinGenerator (flast {n}) x) x) ≡ ⟦ flast ⟧ basec n with (n ≟ᵗ n) ... | lt x = ⊥.rec (¬m<ᵗm x) ... | eq x = ((λ i → identityᵣ ⟦ flast ⟧ i @@ -387,8 +387,8 @@ Free→ℤFin→Free (suc n) = Iso-ℤFin-FreeAbGroup : (n : ℕ) → Iso (ℤ[Fin n ] .fst) (FAGAbGroup {A = Fin n} .fst) Iso.fun (Iso-ℤFin-FreeAbGroup n) = ℤFin→Free n Iso.inv (Iso-ℤFin-FreeAbGroup n) = Free→ℤFin n -Iso.rightInv (Iso-ℤFin-FreeAbGroup n) = ℤFin→Free→ℤFin n -Iso.leftInv (Iso-ℤFin-FreeAbGroup n) = Free→ℤFin→Free n +Iso.sec (Iso-ℤFin-FreeAbGroup n) = ℤFin→Free→ℤFin n +Iso.ret (Iso-ℤFin-FreeAbGroup n) = Free→ℤFin→Free n ℤFin≅FreeAbGroup : (n : ℕ) → AbGroupIso (ℤ[Fin n ]) (FAGAbGroup {A = Fin n}) fst (ℤFin≅FreeAbGroup n) = Iso-ℤFin-FreeAbGroup n @@ -404,7 +404,7 @@ elimPropℤFin : ∀ {ℓ} (n : ℕ) → ((f : _) → A f → A (-ℤ_ ∘ f)) → (x : _) → A x elimPropℤFin n A pr z t s u w = - subst A (Iso.leftInv (Iso-ℤFin-FreeAbGroup n) w) (help (ℤFin→Free n w)) + subst A (Iso.ret (Iso-ℤFin-FreeAbGroup n) w) (help (ℤFin→Free n w)) where help : (x : _) → A (Free→ℤFin n x) help = ElimProp.f (pr _) t z diff --git a/Cubical/Algebra/AbGroup/Instances/IntMod.agda b/Cubical/Algebra/AbGroup/Instances/IntMod.agda index 553a3a2f1b..d102b3199c 100644 --- a/Cubical/Algebra/AbGroup/Instances/IntMod.agda +++ b/Cubical/Algebra/AbGroup/Instances/IntMod.agda @@ -17,6 +17,7 @@ open import Cubical.Algebra.Group.ZAction open import Cubical.Data.Empty as ⊥ open import Cubical.Data.Nat renaming (_+_ to _+ℕ_ ; _·_ to _·ℕ_) open import Cubical.Data.Nat.Order +open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Int renaming (_+_ to _+ℤ_ ; _·_ to _·ℤ_ ; -_ to -ℤ_) open import Cubical.Data.Fin @@ -44,32 +45,32 @@ Iso.inv (fst ℤ/2[2]≅ℤ/2) x = x , cong (x +ₘ_) (+ₘ-rUnit x) ∙ x+x x where x+x : (x : ℤ/2 .fst) → x +ₘ x ≡ fzero x+x = ℤ/2-elim refl refl -Iso.rightInv (fst ℤ/2[2]≅ℤ/2) x = Σ≡Prop (λ _ → isProp≤) refl -Iso.leftInv (fst ℤ/2[2]≅ℤ/2) x = Σ≡Prop (λ _ → isSetFin _ _) refl +Iso.sec (fst ℤ/2[2]≅ℤ/2) x = Σ≡Prop (λ z → isProp<ᵗ {z} {m = 2}) refl +Iso.ret (fst ℤ/2[2]≅ℤ/2) x = Σ≡Prop (λ _ → isSetFin {k = 2} _ _) refl snd ℤ/2[2]≅ℤ/2 = makeIsGroupHom λ _ _ → refl ℤ/2/2≅ℤ/2 : AbGroupIso (ℤ/2 /^ 2) ℤ/2 Iso.fun (fst ℤ/2/2≅ℤ/2) = - SQ.rec isSetFin (λ x → x) lem + SQ.rec (isSetFin {k = 2}) (λ x → x) lem where lem : _ lem = ℤ/2-elim (ℤ/2-elim (λ _ → refl) - (PT.rec (isSetFin _ _) + (PT.rec (isSetFin {k = 2} _ _) (uncurry (ℤ/2-elim (λ p → ⊥.rec (snotz (sym (cong fst p)))) λ p → ⊥.rec (snotz (sym (cong fst p))))))) - (ℤ/2-elim (PT.rec (isSetFin _ _) + (ℤ/2-elim (PT.rec (isSetFin {k = 2} _ _) (uncurry (ℤ/2-elim (λ p → ⊥.rec (snotz (sym (cong fst p)))) λ p → ⊥.rec (snotz (sym (cong fst p)))))) λ _ → refl) Iso.inv (fst ℤ/2/2≅ℤ/2) = [_] -Iso.rightInv (fst ℤ/2/2≅ℤ/2) _ = refl -Iso.leftInv (fst ℤ/2/2≅ℤ/2) = +Iso.sec (fst ℤ/2/2≅ℤ/2) _ = refl +Iso.ret (fst ℤ/2/2≅ℤ/2) = SQ.elimProp (λ _ → squash/ _ _) λ _ → refl snd ℤ/2/2≅ℤ/2 = makeIsGroupHom - (SQ.elimProp (λ _ → isPropΠ λ _ → isSetFin _ _) - λ a → SQ.elimProp (λ _ → isSetFin _ _) λ b → refl) + (SQ.elimProp (λ _ → isPropΠ λ _ → isSetFin {k = 2} _ _) + λ a → SQ.elimProp (λ _ → isSetFin {k = 2} _ _) λ b → refl) ℤTorsion : (n : ℕ) → isContr (fst (ℤAbGroup [ (suc n) ]ₜ)) fst (ℤTorsion n) = AbGroupStr.0g (snd (ℤAbGroup [ (suc n) ]ₜ)) diff --git a/Cubical/Algebra/AbGroup/Properties.agda b/Cubical/Algebra/AbGroup/Properties.agda index 6feb7ca2c4..645031d500 100644 --- a/Cubical/Algebra/AbGroup/Properties.agda +++ b/Cubical/Algebra/AbGroup/Properties.agda @@ -16,7 +16,7 @@ open import Cubical.HITs.SetQuotients as SQ hiding (_/_) open import Cubical.Data.Int using (ℤ ; pos ; negsuc) open import Cubical.Data.Nat hiding (_+_) open import Cubical.Data.Sigma -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin hiding (_/_) private variable ℓ ℓ' : Level diff --git a/Cubical/Algebra/AbGroup/TensorProduct.agda b/Cubical/Algebra/AbGroup/TensorProduct.agda index c4a16b3a49..6ed18b481b 100644 --- a/Cubical/Algebra/AbGroup/TensorProduct.agda +++ b/Cubical/Algebra/AbGroup/TensorProduct.agda @@ -360,9 +360,9 @@ module UP (AGr : AbGroup ℓ) (BGr : AbGroup ℓ') where (GroupHom (AGr *) (HomGroup (BGr *) C *)) Iso.fun mainIso = _ Iso.inv mainIso = invF - Iso.rightInv mainIso (f , p) = Σ≡Prop (λ _ → isPropIsGroupHom _ _) + Iso.sec mainIso (f , p) = Σ≡Prop (λ _ → isPropIsGroupHom _ _) (funExt λ a → Σ≡Prop (λ _ → isPropIsGroupHom _ _) refl) - Iso.leftInv mainIso (f , p) = + Iso.ret mainIso (f , p) = Σ≡Prop (λ _ → isPropIsGroupHom _ _) (funExt (⊗elimProp (λ _ → is-set (snd C) _ _) (λ _ _ → refl) @@ -407,8 +407,8 @@ commFun²≡id = ⊗elimProp (λ _ → ⊗squash _ _) → GroupIso ((A ⨂ B) *) ((B ⨂ A) *) Iso.fun (fst ⨂-commIso) = commFun Iso.inv (fst ⨂-commIso) = commFun -Iso.rightInv (fst ⨂-commIso) = commFun²≡id -Iso.leftInv (fst ⨂-commIso) = commFun²≡id +Iso.sec (fst ⨂-commIso) = commFun²≡id +Iso.ret (fst ⨂-commIso) = commFun²≡id snd ⨂-commIso = makeIsGroupHom λ x y → refl ⨂-comm : ∀ {ℓ ℓ'} {A : AbGroup ℓ} {B : AbGroup ℓ'} → AbGroupEquiv (A ⨂ B) (B ⨂ A) @@ -478,7 +478,7 @@ module _ {ℓ ℓ' ℓ'' : Level} {A : AbGroup ℓ} {B : AbGroup ℓ'} {C : AbGr ⨂assocIso : Iso (A ⨂₁ (B ⨂ C)) ((A ⨂ B) ⨂₁ C) Iso.fun ⨂assocIso = fst assocHom⁻ Iso.inv ⨂assocIso = fst assocHom - Iso.rightInv ⨂assocIso = + Iso.sec ⨂assocIso = ⊗elimProp (λ _ → ⊗squash _ _) (⊗elimProp (λ _ → isPropΠ (λ _ → ⊗squash _ _)) (λ a b c → refl) @@ -487,7 +487,7 @@ module _ {ℓ ℓ' ℓ'' : Level} {A : AbGroup ℓ} {B : AbGroup ℓ'} {C : AbGr λ x y p q → cong (fst assocHom⁻) (IsGroupHom.pres· (snd assocHom) x y) ∙∙ IsGroupHom.pres· (snd assocHom⁻) (fst assocHom x) (fst assocHom y) ∙∙ cong₂ _+⊗_ p q - Iso.leftInv ⨂assocIso = + Iso.ret ⨂assocIso = ⊗elimProp (λ _ → ⊗squash _ _) (λ a → ⊗elimProp (λ _ → ⊗squash _ _) (λ b c → refl) diff --git a/Cubical/Algebra/Algebra/Properties.agda b/Cubical/Algebra/Algebra/Properties.agda index afffe58e41..d5cee5e119 100644 --- a/Cubical/Algebra/Algebra/Properties.agda +++ b/Cubical/Algebra/Algebra/Properties.agda @@ -174,14 +174,14 @@ module AlgebraEquivs where isoOnHoms : Iso (AlgebraHom B C) (AlgebraHom A C) fun isoOnHoms g = g ∘a AlgebraEquiv→AlgebraHom f inv isoOnHoms h = h ∘a AlgebraEquiv→AlgebraHom f⁻¹ - rightInv isoOnHoms h = + sec isoOnHoms h = Σ≡Prop (λ h → isPropIsAlgebraHom _ (A .snd) h (C .snd)) - (isoOnTypes .rightInv (h .fst)) - leftInv isoOnHoms g = + (isoOnTypes .sec (h .fst)) + ret isoOnHoms g = Σ≡Prop (λ g → isPropIsAlgebraHom _ (B .snd) g (C .snd)) - (isoOnTypes .leftInv (g .fst)) + (isoOnTypes .ret (g .fst)) isSetAlgebraStr : (A : Type ℓ') → isSet (AlgebraStr R A) isSetAlgebraStr A = diff --git a/Cubical/Algebra/ChainComplex/Finite.agda b/Cubical/Algebra/ChainComplex/Finite.agda index 897e9f7605..28838af26c 100644 --- a/Cubical/Algebra/ChainComplex/Finite.agda +++ b/Cubical/Algebra/ChainComplex/Finite.agda @@ -17,7 +17,7 @@ open import Cubical.Foundations.Equiv open import Cubical.Data.Sigma open import Cubical.Data.Nat -open import Cubical.Data.Fin.Inductive.Base +open import Cubical.Data.Fin.Base open import Cubical.Algebra.ChainComplex.Base open import Cubical.Algebra.Group.MorphismProperties diff --git a/Cubical/Algebra/ChainComplex/Homology.agda b/Cubical/Algebra/ChainComplex/Homology.agda index 40ec460b66..a86da3feb7 100644 --- a/Cubical/Algebra/ChainComplex/Homology.agda +++ b/Cubical/Algebra/ChainComplex/Homology.agda @@ -9,7 +9,7 @@ open import Cubical.Foundations.Equiv open import Cubical.Data.Sigma open import Cubical.Data.Nat -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin hiding (_/_) open import Cubical.Data.Nat.Order.Inductive open import Cubical.Algebra.Group @@ -136,7 +136,7 @@ module _ where finChainComplexMap→HomologyMap m f n .fst Iso.inv (fst (finChainComplexEquiv→HomoglogyIso m f n)) = finChainComplexMap→HomologyMap m (invFinChainMap f) n .fst - Iso.rightInv (fst (finChainComplexEquiv→HomoglogyIso m (f , eqs) n)) = + Iso.sec (fst (finChainComplexEquiv→HomoglogyIso m (f , eqs) n)) = funExt⁻ (cong fst (sym (finChainComplexMap→HomologyMapComp (invFinChainMap (f , eqs)) f n)) ∙∙ cong (λ f → fst (finChainComplexMap→HomologyMap m f n)) @@ -144,7 +144,7 @@ module _ where → Σ≡Prop (λ _ → isPropIsGroupHom _ _) (funExt (secEq (_ , eqs r)))) ∙∙ cong fst (finChainComplexMap→HomologyMapId n)) - Iso.leftInv (fst (finChainComplexEquiv→HomoglogyIso m (f , eqs) n)) = + Iso.ret (fst (finChainComplexEquiv→HomoglogyIso m (f , eqs) n)) = funExt⁻ (cong fst (sym (finChainComplexMap→HomologyMapComp f (invFinChainMap (f , eqs)) n)) ∙∙ cong (λ f → fst (finChainComplexMap→HomologyMap m f n)) @@ -264,7 +264,7 @@ module _ where chainComplexMap→HomologyMap f n .fst Iso.inv (fst (chainComplexEquiv→HomoglogyIso (f , eqs) n)) = chainComplexMap→HomologyMap (invChainMap (f , eqs)) n .fst - Iso.rightInv (fst (chainComplexEquiv→HomoglogyIso (f , eqs) n)) = + Iso.sec (fst (chainComplexEquiv→HomoglogyIso (f , eqs) n)) = funExt⁻ (cong fst (sym (chainComplexMap→HomologyMapComp (invChainMap (f , eqs)) f n)) ∙∙ cong (λ f → fst (chainComplexMap→HomologyMap f n)) @@ -273,7 +273,7 @@ module _ where (funExt (secEq (_ , eqs r)))) ∙∙ cong fst (chainComplexMap→HomologyMapId n)) - Iso.leftInv (fst (chainComplexEquiv→HomoglogyIso (f , eqs) n)) = + Iso.ret (fst (chainComplexEquiv→HomoglogyIso (f , eqs) n)) = funExt⁻ (cong fst (sym (chainComplexMap→HomologyMapComp f (invChainMap (f , eqs)) n)) ∙∙ cong (λ f → fst (chainComplexMap→HomologyMap f n)) @@ -323,10 +323,10 @@ homologyIso n C D chEq₂ chEq₁ chEq₀ eq1 eq2 = main-iso (PT.map (λ {(s , t) → (Iso.inv (chEq₂ .fst) s) , Σ≡Prop (λ _ → AbGroupStr.is-set (snd (chain C n)) _ _) - (sym (Iso.leftInv (chEq₁ .fst) _) + (sym (Iso.ret (chEq₁ .fst) _) ∙ cong (Iso.inv (chEq₁ .fst)) (funExt⁻ eq2 (Iso.inv (chEq₂ .fst) s)) ∙ cong (Iso.inv (chEq₁ .fst) ∘ bdry D (suc n) .fst) - (Iso.rightInv (chEq₂ .fst) s) + (Iso.sec (chEq₂ .fst) s) ∙ cong (Iso.inv (chEq₁ .fst)) (cong fst t) ∙ IsGroupHom.pres· (invGroupIso chEq₁ .snd) _ _ ∙ cong₂ (snd (chain C (suc n) ) .AbGroupStr._+_) @@ -335,10 +335,10 @@ homologyIso n C D chEq₂ chEq₁ chEq₀ eq1 eq2 = main-iso where g : _ → homology n C .fst g (a , b) = [ Iso.inv (fst chEq₁) a - , sym (Iso.leftInv (chEq₀ .fst) _) + , sym (Iso.ret (chEq₀ .fst) _) ∙ cong (Iso.inv (chEq₀ .fst)) (funExt⁻ eq1 (Iso.inv (chEq₁ .fst) a)) ∙ cong (Iso.inv (chEq₀ .fst) ∘ bdry D n .fst) - (Iso.rightInv (chEq₁ .fst) a) + (Iso.sec (chEq₁ .fst) a) ∙ cong (Iso.inv (chEq₀ .fst)) b ∙ IsGroupHom.pres1 (invGroupIso chEq₀ .snd) ] @@ -354,16 +354,16 @@ homologyIso n C D chEq₂ chEq₁ chEq₀ eq1 eq2 = main-iso main-iso : GroupIso (homology n C) (homology n D) Iso.fun (fst main-iso) = F Iso.inv (fst main-iso) = G - Iso.rightInv (fst main-iso) = + Iso.sec (fst main-iso) = elimProp (λ _ → GroupStr.is-set (homology n D .snd) _ _) λ{(a , b) → cong [_] (Σ≡Prop (λ _ → AbGroupStr.is-set (snd (chain D n)) _ _) - (Iso.rightInv (fst chEq₁) a))} - Iso.leftInv (fst main-iso) = + (Iso.sec (fst chEq₁) a))} + Iso.ret (fst main-iso) = elimProp (λ _ → GroupStr.is-set (homology n C .snd) _ _) λ{(a , b) → cong [_] (Σ≡Prop (λ _ → AbGroupStr.is-set (snd (chain C n)) _ _) - (Iso.leftInv (fst chEq₁) a))} + (Iso.ret (fst chEq₁) a))} snd main-iso = F-hom diff --git a/Cubical/Algebra/CommAlgebra/AsModule/FreeCommAlgebra/OnCoproduct.agda b/Cubical/Algebra/CommAlgebra/AsModule/FreeCommAlgebra/OnCoproduct.agda index 9bf3284da6..43b1dec96b 100644 --- a/Cubical/Algebra/CommAlgebra/AsModule/FreeCommAlgebra/OnCoproduct.agda +++ b/Cubical/Algebra/CommAlgebra/AsModule/FreeCommAlgebra/OnCoproduct.agda @@ -98,7 +98,7 @@ module CalculateFreeCommAlgebraOnCoproduct (R : CommRing ℓ) (I J : Type ℓ) w ≡ Iso.inv isoR (CommAlgebra→CommRing (R [ I ⊎ J ]) , baseRingHom) step1 i = Iso.inv isoR ((CommAlgebra→CommRing R[I⊎J]overR[I]) , ≡RingHoms i) - step2 = Iso.leftInv isoR (R [ I ⊎ J ]) + step2 = Iso.ret isoR (R [ I ⊎ J ]) fst≡R[I⊎J] : cong fst ≡R[I⊎J] ≡ refl fst≡R[I⊎J] = diff --git a/Cubical/Algebra/CommAlgebra/AsModule/FreeCommAlgebra/Properties.agda b/Cubical/Algebra/CommAlgebra/AsModule/FreeCommAlgebra/Properties.agda index 3d65252918..59beacc20a 100644 --- a/Cubical/Algebra/CommAlgebra/AsModule/FreeCommAlgebra/Properties.agda +++ b/Cubical/Algebra/CommAlgebra/AsModule/FreeCommAlgebra/Properties.agda @@ -278,8 +278,8 @@ homMapIso : {R : CommRing ℓ} {I : Type ℓ''} (A : CommAlgebra R ℓ') → Iso (CommAlgebraHom (R [ I ]) A) (I → (fst A)) Iso.fun (homMapIso A) = evaluateAt A Iso.inv (homMapIso A) = inducedHom A -Iso.rightInv (homMapIso A) = λ ϕ → Theory.mapRetrievable A ϕ -Iso.leftInv (homMapIso {R = R} {I = I} A) = +Iso.sec (homMapIso A) = λ ϕ → Theory.mapRetrievable A ϕ +Iso.ret (homMapIso {R = R} {I = I} A) = λ f → Σ≡Prop (λ f → isPropIsCommAlgebraHom {M = R [ I ]} {N = A} f) (Theory.homRetrievable A f) @@ -344,7 +344,7 @@ module _ {R : CommRing ℓ} {A B : CommAlgebra R ℓ''} where natIndHomR ψ ϕ = isoFunInjective (homMapIso B) _ _ (evaluateAt B (ψ ∘a (inducedHom A ϕ)) ≡⟨ refl ⟩ fst ψ ∘ evaluateAt A (inducedHom A ϕ) ≡⟨ refl ⟩ - fst ψ ∘ ϕ ≡⟨ Iso.rightInv (homMapIso B) _ ⟩ + fst ψ ∘ ϕ ≡⟨ Iso.sec (homMapIso B) _ ⟩ evaluateAt B (inducedHom B (fst ψ ∘ ϕ)) ∎) {- diff --git a/Cubical/Algebra/CommAlgebra/AsModule/Instances/Initial.agda b/Cubical/Algebra/CommAlgebra/AsModule/Instances/Initial.agda index faec0afea0..e6d592e908 100644 --- a/Cubical/Algebra/CommAlgebra/AsModule/Instances/Initial.agda +++ b/Cubical/Algebra/CommAlgebra/AsModule/Instances/Initial.agda @@ -117,12 +117,12 @@ module _ (R : CommRing ℓ) where asIso : Iso (fst A) (fst initialCAlg) Iso.fun asIso = fst to Iso.inv asIso = fst from - Iso.rightInv asIso = + Iso.sec asIso = λ x i → cong fst (isContr→isProp (initialityContr initialCAlg) (to ∘a from) (idCAlgHom initialCAlg)) i x - Iso.leftInv asIso = + Iso.ret asIso = λ x i → cong fst (isContr→isProp (isInitial A) (from ∘a to) (idCAlgHom A)) diff --git a/Cubical/Algebra/CommAlgebra/AsModule/Localisation.agda b/Cubical/Algebra/CommAlgebra/AsModule/Localisation.agda index e03f20fc9d..f43795f8f1 100644 --- a/Cubical/Algebra/CommAlgebra/AsModule/Localisation.agda +++ b/Cubical/Algebra/CommAlgebra/AsModule/Localisation.agda @@ -211,8 +211,8 @@ module AlgLocTwoSubsets (R' : CommRing ℓ) IsoS₁⁻¹RS₂⁻¹R : Iso S₁⁻¹R S₂⁻¹R Iso.fun IsoS₁⁻¹RS₂⁻¹R = fst χ₁ Iso.inv IsoS₁⁻¹RS₂⁻¹R = fst χ₂ - Iso.rightInv IsoS₁⁻¹RS₂⁻¹R = funExt⁻ (cong fst χ₁∘χ₂≡id) - Iso.leftInv IsoS₁⁻¹RS₂⁻¹R = funExt⁻ (cong fst χ₂∘χ₁≡id) + Iso.sec IsoS₁⁻¹RS₂⁻¹R = funExt⁻ (cong fst χ₁∘χ₂≡id) + Iso.ret IsoS₁⁻¹RS₂⁻¹R = funExt⁻ (cong fst χ₂∘χ₁≡id) isContrS₁⁻¹R≅S₂⁻¹R : isContr (CommAlgebraEquiv S₁⁻¹RAsCommAlg S₂⁻¹RAsCommAlg) isContrS₁⁻¹R≅S₂⁻¹R = center , uniqueness diff --git a/Cubical/Algebra/CommAlgebra/AsModule/Properties.agda b/Cubical/Algebra/CommAlgebra/AsModule/Properties.agda index 0d5a3f0720..bc9332c4c6 100644 --- a/Cubical/Algebra/CommAlgebra/AsModule/Properties.agda +++ b/Cubical/Algebra/CommAlgebra/AsModule/Properties.agda @@ -139,8 +139,8 @@ module CommAlgChar (R : CommRing ℓ) {ℓ' : Level} where CommAlgIso : Iso (CommAlgebra R ℓ') CommRingWithHom fun CommAlgIso = fromCommAlg inv CommAlgIso = toCommAlg - rightInv CommAlgIso = CommRingWithHomRoundTrip - leftInv CommAlgIso = CommAlgRoundTrip + sec CommAlgIso = CommRingWithHomRoundTrip + ret CommAlgIso = CommAlgRoundTrip open IsCommRingHom @@ -301,8 +301,8 @@ contrCommAlgebraHom→contrCommAlgebraEquiv σ contrHom x y = σEquiv , σIso : Iso ⟨ σ x ⟩ ⟨ σ y ⟩ fun σIso = fst χ₁ inv σIso = fst χ₂ - rightInv σIso = funExt⁻ (cong fst χ₁∘χ₂≡id) - leftInv σIso = funExt⁻ (cong fst χ₂∘χ₁≡id) + sec σIso = funExt⁻ (cong fst χ₁∘χ₂≡id) + ret σIso = funExt⁻ (cong fst χ₂∘χ₁≡id) σEquiv : CommAlgebraEquiv (σ x) (σ y) fst σEquiv = isoToEquiv σIso diff --git a/Cubical/Algebra/CommAlgebra/Instances/Initial.agda b/Cubical/Algebra/CommAlgebra/Instances/Initial.agda index 65b7141d3b..6cedb63285 100644 --- a/Cubical/Algebra/CommAlgebra/Instances/Initial.agda +++ b/Cubical/Algebra/CommAlgebra/Instances/Initial.agda @@ -80,12 +80,12 @@ module _ (R : CommRing ℓ) where asIso : Iso ⟨ A ⟩ₐ ⟨ initialCAlg ⟩ₐ Iso.fun asIso = fst to Iso.inv asIso = fst from - Iso.rightInv asIso = + Iso.sec asIso = λ x i → cong fst (isContr→isProp (initialityContr initialCAlg) (to ∘ca from) (idCAlgHom initialCAlg)) i x - Iso.leftInv asIso = + Iso.ret asIso = λ x i → cong fst (isContr→isProp (isInitial A) (from ∘ca to) (idCAlgHom A)) diff --git a/Cubical/Algebra/CommAlgebra/Localisation.agda b/Cubical/Algebra/CommAlgebra/Localisation.agda index b49b0f93dc..8d475a1181 100644 --- a/Cubical/Algebra/CommAlgebra/Localisation.agda +++ b/Cubical/Algebra/CommAlgebra/Localisation.agda @@ -204,8 +204,8 @@ module AlgLocTwoSubsets (R' : CommRing ℓ) IsoS₁⁻¹RS₂⁻¹R : Iso S₁⁻¹R S₂⁻¹R Iso.fun IsoS₁⁻¹RS₂⁻¹R = ⟨ χ₁ ⟩ₐ→ Iso.inv IsoS₁⁻¹RS₂⁻¹R = ⟨ χ₂ ⟩ₐ→ - Iso.rightInv IsoS₁⁻¹RS₂⁻¹R = funExt⁻ (cong ⟨_⟩ₐ→ χ₁∘χ₂≡id) - Iso.leftInv IsoS₁⁻¹RS₂⁻¹R = funExt⁻ (cong ⟨_⟩ₐ→ χ₂∘χ₁≡id) + Iso.sec IsoS₁⁻¹RS₂⁻¹R = funExt⁻ (cong ⟨_⟩ₐ→ χ₁∘χ₂≡id) + Iso.ret IsoS₁⁻¹RS₂⁻¹R = funExt⁻ (cong ⟨_⟩ₐ→ χ₂∘χ₁≡id) isContrS₁⁻¹R≅S₂⁻¹R : isContr (CommAlgebraEquiv S₁⁻¹RAsCommAlg S₂⁻¹RAsCommAlg) isContrS₁⁻¹R≅S₂⁻¹R = center , uniqueness diff --git a/Cubical/Algebra/CommAlgebra/Polynomials.agda b/Cubical/Algebra/CommAlgebra/Polynomials.agda index 15f3b8398f..5ccb35047c 100644 --- a/Cubical/Algebra/CommAlgebra/Polynomials.agda +++ b/Cubical/Algebra/CommAlgebra/Polynomials.agda @@ -59,8 +59,8 @@ homMapIso : {R : CommRing ℓ} {I : Type ℓ''} (A : CommAlgebra R ℓ') → Iso (CommAlgebraHom (R [ I ]) A) (I → (fst A)) Iso.fun (homMapIso A) = evaluateAt A Iso.inv (homMapIso A) = inducedHom A -Iso.rightInv (homMapIso A) = λ ϕ → Theory.mapRetrievable A ϕ -Iso.leftInv (homMapIso {R = R} {I = I} A) = +Iso.sec (homMapIso A) = λ ϕ → Theory.mapRetrievable A ϕ +Iso.ret (homMapIso {R = R} {I = I} A) = λ f → Σ≡Prop (λ f → isPropIsCommAlgebraHom {M = R [ I ]} {N = A} f) (Theory.homRetrievable A f) @@ -125,7 +125,7 @@ module _ {R : CommRing ℓ} {A B : CommAlgebra R ℓ''} where natIndHomR ψ ϕ = isoFunInjective (homMapIso B) _ _ (evaluateAt B (ψ ∘a (inducedHom A ϕ)) ≡⟨ refl ⟩ fst ψ ∘ evaluateAt A (inducedHom A ϕ) ≡⟨ refl ⟩ - fst ψ ∘ ϕ ≡⟨ Iso.rightInv (homMapIso B) _ ⟩ + fst ψ ∘ ϕ ≡⟨ Iso.sec (homMapIso B) _ ⟩ evaluateAt B (inducedHom B (fst ψ ∘ ϕ)) ∎) {- diff --git a/Cubical/Algebra/CommRing/Properties.agda b/Cubical/Algebra/CommRing/Properties.agda index f8eaed91b0..e96539b4ca 100644 --- a/Cubical/Algebra/CommRing/Properties.agda +++ b/Cubical/Algebra/CommRing/Properties.agda @@ -185,7 +185,7 @@ module _ where injCommRingIso : {R : CommRing ℓ} {S : CommRing ℓ'} (f : CommRingIso R S) → (x y : R .fst) → f .fst .fun x ≡ f .fst .fun y → x ≡ y - injCommRingIso f x y h = sym (f .fst .leftInv x) ∙∙ cong (f .fst .inv) h ∙∙ f .fst .leftInv y + injCommRingIso f x y h = sym (f .fst .ret x) ∙∙ cong (f .fst .inv) h ∙∙ f .fst .ret y module _ where open RingEquivs @@ -342,8 +342,8 @@ module CommRingUAFunctoriality where , commringstr (q0 i) (q1 i) (r+ i) (r· i) (s i) (t i) inv theIso x = cong ⟨_⟩ x , cong (0r ∘ snd) x , cong (1r ∘ snd) x , cong (_+_ ∘ snd) x , cong (_·_ ∘ snd) x , cong (-_ ∘ snd) x , cong (isCommRing ∘ snd) x - rightInv theIso _ = refl - leftInv theIso _ = refl + sec theIso _ = refl + ret theIso _ = refl caracCommRing≡ : {A B : CommRing ℓ} (p q : A ≡ B) → cong ⟨_⟩ p ≡ cong ⟨_⟩ q → p ≡ q caracCommRing≡ {A = A} {B = B} p q P = diff --git a/Cubical/Algebra/CommRing/Univalence.agda b/Cubical/Algebra/CommRing/Univalence.agda index 39c86f2c40..70f0d0de1f 100644 --- a/Cubical/Algebra/CommRing/Univalence.agda +++ b/Cubical/Algebra/CommRing/Univalence.agda @@ -58,16 +58,16 @@ fst (fun (CommRingEquivIsoCommRingIso R S) e) = equivToIso (e .fst) snd (fun (CommRingEquivIsoCommRingIso R S) e) = e .snd fst (inv (CommRingEquivIsoCommRingIso R S) e) = isoToEquiv (e .fst) snd (inv (CommRingEquivIsoCommRingIso R S) e) = e .snd -rightInv (CommRingEquivIsoCommRingIso R S) (e , he) = +sec (CommRingEquivIsoCommRingIso R S) (e , he) = Σ≡Prop (λ e → isPropIsCommRingHom (snd R) (e .fun) (snd S)) rem where rem : equivToIso (isoToEquiv e) ≡ e fun (rem i) x = fun e x inv (rem i) x = inv e x - rightInv (rem i) b j = CommRingStr.is-set (snd S) (fun e (inv e b)) b (rightInv e b) (rightInv e b) i j - leftInv (rem i) a j = CommRingStr.is-set (snd R) (inv e (fun e a)) a (retEq (isoToEquiv e) a) (leftInv e a) i j -leftInv (CommRingEquivIsoCommRingIso R S) e = + sec (rem i) b j = CommRingStr.is-set (snd S) (fun e (inv e b)) b (sec e b) (sec e b) i j + ret (rem i) a j = CommRingStr.is-set (snd R) (inv e (fun e a)) a (retEq (isoToEquiv e) a) (ret e a) i j +ret (CommRingEquivIsoCommRingIso R S) e = Σ≡Prop (λ e → isPropIsCommRingHom (snd R) (e .fst) (snd S)) (equivEq refl) diff --git a/Cubical/Algebra/DirectSum/Equiv-DSHIT-DSFun.agda b/Cubical/Algebra/DirectSum/Equiv-DSHIT-DSFun.agda index 5b3f3c3351..a356768911 100644 --- a/Cubical/Algebra/DirectSum/Equiv-DSHIT-DSFun.agda +++ b/Cubical/Algebra/DirectSum/Equiv-DSHIT-DSFun.agda @@ -416,6 +416,6 @@ module _ is : Iso (⊕HIT ℕ G Gstr) (⊕Fun G Gstr) fun is = ⊕HIT→⊕Fun Iso.inv is = ⊕Fun→⊕HIT - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd Equiv-DirectSum = makeIsGroupHom ⊕HIT→⊕Fun-pres+ diff --git a/Cubical/Algebra/GradedRing/Instances/TrivialGradedRing.agda b/Cubical/Algebra/GradedRing/Instances/TrivialGradedRing.agda index dfa052a335..a9a76662b7 100644 --- a/Cubical/Algebra/GradedRing/Instances/TrivialGradedRing.agda +++ b/Cubical/Algebra/GradedRing/Instances/TrivialGradedRing.agda @@ -101,11 +101,11 @@ module _ inv is = DS-Rec-Set.f _ _ _ _ is-set 0r (λ {zero a → a ; (suc k) a → 0r }) _+_ +Assoc +IdR +Comm (λ { zero → refl ; (suc k) → refl}) (λ {zero a b → refl ; (suc n) a b → +IdR _}) - rightInv is = DS-Ind-Prop.f _ _ _ _ (λ _ → trunc _ _) + sec is = DS-Ind-Prop.f _ _ _ _ (λ _ → trunc _ _) (base-neutral _) (λ { zero a → refl ; (suc k) a → base-neutral _ ∙ sym (base-neutral _)} ) λ {U V} ind-U ind-V → sym (base-add _ _ _) ∙ cong₂ _add_ ind-U ind-V - leftInv is = λ _ → refl + ret is = λ _ → refl snd equivRing = makeIsRingHom -- issue agda have trouble infering the Idx, G, Gstr {R = ARing} diff --git a/Cubical/Algebra/Group/Abelianization/AbelianizationAsCoeq.agda b/Cubical/Algebra/Group/Abelianization/AbelianizationAsCoeq.agda index f07b624f32..0910e97b7d 100644 --- a/Cubical/Algebra/Group/Abelianization/AbelianizationAsCoeq.agda +++ b/Cubical/Algebra/Group/Abelianization/AbelianizationAsCoeq.agda @@ -367,7 +367,7 @@ module IsoCoeqHIT (G : Group ℓ) where where r : (x : fst asAbelianGroup) → fst (compGroupHom (GroupIso→GroupHom h) (GroupIso→GroupHom (invGroupIso h))) x ≡ x - r = λ x → (h .fst .Iso.leftInv) x + r = λ x → (h .fst .Iso.ret) x leftInvGroupHom : (compGroupHom (GroupIso→GroupHom h) diff --git a/Cubical/Algebra/Group/Abelianization/Properties.agda b/Cubical/Algebra/Group/Abelianization/Properties.agda index 75b7dcbef2..90106b993b 100644 --- a/Cubical/Algebra/Group/Abelianization/Properties.agda +++ b/Cubical/Algebra/Group/Abelianization/Properties.agda @@ -356,9 +356,9 @@ fst (AbelianizationEquiv {G = G} {H} ϕ) = isoToEquiv main main : Iso _ _ Iso.fun main = fst (AbelianizationFun (GroupEquiv→GroupHom ϕ)) Iso.inv main = fst (AbelianizationFun (GroupEquiv→GroupHom (invGroupEquiv ϕ))) - Iso.rightInv main = + Iso.sec main = elimProp _ (λ _ → isset _ _) λ g → cong η (secEq (fst ϕ) g) - Iso.leftInv main = + Iso.ret main = elimProp _ (λ _ → isset _ _) λ g → cong η (retEq (fst ϕ) g) snd (AbelianizationEquiv {G = G} {H} ϕ) = snd (AbelianizationFun (fst (fst ϕ) , snd ϕ)) @@ -370,8 +370,8 @@ Iso.inv (fst (AbelianizationIdempotent G)) = rec _ (AbGroupStr.is-set (snd G)) (λ x → x) λ a b c → cong (AbGroupStr._+_ (snd G) a) (AbGroupStr.+Comm (snd G) _ _) -Iso.rightInv (fst (AbelianizationIdempotent G)) = +Iso.sec (fst (AbelianizationIdempotent G)) = elimProp _ (λ _ → isset _ _) (λ _ → refl) -Iso.leftInv (fst (AbelianizationIdempotent G)) x = refl +Iso.ret (fst (AbelianizationIdempotent G)) x = refl snd (AbelianizationIdempotent G) = snd (AbelianizationGroupStructure.ηAsGroupHom _) diff --git a/Cubical/Algebra/Group/Base.agda b/Cubical/Algebra/Group/Base.agda index 7d855d8f01..c3caf9fb5f 100644 --- a/Cubical/Algebra/Group/Base.agda +++ b/Cubical/Algebra/Group/Base.agda @@ -8,7 +8,7 @@ open import Cubical.Foundations.Prelude open import Cubical.Foundations.Structure open import Cubical.Data.Sigma open import Cubical.Data.Nat using (ℕ) -open import Cubical.Data.Fin.Inductive.Base +open import Cubical.Data.Fin.Base open import Cubical.Algebra.Monoid open import Cubical.Algebra.Semigroup diff --git a/Cubical/Algebra/Group/Five.agda b/Cubical/Algebra/Group/Five.agda index 2ae7a590d4..2c75c0c33e 100644 --- a/Cubical/Algebra/Group/Five.agda +++ b/Cubical/Algebra/Group/Five.agda @@ -142,7 +142,7 @@ module _ d = pInv d' p[d]≡t[c'] : p .fun .fst d ≡ t .fst c' - p[d]≡t[c'] = Iso.rightInv pIso d' + p[d]≡t[c'] = Iso.sec pIso d' u[p[d]] : ⟨ E' ⟩ u[p[d]] = u .fst (p .fun .fst d) @@ -227,7 +227,7 @@ module _ b = mInv b' m[b]≡b' : m .fun .fst b ≡ b' - m[b]≡b' = Iso.rightInv mIso b' + m[b]≡b' = Iso.sec mIso b' s[m[b]]≡s[b'] : s .fst (m .fun .fst b) ≡ s .fst b' s[m[b]]≡s[b'] = cong (s .fst) m[b]≡b' diff --git a/Cubical/Algebra/Group/Free.agda b/Cubical/Algebra/Group/Free.agda index 2540e9ecbf..a85ceffd69 100644 --- a/Cubical/Algebra/Group/Free.agda +++ b/Cubical/Algebra/Group/Free.agda @@ -425,11 +425,11 @@ module NormalForm (A : Type ℓ) where η·iso : (Bool × A) → Iso (Σ [𝟚× A ] IsNormalised) (Σ [𝟚× A ] IsNormalised) Iso.fun (η·iso x) = nη· x Iso.inv (η·iso x) = nη· (not₁ x) - Iso.rightInv (η·iso x) b = + Iso.sec (η·iso x) b = Σ≡Prop isPropIsNormalised (funExt⁻ (cong η· (sym (not₁not₁ x)) ) (η· (not₁ x) (fst b)) ∙ sec-preη· (not₁ x) _ (HeadIsRedex? _) (HeadIsRedex? _) (snd b)) - Iso.leftInv (η·iso x) a = + Iso.ret (η·iso x) a = Σ≡Prop isPropIsNormalised (sec-preη· x _ (HeadIsRedex? _) (HeadIsRedex? _) (snd a)) @@ -461,9 +461,9 @@ module NormalForm (A : Type ℓ) where ∘S ⇊1g++comm a' (invLi b') ∘S ≡ε ∘S flip (·⁻¹≡ε-trans _ _ _) (·⁻¹≡ε-sym _ _ t') ∘S ·⁻¹≡ε-trans _ _ _ t - rightInv IsoNF = SQ.elimProp (λ _ → squash/ _ _) + sec IsoNF = SQ.elimProp (λ _ → squash/ _ _) (eq/ _ _ ∘ fst ∘ snd ∘ normalise) - leftInv IsoNF = Σ≡Prop isPropIsNormalised ∘ uncurry + ret IsoNF = Σ≡Prop isPropIsNormalised ∘ uncurry (Li.elim (λ _ → refl) λ f v → let lem : ∀ uu → preη· _ _ uu ≡ _ ∷ _ lem = diff --git a/Cubical/Algebra/Group/Instances/Bool.agda b/Cubical/Algebra/Group/Instances/Bool.agda index b65e48f670..fcbece1914 100644 --- a/Cubical/Algebra/Group/Instances/Bool.agda +++ b/Cubical/Algebra/Group/Instances/Bool.agda @@ -66,15 +66,15 @@ module _ {ℓ : Level} {A : Group ℓ} (e : Iso (fst A) Bool) where true→1 : Iso.fun IsoABool true ≡ 1g (snd A) true→1 with (Iso.fun e (1g (snd A))) ≟ true - ... | yes p = sym (cong (Iso.inv e) p) ∙ Iso.leftInv e _ + ... | yes p = sym (cong (Iso.inv e) p) ∙ Iso.ret e _ ... | no p = sym (cong (Iso.inv e) (¬true→false (Iso.fun e (1g (snd A))) p)) - ∙ Iso.leftInv e (1g (snd A)) + ∙ Iso.ret e (1g (snd A)) decA : (x : typ A) → (x ≡ 1g (snd A)) ⊎ (x ≡ Iso.fun IsoABool false) decA x with (Iso.inv IsoABool x) ≟ false | discreteA x (1g (snd A)) ... | yes p | yes q = inl q - ... | yes p | no q = inr (sym (Iso.rightInv IsoABool x) ∙ cong (Iso.fun (IsoABool)) p) - ... | no p | no q = inr (⊥.rec (q (sym (Iso.rightInv IsoABool x) + ... | yes p | no q = inr (sym (Iso.sec IsoABool x) ∙ cong (Iso.fun (IsoABool)) p) + ... | no p | no q = inr (⊥.rec (q (sym (Iso.sec IsoABool x) ∙∙ cong (Iso.fun IsoABool) (¬false→true _ p) ∙∙ true→1))) ... | no p | yes q = inl q diff --git a/Cubical/Algebra/Group/Instances/Fast/Int.agda b/Cubical/Algebra/Group/Instances/Fast/Int.agda index b1ad0290ad..60cdc00788 100644 --- a/Cubical/Algebra/Group/Instances/Fast/Int.agda +++ b/Cubical/Algebra/Group/Instances/Fast/Int.agda @@ -7,7 +7,7 @@ open import Cubical.Foundations.Function open import Cubical.Data.Fast.Int renaming (_+_ to _+ℤ_ ; _-_ to _-ℤ_ ; _·_ to _·ℤ_ ; -_ to -ℤ_) open import Cubical.Data.Nat using (ℕ ; zero ; suc) -open import Cubical.Data.Fin.Inductive.Base +open import Cubical.Data.Fin.Base open import Cubical.Algebra.Group.Base open import Cubical.Algebra.Group.Properties diff --git a/Cubical/Algebra/Group/Instances/Int.agda b/Cubical/Algebra/Group/Instances/Int.agda index 94e2c3210b..93135e21bc 100644 --- a/Cubical/Algebra/Group/Instances/Int.agda +++ b/Cubical/Algebra/Group/Instances/Int.agda @@ -7,7 +7,7 @@ open import Cubical.Foundations.Function open import Cubical.Data.Int renaming (_+_ to _+ℤ_ ; _-_ to _-ℤ_; -_ to -ℤ_ ; _·_ to _·ℤ_) open import Cubical.Data.Nat using (ℕ ; zero ; suc) -open import Cubical.Data.Fin.Inductive.Base +open import Cubical.Data.Fin.Base open import Cubical.Algebra.Group.Base open import Cubical.Algebra.Group.Properties diff --git a/Cubical/Algebra/Group/Instances/IntMod.agda b/Cubical/Algebra/Group/Instances/IntMod.agda index cbc2dea0e8..f9c3df4953 100644 --- a/Cubical/Algebra/Group/Instances/IntMod.agda +++ b/Cubical/Algebra/Group/Instances/IntMod.agda @@ -13,6 +13,7 @@ open import Cubical.Data.Bool hiding (isProp≤) open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) open import Cubical.Data.Nat.Mod open import Cubical.Data.Nat.Order +open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Int renaming (_+_ to _+ℤ_) open import Cubical.Data.Fin open import Cubical.Data.Fin.Arithmetic @@ -40,7 +41,7 @@ fst (ℤGroup/ suc n) = Fin (suc n) GroupStr._·_ (snd (ℤGroup/ suc n)) = _+ₘ_ inv (snd (ℤGroup/ suc n)) = -ₘ_ isGroup (snd (ℤGroup/ suc n)) = makeIsGroup - isSetFin + (isSetFin {suc n}) (λ x y z → sym (+ₘ-assoc x y z)) +ₘ-rUnit +ₘ-lUnit @@ -55,16 +56,15 @@ Iso.fun (fst Bool≅ℤGroup/2) false = 1 Iso.fun (fst Bool≅ℤGroup/2) true = 0 Iso.inv (fst Bool≅ℤGroup/2) (zero , p) = true Iso.inv (fst Bool≅ℤGroup/2) (suc zero , p) = false -Iso.inv (fst Bool≅ℤGroup/2) (suc (suc x) , p) = - ⊥.rec (¬-<-zero (predℕ-≤-predℕ (predℕ-≤-predℕ p))) -Iso.rightInv (fst Bool≅ℤGroup/2) (zero , p) = - Σ≡Prop (λ _ → isProp≤) refl -Iso.rightInv (fst Bool≅ℤGroup/2) (suc zero , p) = - Σ≡Prop (λ _ → isProp≤) refl -Iso.rightInv (fst Bool≅ℤGroup/2) (suc (suc x) , p) = - ⊥.rec (¬-<-zero (predℕ-≤-predℕ (predℕ-≤-predℕ p))) -Iso.leftInv (fst Bool≅ℤGroup/2) false = refl -Iso.leftInv (fst Bool≅ℤGroup/2) true = refl +Iso.inv (fst Bool≅ℤGroup/2) (suc (suc x) , p) = ⊥.rec p +Iso.sec (fst Bool≅ℤGroup/2) (zero , p) = + Σ≡Prop (λ z → isProp<ᵗ {n = z} {m = suc (suc zero)}) refl +Iso.sec (fst Bool≅ℤGroup/2) (suc zero , p) = + Σ≡Prop (λ z → isProp<ᵗ {n = z} {m = suc (suc zero)}) refl +Iso.sec (fst Bool≅ℤGroup/2) (suc (suc x) , p) = + ⊥.rec p +Iso.ret (fst Bool≅ℤGroup/2) false = refl +Iso.ret (fst Bool≅ℤGroup/2) true = refl snd Bool≅ℤGroup/2 = makeIsGroupHom λ { false false → refl ; false true → refl @@ -77,42 +77,42 @@ snd Bool≅ℤGroup/2 = -- Definition of the quotient map homomorphism ℤ → ℤGroup/ (suc n) -- as a group homomorphism. ℤ→Fin : (n : ℕ) → ℤ → Fin (suc n) -ℤ→Fin n (pos x) = x mod (suc n) , mod< n x -ℤ→Fin n (negsuc x) = -ₘ (suc x mod suc n , mod< n (suc x)) +ℤ→Fin n (pos x) = x mod (suc n) , <→<ᵗ (mod< n x) +ℤ→Fin n (negsuc x) = -ₘ (suc x mod suc n , <→<ᵗ (mod< n (suc x))) ℤ→Fin-presinv : (n : ℕ) (x : ℤ) → ℤ→Fin n (- x) ≡ -ₘ ℤ→Fin n x ℤ→Fin-presinv n (pos zero) = - Σ≡Prop (λ _ → isProp≤) ((λ _ → zero) ∙ sym (cong fst help)) + Σ≡Prop (λ z → isProp<ᵗ {n = z} {suc n}) ((λ _ → zero) ∙ sym (cong fst help)) where help : (-ₘ_ {n = n} 0) ≡ 0 help = GroupTheory.inv1g (ℤGroup/ (suc n)) -ℤ→Fin-presinv n (pos (suc x)) = Σ≡Prop (λ _ → isProp≤) refl +ℤ→Fin-presinv n (pos (suc x)) = Σ≡Prop (λ z → isProp<ᵗ {n = z} {suc n}) refl ℤ→Fin-presinv n (negsuc x) = sym (GroupTheory.invInv (ℤGroup/ (suc n)) _) -ₘ1-id : (n : ℕ) - → Path (Fin (suc n)) (-ₘ (1 mod (suc n) , mod< n 1)) - (n mod (suc n) , mod< n n) + → Path (Fin (suc n)) (-ₘ (1 mod (suc n) , <→<ᵗ (mod< n 1))) + (n mod (suc n) , <→<ᵗ (mod< n n)) -ₘ1-id zero = refl -ₘ1-id (suc n) = - cong -ₘ_ (FinPathℕ ((1 mod suc (suc n)) , mod< (suc n) 1) 1 + cong -ₘ_ (FinPathℕ {suc (suc n)} ((1 mod suc (suc n)) , <→<ᵗ (mod< (suc n) 1)) 1 (modIndBase (suc n) 1 (n , +-comm n 2)) .snd) - ∙ Σ≡Prop (λ _ → isProp≤) + ∙ Σ≡Prop (λ z → isProp<ᵗ {n = z} {m = suc (suc n)}) ((+inductionBase (suc n) _ (λ x _ → ((suc (suc n)) ∸ x) mod (suc (suc n))) λ _ x → x) 1 (n , (+-comm n 2))) suc-ₘ1 : (n y : ℕ) - → ((suc y mod suc n) , mod< n (suc y)) -ₘ (1 mod (suc n) , mod< n 1) - ≡ (y mod suc n , mod< n y) + → ((suc y mod suc n) , <→<ᵗ (mod< n (suc y))) -ₘ (1 mod (suc n) , <→<ᵗ (mod< n 1)) + ≡ (y mod suc n , <→<ᵗ (mod< n y)) suc-ₘ1 zero y = isContr→isProp (isOfHLevelRetractFromIso 0 (fst ℤGroup/1≅Unit) isContrUnit) _ _ suc-ₘ1 (suc n) y = - (λ i → ((suc y mod suc (suc n)) , mod< (suc n) (suc y)) + (λ i → ((suc y mod suc (suc n)) , <→<ᵗ (mod< (suc n) (suc y))) +ₘ (-ₘ1-id (suc n) i)) - ∙ Σ≡Prop (λ _ → isProp≤) + ∙ Σ≡Prop (λ z → isProp<ᵗ {n = z} {suc (suc n)}) (cong (_mod (2 +ℕ n)) (cong (_+ℕ (suc n) mod (2 +ℕ n)) (mod+mod≡mod (suc (suc n)) 1 y)) @@ -136,16 +136,16 @@ suc-ₘ1 (suc n) y = ∙ mod-idempotent y))) 1-ₘsuc : (n y : ℕ) - → ((1 mod (suc n) , mod< n 1) - +ₘ (-ₘ (((suc y mod suc n) , mod< n (suc y))))) - ≡ -ₘ ((y mod suc n) , mod< n y) + → ((1 mod (suc n) , <→<ᵗ (mod< n 1)) + +ₘ (-ₘ (((suc y mod suc n) , <→<ᵗ (mod< n (suc y)))))) + ≡ -ₘ ((y mod suc n) , <→<ᵗ (mod< n y)) 1-ₘsuc n y = sym (GroupTheory.invInv (ℤGroup/ (suc n)) _) ∙ cong -ₘ_ (GroupTheory.invDistr (ℤGroup/ (suc n)) - (modInd n 1 , mod< n 1) (-ₘ (modInd n (suc y) , mod< n (suc y))) - ∙ cong (_-ₘ (modInd n 1 , mod< n 1)) - (GroupTheory.invInv (ℤGroup/ (suc n)) (modInd n (suc y) , mod< n (suc y))) + (modInd n 1 , <→<ᵗ (mod< n 1)) (-ₘ (modInd n (suc y) , <→<ᵗ (mod< n (suc y)))) + ∙ cong (_-ₘ (modInd n 1 , <→<ᵗ (mod< n 1))) + (GroupTheory.invInv (ℤGroup/ (suc n)) (modInd n (suc y) , <→<ᵗ (mod< n (suc y)))) ∙ suc-ₘ1 n y) isHomℤ→Fin : (n : ℕ) → IsGroupHom (snd ℤGroup) (ℤ→Fin n) (snd (ℤGroup/ (suc n))) @@ -162,24 +162,24 @@ isHomℤ→Fin n = ∙∙ cong -ₘ_ (pos+case (suc x) (pos (suc y))) ∙∙ GroupTheory.invDistr (ℤGroup/ (suc n)) (modInd n (suc x) - , mod< n (suc x)) (modInd n (suc y) , mod< n (suc y)) + , <→<ᵗ (mod< n (suc x))) (modInd n (suc y) , <→<ᵗ (mod< n (suc y))) ∙∙ +ₘ-comm (ℤ→Fin n (negsuc y)) (ℤ→Fin n (negsuc x))} where +1case : (y : ℤ) → ℤ→Fin n (1 +ℤ y) ≡ ℤ→Fin n 1 +ₘ ℤ→Fin n y +1case (pos zero) = sym (GroupStr.·IdR (snd (ℤGroup/ (suc n))) _) +1case (pos (suc y)) = cong (ℤ→Fin n) (+Comm 1 (pos (suc y))) - ∙ Σ≡Prop (λ _ → isProp≤) (mod+mod≡mod (suc n) 1 (suc y)) + ∙ Σ≡Prop (λ z → isProp<ᵗ {n = z} {suc n}) (mod+mod≡mod (suc n) 1 (suc y)) +1case (negsuc zero) = - Σ≡Prop (λ _ → isProp≤) refl - ∙ sym (GroupStr.·InvR (snd (ℤGroup/ (suc n))) (modInd n 1 , mod< n 1)) + Σ≡Prop (λ z → isProp<ᵗ {n = z} {suc n}) refl + ∙ sym (GroupStr.·InvR (snd (ℤGroup/ (suc n))) (modInd n 1 , <→<ᵗ (mod< n 1))) +1case (negsuc (suc y)) = - Σ≡Prop (λ _ → isProp≤) + Σ≡Prop (λ z → isProp<ᵗ {n = z} {suc n}) (cong fst (cong (ℤ→Fin n) (+Comm 1 (negsuc (suc y)))) - ∙∙ cong fst (cong -ₘ_ (refl {x = suc y mod suc n , mod< n (suc y)})) + ∙∙ cong fst (cong -ₘ_ (refl {x = suc y mod suc n , <→<ᵗ (mod< n (suc y))})) ∙∙ cong fst (sym (1-ₘsuc n (suc y))) - ∙ λ i → fst ((1 mod (suc n) , mod< n 1) - +ₘ (-ₘ (((suc (suc y) mod suc n) , mod< n (suc (suc y))))))) + ∙ λ i → fst ((1 mod (suc n) , <→<ᵗ (mod< n 1)) + +ₘ (-ₘ (((suc (suc y) mod suc n) , <→<ᵗ (mod< n (suc (suc y)))))))) pos+case : (x : ℕ) (y : ℤ) → ℤ→Fin n (pos x +ℤ y) ≡ ℤ→Fin n (pos x) +ₘ ℤ→Fin n y @@ -191,29 +191,27 @@ isHomℤ→Fin n = cong (ℤ→Fin n) (cong (_+ℤ y) (+Comm (pos (suc x)) 1) ∙ sym (+Assoc 1 (pos (suc x)) y)) ∙∙ +1case (pos (suc x) +ℤ y) - ∙∙ (cong ((modInd n 1 , mod< n 1) +ₘ_) (pos+case (suc x) y) - ∙∙ sym (+ₘ-assoc (modInd n 1 , mod< n 1) - (modInd n (suc x) , mod< n (suc x)) (ℤ→Fin n y)) + ∙∙ (cong ((modInd n 1 , <→<ᵗ (mod< n 1)) +ₘ_) (pos+case (suc x) y) + ∙∙ sym (+ₘ-assoc (modInd n 1 , <→<ᵗ (mod< n 1)) + (modInd n (suc x) , <→<ᵗ (mod< n (suc x))) (ℤ→Fin n y)) ∙∙ cong (_+ₘ ℤ→Fin n y) (lem x)) where lem : (x : ℕ) - → (modInd n 1 , mod< n 1) +ₘ (modInd n (suc x) , mod< n (suc x)) + → (modInd n 1 , <→<ᵗ (mod< n 1)) +ₘ (modInd n (suc x) , <→<ᵗ (mod< n (suc x))) ≡ ℤ→Fin n (pos (suc (suc x))) lem x = - Σ≡Prop (λ _ → isProp≤) (sym (mod+mod≡mod (suc n) 1 (suc x))) + Σ≡Prop (λ z → isProp<ᵗ {n = z} {suc n}) (sym (mod+mod≡mod (suc n) 1 (suc x))) -- ℤ/2 lemmas ℤ/2-elim : ∀ {ℓ} {A : Fin 2 → Type ℓ} → A 0 → A 1 → (x : _) → A x -ℤ/2-elim {A = A} a₀ a₁ (zero , p) = subst (λ p → A (zero , p)) (isProp≤ (0 .snd) p) a₀ -ℤ/2-elim {A = A} a₀ a₁ (suc zero , p) = subst (λ p → A (1 , p)) (isProp≤ (1 .snd) p) a₁ -ℤ/2-elim {A = A} a₀ a₁ (suc (suc x) , p) = - ⊥.rec (snotz (cong (λ x → predℕ (predℕ x)) (+-comm (3 +ℕ x) (fst p) ∙ snd p))) +ℤ/2-elim {A = A} a₀ a₁ (zero , p) = a₀ +ℤ/2-elim {A = A} a₀ a₁ (suc zero , p) = a₁ +ℤ/2-elim {A = A} a₀ a₁ (suc (suc x) , p) = ⊥.rec p ℤ/2-rec : ∀ {ℓ} {A : Type ℓ} → A → A → Fin 2 → A ℤ/2-rec {A = A} a₀ a₁ (zero , p) = a₀ ℤ/2-rec {A = A} a₀ a₁ (suc zero , p) = a₁ -ℤ/2-rec {A = A} a₀ a₁ (suc (suc x) , p) = - ⊥.rec (snotz (cong (λ x → predℕ (predℕ x)) (+-comm (3 +ℕ x) (fst p) ∙ snd p))) +ℤ/2-rec {A = A} a₀ a₁ (suc (suc x) , p) = ⊥.rec p -Const-ℤ/2 : (x : fst (ℤGroup/ 2)) → -ₘ x ≡ x -Const-ℤ/2 = ℤ/2-elim refl refl diff --git a/Cubical/Algebra/Group/Instances/Pi.agda b/Cubical/Algebra/Group/Instances/Pi.agda index 8c592a0463..5d149f7523 100644 --- a/Cubical/Algebra/Group/Instances/Pi.agda +++ b/Cubical/Algebra/Group/Instances/Pi.agda @@ -47,6 +47,6 @@ snd (ΠGroupHom fam) = Iso.fun (fst (ΠGroupIso fam)) = fst (ΠGroupHom λ a → GroupIso→GroupHom (fam a)) Iso.inv (fst (ΠGroupIso fam)) = fst (ΠGroupHom λ a → GroupIso→GroupHom (invGroupIso (fam a))) -Iso.rightInv (fst (ΠGroupIso fam)) f = funExt λ x → Iso.rightInv (fst (fam x)) _ -Iso.leftInv (fst (ΠGroupIso fam)) f = funExt λ x → Iso.leftInv (fst (fam x)) _ +Iso.sec (fst (ΠGroupIso fam)) f = funExt λ x → Iso.sec (fst (fam x)) _ +Iso.ret (fst (ΠGroupIso fam)) f = funExt λ x → Iso.ret (fst (fam x)) _ snd (ΠGroupIso fam) = snd (ΠGroupHom λ a → GroupIso→GroupHom (fam a)) diff --git a/Cubical/Algebra/Group/Instances/Unit.agda b/Cubical/Algebra/Group/Instances/Unit.agda index 54fb8ac437..90107e4d56 100644 --- a/Cubical/Algebra/Group/Instances/Unit.agda +++ b/Cubical/Algebra/Group/Instances/Unit.agda @@ -46,15 +46,15 @@ open Iso lUnitGroupIso : {G : Group ℓ} → GroupIso (DirProd UnitGroup₀ G) G fun (fst lUnitGroupIso) = snd inv (fst lUnitGroupIso) g = tt , g -rightInv (fst lUnitGroupIso) _ = refl -leftInv (fst lUnitGroupIso) _ = refl +sec (fst lUnitGroupIso) _ = refl +ret (fst lUnitGroupIso) _ = refl snd lUnitGroupIso = makeIsGroupHom λ _ _ → refl rUnitGroupIso : {G : Group ℓ} → GroupIso (DirProd G UnitGroup₀) G fun (fst rUnitGroupIso) = fst inv (fst rUnitGroupIso) g = g , tt -rightInv (fst rUnitGroupIso) _ = refl -leftInv (fst rUnitGroupIso) _ = refl +sec (fst rUnitGroupIso) _ = refl +ret (fst rUnitGroupIso) _ = refl snd rUnitGroupIso = makeIsGroupHom λ _ _ → refl -- lifted version @@ -62,16 +62,16 @@ lUnitGroupIso^ : ∀ {ℓ ℓ'} {G : Group ℓ'} → GroupIso (DirProd (UnitGroup {ℓ}) G) G fun (fst lUnitGroupIso^) = snd inv (fst lUnitGroupIso^) = tt* ,_ -rightInv (fst lUnitGroupIso^) g = refl -leftInv (fst lUnitGroupIso^) (tt* , g) = refl +sec (fst lUnitGroupIso^) g = refl +ret (fst lUnitGroupIso^) (tt* , g) = refl snd lUnitGroupIso^ = makeIsGroupHom λ _ _ → refl rUnitGroupIso^ : ∀ {ℓ ℓ'} {G : Group ℓ'} → GroupIso (DirProd G (UnitGroup {ℓ})) G fun (fst rUnitGroupIso^) = fst inv (fst rUnitGroupIso^) = _, tt* -rightInv (fst rUnitGroupIso^) g = refl -leftInv (fst rUnitGroupIso^) (g , tt*) = refl +sec (fst rUnitGroupIso^) g = refl +ret (fst rUnitGroupIso^) (g , tt*) = refl snd rUnitGroupIso^ = makeIsGroupHom λ _ _ → refl lUnitGroupEquiv : {G : Group ℓ} → GroupEquiv (DirProd UnitGroup₀ G) G @@ -83,8 +83,8 @@ rUnitGroupEquiv = GroupIso→GroupEquiv rUnitGroupIso contrGroupIsoUnit : {G : Group ℓ} → isContr ⟨ G ⟩ → GroupIso G UnitGroup₀ fun (fst (contrGroupIsoUnit contr)) _ = tt inv (fst (contrGroupIsoUnit contr)) _ = fst contr -rightInv (fst (contrGroupIsoUnit contr)) _ = refl -leftInv (fst (contrGroupIsoUnit contr)) x = snd contr x +sec (fst (contrGroupIsoUnit contr)) _ = refl +ret (fst (contrGroupIsoUnit contr)) x = snd contr x snd (contrGroupIsoUnit contr) = makeIsGroupHom λ _ _ → refl contrGroupEquivUnit : {G : Group ℓ} → isContr ⟨ G ⟩ → GroupEquiv G UnitGroup₀ diff --git a/Cubical/Algebra/Group/IsomorphismTheorems.agda b/Cubical/Algebra/Group/IsomorphismTheorems.agda index 1f5bb7278d..e81577b019 100644 --- a/Cubical/Algebra/Group/IsomorphismTheorems.agda +++ b/Cubical/Algebra/Group/IsomorphismTheorems.agda @@ -98,8 +98,8 @@ module _ {G H : Group ℓ} (ϕ : GroupHom G H) where isoThm1 : GroupIso imϕ (G / kerNormalSubgroup) fun (fst isoThm1) = f1 inv (fst isoThm1) = f2 - rightInv (fst isoThm1) = f12 - leftInv (fst isoThm1) = f21 + sec (fst isoThm1) = f12 + ret (fst isoThm1) = f21 snd isoThm1 = makeIsGroupHom f1-isHom -- The SIP lets us turn the isomorphism theorem into a path diff --git a/Cubical/Algebra/Group/MorphismProperties.agda b/Cubical/Algebra/Group/MorphismProperties.agda index 937e1398c1..5513fcd153 100644 --- a/Cubical/Algebra/Group/MorphismProperties.agda +++ b/Cubical/Algebra/Group/MorphismProperties.agda @@ -257,10 +257,10 @@ fun (fst (GroupIsoDirProd iso1 iso2)) prod = fun (fst iso1) (fst prod) , fun (fst iso2) (snd prod) inv (fst (GroupIsoDirProd iso1 iso2)) prod = inv (fst iso1) (fst prod) , inv (fst iso2) (snd prod) -rightInv (fst (GroupIsoDirProd iso1 iso2)) a = - ΣPathP (rightInv (fst iso1) (fst a) , (rightInv (fst iso2) (snd a))) -leftInv (fst (GroupIsoDirProd iso1 iso2)) a = - ΣPathP (leftInv (fst iso1) (fst a) , (leftInv (fst iso2) (snd a))) +sec (fst (GroupIsoDirProd iso1 iso2)) a = + ΣPathP (sec (fst iso1) (fst a) , (sec (fst iso2) (snd a))) +ret (fst (GroupIsoDirProd iso1 iso2)) a = + ΣPathP (ret (fst iso1) (fst a) , (ret (fst iso2) (snd a))) snd (GroupIsoDirProd iso1 iso2) = makeIsGroupHom λ a b → ΣPathP (pres· (snd iso1) (fst a) (fst b) , pres· (snd iso2) (snd a) (snd b)) @@ -302,8 +302,8 @@ BijectionIso→GroupIso {G = G} {H = H} i = grIso grIso : GroupIso G H fun (fst grIso) = f inv (fst grIso) b = rec (helper b) (λ a → a) (surj i b) .fst - rightInv (fst grIso) b = rec (helper b) (λ a → a) (surj i b) .snd - leftInv (fst grIso) b j = rec (helper (f b)) (λ a → a) + sec (fst grIso) b = rec (helper b) (λ a → a) (surj i b) .snd + ret (fst grIso) b j = rec (helper (f b)) (λ a → a) (isPropPropTrunc (surj i (f b)) ∣ b , refl ∣₁ j) .fst snd grIso = snd (fun i) diff --git a/Cubical/Algebra/Group/Properties.agda b/Cubical/Algebra/Group/Properties.agda index c2cb2a51f8..771f3fc636 100644 --- a/Cubical/Algebra/Group/Properties.agda +++ b/Cubical/Algebra/Group/Properties.agda @@ -106,11 +106,11 @@ congIdLeft≡congIdRight _·G_ -G_ 0G rUnitG lUnitG r≡l p = ·GroupAutomorphismL : ∀ {ℓ} (G : Group ℓ) (g : fst G) → Iso (fst G) (fst G) Iso.fun (·GroupAutomorphismL G g) = GroupStr._·_ (snd G) g Iso.inv (·GroupAutomorphismL G g) = GroupStr._·_ (snd G) (GroupStr.inv (snd G) g) -Iso.rightInv (·GroupAutomorphismL G g) h = +Iso.sec (·GroupAutomorphismL G g) h = GroupStr.·Assoc (snd G) _ _ _ ∙ cong₂ (GroupStr._·_ (snd G)) (GroupStr.·InvR (snd G) g) refl ∙ GroupStr.·IdL (snd G) h -Iso.leftInv (·GroupAutomorphismL G g) h = +Iso.ret (·GroupAutomorphismL G g) h = GroupStr.·Assoc (snd G) _ _ _ ∙ cong₂ (GroupStr._·_ (snd G)) (GroupStr.·InvL (snd G) g) refl ∙ GroupStr.·IdL (snd G) h @@ -118,11 +118,11 @@ Iso.leftInv (·GroupAutomorphismL G g) h = ·GroupAutomorphismR : ∀ {ℓ} (G : Group ℓ) (g : fst G) → Iso (fst G) (fst G) Iso.fun (·GroupAutomorphismR G g) x = GroupStr._·_ (snd G) x g Iso.inv (·GroupAutomorphismR G g) x = GroupStr._·_ (snd G) x (GroupStr.inv (snd G) g) -Iso.rightInv (·GroupAutomorphismR G g) h = +Iso.sec (·GroupAutomorphismR G g) h = sym (GroupStr.·Assoc (snd G) _ _ _) ∙ cong₂ (GroupStr._·_ (snd G)) refl (GroupStr.·InvL (snd G) g) -- ∙ GroupStr.·IdR (snd G) h -Iso.leftInv (·GroupAutomorphismR G g) h = +Iso.ret (·GroupAutomorphismR G g) h = sym (GroupStr.·Assoc (snd G) _ _ _) ∙ cong₂ (GroupStr._·_ (snd G)) refl (GroupStr.·InvR (snd G) g) -- ∙ GroupStr.·IdR (snd G) h diff --git a/Cubical/Algebra/Group/QuotientGroup.agda b/Cubical/Algebra/Group/QuotientGroup.agda index 5a1c9d9061..4b4fe1f5df 100644 --- a/Cubical/Algebra/Group/QuotientGroup.agda +++ b/Cubical/Algebra/Group/QuotientGroup.agda @@ -139,9 +139,9 @@ module _ {G' : Group ℓ} (H' : NormalSubgroup G') Iso.fun (fst trivialRelIso) g = [ g ] Iso.inv (fst trivialRelIso) = rec is-set (λ g → g) contrH - Iso.rightInv (fst trivialRelIso) = + Iso.sec (fst trivialRelIso) = elimProp (λ _ → squash/ _ _) λ _ → refl - Iso.leftInv (fst trivialRelIso) _ = refl + Iso.ret (fst trivialRelIso) _ = refl snd trivialRelIso = makeIsGroupHom λ _ _ → refl @@ -169,10 +169,10 @@ Iso.fun (fst (Hom/Iso {G' = G'} {H' = H'} ϕ ϕ' ψ')) = fst (Hom/ {G' = G'} {H' = H'} (GroupIso→GroupHom ϕ) ϕ') Iso.inv (fst (Hom/Iso {G' = G'} {H' = H'} ϕ ϕ' ψ')) = fst (Hom/ {G' = H'} {H' = G'} (GroupIso→GroupHom (invGroupIso ϕ)) ψ') -Iso.rightInv (fst (Hom/Iso ϕ ϕ' ψ')) = - elimProp (λ _ → squash/ _ _) λ a → cong [_] (Iso.rightInv (fst ϕ) a) -Iso.leftInv (fst (Hom/Iso ϕ ϕ' ψ')) = - elimProp (λ _ → squash/ _ _) λ a → cong [_] (Iso.leftInv (fst ϕ) a) +Iso.sec (fst (Hom/Iso ϕ ϕ' ψ')) = + elimProp (λ _ → squash/ _ _) λ a → cong [_] (Iso.sec (fst ϕ) a) +Iso.ret (fst (Hom/Iso ϕ ϕ' ψ')) = + elimProp (λ _ → squash/ _ _) λ a → cong [_] (Iso.ret (fst ϕ) a) snd (Hom/Iso {G' = G'} {H' = H'} ϕ ϕ' ψ') = makeIsGroupHom λ x y → IsGroupHom.pres· (snd (Hom/ {G' = G'} {H' = H'} @@ -206,6 +206,6 @@ Hom/ImIso {G = G} {H} ϕ {G'} {H'} ψ {ϕ'} {ψ'} eG eH e∼ = ∙ sym (IsGroupHom.pres· (snd (invGroupIso eH)) a (GroupStr.inv (H' .snd) b)) ∙ cong (Iso.inv (fst eH)) (sym p) - ∙ cong (Iso.inv (fst eH) ∘ fst ψ) (sym (Iso.rightInv (fst eG) x))) + ∙ cong (Iso.inv (fst eH) ∘ fst ψ) (sym (Iso.sec (fst eG) x))) ∙ cong (Iso.inv (fst eH)) (e∼ (Iso.inv (fst eG) x)) - ∙ Iso.leftInv (fst eH) _))) + ∙ Iso.ret (fst eH) _))) diff --git a/Cubical/Algebra/Group/ZAction.agda b/Cubical/Algebra/Group/ZAction.agda index 79d069cb75..007fcbbd1c 100644 --- a/Cubical/Algebra/Group/ZAction.agda +++ b/Cubical/Algebra/Group/ZAction.agda @@ -18,6 +18,7 @@ open import Cubical.Data.Int as ℤ open import Cubical.Data.Nat renaming (_·_ to _·ℕ_ ; _+_ to _+ℕ_) open import Cubical.Data.Nat.Mod open import Cubical.Data.Nat.Order +open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Empty renaming (rec to ⊥-rec) open import Cubical.Data.Sum renaming (rec to ⊎-rec) open import Cubical.Data.Unit @@ -204,7 +205,7 @@ Iso-pres-gen₁ : ∀ {ℓ ℓ'} (G : Group ℓ) (H : Group ℓ') (g : fst G) → gen₁-by H (fun (fst e) g) Iso-pres-gen₁ G H g genG is h = (fst (genG (inv (fst is) h))) - , (sym (rightInv (fst is) h) + , (sym (sec (fst is) h) ∙∙ cong (fun (fst is)) (snd (genG (inv (fst is) h))) ∙∙ (homPresℤ· (_ , snd is) g (fst (genG (inv (fst is) h))))) @@ -213,7 +214,7 @@ Iso-pres-gen₂ : (G : Group ℓ) (H : Group ℓ') (g₁ g₂ : fst G) → gen₂-by H (fun (fst e) g₁) (fun (fst e) g₂) fst (Iso-pres-gen₂ G H g₁ g₂ genG is h) = genG (inv (fst is) h) .fst snd (Iso-pres-gen₂ G H g₁ g₂ genG is h) = - sym (rightInv (fst is) h) + sym (sec (fst is) h) ∙∙ cong (fun (fst is)) (snd (genG (inv (fst is) h))) ∙∙ (pres· (snd is) _ _ ∙ cong₂ (_·_ (snd H)) @@ -516,13 +517,13 @@ module _ (f : GroupHom ℤGroup ℤGroup) where where lem : (x : ℤ) → ℤ→Fin n (pos (suc n) * x) ≡ 0 lem (pos x) = cong (ℤ→Fin n) (sym (pos· (suc n) x)) - ∙ Σ≡Prop (λ _ → isProp≤) + ∙ Σ≡Prop (λ _ → isProp<ᵗ) (cong (_mod (suc n)) (·-comm (suc n) x) ∙ zero-charac-gen (suc n) x) lem (negsuc x) = cong (ℤ→Fin n) (pos·negsuc (suc n) x ∙ cong -_ (sym (pos· (suc n) (suc x)))) - ∙∙ cong -ₘ_ (Σ≡Prop (λ _ → isProp≤) + ∙∙ cong -ₘ_ (Σ≡Prop (λ _ → isProp<ᵗ) (cong (_mod (suc n)) (·-comm (suc n) (suc x)) ∙ zero-charac-gen (suc n) (suc x))) ∙∙ GroupTheory.inv1g (ℤGroup/ (suc n)) @@ -548,14 +549,14 @@ module _ (f : GroupHom ℤGroup ℤGroup) where ∙∙ cong -_ (sym (pos· (suc n) (quotient suc x / (suc n))) ∙ (λ i → pos (fst ((sym (GroupTheory.invInv (ℤGroup/ (suc n)) - ((suc x mod suc n) , mod< n (suc x))) + ((suc x mod suc n) , <→<ᵗ (mod< n (suc x)))) ∙ cong -ₘ_ q ∙ GroupTheory.inv1g (ℤGroup/ (suc n))) (~ i)) +ℕ suc n ·ℕ quotient (suc x) / suc n))) ∙∙ cong -_ (cong pos (≡remainder+quotient (suc n) (suc x))))) ∣₁}) BijectionIso.surj (ℤHom→ℤ/im≅ℤ/im1 n p) x = ∣ [ pos (fst x) ] - , (Σ≡Prop (λ _ → isProp≤) (modIndBase n (fst x) (snd x))) ∣₁ + , (Σ≡Prop (λ _ → isProp<ᵗ) (modIndBase n (fst x) (<ᵗ→< (snd x)))) ∣₁ -- main result ℤ/imIso : (f : GroupHom ℤGroup ℤGroup) diff --git a/Cubical/Algebra/Matrix.agda b/Cubical/Algebra/Matrix.agda index 9ad955160c..bfe2fde235 100644 --- a/Cubical/Algebra/Matrix.agda +++ b/Cubical/Algebra/Matrix.agda @@ -70,8 +70,8 @@ VecMatrix→FinMatrix→VecMatrix {m = suc m} (M ∷ MS) i = FinMatrixIsoVecMatrix : (A : Type ℓ) (m n : ℕ) → Iso (FinMatrix A m n) (VecMatrix A m n) fun (FinMatrixIsoVecMatrix A m n) = FinMatrix→VecMatrix inv (FinMatrixIsoVecMatrix A m n) = VecMatrix→FinMatrix -rightInv (FinMatrixIsoVecMatrix A m n) = VecMatrix→FinMatrix→VecMatrix -leftInv (FinMatrixIsoVecMatrix A m n) = FinMatrix→VecMatrix→FinMatrix +sec (FinMatrixIsoVecMatrix A m n) = VecMatrix→FinMatrix→VecMatrix +ret (FinMatrixIsoVecMatrix A m n) = FinMatrix→VecMatrix→FinMatrix FinMatrix≃VecMatrix : {m n : ℕ} → FinMatrix A m n ≃ VecMatrix A m n FinMatrix≃VecMatrix {_} {A} {m} {n} = isoToEquiv (FinMatrixIsoVecMatrix A m n) diff --git a/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/AB-An[X]Bn[X].agda b/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/AB-An[X]Bn[X].agda index 22835e5ebb..1ce68f1e93 100644 --- a/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/AB-An[X]Bn[X].agda +++ b/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/AB-An[X]Bn[X].agda @@ -84,11 +84,11 @@ module _ is : Iso (fst PA) (fst PB) fun is = fst (makeCommRingHomPoly A' B' n (f , fstr)) inv is = fst (makeCommRingHomPoly B' A' n (g , gstr)) - rightInv is = DS-Ind-Prop.f _ _ _ _ (λ _ → trunc _ _) + sec is = DS-Ind-Prop.f _ _ _ _ (λ _ → trunc _ _) refl (λ v a → cong (base v) (secEq e a)) λ {U V} ind-U ind-V → cong₂ (_+_ (snd PB)) ind-U ind-V - leftInv is = DS-Ind-Prop.f _ _ _ _ (λ _ → trunc _ _) + ret is = DS-Ind-Prop.f _ _ _ _ (λ _ → trunc _ _) refl (λ v a → cong (base v) (retEq e a)) λ {U V} ind-U ind-V → cong₂ (_+_ (snd PA)) ind-U ind-V diff --git a/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/A[X]X-A.agda b/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/A[X]X-A.agda index 08d51550b3..ebfc124a91 100644 --- a/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/A[X]X-A.agda +++ b/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/A[X]X-A.agda @@ -241,8 +241,8 @@ module _ is : Iso (A[x1,···,xn]/ Ar 1 0 1) A fun is = A[x]/x→A inv is = A→A[x]/x - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd Equiv-A[X]/X-A = snd A[X]/X→A Equiv-ℤ[X]/X-ℤ : RingEquiv (CommRing→Ring ℤ[X]/X) (CommRing→Ring ℤCR) diff --git a/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/An[Am[X]]-Anm[X].agda b/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/An[Am[X]]-Anm[X].agda index dd36453369..2c2870e428 100644 --- a/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/An[Am[X]]-Anm[X].agda +++ b/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/An[Am[X]]-Anm[X].agda @@ -140,7 +140,7 @@ module _ (A' : CommRing ℓ) (n m : ℕ) where is : Iso _ _ Iso.fun is = PAmn→PAn+m Iso.inv is = PAn+m→PAmn - Iso.rightInv is = e-sect - Iso.leftInv is = e-retr + Iso.sec is = e-sect + Iso.ret is = e-retr snd CRE-PolyN∘M-PolyN+M = makeIsCommRingHom PAmn→PAn+m-pres1 PAmn→PAn+m-pres+ PAmn→PAn+m-pres· diff --git a/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/An[X]X-A.agda b/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/An[X]X-A.agda index ce90949db1..d6fbc5acb7 100644 --- a/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/An[X]X-A.agda +++ b/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/An[X]X-A.agda @@ -267,8 +267,8 @@ module _ is : Iso (A[x1,···,xn]/ Ar n) A fun is = PAI→A inv is = A→PAI - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd Equiv-QuotientX-A = snd PAIr→Ar -- Warning this doesn't prove Z[X]/X ≅ ℤ because you get two definition, diff --git a/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/Poly0-A.agda b/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/Poly0-A.agda index cda6f67824..d5ef378bf2 100644 --- a/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/Poly0-A.agda +++ b/Cubical/Algebra/Polynomials/Multivariate/EquivCarac/Poly0-A.agda @@ -86,6 +86,6 @@ module _ (A' : CommRing ℓ) where is : Iso (Poly A' 0) (A' .fst) Iso.fun is = Poly0→A Iso.inv is = A→Poly0 - Iso.rightInv is = e-sect - Iso.leftInv is = e-retr + Iso.sec is = e-sect + Iso.ret is = e-retr snd CRE-Poly0-A = makeIsCommRingHom Poly0→A-pres1 Poly0→A-pres+ Poly0→A-pres· diff --git a/Cubical/Algebra/Polynomials/TypevariateHIT/EquivUnivariateListPoly.agda b/Cubical/Algebra/Polynomials/TypevariateHIT/EquivUnivariateListPoly.agda index aeb66b08e5..cf9faeaf45 100644 --- a/Cubical/Algebra/Polynomials/TypevariateHIT/EquivUnivariateListPoly.agda +++ b/Cubical/Algebra/Polynomials/TypevariateHIT/EquivUnivariateListPoly.agda @@ -65,8 +65,8 @@ module _ {R : CommRing ℓ} where typevariateListPolyIso : Iso ⟨ R [ Unit ] ⟩ ⟨ ListPolyCommAlgebra R ⟩ fun typevariateListPolyIso = fst to inv typevariateListPolyIso = fst from - rightInv typevariateListPolyIso = toFrom - leftInv typevariateListPolyIso = fromTo + sec typevariateListPolyIso = toFrom + ret typevariateListPolyIso = fromTo typevariateListPolyEquiv : CommAlgebraEquiv (R [ Unit ]) (ListPolyCommAlgebra R) fst typevariateListPolyEquiv = isoToEquiv typevariateListPolyIso diff --git a/Cubical/Algebra/Polynomials/UnivariateList/Poly1-1Poly.agda b/Cubical/Algebra/Polynomials/UnivariateList/Poly1-1Poly.agda index e074b964db..222137e335 100644 --- a/Cubical/Algebra/Polynomials/UnivariateList/Poly1-1Poly.agda +++ b/Cubical/Algebra/Polynomials/UnivariateList/Poly1-1Poly.agda @@ -172,8 +172,8 @@ module _ (Acr : CommRing ℓ) where is : Iso _ _ Iso.fun is = Poly1→Poly: Iso.inv is = Poly:→Poly1 - Iso.rightInv is = e-sect - Iso.leftInv is = e-retr + Iso.sec is = e-sect + Iso.ret is = e-retr snd CRE-Poly1-Poly: = makeIsCommRingHom Poly1→Poly:-pres1 Poly1→Poly:-pres+ diff --git a/Cubical/AlgebraicGeometry/Functorial/ZFunctors/Base.agda b/Cubical/AlgebraicGeometry/Functorial/ZFunctors/Base.agda index d3a07111c9..ab5255856f 100644 --- a/Cubical/AlgebraicGeometry/Functorial/ZFunctors/Base.agda +++ b/Cubical/AlgebraicGeometry/Functorial/ZFunctors/Base.agda @@ -218,8 +218,8 @@ module AdjBij {ℓ : Level} where → Iso (CommRingHom A (𝓞 .F-ob X)) (X ⇒ Sp .F-ob A) fun 𝓞⊣SpIso = _♭ inv 𝓞⊣SpIso = _♯ - rightInv 𝓞⊣SpIso = ♭♯Id - leftInv 𝓞⊣SpIso = ♯♭Id + sec 𝓞⊣SpIso = ♭♯Id + ret 𝓞⊣SpIso = ♯♭Id 𝓞⊣SpNatℤFunctor : {A : CommRing ℓ} {X Y : ℤFunctor {ℓ}} (α : X ⇒ Sp .F-ob A) (β : Y ⇒ X) → (β ●ᵛ α) ♯ ≡ (𝓞 .F-hom β) ∘cr (α ♯) @@ -241,9 +241,9 @@ module AdjBij {ℓ : Level} where theIso : Iso (A .fst) ((𝓞 ∘F Sp) .F-ob A .fst) fun theIso = ε A .fst inv theIso = yonedaᴾ 𝔸¹ A .fun - rightInv theIso α = ℤFUNCTOR .⋆IdL _ ∙ yonedaᴾ 𝔸¹ A .leftInv α - leftInv theIso a = path -- I get yellow otherwise + sec theIso α = ℤFUNCTOR .⋆IdL _ ∙ yonedaᴾ 𝔸¹ A .ret α + ret theIso a = path -- I get yellow otherwise where path : yonedaᴾ 𝔸¹ A .fun ((idTrans (Sp .F-ob A)) ●ᵛ yonedaᴾ 𝔸¹ A .inv a) ≡ a - path = cong (yonedaᴾ 𝔸¹ A .fun) (ℤFUNCTOR .⋆IdL _) ∙ yonedaᴾ 𝔸¹ A .rightInv a + path = cong (yonedaᴾ 𝔸¹ A .fun) (ℤFUNCTOR .⋆IdL _) ∙ yonedaᴾ 𝔸¹ A .sec a snd (𝓞⊣SpCounitEquiv A) = ε A .snd diff --git a/Cubical/AlgebraicGeometry/Functorial/ZFunctors/CompactOpen.agda b/Cubical/AlgebraicGeometry/Functorial/ZFunctors/CompactOpen.agda index 23475be058..b37635757c 100644 --- a/Cubical/AlgebraicGeometry/Functorial/ZFunctors/CompactOpen.agda +++ b/Cubical/AlgebraicGeometry/Functorial/ZFunctors/CompactOpen.agda @@ -360,7 +360,7 @@ module _ {ℓ : Level} where U .N-ob R[1/ (f i) ]AsCommRing (X .F-hom /1AsCommRingHom x) ≡⟨ cong (U .N-ob R[1/ f i ]AsCommRing) - (funExt⁻ (cong fst (isoX .rightInv (compatibleFamIncl fam))) i) ⟩ + (funExt⁻ (cong fst (isoX .sec (compatibleFamIncl fam))) i) ⟩ U .N-ob R[1/ (f i) ]AsCommRing (fam .fst i .fst) @@ -372,11 +372,11 @@ module _ {ℓ : Level} where inducedZarLatHom /1AsCommRingHom .fst (D R 1r) ∎ - rightInv isoU fam = + sec isoU fam = Σ≡Prop (λ _ → isPropIsCompatibleFamily _ _ _) (funExt λ i → Σ≡Prop (λ _ → squash/ _ _) (funExt⁻ (cong fst - (isoX .rightInv (compatibleFamIncl fam))) i)) - leftInv isoU y = Σ≡Prop (λ _ → squash/ _ _) + (isoX .sec (compatibleFamIncl fam))) i)) + ret isoU y = Σ≡Prop (λ _ → squash/ _ _) (cong (isoX .inv) (compatibleFamIncl≡ y) - ∙ isoX .leftInv (y .fst)) + ∙ isoX .ret (y .fst)) diff --git a/Cubical/AlgebraicGeometry/Functorial/ZFunctors/OpenSubscheme.agda b/Cubical/AlgebraicGeometry/Functorial/ZFunctors/OpenSubscheme.agda index 17a019016f..3b9479c345 100644 --- a/Cubical/AlgebraicGeometry/Functorial/ZFunctors/OpenSubscheme.agda +++ b/Cubical/AlgebraicGeometry/Functorial/ZFunctors/OpenSubscheme.agda @@ -184,7 +184,7 @@ module _ {ℓ : Level} (R : CommRing ℓ) (W : CompactOpen (Sp ⟅ R ⟆)) where ⋁Df≡W : ⋁ (CompOpenDistLattice ⟅ Sp ⟅ R ⟆ ⟆) (D R ∘ f) ≡ W ⋁Df≡W = sym (pres⋁ (_ , isHomYoneda) (ZL.D R ∘ f)) ∙ cong (yonedaᴾ ZarLatFun R .inv) ⋁Df≡w - ∙ yonedaᴾ ZarLatFun R .leftInv W + ∙ yonedaᴾ ZarLatFun R .ret W makeAffineCoverCompOpenOfAffine : AffineCover ⟦ W ⟧ᶜᵒ makeAffineCoverCompOpenOfAffine = toAffineCover f ⋁Df≡W diff --git a/Cubical/Axiom/Choice.agda b/Cubical/Axiom/Choice.agda index a78ed50e95..ee4b806ee4 100644 --- a/Cubical/Axiom/Choice.agda +++ b/Cubical/Axiom/Choice.agda @@ -19,9 +19,8 @@ open import Cubical.Foundations.Isomorphism open import Cubical.Data.Nat open import Cubical.Data.Sigma open import Cubical.Data.Empty as ⊥ -open import Cubical.Data.Fin as FN -open import Cubical.Data.Fin.Inductive as IndF -open import Cubical.Data.Nat.Order +open import Cubical.Data.Fin +open import Cubical.Data.Nat.Order.Inductive open import Cubical.HITs.Truncation as TR open import Cubical.HITs.PropositionalTruncation as PT @@ -68,28 +67,28 @@ satAC₀ B = isoToIsEquiv (iso (λ _ _ → tt*) (λ _ → tt*) (λ _ → refl) λ _ → refl) -- Fin m satisfies AC for any level n. -FinSatAC : (n m : ℕ) → ∀ {ℓ} → satAC ℓ n (FN.Fin m) +FinSatAC : (n m : ℕ) → ∀ {ℓ} → satAC ℓ n (Fin m) FinSatAC n zero B = isoToIsEquiv (iso _ - (λ f → ∣ (λ x → ⊥.rec (FN.¬Fin0 x)) ∣ₕ) - (λ f → funExt λ x → ⊥.rec (FN.¬Fin0 x)) + (λ f → ∣ (λ x → ⊥.rec (¬Fin0 x)) ∣ₕ) + (λ f → funExt λ x → ⊥.rec (¬Fin0 x)) (TR.elim (λ _ → isOfHLevelPath n (isOfHLevelTrunc n) _ _) - λ a → cong ∣_∣ₕ (funExt λ x → ⊥.rec (FN.¬Fin0 x)))) + λ a → cong ∣_∣ₕ (funExt λ x → ⊥.rec (¬Fin0 x)))) FinSatAC n (suc m) B = subst isEquiv (ac-eq n m {B} (FinSatAC n m)) (isoToIsEquiv (ac-map' n m B (FinSatAC n m))) where - ac-map' : ∀ {ℓ} (n m : ℕ) (B : FN.Fin (suc m) → Type ℓ) - → (satAC ℓ n (FN.Fin m)) + ac-map' : ∀ {ℓ} (n m : ℕ) (B : Fin (suc m) → Type ℓ) + → (satAC ℓ n (Fin m)) → Iso (hLevelTrunc n ((x : _) → B x)) ((x : _) → hLevelTrunc n (B x)) ac-map' n m B ise = compIso (mapCompIso (CharacΠFinIso m)) (compIso (truncOfProdIso n) (compIso (Σ-cong-iso-snd λ _ → equivToIso - (_ , ise (λ x → B (FN.fsuc x)))) + (_ , ise (λ x → B (fsuc x)))) (invIso (CharacΠFinIso m)))) - ac-eq : (n m : ℕ) {B : _} → (eq : satAC ℓ n (FN.Fin m)) + ac-eq : (n m : ℕ) {B : _} → (eq : satAC ℓ n (Fin m)) → Iso.fun (ac-map' n m B eq) ≡ choiceMap {B = B} n ac-eq zero m {B = B} x = refl ac-eq (suc n) m {B = B} x = @@ -102,21 +101,19 @@ FinSatAC n (suc m) B = ; (suc x , p) j → ∣ transp (λ i → B (lem₂ x p (j ∨ i))) j (F (lem₂ x p j)) ∣ₕ}) where - lem₁ : (p : _ ) → FN.fzero ≡ (zero , p) - lem₁ p = Fin-fst-≡ refl + lem₁ : (p : _ ) → fzero ≡ (zero , p) + lem₁ p = Fin-fst-≡ {suc m} refl - lem₂ : (x : _) (p : suc x < suc m) - → Path (FN.Fin _) (FN.fsuc (x , pred-≤-pred p)) (suc x , p) - lem₂ x p = Fin-fst-≡ refl + lem₂ : (x : _) (p : suc x <ᵗ suc m) + → Path (Fin (suc m)) (fsuc (x , p)) (suc x , p) + lem₂ x p = Fin-fst-≡ {suc m} refl -- Key result for construction of cw-approx at lvl 0 -satAC∃Fin : (n : ℕ) → satAC∃ ℓ ℓ' (FN.Fin n) +satAC∃Fin : (n : ℕ) → satAC∃ ℓ ℓ' (Fin n) satAC∃Fin n = satAC→satAC∃ (FinSatAC 1 n) -InductiveFinSatAC : (n m : ℕ) → ∀ {ℓ} → satAC ℓ n (IndF.Fin m) -InductiveFinSatAC n m {ℓ} = - subst (satAC ℓ n) (isoToPath (Iso-Fin-InductiveFin m)) (FinSatAC n m) +InductiveFinSatAC : (n m : ℕ) → ∀ {ℓ} → satAC ℓ n (Fin m) +InductiveFinSatAC n m {ℓ} = FinSatAC n m -InductiveFinSatAC∃ : (n : ℕ) → satAC∃ ℓ ℓ' (IndF.Fin n) -InductiveFinSatAC∃ {ℓ = ℓ} {ℓ'} n = - subst (satAC∃ ℓ ℓ') (isoToPath (Iso-Fin-InductiveFin n)) (satAC∃Fin n) +InductiveFinSatAC∃ : (n : ℕ) → satAC∃ ℓ ℓ' (Fin n) +InductiveFinSatAC∃ {ℓ = ℓ} {ℓ'} n = satAC∃Fin n diff --git a/Cubical/Axiom/Omniscience.agda b/Cubical/Axiom/Omniscience.agda index dae8793718..1924579156 100644 --- a/Cubical/Axiom/Omniscience.agda +++ b/Cubical/Axiom/Omniscience.agda @@ -75,8 +75,8 @@ module WLPO≃ where total≡points P = isoToPath λ where .fun → points P .inv → total P - .rightInv never → isPropΠ (λ x → isProp¬ ⟨ P x ⟩) _ never - .leftInv α≡f → isSet→ isSetBool P (const false) _ α≡f + .sec never → isPropΠ (λ x → isProp¬ ⟨ P x ⟩) _ never + .ret α≡f → isSet→ isSetBool P (const false) _ α≡f WLPO≡WLPO' : WLPO A ≡ WLPO' A WLPO≡WLPO' {A = A} i = (P : A → 𝟚) → Dec (WLPO≃.total≡points P (~ i)) diff --git a/Cubical/CW/Approximation.agda b/Cubical/CW/Approximation.agda index c4b819a35e..26b09e8176 100644 --- a/Cubical/CW/Approximation.agda +++ b/Cubical/CW/Approximation.agda @@ -19,8 +19,8 @@ open import Cubical.Foundations.Function open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) open import Cubical.Data.Nat.Order -open import Cubical.Data.Fin.Inductive.Base -open import Cubical.Data.Fin.Inductive.Properties +open import Cubical.Data.Fin.Base +open import Cubical.Data.Fin.Properties open import Cubical.Data.Sigma open import Cubical.Data.Unit open import Cubical.Data.Empty as ⊥ @@ -280,7 +280,7 @@ finCWmap→CellMap n C D f = PT.map (λ {(ϕ , p) → ψ ϕ (funExt⁻ p) , funExt λ x → subst (λ x → realiseCellMap (ψ ϕ (funExt⁻ p)) x ≡ f x) - (Iso.rightInv (converges→ColimIso + (Iso.sec (converges→ColimIso {seq = realiseSeq (finCWskel→CWskel n C)} n (C .snd .snd)) x) (cong (incl {n = n}) (silly ϕ (funExt⁻ p) _) @@ -380,8 +380,7 @@ finCWmap→CellMap n C D f = ... | inr n>m | inr n>sucm = cong (CW↪ D m) (funExt⁻ (cong (fmap ϕ) (ΣPathP (refl , (isProp<ᵗ _ _)))) x) - ∙ fcomm ϕ (m , <→<ᵗ n>m) x - ∙ funExt⁻ (cong (fmap ϕ) (ΣPathP (refl , (isProp<ᵗ _ _)))) _ + ∙ fcomm ϕ (m , <ᵗ-trans (<→<ᵗ n>sucm) <ᵗsucm) x silly : (x : _) → smap ψ n x ≡ fmap ϕ (n , <ᵗsucm {n}) x silly x with (Dichotomyℕ n n) diff --git a/Cubical/CW/Base.agda b/Cubical/CW/Base.agda index 21ca55fb88..fb11002f95 100644 --- a/Cubical/CW/Base.agda +++ b/Cubical/CW/Base.agda @@ -11,7 +11,7 @@ open import Cubical.Foundations.Pointed open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) open import Cubical.Data.Nat.Order -open import Cubical.Data.Fin.Inductive.Base +open import Cubical.Data.Fin.Base open import Cubical.Data.Sigma open import Cubical.Data.Sequence open import Cubical.Data.FinSequence diff --git a/Cubical/CW/ChainComplex.agda b/Cubical/CW/ChainComplex.agda index 7f8cd8b518..648a3424c0 100644 --- a/Cubical/CW/ChainComplex.agda +++ b/Cubical/CW/ChainComplex.agda @@ -14,8 +14,8 @@ open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Int renaming (_+_ to _+ℤ_ ; _·_ to _·ℤ_) open import Cubical.Data.Bool open import Cubical.Data.Empty renaming (rec to emptyrec) -open import Cubical.Data.Fin.Inductive.Base -open import Cubical.Data.Fin.Inductive.Properties +open import Cubical.Data.Fin.Base +open import Cubical.Data.Fin.Properties open import Cubical.Data.Sigma open import Cubical.HITs.S1 @@ -148,12 +148,12 @@ module _ {ℓ} (C : CWskel ℓ) where iso-cancel-1 : suspFun (isoCofBouquetInv↑ n) ∘ suspFun (isoCofBouquet (suc n)) ≡ λ x → x iso-cancel-1 = sym (suspFunComp _ _) - ∙∙ cong suspFun (λ i x → Iso.leftInv + ∙∙ cong suspFun (λ i x → Iso.ret (BouquetIso-gen (suc n) (An+1 n) (αn+1 n) (snd C .snd .snd .snd (suc n))) x i) ∙∙ suspFunIdFun iso-cancel-2 : (isoSuspBouquetInv↑ n) ∘ (isoSuspBouquet (suc n)) ≡ λ x → x - iso-cancel-2 i x = Iso.leftInv sphereBouquetSuspIso x i + iso-cancel-2 i x = Iso.ret sphereBouquetSuspIso x i left-maps = (isoSuspBouquet↑ n) ∘ (suspFun (isoSuspBouquet n)) ∘ (suspFun (suspFun (isoCofBouquet n))) ∘ (suspFun (suspFun (to_cofibCW n C))) @@ -232,7 +232,7 @@ module _ {ℓ} (C : CWskel ℓ) where opaque preϵpre∂≡0 : ∀ (x : SphereBouquet 1 (Fin (preboundary.An+1 0))) → (preϵ ∘ preboundary.pre∂ 0) x ≡ inl tt preϵpre∂≡0 x = cong (ε ∘ (suspFun isoCofBouquetInv)) - (Iso.leftInv sphereBouquetSuspIso + (Iso.ret sphereBouquetSuspIso (((suspFun isoCofBouquet) ∘ (suspFun (to_cofibCW 0 C)) ∘ (δ 1 C) ∘ isoCofBouquetInv↑) x)) ∙ cong ε (aux (((suspFun (to_cofibCW 0 C)) ∘ (δ 1 C) ∘ isoCofBouquetInv↑) x)) ∙ εδ (isoCofBouquetInv↑ x) @@ -241,7 +241,7 @@ module _ {ℓ} (C : CWskel ℓ) where aux : ∀ (x : Susp (cofibCW 0 C)) → (suspFun (isoCofBouquetInv) ∘ (suspFun isoCofBouquet)) x ≡ x aux north = refl aux south = refl - aux (merid a i) j = merid (Iso.leftInv (BouquetIso-gen 0 An αn (snd C .snd .snd .snd 0)) a j) i + aux (merid a i) j = merid (Iso.ret (BouquetIso-gen 0 An αn (snd C .snd .snd .snd 0)) a j) i ϵ : AbGroupHom (ℤ[A 0 ]) (ℤ[Fin 1 ]) ϵ = bouquetDegree preϵ diff --git a/Cubical/CW/Connected.agda b/Cubical/CW/Connected.agda index c85d2c85fb..8eca158b79 100644 --- a/Cubical/CW/Connected.agda +++ b/Cubical/CW/Connected.agda @@ -34,8 +34,8 @@ open import Cubical.Foundations.Univalence open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) open import Cubical.Data.Nat.Order open import Cubical.Data.Nat.Order.Inductive -open import Cubical.Data.Fin.Inductive.Base -open import Cubical.Data.Fin.Inductive.Properties as Ind +open import Cubical.Data.Fin.Base +open import Cubical.Data.Fin.Properties open import Cubical.Data.Sigma open import Cubical.Data.Sequence open import Cubical.Data.Unit @@ -48,7 +48,7 @@ open import Cubical.HITs.Pushout open import Cubical.HITs.Susp open import Cubical.HITs.SequentialColimit open import Cubical.HITs.SphereBouquet -open import Cubical.HITs.PropositionalTruncation as PT +open import Cubical.HITs.PropositionalTruncation as PT hiding (elimFin) open import Cubical.HITs.Truncation as TR open import Cubical.HITs.Wedge @@ -146,7 +146,7 @@ private with (dis (t fzero true) (t fzero false)) | (allConst? {n = n} dis λ x p → t (fsuc x) p) ... | yes p | inl x = - inl (Ind.elimFin-alt (funExt + inl (elimFin-alt (funExt (λ { false → sym p ; true → refl})) x) ... | yes p | inr x = inr (_ , (snd x)) ... | no ¬p | q = inr (_ , ¬p) @@ -155,7 +155,7 @@ private isSurj-α₀ : (n m : ℕ) (f : Fin n × S₊ 0 → Fin (suc (suc m))) → isConnected 2 (Pushout f fst) → (y : _) → Σ[ x ∈ _ ] f x ≡ y -isSurj-α₀ n m f c y with (inhabitedFibres?-Fin×S⁰ DiscreteFin n f y) +isSurj-α₀ n m f c y with (inhabitedFibres?-Fin×S⁰ discreteFin n f y) ... | inl x = x isSurj-α₀ n m f c x₀ | inr q = ⊥.rec nope where @@ -189,7 +189,7 @@ isSurj-α₀ n m f c x₀ | inr q = ⊥.rec nope notAllLoops-α₀ : (n m : ℕ) (f : Fin n × S₊ 0 → Fin (suc (suc m))) → isConnected 2 (Pushout f fst) → Σ[ x ∈ Fin n ] (¬ f (x , true) ≡ f (x , false)) -notAllLoops-α₀ n m f c with (allConst? DiscreteFin (λ x y → f (x , y))) +notAllLoops-α₀ n m f c with (allConst? discreteFin (λ x y → f (x , y))) ... | inr x = x notAllLoops-α₀ n m f c | inl q = ⊥.rec (TR.rec isProp⊥ (λ p → subst T p tt) @@ -198,7 +198,7 @@ notAllLoops-α₀ n m f c | inl q = ∣ inl flast ∣ ∣ inl fzero ∣))) where inrT : Fin n → Type - inrT x with (DiscreteFin (f (x , true)) fzero) + inrT x with (discreteFin (f (x , true)) fzero) ... | yes p = ⊥ ... | no ¬p = Unit @@ -207,7 +207,7 @@ notAllLoops-α₀ n m f c | inl q = inlT (suc x , p) = Unit inlrT-pre : (a : _) → inlT (f (a , true)) ≡ inrT a - inlrT-pre a with ((DiscreteFin (f (a , true)) fzero)) + inlrT-pre a with ((discreteFin (f (a , true)) fzero)) ... | yes p = cong inlT p inlrT-pre s | no ¬p with (f (s , true)) ... | zero , tt = ⊥.rec (¬p refl) @@ -364,8 +364,8 @@ module shrinkPushoutLemma (A : Type ℓ) (B : Type ℓ') Iso-PushoutF-Pushout-g∘f : Iso (Pushout F fst) (Pushout (g ∘ f) fst) Iso.fun Iso-PushoutF-Pushout-g∘f = PushoutF→Pushout-g∘f Iso.inv Iso-PushoutF-Pushout-g∘f = Pushout-g∘f-fst→Unit⊎A - Iso.rightInv Iso-PushoutF-Pushout-g∘f = PushoutF→Pushout-g∘f→PushoutF - Iso.leftInv Iso-PushoutF-Pushout-g∘f = Pushout-g∘f→PushoutF→Pushout-g∘f + Iso.sec Iso-PushoutF-Pushout-g∘f = PushoutF→Pushout-g∘f→PushoutF + Iso.ret Iso-PushoutF-Pushout-g∘f = Pushout-g∘f→PushoutF→Pushout-g∘f module CWLemmas-0Connected where @@ -395,13 +395,13 @@ module CWLemmas-0Connected where help : (y : Unit ⊎ Fin (suc n)) (x : Bool) → Unit⊎Fin→Fin - (F (λ x₁ → Ind.elimFin (inl tt) inr (f (injectSuc (fst x₁) , snd x₁))) + (F (λ x₁ → elimFin (inl tt) inr (f (injectSuc (fst x₁) , snd x₁))) (f (flast , true) .fst , q) (y , x)) ≡ f (Unit⊎Fin→Fin y , x) help (inl a) false = sym p help (inl b) true = Σ≡Prop (λ _ → isProp<ᵗ) refl - help (inr a) false = Iso.leftInv Iso-Fin-Unit⊎Fin _ - help (inr a) true = Iso.leftInv Iso-Fin-Unit⊎Fin _ + help (inr a) false = Iso.ret Iso-Fin-Unit⊎Fin _ + help (inr a) true = Iso.ret Iso-Fin-Unit⊎Fin _ -- If the domain of f is instead Fin 1 × S⁰, this must also be the -- codomain of f. @@ -442,8 +442,8 @@ module CWLemmas-0Connected where mainIso : Iso (Fin 1 × S₊ 0) (Fin (suc (suc m))) Iso.fun mainIso = f Iso.inv mainIso x = isSurj-α₀ (suc zero) m f c x .fst - Iso.rightInv mainIso x = isSurj-α₀ 1 m f c x .snd - Iso.leftInv mainIso ((zero , tt) , x) = + Iso.sec mainIso x = isSurj-α₀ 1 m f c x .snd + Iso.ret mainIso ((zero , tt) , x) = (f-inj _ _ (isSurj-α₀ 1 m f c (f (fzero , x)) .snd)) -- Strengthening of shrinkImageAttachingMapLem for domain of f of @@ -506,9 +506,9 @@ module CWLemmas-0Connected where ¬f'≡flast : ¬ (f' (flast , true) ≡ flast) ¬f'≡flast p = xpath (cong f (ΣPathP (sym (swapFinβₗ flast x₀) , refl)) - ∙ sym (Iso.rightInv FinIso2 _) + ∙ sym (Iso.sec FinIso2 _) ∙ cong (Iso.inv FinIso2) (p ∙ sym f'≡flast) - ∙ Iso.rightInv FinIso2 _ + ∙ Iso.sec FinIso2 _ ∙ cong f (ΣPathP (swapFinβₗ flast x₀ , refl))) f'-bound : fst (f' (flast , true)) <ᵗ suc m @@ -522,7 +522,7 @@ module CWLemmas-0Connected where (isoToEquiv FinIso2) (isoToEquiv (swapFinIso flast x₀)) (funExt (λ x → cong (FinIso2 .Iso.fun ∘ f) - (sym (Iso.rightInv Fin×S⁰-swapIso x)))) + (sym (Iso.sec Fin×S⁰-swapIso x)))) refl -- the main lemma: a pushout of f : Fin n × S⁰ → Fin m is equivalent diff --git a/Cubical/CW/Homology/Base.agda b/Cubical/CW/Homology/Base.agda index e2ee70456f..23748c4d09 100644 --- a/Cubical/CW/Homology/Base.agda +++ b/Cubical/CW/Homology/Base.agda @@ -21,7 +21,7 @@ open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Function open import Cubical.Data.Nat -open import Cubical.Data.Fin.Inductive.Base +open import Cubical.Data.Fin.Base open import Cubical.Data.Sigma open import Cubical.Data.Int @@ -117,11 +117,11 @@ H̃ˢᵏᵉˡ→Iso : {C : CWskel ℓ} {D : CWskel ℓ'} (m : ℕ) (e : realise C ≃ realise D) → GroupIso (H̃ˢᵏᵉˡ C m) (H̃ˢᵏᵉˡ D m) Iso.fun (fst (H̃ˢᵏᵉˡ→Iso m e)) = fst (H̃ˢᵏᵉˡ→ m (fst e)) Iso.inv (fst (H̃ˢᵏᵉˡ→Iso m e)) = fst (H̃ˢᵏᵉˡ→ m (invEq e)) -Iso.rightInv (fst (H̃ˢᵏᵉˡ→Iso m e)) = +Iso.sec (fst (H̃ˢᵏᵉˡ→Iso m e)) = funExt⁻ (cong fst (sym (H̃ˢᵏᵉˡ→comp m (fst e) (invEq e)) ∙∙ cong (H̃ˢᵏᵉˡ→ m) (funExt (secEq e)) ∙∙ H̃ˢᵏᵉˡ→id m)) -Iso.leftInv (fst (H̃ˢᵏᵉˡ→Iso m e)) = +Iso.ret (fst (H̃ˢᵏᵉˡ→Iso m e)) = funExt⁻ (cong fst (sym (H̃ˢᵏᵉˡ→comp m (invEq e) (fst e)) ∙∙ cong (H̃ˢᵏᵉˡ→ m) (funExt (retEq e)) ∙∙ H̃ˢᵏᵉˡ→id m)) @@ -233,11 +233,11 @@ H̃ᶜʷ→Iso : {C : CW ℓ} {D : CW ℓ'} (m : ℕ) (e : fst C ≃ fst D) → GroupIso (H̃ᶜʷ C m) (H̃ᶜʷ D m) Iso.fun (fst (H̃ᶜʷ→Iso m e)) = fst (H̃ᶜʷ→ m (fst e)) Iso.inv (fst (H̃ᶜʷ→Iso m e)) = fst (H̃ᶜʷ→ m (invEq e)) -Iso.rightInv (fst (H̃ᶜʷ→Iso m e)) = +Iso.sec (fst (H̃ᶜʷ→Iso m e)) = funExt⁻ (cong fst (sym (H̃ᶜʷ→comp m (fst e) (invEq e)) ∙∙ cong (H̃ᶜʷ→ m) (funExt (secEq e)) ∙∙ H̃ᶜʷ→id m)) -Iso.leftInv (fst (H̃ᶜʷ→Iso m e)) = +Iso.ret (fst (H̃ᶜʷ→Iso m e)) = funExt⁻ (cong fst (sym (H̃ᶜʷ→comp m (invEq e) (fst e)) ∙∙ cong (H̃ᶜʷ→ m) (funExt (retEq e)) ∙∙ H̃ᶜʷ→id m)) diff --git a/Cubical/CW/Homology/Groups/CofibFinSphereBouquetMap.agda b/Cubical/CW/Homology/Groups/CofibFinSphereBouquetMap.agda index 8f2420a317..371ce92fd3 100644 --- a/Cubical/CW/Homology/Groups/CofibFinSphereBouquetMap.agda +++ b/Cubical/CW/Homology/Groups/CofibFinSphereBouquetMap.agda @@ -20,7 +20,7 @@ open import Cubical.CW.Instances.SphereBouquetMap open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) open import Cubical.Data.Int open import Cubical.Data.Bool -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin hiding (_/_) open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Sigma open import Cubical.Data.Empty as ⊥ @@ -84,19 +84,19 @@ module _ {c1 c2 : ℕ} {n : ℕ} (α : FinSphereBouquetMap c1 c2 n) where HₙSphereBouquetⁿ/→ℤ[]/ImSphereMap-fun p q inv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre p q) = HₙSphereBouquetⁿ/→ℤ[]/ImSphereMap-inv p q - rightInv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (lt x) q) f = + sec (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (lt x) q) f = ⊥.rec (¬m<ᵗm x) - rightInv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (eq x) (lt y)) f = refl - rightInv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (eq x) (eq y)) f = refl - rightInv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (eq x) (gt y)) f = refl - rightInv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (gt x) q) f = + sec (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (eq x) (lt y)) f = refl + sec (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (eq x) (eq y)) f = refl + sec (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (eq x) (gt y)) f = refl + sec (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (gt x) q) f = ⊥.rec (¬m<ᵗm x) - leftInv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (lt x) q) f = + ret (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (lt x) q) f = ⊥.rec (¬m<ᵗm x) - leftInv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (eq x) (lt y)) f = refl - leftInv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (eq x) (eq y)) f = refl - leftInv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (eq x) (gt y)) f = refl - leftInv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (gt x) q) f = + ret (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (eq x) (lt y)) f = refl + ret (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (eq x) (eq y)) f = refl + ret (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (eq x) (gt y)) f = refl + ret (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (gt x) q) f = ⊥.rec (¬m<ᵗm x) HₙSphereBouquetⁿ/→ℤ[]/ImSphereMap-fun-hom : @@ -311,14 +311,14 @@ module _ {c1 c2 : ℕ} {n : ℕ} (α : FinSphereBouquetMap c1 c2 n) where HₙSphereBouquetⁿ/→ℤ[]/ImSphereMap inv (fst GroupIso-Hₙ₊₁SphereBouquetⁿ/→ℤ[]/ImSphereMap) = ℤ[]/ImSphereMap→HₙSphereBouquetⁿ/ - rightInv (fst GroupIso-Hₙ₊₁SphereBouquetⁿ/→ℤ[]/ImSphereMap) = + sec (fst GroupIso-Hₙ₊₁SphereBouquetⁿ/→ℤ[]/ImSphereMap) = SQ.elimProp (λ _ → squash/ _ _) - λ f → cong [_] (rightInv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre + λ f → cong [_] (sec (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (suc n ≟ᵗ suc n) (suc n ≟ᵗ suc (suc n))) f) - leftInv (fst GroupIso-Hₙ₊₁SphereBouquetⁿ/→ℤ[]/ImSphereMap) = + ret (fst GroupIso-Hₙ₊₁SphereBouquetⁿ/→ℤ[]/ImSphereMap) = SQ.elimProp (λ _ → squash/ _ _) λ f → cong [_] (Σ≡Prop (λ _ → isSetΠ (λ _ → isSetℤ) _ _) - (leftInv (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre + (ret (Iso-HₙSphereBouquetⁿ/-ℤ[]/ImSphereMap-pre (suc n ≟ᵗ suc n) (suc n ≟ᵗ suc (suc n))) (fst f))) snd GroupIso-Hₙ₊₁SphereBouquetⁿ/→ℤ[]/ImSphereMap = makeIsGroupHom HₙSphereBouquetⁿ/→ℤ[]/ImSphereMap-hom diff --git a/Cubical/CW/Homology/Groups/Sn.agda b/Cubical/CW/Homology/Groups/Sn.agda index 4f4ec9f954..8dca68b367 100644 --- a/Cubical/CW/Homology/Groups/Sn.agda +++ b/Cubical/CW/Homology/Groups/Sn.agda @@ -8,7 +8,8 @@ open import Cubical.Foundations.Isomorphism open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Int -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin +open import Cubical.Data.Fin.Properties open import Cubical.Data.Sigma open import Cubical.Data.Empty as ⊥ @@ -80,8 +81,8 @@ module _ (n : ℕ) where ℤ≅HₙSⁿ : GroupIso ℤGroup (H̃ˢᵏᵉˡ (Sˢᵏᵉˡ (suc n)) (suc n)) fun (fst ℤ≅HₙSⁿ) = ℤ→HₙSⁿ .fst inv (fst ℤ≅HₙSⁿ) = HₙSⁿ→ℤ - rightInv (fst ℤ≅HₙSⁿ) = HₙSⁿ→ℤ→HₙSⁿ - leftInv (fst ℤ≅HₙSⁿ) _ = refl + sec (fst ℤ≅HₙSⁿ) = HₙSⁿ→ℤ→HₙSⁿ + ret (fst ℤ≅HₙSⁿ) _ = refl snd ℤ≅HₙSⁿ = ℤ→HₙSⁿ .snd HₙSⁿ≅ℤ : GroupIso (H̃ˢᵏᵉˡ (Sˢᵏᵉˡ (suc n)) (suc n)) ℤGroup diff --git a/Cubical/CW/Homology/Groups/Subcomplex.agda b/Cubical/CW/Homology/Groups/Subcomplex.agda index 6f575c55f2..d4f9832bb9 100644 --- a/Cubical/CW/Homology/Groups/Subcomplex.agda +++ b/Cubical/CW/Homology/Groups/Subcomplex.agda @@ -28,8 +28,8 @@ open import Cubical.Foundations.GroupoidLaws open import Cubical.Data.Nat -open import Cubical.Data.Fin.Inductive.Base -open import Cubical.Data.Fin.Inductive.Properties +open import Cubical.Data.Fin.Base +open import Cubical.Data.Fin.Properties open import Cubical.Data.Sigma open import Cubical.Data.Empty as ⊥ open import Cubical.Data.Nat.Order.Inductive @@ -166,7 +166,7 @@ subComplexHomologyEquiv≡ C m n q = (funExt⁻ (CW↑GenComm C k (suc m) m (suc m ≟ᵗ suc k) q) x ∙ funExt⁻ (subComplex→map'Charac C m (suc m ≟ᵗ m) (m ≟ᵗ m)) (CW↑Gen (subComplex C m) k (suc m) (suc m ≟ᵗ suc k) q x) - ∙ cong (CW↪ C m) (sym (Iso.leftInv ( (realiseSubComplex m C) ) _) + ∙ cong (CW↪ C m) (sym (Iso.ret ( (realiseSubComplex m C) ) _) ∙ cong (Iso.inv (realiseSubComplex m C)) ((push _ ∙ cong (incl {n = suc m}) (cong (CW↪ (subComplex C m) m) diff --git a/Cubical/CW/Homotopy.agda b/Cubical/CW/Homotopy.agda index 0a5cd7ebf1..8350efcc69 100644 --- a/Cubical/CW/Homotopy.agda +++ b/Cubical/CW/Homotopy.agda @@ -22,8 +22,8 @@ open import Cubical.Foundations.GroupoidLaws open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Int renaming (_·_ to _·ℤ_ ; -_ to -ℤ_) -open import Cubical.Data.Fin.Inductive.Base -open import Cubical.Data.Fin.Inductive.Properties +open import Cubical.Data.Fin.Base +open import Cubical.Data.Fin.Properties open import Cubical.Data.Sequence open import Cubical.Data.FinSequence @@ -695,7 +695,7 @@ module chainHomEquation (m : ℕ) (C : CWskel ℓ) (D : CWskel ℓ') ∘ suspFun (to_cofibCW (fst n) D) ∘ δ (suc (fst n)) D ∘ X ∘ Hn+1/Hn n ∘ Iso.inv (cofibIso (fst n) C)) - (sym (funExt (Iso.leftInv (BouquetIso D (suc (fst n)))))) + (sym (funExt (Iso.ret (BouquetIso D (suc (fst n)))))) -- connecting MMΣf to fn+1 bouquetΣf : bouquetDegree (bouquetMMmap merid-f merid-tt MMΣf) ≡ fn @@ -797,7 +797,7 @@ module chainHomEquationSuc (m : ℕ) (C : CWskel ℓ) (D : CWskel ℓ') ∘ (Hn+1/Hn (injectSuc n)) ∘ X ∘ suspFun (to_cofibCW (fst n) C) ∘ δ (suc (fst n)) C ∘ Iso.inv (BouquetIso C (suc (fst n)))) - (sym (funExt (Iso.leftInv (cofibIso (fst n) C)))) + (sym (funExt (Iso.ret (cofibIso (fst n) C)))) chainHomotopySuc : subtrGroupHom _ _ fn gn ≡ addGroupHom _ _ ∂H H∂' chainHomotopySuc = chainHomotopy2 ∙ cong (addGroupHom _ _ ∂H) bouquetΣH∂ diff --git a/Cubical/CW/HurewiczTheorem.agda b/Cubical/CW/HurewiczTheorem.agda index 031468afa5..106c15e923 100644 --- a/Cubical/CW/HurewiczTheorem.agda +++ b/Cubical/CW/HurewiczTheorem.agda @@ -35,7 +35,7 @@ open import Cubical.CW.Instances.Lift open import Cubical.Data.Empty as ⊥ open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) open import Cubical.Data.Bool -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Sigma open import Cubical.Data.FinSequence @@ -599,9 +599,9 @@ private λ k → cong (fst ϕ) (sym (cong (inv' (fst (π'ᵃᵇCofibFinSphereBouquetMap≅ℤ[]/BouquetDegree α))) (π'ᵃᵇCofibFinSphereBouquetMap≅ℤ[]/BouquetDegreePresGens α k)) - ∙ leftInv (fst (π'ᵃᵇCofibFinSphereBouquetMap≅ℤ[]/BouquetDegree α)) _) + ∙ ret (fst (π'ᵃᵇCofibFinSphereBouquetMap≅ℤ[]/BouquetDegree α)) _) ∙ hyp k - ∙ sym (leftInv (fst (GroupIso-Hₙ₊₁SphereBouquetⁿ/→ℤ[]/ImSphereMap (fst α))) + ∙ sym (ret (fst (GroupIso-Hₙ₊₁SphereBouquetⁿ/→ℤ[]/ImSphereMap (fst α))) (genH̃ˢᵏᵉˡSphereBouquet/ˢᵏᵉˡ (fst α) k)) ∙ cong (ℤ[]/ImSphereMap→HₙSphereBouquetⁿ/ (fst α)) (isGen-genH̃ˢᵏᵉˡSphereBouquet/ˢᵏᵉˡ (fst α) k) @@ -1131,7 +1131,7 @@ private Xˢᵘᵇ→∙X₃₊ₙ : Xˢᵘᵇ∙ →∙ (X₃₊ₙ , CWskel∙ Xˢᵏᵉˡ (fst t) (suc (suc n))) fst Xˢᵘᵇ→∙X₃₊ₙ = inv' X₃₊ₙ≅X∞ - snd Xˢᵘᵇ→∙X₃₊ₙ = leftInv X₃₊ₙ≅X∞ _ + snd Xˢᵘᵇ→∙X₃₊ₙ = ret X₃₊ₙ≅X∞ _ Xˢᵘᵇ→∙X : Xˢᵘᵇ∙ →∙ X∙ Xˢᵘᵇ→∙X = (e∞⃖ , e∞⃖-incl) diff --git a/Cubical/CW/Instances/Empty.agda b/Cubical/CW/Instances/Empty.agda index a8ab3319f4..ba96528e4c 100644 --- a/Cubical/CW/Instances/Empty.agda +++ b/Cubical/CW/Instances/Empty.agda @@ -7,7 +7,7 @@ open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin open import Cubical.Data.Empty open import Cubical.HITs.Pushout diff --git a/Cubical/CW/Instances/Pushout.agda b/Cubical/CW/Instances/Pushout.agda index 0a0005680b..9a3d22c928 100644 --- a/Cubical/CW/Instances/Pushout.agda +++ b/Cubical/CW/Instances/Pushout.agda @@ -21,7 +21,8 @@ open import Cubical.Data.NatMinusOne open import Cubical.Data.Nat.Order open import Cubical.Data.Bool open import Cubical.Data.Sum as ⊎ -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin +open import Cubical.Data.Fin.Properties open import Cubical.Data.Sigma open import Cubical.Data.Sequence open import Cubical.Data.FinSequence @@ -191,12 +192,12 @@ module CWPushout (ℓ : Level) (Bʷ Cʷ Dʷ : CWskel ℓ) → pushoutIso₀-inv (pushoutIso₀-fun x) ≡ x pushoutIso₀-leftInv (inl x) = (λ i → pushoutIso₀-helper - (Iso.leftInv (Iso-Fin⊎Fin-Fin+ {card C zero} {card D zero}) + (Iso.ret (Iso-Fin⊎Fin-Fin+ {card C zero} {card D zero}) (inl (CW₁-discrete C .fst x)) i)) ∙ λ i → inl (retEq (CW₁-discrete C) x i) pushoutIso₀-leftInv (inr x) = (λ i → pushoutIso₀-helper - (Iso.leftInv (Iso-Fin⊎Fin-Fin+ {card C zero} {card D zero}) + (Iso.ret (Iso-Fin⊎Fin-Fin+ {card C zero} {card D zero}) (inr (CW₁-discrete D .fst x)) i)) ∙ λ i → inr (retEq (CW₁-discrete D) x i) pushoutIso₀-leftInv (push a i) with (B .snd .snd .snd .fst a) @@ -219,7 +220,7 @@ module CWPushout (ℓ : Level) (Bʷ Cʷ Dʷ : CWskel ℓ) pushoutIso₀-rightInv (inr x) = pushoutIso₀-helper₁ (Iso.inv (Iso-Fin⊎Fin-Fin+ {card C zero} {card D zero}) x) - ∙ λ i → inr (Iso.rightInv (Iso-Fin⊎Fin-Fin+ {card C zero} {card D zero}) x i) + ∙ λ i → inr (Iso.sec (Iso-Fin⊎Fin-Fin+ {card C zero} {card D zero}) x i) pushoutIso₀ : Iso (pushoutA (suc zero)) (Pushout pushoutMap₀ fst) pushoutIso₀ = @@ -322,8 +323,8 @@ module CWPushout (ℓ : Level) (Bʷ Cʷ Dʷ : CWskel ℓ) IsoModifiedPushout : (n : ℕ) → Iso (pushoutA (suc (suc n))) (modifiedPushout n) Iso.fun (IsoModifiedPushout n) = Pushout→modifiedPushout n Iso.inv (IsoModifiedPushout n) = modifiedPushout→Pushout n - Iso.rightInv (IsoModifiedPushout n) = modP→Pushout→modP n - Iso.leftInv (IsoModifiedPushout n) = Pushout→modP→Pushout n + Iso.sec (IsoModifiedPushout n) = modP→Pushout→modP n + Iso.ret (IsoModifiedPushout n) = Pushout→modP→Pushout n pushoutIsoₛ-filler0 : (n : ℕ) (b : A B n) (x : S⁻ n) → I → I → pushoutA (suc n) pushoutIsoₛ-filler0 n b x i j = @@ -544,8 +545,8 @@ module CWPushout (ℓ : Level) (Bʷ Cʷ Dʷ : CWskel ℓ) pushoutIsoₛ : (n : ℕ) → Iso (modifiedPushout n) (Pushout (pushoutMapₛ n) fst) Iso.fun (pushoutIsoₛ n) = pushoutIsoₛ-fun n Iso.inv (pushoutIsoₛ n) = pushoutIsoₛ-inv n - Iso.rightInv (pushoutIsoₛ n) = pushoutIsoₛ-rightInv n - Iso.leftInv (pushoutIsoₛ n) = pushoutIsoₛ-leftInv n + Iso.sec (pushoutIsoₛ n) = pushoutIsoₛ-rightInv n + Iso.ret (pushoutIsoₛ n) = pushoutIsoₛ-leftInv n pushoutIsoₜ : (n : ℕ) → Iso (pushoutA (suc n)) (Pushout (pushoutMap n) fst) pushoutIsoₜ zero = pushoutIso₀ diff --git a/Cubical/CW/Instances/Sn.agda b/Cubical/CW/Instances/Sn.agda index 77dc9a0093..3d2e8a876c 100644 --- a/Cubical/CW/Instances/Sn.agda +++ b/Cubical/CW/Instances/Sn.agda @@ -15,7 +15,8 @@ open import Cubical.Foundations.HLevels open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) open import Cubical.Data.Bool -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin +open import Cubical.Data.Fin.Properties open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Sigma open import Cubical.Data.Empty as ⊥ @@ -138,10 +139,10 @@ fun (isPushoutSuspSphereIso n m e s) (merid a i) = push (fzero , a) i inv (isPushoutSuspSphereIso n m e s) (inl x) = north inv (isPushoutSuspSphereIso n m e s) (inr x) = south inv (isPushoutSuspSphereIso n m e s) (push a i) = merid (snd a) i -rightInv (isPushoutSuspSphereIso n m e s) (inl x) i = +sec (isPushoutSuspSphereIso n m e s) (inl x) i = inl (isContrSfamGen (suc n) m (subst (_<ᵗ suc n) e <ᵗsucm) s .snd x i) -rightInv (isPushoutSuspSphereIso n m e s) (inr (zero , tt)) j = inr fzero -rightInv (isPushoutSuspSphereIso n m e s) (push ((zero , tt) , a) i) = help i +sec (isPushoutSuspSphereIso n m e s) (inr (zero , tt)) j = inr fzero +sec (isPushoutSuspSphereIso n m e s) (push ((zero , tt) , a) i) = help i where ee = subst (_<ᵗ suc n) e <ᵗsucm help : Square {A = Pushout {A = Fin 1 × S₊ m} @@ -155,9 +156,9 @@ rightInv (isPushoutSuspSphereIso n m e s) (push ((zero , tt) , a) i) = help i (isContrSfamGen (suc n) m ee s .snd (Sgen.Sfam∙ (suc n) m s)) refl i j)) ◁ λ i j → push (fzero , a) i -leftInv (isPushoutSuspSphereIso n m e s) north = refl -leftInv (isPushoutSuspSphereIso n m e s) south = refl -leftInv (isPushoutSuspSphereIso n m e s) (merid a i) = refl +ret (isPushoutSuspSphereIso n m e s) north = refl +ret (isPushoutSuspSphereIso n m e s) south = refl +ret (isPushoutSuspSphereIso n m e s) (merid a i) = refl SfamGenTopElement : (n m : ℕ) → (n <ᵗ m) → (q : _) → S₊ n ≃ Sgen.Sfam n m q SfamGenTopElement n (suc m) p (lt x) = ⊥.rec (¬squeeze (x , p)) @@ -175,18 +176,18 @@ SuspSphere→Sphere (suc n) (merid a i) = merid a i IsoSucSphereSusp' : (n : ℕ) → Iso (S₊ (suc n)) (Susp (S₊ n)) fun (IsoSucSphereSusp' n) = fun (IsoSucSphereSusp n) inv (IsoSucSphereSusp' n) = SuspSphere→Sphere n -rightInv (IsoSucSphereSusp' zero) north = refl -rightInv (IsoSucSphereSusp' zero) south = SuspBool→S¹→SuspBool south -rightInv (IsoSucSphereSusp' zero) (merid a i) = +sec (IsoSucSphereSusp' zero) north = refl +sec (IsoSucSphereSusp' zero) south = SuspBool→S¹→SuspBool south +sec (IsoSucSphereSusp' zero) (merid a i) = SuspBool→S¹→SuspBool (merid a i) -rightInv (IsoSucSphereSusp' (suc n)) north = refl -rightInv (IsoSucSphereSusp' (suc n)) south = refl -rightInv (IsoSucSphereSusp' (suc n)) (merid a i) = refl -leftInv (IsoSucSphereSusp' zero) base = S¹→SuspBool→S¹ base -leftInv (IsoSucSphereSusp' zero) (loop i) = S¹→SuspBool→S¹ (loop i) -leftInv (IsoSucSphereSusp' (suc n)) north = refl -leftInv (IsoSucSphereSusp' (suc n)) south = refl -leftInv (IsoSucSphereSusp' (suc n)) (merid a i) = refl +sec (IsoSucSphereSusp' (suc n)) north = refl +sec (IsoSucSphereSusp' (suc n)) south = refl +sec (IsoSucSphereSusp' (suc n)) (merid a i) = refl +ret (IsoSucSphereSusp' zero) base = S¹→SuspBool→S¹ base +ret (IsoSucSphereSusp' zero) (loop i) = S¹→SuspBool→S¹ (loop i) +ret (IsoSucSphereSusp' (suc n)) north = refl +ret (IsoSucSphereSusp' (suc n)) south = refl +ret (IsoSucSphereSusp' (suc n)) (merid a i) = refl -- Our family Sfam satisfies the pushout property (i.e. is a CW complex) SαEqGen : (n m : ℕ) (p : Trichotomyᵗ (suc m) (suc n)) (q : _) diff --git a/Cubical/CW/Instances/SphereBouquetMap.agda b/Cubical/CW/Instances/SphereBouquetMap.agda index d32c8f58e3..13418da9ce 100644 --- a/Cubical/CW/Instances/SphereBouquetMap.agda +++ b/Cubical/CW/Instances/SphereBouquetMap.agda @@ -17,7 +17,7 @@ open import Cubical.Foundations.Univalence open import Cubical.Data.Empty as ⊥ open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) open import Cubical.Data.Bool -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Sigma open import Cubical.Data.Unit diff --git a/Cubical/CW/Instances/Unit.agda b/Cubical/CW/Instances/Unit.agda index 5206269abd..a6aae6b6cf 100644 --- a/Cubical/CW/Instances/Unit.agda +++ b/Cubical/CW/Instances/Unit.agda @@ -9,7 +9,8 @@ open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Univalence open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin +open import Cubical.Data.Fin.Properties open import Cubical.Data.Empty as ⊥ open import Cubical.Data.Unit open import Cubical.Data.Sequence.Base diff --git a/Cubical/CW/Map.agda b/Cubical/CW/Map.agda index 6ed6d6663f..697c14a907 100644 --- a/Cubical/CW/Map.agda +++ b/Cubical/CW/Map.agda @@ -20,8 +20,8 @@ open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Int renaming (_·_ to _·ℤ_ ; -_ to -ℤ_) open import Cubical.Data.Bool -open import Cubical.Data.Fin.Inductive.Base -open import Cubical.Data.Fin.Inductive.Properties +open import Cubical.Data.Fin.Base +open import Cubical.Data.Fin.Properties open import Cubical.Data.Sigma open import Cubical.Data.Empty as ⊥ open import Cubical.Data.Sequence @@ -137,7 +137,7 @@ module _ (m : ℕ) (C : CWskel ℓ) (n' : Fin m) where ∘ f ∘ Iso.inv (BouquetIso-gen n (card C n) (α C n) (e C n))) fn+1/fn-id - ∙ funExt (Iso.rightInv (BouquetIso-gen n (card C n) (α C n) (e C n))) + ∙ funExt (Iso.sec (BouquetIso-gen n (card C n) (α C n) (e C n))) chainFunct-id : chainFunct ≡ idGroupHom chainFunct-id = cong bouquetDegree bouquetFunct-id ∙ bouquetDegreeId @@ -170,7 +170,7 @@ module _ (m : ℕ) (g : finCellMap m D E) (f : finCellMap m C D) (n' : Fin m) wh bouquetFunct-comp = funExt λ x → cong (Iso.fun (BouquetIso-gen n (card E n) (α E n) (e E n))) (cong pf2.fn+1/fn - (Iso.leftInv (BouquetIso-gen n (card D n) (α D n) (e D n)) _) + (Iso.ret (BouquetIso-gen n (card D n) (α D n) (e D n)) _) ∙ funExt⁻ fn+1/fn-comp (Iso.inv (BouquetIso-gen n (card C n) (α C n) (e C n)) x)) @@ -253,11 +253,11 @@ module functoriality (m : ℕ) (f : finCellMap (suc m) C D) where → suspFun (inv (iso2 C (fst n))) (suspFun (fun (iso2 C (fst n))) x) ≡ x step3aux north = refl step3aux south = refl - step3aux (merid a i) j = merid (leftInv (iso2 C (fst n)) a j) i + step3aux (merid a i) j = merid (ret (iso2 C (fst n)) a j) i module _ (x : bouquet C (suc (fst n)) (suc (fst n))) where step1 = cong (suspFun (bouquetFunct (injectSuc n))) - (leftInv (iso1 C (fst n)) + (ret (iso1 C (fst n)) (((suspFun (fun (iso2 C (fst n)))) ∘ (suspFun (to_cofibCW (fst n) C)) ∘ (δ (suc (fst n)) C) ∘ (inv (iso2 C (suc (fst n))))) x)) @@ -292,7 +292,7 @@ module functoriality (m : ℕ) (f : finCellMap (suc m) C D) where step7 = cong ((suspFun (fun (iso2 D (fst n)))) ∘ (suspFun (to_cofibCW (fst n) D)) ∘ (δ (suc (fst n)) D)) - (sym (leftInv (iso2 D (suc (fst n))) + (sym (ret (iso2 D (suc (fst n))) (((fn+1/fn (fsuc n)) ∘ (inv (iso2 C (suc (fst n))))) x))) main = step1 ∙ step2 ∙ step3 ∙ step4 ∙ step5 ∙ step6 ∙ step7 @@ -341,7 +341,7 @@ module augmentationFunct (m : ℕ) (f : finCellMap (suc m) C D) where commPreϵ : (x : SphereBouquet 1 (A C 0)) → ((augmentation.preϵ D) ∘ (bouquetSusp→ (bouquetFunct fzero))) x ≡ augmentation.preϵ C x - commPreϵ x = cong ((ε D) ∘ (suspFun (inv (iso2 D)))) (leftInv (iso1 D) (((suspFun (bouquetFunct fzero)) ∘ (inv (iso1 C))) x)) + commPreϵ x = cong ((ε D) ∘ (suspFun (inv (iso2 D)))) (ret (iso1 D) (((suspFun (bouquetFunct fzero)) ∘ (inv (iso1 C))) x)) ∙ cong (ε D) (funExt⁻ aux (inv (iso1 C) x)) ∙ commε (((suspFun (inv (iso2 C))) ∘ (inv (iso1 C))) x) where @@ -360,7 +360,7 @@ module augmentationFunct (m : ℕ) (f : finCellMap (suc m) C D) where aux : (suspFun (inv (iso2 D))) ∘ (suspFun (bouquetFunct fzero)) ≡ (suspFun (fn+1/fn fzero)) ∘ (suspFun (inv (iso2 C))) aux = (sym (suspFunComp (inv (iso2 D)) (bouquetFunct fzero))) - ∙ cong suspFun (funExt (λ x → leftInv (iso2 D) (((fn+1/fn fzero) ∘ (inv (iso2 C))) x))) + ∙ cong suspFun (funExt (λ x → ret (iso2 D) (((fn+1/fn fzero) ∘ (inv (iso2 C))) x))) ∙ (suspFunComp (fn+1/fn fzero) (inv (iso2 C))) commϵFunct : compGroupHom (chainFunct fzero) (augmentation.ϵ D) diff --git a/Cubical/CW/Properties.agda b/Cubical/CW/Properties.agda index 66d531ffa9..03cd094cd9 100644 --- a/Cubical/CW/Properties.agda +++ b/Cubical/CW/Properties.agda @@ -22,8 +22,8 @@ open import Cubical.Data.Nat renaming (_+_ to _+ℕ_) open import Cubical.Data.Nat.Order open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Unit -open import Cubical.Data.Fin.Inductive.Base -open import Cubical.Data.Fin.Inductive.Properties +open import Cubical.Data.Fin.Base +open import Cubical.Data.Fin.Properties open import Cubical.Data.Sigma open import Cubical.Data.Empty as ⊥ open import Cubical.Data.Sequence @@ -63,9 +63,9 @@ CW₁-discrete C = compEquiv (snd C .snd .snd .snd 0) (isoToEquiv main) Iso.fun main (inl x) = ⊥.rec (CW₀-empty C x) Iso.fun main (inr x) = x Iso.inv main = inr - Iso.rightInv main x = refl - Iso.leftInv main (inl x) = ⊥.rec (CW₀-empty C x) - Iso.leftInv main (inr x) = refl + Iso.sec main x = refl + Iso.ret main (inl x) = ⊥.rec (CW₀-empty C x) + Iso.ret main (inr x) = refl -- elimination from Cₙ into prop CWskel→Prop : (C : CWskel ℓ) {A : (n : ℕ) → fst C n → Type ℓ'} @@ -205,7 +205,7 @@ satAC-CW₁ n C A = (λ _ → isOfHLevelPath (suc n) (isOfHLevelΠ (suc n) (λ _ → isOfHLevelTrunc (suc n))) _ _) λ f → funExt λ a → cong ∣_∣ - (funExt⁻ ((Iso.leftInv (domIsoDep (equivToIso fin→))) f) a)) + (funExt⁻ ((Iso.ret (domIsoDep (equivToIso fin→))) f) a)) satAC∃Fin-C0 : (C : CWskel ℓ) → satAC∃ ℓ' ℓ'' (fst C 1) satAC∃Fin-C0 C = diff --git a/Cubical/CW/Strictification.agda b/Cubical/CW/Strictification.agda index a1e39de8ca..5a1bc75217 100644 --- a/Cubical/CW/Strictification.agda +++ b/Cubical/CW/Strictification.agda @@ -16,7 +16,7 @@ open import Cubical.Foundations.Function open import Cubical.Foundations.Univalence open import Cubical.Data.Empty as ⊥ -open import Cubical.Data.Fin.Inductive.Base +open import Cubical.Data.Fin.Base open import Cubical.Data.Sigma open import Cubical.Data.Sequence open import Cubical.Data.Nat diff --git a/Cubical/CW/Subcomplex.agda b/Cubical/CW/Subcomplex.agda index 92ee821bab..1a4bec39a4 100644 --- a/Cubical/CW/Subcomplex.agda +++ b/Cubical/CW/Subcomplex.agda @@ -25,8 +25,8 @@ open import Cubical.Foundations.HLevels open import Cubical.Foundations.Transport open import Cubical.Data.Nat -open import Cubical.Data.Fin.Inductive.Base -open import Cubical.Data.Fin.Inductive.Properties +open import Cubical.Data.Fin.Base +open import Cubical.Data.Fin.Properties open import Cubical.Data.Sigma open import Cubical.Data.Empty as ⊥ open import Cubical.Data.Nat.Order.Inductive @@ -153,8 +153,8 @@ module subComplexMapGen {ℓ : Level} (C : CWskel ℓ) where → Iso (fst C n) (SubComplexGen.subComplexFam C m n p) Iso.fun (subComplexIso m n ineq p) = subComplex←map' m n ineq p Iso.inv (subComplexIso m n ineq p) = subComplex→map' m n p - Iso.rightInv (subComplexIso m n ineq p) = retr-sect m n ineq p .fst - Iso.leftInv (subComplexIso m n ineq p) = retr-sect m n ineq p .snd + Iso.sec (subComplexIso m n ineq p) = retr-sect m n ineq p .fst + Iso.ret (subComplexIso m n ineq p) = retr-sect m n ineq p .snd subComplex→map : ∀ {ℓ} (C : CWskel ℓ) (m n : ℕ) → SubComplexGen.subComplexFam C m n (n ≟ᵗ m) → fst C n diff --git a/Cubical/Categories/Adjoint.agda b/Cubical/Categories/Adjoint.agda index 7d2b75dd8f..0e93bc54ad 100644 --- a/Cubical/Categories/Adjoint.agda +++ b/Cubical/Categories/Adjoint.agda @@ -88,8 +88,8 @@ module _ {F : Functor C D} {G : Functor D C} where Iso⊣^opF : Iso (F ⊣ G) ((G ^opF) ⊣ (F ^opF)) fun Iso⊣^opF = opositeAdjunction inv Iso⊣^opF = _ - rightInv Iso⊣^opF _ = refl - leftInv Iso⊣^opF _ = refl + sec Iso⊣^opF _ = refl + ret Iso⊣^opF _ = refl private variable @@ -207,22 +207,22 @@ module NaturalBijection where → g ♯ ⋆⟨ D ⟩ k ≡ (g ⋆⟨ C ⟩ G ⟪ k ⟫) ♯ adjNatInD' {c} {d} {d'} g k = g ♯ ⋆⟨ D ⟩ k - ≡⟨ sym (adjIso .leftInv (g ♯ ⋆⟨ D ⟩ k)) ⟩ + ≡⟨ sym (adjIso .ret (g ♯ ⋆⟨ D ⟩ k)) ⟩ ((g ♯ ⋆⟨ D ⟩ k) ♭) ♯ ≡⟨ cong _♯ (adjNatInD (g ♯) k) ⟩ ((g ♯) ♭ ⋆⟨ C ⟩ G ⟪ k ⟫) ♯ - ≡⟨ cong _♯ (cong (λ g' → seq' C g' (G ⟪ k ⟫)) (adjIso .rightInv g)) ⟩ + ≡⟨ cong _♯ (cong (λ g' → seq' C g' (G ⟪ k ⟫)) (adjIso .sec g)) ⟩ (g ⋆⟨ C ⟩ G ⟪ k ⟫) ♯ ∎ adjNatInC' : ∀ {c' c d} (f : D [ F ⟅ c ⟆ , d ]) (h : C [ c' , c ]) → h ⋆⟨ C ⟩ (f ♭) ≡ (F ⟪ h ⟫ ⋆⟨ D ⟩ f) ♭ adjNatInC' {c'} {c} {d} f h = h ⋆⟨ C ⟩ (f ♭) - ≡⟨ sym (adjIso .rightInv (h ⋆⟨ C ⟩ (f ♭))) ⟩ + ≡⟨ sym (adjIso .sec (h ⋆⟨ C ⟩ (f ♭))) ⟩ ((h ⋆⟨ C ⟩ (f ♭)) ♯) ♭ ≡⟨ cong _♭ (adjNatInC (f ♭) h) ⟩ ((F ⟪ h ⟫ ⋆⟨ D ⟩ (f ♭) ♯) ♭) - ≡⟨ cong _♭ (cong (λ f' → seq' D (F ⟪ h ⟫) f') (adjIso .leftInv f)) ⟩ + ≡⟨ cong _♭ (cong (λ f' → seq' D (F ⟪ h ⟫) f') (adjIso .ret f)) ⟩ (F ⟪ h ⟫ ⋆⟨ D ⟩ f) ♭ ∎ isLeftAdjoint : {C : Category ℓC ℓC'} {D : Category ℓD ℓD'} (F : Functor C D) → Type (ℓ-max (ℓ-max ℓC ℓC') (ℓ-max ℓD ℓD')) @@ -282,12 +282,12 @@ module _ (F : Functor C D) (G : Functor D C) where (F ⟪ h ⟫ ⋆⟨ D ⟩ g ♯) ♭ ≡⟨ sym (cong _♭ (adjNatInC _ _)) ⟩ (h ⋆⟨ C ⟩ g) ♯ ♭ - ≡⟨ adjIso .rightInv _ ⟩ + ≡⟨ adjIso .sec _ ⟩ h ⋆⟨ C ⟩ g ∎ C→D : (f ♭ ⋆⟨ C ⟩ G ⟪ k ⟫ ≡ h ⋆⟨ C ⟩ g) → (f ⋆⟨ D ⟩ k ≡ F ⟪ h ⟫ ⋆⟨ D ⟩ g ♯) C→D eq = f ⋆⟨ D ⟩ k - ≡⟨ sym (adjIso .leftInv _) ⟩ + ≡⟨ sym (adjIso .ret _) ⟩ (f ⋆⟨ D ⟩ k) ♭ ♯ ≡⟨ cong _♯ (adjNatInD _ _) ⟩ (f ♭ ⋆⟨ C ⟩ G ⟪ k ⟫) ♯ @@ -317,7 +317,7 @@ module _ (F : Functor C D) (G : Functor D C) where commInD f = (D .⋆IdL _) ∙ sym (D .⋆IdR _) sharpen1 : ∀ {x y} (f : C [ x , y ]) → F ⟪ f ⟫ ⋆⟨ D ⟩ D .id ≡ F ⟪ f ⟫ ⋆⟨ D ⟩ D .id ♭ ♯ - sharpen1 f = cong (λ v → F ⟪ f ⟫ ⋆⟨ D ⟩ v) (sym (adjIso .leftInv _)) + sharpen1 f = cong (λ v → F ⟪ f ⟫ ⋆⟨ D ⟩ v) (sym (adjIso .ret _)) η' : 𝟙⟨ C ⟩ ⇒ G ∘F F η' .N-ob x = D .id ♭ @@ -330,7 +330,7 @@ module _ (F : Functor C D) (G : Functor D C) where commInC g = (C .⋆IdL _) ∙ sym (C .⋆IdR _) sharpen2 : ∀ {x y} (g : D [ x , y ]) → C .id ♯ ♭ ⋆⟨ C ⟩ G ⟪ g ⟫ ≡ C .id ⋆⟨ C ⟩ G ⟪ g ⟫ - sharpen2 g = cong (λ v → v ⋆⟨ C ⟩ G ⟪ g ⟫) (adjIso .rightInv _) + sharpen2 g = cong (λ v → v ⋆⟨ C ⟩ G ⟪ g ⟫) (adjIso .sec _) ε' : F ∘F G ⇒ 𝟙⟨ D ⟩ ε' .N-ob x = C .id ♯ @@ -371,7 +371,7 @@ module _ (F : Functor C D) (G : Functor D C) where -- takes g to Fg postcomposed with the counit adj→adj' .adjIso {d = d} .inv g = F ⟪ g ⟫ ⋆⟨ D ⟩ ε ⟦ d ⟧ -- invertibility follows from the triangle identities - adj→adj' .adjIso {c = c} {d} .rightInv g + adj→adj' .adjIso {c = c} {d} .sec g = η ⟦ c ⟧ ⋆⟨ C ⟩ G ⟪ F ⟪ g ⟫ ⋆⟨ D ⟩ ε ⟦ d ⟧ ⟫ ≡⟨ cong (λ v → η ⟦ c ⟧ ⋆⟨ C ⟩ v) (G .F-seq _ _) ⟩ η ⟦ c ⟧ ⋆⟨ C ⟩ (G ⟪ F ⟪ g ⟫ ⟫ ⋆⟨ C ⟩ G ⟪ ε ⟦ d ⟧ ⟫) @@ -390,7 +390,7 @@ module _ (F : Functor C D) (G : Functor D C) where where natu : η ⟦ c ⟧ ⋆⟨ C ⟩ G ⟪ F ⟪ g ⟫ ⟫ ≡ g ⋆⟨ C ⟩ η ⟦ G ⟅ d ⟆ ⟧ natu = sym (η .N-hom _) - adj→adj' .adjIso {c = c} {d} .leftInv f + adj→adj' .adjIso {c = c} {d} .ret f = F ⟪ η ⟦ c ⟧ ⋆⟨ C ⟩ G ⟪ f ⟫ ⟫ ⋆⟨ D ⟩ ε ⟦ d ⟧ ≡⟨ cong (λ v → v ⋆⟨ D ⟩ ε ⟦ d ⟧) (F .F-seq _ _) ⟩ F ⟪ η ⟦ c ⟧ ⟫ ⋆⟨ D ⟩ F ⟪ G ⟪ f ⟫ ⟫ ⋆⟨ D ⟩ ε ⟦ d ⟧ diff --git a/Cubical/Categories/Category/Path.agda b/Cubical/Categories/Category/Path.agda index 9313937d50..dccac638fe 100644 --- a/Cubical/Categories/Category/Path.agda +++ b/Cubical/Categories/Category/Path.agda @@ -113,12 +113,12 @@ module _ {C C' : Category ℓ ℓ'} where CategoryPathIso : Iso (CategoryPath C C') (C ≡ C') Iso.fun CategoryPathIso = CategoryPath.mk≡ Iso.inv CategoryPathIso = ≡→CategoryPath - Iso.rightInv CategoryPathIso = CategoryPathIsoRightInv + Iso.sec CategoryPathIso = CategoryPathIsoRightInv - ob≡ (Iso.leftInv CategoryPathIso a i) = ob≡ a - Hom≡ (Iso.leftInv CategoryPathIso a i) = Hom≡ a - id≡ (Iso.leftInv CategoryPathIso a i) = id≡ a - ⋆≡ (Iso.leftInv CategoryPathIso a i) = ⋆≡ a + ob≡ (Iso.ret CategoryPathIso a i) = ob≡ a + Hom≡ (Iso.ret CategoryPathIso a i) = Hom≡ a + id≡ (Iso.ret CategoryPathIso a i) = id≡ a + ⋆≡ (Iso.ret CategoryPathIso a i) = ⋆≡ a CategoryPath≡ : (cp cp' : CategoryPath C C') → (p≡ : ob≡ cp ≡ ob≡ cp') → diff --git a/Cubical/Categories/Constructions/Slice/Base.agda b/Cubical/Categories/Constructions/Slice/Base.agda index e918fe469e..543a14a794 100644 --- a/Cubical/Categories/Constructions/Slice/Base.agda +++ b/Cubical/Categories/Constructions/Slice/Base.agda @@ -62,8 +62,8 @@ module _ {xf yg : SliceOb} where SOPathIsoPathΣ : Iso (xf ≡ yg) (Σ[ p ∈ x ≡ y ] PathP (λ i → C [ p i , c ]) f g) SOPathIsoPathΣ .fun p = (λ i → (p i) .S-ob) , (λ i → (p i) .S-arr) SOPathIsoPathΣ .inv (p , q) i = sliceob {p i} (q i) - SOPathIsoPathΣ .rightInv _ = refl - SOPathIsoPathΣ .leftInv _ = refl + SOPathIsoPathΣ .sec _ = refl + SOPathIsoPathΣ .ret _ = refl SOPath≃PathΣ = isoToEquiv SOPathIsoPathΣ @@ -110,8 +110,8 @@ SliceHom-Σ-Iso : ∀ {a b} → Iso (SliceHom a b) (Σ[ h ∈ C [ S-ob a , S-ob b ] ] h ⋆⟨ C ⟩ (S-arr b) ≡ S-arr a) SliceHom-Σ-Iso .fun (slicehom h c) = h , c SliceHom-Σ-Iso .inv (h , c) = slicehom h c -SliceHom-Σ-Iso .rightInv = λ x → refl -SliceHom-Σ-Iso .leftInv = λ x → refl +SliceHom-Σ-Iso .sec = λ x → refl +SliceHom-Σ-Iso .ret = λ x → refl -- Category definition @@ -235,7 +235,7 @@ module _ ⦃ isU : isUnivalent C ⦄ where pToIBase = catiso (C .id) idx (C .⋆IdL idx) (C .⋆IdL idx) l≡pToI : l ≡ pathToIso {C = C} x≡y .snd .inv - l≡pToI i = pToIIso .rightInv extractIso (~ i) .snd .inv + l≡pToI i = pToIIso .sec extractIso (~ i) .snd .inv l≡id : PathP (λ i → C [ x≡y (~ i) , x ]) l (C .id) l≡id = l≡pToI ◁ pToI≡id @@ -243,8 +243,8 @@ module _ ⦃ isU : isUnivalent C ⦄ where lf≡f : PathP (λ i → C [ x≡y (~ i) , c ]) (l ⋆⟨ C ⟩ f) f lf≡f = (λ i → (l≡id i) ⋆⟨ C ⟩ f) ▷ C .⋆IdL _ - sIso .rightInv is@(kc , isiso lc s r) i = catiso (kc'≡kc i) (lc'≡lc i) (s'≡s i) (r'≡r i) - -- we prove rightInv using a combination of univalence and the fact that homs are an h-set + sIso .sec is@(kc , isiso lc s r) i = catiso (kc'≡kc i) (lc'≡lc i) (s'≡s i) (r'≡r i) + -- we prove sec using a combination of univalence and the fact that homs are an h-set where kc' = (sIso .fun) (sIso .inv is) .fst lc' = (sIso .fun) (sIso .inv is) .snd .inv @@ -261,7 +261,7 @@ module _ ⦃ isU : isUnivalent C ⦄ where -- mor k'≡k : k' ≡ k - k'≡k i = (pToIIso .rightInv extractIso) i .fst + k'≡k i = (pToIIso .sec extractIso) i .fst kcom'≡kcom : PathP (λ j → (k'≡k j) ⋆⟨ C ⟩ g ≡ f) (kc' .S-comm) (kc .S-comm) kcom'≡kcom = isSetHomP1 {C = C} _ _ λ i → (k'≡k i) ⋆⟨ C ⟩ g @@ -271,7 +271,7 @@ module _ ⦃ isU : isUnivalent C ⦄ where -- inv l'≡l : l' ≡ l - l'≡l i = (pToIIso .rightInv extractIso) i .snd .inv + l'≡l i = (pToIIso .sec extractIso) i .snd .inv lcom'≡lcom : PathP (λ j → (l'≡l j) ⋆⟨ C ⟩ f ≡ g) (lc' .S-comm) (lc .S-comm) lcom'≡lcom = isSetHomP1 {C = C} _ _ λ i → (l'≡l i) ⋆⟨ C ⟩ f @@ -291,7 +291,7 @@ module _ ⦃ isU : isUnivalent C ⦄ where r'≡r : PathP (λ i → kc'≡kc i ⋆⟨ SliceCat ⟩ lc'≡lc i ≡ SliceCat .id) r' r r'≡r = isSetHomP1 {C = SliceCat} _ _ λ i → kc'≡kc i ⋆⟨ SliceCat ⟩ lc'≡lc i - sIso .leftInv p = p'≡p + sIso .ret p = p'≡p -- to show that the round trip is equivalent to the identity -- we show that this is true for each component (S-ob, S-arr) -- and then combine @@ -335,7 +335,7 @@ module _ ⦃ isU : isUnivalent C ⦄ where -- apply univalence of C -- this gives us the first component that we want p'Ob≡pOb : p'Ob ≡ pOb - p'Ob≡pOb = ppp ∙ pToIIso .leftInv pOb + p'Ob≡pOb = ppp ∙ pToIIso .ret pOb -- isSetHom gives us the second component, path between morphisms p'Mor≡pMor : PathP (λ j → PathP (λ i → C [ (p'Ob≡pOb j) i , c ]) f g) p'Mor pMor diff --git a/Cubical/Categories/Constructions/Slice/Functor.agda b/Cubical/Categories/Constructions/Slice/Functor.agda index d87fdc1850..459afa9cc9 100644 --- a/Cubical/Categories/Constructions/Slice/Functor.agda +++ b/Cubical/Categories/Constructions/Slice/Functor.agda @@ -88,9 +88,9 @@ module _ (Pbs : Pullbacks C) where in slicehom _ (sym p) inv (adjIso ∑𝑓⊣𝑓*) (slicehom h o) = slicehom _ $ AssocCong₂⋆R C (sym (pbCommutes)) ∙ cong (_⋆ᶜ 𝑓) o - rightInv (adjIso ∑𝑓⊣𝑓*) (slicehom h o) = + sec (adjIso ∑𝑓⊣𝑓*) (slicehom h o) = SliceHom-≡-intro' _ _ (pullbackArrowUnique (sym o) refl) - leftInv (adjIso ∑𝑓⊣𝑓*) (slicehom h o) = + ret (adjIso ∑𝑓⊣𝑓*) (slicehom h o) = let ((_ , (_ , q)) , _) = univProp _ _ _ in SliceHom-≡-intro' _ _ (sym q) adjNatInD ∑𝑓⊣𝑓* f k = SliceHom-≡-intro' _ _ $ @@ -129,8 +129,8 @@ module _ (Pbs : Pullbacks C) where inv (adjIso L/b⊣R/b) (slicehom _ p) = slicehom _ $ AssocCong₂⋆R D (sym (N-hom ε _)) ∙ cong (_⋆ᵈ _) (sym (F-seq L _ _) ∙ cong (L ⟪_⟫) p) - rightInv (adjIso L/b⊣R/b) _ = SliceHom-≡-intro' _ _ $ aI.rightInv _ - leftInv (adjIso L/b⊣R/b) _ = SliceHom-≡-intro' _ _ $ aI.leftInv _ + sec (adjIso L/b⊣R/b) _ = SliceHom-≡-intro' _ _ $ aI.sec _ + ret (adjIso L/b⊣R/b) _ = SliceHom-≡-intro' _ _ $ aI.ret _ adjNatInD L/b⊣R/b _ _ = SliceHom-≡-intro' _ _ $ cong (_ ⋆ᶜ_) (F-seq R _ _) ∙ sym (C .⋆Assoc _ _ _) adjNatInC L/b⊣R/b _ _ = SliceHom-≡-intro' _ _ $ @@ -163,7 +163,7 @@ module _ (Pbs : Pullbacks C) where ∙∙ sym (F-seq L _ _) ∙∙ cong (L ⟪_⟫) s) - rightInv (adjIso L/b⊣R/b) h = SliceHom-≡-intro' _ _ $ + sec (adjIso L/b⊣R/b) h = SliceHom-≡-intro' _ _ $ let p₂ : ∀ {x} → η ⟦ _ ⟧ ⋆ᶜ R ⟪ L ⟪ x ⟫ ⋆⟨ D ⟩ ε ⟦ _ ⟧ ⟫ ≡ x p₂ = cong (_ ⋆ᶜ_) (F-seq R _ _) ∙ AssocCong₂⋆L C (sym (N-hom η _)) @@ -172,9 +172,9 @@ module _ (Pbs : Pullbacks C) where in pullbackArrowUnique (sym (S-comm h)) p₂ - leftInv (adjIso L/b⊣R/b) _ = SliceHom-≡-intro' _ _ $ + ret (adjIso L/b⊣R/b) _ = SliceHom-≡-intro' _ _ $ cong ((_⋆ᵈ _) ∘ L ⟪_⟫) (sym (snd (snd (fst (univProp _ _ _))))) - ∙ aI.leftInv _ + ∙ aI.ret _ adjNatInD L/b⊣R/b _ _ = SliceHom-≡-intro' _ _ $ let (h , (u , v)) = univProp _ _ _ .fst (u' , v') = pbU _ diff --git a/Cubical/Categories/Dagger/Properties.agda b/Cubical/Categories/Dagger/Properties.agda index cbc264e4cb..b303b76bc3 100644 --- a/Cubical/Categories/Dagger/Properties.agda +++ b/Cubical/Categories/Dagger/Properties.agda @@ -31,8 +31,8 @@ module _ (†C : †Category ℓ ℓ') where .Hom≡ → funExt λ x → funExt λ y → TypeIso.isoToPath λ where .TypeIso.fun → _† .TypeIso.inv → _† - .TypeIso.leftInv → †-invol - .TypeIso.rightInv → †-invol + .TypeIso.sec → †-invol + .TypeIso.ret → †-invol .id≡ → implicitFunExt (toPathP (transportRefl (id †) ∙ †-id)) .⋆≡ → implicitFunExt $ implicitFunExt $ implicitFunExt $ toPathP $ funExt λ f → funExt λ g → transport refl ((transport refl f † ⋆ transport refl g †) †) ≡⟨ transportRefl _ ⟩ @@ -230,8 +230,8 @@ module †Morphisms (†C : †Category ℓ ℓ') where iso : TypeIso (x ≡ y) (†CatIso x y) iso .TypeIso.fun = pathTo†Iso iso .TypeIso.inv = †IsoToPath - iso .TypeIso.rightInv f = Σ≡Prop (λ _ → isPropAreInv _) (†IsoToPath-β f) - iso .TypeIso.leftInv = J (λ y p → †IsoToPath (pathTo†Iso p) ≡ p) ( + iso .TypeIso.sec f = Σ≡Prop (λ _ → isPropAreInv _) (†IsoToPath-β f) + iso .TypeIso.ret = J (λ y p → †IsoToPath (pathTo†Iso p) ≡ p) ( †IsoToPath (pathTo†Iso refl) ≡⟨ cong †IsoToPath pathTo†Iso-refl ⟩ †IsoToPath id†Iso ≡⟨ †IsoToPath-id ⟩ refl ∎ diff --git a/Cubical/Categories/Equivalence/Properties.agda b/Cubical/Categories/Equivalence/Properties.agda index f69f1be368..ff77a6e1ff 100644 --- a/Cubical/Categories/Equivalence/Properties.agda +++ b/Cubical/Categories/Equivalence/Properties.agda @@ -139,17 +139,17 @@ module _ {C : Category ℓC ℓC'} {D : Category ℓD ℓD'} p : _ p i = comp - (λ j → D [ iso-ob .rightInv x (~ j) , iso-ob .rightInv x (~ j) ]) + (λ j → D [ iso-ob .sec x (~ j) , iso-ob .sec x (~ j) ]) (λ j → λ { (i = i0) → iso-hom .rightInv _ (D .id {x = x}) (~ j) - ; (i = i1) → D .id {x = iso-ob .rightInv x (~ j)} }) + ; (i = i1) → D .id {x = iso-ob .sec x (~ j)} }) (D .id {x = x}) w-inv .F-seq {x = x} {z = z} f g = isFullyFaithful→Faithful {F = F} fullfaith _ _ _ _ (p ∙ sym (F .F-seq _ _)) where p : _ p i = comp - (λ j → D [ iso-ob .rightInv x (~ j) , iso-ob .rightInv z (~ j) ]) + (λ j → D [ iso-ob .sec x (~ j) , iso-ob .sec z (~ j) ]) (λ j → λ { (i = i0) → iso-hom .rightInv _ (f ⋆⟨ D ⟩ g) (~ j) ; (i = i1) → iso-hom .rightInv _ f (~ j) ⋆⟨ D ⟩ iso-hom .rightInv _ g (~ j) }) diff --git a/Cubical/Categories/Equivalence/WeakEquivalence.agda b/Cubical/Categories/Equivalence/WeakEquivalence.agda index bc2316c632..bbdc299260 100644 --- a/Cubical/Categories/Equivalence/WeakEquivalence.agda +++ b/Cubical/Categories/Equivalence/WeakEquivalence.agda @@ -159,7 +159,7 @@ module _ IsoCategoryPath : Iso (WeakEquivalence C C') (CategoryPath C C') fun IsoCategoryPath = WeakEquivlance→CategoryPath ∘f isWeakEquiv inv IsoCategoryPath = ≡→WeakEquivlance ∘f mk≡ - rightInv IsoCategoryPath b = CategoryPath≡ + sec IsoCategoryPath b = CategoryPath≡ (WeakEquivlance→CategoryPath (isWeakEquiv (≡→WeakEquivlance (mk≡ b)))) b (λ i j → Glue (C' .Category.ob) {φ = ~ j ∨ j ∨ i} (λ _ → _ , equivPathP @@ -176,7 +176,7 @@ module _ (λ _ _ → idIsEquiv _) j x y } - leftInv IsoCategoryPath we = cong₂ weakEquivalence + ret IsoCategoryPath we = cong₂ weakEquivalence (Functor≡ (transportRefl ∘f (F-ob (func we))) λ {c} {c'} f → (λ j → transport (λ i → HomPathP (isWeakEquiv we) i diff --git a/Cubical/Categories/Functor/Base.agda b/Cubical/Categories/Functor/Base.agda index 4c658b965c..e03565cee3 100644 --- a/Cubical/Categories/Functor/Base.agda +++ b/Cubical/Categories/Functor/Base.agda @@ -171,8 +171,8 @@ open Iso Iso^opF : Iso (Functor C D) (Functor (C ^op) (D ^op)) Iso^opF .fun = _^opF Iso^opF .inv = _^opF⁻ -Iso^opF .rightInv F = Functor≡ (λ _ → refl) (λ _ → refl) -Iso^opF .leftInv F = Functor≡ (λ _ → refl) (λ _ → refl) +Iso^opF .sec F = Functor≡ (λ _ → refl) (λ _ → refl) +Iso^opF .ret F = Functor≡ (λ _ → refl) (λ _ → refl) ^opFEquiv : Functor C D ≃ Functor (C ^op) (D ^op) ^opFEquiv = isoToEquiv Iso^opF diff --git a/Cubical/Categories/Functor/Properties.agda b/Cubical/Categories/Functor/Properties.agda index 28749a8a0d..ce09c3c14e 100644 --- a/Cubical/Categories/Functor/Properties.agda +++ b/Cubical/Categories/Functor/Properties.agda @@ -98,15 +98,15 @@ isEquivFunctor≡ {C = C} {D = D} = Iso.isoToIsEquiv isom isom : Iso.Iso _ _ fun isom = _ inv isom x = (λ c i → F-ob (x i) c) , λ {c} {c'} f i → F-hom (x i) {c} {c'} f - F-ob (rightInv isom b _ i₁) = F-ob (b i₁) - F-hom (rightInv isom b _ i₁) = F-hom (b i₁) - F-id (rightInv isom b i i₁) = isProp→SquareP + F-ob (sec isom b _ i₁) = F-ob (b i₁) + F-hom (sec isom b _ i₁) = F-hom (b i₁) + F-id (sec isom b i i₁) = isProp→SquareP (λ i i₁ → D .isSetHom (F-hom (b i₁) (C .id)) (D .id)) refl refl (isProp→PathP (λ j → isSetHom D _ _) _ _) (λ i₁ → F-id (b i₁)) i i₁ - F-seq (rightInv isom b i i₁) f g = isProp→SquareP + F-seq (sec isom b i i₁) f g = isProp→SquareP (λ i i₁ → D .isSetHom (F-hom (b i₁) _) (seq' D (F-hom (b i₁) f) _)) refl refl (isProp→PathP (λ j → isSetHom D _ _) _ _) (λ i₁ → F-seq (b i₁) f g) i i₁ - leftInv isom _ = refl + ret isom _ = refl isOfHLevelFunctor : ∀ hLevel → isOfHLevel (2 + hLevel) (D .ob) → isOfHLevel (2 + hLevel) (Functor C D) diff --git a/Cubical/Categories/Instances/CommRings.agda b/Cubical/Categories/Instances/CommRings.agda index a570a9792a..45ad5287f2 100644 --- a/Cubical/Categories/Instances/CommRings.agda +++ b/Cubical/Categories/Instances/CommRings.agda @@ -61,24 +61,24 @@ CommRingIsoIsoCatIso : {R S : CommRing ℓ} → Iso (CommRingIso R S) (CatIso Co (fun CommRingIsoIsoCatIso e) .fst = (e .fst .fun) , (e .snd) (fun (CommRingIsoIsoCatIso {R = R} {S}) e) .snd .inv = e .fst .inv - , makeIsCommRingHom (sym (cong (e .fst .inv) (pres1 (e .snd))) ∙ e .fst .leftInv _) - (λ x y → let rem = e .fst .rightInv _ - ∙∙ (λ i → S .snd ._+_ (e .fst .rightInv x (~ i)) (e .fst .rightInv y (~ i))) + , makeIsCommRingHom (sym (cong (e .fst .inv) (pres1 (e .snd))) ∙ e .fst .ret _) + (λ x y → let rem = e .fst .sec _ + ∙∙ (λ i → S .snd ._+_ (e .fst .sec x (~ i)) (e .fst .sec y (~ i))) ∙∙ sym (pres+ (e .snd) _ _) in injCommRingIso {R = R} {S} e _ _ rem) - (λ x y → let rem = e .fst .rightInv _ - ∙∙ (λ i → S .snd ._·_ (e .fst .rightInv x (~ i)) (e .fst .rightInv y (~ i))) + (λ x y → let rem = e .fst .sec _ + ∙∙ (λ i → S .snd ._·_ (e .fst .sec x (~ i)) (e .fst .sec y (~ i))) ∙∙ sym (pres· (e .snd) _ _) in injCommRingIso {R = R} {S} e _ _ rem) -(fun CommRingIsoIsoCatIso e) .snd .sec = CommRingHom≡ (funExt (e .fst .rightInv)) -(fun CommRingIsoIsoCatIso e) .snd .ret = CommRingHom≡ (funExt (e .fst .leftInv)) +(fun CommRingIsoIsoCatIso e) .snd .sec = CommRingHom≡ (funExt (e .fst .sec)) +(fun CommRingIsoIsoCatIso e) .snd .ret = CommRingHom≡ (funExt (e .fst .ret)) fun (fst (inv CommRingIsoIsoCatIso e)) = e .fst .fst inv (fst (inv CommRingIsoIsoCatIso e)) = e .snd .inv .fst -rightInv (fst (inv CommRingIsoIsoCatIso e)) x i = fst (e .snd .sec i) x -leftInv (fst (inv CommRingIsoIsoCatIso e)) x i = fst (e .snd .ret i) x +sec (fst (inv CommRingIsoIsoCatIso e)) x i = fst (e .snd .sec i) x +ret (fst (inv CommRingIsoIsoCatIso e)) x i = fst (e .snd .ret i) x snd (inv CommRingIsoIsoCatIso e) = e .fst .snd -rightInv CommRingIsoIsoCatIso x = CatIso≡ _ _ (CommRingHom≡ refl) -leftInv (CommRingIsoIsoCatIso {R = R} {S}) x = +sec CommRingIsoIsoCatIso x = CatIso≡ _ _ (CommRingHom≡ refl) +ret (CommRingIsoIsoCatIso {R = R} {S}) x = Σ≡Prop (λ x → isPropIsCommRingHom (R .snd) (x .fun) (S .snd)) diff --git a/Cubical/Categories/Instances/EilenbergMoore.agda b/Cubical/Categories/Instances/EilenbergMoore.agda index b129138461..715b92955b 100644 --- a/Cubical/Categories/Instances/EilenbergMoore.agda +++ b/Cubical/Categories/Instances/EilenbergMoore.agda @@ -110,7 +110,7 @@ module _ {C : Category ℓC ℓC'} (monadM : Monad C) where ((F-hom M (F-hom M f) C.⋆ F-hom M β) C.⋆ β) ≡⟨ cong (C._⋆ β) (sym (F-seq M _ _)) ⟩ (F-hom M (F-hom M f C.⋆ β) C.⋆ β) ∎ - rightInv (emBijection a (algebra b β , isEMB)) f = + sec (emBijection a (algebra b β , isEMB)) f = (N-ob η a C.⋆ (F-hom M f C.⋆ β)) ≡⟨ sym (C.⋆Assoc _ _ _) ⟩ ((N-ob η a C.⋆ F-hom M f) C.⋆ β) @@ -122,7 +122,7 @@ module _ {C : Category ℓC ℓC'} (monadM : Monad C) where (f C.⋆ C.id) ≡⟨ C.⋆IdR _ ⟩ f ∎ - leftInv (emBijection a (algebra b β , isEMB)) (algebraHom f isalgF) = AlgebraHom≡ M ( + ret (emBijection a (algebra b β , isEMB)) (algebraHom f isalgF) = AlgebraHom≡ M ( (F-hom M (N-ob η a C.⋆ f) C.⋆ β) ≡⟨ cong (C._⋆ β) (F-seq M _ _) ⟩ ((F-hom M (N-ob η a) C.⋆ F-hom M f) C.⋆ β) diff --git a/Cubical/Categories/Instances/FunctorAlgebras.agda b/Cubical/Categories/Instances/FunctorAlgebras.agda index 9c2e4f2260..e070abb32d 100644 --- a/Cubical/Categories/Instances/FunctorAlgebras.agda +++ b/Cubical/Categories/Instances/FunctorAlgebras.agda @@ -46,8 +46,8 @@ module _ {C : Category ℓC ℓC'} (F : Functor C C) where isoRepAlgebraHom : (algA algB : Algebra) → AlgebraHom algA algB ≅ RepAlgebraHom algA algB fun (isoRepAlgebraHom algA algB) (algebraHom f isalgF) = f , isalgF inv (isoRepAlgebraHom algA algB) (f , isalgF) = algebraHom f isalgF - rightInv (isoRepAlgebraHom algA algB) (f , isalgF) = refl - leftInv (isoRepAlgebraHom algA algB) (algebraHom f isalgF)= refl + sec (isoRepAlgebraHom algA algB) (f , isalgF) = refl + ret (isoRepAlgebraHom algA algB) (algebraHom f isalgF)= refl pathRepAlgebraHom : (algA algB : Algebra) → AlgebraHom algA algB ≡ RepAlgebraHom algA algB pathRepAlgebraHom algA algB = ua (isoToEquiv (isoRepAlgebraHom algA algB)) diff --git a/Cubical/Categories/Instances/Functors.agda b/Cubical/Categories/Instances/Functors.agda index 8e735ae52f..30f967ea9a 100644 --- a/Cubical/Categories/Instances/Functors.agda +++ b/Cubical/Categories/Instances/Functors.agda @@ -93,11 +93,11 @@ module _ (C : Category ℓC ℓC') (D : Category ℓD ℓD') where Iso-FUNCTORIso-NatIso : {F G : Functor C D} → Iso (CatIso FUNCTOR F G) (NatIso F G) Iso-FUNCTORIso-NatIso .fun = FUNCTORIso→NatIso Iso-FUNCTORIso-NatIso .inv = NatIso→FUNCTORIso - Iso-FUNCTORIso-NatIso .rightInv α i .trans = α .trans - Iso-FUNCTORIso-NatIso .rightInv α i .nIso = + Iso-FUNCTORIso-NatIso .sec α i .trans = α .trans + Iso-FUNCTORIso-NatIso .sec α i .nIso = isProp→PathP (λ i → isPropΠ (λ _ → isPropIsIso _)) (FUNCTORIso' (α .trans) (FUNCTORIso _ (α .nIso))) (α .nIso) i - Iso-FUNCTORIso-NatIso .leftInv α i .fst = α .fst - Iso-FUNCTORIso-NatIso .leftInv α i .snd = + Iso-FUNCTORIso-NatIso .ret α i .fst = α .fst + Iso-FUNCTORIso-NatIso .ret α i .snd = isProp→PathP (λ i → isPropIsIso _) (FUNCTORIso _ (FUNCTORIso' _ (α .snd))) (α .snd) i FUNCTORIso≃NatIso : {F G : Functor C D} → CatIso FUNCTOR F G ≃ NatIso F G diff --git a/Cubical/Categories/Instances/Functors/Currying.agda b/Cubical/Categories/Instances/Functors/Currying.agda index 92ccde45e2..21fe9ffd9d 100644 --- a/Cubical/Categories/Instances/Functors/Currying.agda +++ b/Cubical/Categories/Instances/Functors/Currying.agda @@ -94,11 +94,11 @@ module _ (C : Category ℓC ℓC') (D : Category ℓD ℓD') where isoλF : Iso (Functor (E ×C C) D) (Functor E (FUNCTOR C D)) fun isoλF = λF inv isoλF = λF⁻ - rightInv isoλF b = Functor≡ (λ _ → Functor≡ (λ _ → refl) + sec isoλF b = Functor≡ (λ _ → Functor≡ (λ _ → refl) λ _ → cong (seq' D _) (congS (flip N-ob _) (F-id b)) ∙ D .⋆IdR _) λ _ → makeNatTransPathP _ _ (funExt λ _ → cong (comp' D _) (F-id (F-ob b _)) ∙ D .⋆IdL _) - leftInv isoλF a = Functor≡ (λ _ → refl) λ _ → sym (F-seq a _ _) + ret isoλF a = Functor≡ (λ _ → refl) λ _ → sym (F-seq a _ _) ∙ cong (F-hom a) (cong₂ _,_ (E .⋆IdL _) (C .⋆IdR _)) open AdjointEquivalence diff --git a/Cubical/Categories/Instances/Groups.agda b/Cubical/Categories/Instances/Groups.agda index 658d2f06c8..66373c560d 100644 --- a/Cubical/Categories/Instances/Groups.agda +++ b/Cubical/Categories/Instances/Groups.agda @@ -52,8 +52,8 @@ module _ {ℓ : Level} where →iso : ∀ {x} → isCatIso GroupCategory x → Iso _ _ fun (→iso ici) = _ inv (→iso ici) = fst (inv ici) - rightInv (→iso ici) b i = fst (sec ici i) b - leftInv (→iso ici) a i = fst (ret ici i) a + sec (→iso ici) b i = fst (sec ici i) b + ret (→iso ici) a i = fst (ret ici i) a →ciso : ∀ {x} → isEquiv (fst x) → isCatIso GroupCategory x fst (inv (→ciso is≃)) = _ diff --git a/Cubical/Categories/Instances/Sets.agda b/Cubical/Categories/Instances/Sets.agda index aab7f9b501..d5dc99a87d 100644 --- a/Cubical/Categories/Instances/Sets.agda +++ b/Cubical/Categories/Instances/Sets.agda @@ -63,8 +63,8 @@ module _ {ℓ ℓ' : Level} where (Lift {ℓ}{ℓ'} (X .fst) → Lift {ℓ}{ℓ'} (Y .fst)) fun LiftFIso = LiftF .F-hom {X} {Y} inv LiftFIso = λ f x → f (lift x) .lower - rightInv LiftFIso = λ _ → funExt λ _ → refl - leftInv LiftFIso = λ _ → funExt λ _ → refl + sec LiftFIso = λ _ → funExt λ _ → refl + ret LiftFIso = λ _ → funExt λ _ → refl module _ {C : Category ℓ ℓ'} {F : Functor C (SET ℓ')} where open NatTrans @@ -94,25 +94,25 @@ module _ {A B : (SET ℓ) .ob } where → CatIso (SET ℓ) A B Iso→CatIso is .fst = is .fun Iso→CatIso is .snd .cInv = is .inv - Iso→CatIso is .snd .sec = funExt λ b → is .rightInv b -- is .rightInv - Iso→CatIso is .snd .ret = funExt λ b → is .leftInv b -- is .rightInv + Iso→CatIso is .snd .sec = funExt λ b → is .sec b -- is .sec + Iso→CatIso is .snd .ret = funExt λ b → is .ret b -- is .sec CatIso→Iso : CatIso (SET ℓ) A B → Iso (fst A) (fst B) CatIso→Iso cis .fun = cis .fst CatIso→Iso cis .inv = cis .snd .cInv - CatIso→Iso cis .rightInv = funExt⁻ λ b → cis .snd .sec b - CatIso→Iso cis .leftInv = funExt⁻ λ b → cis .snd .ret b + CatIso→Iso cis .sec = funExt⁻ λ b → cis .snd .sec b + CatIso→Iso cis .ret = funExt⁻ λ b → cis .snd .ret b Iso-Iso-CatIso : Iso (Iso (fst A) (fst B)) (CatIso (SET ℓ) A B) fun Iso-Iso-CatIso = Iso→CatIso inv Iso-Iso-CatIso = CatIso→Iso - rightInv Iso-Iso-CatIso b = refl - fun (leftInv Iso-Iso-CatIso a i) = fun a - inv (leftInv Iso-Iso-CatIso a i) = inv a - rightInv (leftInv Iso-Iso-CatIso a i) = rightInv a - leftInv (leftInv Iso-Iso-CatIso a i) = leftInv a + sec Iso-Iso-CatIso b = refl + fun (ret Iso-Iso-CatIso a i) = fun a + inv (ret Iso-Iso-CatIso a i) = inv a + sec (ret Iso-Iso-CatIso a i) = sec a + ret (ret Iso-Iso-CatIso a i) = ret a Iso-CatIso-≡ : Iso (CatIso (SET ℓ) A B) (A ≡ B) Iso-CatIso-≡ = compIso (invIso Iso-Iso-CatIso) (hSet-Iso-Iso-≡ _ _) diff --git a/Cubical/Categories/Limits/Initial.agda b/Cubical/Categories/Limits/Initial.agda index 6d53df07be..8b97c8e00a 100644 --- a/Cubical/Categories/Limits/Initial.agda +++ b/Cubical/Categories/Limits/Initial.agda @@ -79,5 +79,5 @@ module _ {C : Category ℓC ℓC'} {D : Category ℓD ℓD'} (F : Functor C D) w _♯ F⊣G (fst (initX (F-ob G y))) ≡⟨ cong (F⊣G ♯) (snd (initX (F-ob G y)) (_♭ F⊣G ψ)) ⟩ _♯ F⊣G (_♭ F⊣G ψ) - ≡⟨ leftInv (adjIso F⊣G) ψ ⟩ + ≡⟨ ret (adjIso F⊣G) ψ ⟩ ψ ∎ diff --git a/Cubical/Categories/NaturalTransformation/Properties.agda b/Cubical/Categories/NaturalTransformation/Properties.agda index 206ea5639c..f5c92f490f 100644 --- a/Cubical/Categories/NaturalTransformation/Properties.agda +++ b/Cubical/Categories/NaturalTransformation/Properties.agda @@ -60,8 +60,8 @@ module _ {C : Category ℓC ℓC'} {D : Category ℓD ℓD'} where NatTransIsoΣ : Iso (NatTrans F G) NatTransΣ NatTransIsoΣ .fun (natTrans N-ob N-hom) = N-ob , N-hom NatTransIsoΣ .inv (N-ob , N-hom) = (natTrans N-ob N-hom) - NatTransIsoΣ .rightInv _ = refl - NatTransIsoΣ .leftInv _ = refl + NatTransIsoΣ .sec _ = refl + NatTransIsoΣ .ret _ = refl NatTrans≡Σ : NatTrans F G ≡ NatTransΣ NatTrans≡Σ = isoToPath NatTransIsoΣ @@ -90,8 +90,8 @@ module _ {C : Category ℓC ℓC'} {D : Category ℓD ℓD'} where βHom)) NTPathIsoPathΣ .fun p = (λ i → p i .N-ob) , (λ i → p i .N-hom) NTPathIsoPathΣ .inv (po , ph) i = record { N-ob = po i ; N-hom = ph i } - NTPathIsoPathΣ .rightInv pσ = refl - NTPathIsoPathΣ .leftInv p = refl + NTPathIsoPathΣ .sec pσ = refl + NTPathIsoPathΣ .ret p = refl NTPath≃PathΣ = isoToEquiv NTPathIsoPathΣ @@ -102,7 +102,7 @@ module _ {C : Category ℓC ℓC'} {D : Category ℓD ℓD'} where isSetNatTrans : {F G : Functor C D} → isSet (NatTrans F G) isSetNatTrans = - isSetRetract (fun NatTransIsoΣ) (inv NatTransIsoΣ) (leftInv NatTransIsoΣ) + isSetRetract (fun NatTransIsoΣ) (inv NatTransIsoΣ) (ret NatTransIsoΣ) (isSetΣSndProp (isSetΠ (λ _ → isSetHom D)) (λ _ → isPropImplicitΠ2 (λ _ _ → isPropΠ (λ _ → isSetHom D _ _)))) @@ -180,8 +180,8 @@ module _ {B : Category ℓB ℓB'}{C : Category ℓC ℓC'}{D : Category ℓD N-ob (fun ⇒^opFiso x) = N-ob x N-hom (fun ⇒^opFiso x) f = sym (N-hom x f) inv ⇒^opFiso = _ -rightInv ⇒^opFiso _ = refl -leftInv ⇒^opFiso _ = refl +sec ⇒^opFiso _ = refl +ret ⇒^opFiso _ = refl congNatIso^opFiso : Iso (F ≅ᶜ F') (_^opF {C = C} {D = D} F' ≅ᶜ F ^opF ) trans (fun congNatIso^opFiso x) = Iso.fun ⇒^opFiso (trans x) @@ -189,6 +189,6 @@ inv (nIso (fun congNatIso^opFiso x) x₁) = _ sec (nIso (fun congNatIso^opFiso x) x₁) = ret (nIso x x₁) ret (nIso (fun congNatIso^opFiso x) x₁) = sec (nIso x x₁) inv congNatIso^opFiso = _ -rightInv congNatIso^opFiso _ = refl -leftInv congNatIso^opFiso _ = refl +sec congNatIso^opFiso _ = refl +ret congNatIso^opFiso _ = refl diff --git a/Cubical/Categories/Presheaf/Properties.agda b/Cubical/Categories/Presheaf/Properties.agda index 221a844b79..01b0f7aac2 100644 --- a/Cubical/Categories/Presheaf/Properties.agda +++ b/Cubical/Categories/Presheaf/Properties.agda @@ -241,11 +241,11 @@ module _ {ℓS : Level} (C : Category ℓ ℓ') (F : Functor (C ^op) (SET ℓS)) → Iso A (Σ[ b ∈ B ] fiber ϕ b) typeSectionIso ϕ .fun a = (ϕ a) , (a , refl) typeSectionIso ϕ .inv (b , (a , eq)) = a - typeSectionIso {isSetB = isSetB} ϕ .rightInv (b , (a , eq)) + typeSectionIso {isSetB = isSetB} ϕ .sec (b , (a , eq)) = ΣPathP (eq , ΣPathP (refl , isOfHLevel→isOfHLevelDep 1 (λ b' → isSetB _ _) refl eq eq)) - typeSectionIso ϕ .leftInv a = refl + typeSectionIso ϕ .ret a = refl -- the natural transformation -- just applies typeSectionIso @@ -294,9 +294,9 @@ module _ {ℓS : Level} (C : Category ℓ ℓ') (F : Functor (C ^op) (SET ℓS)) → Iso (B x) (fiber {A = Σ[ a ∈ A ] B a} (λ (x , _) → x) x) typeFiberIso {x = x} _ .fun b = (x , b) , refl typeFiberIso _ .inv ((a , b) , eq) = subst _ eq b - typeFiberIso {isSetA = isSetA} {x = x} B .rightInv ((a , b) , eq) + typeFiberIso {isSetA = isSetA} {x = x} B .sec ((a , b) , eq) = fibersEqIfRepsEq {isSetB = isSetA} (λ (x , _) → x) (ΣPathP (sym eq , symP (transport-filler (λ i → B (eq i)) b))) - typeFiberIso {x = x} _ .leftInv b = sym (transport-filler refl b) + typeFiberIso {x = x} _ .ret b = sym (transport-filler refl b) -- the natural isomorphism -- applies typeFiberIso (inv) diff --git a/Cubical/Categories/Presheaf/Representable.agda b/Cubical/Categories/Presheaf/Representable.agda index 910a9d1764..dc005f1068 100644 --- a/Cubical/Categories/Presheaf/Representable.agda +++ b/Cubical/Categories/Presheaf/Representable.agda @@ -111,15 +111,15 @@ module _ {ℓo}{ℓh}{ℓp} (C : Category ℓo ℓh) (P : Presheaf C ℓp) where (lift f) .lower) lem = funExt (λ f i → (yonedaᴾ* {C = C} P (repr .fst) - .Iso.leftInv (repr .snd .trans) (~ i) ⟦ A ⟧) + .Iso.ret (repr .snd .trans) (~ i) ⟦ A ⟧) (lift f) .lower) anIso : Iso (C [ A , repr .fst ]) (fst (Functor.F-ob P A)) anIso .Iso.fun f = (repr .snd .trans ⟦ A ⟧) (lift f) .lower anIso .Iso.inv p = repr .snd .nIso A .inv (lift p) .lower - anIso .Iso.rightInv b = + anIso .Iso.sec b = cong lower (funExt⁻ (repr .snd .nIso A .sec) (lift b)) - anIso .Iso.leftInv a = + anIso .Iso.ret a = cong lower (funExt⁻ (repr .snd .nIso A .ret) (lift a)) universalElementToRepresentation : UniversalElement → Representation @@ -136,14 +136,14 @@ module _ {ℓo}{ℓh}{ℓp} (C : Category ℓo ℓh) (P : Presheaf C ℓp) where Representation≅UniversalElement : Iso Representation UniversalElement Representation≅UniversalElement .Iso.fun = representationToUniversalElement Representation≅UniversalElement .Iso.inv = universalElementToRepresentation - Representation≅UniversalElement .Iso.rightInv η = + Representation≅UniversalElement .Iso.sec η = isoFunInjective UniversalElementIsoΣ _ _ (ΣPathP (refl , (Σ≡Prop (λ _ → isPropIsUniversal _ _) - (yonedaᴾ* {C = C} P (η .vertex) .Iso.rightInv (η .element))))) - Representation≅UniversalElement .Iso.leftInv repr = + (yonedaᴾ* {C = C} P (η .vertex) .Iso.sec (η .element))))) + Representation≅UniversalElement .Iso.ret repr = ΣPathP (refl , (NatIso≡ (cong NatTrans.N-ob - (yonedaᴾ* {C = C} P (repr .fst) .Iso.leftInv (repr .snd .trans))))) + (yonedaᴾ* {C = C} P (repr .fst) .Iso.ret (repr .snd .trans))))) isTerminalToIsUniversal : ∀ {η : Elementᴾ {C = C} P} → isTerminal Elements η → isUniversal (η .fst) (η .snd) @@ -183,10 +183,10 @@ module _ {ℓo}{ℓh}{ℓp} (C : Category ℓo ℓh) (P : Presheaf C ℓp) where TerminalElement≅UniversalElement : Iso TerminalElement UniversalElement TerminalElement≅UniversalElement .Iso.fun = terminalElementToUniversalElement TerminalElement≅UniversalElement .Iso.inv = universalElementToTerminalElement - TerminalElement≅UniversalElement .Iso.rightInv η = + TerminalElement≅UniversalElement .Iso.sec η = isoFunInjective UniversalElementIsoΣ _ _ (ΣPathP (refl , (Σ≡Prop (λ _ → isPropIsUniversal _ _) refl))) - TerminalElement≅UniversalElement .Iso.leftInv η = + TerminalElement≅UniversalElement .Iso.ret η = Σ≡Prop (isPropIsTerminal Elements) refl Representation≅TerminalElement : Iso Representation TerminalElement diff --git a/Cubical/Categories/RezkCompletion/Construction.agda b/Cubical/Categories/RezkCompletion/Construction.agda index 1af07e349c..6892d1acb1 100644 --- a/Cubical/Categories/RezkCompletion/Construction.agda +++ b/Cubical/Categories/RezkCompletion/Construction.agda @@ -219,15 +219,15 @@ module RezkByHIT (C : Category ℓ ℓ') where H-inc-ua f = TypeOfHLevel≡ 2 $ isoToPath λ where .Iso.fun → C._⋆ f .fst .Iso.inv → C._⋆ f .snd .inv - .Iso.rightInv _ → C.⋆Assoc _ _ _ ∙∙ congR C._⋆_ (f .snd .sec) ∙∙ C.⋆IdR _ - .Iso.leftInv _ → C.⋆Assoc _ _ _ ∙∙ congR C._⋆_ (f .snd .ret) ∙∙ C.⋆IdR _ + .Iso.sec _ → C.⋆Assoc _ _ _ ∙∙ congR C._⋆_ (f .snd .sec) ∙∙ C.⋆IdR _ + .Iso.ret _ → C.⋆Assoc _ _ _ ∙∙ congR C._⋆_ (f .snd .ret) ∙∙ C.⋆IdR _ H-ua-inc : ∀ {x y z} → IsoC x y → H-inc x z ≡ H-inc y z H-ua-inc f = TypeOfHLevel≡ 2 $ isoToPath λ where .Iso.fun → f .snd .inv C.⋆_ .Iso.inv → f .fst C.⋆_ - .Iso.rightInv _ → sym (C.⋆Assoc _ _ _) ∙∙ congL C._⋆_ (f .snd .sec) ∙∙ C.⋆IdL _ - .Iso.leftInv _ → sym (C.⋆Assoc _ _ _) ∙∙ congL C._⋆_ (f .snd .ret) ∙∙ C.⋆IdL _ + .Iso.sec _ → sym (C.⋆Assoc _ _ _) ∙∙ congL C._⋆_ (f .snd .sec) ∙∙ C.⋆IdL _ + .Iso.ret _ → sym (C.⋆Assoc _ _ _) ∙∙ congL C._⋆_ (f .snd .ret) ∙∙ C.⋆IdL _ typeSquare : ∀ {A B C D : Type ℓ''} {P : A ≡ B} {Q : C ≡ D} {R S} → (∀ x → transport S (transport P x) ≡ transport Q (transport R x)) diff --git a/Cubical/Categories/Site/Instances/ZariskiCommRing.agda b/Cubical/Categories/Site/Instances/ZariskiCommRing.agda index 92cb955d58..473c1a0a1a 100644 --- a/Cubical/Categories/Site/Instances/ZariskiCommRing.agda +++ b/Cubical/Categories/Site/Instances/ZariskiCommRing.agda @@ -208,7 +208,7 @@ isSubcanonicalZariskiCoverage A R (unimodvec n f isUniModF) = isoToIsEquiv theIs (CompatibleFamily (yo A) (str (covers zariskiCoverage R) um)) fun theIso = elementToCompatibleFamily _ _ inv theIso fam = inducedHom f isUniModF fam - rightInv theIso fam = CompatibleFamily≡ _ _ _ _ + sec theIso fam = CompatibleFamily≡ _ _ _ _ λ i → CommRingHom≡ (funExt λ a → applyEqualizerLemma f isUniModF fam a .fst .snd i) - leftInv theIso φ = inducedHomUnique _ _ _ _ λ _ _ → refl + ret theIso φ = inducedHomUnique _ _ _ _ λ _ _ → refl diff --git a/Cubical/Categories/Yoneda.agda b/Cubical/Categories/Yoneda.agda index a32f3849ca..daccf976c6 100644 --- a/Cubical/Categories/Yoneda.agda +++ b/Cubical/Categories/Yoneda.agda @@ -56,8 +56,8 @@ module _ {C : Category ℓ ℓ'} where theIso : Iso natType setType theIso .fun = ϕ theIso .inv = Ψ - theIso .rightInv x i = F .F-id i x - theIso .leftInv α@(natTrans αo αh) = + theIso .sec x i = F .F-id i x + theIso .ret α@(natTrans αo αh) = NatTrans-≡-intro (sym αo≡βo) (symP αh≡βh) where β = Ψ (ϕ α) @@ -178,8 +178,8 @@ yoneda* {ℓ}{ℓ'}{ℓ''}{C} F c = the-iso .fun α .N-hom g = α .N-hom (g .lower) the-iso .inv β .N-ob d f = β .N-ob d f the-iso .inv β .N-hom g = β .N-hom (lift g) - the-iso .rightInv β = refl - the-iso .leftInv α = refl + the-iso .sec β = refl + the-iso .ret α = refl yonedaᴾ* : {C : Category ℓ ℓ'}(F : Functor (C ^op) (SET ℓ'')) → (c : Category.ob C) @@ -204,8 +204,8 @@ yonedaᴾ* {ℓ}{ℓ'}{ℓ''}{C} F c = the-iso .fun α .N-hom = α .N-hom the-iso .inv β .N-ob = β .N-ob the-iso .inv β .N-hom = β .N-hom - the-iso .rightInv = λ b → refl - the-iso .leftInv = λ a → refl + the-iso .sec = λ b → refl + the-iso .ret = λ a → refl -- Yoneda embedding -- TODO: probably want to rename/refactor @@ -236,8 +236,8 @@ module _ {C : Category ℓ ℓ'} where yoIso : Iso (NatTrans (yo x) F) (F .F-ob x .fst) yoIso .Iso.fun = yo-yo-yo yoIso .Iso.inv = no-no-no - yoIso .Iso.rightInv b i = F .F-id i b - yoIso .Iso.leftInv a = makeNatTransPath (funExt λ _ → funExt rem) + yoIso .Iso.sec b i = F .F-id i b + yoIso .Iso.ret a = makeNatTransPath (funExt λ _ → funExt rem) where rem : ∀ {z} (x₁ : C [ z , x ]) → F .F-hom x₁ (yo-yo-yo a) ≡ (a .N-ob z) x₁ rem g = @@ -253,7 +253,7 @@ module _ {C : Category ℓ ℓ'} where isFullYO : isFull YO - isFullYO x y F[f] = ∣ yo-yo-yo _ F[f] , yoIso {x} (yo y) .Iso.leftInv F[f] ∣₁ + isFullYO x y F[f] = ∣ yo-yo-yo _ F[f] , yoIso {x} (yo y) .Iso.ret F[f] ∣₁ isFaithfulYO : isFaithful YO isFaithfulYO x y f g p i = diff --git a/Cubical/Codata/Conat/Bounded.agda b/Cubical/Codata/Conat/Bounded.agda index a5f8e0322b..7b120d9252 100644 --- a/Cubical/Codata/Conat/Bounded.agda +++ b/Cubical/Codata/Conat/Bounded.agda @@ -100,8 +100,8 @@ discreteB′ m (i , i≺m) (j , j≺m) with discreteℕ i j Σ≺∞≃ℕ = isoToEquiv λ where .fun → fst .inv n → n , ≺∞ n - .rightInv _ → refl - .leftInv (n , p) i → λ where + .sec _ → refl + .ret (n , p) i → λ where .fst → n .snd → isProp≺ n ∞ (≺∞ n) p i where open Iso @@ -225,14 +225,14 @@ module Untangle iso- : Iso (Bounded m) (Bounded n) iso- .fun = f- iso- .inv = g- - iso- .rightInv = f-g- - iso- .leftInv = g-f- + iso- .sec = f-g- + iso- .ret = g-f- untangled : ∀{m n} → Iso (Bounded′ (csuc m)) (Bounded′ (csuc n)) → Iso (Bounded m) (Bounded n) -untangled isom = Untangle.iso- fun inv rightInv leftInv +untangled isom = Untangle.iso- fun inv sec ret where open Iso isom Bounded-inj-iso : ∀ m n → Iso (Bounded m) (Bounded n) → m ≡ n diff --git a/Cubical/Codata/Containers/Coalgebras.agda b/Cubical/Codata/Containers/Coalgebras.agda index af71cd7963..9be4b72345 100644 --- a/Cubical/Codata/Containers/Coalgebras.agda +++ b/Cubical/Codata/Containers/Coalgebras.agda @@ -24,5 +24,5 @@ module Coalgs (S : Type ℓ) (Q : S → Type ℓ') where isom : Iso (Σ[ s ∈ S ] (Q s → M S Q)) (M S Q) fun isom = uncurry sup-M inv isom m = shape m , pos m - rightInv isom m = ηEqM m - leftInv isom (s , f) = refl + sec isom m = ηEqM m + ret isom (s , f) = refl diff --git a/Cubical/Codata/M/M/Base.agda b/Cubical/Codata/M/M/Base.agda index 44361a55aa..a7cb24642b 100644 --- a/Cubical/Codata/M/M/Base.agda +++ b/Cubical/Codata/M/M/Base.agda @@ -44,8 +44,8 @@ lemma11-Iso : (X 0) fun (lemma11-Iso X l) (x , y) = x 0 inv (lemma11-Iso {S = S} X l) x₀ = limit-collapse {S = S} X l x₀ , (λ n → refl {x = limit-collapse {S = S} X l x₀ (suc n)}) -rightInv (lemma11-Iso X l) _ = refl -leftInv (lemma11-Iso {ℓ = ℓ} {S = S} X l) (x , y) i = +sec (lemma11-Iso X l) _ = refl +ret (lemma11-Iso {ℓ = ℓ} {S = S} X l) (x , y) i = let temp = χ-prop (x 0) (fst (inv (lemma11-Iso {S = S} X l) (fun (lemma11-Iso {S = S} X l) (x , y))) , refl , (λ n → refl {x = limit-collapse {S = S} X l (x 0) (suc n)})) (x , refl , y) in temp i .fst , proj₂ (temp i .snd) where @@ -63,8 +63,8 @@ leftInv (lemma11-Iso {ℓ = ℓ} {S = S} X l) (x , y) i = (NatSection (X-fiber-over-ℕ x₀)) fun (Z-is-Section x₀) (x , (z , y)) = record { section = x ; sec-comm-zero = z ; sec-comm-suc = y } inv (Z-is-Section x₀) x = NatSection.section x , (sec-comm-zero x , sec-comm-suc x) - rightInv (Z-is-Section x₀) _ = refl - leftInv (Z-is-Section x₀) (x , (z , y)) = refl + sec (Z-is-Section x₀) _ = refl + ret (Z-is-Section x₀) (x , (z , y)) = refl -- S≡T χ-prop' : (x₀ : X 0) → isProp (NatSection (X-fiber-over-ℕ x₀)) @@ -159,11 +159,11 @@ shift-iso S@(A , B) = (limit-of-chain (sequence S)) fun α-iso-step-1-4-Iso-lem-12 (a , b) = (λ { 0 → lift tt ; (suc n) → (a .fst n) , (b .fst n)}) , λ { 0 → refl {x = lift tt} ; (suc m) i → a .snd m i , b .snd m i } inv α-iso-step-1-4-Iso-lem-12 x = ((λ n → (x .fst) (suc n) .fst) , λ n i → (x .snd) (suc n) i .fst) , (λ n → (x .fst) (suc n) .snd) , λ n i → (x .snd) (suc n) i .snd - fst (rightInv α-iso-step-1-4-Iso-lem-12 (b , c) i) 0 = lift tt - fst (rightInv α-iso-step-1-4-Iso-lem-12 (b , c) i) (suc n) = refl i - snd (rightInv α-iso-step-1-4-Iso-lem-12 (b , c) i) 0 = refl - snd (rightInv α-iso-step-1-4-Iso-lem-12 (b , c) i) (suc n) = c (suc n) - leftInv α-iso-step-1-4-Iso-lem-12 (a , b) = refl + fst (sec α-iso-step-1-4-Iso-lem-12 (b , c) i) 0 = lift tt + fst (sec α-iso-step-1-4-Iso-lem-12 (b , c) i) (suc n) = refl i + snd (sec α-iso-step-1-4-Iso-lem-12 (b , c) i) 0 = refl + snd (sec α-iso-step-1-4-Iso-lem-12 (b , c) i) (suc n) = c (suc n) + ret α-iso-step-1-4-Iso-lem-12 (a , b) = refl shift : ∀ {ℓ} (S : Container ℓ) -> P₀ S (M S) ≡ M S shift S = isoToPath (shift-iso S) -- lemma 13 & lemma 12 diff --git a/Cubical/Codata/M/M/Properties.agda b/Cubical/Codata/M/M/Properties.agda index 6225bbbdcd..e26c818708 100644 --- a/Cubical/Codata/M/M/Properties.agda +++ b/Cubical/Codata/M/M/Properties.agda @@ -32,14 +32,14 @@ in-inverse-out {S = S} = subst (λ inv → in-fun {S = S} ∘ inv ≡ idfun (M S -- substituting refl makes type-checking work a lot faster, but introduces a transport -- TODO (2020-05-23): revisit this at some point to see if it's still needed in future versions of agda def : (in-fun {S = S} ∘ inv (shift-iso S)) ≡ idfun (M S) - def = funExt (rightInv (shift-iso S)) + def = funExt (sec (shift-iso S)) idpath : inv (shift-iso S) ≡ out-fun {S = S} idpath = refl out-inverse-in : ∀ {ℓ} {S : Container ℓ} → (out-fun {S = S} ∘ in-fun {S = S}) ≡ idfun (P₀ S (M S)) out-inverse-in {S = S} = subst (λ fun → out-fun {S = S} ∘ fun ≡ idfun (P₀ S (M S))) idpath def where def : (out-fun {S = S} ∘ fun (shift-iso S)) ≡ idfun (P₀ S (M S)) - def = funExt (leftInv (shift-iso S)) + def = funExt (ret (shift-iso S)) idpath : fun (shift-iso S) ≡ in-fun {S = S} idpath = refl diff --git a/Cubical/Cohomology/EilenbergMacLane/Base.agda b/Cubical/Cohomology/EilenbergMacLane/Base.agda index 2bc115cb30..b0503c0b88 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Base.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Base.agda @@ -260,14 +260,14 @@ coHom≅coHomRed n G 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) = + Iso.sec (fst main) = 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) = + Iso.ret (fst main) = ST.elim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM (suc n)) (funExt λ x → cong (fst f x +ₖ_) (cong -ₖ_ (snd f) ∙ -0ₖ (suc n)) @@ -286,13 +286,13 @@ fst (coHom⁰≅coHomRed⁰ G A) = isoToEquiv is 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.sec 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 = + Iso.ret is = uncurry (ST.elim (λ _ → isSetΠ (λ _ → isOfHLevelPath 2 (isSet× squash₂ (is-set (snd G))) _ _)) @@ -350,12 +350,12 @@ fst (coHomEquiv n f) = isoToEquiv is is : Iso _ _ Iso.fun is = coHomFun n (Iso.fun f) Iso.inv is = coHomFun n (Iso.inv f) - Iso.rightInv is = + Iso.sec is = ST.elim (λ _ → isSetPathImplicit) - λ g → cong ∣_∣₂ (funExt λ x → cong g (Iso.leftInv f x)) - Iso.leftInv is = + λ g → cong ∣_∣₂ (funExt λ x → cong g (Iso.ret f x)) + Iso.ret is = ST.elim (λ _ → isSetPathImplicit) - λ g → cong ∣_∣₂ (funExt λ x → cong g (Iso.rightInv f x)) + λ g → cong ∣_∣₂ (funExt λ x → cong g (Iso.sec f x)) snd (coHomEquiv n f) = snd (coHomHom n (Iso.fun f)) coHomFun∙ : ∀ {ℓ''} {A : Pointed ℓ} {B : Pointed ℓ'} {G : AbGroup ℓ''} @@ -441,14 +441,14 @@ EM→-charac : ∀ {ℓ ℓ'} {A : Pointed ℓ} {G : AbGroup ℓ'} (n : ℕ) Iso.fun (EM→-charac {A = A} n) f = ((λ x → f x -ₖ f (pt A)) , rCancelₖ n (f (pt A))) , f (pt A) Iso.inv (EM→-charac n) (f , a) x = fst f x +ₖ a -Iso.rightInv (EM→-charac {A = A} n) ((f , p) , a) = +Iso.sec (EM→-charac {A = A} n) ((f , p) , a) = ΣPathP (→∙Homogeneous≡ (isHomogeneousEM _) (funExt (λ x → (λ i → (f x +ₖ a) -ₖ (cong (_+ₖ a) p ∙ lUnitₖ n a) i) ∙ sym (assocₖ n (f x) a (-ₖ a)) ∙ cong (f x +ₖ_) (rCancelₖ n a) ∙ rUnitₖ n (f x))) , cong (_+ₖ a) p ∙ lUnitₖ n a) -Iso.leftInv (EM→-charac {A = A} n) f = +Iso.ret (EM→-charac {A = A} n) f = funExt λ x → sym (assocₖ n (f x) (-ₖ f (pt A)) (f (pt A))) ∙∙ cong (f x +ₖ_) (lCancelₖ n (f (pt A))) ∙∙ rUnitₖ n (f x) diff --git a/Cubical/Cohomology/EilenbergMacLane/EilenbergSteenrod.agda b/Cubical/Cohomology/EilenbergMacLane/EilenbergSteenrod.agda index 4065a843fb..7e700e9a29 100644 --- a/Cubical/Cohomology/EilenbergMacLane/EilenbergSteenrod.agda +++ b/Cubical/Cohomology/EilenbergMacLane/EilenbergSteenrod.agda @@ -145,7 +145,7 @@ module _ where 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})) = + sec (fst (suspMapIso (pos n) {A = A})) = ST.elim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) (funExt λ x → cong (ΩEM+1→EM n) @@ -156,10 +156,10 @@ module _ where (cong sym (cong (EM→ΩEM+1 n) (snd f) ∙ EM→ΩEM+1-0ₖ n)) ∙ sym (rUnit _)) - ∙ Iso.leftInv (Iso-EM-ΩEM+1 n) (fst f x))) - rightInv (fst (suspMapIso (negsuc zero))) tt* = refl - rightInv (fst (suspMapIso (negsuc (suc n)))) tt* = refl - leftInv (fst (suspMapIso (pos n) {A = A})) = + ∙ Iso.ret (Iso-EM-ΩEM+1 n) (fst f x))) + sec (fst (suspMapIso (negsuc zero))) tt* = refl + sec (fst (suspMapIso (negsuc (suc n)))) tt* = refl + ret (fst (suspMapIso (pos n) {A = A})) = ST.elim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM (suc n)) (funExt λ { north → sym (snd f) @@ -172,7 +172,7 @@ module _ where ∙∙ cong (fst f) (toSusp A a) ∙∙ snd f))) (cong (fst f) (merid a)) - lem a f = Iso.rightInv (Iso-EM-ΩEM+1 n) _ + lem a f = Iso.sec (Iso-EM-ΩEM+1 n) _ ◁ λ i j → hcomp (λ k → λ { (i = i1) → fst f (merid a j) ; (j = i0) → snd f (~ i ∧ k) @@ -180,13 +180,13 @@ module _ where (sym (snd f)) (cong (fst f) (merid (pt A))) k i}) (fst f (compPath-filler (merid a) (sym (merid (pt A))) (~ i) j)) - leftInv (fst (suspMapIso (negsuc zero) {A = A})) = + ret (fst (suspMapIso (negsuc zero) {A = A})) = ST.elim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (Σ≡Prop (λ _ → hLevelEM G 0 _ _) (funExt (suspToPropElim (pt A) (λ _ → hLevelEM G 0 _ _) (sym (snd f))))) - leftInv (fst (suspMapIso (negsuc (suc n)))) tt* = refl + ret (fst (suspMapIso (negsuc (suc n)))) tt* = refl snd (suspMapIso n) = suspMap n .snd satisfies-ES : ∀ {ℓ ℓ'} (G : AbGroup ℓ) → coHomTheory {ℓ'} (coHomRedℤ G) @@ -237,8 +237,8 @@ module _ where (Im (coHomHom∙ n (cfcod (fst f) , refl))) fun help (x , p) = x , To x p inv help (x , p) = x , From x p - rightInv help (x , p) = Σ≡Prop (λ _ → isPropIsInIm _ _) refl - leftInv help (x , p) = Σ≡Prop (λ _ → isPropIsInKer _ _) refl + sec help (x , p) = Σ≡Prop (λ _ → isPropIsInIm _ _) refl + ret help (x , p) = Σ≡Prop (λ _ → isPropIsInKer _ _) refl Exactness (satisfies-ES {ℓ} {ℓ'} G) {A = A} {B = B} f (negsuc n) = isoToPath help where @@ -247,8 +247,8 @@ module _ where (cfcod (fst f) , refl))) fun help (tt* , p) = tt* , ∣ tt* , refl ∣₁ inv help (tt* , p) = tt* , refl - rightInv help (tt* , p) = Σ≡Prop (λ _ → isPropIsInIm _ _) refl - leftInv help (tt* , p) = Σ≡Prop (λ _ → isPropIsInKer _ _) refl + sec help (tt* , p) = Σ≡Prop (λ _ → isPropIsInIm _ _) refl + ret help (tt* , p) = Σ≡Prop (λ _ → isPropIsInKer _ _) refl 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)) _) = @@ -274,13 +274,13 @@ module _ where ; (inr x) → fst g x ; (push a i) → (snd f ∙ sym (snd g)) i}) , snd f ∣₂) - rightInv (fst main) = + sec (fst main) = uncurry (ST.elim2 (λ _ _ → isOfHLevelPath 2 (isSet× squash₂ squash₂) _ _) λ f g → ΣPathP ((cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) refl)) , cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) refl))) - leftInv (fst main) = + ret (fst main) = ST.elim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (→∙Homogeneous≡ (isHomogeneousEM n) (funExt λ { (inl x) → refl @@ -325,9 +325,9 @@ Wedge (satisfies-ES-gen G) (pos n) {I = I} satAC {A = A} = ; (inr x) → f (fst x) .fst (snd x) ; (push a i) → f a .snd (~ i)}) , refl - rightInv mainIso = ST.elim (λ _ → isSetPathImplicit) + sec mainIso = ST.elim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (funExt (λ i → ΣPathP (refl , (sym (rUnit (snd (f i))))))) - leftInv mainIso = ST.elim (λ _ → isSetPathImplicit) + ret mainIso = ST.elim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (ΣPathP ((funExt (λ { (inl x) → sym (snd f) ; (inr x) → refl diff --git a/Cubical/Cohomology/EilenbergMacLane/Groups/Connected.agda b/Cubical/Cohomology/EilenbergMacLane/Groups/Connected.agda index 05d173b327..eddd42a393 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Groups/Connected.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Groups/Connected.agda @@ -65,8 +65,8 @@ module _ {A : Type ℓ} (conA : isConnected 2 A) (G : AbGroup ℓ') where is : Iso _ _ Iso.fun is = G→H⁰ Iso.inv is = H⁰→G - Iso.rightInv is = H⁰→G→H⁰ - Iso.leftInv is = G→H⁰→G + Iso.sec is = H⁰→G→H⁰ + Iso.ret is = G→H⁰→G snd H⁰conn' = makeIsGroupHom λ _ _ → refl H⁰conn : AbGroupEquiv (coHomGr zero G A) G diff --git a/Cubical/Cohomology/EilenbergMacLane/Groups/KleinBottle.agda b/Cubical/Cohomology/EilenbergMacLane/Groups/KleinBottle.agda index 047df48a83..1a2d85815e 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Groups/KleinBottle.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Groups/KleinBottle.agda @@ -174,8 +174,8 @@ H¹K²→ℤ/2×ℤ/2 = ST.rec (is-set (snd (dirProdAb ℤ/2 ℤ/2))) ℤ/2×ℤ/2→H¹K²→ℤ/2×ℤ/2 : (x : fst (dirProdAb ℤ/2 ℤ/2)) → H¹K²→ℤ/2×ℤ/2 (ℤ/2×ℤ/2→H¹K² x) ≡ x ℤ/2×ℤ/2→H¹K²→ℤ/2×ℤ/2 (g₁ , g₂) = - ΣPathP ((Iso.leftInv (Iso-EM-ΩEM+1 0) g₁) - , Iso.leftInv (Iso-EM-ΩEM+1 0) g₂) + ΣPathP ((Iso.ret (Iso-EM-ΩEM+1 0) g₁) + , Iso.ret (Iso-EM-ΩEM+1 0) g₂) H¹K²→ℤ/2×ℤ/2→H¹K² : (x : _) → ℤ/2×ℤ/2→H¹K² (H¹K²→ℤ/2×ℤ/2 x) ≡ x @@ -183,8 +183,8 @@ H¹K²→ℤ/2×ℤ/2→H¹K² = 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)) - (flipSquare (Iso.rightInv (Iso-EM-ΩEM+1 0) l2))))) + (flipSquare (Iso.sec (Iso-EM-ΩEM+1 0) l1)) + (flipSquare (Iso.sec (Iso-EM-ΩEM+1 0) l2))))) ℤ/2×ℤ/2≅H¹[K²,ℤ/2] : AbGroupEquiv (dirProdAb ℤ/2 ℤ/2) (coHomGr 1 ℤ/2 KleinBottle) @@ -193,8 +193,8 @@ fst ℤ/2×ℤ/2≅H¹[K²,ℤ/2] = isoToEquiv is is : Iso _ _ Iso.fun is = ℤ/2×ℤ/2→H¹K² Iso.inv is = H¹K²→ℤ/2×ℤ/2 - Iso.rightInv is = H¹K²→ℤ/2×ℤ/2→H¹K² - Iso.leftInv is = ℤ/2×ℤ/2→H¹K²→ℤ/2×ℤ/2 + Iso.sec is = H¹K²→ℤ/2×ℤ/2→H¹K² + Iso.ret is = ℤ/2×ℤ/2→H¹K²→ℤ/2×ℤ/2 snd ℤ/2×ℤ/2≅H¹[K²,ℤ/2] = makeIsGroupHom λ x y → cong ∣_∣₂ (funExt (elimSet (λ _ → hLevelEM _ 1 _ _) refl @@ -284,11 +284,11 @@ H²K²→ℤ/2→H²K² = λ { point → refl ; (line1 i) → refl ; (line2 i) → refl - ; (square i j) k → Iso.leftInv Iso-Ω²K₂-ℤ/2 sq k i j})) + ; (square i j) k → Iso.ret Iso-Ω²K₂-ℤ/2 sq k i j})) ℤ/2→H²K²→ℤ/2 : (g : fst ℤ/2) → H²K²→ℤ/2 (ℤ/2→H²K² g) ≡ g ℤ/2→H²K²→ℤ/2 g = - H²K²→ℤ/2-rewrite (ℤ/2→Ω²K₂ g) ∙ (Iso.rightInv Iso-Ω²K₂-ℤ/2 g) + H²K²→ℤ/2-rewrite (ℤ/2→Ω²K₂ g) ∙ (Iso.sec Iso-Ω²K₂-ℤ/2 g) KleinFun-triv : ∀ {ℓ} {A : Type ℓ} {a : A} → KleinFun a refl refl refl ≡ λ _ → a KleinFun-triv = @@ -311,8 +311,8 @@ fst H²[K²,ℤ/2]≅ℤ/2 = isoToEquiv is is : Iso _ _ Iso.fun is = H²K²→ℤ/2 Iso.inv is = ℤ/2→H²K² - Iso.rightInv is = ℤ/2→H²K²→ℤ/2 - Iso.leftInv is = H²K²→ℤ/2→H²K² + Iso.sec is = ℤ/2→H²K²→ℤ/2 + Iso.ret 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) @@ -389,16 +389,16 @@ fst (H¹[K²,G]≅G×H¹[RP²,G] G) = isoToEquiv mainIso 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.rightInv mainIso = uncurry λ g + Iso.sec mainIso = uncurry λ g → ST.elim (λ _ → isOfHLevelPath 2 (isSet× (is-set (snd G)) squash₂) _ _) - λ f → ΣPathP ((Iso.leftInv (Iso-EM-ΩEM+1-gen 0 (f point)) g) + λ f → ΣPathP ((Iso.ret (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.ret 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))))) + (flipSquare (Iso.sec (Iso-EM-ΩEM+1-gen 0 (f point)) (cong f line2))))) snd (H¹[K²,G]≅G×H¹[RP²,G] G) = makeIsGroupHom (ST.elim2 (λ _ _ → isOfHLevelPath 2 lem _ _) @@ -445,14 +445,14 @@ private (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.sec (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.ret (H²K²-helperIso₁ G n) = ST.elim (λ _ → isSetPathImplicit) λ _ → refl H²K²-helperIso₂ : (G : AbGroup ℓ) (n : ℕ) → Iso ∥ (Σ[ p ∈ Ω (EM∙ G (2 +ℕ n)) .fst ] @@ -461,7 +461,7 @@ private 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.sec (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))} @@ -473,7 +473,7 @@ private → 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.ret (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)) diff --git a/Cubical/Cohomology/EilenbergMacLane/Groups/RP2.agda b/Cubical/Cohomology/EilenbergMacLane/Groups/RP2.agda index 370ab29351..7327b91185 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Groups/RP2.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Groups/RP2.agda @@ -140,7 +140,7 @@ H¹[RP²,ℤ/2]→ℤ/2 = ℤ/2→H¹[RP²,ℤ/2]→ℤ/2 : (x : fst ℤ/2) → H¹[RP²,ℤ/2]→ℤ/2 (ℤ/2→H¹[RP²,ℤ/2] x) ≡ x -ℤ/2→H¹[RP²,ℤ/2]→ℤ/2 = Iso.leftInv (Iso-EM-ΩEM+1 0) +ℤ/2→H¹[RP²,ℤ/2]→ℤ/2 = Iso.ret (Iso-EM-ΩEM+1 0) H¹[RP²,ℤ/2]→ℤ/2→H¹[RP²,ℤ/2] : (f : coHom 1 ℤ/2 RP²) → ℤ/2→H¹[RP²,ℤ/2] (H¹[RP²,ℤ/2]→ℤ/2 f) ≡ f @@ -153,7 +153,7 @@ H¹[RP²,ℤ/2]→ℤ/2→H¹[RP²,ℤ/2] = λ l sq → cong ∣_∣₂ (funExt (elimSetRP² (λ _ → hLevelEM _ 1 _ _) refl - (flipSquare (Iso.rightInv (Iso-EM-ΩEM+1 0) l))))) + (flipSquare (Iso.sec (Iso-EM-ΩEM+1 0) l))))) H¹[RP²,ℤ/2]≅ℤ/2 : AbGroupEquiv (coHomGr 1 ℤ/2 RP²) ℤ/2 fst H¹[RP²,ℤ/2]≅ℤ/2 = isoToEquiv is @@ -161,8 +161,8 @@ fst H¹[RP²,ℤ/2]≅ℤ/2 = isoToEquiv is is : Iso _ _ Iso.fun is = H¹[RP²,ℤ/2]→ℤ/2 Iso.inv is = ℤ/2→H¹[RP²,ℤ/2] - Iso.rightInv is = ℤ/2→H¹[RP²,ℤ/2]→ℤ/2 - Iso.leftInv is = H¹[RP²,ℤ/2]→ℤ/2→H¹[RP²,ℤ/2] + Iso.sec is = ℤ/2→H¹[RP²,ℤ/2]→ℤ/2 + Iso.ret is = H¹[RP²,ℤ/2]→ℤ/2→H¹[RP²,ℤ/2] snd H¹[RP²,ℤ/2]≅ℤ/2 = isGroupHomInv ((invEquiv (fst H¹[RP²,ℤ/2]≅ℤ/2)) , makeIsGroupHom λ x y → cong ∣_∣₂ @@ -197,7 +197,7 @@ H²[RP²,ℤ/2]→ℤ/2-Id q = cong (Iso.fun Iso-Ω²K₂-ℤ/2) lem → H²[RP²,ℤ/2]→ℤ/2 (ℤ/2→H²[RP²,ℤ/2] x) ≡ x ℤ/2→H²[RP²,ℤ/2]→ℤ/2 x = H²[RP²,ℤ/2]→ℤ/2-Id (Iso.inv Iso-Ω²K₂-ℤ/2 x) - ∙ Iso.rightInv Iso-Ω²K₂-ℤ/2 x + ∙ Iso.sec Iso-Ω²K₂-ℤ/2 x H²[RP²,ℤ/2]→ℤ/2→H²[RP²,ℤ/2] : (x : coHom 2 ℤ/2 RP²) → ℤ/2→H²[RP²,ℤ/2] (H²[RP²,ℤ/2]→ℤ/2 x) ≡ x @@ -210,7 +210,7 @@ H²[RP²,ℤ/2]→ℤ/2→H²[RP²,ℤ/2] = λ sq → cong (ℤ/2→H²[RP²,ℤ/2]) (H²[RP²,ℤ/2]→ℤ/2-Id sq) ∙ cong ∣_∣₂ (cong (RP²Fun (snd (EM∙ ℤ/2 2)) refl) - (Iso.leftInv Iso-Ω²K₂-ℤ/2 sq))) + (Iso.ret Iso-Ω²K₂-ℤ/2 sq))) H²[RP²,ℤ/2]≅ℤ/2 : AbGroupEquiv (coHomGr 2 ℤ/2 RP²) ℤ/2 fst H²[RP²,ℤ/2]≅ℤ/2 = isoToEquiv is @@ -218,8 +218,8 @@ fst H²[RP²,ℤ/2]≅ℤ/2 = isoToEquiv is is : Iso _ _ Iso.fun is = H²[RP²,ℤ/2]→ℤ/2 Iso.inv is = ℤ/2→H²[RP²,ℤ/2] - Iso.rightInv is = ℤ/2→H²[RP²,ℤ/2]→ℤ/2 - Iso.leftInv is = H²[RP²,ℤ/2]→ℤ/2→H²[RP²,ℤ/2] + Iso.sec is = ℤ/2→H²[RP²,ℤ/2]→ℤ/2 + Iso.ret is = H²[RP²,ℤ/2]→ℤ/2→H²[RP²,ℤ/2] snd H²[RP²,ℤ/2]≅ℤ/2 = Isoℤ/2-morph (fst H²[RP²,ℤ/2]≅ℤ/2) _ (sym (H²[RP²,ℤ/2]→ℤ/2-Id refl) @@ -296,16 +296,16 @@ module _ {ℓ : Level} (G : AbGroup ℓ) where is : Iso _ _ Iso.fun is = H¹[RP²,G]→G[2] Iso.inv is = G[2]→H¹[RP²,G] - Iso.rightInv is (g , p) = + Iso.sec is (g , p) = Σ≡Prop (λ _ → is-set (snd G) _ _) - (Iso.leftInv (Iso-EM-ΩEM+1 0) g) - Iso.leftInv is = ST.elim (λ _ → isSetPathImplicit) + (Iso.ret (Iso-EM-ΩEM+1 0) g) + Iso.ret is = ST.elim (λ _ → isSetPathImplicit) (RP²Conn.elim₁ (isConnectedEM 1) (λ _ → squash₂ _ _) embase λ p q → cong ∣_∣₂ (funExt (elimSetRP² (λ _ → emsquash _ _) refl - (flipSquare (Iso.rightInv (Iso-EM-ΩEM+1 {G = G} 0) p))))) + (flipSquare (Iso.sec (Iso-EM-ΩEM+1 {G = G} 0) p))))) snd G[2]≅H¹[RP²,G] = makeIsGroupHom λ x y → cong ∣_∣₂ (funExt (elimSetRP² (λ _ → emsquash _ _) refl @@ -350,8 +350,8 @@ module _ (G : AbGroup ℓ) where (λ _ → 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.sec (killFirstCompIsoGen n) = ST.elim (λ _ → isSetPathImplicit) λ _ → refl + Iso.ret (killFirstCompIsoGen n) = ST.elim (λ _ → isSetPathImplicit) (uncurry (TR.elim (λ _ → isProp→isOfHLevelSuc (3 +ℕ n) (isPropΠ (λ _ → squash₂ _ _))) (EM-raw'-trivElim G (suc n) (λ _ → isProp→isOfHLevelSuc (suc n) @@ -435,7 +435,7 @@ module _ (G : AbGroup ℓ) where , cong (snd G ._+_ g) (+IdR (snd G) _) ∙ sym (+IdR (snd G) (snd G ._+_ g g)) ∙ cong₂ (snd G ._+_) - (sym (Iso.leftInv (Iso-EM-ΩEM+1 0) _) + (sym (Iso.ret (Iso-EM-ΩEM+1 0) _) ∙ cong (ΩEM+1→EM 0) (emloop-comp _ g g)) (sym (+InvR (snd G) (ΩEM+1→EM 0 q))) ∙ +Assoc (snd G) _ _ _ ∣₁) @@ -464,11 +464,11 @@ module _ (G : AbGroup ℓ) where ∙ (sym (+Assoc (snd G) _ _ _) ∙ cong (_+_ (snd G) b) (+InvL (snd G) a)) ∙ +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.sec H²RP²-Iso₃ = SQ.elimProp (λ _ → squash/ _ _) + λ a → cong [_] (Iso.ret (Iso-EM-ΩEM+1 0) a) + Iso.ret 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))))) + λ p → cong ∣_∣₂ (ΣPathP (refl , (Iso.sec (Iso-EM-ΩEM+1 0) p))))) H²[RP²,G]≅G/2 : AbGroupEquiv (coHomGr 2 G RP²) (G /^ 2) fst H²[RP²,G]≅G/2 = isoToEquiv is diff --git a/Cubical/Cohomology/EilenbergMacLane/Groups/RPinf.agda b/Cubical/Cohomology/EilenbergMacLane/Groups/RPinf.agda index 8a1d36f8df..64932ebcb4 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Groups/RPinf.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Groups/RPinf.agda @@ -214,8 +214,8 @@ RP→Charac₀ : Iso (EM ℤ/2 1 → ℤ/2 .fst) (ℤ/2 .fst) Iso.fun RP→Charac₀ f = f embase Iso.inv RP→Charac₀ a = λ _ → a -Iso.rightInv RP→Charac₀ a = refl -Iso.leftInv RP→Charac₀ f = +Iso.sec RP→Charac₀ a = refl +Iso.ret RP→Charac₀ f = funExt (EM→Prop _ 0 (λ _ → is-set (snd ℤ/2Ring) _ _) refl) RP→EM-ℤ/2-CharacIso : (n : ℕ) diff --git a/Cubical/Cohomology/EilenbergMacLane/Groups/Sn.agda b/Cubical/Cohomology/EilenbergMacLane/Groups/Sn.agda index 315fb97694..7ac1bd51de 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Groups/Sn.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Groups/Sn.agda @@ -109,12 +109,12 @@ module _ (G : AbGroup ℓ) where is : Iso _ _ Iso.fun is = H¹S¹→G Iso.inv is = G→H¹S¹ - Iso.rightInv is = Iso.leftInv (Iso-EM-ΩEM+1 0) - Iso.leftInv is = + Iso.sec is = Iso.ret (Iso-EM-ΩEM+1 0) + Iso.ret is = ST.elim (λ _ → isSetPathImplicit) (S¹-connElim (isConnectedEM 1) (λ _ → squash₂ _ _) embase - λ p → cong ∣_∣₂ (cong (S¹fun embase) (Iso.rightInv (Iso-EM-ΩEM+1 0) p))) + λ p → cong ∣_∣₂ (cong (S¹fun embase) (Iso.sec (Iso-EM-ΩEM+1 0) p))) snd H¹[S¹,G]≅G = isGroupHomInv ((invEquiv (fst H¹[S¹,G]≅G)) , makeIsGroupHom λ x y → cong ∣_∣₂ @@ -143,7 +143,7 @@ module _ (G : AbGroup ℓ) where is : Iso _ _ Iso.fun is = HⁿSⁿ↑ n Iso.inv is = HⁿSⁿ↓ n - Iso.rightInv is = + Iso.sec is = ST.elim (λ _ → isSetPathImplicit) (Sⁿ-connElim n (isConnectedSubtr 2 (suc n) (subst (λ x → isConnected x (EM G (suc (suc n)))) @@ -159,12 +159,12 @@ module _ (G : AbGroup ℓ) where (merid x) (sym (merid (ptSn (suc n)))) ∙ cong (p x ∙_) (cong sym q) ∙ sym (rUnit (p x))) - ∙ Iso.rightInv (Iso-EM-ΩEM+1 (suc n)) (p x))))) + ∙ Iso.sec (Iso-EM-ΩEM+1 (suc n)) (p x))))) (isConnectedPath (suc n) (isConnectedPath (suc (suc n)) (isConnectedEM (suc (suc n))) _ _) (p (ptSn _)) refl .fst)) - Iso.leftInv is = ST.elim (λ _ → isSetPathImplicit) + Iso.ret is = ST.elim (λ _ → isSetPathImplicit) λ f → TR.rec (isProp→isOfHLevelSuc n (squash₂ _ _)) (λ q → cong ∣_∣₂ (funExt λ x → cong (ΩEM+1→EM (suc n)) @@ -173,7 +173,7 @@ module _ (G : AbGroup ℓ) where (cong sym (cong (EM→ΩEM+1 (suc n)) q ∙ EM→ΩEM+1-0ₖ (suc n))) ∙ sym (rUnit _)) - ∙ Iso.leftInv (Iso-EM-ΩEM+1 (suc n)) (f x))) + ∙ Iso.ret (Iso-EM-ΩEM+1 (suc n)) (f x))) (isConnectedPath (suc n) (isConnectedEM (suc n)) (f (ptSn (suc n))) (0ₖ (suc n)) .fst) @@ -413,11 +413,11 @@ gen-HⁿSⁿ-raw↦1 R (suc (suc n)) = (merid x) (sym (merid (ptSn (suc n))))) ∙ ΩEM+1→EM-hom (suc n) _ _) ∙ cong₂ _+ₖ_ - (Iso.leftInv (Iso-EM-ΩEM+1 (suc n)) + (Iso.ret (Iso-EM-ΩEM+1 (suc n)) (gen-HⁿSⁿ-raw R (suc n) .fst x)) (((λ i → ΩEM+1→EM-sym (suc n) (EM→ΩEM+1 (suc n) (snd (gen-HⁿSⁿ-raw R (suc n)) i)) i) - ∙ cong -ₖ_ (Iso.leftInv (Iso-EM-ΩEM+1 (suc n)) (0ₖ (suc n))) + ∙ cong -ₖ_ (Iso.ret (Iso-EM-ΩEM+1 (suc n)) (0ₖ (suc n))) ∙ -0ₖ (suc n))) ∙ rUnitₖ (suc n) _)) ∙ gen-HⁿSⁿ-raw↦1 R (suc n) @@ -457,7 +457,7 @@ HⁿSⁿ-raw≃G-inv-isInv R (suc (suc n)) r = (isHomogeneousEM _) (funExt λ z → cong (ΩEM+1→EM (suc n)) (lem z) - ∙ Iso-EM-ΩEM+1 (suc n) .Iso.leftInv (subst (EM (Ring→AbGroup R)) + ∙ Iso-EM-ΩEM+1 (suc n) .Iso.ret (subst (EM (Ring→AbGroup R)) (+'-comm (suc n) 0) (_⌣ₖ_ {m = 0} (fst (gen-HⁿSⁿ-raw R (suc n)) z) r))))) ∙ HⁿSⁿ-raw≃G-inv-isInv R (suc n) r diff --git a/Cubical/Cohomology/EilenbergMacLane/Groups/Torus.agda b/Cubical/Cohomology/EilenbergMacLane/Groups/Torus.agda index 6abcaf3d9c..1854eadb5c 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Groups/Torus.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Groups/Torus.agda @@ -156,7 +156,7 @@ H¹[T²,G]≅G×G G = λ f → ∣ (λ x → f (x , base)) ∣₂ , ∣ (λ x → f (base , x)) ∣₂ Iso.inv typIso = uncurry (ST.rec2 squash₂ λ f g → ∣ (λ x → f (fst x) +1 g (snd x)) ∣₂) - Iso.rightInv typIso = + Iso.sec typIso = uncurry (ST.elim2 (λ _ _ → isOfHLevelPath 2 (isSet× squash₂ squash₂) _ _) (S¹-connElim (isConnectedEM {G' = G} 1) (λ _ → isPropΠ λ _ → isSet× squash₂ squash₂ _ _) @@ -166,7 +166,7 @@ H¹[T²,G]≅G×G G = (0ₖ {G = G} 1) λ q i → ∣ (λ l → rUnitₖ {G = G} 1 (S¹fun (0ₖ {G = G} 1) p l) i) ∣₂ , ∣ S¹fun (0ₖ {G = G} 1) q ∣₂)) - Iso.leftInv typIso = coHomPointedElimT² {G = G} 0 (λ _ → squash₂ _ _) + Iso.ret typIso = coHomPointedElimT² {G = G} 0 (λ _ → squash₂ _ _) λ p q r → cong ∣_∣₂ (funExt (uncurry (S¹elim _ (λ _ → refl) (funExt (toPropElim (λ _ → isOfHLevelPathP' 1 (hLevelEM G 1 _ _) _ _ ) diff --git a/Cubical/Cohomology/EilenbergMacLane/Groups/Wedge.agda b/Cubical/Cohomology/EilenbergMacLane/Groups/Wedge.agda index 25d2fe03b1..09d3a3ab8e 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Groups/Wedge.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Groups/Wedge.agda @@ -64,7 +64,7 @@ module _ {A : Pointed ℓ} {B : Pointed ℓ'} (G : AbGroup ℓ) where λ f → ∣ f ∘ inl ∣₂ , ∣ f ∘ inr ∣₂ Iso.inv (Hⁿ⋁-Iso n) = uncurry (ST.rec2 squash₂ λ f g → ∣ Hⁿ-⋁→Hⁿ× n f g ∣₂) - Iso.rightInv (Hⁿ⋁-Iso n) = + Iso.sec (Hⁿ⋁-Iso n) = uncurry (ST.elim2 (λ _ _ → isOfHLevelPath 2 (isSet× squash₂ squash₂) _ _) λ f g @@ -80,7 +80,7 @@ module _ {A : Pointed ℓ} {B : Pointed ℓ'} (G : AbGroup ℓ) where ∙ rUnitₖ (suc n) (g x))) (isConnectedPath (suc n) (isConnectedEM (suc n)) (g (pt B)) (0ₖ (suc n)) .fst))) - Iso.leftInv (Hⁿ⋁-Iso n) = + Iso.ret (Hⁿ⋁-Iso n) = ST.elim (λ _ → isSetPathImplicit) λ f → Trunc.rec (isProp→isOfHLevelSuc n (squash₂ _ _)) (λ p → cong ∣_∣₂ diff --git a/Cubical/Cohomology/EilenbergMacLane/Gysin.agda b/Cubical/Cohomology/EilenbergMacLane/Gysin.agda index c86e76099b..db98edee7b 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Gysin.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Gysin.agda @@ -107,8 +107,8 @@ module ⌣Eq (R' : CommRing ℓ'') where -ₖ^-iso : ∀ {ℓ} {G : AbGroup ℓ} {k : ℕ} (n m : ℕ) → Iso (EM G k) (EM G k) Iso.fun (-ₖ^-iso n m) = -ₖ^[ n · m ] Iso.inv (-ₖ^-iso n m) = -ₖ^[ n · m ] - Iso.rightInv (-ₖ^-iso n m) = -ₖ^< n · m >² _ _ _ - Iso.leftInv (-ₖ^-iso n m) = -ₖ^< n · m >² _ _ _ + Iso.sec (-ₖ^-iso n m) = -ₖ^< n · m >² _ _ _ + Iso.ret (-ₖ^-iso n m) = -ₖ^< n · m >² _ _ _ g-cute' : (n i : ℕ) → EMR i → S₊∙ n →∙ EMR∙ (n +' i) g-cute' n i = @@ -185,16 +185,16 @@ module ⌣Eq (R' : CommRing ℓ'') where , flipSquare ((λ j → EM→ΩEM+1-gen (i + n) (snd f j) (snd st j)) ▷ (EM→ΩEM+1-gen-0ₖ (i + n) _ ∙ EM→ΩEM+1-0ₖ (i + n)))) - Iso.rightInv (ΩFunIso n i f) st = + Iso.sec (ΩFunIso n i f) st = →∙Homogeneous≡ (isHomogeneousEM _) (funExt λ x - → Iso.leftInv (Iso-EM-ΩEM+1-gen (i + n) (fst f x)) (st .fst x)) - Iso.leftInv (ΩFunIso n i f) st = + → Iso.ret (Iso-EM-ΩEM+1-gen (i + n) (fst f x)) (st .fst x)) + Iso.ret (ΩFunIso n i f) st = →∙HomogeneousSquare (isHomogeneousEM _) refl refl (Iso.inv (ΩFunIso n i f) (Iso.fun (ΩFunIso n i f) st)) st (cong funExt (funExt - λ x → Iso.rightInv + λ x → Iso.sec (Iso-EM-ΩEM+1-gen (i + n) (fst f x)) λ i → st i .fst x)) g-cute-ind : (n i : ℕ) @@ -209,7 +209,7 @@ module ⌣Eq (R' : CommRing ℓ'') where (λ i → transportRefl (_⌣ₖ_ {n = 1} {m = 0} (EM→ΩEM+1 0 x i) (gen-HⁿSⁿ-raw R zero .fst y)) j)) - ∙ Iso.leftInv (Iso-EM-ΩEM+1 0) + ∙ Iso.ret (Iso-EM-ΩEM+1 0) (_⌣ₖ_ {n = 0} {m = 0} x (gen-HⁿSⁿ-raw R zero .fst y)))) g-cute-ind zero (suc i) = funExt λ x → →∙Homogeneous≡ (isHomogeneousEM _) @@ -224,7 +224,7 @@ module ⌣Eq (R' : CommRing ℓ'') where (EM→ΩEM+1 (suc i) (_⌣ₖ_ {n = suc i} {m = zero} x (gen-HⁿSⁿ-raw R zero .fst y)) k))) ∙∙ cong (subst EMR (λ i₁ → suc (+-zero i (~ i₁)))) - (Iso.leftInv (Iso-EM-ΩEM+1 (suc i)) _))) + (Iso.ret (Iso-EM-ΩEM+1 (suc i)) _))) g-cute-ind (suc n) zero = funExt λ x → →∙Homogeneous≡ (isHomogeneousEM _) (funExt λ y → transportRefl _ @@ -243,7 +243,7 @@ module ⌣Eq (R' : CommRing ℓ'') where (EM→ΩEM+1 (suc n) (x ⌣[ R , 0 , (suc n) ]ₖ gen-HⁿSⁿ-raw R (suc n) .fst y))) ∙ transportRefl _) - ∙ Iso.leftInv (Iso-EM-ΩEM+1 (suc n)) _)) + ∙ Iso.ret (Iso-EM-ΩEM+1 (suc n)) _)) g-cute-ind (suc n) (suc i) = funExt λ x → →∙Homogeneous≡ (isHomogeneousEM _) (funExt λ y @@ -256,7 +256,7 @@ module ⌣Eq (R' : CommRing ℓ'') where j (EM→ΩEM+1 (suc (suc (i + n))) (x ⌣ₖ gen-HⁿSⁿ-raw R (suc n) .fst y) k))))) ∙ cong (subst EMR (λ i₁ → suc (+-suc i n (~ i₁)))) - (Iso.leftInv (Iso-EM-ΩEM+1 (suc i +' suc n)) + (Iso.ret (Iso-EM-ΩEM+1 (suc i +' suc n)) (x ⌣ₖ gen-HⁿSⁿ-raw R (suc n) .fst y)))) g-ind-main : (n i : ℕ) @@ -285,9 +285,9 @@ module ⌣Eq (R' : CommRing ℓ'') where ≡ myEq .fst help = funExt (λ p → sym - (Iso.leftInv (ΩFunIso n i (g-cute n (suc i) (0ₖ (suc i)))) _ + (Iso.ret (ΩFunIso n i (g-cute n (suc i) (0ₖ (suc i)))) _ ∙ cong (cong (g-cute n (suc i))) - (Iso.rightInv (Iso-EM-ΩEM+1 i) _))) + (Iso.sec (Iso-EM-ΩEM+1 i) _))) ∙ sym (cong (λ f → Iso.inv (ΩFunIso n i (g-cute n (suc i) (0ₖ (suc i)))) ∘ f ∘ ΩEM+1→EM i) @@ -422,8 +422,8 @@ module preThom → Iso (fst B → EMR i) ((b : fst B) → Q b →∙ EMR∙ (i +' n)) Iso.fun (pre-ϕIso i) = pre-ϕ i Iso.inv (pre-ϕIso i) r b = invEq (g-equiv i b) (r b) - Iso.rightInv (pre-ϕIso i) t j b = secEq (g-equiv i b) (t b) j - Iso.leftInv (pre-ϕIso i) t j b = retEq (g-equiv i b) (t b) j + Iso.sec (pre-ϕIso i) t j b = secEq (g-equiv i b) (t b) j + Iso.ret (pre-ϕIso i) t j b = retEq (g-equiv i b) (t b) j pre-ϕ-pres+ : (i : ℕ) → (f g : fst B → EMR i) → pre-ϕ i (λ b → f b +ₖ g b) ≡ λ b → pre-ϕ i f b +ₖ∙ pre-ϕ i g b @@ -531,10 +531,10 @@ module Thom (B : Pointed ℓ) Iso.fun (EP-contr c) (inr x) = x Iso.fun (EP-contr c) (push a i) = πE (isContr→isProp c (* , P*) a i) Iso.inv (EP-contr c) = inr - Iso.rightInv (EP-contr c) = λ _ → refl - Iso.leftInv (EP-contr c) (inl x) = sym (push (* , P*)) - Iso.leftInv (EP-contr c) (inr x) = refl - Iso.leftInv (EP-contr c) (push a i) j = + Iso.sec (EP-contr c) = λ _ → refl + Iso.ret (EP-contr c) (inl x) = sym (push (* , P*)) + Iso.ret (EP-contr c) (inr x) = refl + Iso.ret (EP-contr c) (push a i) j = hcomp (λ k → λ {(i = i0) → push (* , P*) (~ j) ; (i = i1) → push a (~ j ∨ k) ; (j = i0) → inr (πE (isContr→isProp c (* , P*) a i)) @@ -576,15 +576,15 @@ module Thom (B : Pointed ℓ) Iso-EP-FP : Iso EP FP Iso.fun Iso-EP-FP = EP→FP Iso.inv Iso-EP-FP = FP→EP - Iso.rightInv Iso-EP-FP (inl x) = refl - Iso.rightInv Iso-EP-FP (inr (x , north)) = push x - Iso.rightInv Iso-EP-FP (inr (x , south)) = refl - Iso.rightInv Iso-EP-FP (inr (x , merid a i)) j = + Iso.sec Iso-EP-FP (inl x) = refl + Iso.sec Iso-EP-FP (inr (x , north)) = push x + Iso.sec Iso-EP-FP (inr (x , south)) = refl + Iso.sec Iso-EP-FP (inr (x , merid a i)) j = compPath-filler' (push x) (λ j₁ → inr (x , merid a j₁)) (~ j) i - Iso.rightInv Iso-EP-FP (push a i) j = push a (i ∧ j) - Iso.leftInv Iso-EP-FP (inl x) = refl - Iso.leftInv Iso-EP-FP (inr x) = refl - Iso.leftInv Iso-EP-FP (push (b , p) i) j = + Iso.sec Iso-EP-FP (push a i) j = push a (i ∧ j) + Iso.ret Iso-EP-FP (inl x) = refl + Iso.ret Iso-EP-FP (inr x) = refl + Iso.ret Iso-EP-FP (push (b , p) i) j = (cong-∙ FP→EP (push b) (λ j → inr (b , merid p j)) ∙ sym (lUnit (push (b , p)))) j i @@ -605,8 +605,8 @@ module Thom (B : Pointed ℓ) fst (Iso.inv (mapIso isHom) r) (inr (b , p)) = r b .fst p fst (Iso.inv (mapIso isHom) r) (push a i) = r a .snd (~ i) snd (Iso.inv (mapIso isHom) r) = r (pt B) .snd - Iso.rightInv (mapIso isHom) r = funExt λ b → →∙Homogeneous≡ isHom refl - Iso.leftInv (mapIso isHom) r = + Iso.sec (mapIso isHom) r = funExt λ b → →∙Homogeneous≡ isHom refl + Iso.ret (mapIso isHom) r = →∙Homogeneous≡ isHom (funExt λ { (inl x) → sym (snd r) ∙ cong (fst r) (sym (push (pt B))) ; (inr x) → refl @@ -655,7 +655,7 @@ module Thom (B : Pointed ℓ) ι-pres+ k = morphLemmas.isMorphInv _+ₖ∙_ (λ f g b → f b +ₖ∙ g b) (Iso.inv (ι k)) (ι⁻-pres+ k) (Iso.fun (ι k)) - (Iso.leftInv (ι k)) (Iso.rightInv (ι k)) + (Iso.ret (ι k)) (Iso.sec (ι k)) -- We combine it with the generalised thom iso, in order to get the -- usual Thom isomorphism @@ -823,10 +823,10 @@ module Thom (B : Pointed ℓ) (rUnit _ ∙∙ sym (Square→compPath ((cong (funExt⁻ (cong fst r)) (push (* , P*))) ▷ λ i j → r j .snd i)) ∙∙ sym (rUnit _)))) - (Iso.leftInv (Iso-EM-ΩEM+1 i) (f (x , p)))) + (Iso.ret (Iso-EM-ΩEM+1 i) (f (x , p)))) ∙ cong₂ _+ₖ_ (cong₂ _+ₖ_ (cong (ΩEM+1→EM i) (sym (EM→ΩEM+1-sym i (f (* , P*)))) - ∙ Iso.leftInv (Iso-EM-ΩEM+1 i) (-ₖ (f (* , P*)))) refl + ∙ Iso.ret (Iso-EM-ΩEM+1 i) (-ₖ (f (* , P*)))) refl ∙ commₖ i (-ₖ f (* , P*)) (f (x , p))) refl ∙ sym (assocₖ i (f (x , p)) (-ₖ (f (* , P*))) (f (* , P*))) @@ -874,7 +874,7 @@ module Thom (B : Pointed ℓ) (sym (snd f) ∙ cong (fst f) (sym (push (* , P*)))) (sym (p (fst a))) main a f p = - flipSquare (Iso.rightInv (Iso-EM-ΩEM+1 i) (pth a f p) + flipSquare (Iso.sec (Iso-EM-ΩEM+1 i) (pth a f p) ◁ λ j i → doubleCompPath-filler (sym (snd f) ∙ cong (fst f) (sym (push (* , P*)))) (cong (fst f) (push a)) diff --git a/Cubical/Cohomology/EilenbergMacLane/MayerVietoris.agda b/Cubical/Cohomology/EilenbergMacLane/MayerVietoris.agda index d7d865f3d2..91c2d1eeb2 100644 --- a/Cubical/Cohomology/EilenbergMacLane/MayerVietoris.agda +++ b/Cubical/Cohomology/EilenbergMacLane/MayerVietoris.agda @@ -141,7 +141,7 @@ module MV {ℓ ℓ' ℓ'' ℓ'''} (G : AbGroup ℓ''') where help : Square (EM→ΩEM+1 n (F c)) (cong a (push c)) (sym (l (f c))) (sym (r (g c))) - help = Iso.rightInv (Iso-EM-ΩEM+1 n) _ + help = Iso.sec (Iso-EM-ΩEM+1 n) _ ◁ symP (doubleCompPath-filler (sym (l (f c))) (cong a (push c)) (r (g c))) @@ -211,7 +211,7 @@ module MV {ℓ ℓ' ℓ'' ℓ'''} (G : AbGroup ℓ''') , cong ∣_∣₂ (funExt λ c → distrHelper n (λ i₁ → p i₁ (inl (f c))) (λ 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.ret (Iso-EM-ΩEM+1 n) (h c))) (Iso.fun (PathIdTrunc₀Iso) p) where help : (h : _) (p : d-pre n h ≡ (λ _ → 0ₖ (suc n))) (c : C) diff --git a/Cubical/Cohomology/EilenbergMacLane/RingStructure.agda b/Cubical/Cohomology/EilenbergMacLane/RingStructure.agda index e006c8739f..f3fea1fb3a 100644 --- a/Cubical/Cohomology/EilenbergMacLane/RingStructure.agda +++ b/Cubical/Cohomology/EilenbergMacLane/RingStructure.agda @@ -108,8 +108,8 @@ module CohomologyRing-Equiv 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)))) + sec is = ST.elim (λ _ → isProp→isSet (squash₂ _ _)) (λ f → cong ∣_∣₂ (funExt (λ y → cong f (sec e y)))) + ret is = ST.elim (λ _ → isProp→isSet (squash₂ _ _)) (λ g → cong ∣_∣₂ (funExt (λ x → cong g (ret 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₂ _ _)) @@ -140,13 +140,13 @@ module CohomologyRing-Equiv e-sect : (y : H* R Y) → H*-X→H*-Y (H*-Y→H*-X y) ≡ y e-sect = DS-Ind-Prop.f _ _ _ _ (λ _ → isSetH*Y _ _) refl - (λ m a → cong (base m) (rightInv (fst coHomGr-Iso) a)) + (λ m a → cong (base m) (sec (fst coHomGr-Iso) a)) (λ {U V} ind-U ind-V → cong₂ _+H*Y_ ind-U ind-V) e-retr : (x : H* R X) → H*-Y→H*-X (H*-X→H*-Y x) ≡ x e-retr = DS-Ind-Prop.f _ _ _ _ (λ _ → isSetH*X _ _) refl - (λ n a → cong (base n) (leftInv (fst coHomGr-Iso) a)) + (λ n a → cong (base n) (ret (fst coHomGr-Iso) a)) (λ {U V} ind-U ind-V → cong₂ _+H*X_ ind-U ind-V) H*-X→H*-Y-pres1 : H*-X→H*-Y 1H*X ≡ 1H*Y @@ -181,7 +181,7 @@ module _ is : Iso (H* R X) (H* R Y) fun is = H*-X→H*-Y inv is = H*-Y→H*-X - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd CohomologyRing-Equiv = makeIsRingHom H*-X→H*-Y-pres1 H*-X→H*-Y-pres+ H*-X→H*-Y-pres· diff --git a/Cubical/Cohomology/EilenbergMacLane/Rings/KleinBottle.agda b/Cubical/Cohomology/EilenbergMacLane/Rings/KleinBottle.agda index 3c786f0f50..e2cb93f229 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Rings/KleinBottle.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Rings/KleinBottle.agda @@ -544,7 +544,7 @@ module _ where β²↦0 = cong H²K²→ℤ/2 cupIdΒ ∙ ℤ/2→H²K²→ℤ/2 0 where ℤ/2→Ω²K₂-refl : ℤ/2→Ω²K₂ 0 ≡ refl - ℤ/2→Ω²K₂-refl = Iso.leftInv Iso-Ω²K₂-ℤ/2 refl + ℤ/2→Ω²K₂-refl = Iso.ret Iso-Ω²K₂-ℤ/2 refl cupIdΒ : _⌣_ {G'' = ℤ/2Ring} {n = 1} {m = 1} K²gen.β K²gen.β ≡ ∣ KleinFun (0ₖ 2) refl refl (ℤ/2→Ω²K₂ 0) ∣₂ @@ -891,7 +891,7 @@ fst ℤ/2[X,Y]/≅H*KleinBottle = isoToEquiv is is : Iso _ _ fun is = ℤ/2[X,Y]/I→H*Klein .fst inv is = H*Klein→ℤ/2[X,Y]/I - rightInv is = DS-Ind-Prop.f _ _ _ _ + sec is = DS-Ind-Prop.f _ _ _ _ (λ _ → trunc _ _) refl (λ { zero a → lem₀ a _ refl @@ -1015,7 +1015,7 @@ fst ℤ/2[X,Y]/≅H*KleinBottle = isoToEquiv is ∙∙ cong (invEq (H²[K²,ℤ/2]≅ℤ/2* .fst)) (p ∙ sym α²↦1') ∙∙ retEq (H²[K²,ℤ/2]≅ℤ/2* .fst) α⌣α - leftInv is = + ret is = SQ.elimProp (λ _ → squash/ _ _) (DS-Ind-Prop.f _ _ _ _ diff --git a/Cubical/Cohomology/EilenbergMacLane/Rings/RP2.agda b/Cubical/Cohomology/EilenbergMacLane/Rings/RP2.agda index 1e410fc14a..c6a91c95fd 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Rings/RP2.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Rings/RP2.agda @@ -85,7 +85,7 @@ private γ↦1'' p q = H²[RP²,ℤ/2]→ℤ/2-Id p ∙ cong (Iso.fun Iso-Ω²K₂-ℤ/2) q - ∙ Iso.rightInv Iso-Ω²K₂-ℤ/2 1 + ∙ Iso.sec Iso-Ω²K₂-ℤ/2 1 cp : EM ℤ/2 1 → EM ℤ/2 1 → EM (ℤ/2 ⨂ ℤ/2) 2 cp = _⌣ₖ⊗_ {G' = ℤ/2} {H' = ℤ/2} {n = 1} {m = 1} diff --git a/Cubical/Cohomology/EilenbergMacLane/Rings/RP2wedgeS1.agda b/Cubical/Cohomology/EilenbergMacLane/Rings/RP2wedgeS1.agda index b4263d4dbb..d8aaab1504 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Rings/RP2wedgeS1.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Rings/RP2wedgeS1.agda @@ -138,7 +138,7 @@ private γ↦1' p q = H²[RP²,ℤ/2]→ℤ/2-Id p ∙ cong (Iso.fun Iso-Ω²K₂-ℤ/2) q - ∙ Iso.rightInv Iso-Ω²K₂-ℤ/2 1 + ∙ Iso.sec Iso-Ω²K₂-ℤ/2 1 private cp : EM ℤ/2 1 → EM ℤ/2 1 → EM (ℤ/2 ⨂ ℤ/2) 2 @@ -359,22 +359,22 @@ module Equiv-RP²∨S¹-Properties ϕ₀str = snd e₀ ϕ₀⁻¹ = inv (fst e₀) ϕ₀⁻¹str = snd (invGroupIso e₀) - ϕ₀-sect = rightInv (fst e₀) - ϕ₀-retr = leftInv (fst e₀) + ϕ₀-sect = sec (fst e₀) + ϕ₀-retr = ret (fst e₀) ϕ₁ = fun (fst e₁) ϕ₁str = snd e₁ ϕ₁⁻¹ = inv (fst e₁) ϕ₁⁻¹str = snd (invGroupIso e₁) - ϕ₁-sect = rightInv (fst e₁) - ϕ₁-retr = leftInv (fst e₁) + ϕ₁-sect = sec (fst e₁) + ϕ₁-retr = ret (fst e₁) ϕ₂ = fun (fst e₂) ϕ₂str = snd e₂ ϕ₂⁻¹ = inv (fst e₂) ϕ₂⁻¹str = snd (invGroupIso e₂) - ϕ₂-sect = rightInv (fst e₂) - ϕ₂-retr = leftInv (fst e₂) + ϕ₂-sect = sec (fst e₂) + ϕ₂-retr = ret (fst e₂) ϕ₁left : fst ℤ/2 → coHom 1 ℤ/2 RP²∨S¹ ϕ₁left a = ϕ₁ (a , 0ℤ/2) @@ -793,6 +793,6 @@ module _ where is : Iso _ _ fun is = ℤ/2[X,Y]/→H*R-RP²∨S¹ .fst inv is = H*-RP²∨S¹→ℤ/2[x,y]/ - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd RP²∨S¹-CohomologyRing = ℤ/2[X,Y]/→H*R-RP²∨S¹ .snd diff --git a/Cubical/Cohomology/EilenbergMacLane/Rings/Sn.agda b/Cubical/Cohomology/EilenbergMacLane/Rings/Sn.agda index bcac931ac9..3c9c3e003e 100644 --- a/Cubical/Cohomology/EilenbergMacLane/Rings/Sn.agda +++ b/Cubical/Cohomology/EilenbergMacLane/Rings/Sn.agda @@ -123,7 +123,7 @@ module _ {ℓ : Level} (G : CommRing ℓ) (n : ℕ) where λ p → cong (H¹S¹→G (Ring→AbGroup G)) (cong (_⌣_ {G'' = G} {n = 0} {1} ∣ (λ _ → g) ∣₂) (cong (∣_∣₂ ∘ S¹Fun embase) - (sym (Iso.rightInv (Iso-EM-ΩEM+1 0) p)))) + (sym (Iso.sec (Iso-EM-ΩEM+1 0) p)))) ∙∙ help (ΩEM+1→EM 0 p) ∙∙ cong (RingStr._·_ (snd G) g) (λ _ → ΩEM+1→EM 0 p)) where @@ -132,7 +132,7 @@ module _ {ℓ : Level} (G : CommRing ℓ) (n : ℕ) where (_⌣_ {G'' = G} {n = 0} {1} ∣ (λ _ → g) ∣₂ ∣ S¹Fun embase (emloop h) ∣₂) ≡ RingStr._·_ (snd G) g h - help h = Iso.leftInv (Iso-EM-ΩEM+1 0) (RingStr._·_ (snd G) g h) + help h = Iso.ret (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)) _ _) (Sⁿ-connElim n (isConnectedSubtr 2 (suc n) diff --git a/Cubical/Data/Bool/Properties.agda b/Cubical/Data/Bool/Properties.agda index f31da973f3..1454fbb75e 100644 --- a/Cubical/Data/Bool/Properties.agda +++ b/Cubical/Data/Bool/Properties.agda @@ -41,8 +41,8 @@ notnot false = refl notIso : Iso Bool Bool Iso.fun notIso = not Iso.inv notIso = not -Iso.rightInv notIso = notnot -Iso.leftInv notIso = notnot +Iso.sec notIso = notnot +Iso.ret notIso = notnot notIsEquiv : isEquiv not notIsEquiv = involIsEquiv {f = not} notnot @@ -234,8 +234,8 @@ module BoolReflection where reflectIso : Iso Bool (Bool ≡ Bool) reflectIso .fun = ⊕-Path reflectIso .inv P = transport P false - reflectIso .leftInv = ⊕-identityʳ - reflectIso .rightInv P = sym (⊕-complete P) + reflectIso .ret = ⊕-identityʳ + reflectIso .sec P = sym (⊕-complete P) reflectEquiv : Bool ≃ (Bool ≡ Bool) reflectEquiv = isoToEquiv reflectIso @@ -272,8 +272,8 @@ Iso.fun IsoBool→∙ f = fst f false fst (Iso.inv IsoBool→∙ a) false = a fst (Iso.inv (IsoBool→∙ {A = A}) a) true = pt A snd (Iso.inv IsoBool→∙ a) = refl -Iso.rightInv IsoBool→∙ a = refl -Iso.leftInv IsoBool→∙ (f , p) = +Iso.sec IsoBool→∙ a = refl +Iso.ret IsoBool→∙ (f , p) = ΣPathP ((funExt (λ { false → refl ; true → sym p})) , λ i j → p (~ i ∨ j)) @@ -399,10 +399,10 @@ Iso-⊤⊎⊤-Bool .fun (inl tt) = true Iso-⊤⊎⊤-Bool .fun (inr tt) = false Iso-⊤⊎⊤-Bool .inv true = inl tt Iso-⊤⊎⊤-Bool .inv false = inr tt -Iso-⊤⊎⊤-Bool .leftInv (inl tt) = refl -Iso-⊤⊎⊤-Bool .leftInv (inr tt) = refl -Iso-⊤⊎⊤-Bool .rightInv true = refl -Iso-⊤⊎⊤-Bool .rightInv false = refl +Iso-⊤⊎⊤-Bool .ret (inl tt) = refl +Iso-⊤⊎⊤-Bool .ret (inr tt) = refl +Iso-⊤⊎⊤-Bool .sec true = refl +Iso-⊤⊎⊤-Bool .sec false = refl separatedBool : Separated Bool separatedBool = Discrete→Separated _≟_ @@ -415,9 +415,9 @@ Bool→Bool→∙Bool true = const∙ _ _ Iso-Bool→∙Bool-Bool : Iso ((Bool , true) →∙ (Bool , true)) Bool Iso.fun Iso-Bool→∙Bool-Bool f = fst f false Iso.inv Iso-Bool→∙Bool-Bool = Bool→Bool→∙Bool -Iso.rightInv Iso-Bool→∙Bool-Bool false = refl -Iso.rightInv Iso-Bool→∙Bool-Bool true = refl -Iso.leftInv Iso-Bool→∙Bool-Bool f = Σ≡Prop (λ _ → isSetBool _ _) (help _ refl) +Iso.sec Iso-Bool→∙Bool-Bool false = refl +Iso.sec Iso-Bool→∙Bool-Bool true = refl +Iso.ret Iso-Bool→∙Bool-Bool f = Σ≡Prop (λ _ → isSetBool _ _) (help _ refl) where help : (x : Bool) → fst f false ≡ x → Bool→Bool→∙Bool (fst f false) .fst ≡ f .fst @@ -436,8 +436,8 @@ Iso.leftInv Iso-Bool→∙Bool-Bool f = Σ≡Prop (λ _ → isSetBool _ _) (help Iso.fun (ΣBoolΣIso {true}) x = tt , x Iso.inv (ΣBoolΣIso {true}) x = snd x -Iso.leftInv (ΣBoolΣIso {true}) _ = refl -Iso.rightInv (ΣBoolΣIso {true}) _ = refl +Iso.ret (ΣBoolΣIso {true}) _ = refl +Iso.sec (ΣBoolΣIso {true}) _ = refl ΣBool≃Σ : {b : Bool} {c : (Bool→Type b) → Bool} → (Bool→Type (ΣBool b c)) ≃ (Σ[ z ∈ Bool→Type b ] Bool→Type (c z)) diff --git a/Cubical/Data/Cardinal/Properties.agda b/Cubical/Data/Cardinal/Properties.agda index 0284c8350c..46c8c38f47 100644 --- a/Cubical/Data/Cardinal/Properties.agda +++ b/Cubical/Data/Cardinal/Properties.agda @@ -100,8 +100,8 @@ module _ where 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 () + Iso.sec (iso⊥ A) _ = refl + Iso.ret (iso⊥ A) _ i () ^IdR𝟙 : (A : Card {ℓ}) → A ^ 𝟙 {ℓ} ≡ A ^IdR𝟙 = ∥₂.elim (λ _ → isProp→isSet (isSetCard _ _)) @@ -110,8 +110,8 @@ module _ where 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 + Iso.sec (iso⊤ _) _ = refl + Iso.ret (iso⊤ _) _ = refl ^AnnihilL𝟙 : (A : Card {ℓ}) → 𝟙 {ℓ} ^ A ≡ 𝟙 {ℓ} ^AnnihilL𝟙 = ∥₂.elim (λ _ → isProp→isSet (isSetCard _ _)) @@ -120,8 +120,8 @@ module _ where where iso⊤ : ∀ A → Iso (A → Unit*) Unit* Iso.fun (iso⊤ _) _ = tt* Iso.inv (iso⊤ _) _ _ = tt* - Iso.rightInv (iso⊤ _) _ = refl - Iso.leftInv (iso⊤ _) _ = refl + Iso.sec (iso⊤ _) _ = refl + Iso.ret (iso⊤ _) _ = refl ^LDist+ : (A : Card {ℓa}) (B : Card {ℓb}) (C : Card {ℓc}) → A ^ (B + C) ≡ (A ^ B) · (A ^ C) diff --git a/Cubical/Data/Containers/Algebras.agda b/Cubical/Data/Containers/Algebras.agda index 86e0560237..62d81b920c 100644 --- a/Cubical/Data/Containers/Algebras.agda +++ b/Cubical/Data/Containers/Algebras.agda @@ -36,8 +36,8 @@ module Algs (S : Type ℓ) isom : Iso (Σ[ s ∈ S ] (Q s → W S Q)) (W S Q) fun isom = uncurry sup-W inv isom (sup-W s f) = s , f - rightInv isom (sup-W s f) = refl - leftInv isom (s , f) = refl + sec isom (sup-W s f) = refl + ret isom (s , f) = refl data Pos {Ind : Type ℓ'''} (P : Ind → S → Type ℓ'') (FP : ContFuncIso {ℓ}) (i : Ind) : carrier FP → Type (ℓ-max (ℓ-suc ℓ) (ℓ-max ℓ'' ℓ')) where diff --git a/Cubical/Data/Containers/Base.agda b/Cubical/Data/Containers/Base.agda index 6ad2570e79..31af9485c1 100644 --- a/Cubical/Data/Containers/Base.agda +++ b/Cubical/Data/Containers/Base.agda @@ -127,7 +127,7 @@ module Example where open import Cubical.Data.Nat ListC : GenContainer (SET ℓ-zero) - ListC = ℕ ◁ (λ n → Fin n , isSetFin) & isSetℕ + ListC = ℕ ◁ (λ n → Fin n , isSetFin {n}) & isSetℕ ListF : Functor (SET ℓ-zero) (SET ℓ-zero) ListF = ⟦ ListC ⟧-obj diff --git a/Cubical/Data/Containers/ContainerExtensionProofs.agda b/Cubical/Data/Containers/ContainerExtensionProofs.agda index cb6a9fbf63..f60befc2e0 100644 --- a/Cubical/Data/Containers/ContainerExtensionProofs.agda +++ b/Cubical/Data/Containers/ContainerExtensionProofs.agda @@ -61,11 +61,11 @@ module _ {C : Category ℓ ℓ'} where (funExt₂ λ X (s , h) → sym (funExt⁻ (nat h) (s , C .id)) ∙ cong (λ Z → mors X (s , Z)) (C .⋆IdL h)) - ret : ∀ X→Y → fib (⟦ X→Y ⟧-mor) ≡ X→Y - ret (u ◁ f) i = u ◁ λ s → C .⋆IdR (f s) i + ret' : ∀ X→Y → fib (⟦ X→Y ⟧-mor) ≡ X→Y + ret' (u ◁ f) i = u ◁ λ s → C .⋆IdR (f s) i unique : (y : fiber (⟦_⟧-mor) (natTrans mors nat)) → (fib (natTrans mors nat) , fib-pf) ≡ y - unique (m , m-eq) = Σ≡Prop (λ _ → isSetNatTrans _ _) (cong fib (sym m-eq) ∙ ret m) + unique (m , m-eq) = Σ≡Prop (λ _ → isSetNatTrans _ _) (cong fib (sym m-eq) ∙ ret' m) -- Proof 2 that the functor ⟦_⟧ is full and faithful -- Uses the Yoneda lemma diff --git a/Cubical/Data/Empty/Properties.agda b/Cubical/Data/Empty/Properties.agda index 2ff52f19fe..f05aa263c7 100644 --- a/Cubical/Data/Empty/Properties.agda +++ b/Cubical/Data/Empty/Properties.agda @@ -32,5 +32,5 @@ uninhabEquiv ¬a ¬b = isoToEquiv isom isom : Iso _ _ isom .fun a = rec (¬a a) isom .inv b = rec (¬b b) - isom .rightInv b = rec (¬b b) - isom .leftInv a = rec (¬a a) + isom .sec b = rec (¬b b) + isom .ret a = rec (¬a a) diff --git a/Cubical/Data/Equality/Conversion.agda b/Cubical/Data/Equality/Conversion.agda index bd47adc779..52c48e6682 100644 --- a/Cubical/Data/Equality/Conversion.agda +++ b/Cubical/Data/Equality/Conversion.agda @@ -215,8 +215,8 @@ record Iso {ℓ ℓ'} (A : Type ℓ) (B : Type ℓ') : Type (ℓ-max ℓ ℓ') w field fun : A → B inv : B → A - rightInv : (b : B) → fun (inv b) ≡ b - leftInv : (a : A) → inv (fun a) ≡ a + sec : (b : B) → fun (inv b) ≡ b + ret : (a : A) → inv (fun a) ≡ a isoToIsoPath : Iso A B → IsoPath A B isoToIsoPath (iso f g η ε) = isoPath f g (λ b → eqToPath (η b)) (λ a → eqToPath (ε a)) diff --git a/Cubical/Data/Fast/Int/Base.agda b/Cubical/Data/Fast/Int/Base.agda index 794cce2cac..900210de09 100644 --- a/Cubical/Data/Fast/Int/Base.agda +++ b/Cubical/Data/Fast/Int/Base.agda @@ -3,7 +3,7 @@ module Cubical.Data.Fast.Int.Base where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat as ℕ hiding (_+_ ; _·_) open import Cubical.Data.Int.Base hiding (_ℕ-_ ; _+_ ; _-_ ; _·_ ; sumFinℤ ; sumFinℤId) public -open import Cubical.Data.Fin.Inductive.Base +open import Cubical.Data.Fin.Base infixl 7 _·_ infixl 6 _+_ _-_ diff --git a/Cubical/Data/Fast/Int/Properties.agda b/Cubical/Data/Fast/Int/Properties.agda index 4850c86f79..df7a6abb3b 100644 --- a/Cubical/Data/Fast/Int/Properties.agda +++ b/Cubical/Data/Fast/Int/Properties.agda @@ -20,8 +20,8 @@ open import Cubical.Data.Nat as ℕ hiding ( renaming (_·_ to _·ℕ_; _+_ to _+ℕ_) open import Cubical.Data.Nat.Order as ℕ using () open import Cubical.Data.Sum -open import Cubical.Data.Fin.Inductive.Base -open import Cubical.Data.Fin.Inductive.Properties +open import Cubical.Data.Fin.Base +open import Cubical.Data.Fin.Properties open import Cubical.Data.Int.Base as ℤ hiding (_+_ ; _·_ ; _-_ ; _ℕ-_ ; sumFinℤ ; sumFinℤId) diff --git a/Cubical/Data/Fin/Arithmetic.agda b/Cubical/Data/Fin/Arithmetic.agda index fb34dd873e..eec507ce49 100644 --- a/Cubical/Data/Fin/Arithmetic.agda +++ b/Cubical/Data/Fin/Arithmetic.agda @@ -5,6 +5,7 @@ open import Cubical.Foundations.Prelude open import Cubical.Data.Nat open import Cubical.Data.Nat.Mod open import Cubical.Data.Nat.Order +open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Fin open import Cubical.Data.Sigma @@ -14,12 +15,15 @@ infix 7 -ₘ_ -- Addition, subtraction and multiplication _+ₘ_ : {n : ℕ} → Fin (suc n) → Fin (suc n) → Fin (suc n) fst (_+ₘ_ {n = n} x y) = ((fst x) + (fst y)) mod (suc n) -snd (_+ₘ_ {n = n} x y) = mod< _ ((fst x) + (fst y)) +snd (_+ₘ_ {n = n} x y) = <→<ᵗ + {n = ((fst x) + (fst y)) mod (suc n)} + {m = suc n} + (mod< n ((fst x) + (fst y))) -ₘ_ : {n : ℕ} → (x : Fin (suc n)) → Fin (suc n) fst (-ₘ_ {n = n} x) = (+induction n _ (λ x _ → ((suc n) ∸ x) mod (suc n)) λ _ x → x) (fst x) -snd (-ₘ_ {n = n} x) = lem (fst x) +snd (-ₘ_ {n = n} x) = <→<ᵗ (lem (fst x)) where ≡<-trans : {x y z : ℕ} → x < y → x ≡ z → z < y ≡<-trans (k , p) q = k , cong (λ x → k + suc x) (sym q) ∙ p @@ -38,13 +42,13 @@ _-ₘ_ x y = x +ₘ (-ₘ y) _·ₘ_ : {n : ℕ} → (x y : Fin (suc n)) → Fin (suc n) fst (_·ₘ_ {n = n} x y) = (fst x · fst y) mod (suc n) -snd (_·ₘ_ {n = n} x y) = mod< n (fst x · fst y) +snd (_·ₘ_ {n = n} x y) = <→<ᵗ (mod< n (fst x · fst y)) -- Group laws +ₘ-assoc : {n : ℕ} (x y z : Fin (suc n)) → (x +ₘ y) +ₘ z ≡ (x +ₘ (y +ₘ z)) +ₘ-assoc {n = n} x y z = - Σ≡Prop (λ _ → isProp≤) + Σ≡Prop (λ w → isProp<ᵗ {n = w} {suc n}) ((mod-rCancel (suc n) ((fst x + fst y) mod (suc n)) (fst z)) ∙∙ sym (mod+mod≡mod (suc n) (fst x + fst y) (fst z)) ∙∙ cong (_mod suc n) (sym (+-assoc (fst x) (fst y) (fst z))) @@ -53,31 +57,33 @@ snd (_·ₘ_ {n = n} x y) = mod< n (fst x · fst y) +ₘ-comm : {n : ℕ} (x y : Fin (suc n)) → (x +ₘ y) ≡ (y +ₘ x) +ₘ-comm {n = n} x y = - Σ≡Prop (λ _ → isProp≤) + Σ≡Prop (λ z → isProp<ᵗ {n = z} {suc n}) (cong (_mod suc n) (+-comm (fst x) (fst y))) +ₘ-lUnit : {n : ℕ} (x : Fin (suc n)) → 0 +ₘ x ≡ x +ₘ-lUnit {n = n} (x , p) = - Σ≡Prop (λ _ → isProp≤) - (+inductionBase n _ _ _ x p) + Σ≡Prop (λ z → isProp<ᵗ {n = z} {suc n}) + (+inductionBase n _ _ _ x (<ᵗ→< p)) +ₘ-rUnit : {n : ℕ} (x : Fin (suc n)) → x +ₘ 0 ≡ x +ₘ-rUnit x = +ₘ-comm x 0 ∙ (+ₘ-lUnit x) +ₘ-rCancel : {n : ℕ} (x : Fin (suc n)) → x -ₘ x ≡ 0 +ₘ-rCancel {n = n} x = - Σ≡Prop (λ _ → isProp≤) + Σ≡Prop (λ z → isProp<ᵗ {n = z} {suc n}) (cong (λ z → (fst x + z) mod (suc n)) - (+inductionBase n _ _ _ (fst x) (snd x)) + (+inductionBase n _ _ _ (fst x) (<ᵗ→< (snd x))) ∙∙ sym (mod-rCancel (suc n) (fst x) ((suc n) ∸ (fst x))) ∙∙ cong (_mod (suc n)) (+-comm (fst x) ((suc n) ∸ (fst x))) - ∙∙ cong (_mod (suc n)) (≤-∸-+-cancel (<-weaken (snd x))) + ∙∙ cong (_mod (suc n)) + (≤-∸-+-cancel {m = fst x} {n = suc n} + (<-weaken (<ᵗ→< (snd x)))) ∙∙ zero-charac (suc n)) +ₘ-lCancel : {n : ℕ} (x : Fin (suc n)) → (-ₘ x) +ₘ x ≡ 0 +ₘ-lCancel {n = n} x = +ₘ-comm (-ₘ x) x ∙ +ₘ-rCancel x --- TODO : Ring laws +-- -- TODO : Ring laws private test₁ : Path (Fin 11) (5 +ₘ 10) 4 diff --git a/Cubical/Data/Fin/Base.agda b/Cubical/Data/Fin/Base.agda index c13c0b26da..2f8cdd3a87 100644 --- a/Cubical/Data/Fin/Base.agda +++ b/Cubical/Data/Fin/Base.agda @@ -1,4 +1,3 @@ - module Cubical.Data.Fin.Base where open import Cubical.Foundations.Prelude @@ -7,8 +6,9 @@ open import Cubical.Foundations.HLevels open import Cubical.Foundations.Pointed import Cubical.Data.Empty as ⊥ -open import Cubical.Data.Nat using (ℕ ; zero ; suc ; _+_ ; znots) +open import Cubical.Data.Nat using (ℕ ; zero ; suc ; _+_ ; znots ; tt) open import Cubical.Data.Nat.Order +open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Nat.Order.Recursive using () renaming (_≤_ to _≤′_) open import Cubical.Data.Sigma open import Cubical.Data.Sum using (_⊎_; _⊎?_; inl; inr) @@ -23,7 +23,7 @@ open import Cubical.Relation.Nullary -- attractive properties, of course, such as easy conversion back to -- ℕ. Fin : ℕ → Type₀ -Fin n = Σ[ k ∈ ℕ ] k < n +Fin n = Σ[ m ∈ ℕ ] (m <ᵗ n) private variable @@ -31,10 +31,10 @@ private k : ℕ fzero : Fin (suc k) -fzero = (0 , suc-≤-suc zero-≤) +fzero = (zero , tt) fone : Fin (suc (suc k)) -fone = (1 , suc-≤-suc (suc-≤-suc zero-≤)) +fone = (suc zero , tt) fzero≠fone : ¬ fzero {k = suc k} ≡ fone fzero≠fone p = znots (cong fst p) @@ -42,61 +42,68 @@ fzero≠fone p = znots (cong fst p) -- It is easy, using this representation, to take the successor of a -- number as a number in the next largest finite type. fsuc : Fin k → Fin (suc k) -fsuc (k , l) = (suc k , suc-≤-suc l) +fsuc (k , l) = (suc k , l) -finj : Fin k → Fin (suc k) -finj (k , l) = k , ≤-trans l (1 , refl) +finj : {k : ℕ} → Fin k → Fin (suc k) +finj (m , l) = (m , <ᵗ-trans-suc {n = m} l) -- predecessors too predFin : (m : ℕ) → Fin (suc (suc m)) → Fin (suc m) predFin m (zero , w) = fzero -predFin m (suc n , w) = n , predℕ-≤-predℕ w +predFin m (suc n , w) = (n , w) -- Conversion back to ℕ is trivial... -toℕ : Fin k → ℕ +toℕ : {k : ℕ} → Fin k → ℕ toℕ = fst -- ... and injective. -toℕ-injective : ∀{fj fk : Fin k} → toℕ fj ≡ toℕ fk → fj ≡ fk -toℕ-injective {fj = fj} {fk} = Σ≡Prop (λ _ → isProp≤) +toℕ-injective : {k : ℕ} {fj fk : Fin k} → toℕ {k} fj ≡ toℕ {k} fk → fj ≡ fk +toℕ-injective {k} {fj = fj} {fk} = Σ≡Prop (λ x → isProp<ᵗ {x} {k}) -- Conversion from ℕ with a recursive definition of ≤ - fromℕ≤ : (m n : ℕ) → m ≤′ n → Fin (suc n) -fromℕ≤ zero _ _ = fzero +fromℕ≤ zero _ _ = fzero fromℕ≤ (suc m) (suc n) m≤n = fsuc (fromℕ≤ m n m≤n) +-- Conversion from ℕ with an inductive definition of ≤ +fromℕ≤ᵗ : (m n : ℕ) → m ≤ᵗ n → Fin (suc n) +fromℕ≤ᵗ m n t = m , t + -- A case analysis helper for induction. fsplit : ∀(fj : Fin (suc k)) → (fzero ≡ fj) ⊎ (Σ[ fk ∈ Fin k ] fsuc fk ≡ fj) -fsplit (0 , kᵗ_ : (n m : ℕ) → Type +n >ᵗ m = m <ᵗ n + +_≥ᵗ_ : (n m : ℕ) → Type +n ≥ᵗ m = m ≤ᵗ n + +-- <ᵗ satisfies the following judgmental equalities, +-- which give <ᵗ an "inductive" presentation, justifying the module name: +private + _ : ∀ {n} → n <ᵗ zero ≡ ⊥ + _ = refl + + _ : ∀ {m} → zero <ᵗ suc m ≡ Unit + _ = refl + + _ : ∀ {n m} → suc n <ᵗ suc m ≡ n <ᵗ m + _ = refl + + -- direct inductive definition (avoided for performance reasons): + -- _<ᵗ_ : (n m : ℕ) → Type + -- n <ᵗ zero = ⊥ + -- zero <ᵗ suc m = Unit + -- suc n <ᵗ suc m = n <ᵗ m data Trichotomyᵗ (m n : ℕ) : Type₀ where lt : m <ᵗ n → Trichotomyᵗ m n @@ -79,6 +108,19 @@ isProp<ᵗ {n = suc n} {suc m} = isProp<ᵗ {n = n} {m = m} snotz (sym (+-suc (fst x) (suc n)) ∙ snd x) <→<ᵗ {n = suc n} {m = suc m} p = <→<ᵗ {n = n} {m = m} (pred-≤-pred p) +<ᵗ-asym : ∀ {m n} → m <ᵗ n → n ≤ m → ⊥ +<ᵗ-asym p = <-asym (<ᵗ→< p) + +private + acc-suc : ∀ {n} → Acc _<ᵗ_ n → Acc _<ᵗ_ (suc n) + acc-suc {n} (acc ih) = acc λ where + zero _ → acc (λ m p → ⊥.rec p) + (suc m) p → acc-suc (ih m p) + +<ᵗ-wellfounded : WellFounded _<ᵗ_ +<ᵗ-wellfounded zero = acc λ _ → ⊥.rec +<ᵗ-wellfounded (suc n) = acc-suc ((<ᵗ-wellfounded n)) + module _ {n m : ℕ} where isPropTrichotomyᵗ : isProp (Trichotomyᵗ n m) isPropTrichotomyᵗ (lt x) (lt y) i = lt (isProp<ᵗ {n = n} {m} x y i) diff --git a/Cubical/Data/Nat/Properties.agda b/Cubical/Data/Nat/Properties.agda index eef43f6cdd..eca1bb0cc7 100644 --- a/Cubical/Data/Nat/Properties.agda +++ b/Cubical/Data/Nat/Properties.agda @@ -107,14 +107,14 @@ decodeℕ (suc n) (suc m) = λ r → cong suc (decodeℕ n m r) is : Iso (n ≡ m) (codeℕ n m) Iso.fun is = encodeℕ n m Iso.inv is = decodeℕ n m - Iso.rightInv is = sect n m + Iso.sec is = sect n m where sect : (n m : ℕ) → (r : codeℕ n m) → (encodeℕ n m (decodeℕ n m r) ≡ r) sect zero zero tt = refl sect zero (suc m) r = ⊥.rec r sect (suc n) zero r = ⊥.rec r sect (suc n) (suc m) r = sect n m r - Iso.leftInv is = retr n m + Iso.ret is = retr n m where reflRetr : (n : ℕ) → decodeℕ n n (encodeℕ n n refl) ≡ refl reflRetr zero = refl @@ -130,12 +130,12 @@ decodeℕ (suc n) (suc m) = λ r → cong suc (decodeℕ n m r) is : Iso (n ≡ m) (codeℕ n m) Iso.fun is = compute-eqℕ n m Iso.inv is = decodeℕ n m - Iso.rightInv is = sect n m + Iso.sec is = sect n m where sect : (n m : ℕ) → (r : codeℕ n m) → compute-eqℕ n m (decodeℕ n m r) ≡ r sect zero zero tt = refl sect (suc n) (suc m) r = sect n m r - Iso.leftInv is = retr n m + Iso.ret is = retr n m where reflRetr : (n : ℕ) → decodeℕ n n (compute-eqℕ n n refl) ≡ refl reflRetr zero = refl diff --git a/Cubical/Data/Ordinal/Properties.agda b/Cubical/Data/Ordinal/Properties.agda index 5aa137eac1..9757ac0e58 100644 --- a/Cubical/Data/Ordinal/Properties.agda +++ b/Cubical/Data/Ordinal/Properties.agda @@ -247,10 +247,10 @@ suc≺ α = (inr tt*) , (eq , makeIsWosetEquiv eq eqsucα eqαsuc) 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) + Iso.sec is (inl x) = refl + Iso.sec is (inr x) = cong inr (secEq γ↓g≃β x) + Iso.ret is (inl x , _) = ΣPathP (refl , (isPropUnit* _ _)) + Iso.ret is (inr x , x≺g) = ΣPathP (cong inr (PathPΣ (retEq γ↓g≃β (x , x≺g)) .fst) , PathPΣ (retEq γ↓g≃β (x , x≺g)) .snd) diff --git a/Cubical/Data/Prod/Properties.agda b/Cubical/Data/Prod/Properties.agda index baf21fcec4..7267b25f86 100644 --- a/Cubical/Data/Prod/Properties.agda +++ b/Cubical/Data/Prod/Properties.agda @@ -91,22 +91,22 @@ prodIso : ∀ {ℓ ℓ' ℓ'' ℓ'''} {A : Type ℓ} {B : Type ℓ'} {C : Type → Iso (A × B) (C × D) Iso.fun (prodIso iAC iBD) (a , b) = (Iso.fun iAC a) , Iso.fun iBD b Iso.inv (prodIso iAC iBD) (c , d) = (Iso.inv iAC c) , Iso.inv iBD d -Iso.rightInv (prodIso iAC iBD) (c , d) = ×≡ (Iso.rightInv iAC c) (Iso.rightInv iBD d) -Iso.leftInv (prodIso iAC iBD) (a , b) = ×≡ (Iso.leftInv iAC a) (Iso.leftInv iBD b) +Iso.sec (prodIso iAC iBD) (c , d) = ×≡ (Iso.sec iAC c) (Iso.sec iBD d) +Iso.ret (prodIso iAC iBD) (a , b) = ×≡ (Iso.ret iAC a) (Iso.ret iBD b) toProdIso : ∀ {ℓ ℓ' ℓ''} {A : Type ℓ} {B : Type ℓ'} {C : Type ℓ''} → Iso (A → B × C) ((A → B) × (A → C)) Iso.fun toProdIso = λ f → (λ a → proj₁ (f a)) , (λ a → proj₂ (f a)) Iso.inv toProdIso (f , g) = λ a → (f a) , (g a) -Iso.rightInv toProdIso (f , g) = refl -Iso.leftInv toProdIso b = funExt λ a → sym (×-η _) +Iso.sec toProdIso (f , g) = refl +Iso.ret toProdIso b = funExt λ a → sym (×-η _) curryIso : ∀ {ℓ ℓ' ℓ''} {A : Type ℓ} {B : Type ℓ'} {C : Type ℓ''} → Iso (A × B → C) (A → B → C) Iso.fun curryIso f a b = f (a , b) Iso.inv curryIso f (a , b) = f a b -Iso.rightInv curryIso a = refl -Iso.leftInv curryIso f = funExt λ {(a , b) → refl} +Iso.sec curryIso a = refl +Iso.ret curryIso f = funExt λ {(a , b) → refl} fiber-map-× : ∀ {ℓ ℓ' ℓ''} {A : Type ℓ} {B : Type ℓ'} {C : Type ℓ''} (f : B → C) (a : A) (c : C) @@ -116,8 +116,8 @@ fiber-map-× f a c .Iso.fun z .fst .snd = z .fst fiber-map-× f a c .Iso.fun z .snd = ≡-× refl (z .snd) fiber-map-× f a c .Iso.inv z .fst = z .fst .snd fiber-map-× f a c .Iso.inv z .snd = cong snd (z .snd) -fiber-map-× f a c .Iso.rightInv ((az , bz) , e) j .fst .fst = cong fst e (~ j) -fiber-map-× f a c .Iso.rightInv ((az , bz) , e) j .fst .snd = bz -fiber-map-× f a c .Iso.rightInv ((az , bz) , e) j .snd k .fst = cong fst e (k ∨ ~ j) -fiber-map-× f a c .Iso.rightInv ((az , bz) , e) j .snd k .snd = cong snd e k -fiber-map-× f a c .Iso.leftInv z = refl +fiber-map-× f a c .Iso.sec ((az , bz) , e) j .fst .fst = cong fst e (~ j) +fiber-map-× f a c .Iso.sec ((az , bz) , e) j .fst .snd = bz +fiber-map-× f a c .Iso.sec ((az , bz) , e) j .snd k .fst = cong fst e (k ∨ ~ j) +fiber-map-× f a c .Iso.sec ((az , bz) , e) j .snd k .snd = cong snd e k +fiber-map-× f a c .Iso.ret z = refl diff --git a/Cubical/Data/Rationals/MoreRationals/SigmaQ/Properties.agda b/Cubical/Data/Rationals/MoreRationals/SigmaQ/Properties.agda index 25ba045af9..632e3ee846 100644 --- a/Cubical/Data/Rationals/MoreRationals/SigmaQ/Properties.agda +++ b/Cubical/Data/Rationals/MoreRationals/SigmaQ/Properties.agda @@ -67,8 +67,8 @@ reduce-[] ((posneg i , b) , cp) j = Quoℚ-iso-Sigmaℚ : Iso Quo.ℚ Sigma.ℚ Iso.fun Quoℚ-iso-Sigmaℚ = reduce Iso.inv Quoℚ-iso-Sigmaℚ = Quo.[_] ∘ fst -Iso.rightInv Quoℚ-iso-Sigmaℚ = reduce-[] -Iso.leftInv Quoℚ-iso-Sigmaℚ = []-reduce +Iso.sec Quoℚ-iso-Sigmaℚ = reduce-[] +Iso.ret Quoℚ-iso-Sigmaℚ = []-reduce Quoℚ≃Sigmaℚ : Quo.ℚ ≃ Sigma.ℚ Quoℚ≃Sigmaℚ = isoToEquiv Quoℚ-iso-Sigmaℚ diff --git a/Cubical/Data/Sigma/Properties.agda b/Cubical/Data/Sigma/Properties.agda index b07c203650..eb997ac6a8 100644 --- a/Cubical/Data/Sigma/Properties.agda +++ b/Cubical/Data/Sigma/Properties.agda @@ -77,8 +77,8 @@ module _ {A : I → Type ℓ} {B : (i : I) → A i → Type ℓ'} (PathP (λ i → Σ (A i) (B i)) x y) fun ΣPathIsoPathΣ = ΣPathP inv ΣPathIsoPathΣ = PathPΣ - rightInv ΣPathIsoPathΣ _ = refl - leftInv ΣPathIsoPathΣ _ = refl + sec ΣPathIsoPathΣ _ = refl + ret ΣPathIsoPathΣ _ = refl unquoteDecl ΣPath≃PathΣ = declStrictIsoToEquiv ΣPath≃PathΣ ΣPathIsoPathΣ @@ -110,8 +110,8 @@ module _ {A : I → Type ℓ} {B : (i : I) → (a : A i) → Type ℓ'} ΣPathPIsoPathPΣ .fun (p , q) i = p i , q i ΣPathPIsoPathPΣ .inv pq .fst i = pq i .fst ΣPathPIsoPathPΣ .inv pq .snd i = pq i .snd - ΣPathPIsoPathPΣ .rightInv _ = refl - ΣPathPIsoPathPΣ .leftInv _ = refl + ΣPathPIsoPathPΣ .sec _ = refl + ΣPathPIsoPathPΣ .ret _ = refl unquoteDecl ΣPathP≃PathPΣ = declStrictIsoToEquiv ΣPathP≃PathPΣ ΣPathPIsoPathPΣ @@ -134,33 +134,33 @@ discreteΣ {B = B} Adis Bdis (a0 , b0) (a1 , b1) = discreteΣ' (Adis a0 a1) lUnit×Iso : Iso (Unit × A) A fun lUnit×Iso = snd inv lUnit×Iso = tt ,_ -rightInv lUnit×Iso _ = refl -leftInv lUnit×Iso _ = refl +sec lUnit×Iso _ = refl +ret lUnit×Iso _ = refl lUnit*×Iso : ∀{ℓ} → Iso (Unit* {ℓ} × A) A fun lUnit*×Iso = snd inv lUnit*×Iso = tt* ,_ -rightInv lUnit*×Iso _ = refl -leftInv lUnit*×Iso _ = refl +sec lUnit*×Iso _ = refl +ret lUnit*×Iso _ = refl rUnit×Iso : Iso (A × Unit) A fun rUnit×Iso = fst inv rUnit×Iso = _, tt -rightInv rUnit×Iso _ = refl -leftInv rUnit×Iso _ = refl +sec rUnit×Iso _ = refl +ret rUnit×Iso _ = refl rUnit*×Iso : ∀{ℓ} → Iso (A × Unit* {ℓ}) A fun rUnit*×Iso = fst inv rUnit*×Iso = _, tt* -rightInv rUnit*×Iso _ = refl -leftInv rUnit*×Iso _ = refl +sec rUnit*×Iso _ = refl +ret rUnit*×Iso _ = refl module _ {A : Type ℓ} {A' : Type ℓ'} where Σ-swap-Iso : Iso (A × A') (A' × A) fun Σ-swap-Iso (x , y) = (y , x) inv Σ-swap-Iso (x , y) = (y , x) - rightInv Σ-swap-Iso _ = refl - leftInv Σ-swap-Iso _ = refl + sec Σ-swap-Iso _ = refl + ret Σ-swap-Iso _ = refl unquoteDecl Σ-swap-≃ = declStrictIsoToEquiv Σ-swap-≃ Σ-swap-Iso @@ -168,16 +168,16 @@ module _ {A : Type ℓ} {B : A → Type ℓ'} {C : ∀ a → B a → Type ℓ''} Σ-assoc-Iso : Iso (Σ[ a ∈ Σ A B ] C (fst a) (snd a)) (Σ[ a ∈ A ] Σ[ b ∈ B a ] C a b) fun Σ-assoc-Iso ((x , y) , z) = (x , (y , z)) inv Σ-assoc-Iso (x , (y , z)) = ((x , y) , z) - rightInv Σ-assoc-Iso _ = refl - leftInv Σ-assoc-Iso _ = refl + sec Σ-assoc-Iso _ = refl + ret Σ-assoc-Iso _ = refl unquoteDecl Σ-assoc-≃ = declStrictIsoToEquiv Σ-assoc-≃ Σ-assoc-Iso Σ-Π-Iso : Iso ((a : A) → Σ[ b ∈ B a ] C a b) (Σ[ f ∈ ((a : A) → B a) ] ∀ a → C a (f a)) fun Σ-Π-Iso f = (fst ∘ f , snd ∘ f) inv Σ-Π-Iso (f , g) x = (f x , g x) - rightInv Σ-Π-Iso _ = refl - leftInv Σ-Π-Iso _ = refl + sec Σ-Π-Iso _ = refl + ret Σ-Π-Iso _ = refl unquoteDecl Σ-Π-≃ = declStrictIsoToEquiv Σ-Π-≃ Σ-Π-Iso @@ -185,8 +185,8 @@ module _ {A : Type ℓ} {B : A → Type ℓ'} {B' : ∀ a → Type ℓ''} where Σ-assoc-swap-Iso : Iso (Σ[ a ∈ Σ A B ] B' (fst a)) (Σ[ a ∈ Σ A B' ] B (fst a)) fun Σ-assoc-swap-Iso ((x , y) , z) = ((x , z) , y) inv Σ-assoc-swap-Iso ((x , z) , y) = ((x , y) , z) - rightInv Σ-assoc-swap-Iso _ = refl - leftInv Σ-assoc-swap-Iso _ = refl + sec Σ-assoc-swap-Iso _ = refl + ret Σ-assoc-swap-Iso _ = refl unquoteDecl Σ-assoc-swap-≃ = declStrictIsoToEquiv Σ-assoc-swap-≃ Σ-assoc-swap-Iso @@ -195,23 +195,23 @@ fun (Σ-cong-iso-fst isom) x = fun isom (x .fst) , x .snd inv (Σ-cong-iso-fst {B = B} isom) x = inv isom (x .fst) , subst B (sym (ε (x .fst))) (x .snd) where ε = isHAEquiv.rinv (snd (iso→HAEquiv isom)) -rightInv (Σ-cong-iso-fst {B = B} isom) (x , y) = ΣPathP (ε x , toPathP goal) +sec (Σ-cong-iso-fst {B = B} isom) (x , y) = ΣPathP (ε x , toPathP goal) where ε = isHAEquiv.rinv (snd (iso→HAEquiv isom)) goal : subst B (ε x) (subst B (sym (ε x)) y) ≡ y goal = sym (substComposite B (sym (ε x)) (ε x) y) ∙∙ cong (λ x → subst B x y) (lCancel (ε x)) ∙∙ substRefl {B = B} y -leftInv (Σ-cong-iso-fst {A = A} {B = B} isom) (x , y) = ΣPathP (leftInv isom x , toPathP goal) +ret (Σ-cong-iso-fst {A = A} {B = B} isom) (x , y) = ΣPathP (ret isom x , toPathP goal) where ε = isHAEquiv.rinv (snd (iso→HAEquiv isom)) γ = isHAEquiv.com (snd (iso→HAEquiv isom)) - lem : (x : A) → sym (ε (fun isom x)) ∙ cong (fun isom) (leftInv isom x) ≡ refl + lem : (x : A) → sym (ε (fun isom x)) ∙ cong (fun isom) (ret isom x) ≡ refl lem x = cong (λ a → sym (ε (fun isom x)) ∙ a) (γ x) ∙ lCancel (ε (fun isom x)) - goal : subst B (cong (fun isom) (leftInv isom x)) (subst B (sym (ε (fun isom x))) y) ≡ y - goal = sym (substComposite B (sym (ε (fun isom x))) (cong (fun isom) (leftInv isom x)) y) + goal : subst B (cong (fun isom) (ret isom x)) (subst B (sym (ε (fun isom x))) y) ≡ y + goal = sym (substComposite B (sym (ε (fun isom x))) (cong (fun isom) (ret isom x)) y) ∙∙ cong (λ a → subst B a y) (lem x) ∙∙ substRefl {B = B} y @@ -260,8 +260,8 @@ leftInv (Σ-cong-iso-fst {A = A} {B = B} isom) (x , y) = ΣPathP (leftInv isom x Σ-cong-iso-snd : ((x : A) → Iso (B x) (B' x)) → Iso (Σ A B) (Σ A B') fun (Σ-cong-iso-snd isom) (x , y) = x , fun (isom x) y inv (Σ-cong-iso-snd isom) (x , y') = x , inv (isom x) y' -rightInv (Σ-cong-iso-snd isom) (x , y) = ΣPathP (refl , rightInv (isom x) y) -leftInv (Σ-cong-iso-snd isom) (x , y') = ΣPathP (refl , leftInv (isom x) y') +sec (Σ-cong-iso-snd isom) (x , y) = ΣPathP (refl , sec (isom x) y) +ret (Σ-cong-iso-snd isom) (x , y') = ΣPathP (refl , ret (isom x) y') Σ-cong-equiv-snd : (∀ a → B a ≃ B' a) → Σ A B ≃ Σ A B' Σ-cong-equiv-snd h = isoToEquiv (Σ-cong-iso-snd (equivToIso ∘ h)) @@ -317,10 +317,10 @@ PathΣ→ΣPathTransport a b = Iso.inv (IsoΣPathTransportPathΣ a b) Σ-contractFstIso : (c : isContr A) → Iso (Σ A B) (B (c .fst)) fun (Σ-contractFstIso {B = B} c) p = subst B (sym (c .snd (fst p))) (snd p) inv (Σ-contractFstIso {B = B} c) b = _ , b -rightInv (Σ-contractFstIso {B = B} c) b = +sec (Σ-contractFstIso {B = B} c) b = cong (λ p → subst B p b) (isProp→isSet (isContr→isProp c) _ _ _ _) ∙ transportRefl _ -fst (leftInv (Σ-contractFstIso {B = B} c) p j) = c .snd (fst p) j -snd (leftInv (Σ-contractFstIso {B = B} c) p j) = +fst (ret (Σ-contractFstIso {B = B} c) p j) = c .snd (fst p) j +snd (ret (Σ-contractFstIso {B = B} c) p j) = transp (λ i → B (c .snd (fst p) (~ i ∨ j))) j (snd p) Σ-contractFst : (c : isContr A) → Σ A B ≃ B (c .fst) @@ -337,8 +337,8 @@ module _ (A : Unit → Type ℓ) where isom : Iso _ _ isom .fun = fst isom .inv a = a , c a .fst - isom .rightInv _ = refl - isom .leftInv (a , b) = cong (a ,_) (c a .snd b) + isom .sec _ = refl + isom .ret (a , b) = cong (a ,_) (c a .snd b) isEmbeddingFstΣProp : ((x : A) → isProp (B x)) → {u v : Σ A B} @@ -408,30 +408,30 @@ prodIso : ∀ {ℓ ℓ' ℓ'' ℓ'''} {A : Type ℓ} {B : Type ℓ'} {C : Type → Iso (A × B) (C × D) Iso.fun (prodIso iAC iBD) (a , b) = (Iso.fun iAC a) , Iso.fun iBD b Iso.inv (prodIso iAC iBD) (c , d) = (Iso.inv iAC c) , Iso.inv iBD d -Iso.rightInv (prodIso iAC iBD) (c , d) = ΣPathP ((Iso.rightInv iAC c) , (Iso.rightInv iBD d)) -Iso.leftInv (prodIso iAC iBD) (a , b) = ΣPathP ((Iso.leftInv iAC a) , (Iso.leftInv iBD b)) +Iso.sec (prodIso iAC iBD) (c , d) = ΣPathP ((Iso.sec iAC c) , (Iso.sec iBD d)) +Iso.ret (prodIso iAC iBD) (a , b) = ΣPathP ((Iso.ret iAC a) , (Iso.ret iBD b)) prodEquivToIso : ∀ {ℓ'' ℓ'''} {A : Type ℓ} {B : Type ℓ'} {C : Type ℓ''} {D : Type ℓ'''} → (e : A ≃ C)(e' : B ≃ D) → prodIso (equivToIso e) (equivToIso e') ≡ equivToIso (≃-× e e') Iso.fun (prodEquivToIso e e' i) = Iso.fun (equivToIso (≃-× e e')) Iso.inv (prodEquivToIso e e' i) = Iso.inv (equivToIso (≃-× e e')) -Iso.rightInv (prodEquivToIso e e' i) = Iso.rightInv (equivToIso (≃-× e e')) -Iso.leftInv (prodEquivToIso e e' i) = Iso.leftInv (equivToIso (≃-× e e')) +Iso.sec (prodEquivToIso e e' i) = Iso.sec (equivToIso (≃-× e e')) +Iso.ret (prodEquivToIso e e' i) = Iso.ret (equivToIso (≃-× e e')) toProdIso : {B C : A → Type ℓ} → Iso ((a : A) → B a × C a) (((a : A) → B a) × ((a : A) → C a)) Iso.fun toProdIso = λ f → (λ a → fst (f a)) , (λ a → snd (f a)) Iso.inv toProdIso (f , g) = λ a → (f a) , (g a) -Iso.rightInv toProdIso (f , g) = refl -Iso.leftInv toProdIso b = refl +Iso.sec toProdIso (f , g) = refl +Iso.ret toProdIso b = refl module _ {A : Type ℓ} {B : A → Type ℓ'} {C : ∀ a → B a → Type ℓ''} where curryIso : Iso (((a , b) : Σ A B) → C a b) ((a : A) → (b : B a) → C a b) Iso.fun curryIso f a b = f (a , b) Iso.inv curryIso f a = f (fst a) (snd a) - Iso.rightInv curryIso a = refl - Iso.leftInv curryIso f = refl + Iso.sec curryIso a = refl + Iso.ret curryIso f = refl unquoteDecl curryEquiv = declStrictIsoToEquiv curryEquiv curryIso @@ -472,10 +472,10 @@ module _ fiberProjIso : Iso (B a) (fiber proj a) fiberProjIso .fun b = (a , b) , refl fiberProjIso .inv ((a' , b') , p) = subst B p b' - fiberProjIso .leftInv b i = substRefl {B = B} b i - fiberProjIso .rightInv (_ , p) i .fst .fst = p (~ i) - fiberProjIso .rightInv ((_ , b') , p) i .fst .snd = subst-filler B p b' (~ i) - fiberProjIso .rightInv (_ , p) i .snd j = p (~ i ∨ j) + fiberProjIso .ret b i = substRefl {B = B} b i + fiberProjIso .sec (_ , p) i .fst .fst = p (~ i) + fiberProjIso .sec ((_ , b') , p) i .fst .snd = subst-filler B p b' (~ i) + fiberProjIso .sec (_ , p) i .snd j = p (~ i ∨ j) fiberProjEquiv : B a ≃ fiber proj a fiberProjEquiv = isoToEquiv fiberProjIso diff --git a/Cubical/Data/Sum/Properties.agda b/Cubical/Data/Sum/Properties.agda index 8ce0928e77..ef40a394be 100644 --- a/Cubical/Data/Sum/Properties.agda +++ b/Cubical/Data/Sum/Properties.agda @@ -128,10 +128,10 @@ fun (⊎Iso iac ibd) (inl x) = inl (iac .fun x) fun (⊎Iso iac ibd) (inr x) = inr (ibd .fun x) inv (⊎Iso iac ibd) (inl x) = inl (iac .inv x) inv (⊎Iso iac ibd) (inr x) = inr (ibd .inv x) -rightInv (⊎Iso iac ibd) (inl x) = cong inl (iac .rightInv x) -rightInv (⊎Iso iac ibd) (inr x) = cong inr (ibd .rightInv x) -leftInv (⊎Iso iac ibd) (inl x) = cong inl (iac .leftInv x) -leftInv (⊎Iso iac ibd) (inr x) = cong inr (ibd .leftInv x) +sec (⊎Iso iac ibd) (inl x) = cong inl (iac .sec x) +sec (⊎Iso iac ibd) (inr x) = cong inr (ibd .sec x) +ret (⊎Iso iac ibd) (inl x) = cong inl (iac .ret x) +ret (⊎Iso iac ibd) (inr x) = cong inr (ibd .ret x) ⊎-equiv : A ≃ C → B ≃ D → (A ⊎ B) ≃ (C ⊎ D) ⊎-equiv p q = isoToEquiv (⊎Iso (equivToIso p) (equivToIso q)) @@ -141,10 +141,10 @@ fun ⊎-swap-Iso (inl x) = inr x fun ⊎-swap-Iso (inr x) = inl x inv ⊎-swap-Iso (inl x) = inr x inv ⊎-swap-Iso (inr x) = inl x -rightInv ⊎-swap-Iso (inl _) = refl -rightInv ⊎-swap-Iso (inr _) = refl -leftInv ⊎-swap-Iso (inl _) = refl -leftInv ⊎-swap-Iso (inr _) = refl +sec ⊎-swap-Iso (inl _) = refl +sec ⊎-swap-Iso (inr _) = refl +ret ⊎-swap-Iso (inl _) = refl +ret ⊎-swap-Iso (inr _) = refl ⊎-swap-≃ : A ⊎ B ≃ B ⊎ A ⊎-swap-≃ = isoToEquiv ⊎-swap-Iso @@ -156,12 +156,12 @@ fun ⊎-assoc-Iso (inr x) = inr (inr x) inv ⊎-assoc-Iso (inl x) = inl (inl x) inv ⊎-assoc-Iso (inr (inl x)) = inl (inr x) inv ⊎-assoc-Iso (inr (inr x)) = inr x -rightInv ⊎-assoc-Iso (inl _) = refl -rightInv ⊎-assoc-Iso (inr (inl _)) = refl -rightInv ⊎-assoc-Iso (inr (inr _)) = refl -leftInv ⊎-assoc-Iso (inl (inl _)) = refl -leftInv ⊎-assoc-Iso (inl (inr _)) = refl -leftInv ⊎-assoc-Iso (inr _) = refl +sec ⊎-assoc-Iso (inl _) = refl +sec ⊎-assoc-Iso (inr (inl _)) = refl +sec ⊎-assoc-Iso (inr (inr _)) = refl +ret ⊎-assoc-Iso (inl (inl _)) = refl +ret ⊎-assoc-Iso (inl (inr _)) = refl +ret ⊎-assoc-Iso (inr _) = refl ⊎-assoc-≃ : (A ⊎ B) ⊎ C ≃ A ⊎ (B ⊎ C) ⊎-assoc-≃ = isoToEquiv ⊎-assoc-Iso @@ -169,26 +169,26 @@ leftInv ⊎-assoc-Iso (inr _) = refl ⊎-IdR-⊥-Iso : Iso (A ⊎ ⊥) A fun ⊎-IdR-⊥-Iso (inl x) = x inv ⊎-IdR-⊥-Iso x = inl x -rightInv ⊎-IdR-⊥-Iso _ = refl -leftInv ⊎-IdR-⊥-Iso (inl _) = refl +sec ⊎-IdR-⊥-Iso _ = refl +ret ⊎-IdR-⊥-Iso (inl _) = refl ⊎-IdL-⊥-Iso : Iso (⊥ ⊎ A) A fun ⊎-IdL-⊥-Iso (inr x) = x inv ⊎-IdL-⊥-Iso x = inr x -rightInv ⊎-IdL-⊥-Iso _ = refl -leftInv ⊎-IdL-⊥-Iso (inr _) = refl +sec ⊎-IdL-⊥-Iso _ = refl +ret ⊎-IdL-⊥-Iso (inr _) = refl ⊎-IdL-⊥*-Iso : ∀{ℓ} → Iso (⊥* {ℓ} ⊎ A) A fun ⊎-IdL-⊥*-Iso (inr x) = x inv ⊎-IdL-⊥*-Iso x = inr x -rightInv ⊎-IdL-⊥*-Iso _ = refl -leftInv ⊎-IdL-⊥*-Iso (inr _) = refl +sec ⊎-IdL-⊥*-Iso _ = refl +ret ⊎-IdL-⊥*-Iso (inr _) = refl ⊎-IdR-⊥*-Iso : ∀{ℓ} → Iso (A ⊎ ⊥* {ℓ}) A fun ⊎-IdR-⊥*-Iso (inl x) = x inv ⊎-IdR-⊥*-Iso x = inl x -rightInv ⊎-IdR-⊥*-Iso _ = refl -leftInv ⊎-IdR-⊥*-Iso (inl _) = refl +sec ⊎-IdR-⊥*-Iso _ = refl +ret ⊎-IdR-⊥*-Iso (inl _) = refl ⊎-IdR-⊥-≃ : A ⊎ ⊥ ≃ A ⊎-IdR-⊥-≃ = isoToEquiv ⊎-IdR-⊥-Iso @@ -207,30 +207,30 @@ fun Π⊎Iso f .fst a = f (inl a) fun Π⊎Iso f .snd b = f (inr b) inv Π⊎Iso (g1 , g2) (inl a) = g1 a inv Π⊎Iso (g1 , g2) (inr b) = g2 b -rightInv Π⊎Iso (g1 , g2) i .fst a = g1 a -rightInv Π⊎Iso (g1 , g2) i .snd b = g2 b -leftInv Π⊎Iso f i (inl a) = f (inl a) -leftInv Π⊎Iso f i (inr b) = f (inr b) +sec Π⊎Iso (g1 , g2) i .fst a = g1 a +sec Π⊎Iso (g1 , g2) i .snd b = g2 b +ret Π⊎Iso f i (inl a) = f (inl a) +ret Π⊎Iso f i (inr b) = f (inr b) Σ⊎Iso : Iso (Σ (A ⊎ B) E) ((Σ A (λ a → E (inl a))) ⊎ (Σ B (λ b → E (inr b)))) fun Σ⊎Iso (inl a , ea) = inl (a , ea) fun Σ⊎Iso (inr b , eb) = inr (b , eb) inv Σ⊎Iso (inl (a , ea)) = (inl a , ea) inv Σ⊎Iso (inr (b , eb)) = (inr b , eb) -rightInv Σ⊎Iso (inl (a , ea)) = refl -rightInv Σ⊎Iso (inr (b , eb)) = refl -leftInv Σ⊎Iso (inl a , ea) = refl -leftInv Σ⊎Iso (inr b , eb) = refl +sec Σ⊎Iso (inl (a , ea)) = refl +sec Σ⊎Iso (inr (b , eb)) = refl +ret Σ⊎Iso (inl a , ea) = refl +ret Σ⊎Iso (inr b , eb) = 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 +sec ×DistR⊎Iso (inl (a , b)) = refl +sec ×DistR⊎Iso (inr (a , c)) = refl +ret ×DistR⊎Iso (a , inl b) = refl +ret ×DistR⊎Iso (a , inr c) = refl Π⊎≃ : ((x : A ⊎ B) → E x) ≃ ((a : A) → E (inl a)) × ((b : B) → E (inr b)) Π⊎≃ = isoToEquiv Π⊎Iso @@ -314,19 +314,19 @@ Iso⊎→Iso {A = A} {C = C} {B = B} {D = D} f e p = Iso' → ((d : D) (s : _) → P (inr d , s)) → (x : _) → P x T-elim b ind (inl x , q) = - ⊥.rec (subst ⊥-fib (sym (sym (Iso.leftInv e _) + ⊥.rec (subst ⊥-fib (sym (sym (Iso.ret e _) ∙ cong (Iso.inv e) - (p _ ∙ cong inl (Iso.rightInv f x) ∙ sym q) - ∙ Iso.leftInv e _)) tt) + (p _ ∙ cong inl (Iso.sec f x) ∙ sym q) + ∙ Iso.ret e _)) tt) T-elim b ind (inr x , y) = ind x y e-pres-inr-help : (b : B) → T f e p b → D e-pres-inr-help b = T-elim f e p b λ d _ → d p' : (a : C) → Iso.inv e (inl a) ≡ inl (Iso.inv f a) - p' c = cong (Iso.inv e ∘ inl) (sym (Iso.rightInv f c)) + p' c = cong (Iso.inv e ∘ inl) (sym (Iso.sec f c)) ∙∙ cong (Iso.inv e) (sym (p (Iso.inv f c))) - ∙∙ Iso.leftInv e _ + ∙∙ Iso.ret e _ e⁻-pres-inr-help : (d : D) → T (invIso f) (invIso e) p' d → B e⁻-pres-inr-help d = T-elim (invIso f) (invIso e) p' d λ b _ → b @@ -342,20 +342,20 @@ Iso⊎→Iso {A = A} {C = C} {B = B} {D = D} f e p = Iso' lem1 b = T-elim f e p b λ d s → T-elim (invIso f) (invIso e) p' _ λ b' s' → invEq (_ , isEmbedding-inr _ _) - (sym s' ∙ cong (Iso.inv e) (sym s) ∙ Iso.leftInv e _) + (sym s' ∙ cong (Iso.inv e) (sym s) ∙ Iso.ret e _) lem2 : (d : D) (e : T (invIso f) (invIso e) p' d ) (t : _) → e-pres-inr-help (e⁻-pres-inr-help d e) t ≡ d lem2 d = T-elim (invIso f) (invIso e) p' d λ b s → T-elim f e p _ λ d' s' → invEq (_ , isEmbedding-inr _ _) - (sym s' ∙ cong (Iso.fun e) (sym s) ∙ Iso.rightInv e _) + (sym s' ∙ cong (Iso.fun e) (sym s) ∙ Iso.sec e _) Iso' : Iso B D Iso.fun Iso' = e-pres-inr Iso.inv Iso' = e⁻-pres-inr - Iso.rightInv Iso' x = lem2 x (_ , refl) (_ , refl) - Iso.leftInv Iso' x = lem1 x (_ , refl) (_ , refl) + Iso.sec Iso' x = lem2 x (_ , refl) (_ , refl) + Iso.ret Iso' x = lem1 x (_ , refl) (_ , refl) Lift⊎Iso : ∀ (ℓ : Level) → Iso (Lift {j = ℓ} A ⊎ Lift {j = ℓ} B) @@ -364,7 +364,7 @@ fun (Lift⊎Iso ℓD) (inl x) = liftFun inl x fun (Lift⊎Iso ℓD) (inr x) = liftFun inr x inv (Lift⊎Iso ℓD) (lift (inl x)) = inl (lift x) inv (Lift⊎Iso ℓD) (lift (inr x)) = inr (lift x) -rightInv (Lift⊎Iso ℓD) (lift (inl x)) = refl -rightInv (Lift⊎Iso ℓD) (lift (inr x)) = refl -leftInv (Lift⊎Iso ℓD) (inl x) = refl -leftInv (Lift⊎Iso ℓD) (inr x) = refl +sec (Lift⊎Iso ℓD) (lift (inl x)) = refl +sec (Lift⊎Iso ℓD) (lift (inr x)) = refl +ret (Lift⊎Iso ℓD) (inl x) = refl +ret (Lift⊎Iso ℓD) (inr x) = refl diff --git a/Cubical/Data/SumFin/Properties.agda b/Cubical/Data/SumFin/Properties.agda index ce5c8f440f..92a131ccbe 100644 --- a/Cubical/Data/SumFin/Properties.agda +++ b/Cubical/Data/SumFin/Properties.agda @@ -13,6 +13,7 @@ open import Cubical.Data.Unit open import Cubical.Data.Bool hiding (_≤_) open import Cubical.Data.Nat as Nat open import Cubical.Data.Nat.Order as Ord +open import Cubical.Data.Nat.Order.Inductive import Cubical.Data.Fin as Fin import Cubical.Data.FinData as FinData import Cubical.Data.Fin.LehmerCode as LehmerCode @@ -33,10 +34,13 @@ SumFin→Fin : Fin k → Fin.Fin k SumFin→Fin = SumFin.elim (λ {k} _ → Fin.Fin k) Fin.fzero Fin.fsuc Fin→SumFin : Fin.Fin k → Fin k -Fin→SumFin = Fin.elim (λ {k} _ → Fin k) fzero fsuc +Fin→SumFin {zero} (m , p) = p +Fin→SumFin {suc k} (zero , p) = fzero +Fin→SumFin {suc k} (suc m , p) = fsuc (Fin→SumFin (m , p)) -Fin→SumFin-fsuc : (fk : Fin.Fin k) → Fin→SumFin (Fin.fsuc fk) ≡ fsuc (Fin→SumFin fk) -Fin→SumFin-fsuc = Fin.elim-fsuc (λ {k} _ → Fin k) fzero fsuc +Fin→SumFin-fsuc : (fk : Fin.Fin k) → Fin→SumFin (Fin.fsuc {k} fk) ≡ fsuc (Fin→SumFin fk) +Fin→SumFin-fsuc {zero} () +Fin→SumFin-fsuc {suc k} (m , p) = refl SumFin→Fin→SumFin : (fk : Fin k) → Fin→SumFin (SumFin→Fin fk) ≡ fk SumFin→Fin→SumFin = SumFin.elim (λ fk → Fin→SumFin (SumFin→Fin fk) ≡ fk) @@ -45,24 +49,21 @@ SumFin→Fin→SumFin = SumFin.elim (λ fk → Fin→SumFin (SumFin→Fin fk) fsuc (Fin→SumFin (SumFin→Fin fk)) ≡⟨ cong fsuc eq ⟩ fsuc fk ∎ -Fin→SumFin→Fin : (fk : Fin.Fin k) → SumFin→Fin (Fin→SumFin fk) ≡ fk -Fin→SumFin→Fin = Fin.elim (λ fk → SumFin→Fin (Fin→SumFin fk) ≡ fk) - refl λ {k} {fk} eq → - SumFin→Fin (Fin→SumFin (Fin.fsuc fk)) ≡⟨ cong SumFin→Fin (Fin→SumFin-fsuc fk) ⟩ - Fin.fsuc (SumFin→Fin (Fin→SumFin fk)) ≡⟨ cong Fin.fsuc eq ⟩ - Fin.fsuc fk ∎ +Fin→SumFin→Fin : (fk : Fin.Fin k) → SumFin→Fin {k} (Fin→SumFin fk) ≡ fk +Fin→SumFin→Fin {zero} (m , p) = ⊥.rec p +Fin→SumFin→Fin {suc k} (zero , p) = refl +Fin→SumFin→Fin {suc k} (suc m , p) = cong Fin.fsuc (Fin→SumFin→Fin {k} (m , p)) SumFin≃Fin : ∀ k → Fin k ≃ Fin.Fin k -SumFin≃Fin _ = - isoToEquiv (iso SumFin→Fin Fin→SumFin Fin→SumFin→Fin SumFin→Fin→SumFin) +SumFin≃Fin k = isoToEquiv (iso SumFin→Fin Fin→SumFin (Fin→SumFin→Fin {k}) SumFin→Fin→SumFin) SumFin≡Fin : ∀ k → Fin k ≡ Fin.Fin k SumFin≡Fin k = ua (SumFin≃Fin k) -enum : (n : ℕ)(p : n < k) → Fin k +enum : (n : ℕ)(p : n <ᵗ k) → Fin k enum n p = Fin→SumFin (n , p) -enumElim : (P : Fin k → Type ℓ) → ((n : ℕ)(p : n < k) → P (enum _ p)) → (i : Fin k) → P i +enumElim : (P : Fin k → Type ℓ) → ((n : ℕ)(p : n <ᵗ k) → P (enum _ p)) → (i : Fin k) → P i enumElim P f i = subst P (SumFin→Fin→SumFin i) (f (SumFin→Fin i .fst) (SumFin→Fin i .snd)) -- Closure properties of SumFin under type constructors @@ -265,11 +266,11 @@ isProp→Fin≤1 (suc (suc n)) p = ⊥.rec (fzero≠fone (p fzero (fsuc fzero))) -- automorphisms of SumFin SumFin≃≃ : (n : ℕ) → (Fin n ≃ Fin n) ≃ Fin (n !) -SumFin≃≃ _ = - equivComp (SumFin≃Fin _) (SumFin≃Fin _) - ⋆ LehmerCode.lehmerEquiv +SumFin≃≃ n = + equivComp (SumFin≃Fin n) (SumFin≃Fin n) + ⋆ LehmerCode.lehmerEquiv {n = n} ⋆ LehmerCode.lehmerFinEquiv - ⋆ invEquiv (SumFin≃Fin _) + ⋆ invEquiv (SumFin≃Fin (n !)) -- Relate SumFin and FinData diff --git a/Cubical/Data/Unit/Properties.agda b/Cubical/Data/Unit/Properties.agda index eb2c747ce0..3bfc1bc2b1 100644 --- a/Cubical/Data/Unit/Properties.agda +++ b/Cubical/Data/Unit/Properties.agda @@ -49,8 +49,8 @@ module _ (A : Unit → Type ℓ) where ΠUnitIso : Iso ((x : Unit) → A x) (A tt) fun ΠUnitIso f = f tt inv ΠUnitIso a tt = a - rightInv ΠUnitIso a = refl - leftInv ΠUnitIso f = refl + sec ΠUnitIso a = refl + ret ΠUnitIso f = refl ΠUnit : ((x : Unit) → A x) ≃ A tt ΠUnit = isoToEquiv ΠUnitIso @@ -62,8 +62,8 @@ module _ (A : Unit* {ℓ} → Type ℓ') where ΠUnit*Iso : Iso ((x : Unit*) → A x) (A tt*) fun ΠUnit*Iso f = f tt* inv ΠUnit*Iso a tt* = a - rightInv ΠUnit*Iso a = refl - leftInv ΠUnit*Iso f = refl + sec ΠUnit*Iso a = refl + ret ΠUnit*Iso f = refl ΠUnit* : ((x : Unit*) → A x) ≃ A tt* ΠUnit* = isoToEquiv ΠUnit*Iso @@ -71,14 +71,14 @@ module _ (A : Unit* {ℓ} → Type ℓ') where fiberUnitIso : {A : Type ℓ} → Iso (fiber (λ (a : A) → tt) tt) A fun fiberUnitIso = fst inv fiberUnitIso a = a , refl -rightInv fiberUnitIso _ = refl -leftInv fiberUnitIso _ = refl +sec fiberUnitIso _ = refl +ret fiberUnitIso _ = refl isContr→Iso2 : {A : Type ℓ} {B : Type ℓ'} → isContr A → Iso (A → B) B fun (isContr→Iso2 iscontr) f = f (fst iscontr) inv (isContr→Iso2 iscontr) b _ = b -rightInv (isContr→Iso2 iscontr) _ = refl -leftInv (isContr→Iso2 iscontr) f = funExt λ x → cong f (snd iscontr x) +sec (isContr→Iso2 iscontr) _ = refl +ret (isContr→Iso2 iscontr) f = funExt λ x → cong f (snd iscontr x) diagonal-unit : Unit ≡ Unit × Unit diagonal-unit = isoToPath (iso (λ x → tt , tt) (λ x → tt) (λ {(tt , tt) i → tt , tt}) λ {tt i → tt}) diff --git a/Cubical/Data/Vec/DepVec.agda b/Cubical/Data/Vec/DepVec.agda index 14b68d06a7..8099c06b2d 100644 --- a/Cubical/Data/Vec/DepVec.agda +++ b/Cubical/Data/Vec/DepVec.agda @@ -57,7 +57,7 @@ module depVecPath (G : (n : ℕ) → Type ℓ) is : Iso (v ≡ v') (code v v') fun is = encode v v' inv is = decode v v' - rightInv is = sect v v' + sec is = sect v v' where sect : {n : ℕ} → (v v' : depVec G n) → (r : code v v') → encode v v' (decode v v' r) ≡ r @@ -65,7 +65,7 @@ module depVecPath (G : (n : ℕ) → Type ℓ) sect (a □ v) (a' □ v') (p , q) = J (λ a' p → encode (a □ v) (a' □ v') (decode (a □ v) (a' □ v') (p , q)) ≡ (p , q)) (J (λ v' q → encode (a □ v) (a □ v') (decode (a □ v) (a □ v') (refl , q)) ≡ (refl , q)) (encodeRefl (a □ v)) q) p - leftInv is = retr v v' + ret is = retr v v' where retr : {n : ℕ} → (v v' : depVec G n) → (p : v ≡ v') → decode v v' (encode v v' p) ≡ p diff --git a/Cubical/Data/Vec/NAry.agda b/Cubical/Data/Vec/NAry.agda index c4fcd5b985..7a8b8c1788 100644 --- a/Cubical/Data/Vec/NAry.agda +++ b/Cubical/Data/Vec/NAry.agda @@ -45,8 +45,8 @@ nAryOp≃VecFun {n = n} = isoToEquiv f f : Iso (nAryOp n A B) (Vec A n → B) Iso.fun f = _$ⁿ_ Iso.inv f = curryⁿ - Iso.rightInv f = $ⁿ-curryⁿ - Iso.leftInv f = curryⁿ-$ⁿ {n = n} + Iso.sec f = $ⁿ-curryⁿ + Iso.ret f = curryⁿ-$ⁿ {n = n} -- In order to apply ua to nAryOp≃VecFun we probably need to change -- the base-case of nAryLevel to "ℓ-max ℓ₁ ℓ₂". This will make it diff --git a/Cubical/Data/Vec/Properties.agda b/Cubical/Data/Vec/Properties.agda index 5f4641e7a8..21682900a0 100644 --- a/Cubical/Data/Vec/Properties.agda +++ b/Cubical/Data/Vec/Properties.agda @@ -99,7 +99,7 @@ module VecPath {A : Type ℓ} is : Iso (v ≡ v') (code v v') fun is = encode v v' inv is = decode v v' - rightInv is = sect v v' + sec is = sect v v' where sect : {n : ℕ} → (v v' : Vec A n) → (r : code v v') → encode v v' (decode v v' r) ≡ r @@ -107,7 +107,7 @@ module VecPath {A : Type ℓ} sect (a ∷ v) (a' ∷ v') (p , q) = J (λ a' p → encode (a ∷ v) (a' ∷ v') (decode (a ∷ v) (a' ∷ v') (p , q)) ≡ (p , q)) (J (λ v' q → encode (a ∷ v) (a ∷ v') (decode (a ∷ v) (a ∷ v') (refl , q)) ≡ (refl , q)) (encodeRefl (a ∷ v)) q) p - leftInv is = retr v v' + ret is = retr v v' where retr : {n : ℕ} → (v v' : Vec A n) → (p : v ≡ v') → decode v v' (encode v v' p) ≡ p diff --git a/Cubical/Data/W/Indexed.agda b/Cubical/Data/W/Indexed.agda index 600371833f..da3c02e364 100644 --- a/Cubical/Data/W/Indexed.agda +++ b/Cubical/Data/W/Indexed.agda @@ -48,8 +48,8 @@ module _ {X : Type ℓX} {S : X → Type ℓS} {P : ∀ x → S x → Type ℓP} isoRepIW : (x : X) → IW S P inX x ≅ RepIW S P inX x fun (isoRepIW x) (node s subtree) = s , subtree inv (isoRepIW x) (s , subtree) = node s subtree - rightInv (isoRepIW x) (s , subtree) = refl - leftInv (isoRepIW x) (node s subtree) = refl + sec (isoRepIW x) (s , subtree) = refl + ret (isoRepIW x) (node s subtree) = refl equivRepIW : (x : X) → IW S P inX x ≃ RepIW S P inX x equivRepIW x = isoToEquiv (isoRepIW x) @@ -99,20 +99,20 @@ module IWPath {X : Type ℓX} {S : X → Type ℓS} {P : ∀ x → S x → Type node (cong getShape pw) (fun (isoEncodeSubtree w w' (cong getShape pw)) (cong getSubtree pw)) inv (isoEncode w@(node s subtree) w'@(node s' subtree')) cw@(node ps csubtree) = cong₂ node ps (inv (isoEncodeSubtree w w' ps) csubtree) - rightInv (isoEncode w@(node s subtree) w'@(node s' subtree')) cw@(node ps csubtree) = + sec (isoEncode w@(node s subtree) w'@(node s' subtree')) cw@(node ps csubtree) = cong (node ps) ( fun (isoEncodeSubtree w w' ps) (inv (isoEncodeSubtree w w' ps) csubtree) - ≡⟨ rightInv (isoEncodeSubtree w w' ps) csubtree ⟩ + ≡⟨ sec (isoEncodeSubtree w w' ps) csubtree ⟩ csubtree ∎ ) - leftInv (isoEncode w@(node s subtree) w'@(node s' subtree')) pw = + ret (isoEncode w@(node s subtree) w'@(node s' subtree')) pw = cong₂ node (cong getShape pw) (inv (isoEncodeSubtree w w' (cong getShape pw)) (fun (isoEncodeSubtree w w' (cong getShape pw)) (cong getSubtree pw) ) ) - ≡⟨ cong (cong₂ node (cong getShape pw)) (leftInv (isoEncodeSubtree w w' (cong getShape pw)) (cong getSubtree pw)) ⟩ + ≡⟨ cong (cong₂ node (cong getShape pw)) (ret (isoEncodeSubtree w w' (cong getShape pw)) (cong getSubtree pw)) ⟩ cong₂ node (cong getShape pw) (cong getSubtree pw) ≡⟨ flipSquare (λ i → wExt (node (getShape (pw i)) (getSubtree (pw i))) (pw i) refl refl) ⟩ pw ∎ @@ -124,10 +124,10 @@ module IWPath {X : Type ℓX} {S : X → Type ℓS} {P : ∀ x → S x → Type decode w w' = inv (isoEncode w w') decodeEncode : ∀ {x} (w w' : IW S P inX x) → (pw : w ≡ w') → decode w w' (encode w w' pw) ≡ pw - decodeEncode w w' = leftInv (isoEncode w w') + decodeEncode w w' = ret (isoEncode w w') encodeDecode : ∀ {x} (w w' : IW S P inX x) → (cw : Cover w w') → encode w w' (decode w w' cw) ≡ cw - encodeDecode w w' = rightInv (isoEncode w w') + encodeDecode w w' = sec (isoEncode w w') equivEncode : ∀ {x} (w w' : IW S P inX x) → (w ≡ w') ≃ Cover w w' equivEncode w w' = isoToEquiv (isoEncode w w') diff --git a/Cubical/Displayed/Properties.agda b/Cubical/Displayed/Properties.agda index fda2cd93d1..eccea24e14 100644 --- a/Cubical/Displayed/Properties.agda +++ b/Cubical/Displayed/Properties.agda @@ -72,7 +72,7 @@ module _ {A : Type ℓA} {𝒮-A : UARel A ℓ≅A} where g : (b' : B a) → (b ≡ b') ≡ PathP (λ i → B (≅→≡ (ρ a) i)) b b' g b' = subst (λ r → (b ≡ b') ≡ PathP (λ i → B (r i)) b b') - (sym (Iso.rightInv (uaIso a a) refl)) + (sym (Iso.sec (uaIso a a) refl)) refl uni' : (b' : B a) → b ≅ᴰ⟨ ρ a ⟩ b' ≃ PathP (λ i → B (≅→≡ (ρ a) i)) b b' uni' b' = compEquiv (uni b b') (pathToEquiv (g b')) diff --git a/Cubical/Displayed/Subst.agda b/Cubical/Displayed/Subst.agda index 97964c01b8..c10e51e2f3 100644 --- a/Cubical/Displayed/Subst.agda +++ b/Cubical/Displayed/Subst.agda @@ -40,7 +40,7 @@ record SubstRel {A : Type ℓA} {ℓ≅A : Level} (𝒮-A : UARel A ℓ≅A) (B subst B (sym (≅→≡ p)) (equivFun (act p) (invEq (act p) b)) ≡⟨ cong (subst B (sym (≅→≡ p))) (sym (uaˢ p (invEq (act p) b))) ⟩ subst B (sym (≅→≡ p)) (subst B (≅→≡ p) (invEq (act p) b)) - ≡⟨ pathToIso (cong B (≅→≡ p)) .Iso.leftInv (invEq (act p) b) ⟩ + ≡⟨ pathToIso (cong B (≅→≡ p)) .Iso.ret (invEq (act p) b) ⟩ invEq (act p) b ∎ diff --git a/Cubical/Experiments/CohomologyGroups.agda b/Cubical/Experiments/CohomologyGroups.agda index e16cec3685..25efc66631 100644 --- a/Cubical/Experiments/CohomologyGroups.agda +++ b/Cubical/Experiments/CohomologyGroups.agda @@ -67,8 +67,8 @@ diagonalIso {A = A} B {C = C} ψ ϕ issurj ker→diag diag→ker = BijectionIsoT bijIso : BijectionIso A C map' bijIso = compGroupHom fstProj (compGroupHom (map ψ) ϕ) inj bijIso a inker = pRec (isSetCarrier A _ _) - (λ {(a' , id) → (cong fst (sym (leftInv ψ (a , GroupStr.0g (snd A))) ∙∙ cong ψ⁻ id ∙∙ leftInv ψ (a' , a'))) - ∙ cong snd (sym (leftInv ψ (a' , a')) ∙∙ cong ψ⁻ (sym id) ∙∙ leftInv ψ (a , GroupStr.0g (snd A)))}) + (λ {(a' , id) → (cong fst (sym (ret ψ (a , GroupStr.0g (snd A))) ∙∙ cong ψ⁻ id ∙∙ ret ψ (a' , a'))) + ∙ cong snd (sym (ret ψ (a' , a')) ∙∙ cong ψ⁻ (sym id) ∙∙ ret ψ (a , GroupStr.0g (snd A)))}) (ker→diag _ inker) surj bijIso c = pRec isPropPropTrunc @@ -83,7 +83,7 @@ diagonalIso {A = A} B {C = C} ψ ϕ issurj ker→diag diag→ker = BijectionIsoT ∙∙ cong (fst (ψ⁻ b) A.+_) (GroupStr.invl (snd A) _) ∙∙ GroupStr.rid (snd A) _ , (GroupStr.lid (snd A) _))) - ∙∙ rightInv ψ b) + ∙∙ sec ψ b) ∙∙ id) ∣₁ }) (issurj c) @@ -112,8 +112,8 @@ H¹-S¹≅ℤ = module K = MV Unit Unit (S₊ 0) (λ _ → tt) (λ _ → tt) surjHelper : (x : Int) (x₁ : S₊ 0) → x -[ 0 ]ₖ 0 ≡ S0→Int (x , x) x₁ - surjHelper x true = Iso.leftInv (Iso-Kn-ΩKn+1 0) x - surjHelper x false = Iso.leftInv (Iso-Kn-ΩKn+1 0) x + surjHelper x true = Iso.ret (Iso-Kn-ΩKn+1 0) x + surjHelper x false = Iso.ret (Iso-Kn-ΩKn+1 0) x helper : (F : S₊ 0 → Int) (f g : ∥ (Unit → Int) ∥₂) (id : GroupHom.fun (K.Δ 0) (f , g) ≡ ∣ F ∣₂) diff --git a/Cubical/Experiments/IsoInt/Base.agda b/Cubical/Experiments/IsoInt/Base.agda index d18c292235..5e40c3b7d6 100644 --- a/Cubical/Experiments/IsoInt/Base.agda +++ b/Cubical/Experiments/IsoInt/Base.agda @@ -30,7 +30,7 @@ data IsoInt : Type₀ where suc-iso : Iso IsoInt IsoInt -suc-iso = record { fun = suc ; inv = pred ; rightInv = suc-pred ; leftInv = pred-suc } +suc-iso = record { fun = suc ; inv = pred ; sec = suc-pred ; ret = pred-suc } -- this submodule is adapted from Section 5 of diff --git a/Cubical/Experiments/Poset.agda b/Cubical/Experiments/Poset.agda index 40ffd4789a..e81ab1f68d 100644 --- a/Cubical/Experiments/Poset.agda +++ b/Cubical/Experiments/Poset.agda @@ -299,10 +299,10 @@ P ≅ₚ Q = Σ[ f ∈ P ─m→ Q ] isPosetIso P Q f g = equivFun (invEquiv e) sec-f-g : section f g - sec-f-g = Iso.rightInv (equivToIso e) + sec-f-g = Iso.sec (equivToIso e) ret-f-g : retract f g - ret-f-g = Iso.leftInv (equivToIso e) + ret-f-g = Iso.ret (equivToIso e) from : P ≅ₚ Q → P ≃ₚ Q from ((f , f-mono) , ((g , g-mono) , sec , ret)) = diff --git a/Cubical/Experiments/ZCohomologyOld/Properties.agda b/Cubical/Experiments/ZCohomologyOld/Properties.agda index 19477877ca..4a34aa42d6 100644 --- a/Cubical/Experiments/ZCohomologyOld/Properties.agda +++ b/Cubical/Experiments/ZCohomologyOld/Properties.agda @@ -211,47 +211,47 @@ Kn→ΩKn+10ₖ (suc (suc n)) i j = ∣ (rCancel (merid north) i j) ∣ -0ₖ : {n : ℕ} → -[ n ]ₖ (0ₖ n) ≡ (0ₖ n) -0ₖ {n = n} = (λ i → ΩKn+1→Kn n (sym (Kn→ΩKn+10ₖ n i))) ∙∙ (λ i → ΩKn+1→Kn n (Kn→ΩKn+10ₖ n (~ i))) - ∙∙ Iso.leftInv (Iso-Kn-ΩKn+1 n) (0ₖ n) + ∙∙ Iso.ret (Iso-Kn-ΩKn+1 n) (0ₖ n) +ₖ→∙ : (n : ℕ) (a b : coHomK n) → Kn→ΩKn+1 n (a +[ n ]ₖ b) ≡ Kn→ΩKn+1 n a ∙ Kn→ΩKn+1 n b -+ₖ→∙ n a b = Iso.rightInv (Iso-Kn-ΩKn+1 n) (Kn→ΩKn+1 n a ∙ Kn→ΩKn+1 n b) ++ₖ→∙ n a b = Iso.sec (Iso-Kn-ΩKn+1 n) (Kn→ΩKn+1 n a ∙ Kn→ΩKn+1 n b) lUnitₖ : (n : ℕ) (x : coHomK n) → (0ₖ n) +[ n ]ₖ x ≡ x -lUnitₖ 0 x = Iso.leftInv (Iso-Kn-ΩKn+1 zero) x -lUnitₖ (suc zero) = trElim (λ _ → isOfHLevelPath 3 (isOfHLevelTrunc 3) _ _) λ x → Iso.leftInv (Iso-Kn-ΩKn+1 1) ∣ x ∣ +lUnitₖ 0 x = Iso.ret (Iso-Kn-ΩKn+1 zero) x +lUnitₖ (suc zero) = trElim (λ _ → isOfHLevelPath 3 (isOfHLevelTrunc 3) _ _) λ x → Iso.ret (Iso-Kn-ΩKn+1 1) ∣ x ∣ lUnitₖ (suc (suc n)) x = (λ i → ΩKn+1→Kn (2 + n) (Kn→ΩKn+10ₖ (2 + n) i ∙ Kn→ΩKn+1 (2 + n) x)) ∙∙ (cong (ΩKn+1→Kn (2 + n)) (sym (lUnit (Kn→ΩKn+1 (2 + n) x)))) ∙∙ - Iso.leftInv (Iso-Kn-ΩKn+1 (2 + n)) x + Iso.ret (Iso-Kn-ΩKn+1 (2 + n)) x rUnitₖ : (n : ℕ) (x : coHomK n) → x +[ n ]ₖ (0ₖ n) ≡ x -rUnitₖ 0 x = Iso.leftInv (Iso-Kn-ΩKn+1 zero) x -rUnitₖ (suc zero) = trElim (λ _ → isOfHLevelPath 3 (isOfHLevelTrunc 3) _ _) λ x → Iso.leftInv (Iso-Kn-ΩKn+1 1) ∣ x ∣ +rUnitₖ 0 x = Iso.ret (Iso-Kn-ΩKn+1 zero) x +rUnitₖ (suc zero) = trElim (λ _ → isOfHLevelPath 3 (isOfHLevelTrunc 3) _ _) λ x → Iso.ret (Iso-Kn-ΩKn+1 1) ∣ x ∣ rUnitₖ (suc (suc n)) x = (λ i → ΩKn+1→Kn (2 + n) (Kn→ΩKn+1 (2 + n) x ∙ Kn→ΩKn+10ₖ (2 + n) i)) ∙∙ (cong (ΩKn+1→Kn (2 + n)) (sym (rUnit (Kn→ΩKn+1 (2 + n) x)))) - ∙∙ Iso.leftInv (Iso-Kn-ΩKn+1 (2 + n)) x + ∙∙ Iso.ret (Iso-Kn-ΩKn+1 (2 + n)) x rCancelₖ : (n : ℕ) (x : coHomK n) → x +[ n ]ₖ (-[ n ]ₖ x) ≡ (0ₖ n) -rCancelₖ zero x = (λ i → ΩKn+1→Kn 0 (Kn→ΩKn+1 zero x ∙ Iso.rightInv (Iso-Kn-ΩKn+1 zero) (sym (Kn→ΩKn+1 zero x)) i)) ∙ +rCancelₖ zero x = (λ i → ΩKn+1→Kn 0 (Kn→ΩKn+1 zero x ∙ Iso.sec (Iso-Kn-ΩKn+1 zero) (sym (Kn→ΩKn+1 zero x)) i)) ∙ cong (ΩKn+1→Kn 0) (rCancel (Kn→ΩKn+1 zero x)) -rCancelₖ (suc n) x = (λ i → ΩKn+1→Kn (suc n) (Kn→ΩKn+1 (1 + n) x ∙ Iso.rightInv (Iso-Kn-ΩKn+1 (1 + n)) (sym (Kn→ΩKn+1 (1 + n) x)) i)) ∙ +rCancelₖ (suc n) x = (λ i → ΩKn+1→Kn (suc n) (Kn→ΩKn+1 (1 + n) x ∙ Iso.sec (Iso-Kn-ΩKn+1 (1 + n)) (sym (Kn→ΩKn+1 (1 + n) x)) i)) ∙ cong (ΩKn+1→Kn (suc n)) (rCancel (Kn→ΩKn+1 (1 + n) x)) ∙ (λ i → ΩKn+1→Kn (suc n) (Kn→ΩKn+10ₖ (suc n) (~ i))) ∙ - Iso.leftInv (Iso-Kn-ΩKn+1 (suc n)) (0ₖ (suc n)) + Iso.ret (Iso-Kn-ΩKn+1 (suc n)) (0ₖ (suc n)) lCancelₖ : (n : ℕ) (x : coHomK n) → (-[ n ]ₖ x) +[ n ]ₖ x ≡ (0ₖ n) -lCancelₖ 0 x = (λ i → ΩKn+1→Kn 0 (Iso.rightInv (Iso-Kn-ΩKn+1 zero) (sym (Kn→ΩKn+1 zero x)) i ∙ Kn→ΩKn+1 zero x)) ∙ +lCancelₖ 0 x = (λ i → ΩKn+1→Kn 0 (Iso.sec (Iso-Kn-ΩKn+1 zero) (sym (Kn→ΩKn+1 zero x)) i ∙ Kn→ΩKn+1 zero x)) ∙ cong (ΩKn+1→Kn 0) (lCancel (Kn→ΩKn+1 zero x)) -lCancelₖ (suc n) x = (λ i → ΩKn+1→Kn (suc n) (Iso.rightInv (Iso-Kn-ΩKn+1 (1 + n)) (sym (Kn→ΩKn+1 (1 + n) x)) i ∙ Kn→ΩKn+1 (1 + n) x)) ∙ +lCancelₖ (suc n) x = (λ i → ΩKn+1→Kn (suc n) (Iso.sec (Iso-Kn-ΩKn+1 (1 + n)) (sym (Kn→ΩKn+1 (1 + n) x)) i ∙ Kn→ΩKn+1 (1 + n) x)) ∙ cong (ΩKn+1→Kn (suc n)) (lCancel (Kn→ΩKn+1 (1 + n) x)) ∙ (λ i → (ΩKn+1→Kn (suc n)) (Kn→ΩKn+10ₖ (suc n) (~ i))) ∙ - Iso.leftInv (Iso-Kn-ΩKn+1 (suc n)) (0ₖ (suc n)) + Iso.ret (Iso-Kn-ΩKn+1 (suc n)) (0ₖ (suc n)) assocₖ : (n : ℕ) (x y z : coHomK n) → ((x +[ n ]ₖ y) +[ n ]ₖ z) ≡ (x +[ n ]ₖ (y +[ n ]ₖ z)) assocₖ n x y z = ((λ i → ΩKn+1→Kn n (Kn→ΩKn+1 n (ΩKn+1→Kn n (Kn→ΩKn+1 n x ∙ Kn→ΩKn+1 n y)) ∙ Kn→ΩKn+1 n z)) ∙∙ - (λ i → ΩKn+1→Kn n (Iso.rightInv (Iso-Kn-ΩKn+1 n) (Kn→ΩKn+1 n x ∙ Kn→ΩKn+1 n y) i ∙ Kn→ΩKn+1 n z)) ∙∙ + (λ i → ΩKn+1→Kn n (Iso.sec (Iso-Kn-ΩKn+1 n) (Kn→ΩKn+1 n x ∙ Kn→ΩKn+1 n y) i ∙ Kn→ΩKn+1 n z)) ∙∙ (λ i → ΩKn+1→Kn n (assoc (Kn→ΩKn+1 n x) (Kn→ΩKn+1 n y) (Kn→ΩKn+1 n z) (~ i)))) ∙ - (λ i → ΩKn+1→Kn n ((Kn→ΩKn+1 n x) ∙ Iso.rightInv (Iso-Kn-ΩKn+1 n) ((Kn→ΩKn+1 n y ∙ Kn→ΩKn+1 n z)) (~ i))) + (λ i → ΩKn+1→Kn n ((Kn→ΩKn+1 n x) ∙ Iso.sec (Iso-Kn-ΩKn+1 n) ((Kn→ΩKn+1 n y ∙ Kn→ΩKn+1 n z)) (~ i))) cancelₖ : (n : ℕ) (x : coHomK n) → x -[ n ]ₖ x ≡ (0ₖ n) cancelₖ zero x = cong (ΩKn+1→Kn 0) (rCancel (Kn→ΩKn+1 zero x)) @@ -265,7 +265,7 @@ cancelₖ (suc (suc (suc (suc (suc n))))) x = cong (ΩKn+1→Kn (5 + n)) (rCance -rUnitₖ zero x = rUnitₖ zero x -rUnitₖ (suc n) x = cong (λ y → ΩKn+1→Kn (suc n) (Kn→ΩKn+1 (suc n) x ∙ sym y)) (Kn→ΩKn+10ₖ (suc n)) ∙∙ cong (ΩKn+1→Kn (suc n)) (sym (rUnit (Kn→ΩKn+1 (suc n) x))) - ∙∙ Iso.leftInv (Iso-Kn-ΩKn+1 (suc n)) x + ∙∙ Iso.ret (Iso-Kn-ΩKn+1 (suc n)) x open Iso renaming (inv to inv') abstract @@ -300,9 +300,9 @@ rUnitₖ' n x = commₖ n x (0ₖ n) ∙ lUnitₖ n x -distrₖ : (n : ℕ) (x y : coHomK n) → -[ n ]ₖ (x +[ n ]ₖ y) ≡ (-[ n ]ₖ x) +[ n ]ₖ (-[ n ]ₖ y) -distrₖ n x y = ((λ i → ΩKn+1→Kn n (sym (Kn→ΩKn+1 n (ΩKn+1→Kn n (Kn→ΩKn+1 n x ∙ Kn→ΩKn+1 n y))))) ∙∙ - (λ i → ΩKn+1→Kn n (sym (Iso.rightInv (Iso-Kn-ΩKn+1 n) (Kn→ΩKn+1 n x ∙ Kn→ΩKn+1 n y) i))) ∙∙ + (λ i → ΩKn+1→Kn n (sym (Iso.sec (Iso-Kn-ΩKn+1 n) (Kn→ΩKn+1 n x ∙ Kn→ΩKn+1 n y) i))) ∙∙ (λ i → ΩKn+1→Kn n (symDistr (Kn→ΩKn+1 n x) (Kn→ΩKn+1 n y) i))) ∙∙ - (λ i → ΩKn+1→Kn n (Iso.rightInv (Iso-Kn-ΩKn+1 n) (sym (Kn→ΩKn+1 n y)) (~ i) ∙ (Iso.rightInv (Iso-Kn-ΩKn+1 n) (sym (Kn→ΩKn+1 n x)) (~ i)))) ∙∙ + (λ i → ΩKn+1→Kn n (Iso.sec (Iso-Kn-ΩKn+1 n) (sym (Kn→ΩKn+1 n y)) (~ i) ∙ (Iso.sec (Iso-Kn-ΩKn+1 n) (sym (Kn→ΩKn+1 n x)) (~ i)))) ∙∙ commₖ n (-[ n ]ₖ y) (-[ n ]ₖ x) private @@ -320,17 +320,17 @@ private ∙∙ sym (assoc _ _ _) ∙∙ cong (Kn→ΩKn+1 n y ∙_) (rCancel _))) ∙∙ rCancelLem n y - ∙∙ Iso.leftInv (Iso-Kn-ΩKn+1 n) y + ∙∙ Iso.ret (Iso-Kn-ΩKn+1 n) y -cancelLₖ : (n : ℕ) (x y : coHomK n) → (x +[ n ]ₖ y) -[ n ]ₖ x ≡ y -cancelLₖ n x y = cong (λ z → z -[ n ]ₖ x) (commₖ n x y) ∙ -cancelRₖ n x y -+cancelₖ : (n : ℕ) (x y : coHomK n) → (x -[ n ]ₖ y) +[ n ]ₖ y ≡ x --+cancelₖ n x y = (cong (ΩKn+1→Kn n) ((cong (_∙ (Kn→ΩKn+1 n y)) (Iso.rightInv (Iso-Kn-ΩKn+1 n) (Kn→ΩKn+1 n x ∙ sym (Kn→ΩKn+1 n y)))) +-+cancelₖ n x y = (cong (ΩKn+1→Kn n) ((cong (_∙ (Kn→ΩKn+1 n y)) (Iso.sec (Iso-Kn-ΩKn+1 n) (Kn→ΩKn+1 n x ∙ sym (Kn→ΩKn+1 n y)))) ∙∙ sym (assoc _ _ _) ∙∙ cong (Kn→ΩKn+1 n x ∙_) (lCancel _))) ∙∙ rCancelLem n x - ∙∙ Iso.leftInv (Iso-Kn-ΩKn+1 n) x + ∙∙ Iso.ret (Iso-Kn-ΩKn+1 n) x ---- Group structure of cohomology groups --- @@ -388,7 +388,7 @@ cancelₕ n = sElim (λ _ → isOfHLevelPath 1 (§ _ _)) λ a i → ∣ funExt (λ x → cancelₖ n (a x)) i ∣₂ -ₖ-ₖ : (n : ℕ) (x : coHomK n) → (-[ n ]ₖ (-[ n ]ₖ x)) ≡ x --ₖ-ₖ n x = cong ((ΩKn+1→Kn n) ∘ sym) (Iso.rightInv (Iso-Kn-ΩKn+1 n) (sym (Kn→ΩKn+1 n x))) ∙ Iso.leftInv (Iso-Kn-ΩKn+1 n) x +-ₖ-ₖ n x = cong ((ΩKn+1→Kn n) ∘ sym) (Iso.sec (Iso-Kn-ΩKn+1 n) (sym (Kn→ΩKn+1 n x))) ∙ Iso.ret (Iso-Kn-ΩKn+1 n) x -- Proof that rUnitₖ and lUnitₖ agree on 0ₖ. Needed for Mayer-Vietoris. private @@ -396,23 +396,23 @@ private (0A : A) (0fun : fun e 0A ≡ refl) → Path (inv' e (fun e 0A ∙ fun e 0A) ≡ 0A) - (cong (inv' e) (cong (_∙ fun e 0A) 0fun) ∙∙ cong (inv' e) (sym (lUnit (fun e 0A))) ∙∙ Iso.leftInv e 0A) - (cong (inv' e) (cong (fun e 0A ∙_) 0fun) ∙∙ cong (inv' e) (sym (rUnit (fun e 0A))) ∙∙ Iso.leftInv e 0A) + (cong (inv' e) (cong (_∙ fun e 0A) 0fun) ∙∙ cong (inv' e) (sym (lUnit (fun e 0A))) ∙∙ Iso.ret e 0A) + (cong (inv' e) (cong (fun e 0A ∙_) 0fun) ∙∙ cong (inv' e) (sym (rUnit (fun e 0A))) ∙∙ Iso.ret e 0A) rUnitlUnitGen e 0A 0fun = - (λ i → cong (inv' e) (cong (_∙ fun e 0A) 0fun) ∙∙ rUnit (cong (inv' e) (sym (lUnit (fun e 0A)))) i ∙∙ Iso.leftInv e 0A) + (λ i → cong (inv' e) (cong (_∙ fun e 0A) 0fun) ∙∙ rUnit (cong (inv' e) (sym (lUnit (fun e 0A)))) i ∙∙ Iso.ret e 0A) ∙ ((λ i → (λ j → inv' e (0fun (~ i ∧ j) ∙ 0fun (j ∧ i))) ∙∙ ((λ j → inv' e (0fun (~ i ∨ j) ∙ 0fun i)) ∙∙ cong (inv' e) (sym (lUnit (0fun i))) ∙∙ λ j → inv' e (0fun (i ∧ (~ j)))) - ∙∙ Iso.leftInv e 0A) + ∙∙ Iso.ret e 0A) ∙∙ (λ i → (λ j → inv' e (fun e 0A ∙ 0fun j)) ∙∙ (λ j → inv' e (0fun (j ∧ ~ i) ∙ refl)) ∙∙ cong (inv' e) (sym (rUnit (0fun (~ i)))) ∙∙ (λ j → inv' e (0fun (~ i ∧ ~ j))) - ∙∙ Iso.leftInv e 0A) + ∙∙ Iso.ret e 0A) ∙∙ λ i → cong (inv' e) (cong (fun e 0A ∙_) 0fun) ∙∙ rUnit (cong (inv' e) (sym (rUnit (fun e 0A)))) (~ i) - ∙∙ Iso.leftInv e 0A) + ∙∙ Iso.ret e 0A) rUnitlUnit0 : (n : ℕ) → rUnitₖ n (0ₖ n) ≡ lUnitₖ n (0ₖ n) rUnitlUnit0 0 = refl @@ -480,8 +480,8 @@ coHomFun n f = sRec § λ β → ∣ β ∘ f ∣₂ addIso : (n : ℕ) (x : coHomK n) → Iso (coHomK n) (coHomK n) fun (addIso n x) y = y +[ n ]ₖ x inv' (addIso n x) y = y -[ n ]ₖ x -rightInv (addIso n x) y = -+cancelₖ n y x -leftInv (addIso n x) y = -cancelRₖ n x y +sec (addIso n x) y = -+cancelₖ n y x +ret (addIso n x) y = -cancelRₖ n x y isCommΩK-based : (n : ℕ) (x : coHomK n) → isComm∙ (coHomK n , x) isCommΩK-based zero x p q = isSetℤ _ _ (p ∙ q) (q ∙ p) @@ -497,7 +497,7 @@ isCommΩK-based (suc (suc n)) x = addLemma : (a b : ℤ) → a +[ 0 ]ₖ b ≡ (a ℤ+ b) addLemma a b = (cong (ΩKn+1→Kn 0) (sym (congFunct ∣_∣ (intLoop a) (intLoop b)))) ∙∙ (λ i → ΩKn+1→Kn 0 (cong ∣_∣ (intLoop-hom a b i))) - ∙∙ Iso.leftInv (Iso-Kn-ΩKn+1 0) (a ℤ+ b) + ∙∙ Iso.ret (Iso-Kn-ΩKn+1 0) (a ℤ+ b) --- -- hidden versions of cohom stuff using the "lock" hack. The locked versions can be used when proving things. diff --git a/Cubical/Foundations/Equiv.agda b/Cubical/Foundations/Equiv.agda index 0c78a79647..8ef857cf86 100644 --- a/Cubical/Foundations/Equiv.agda +++ b/Cubical/Foundations/Equiv.agda @@ -112,8 +112,8 @@ open Iso equivToIso : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} → A ≃ B → Iso A B fun (equivToIso e) = e .fst inv (equivToIso e) = invEq e -rightInv (equivToIso e) = secEq e -leftInv (equivToIso e) = retEq e +sec (equivToIso e) = secEq e +ret (equivToIso e) = retEq e -- TODO: there should be a direct proof of this that doesn't use equivToIso invEquiv : A ≃ B → B ≃ A @@ -205,8 +205,8 @@ isEquivPropBiimpl→Equiv {A = A} {B = B} Aprop Bprop = isoToEquiv isom where isom : Iso (Σ (A → B) (λ _ → B → A)) (A ≃ B) isom .fun (f , g) = propBiimpl→Equiv Aprop Bprop f g isom .inv e = equivFun e , invEq e - isom .rightInv e = equivEq refl - isom .leftInv _ = refl + isom .sec e = equivEq refl + isom .ret _ = refl equivΠCod : ∀ {F : A → Type ℓ} {G : A → Type ℓ'} → ((x : A) → F x ≃ G x) → ((x : A) → F x) ≃ ((x : A) → G x) @@ -231,8 +231,8 @@ equivImplicitΠCod k .snd .equiv-proof f .snd (g , p) i .snd j {x} = equiv→Iso : (A ≃ B) → (C ≃ D) → Iso (A → C) (B → D) equiv→Iso h k .Iso.fun f b = equivFun k (f (invEq h b)) equiv→Iso h k .Iso.inv g a = invEq k (g (equivFun h a)) -equiv→Iso h k .Iso.rightInv g = funExt λ b → secEq k _ ∙ cong g (secEq h b) -equiv→Iso h k .Iso.leftInv f = funExt λ a → retEq k _ ∙ cong f (retEq h a) +equiv→Iso h k .Iso.sec g = funExt λ b → secEq k _ ∙ cong g (secEq h b) +equiv→Iso h k .Iso.ret f = funExt λ a → retEq k _ ∙ cong f (retEq h a) equiv→ : (A ≃ B) → (C ≃ D) → (A → C) ≃ (B → D) equiv→ h k = isoToEquiv (equiv→Iso h k) @@ -252,12 +252,12 @@ equivΠ' {B' = B'} eA eB = isoToEquiv isom eB (secEq eA a') .fst (f (invEq eA a')) isom .inv f' a = invEq (eB refl) (f' (eA .fst a)) - isom .rightInv f' = + isom .sec f' = funExt λ a' → J (λ a'' p → eB p .fst (invEq (eB refl) (f' (p i0))) ≡ f' a'') (secEq (eB refl) (f' (eA .fst (invEq eA a')))) (secEq eA a') - isom .leftInv f = + isom .ret f = funExt λ a → subst (λ p → invEq (eB refl) (eB p .fst (f (invEq eA (eA .fst a)))) ≡ f a) @@ -277,8 +277,8 @@ equivΠ {B = B} {B' = B'} eA eB = equivΠ' eA (λ {a = a} p → J (λ a' p → B equivCompIso : (A ≃ B) → (C ≃ D) → Iso (A ≃ C) (B ≃ D) equivCompIso h k .Iso.fun f = compEquiv (compEquiv (invEquiv h) f) k equivCompIso h k .Iso.inv g = compEquiv (compEquiv h g) (invEquiv k) -equivCompIso h k .Iso.rightInv g = equivEq (equiv→Iso h k .Iso.rightInv (equivFun g)) -equivCompIso h k .Iso.leftInv f = equivEq (equiv→Iso h k .Iso.leftInv (equivFun f)) +equivCompIso h k .Iso.sec g = equivEq (equiv→Iso h k .Iso.sec (equivFun g)) +equivCompIso h k .Iso.ret f = equivEq (equiv→Iso h k .Iso.ret (equivFun f)) equivComp : (A ≃ B) → (C ≃ D) → (A ≃ C) ≃ (B ≃ D) equivComp h k = isoToEquiv (equivCompIso h k) @@ -315,8 +315,8 @@ precomposesToId→Equiv f g id iseqg = subst isEquiv (sym f-≡-g⁻) (snd (inv isEquiv-isEquiv'-Iso : (f : A → B) → Iso (isEquiv f) (isEquiv' f) isEquiv-isEquiv'-Iso f .fun p = p .equiv-proof isEquiv-isEquiv'-Iso f .inv q .equiv-proof = q -isEquiv-isEquiv'-Iso f .rightInv q = refl -isEquiv-isEquiv'-Iso f .leftInv p i .equiv-proof = p .equiv-proof +isEquiv-isEquiv'-Iso f .sec q = refl +isEquiv-isEquiv'-Iso f .ret p i .equiv-proof = p .equiv-proof isEquiv≃isEquiv' : (f : A → B) → isEquiv f ≃ isEquiv' f isEquiv≃isEquiv' f = isoToEquiv (isEquiv-isEquiv'-Iso f) diff --git a/Cubical/Foundations/Equiv/BiInvertible.agda b/Cubical/Foundations/Equiv/BiInvertible.agda index 6055c9457a..5e8efddcf5 100644 --- a/Cubical/Foundations/Equiv/BiInvertible.agda +++ b/Cubical/Foundations/Equiv/BiInvertible.agda @@ -63,20 +63,20 @@ module _ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} (e : BiInvEquiv A B) where biInvEquiv→Iso-right : Iso A B Iso.fun biInvEquiv→Iso-right = fun Iso.inv biInvEquiv→Iso-right = invr - Iso.rightInv biInvEquiv→Iso-right = invr-rightInv - Iso.leftInv biInvEquiv→Iso-right = invr-leftInv + Iso.sec biInvEquiv→Iso-right = invr-rightInv + Iso.ret biInvEquiv→Iso-right = invr-leftInv biInvEquiv→Iso-left : Iso A B Iso.fun biInvEquiv→Iso-left = fun Iso.inv biInvEquiv→Iso-left = invl - Iso.rightInv biInvEquiv→Iso-left = invl-rightInv - Iso.leftInv biInvEquiv→Iso-left = invl-leftInv + Iso.sec biInvEquiv→Iso-left = invl-rightInv + Iso.ret biInvEquiv→Iso-left = invl-leftInv biInvEquiv→Equiv-right biInvEquiv→Equiv-left : A ≃ B biInvEquiv→Equiv-right = fun , isoToIsEquiv biInvEquiv→Iso-right biInvEquiv→Equiv-left = fun , isoToIsEquiv biInvEquiv→Iso-left - -- since Iso.rightInv ends up getting modified during iso→HAEquiv, in some sense biInvEquiv→Iso-left + -- since Iso.sec ends up getting modified during iso→HAEquiv, in some sense biInvEquiv→Iso-left -- is the most natural choice for forming a HAEquiv from a BiInvEquiv biInvEquiv→HAEquiv : HAEquiv A B biInvEquiv→HAEquiv = iso→HAEquiv biInvEquiv→Iso-left @@ -88,9 +88,9 @@ module _ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} (i : Iso A B) where iso→BiInvEquiv : BiInvEquiv A B BiInvEquiv.fun iso→BiInvEquiv = fun BiInvEquiv.invr iso→BiInvEquiv = inv - BiInvEquiv.invr-rightInv iso→BiInvEquiv = rightInv + BiInvEquiv.invr-rightInv iso→BiInvEquiv = sec BiInvEquiv.invl iso→BiInvEquiv = inv - BiInvEquiv.invl-leftInv iso→BiInvEquiv = leftInv + BiInvEquiv.invl-leftInv iso→BiInvEquiv = ret -- composition of bi-invertible maps diff --git a/Cubical/Foundations/Equiv/Dependent.agda b/Cubical/Foundations/Equiv/Dependent.agda index 21efe1c632..ec0a40afbb 100644 --- a/Cubical/Foundations/Equiv/Dependent.agda +++ b/Cubical/Foundations/Equiv/Dependent.agda @@ -91,8 +91,8 @@ record IsoOver {ℓ ℓ'} {A : Type ℓ}{B : Type ℓ'} field fun : mapOver (isom .fun) P Q inv : mapOver (isom .inv) Q P - rightInv : sectionOver (isom .rightInv) fun inv - leftInv : retractOver (isom .leftInv ) fun inv + rightInv : sectionOver (isom .sec) fun inv + leftInv : retractOver (isom .ret) fun inv record isIsoOver {ℓ ℓ'} {A : Type ℓ}{B : Type ℓ'} (isom : Iso A B)(P : A → Type ℓ'')(Q : B → Type ℓ''') @@ -102,8 +102,8 @@ record isIsoOver {ℓ ℓ'} {A : Type ℓ}{B : Type ℓ'} constructor isisoover field inv : mapOver (isom .inv) Q P - rightInv : sectionOver (isom .rightInv) fun inv - leftInv : retractOver (isom .leftInv ) fun inv + rightInv : sectionOver (isom .sec) fun inv + leftInv : retractOver (isom .ret) fun inv open IsoOver open isIsoOver @@ -147,14 +147,14 @@ compIsoOver {A = A} {B} {C} {P} {Q} {R} {isom₁} {isom₂} isoover₁ isoover w .inv _ = isoover₁ .inv _ ∘ isoover₂ .inv _ w .rightInv b q i = comp - (λ j → R (compPath-filler (cong (isom₂ .fun) (isom₁ .rightInv _)) (isom₂ .rightInv b) j i)) + (λ j → R (compPath-filler (cong (isom₂ .fun) (isom₁ .sec _)) (isom₂ .sec b) j i)) (λ j → λ { (i = i0) → w .fun _ (w .inv _ q) ; (i = i1) → isoover₂ .rightInv _ q j }) (isoover₂ .fun _ (isoover₁ .rightInv _ (isoover₂ .inv _ q) i)) w .leftInv a p i = comp - (λ j → P (compPath-filler (cong (isom₁ .inv) (isom₂ .leftInv _)) (isom₁ .leftInv a) j i)) + (λ j → P (compPath-filler (cong (isom₁ .inv) (isom₂ .ret _)) (isom₁ .ret a) j i)) (λ j → λ { (i = i0) → w .inv _ (w .fun _ p) ; (i = i1) → isoover₁ .leftInv _ p j }) @@ -171,8 +171,8 @@ fiberIso→IsoOver : → IsoOver idIso P Q fiberIso→IsoOver isom .fun a = isom a .fun fiberIso→IsoOver isom .inv b = isom b .inv -fiberIso→IsoOver isom .rightInv b = isom b .rightInv -fiberIso→IsoOver isom .leftInv a = isom a .leftInv +fiberIso→IsoOver isom .rightInv b = isom b .sec +fiberIso→IsoOver isom .leftInv a = isom a .ret -- Only half-adjoint equivalence can be lifted. -- This is another clue that HAE is more natural than isomorphism. @@ -192,8 +192,8 @@ pullbackIsoOver {A = A} {B} {P} f hae = w w : IsoOver _ _ _ w .fun a = idfun _ - w .inv b = subst P (sym (isom .rightInv b)) - w .rightInv b p i = subst-filler P (sym (isom .rightInv b)) p (~ i) + w .inv b = subst P (sym (isom .sec b)) + w .rightInv b p i = subst-filler P (sym (isom .sec b)) p (~ i) w .leftInv a p i = comp (λ j → P (hae .com a (~ j) i)) @@ -250,9 +250,9 @@ isoToEquivOver {A = A} {P} {Q = Q} f hae isom' a = isoToEquiv (fibiso a) .snd fibiso : (a : A) → Iso (P a) (Q (f a)) fibiso a .fun = isom' .fun a - fibiso a .inv x = transport (λ i → P (isom .leftInv a i)) (isom' .inv (f a) x) - fibiso a .leftInv x = fromPathP (isom' .leftInv _ _) - fibiso a .rightInv x = + fibiso a .inv x = transport (λ i → P (isom .ret a i)) (isom' .inv (f a) x) + fibiso a .ret x = fromPathP (isom' .leftInv _ _) + fibiso a .sec x = sym (substCommSlice _ _ (isom' .fun) _ _) ∙ cong (λ p → subst Q p (isom' .fun _ (isom' .inv _ x))) (hae .com a) ∙ fromPathP (isom' .rightInv _ _) @@ -299,8 +299,8 @@ IsoOver→HAEquivOver {A = A} {P = P} {Q = Q} {isom = isom} isom' = w where f = isom .fun g = isom .inv - ε = isom .rightInv - η = isom .leftInv + ε = isom .sec + η = isom .ret f' = isom' .fun g' = isom' .inv diff --git a/Cubical/Foundations/Equiv/Fiberwise.agda b/Cubical/Foundations/Equiv/Fiberwise.agda index f48596b7dc..df6b714f33 100644 --- a/Cubical/Foundations/Equiv/Fiberwise.agda +++ b/Cubical/Foundations/Equiv/Fiberwise.agda @@ -36,12 +36,12 @@ module _ {A : Type ℓ} (P : A → Type ℓ') (Q : A → Type ℓ'') -- Thm 4.7.7 (fiberwise equivalences) fiberEquiv : ([tf] : isEquiv total) → ∀ x → isEquiv (f x) - fiberEquiv [tf] x .equiv-proof y = isContrRetract (fibers-total .Iso.inv) (fibers-total .Iso.fun) (fibers-total .Iso.rightInv) + fiberEquiv [tf] x .equiv-proof y = isContrRetract (fibers-total .Iso.inv) (fibers-total .Iso.fun) (fibers-total .Iso.sec) ([tf] .equiv-proof (x , y)) totalEquiv : (fx-equiv : ∀ x → isEquiv (f x)) → isEquiv total - totalEquiv fx-equiv .equiv-proof (x , v) = isContrRetract (fibers-total .Iso.fun) (fibers-total .Iso.inv) (fibers-total .Iso.leftInv) + totalEquiv fx-equiv .equiv-proof (x , v) = isContrRetract (fibers-total .Iso.fun) (fibers-total .Iso.inv) (fibers-total .Iso.ret) (fx-equiv x .equiv-proof v) diff --git a/Cubical/Foundations/Equiv/HalfAdjoint.agda b/Cubical/Foundations/Equiv/HalfAdjoint.agda index fd6f4a8f58..a6315a8159 100644 --- a/Cubical/Foundations/Equiv/HalfAdjoint.agda +++ b/Cubical/Foundations/Equiv/HalfAdjoint.agda @@ -40,8 +40,8 @@ record isHAEquiv {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} (f : A → B) : Type isHAEquiv→Iso : Iso A B Iso.fun isHAEquiv→Iso = f Iso.inv isHAEquiv→Iso = g - Iso.rightInv isHAEquiv→Iso = rinv - Iso.leftInv isHAEquiv→Iso = linv + Iso.sec isHAEquiv→Iso = rinv + Iso.ret isHAEquiv→Iso = linv isHAEquiv→isEquiv : isEquiv f isHAEquiv→isEquiv .equiv-proof y = (g y , rinv y) , isCenter where @@ -71,8 +71,8 @@ iso→HAEquiv e = f , isHAEquivf where f = Iso.fun e g = Iso.inv e - ε = Iso.rightInv e - η = Iso.leftInv e + ε = Iso.sec e + η = Iso.ret e Hfa≡fHa : (f : A → A) → (H : ∀ a → f a ≡ a) → ∀ a → H (f a) ≡ cong f (H a) Hfa≡fHa f H = J (λ f p → ∀ a → funExt⁻ (sym p) (f a) ≡ cong f (funExt⁻ (sym p) a)) @@ -108,18 +108,18 @@ congIso {x = x} {y} e = goal goal : Iso (x ≡ y) (Iso.fun e x ≡ Iso.fun e y) fun goal = cong (iso→HAEquiv e .fst) inv goal p = sym (linv x) ∙∙ cong g p ∙∙ linv y - rightInv goal p i j = + sec goal p i j = hcomp (λ k → λ { (i = i0) → iso→HAEquiv e .fst (doubleCompPath-filler (sym (linv x)) (cong g p) (linv y) k j) ; (i = i1) → rinv (p j) k ; (j = i0) → com x i k ; (j = i1) → com y i k }) (iso→HAEquiv e .fst (g (p j))) - leftInv goal p i j = + ret goal p i j = hcomp (λ k → λ { (i = i1) → p j - ; (j = i0) → Iso.leftInv e x (i ∨ k) - ; (j = i1) → Iso.leftInv e y (i ∨ k) }) - (Iso.leftInv e (p j) i) + ; (j = i0) → Iso.ret e x (i ∨ k) + ; (j = i1) → Iso.ret e y (i ∨ k) }) + (Iso.ret e (p j) i) invCongFunct : {x : A} (e : Iso A B) (p : Iso.fun e x ≡ Iso.fun e x) (q : Iso.fun e x ≡ Iso.fun e x) → Iso.inv (congIso e) (p ∙ q) ≡ Iso.inv (congIso e) p ∙ Iso.inv (congIso e) q @@ -134,4 +134,4 @@ invCongFunct {x = x} e p q = helper (Iso.inv e) _ _ _ ∙ λ i → rUnit (cong f p) i ∙ rUnit (cong f q) i invCongRefl : {x : A} (e : Iso A B) → Iso.inv (congIso {x = x} {y = x} e) refl ≡ refl -invCongRefl {x = x} e = (λ i → (λ j → Iso.leftInv e x (i ∨ ~ j)) ∙∙ refl ∙∙ (λ j → Iso.leftInv e x (i ∨ j))) ∙ sym (rUnit refl) +invCongRefl {x = x} e = (λ i → (λ j → Iso.ret e x (i ∨ ~ j)) ∙∙ refl ∙∙ (λ j → Iso.ret e x (i ∨ j))) ∙ sym (rUnit refl) diff --git a/Cubical/Foundations/Equiv/PathSplit.agda b/Cubical/Foundations/Equiv/PathSplit.agda index 8dbc0a2dda..32b82db65f 100644 --- a/Cubical/Foundations/Equiv/PathSplit.agda +++ b/Cubical/Foundations/Equiv/PathSplit.agda @@ -48,8 +48,8 @@ module _ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} where toIso : (f : A → B) → isPathSplitEquiv f → Iso A B fun (toIso f _) = f inv (toIso _ p) = p .sec .fst - rightInv (toIso _ p) = p .sec .snd - leftInv (toIso f p) x = p .secCong (p .sec .fst (f x)) x .fst (p .sec .snd (f x)) + sec (toIso _ p) = p .sec .snd + ret (toIso f p) x = p .secCong (p .sec .fst (f x)) x .fst (p .sec .snd (f x)) toIsEquiv : (f : A → B) → isPathSplitEquiv f → isEquiv f toIsEquiv f p = isoToIsEquiv (toIso f p) diff --git a/Cubical/Foundations/Equiv/Properties.agda b/Cubical/Foundations/Equiv/Properties.agda index e5a9181106..e67010a3fe 100644 --- a/Cubical/Foundations/Equiv/Properties.agda +++ b/Cubical/Foundations/Equiv/Properties.agda @@ -35,8 +35,8 @@ isEquivInvEquiv = isoToIsEquiv goal where goal : Iso (A ≃ B) (B ≃ A) goal .fun = invEquiv goal .inv = invEquiv - goal .rightInv g = equivEq refl - goal .leftInv f = equivEq refl + goal .sec g = equivEq refl + goal .ret f = equivEq refl invEquivEquiv : (A ≃ B) ≃ (B ≃ A) invEquivEquiv = _ , isEquivInvEquiv @@ -263,10 +263,10 @@ module _ {ℓ ℓ' ℓ''} {A : Type ℓ} {A' : Type ℓ'} {C : A → Type ℓ''} domIsoDep : Iso ((a : A) → C a) ((a : A') → C (Iso.fun is a)) Iso.fun domIsoDep f x = f (Iso.fun is x) Iso.inv domIsoDep f x = subst C (isHAEquiv.rinv is* x) (f (Iso.inv is x)) - Iso.rightInv domIsoDep f = + Iso.sec domIsoDep f = funExt λ x → (λ j → subst C (isHAEquiv.com is* x (~ j)) (f (Iso.inv is (Iso.fun is x)))) ∙ λ j → transp (λ i → C (Iso.fun is (isHAEquiv.linv is* x (i ∨ j)))) j (f (isHAEquiv.linv is* x j)) - Iso.leftInv domIsoDep f j x = + Iso.ret domIsoDep f j x = transp (λ i → C (isHAEquiv.rinv is* x (i ∨ j))) j (f (isHAEquiv.rinv is* x j)) diff --git a/Cubical/Foundations/HLevels.agda b/Cubical/Foundations/HLevels.agda index ab77a66d6b..85894ab7f6 100644 --- a/Cubical/Foundations/HLevels.agda +++ b/Cubical/Foundations/HLevels.agda @@ -256,7 +256,7 @@ isOfHLevelRetract (suc (suc (suc (suc (suc n))))) f g h ofLevel x y p q P Q R S (cong (cong (cong f)) R) (cong (cong (cong f)) S)) isOfHLevelRetractFromIso : {A : Type ℓ} {B : Type ℓ'} (n : HLevel) → Iso A B → isOfHLevel n B → isOfHLevel n A -isOfHLevelRetractFromIso n e hlev = isOfHLevelRetract n (Iso.fun e) (Iso.inv e) (Iso.leftInv e) hlev +isOfHLevelRetractFromIso n e hlev = isOfHLevelRetract n (Iso.fun e) (Iso.inv e) (Iso.ret e) hlev isOfHLevelRespectEquiv : {A : Type ℓ} {B : Type ℓ'} → (n : HLevel) → A ≃ B → isOfHLevel n A → isOfHLevel n B isOfHLevelRespectEquiv n eq = isOfHLevelRetract n (invEq eq) (eq .fst) (secEq eq) @@ -755,19 +755,19 @@ module _ (isSet-A : isSet A) (isSet-A' : isSet A') where s-p : ∀ b → _ s-p b = isSet→SquareP (λ i j → isProp→isSet (isSet-A' _ _)) - refl refl (λ i₁ → (Iso.rightInv (p₀ i₁) b)) (λ i₁ → (Iso.rightInv (p₁ i₁) b)) + refl refl (λ i₁ → (Iso.sec (p₀ i₁) b)) (λ i₁ → (Iso.sec (p₁ i₁) b)) r-p : ∀ a → _ r-p a = isSet→SquareP (λ i j → isProp→isSet (isSet-A _ _)) - refl refl (λ i₁ → (Iso.leftInv (p₀ i₁) a)) (λ i₁ → (Iso.leftInv (p₁ i₁) a)) + refl refl (λ i₁ → (Iso.ret (p₀ i₁) a)) (λ i₁ → (Iso.ret (p₁ i₁) a)) h : p₀ ≡ p₁ Iso.fun (h i i₁) = fst (f-p i₁ i) Iso.inv (h i i₁) = snd (f-p i₁ i) - Iso.rightInv (h i i₁) b = s-p b i₁ i - Iso.leftInv (h i i₁) a = r-p a i₁ i + Iso.sec (h i i₁) b = s-p b i₁ i + Iso.ret (h i i₁) a = r-p a i₁ i SetsIso≡-ext : ∀ {a b : Iso A A'} @@ -776,16 +776,16 @@ module _ (isSet-A : isSet A) (isSet-A' : isSet A') where → a ≡ b Iso.fun (SetsIso≡-ext {a} {b} fun≡ inv≡ i) x = fun≡ x i Iso.inv (SetsIso≡-ext {a} {b} fun≡ inv≡ i) x = inv≡ x i - Iso.rightInv (SetsIso≡-ext {a} {b} fun≡ inv≡ i) b₁ = + Iso.sec (SetsIso≡-ext {a} {b} fun≡ inv≡ i) b₁ = isSet→SquareP (λ _ _ → isSet-A') - (Iso.rightInv a b₁) - (Iso.rightInv b b₁) + (Iso.sec a b₁) + (Iso.sec b b₁) (λ i → fun≡ (inv≡ b₁ i) i) refl i - Iso.leftInv (SetsIso≡-ext {a} {b} fun≡ inv≡ i) a₁ = + Iso.ret (SetsIso≡-ext {a} {b} fun≡ inv≡ i) a₁ = isSet→SquareP (λ _ _ → isSet-A) - (Iso.leftInv a a₁) - (Iso.leftInv b a₁) + (Iso.ret a a₁) + (Iso.ret b a₁) (λ i → inv≡ (fun≡ a₁ i) i ) refl i @@ -804,8 +804,8 @@ module _ (isSet-A : isSet A) (isSet-A' : isSet A') where ww : Iso _ _ fun ww = isoToEquiv inv ww = equivToIso - rightInv ww b = equivEq refl - leftInv ww a = SetsIso≡ refl refl + sec ww b = equivEq refl + ret ww a = SetsIso≡ refl refl isSet→isEquiv-isoToPath : isEquiv isoToEquiv @@ -821,8 +821,8 @@ isSet→Iso-Iso-≡ isSet-A isSet-A' = ww ww : Iso _ _ fun ww = isoToPath inv ww = pathToIso - rightInv ww b = isInjectiveTransport (funExt λ _ → transportRefl _) - leftInv ww a = SetsIso≡-ext isSet-A isSet-A' (λ _ → transportRefl (fun a _)) λ _ → cong (inv a) (transportRefl _) + sec ww b = isInjectiveTransport (funExt λ _ → transportRefl _) + ret ww a = SetsIso≡-ext isSet-A isSet-A' (λ _ → transportRefl (fun a _)) λ _ → cong (inv a) (transportRefl _) hSet-Iso-Iso-≡ : (A : hSet ℓ) → (A' : hSet ℓ) → Iso (Iso (fst A) (fst A')) (A ≡ A') hSet-Iso-Iso-≡ A A' = compIso (isSet→Iso-Iso-≡ (snd A) (snd A')) (equivToIso (_ , isEquiv-Σ≡Prop λ _ → isPropIsSet)) @@ -857,8 +857,8 @@ module _ (B : (i j k : I) → Type ℓ) Π-contractDomIso : (c : isContr A) → Iso ((x : A) → B x) (B (c .fst)) Π-contractDomIso {B = B} c .fun f = f (c .fst) Π-contractDomIso {B = B} c .inv b x = subst B (c .snd x) b -Π-contractDomIso {B = B} c .rightInv b i = transp (λ j → B (isProp→isSet (isContr→isProp c) _ _ (c .snd (c .fst)) refl i j)) i b -Π-contractDomIso {B = B} c .leftInv f = funExt λ x → fromPathP (cong f (c .snd x)) +Π-contractDomIso {B = B} c .sec b i = transp (λ j → B (isProp→isSet (isContr→isProp c) _ _ (c .snd (c .fst)) refl i j)) i b +Π-contractDomIso {B = B} c .ret f = funExt λ x → fromPathP (cong f (c .snd x)) Π-contractDom : (c : isContr A) → ((x : A) → B x) ≃ B (c .fst) Π-contractDom c = isoToEquiv (Π-contractDomIso c) diff --git a/Cubical/Foundations/Isomorphism.agda b/Cubical/Foundations/Isomorphism.agda index e44bb1c41f..99afe22c95 100644 --- a/Cubical/Foundations/Isomorphism.agda +++ b/Cubical/Foundations/Isomorphism.agda @@ -36,24 +36,24 @@ record Iso {ℓ ℓ'} (A : Type ℓ) (B : Type ℓ') : Type (ℓ-max ℓ ℓ') w field fun : A → B inv : B → A - rightInv : section fun inv - leftInv : retract fun inv + sec : section fun inv + ret : retract fun inv isIso : (A → B) → Type _ isIso {A = A} {B = B} f = Σ[ g ∈ (B → A) ] Σ[ _ ∈ section f g ] retract f g isoFunInjective : (f : Iso A B) → (x y : A) → Iso.fun f x ≡ Iso.fun f y → x ≡ y -isoFunInjective f x y h = sym (Iso.leftInv f x) ∙∙ cong (Iso.inv f) h ∙∙ Iso.leftInv f y +isoFunInjective f x y h = sym (Iso.ret f x) ∙∙ cong (Iso.inv f) h ∙∙ Iso.ret f y isoInvInjective : (f : Iso A B) → (x y : B) → Iso.inv f x ≡ Iso.inv f y → x ≡ y -isoInvInjective f x y h = sym (Iso.rightInv f x) ∙∙ cong (Iso.fun f) h ∙∙ Iso.rightInv f y +isoInvInjective f x y h = sym (Iso.sec f x) ∙∙ cong (Iso.fun f) h ∙∙ Iso.sec f y -- Any iso is an equivalence module _ (i : Iso A B) where open Iso i renaming ( fun to f ; inv to g - ; rightInv to s - ; leftInv to t) + ; sec to s + ; ret to t) private module _ (y : B) (x0 x1 : A) (p0 : f x0 ≡ y) (p1 : f x1 ≡ y) where @@ -105,14 +105,14 @@ isoToEquiv i .snd = isoToIsEquiv i IsoToIsIso : (f : Iso A B) → isIso (f .Iso.fun) IsoToIsIso f .fst = f .Iso.inv -IsoToIsIso f .snd .fst = f .Iso.rightInv -IsoToIsIso f .snd .snd = f .Iso.leftInv +IsoToIsIso f .snd .fst = f .Iso.sec +IsoToIsIso f .snd .snd = f .Iso.ret isIsoToIso : {f : A → B} → isIso f → Iso A B isIsoToIso {f = f} fIsIso .Iso.fun = f isIsoToIso fIsIso .Iso.inv = fIsIso .fst -isIsoToIso fIsIso .Iso.rightInv = fIsIso .snd .fst -isIsoToIso fIsIso .Iso.leftInv = fIsIso .snd .snd +isIsoToIso fIsIso .Iso.sec = fIsIso .snd .fst +isIsoToIso fIsIso .Iso.ret = fIsIso .snd .snd isIsoToIsEquiv : {f : A → B} → isIso f → isEquiv f isIsoToIsEquiv fIsIso = isoToIsEquiv (isIsoToIso fIsIso) @@ -127,69 +127,69 @@ open Iso invIso : Iso A B → Iso B A fun (invIso f) = inv f inv (invIso f) = fun f -rightInv (invIso f) = leftInv f -leftInv (invIso f) = rightInv f +sec (invIso f) = ret f +ret (invIso f) = sec f compIso : Iso A B → Iso B C → Iso A C fun (compIso i j) = fun j ∘ fun i inv (compIso i j) = inv i ∘ inv j -rightInv (compIso i j) b = cong (fun j) (rightInv i (inv j b)) ∙ rightInv j b -leftInv (compIso i j) a = cong (inv i) (leftInv j (fun i a)) ∙ leftInv i a +sec (compIso i j) b = cong (fun j) (sec i (inv j b)) ∙ sec j b +ret (compIso i j) a = cong (inv i) (ret j (fun i a)) ∙ ret i a composesToId→Iso : (G : Iso A B) (g : B → A) → G .fun ∘ g ≡ idfun B → Iso B A fun (composesToId→Iso _ g _) = g inv (composesToId→Iso j _ _) = fun j -rightInv (composesToId→Iso i g path) b = - sym (leftInv i (g (fun i b))) ∙∙ cong (λ g → inv i (g (fun i b))) path ∙∙ leftInv i b -leftInv (composesToId→Iso _ _ path) b i = path i b +sec (composesToId→Iso i g path) b = + sym (ret i (g (fun i b))) ∙∙ cong (λ g → inv i (g (fun i b))) path ∙∙ ret i b +ret (composesToId→Iso _ _ path) b i = path i b idIso : Iso A A fun idIso = idfun _ inv idIso = idfun _ -rightInv idIso _ = refl -leftInv idIso _ = refl +sec idIso _ = refl +ret idIso _ = refl compIsoIdL : (isom : Iso A B) → compIso idIso isom ≡ isom fun (compIsoIdL isom i) = fun isom inv (compIsoIdL isom i) = inv isom -rightInv (compIsoIdL isom i) b = lUnit (isom .rightInv b) (~ i) -leftInv (compIsoIdL isom i) a = rUnit (isom .leftInv a) (~ i) +sec (compIsoIdL isom i) b = lUnit (isom .sec b) (~ i) +ret (compIsoIdL isom i) a = rUnit (isom .ret a) (~ i) compIsoIdR : (isom : Iso A B) → compIso isom idIso ≡ isom fun (compIsoIdR isom i) = fun isom inv (compIsoIdR isom i) = inv isom -rightInv (compIsoIdR isom i) b = rUnit (isom .rightInv b) (~ i) -leftInv (compIsoIdR isom i) a = lUnit (isom .leftInv a) (~ i) +sec (compIsoIdR isom i) b = rUnit (isom .sec b) (~ i) +ret (compIsoIdR isom i) a = lUnit (isom .ret a) (~ i) LiftIso : Iso A (Lift {i = ℓ} {j = ℓ'} A) fun LiftIso = lift inv LiftIso = lower -rightInv LiftIso _ = refl -leftInv LiftIso _ = refl +sec LiftIso _ = refl +ret LiftIso _ = refl isContr→Iso : isContr A → isContr B → Iso A B fun (isContr→Iso _ Bctr) _ = Bctr .fst inv (isContr→Iso Actr _) _ = Actr .fst -rightInv (isContr→Iso _ Bctr) = Bctr .snd -leftInv (isContr→Iso Actr _) = Actr .snd +sec (isContr→Iso _ Bctr) = Bctr .snd +ret (isContr→Iso Actr _) = Actr .snd isContr→Iso' : isContr A → isContr B → (A → B) → Iso A B fun (isContr→Iso' _ Bctr f) = f inv (isContr→Iso' Actr _ _) _ = Actr .fst -rightInv (isContr→Iso' _ Bctr f) = isContr→isProp Bctr _ -leftInv (isContr→Iso' Actr _ _) = Actr .snd +sec (isContr→Iso' _ Bctr f) = isContr→isProp Bctr _ +ret (isContr→Iso' Actr _ _) = Actr .snd isProp→Iso : (Aprop : isProp A) (Bprop : isProp B) (f : A → B) (g : B → A) → Iso A B fun (isProp→Iso _ _ f _) = f inv (isProp→Iso _ _ _ g) = g -rightInv (isProp→Iso _ Bprop f g) b = Bprop (f (g b)) b -leftInv (isProp→Iso Aprop _ f g) a = Aprop (g (f a)) a +sec (isProp→Iso _ Bprop f g) b = Bprop (f (g b)) b +ret (isProp→Iso Aprop _ f g) a = Aprop (g (f a)) a domIso : ∀ {ℓ} {C : Type ℓ} → Iso A B → Iso (A → C) (B → C) fun (domIso e) f b = f (inv e b) inv (domIso e) f a = f (fun e a) -rightInv (domIso e) f i x = f (rightInv e x i) -leftInv (domIso e) f i x = f (leftInv e x i) +sec (domIso e) f i x = f (sec e x i) +ret (domIso e) f i x = f (ret e x i) -- Helpful notation _Iso⟨_⟩_ : ∀ {ℓ ℓ' ℓ''} {B : Type ℓ'} {C : Type ℓ''} (X : Type ℓ) → Iso X B → Iso B C → Iso X C @@ -206,8 +206,8 @@ codomainIsoDep : ∀ {ℓ ℓ' ℓ''} {A : Type ℓ} {B : A → Type ℓ'} {C : → Iso ((a : A) → B a) ((a : A) → C a) fun (codomainIsoDep is) f a = fun (is a) (f a) inv (codomainIsoDep is) f a = inv (is a) (f a) -rightInv (codomainIsoDep is) f = funExt λ a → rightInv (is a) (f a) -leftInv (codomainIsoDep is) f = funExt λ a → leftInv (is a) (f a) +sec (codomainIsoDep is) f = funExt λ a → sec (is a) (f a) +ret (codomainIsoDep is) f = funExt λ a → ret (is a) (f a) codomainIso : ∀ {ℓ ℓ' ℓ''} {A : Type ℓ} {B : Type ℓ'} {C : Type ℓ''} → Iso B C @@ -226,10 +226,10 @@ Iso≡Set : isSet A → isSet B → (f g : Iso A B) → f ≡ g fun (Iso≡Set hA hB f g hfun hinv i) x = hfun x i inv (Iso≡Set hA hB f g hfun hinv i) x = hinv x i -rightInv (Iso≡Set hA hB f g hfun hinv i) x j = - isSet→isSet' hB (rightInv f x) (rightInv g x) (λ i → hfun (hinv x i) i) refl i j -leftInv (Iso≡Set hA hB f g hfun hinv i) x j = - isSet→isSet' hA (leftInv f x) (leftInv g x) (λ i → hinv (hfun x i) i) refl i j +sec (Iso≡Set hA hB f g hfun hinv i) x j = + isSet→isSet' hB (sec f x) (sec g x) (λ i → hfun (hinv x i) i) refl i j +ret (Iso≡Set hA hB f g hfun hinv i) x j = + isSet→isSet' hA (ret f x) (ret g x) (λ i → hinv (hfun x i) i) refl i j transportIsoToPath : (f : Iso A B) (x : A) → transport (isoToPath f) x ≡ f .fun x transportIsoToPath f x = transportRefl _ diff --git a/Cubical/Foundations/Path.agda b/Cubical/Foundations/Path.agda index 0dd6bdb72e..26165fb537 100644 --- a/Cubical/Foundations/Path.agda +++ b/Cubical/Foundations/Path.agda @@ -33,7 +33,7 @@ PathP≡Path⁻ P p q i = PathP (λ j → P (~ i ∧ j)) p (transport⁻-filler PathPIsoPath : ∀ (A : I → Type ℓ) (x : A i0) (y : A i1) → Iso (PathP A x y) (transport (λ i → A i) x ≡ y) PathPIsoPath A x y .Iso.fun = fromPathP PathPIsoPath A x y .Iso.inv = toPathP -PathPIsoPath A x y .Iso.rightInv q k i = +PathPIsoPath A x y .Iso.sec q k i = hcomp (λ j → λ { (i = i0) → slide (j ∨ ~ k) @@ -67,7 +67,7 @@ PathPIsoPath A x y .Iso.rightInv q k i = ; (j = i1) → q (i ∧ l) }) (slide (i ∨ j)) -PathPIsoPath A x y .Iso.leftInv q k i = +PathPIsoPath A x y .Iso.ret q k i = outS (hcomp-unique (λ j → λ @@ -288,11 +288,11 @@ Jequiv P = isoToEquiv isom isom : Iso _ _ Iso.fun isom = J P Iso.inv isom f = f refl - Iso.rightInv isom f = + Iso.sec isom f = implicitFunExt λ {_} → funExt λ t → J (λ _ t → J P (f refl) t ≡ f t) (JRefl P (f refl)) t - Iso.leftInv isom = JRefl P + Iso.ret isom = JRefl P -- Action of PathP on equivalences (without relying on univalence) @@ -307,7 +307,7 @@ congPathIso {A = A} {B} e {a₀} {a₁} .Iso.inv q i = ; (i = i1) → retEq (e i1) a₁ j }) (invEq (e i) (q i)) -congPathIso {A = A} {B} e {a₀} {a₁} .Iso.rightInv q k i = +congPathIso {A = A} {B} e {a₀} {a₁} .Iso.sec q k i = hcomp (λ j → λ { (i = i0) → commSqIsEq (e i0 .snd) a₀ j k @@ -325,7 +325,7 @@ congPathIso {A = A} {B} e {a₀} {a₁} .Iso.rightInv q k i = }) (secEq (e i) (q i) k) where b = commSqIsEq -congPathIso {A = A} {B} e {a₀} {a₁} .Iso.leftInv p k i = +congPathIso {A = A} {B} e {a₀} {a₁} .Iso.ret p k i = hcomp (λ j → λ { (i = i0) → retEq (e i0) a₀ (j ∨ k) diff --git a/Cubical/Foundations/Pointed/Base.agda b/Cubical/Foundations/Pointed/Base.agda index 91a7f020af..cae575fc11 100644 --- a/Cubical/Foundations/Pointed/Base.agda +++ b/Cubical/Foundations/Pointed/Base.agda @@ -106,10 +106,10 @@ Iso.fun IsoPointedPointer = ⌊_⌋ Iso.inv (IsoPointedPointer {A = A}) pt₀ = pt A Iso.inv IsoPointedPointer ⌊ x ⌋ = x Iso.inv (IsoPointedPointer {A = A}) (id i) = pt A -Iso.rightInv IsoPointedPointer pt₀ = id -Iso.rightInv IsoPointedPointer ⌊ x ⌋ = refl -Iso.rightInv IsoPointedPointer (id i) j = id (i ∧ j) -Iso.leftInv IsoPointedPointer x = refl +Iso.sec IsoPointedPointer pt₀ = id +Iso.sec IsoPointedPointer ⌊ x ⌋ = refl +Iso.sec IsoPointedPointer (id i) j = id (i ∧ j) +Iso.ret IsoPointedPointer x = refl Pointed≡Pointer : {A : Pointed ℓ} → typ A ≡ Pointer A Pointed≡Pointer = isoToPath IsoPointedPointer diff --git a/Cubical/Foundations/Pointed/FunExt.agda b/Cubical/Foundations/Pointed/FunExt.agda index 8df07a09db..9af1386f8e 100644 --- a/Cubical/Foundations/Pointed/FunExt.agda +++ b/Cubical/Foundations/Pointed/FunExt.agda @@ -28,8 +28,8 @@ module _ {A : Pointed ℓ} {B : typ A → Type ℓ'} {ptB : B (pt A)} where funExt∙PIso : (f g : Π∙ A B ptB) → Iso (f ∙∼P g) (f ≡ g) Iso.fun (funExt∙PIso f g) = funExt∙P {f = f} {g = g} Iso.inv (funExt∙PIso f g) = funExt∙P⁻ {f = f} {g = g} - Iso.rightInv (funExt∙PIso f g) p i j = p j - Iso.leftInv (funExt∙PIso f g) h _ = h + Iso.sec (funExt∙PIso f g) p i j = p j + Iso.ret (funExt∙PIso f g) h _ = h -- transformed to equivalence funExt∙P≃ : (f g : Π∙ A B ptB) → (f ∙∼P g) ≃ (f ≡ g) diff --git a/Cubical/Foundations/Pointed/Properties.agda b/Cubical/Foundations/Pointed/Properties.agda index 79fffdf880..81788b93c6 100644 --- a/Cubical/Foundations/Pointed/Properties.agda +++ b/Cubical/Foundations/Pointed/Properties.agda @@ -118,7 +118,7 @@ pre∘∙equiv : ∀ {ℓA ℓB ℓC} {A : Pointed ℓA} {B : Pointed ℓB} {C : → (B ≃∙ C) → Iso (A →∙ B) (A →∙ C) Iso.fun (pre∘∙equiv {A = A} {B = B} {C = C} e) = toEq' B C A e Iso.inv (pre∘∙equiv {A = A} {B = B} {C = C} e) = fromEq' B C A e -Iso.rightInv (pre∘∙equiv {A = A} {B = B} {C = C} e) = +Iso.sec (pre∘∙equiv {A = A} {B = B} {C = C} e) = J (λ ptC p → section (toEq' B (fst C , ptC) A (fst e , p)) (fromEq' B (fst C , ptC) A (fst e , p))) (uncurry (λ f p → ΣPathP (funExt (λ x → isHAEquiv.rinv (HAe .snd) (f x)) @@ -146,7 +146,7 @@ Iso.rightInv (pre∘∙equiv {A = A} {B = B} {C = C} e) = ; (i = i1) → q (j ∨ k) ; (j = i1) → l i}) (P i j) -Iso.leftInv (pre∘∙equiv {A = A} {B = B} {C = C} e) = +Iso.ret (pre∘∙equiv {A = A} {B = B} {C = C} e) = J (λ pt p → retract (toEq' B (fst C , pt) A (fst e , p)) (fromEq' B (fst C , pt) A (fst e , p))) (uncurry (λ f → @@ -168,7 +168,7 @@ post∘∙equiv : ∀ {ℓA ℓB ℓC} {A : Pointed ℓA} {B : Pointed ℓB} {C → (A ≃∙ B) → Iso (A →∙ C) (B →∙ C) Iso.fun (post∘∙equiv {A = A} {B = B} {C = C} e) = toEq A B C e Iso.inv (post∘∙equiv {A = A} {B = B} {C = C} e) = fromEq A B C e -Iso.rightInv (post∘∙equiv {A = A}{B = B , ptB} {C = C} e) = +Iso.sec (post∘∙equiv {A = A}{B = B , ptB} {C = C} e) = J (λ pt p → section (toEq A (B , pt) C (fst e , p)) (fromEq A (B , pt) C (fst e , p))) (uncurry (λ f → @@ -186,7 +186,7 @@ Iso.rightInv (post∘∙equiv {A = A}{B = B , ptB} {C = C} e) = (snd e) where HAe = equiv→HAEquiv (fst e) -Iso.leftInv (post∘∙equiv {A = A} {B = B , ptB} {C = C} e) = +Iso.ret (post∘∙equiv {A = A} {B = B , ptB} {C = C} e) = J (λ pt p → retract (toEq A (B , pt) C (fst e , p)) (fromEq A (B , pt) C (fst e , p))) (uncurry (λ f → J (λ ptC y → @@ -213,8 +213,8 @@ flip→∙∙Iso : {A : Pointed ℓ} {B : Pointed ℓ'} {C : Pointed ℓA} → Iso (A →∙ (B →∙ C ∙)) (B →∙ (A →∙ C ∙)) Iso.fun flip→∙∙Iso = flip→∙∙ Iso.inv flip→∙∙Iso = flip→∙∙ -Iso.rightInv flip→∙∙Iso _ = refl -Iso.leftInv flip→∙∙Iso _ = refl +Iso.sec flip→∙∙Iso _ = refl +Iso.ret flip→∙∙Iso _ = refl ≃∙→ret/sec∙ : ∀ {ℓ} {A B : Pointed ℓ} (f : A ≃∙ B) → ((≃∙map (invEquiv∙ f) ∘∙ ≃∙map f) ≡ idfun∙ A) @@ -231,8 +231,8 @@ pointedSecIso : ∀ {ℓ''} {A : Pointed ℓ} {B : Pointed ℓ'} (Q : fst A → ((a : fst A) → F (a , pt (Q a)) ≡ pt B)) Iso.fun (pointedSecIso Q) F = (λ x → F (fst x) .fst (snd x)) , (λ x → F x .snd) Iso.inv (pointedSecIso Q) F a = (fst F ∘ (a ,_)) , snd F a -Iso.rightInv (pointedSecIso Q) F = refl -Iso.leftInv (pointedSecIso Q) F = refl +Iso.sec (pointedSecIso Q) F = refl +Iso.ret (pointedSecIso Q) F = refl compPathrEquiv∙ : {A : Type ℓ} {a b c : A} {q : a ≡ b} (p : b ≡ c) → ((a ≡ b) , q) ≃∙ ((a ≡ c) , q ∙ p) diff --git a/Cubical/Foundations/Transport.agda b/Cubical/Foundations/Transport.agda index e044ba5998..95d1fd3a42 100644 --- a/Cubical/Foundations/Transport.agda +++ b/Cubical/Foundations/Transport.agda @@ -91,8 +91,8 @@ uaTransportη = uaη pathToIso : ∀ {ℓ} {A B : Type ℓ} → A ≡ B → Iso A B Iso.fun (pathToIso x) = transport x Iso.inv (pathToIso x) = transport⁻ x -Iso.rightInv (pathToIso x) = transportTransport⁻ x -Iso.leftInv (pathToIso x) = transport⁻Transport x +Iso.sec (pathToIso x) = transportTransport⁻ x +Iso.ret (pathToIso x) = transport⁻Transport x substIso : ∀ {ℓ ℓ'} {A : Type ℓ} (B : A → Type ℓ') {x y : A} (p : x ≡ y) → Iso (B x) (B y) substIso B p = pathToIso (cong B p) diff --git a/Cubical/Foundations/Univalence.agda b/Cubical/Foundations/Univalence.agda index 8802e7d32b..6030c6ee84 100644 --- a/Cubical/Foundations/Univalence.agda +++ b/Cubical/Foundations/Univalence.agda @@ -231,8 +231,8 @@ ua-pathToEquiv = uaη univalenceIso : {A B : Type ℓ} → Iso (A ≡ B) (A ≃ B) univalenceIso .Iso.fun = pathToEquiv univalenceIso .Iso.inv = ua -univalenceIso .Iso.rightInv = pathToEquiv-ua -univalenceIso .Iso.leftInv = ua-pathToEquiv +univalenceIso .Iso.sec = pathToEquiv-ua +univalenceIso .Iso.ret = ua-pathToEquiv isEquivPathToEquiv : {A B : Type ℓ} → isEquiv (pathToEquiv {A = A} {B = B}) isEquivPathToEquiv = isoToIsEquiv univalenceIso @@ -256,8 +256,8 @@ module Univalence (au : ∀ {ℓ} {A B : Type ℓ} → A ≡ B → A ≃ B) isoThm : ∀ {ℓ} {A B : Type ℓ} → Iso (A ≡ B) (A ≃ B) isoThm .Iso.fun = au isoThm .Iso.inv = ua - isoThm .Iso.rightInv = au-ua - isoThm .Iso.leftInv = ua-au + isoThm .Iso.sec = au-ua + isoThm .Iso.ret = ua-au thm : ∀ {ℓ} {A B : Type ℓ} → isEquiv au thm {A = A} {B = B} = isoToIsEquiv {B = A ≃ B} isoThm diff --git a/Cubical/Foundations/Univalence/Universe.agda b/Cubical/Foundations/Univalence/Universe.agda index 63fce38a2a..0eb2b6a84c 100644 --- a/Cubical/Foundations/Univalence/Universe.agda +++ b/Cubical/Foundations/Univalence/Universe.agda @@ -89,14 +89,14 @@ open Iso equivIso : ∀ s t → Iso (s ≡ t) (El s ≃ El t) equivIso s t .fun = nu s t equivIso s t .inv = un s t -equivIso s t .rightInv = nu-un s t -equivIso s t .leftInv = un-nu s t +equivIso s t .sec = nu-un s t +equivIso s t .ret = un-nu s t pathIso : ∀ s t → Iso (s ≡ t) (El s ≡ El t) pathIso s t .fun = cong El pathIso s t .inv = un s t ∘ pathToEquiv -pathIso s t .rightInv = cong-un-te s t -pathIso s t .leftInv = un-nu s t +pathIso s t .sec = cong-un-te s t +pathIso s t .ret = un-nu s t minivalence : ∀{s t} → (s ≡ t) ≃ (El s ≃ El t) minivalence {s} {t} = isoToEquiv (equivIso s t) diff --git a/Cubical/Functions/Fibration.agda b/Cubical/Functions/Fibration.agda index 8fe84b97b1..6eea1eb7d7 100644 --- a/Cubical/Functions/Fibration.agda +++ b/Cubical/Functions/Fibration.agda @@ -55,8 +55,8 @@ module _ {ℓ} {E : Type ℓ} (p : E → B) where where isom : Iso E (Σ B (fiber p)) Iso.fun isom x = p x , x , refl Iso.inv isom (b , x , q) = x - Iso.leftInv isom x i = x - Iso.rightInv isom (b , x , q) i = q i , x , λ j → q (i ∧ j) + Iso.ret isom x i = x + Iso.sec isom (b , x , q) i = q i , x , λ j → q (i ∧ j) module _ (B : Type ℓb) (ℓ : Level) where private @@ -68,8 +68,8 @@ module _ (B : Type ℓb) (ℓ : Level) where where isom : Iso (Σ[ E ∈ Type ℓ' ] (E → B)) (B → Type ℓ') Iso.fun isom (E , p) = fiber p Iso.inv isom p⁻¹ = Σ B p⁻¹ , fst - Iso.rightInv isom p⁻¹ i x = ua (fiberEquiv p⁻¹ x) i - Iso.leftInv isom (E , p) i = ua e (~ i) , fst ∘ ua-unglue e (~ i) + Iso.sec isom p⁻¹ i x = ua (fiberEquiv p⁻¹ x) i + Iso.ret isom (E , p) i = ua e (~ i) , fst ∘ ua-unglue e (~ i) where e = totalEquiv p diff --git a/Cubical/Functions/FunExtEquiv.agda b/Cubical/Functions/FunExtEquiv.agda index 4ffda2a942..6f467e38a1 100644 --- a/Cubical/Functions/FunExtEquiv.agda +++ b/Cubical/Functions/FunExtEquiv.agda @@ -134,12 +134,12 @@ funExtDepEquiv {A = A} {B} {f} {g} = isoToEquiv isom isom : Iso _ _ isom .fun = funExtDep isom .inv = funExtDep⁻ - isom .rightInv q m i x = + isom .sec q m i x = transp (λ k → B i (coei→i A i x (k ∨ m))) (m ∨ i ∨ ~ i) (q i (coei→i A i x m)) - isom .leftInv h m p i = + isom .ret h m p i = transp (λ k → B i (lemi→i m k)) (m ∨ i ∨ ~ i) @@ -177,8 +177,8 @@ funExtNonDepEquiv {A = A} = isoToEquiv isom isom : Iso _ _ isom .fun = funExtNonDep isom .inv = funExtNonDep⁻ - isom .rightInv q m i x = q i (coei→i A i x m) - isom .leftInv h m p i = h (λ j → lemi→j j m) i + isom .sec q m i x = q i (coei→i A i x m) + isom .ret h m p i = h (λ j → lemi→j j m) i where lemi→j : ∀ j → coei→j A i j (p i) ≡ p j lemi→j j k = coePath A (λ i → p i) i j k @@ -194,13 +194,13 @@ heteroHomotopy≃Homotopy {A = A} {B} {f} {g} = isoToEquiv isom isom .fun h x₀ = h (isContrSinglP A x₀ .fst .snd) isom .inv k {x₀} {x₁} p = subst (λ fib → PathP B (f x₀) (g (fib .fst))) (isContrSinglP A x₀ .snd (x₁ , p)) (k x₀) - isom .rightInv k = funExt λ x₀ → + isom .sec k = funExt λ x₀ → cong (λ α → subst (λ fib → PathP B (f x₀) (g (fib .fst))) α (k x₀)) (isProp→isSet isPropSinglP (isContrSinglP A x₀ .fst) _ (isContrSinglP A x₀ .snd (isContrSinglP A x₀ .fst)) refl) ∙ transportRefl (k x₀) - isom .leftInv h j {x₀} {x₁} p = + isom .ret h j {x₀} {x₁} p = transp (λ i → PathP B (f x₀) (g (isContrSinglP A x₀ .snd (x₁ , p) (i ∨ j) .fst))) j diff --git a/Cubical/Functions/Image.agda b/Cubical/Functions/Image.agda index 3b4dfe9ffc..9b4dd79401 100644 --- a/Cubical/Functions/Image.agda +++ b/Cubical/Functions/Image.agda @@ -82,10 +82,10 @@ module _ {ℓ₀ ℓ₁} imagesIso : Iso Im₀ Im₁ imagesIso .Iso.fun = imagesCompare e₀ m₀ e₁ m₁ p imagesIso .Iso.inv = imagesCompare e₁ m₁ e₀ m₀ (sym p) - imagesIso .Iso.rightInv c = + imagesIso .Iso.sec c = invIsEq (m₁ .snd _ _) (imagesEmbeddingComm e₀ m₀ e₁ m₁ p _ ∙ imagesEmbeddingComm e₁ m₁ e₀ m₀ (sym p) c) - imagesIso .Iso.leftInv c = + imagesIso .Iso.ret c = invIsEq (m₀ .snd _ _) (imagesEmbeddingComm e₁ m₁ e₀ m₀ (sym p) _ ∙ imagesEmbeddingComm e₀ m₀ e₁ m₁ p c) diff --git a/Cubical/Functions/Implicit.agda b/Cubical/Functions/Implicit.agda index f29e9c3bd9..84166d5c2a 100644 --- a/Cubical/Functions/Implicit.agda +++ b/Cubical/Functions/Implicit.agda @@ -11,6 +11,6 @@ implicit≃Explicit = isoToEquiv isom isom : Iso _ _ Iso.fun isom f a = f Iso.inv isom f = f _ - Iso.rightInv isom f = funExt λ _ → refl - Iso.leftInv isom f = implicitFunExt refl + Iso.sec isom f = funExt λ _ → refl + Iso.ret isom f = implicitFunExt refl diff --git a/Cubical/Functions/Involution.agda b/Cubical/Functions/Involution.agda index 1d71c249f4..f2ec0ab874 100644 --- a/Cubical/Functions/Involution.agda +++ b/Cubical/Functions/Involution.agda @@ -15,8 +15,8 @@ module _ {ℓ} {A : Type ℓ} {f : A → A} (invol : isInvolution f) where involIso : Iso A A involIso .fun = f involIso .inv = f - involIso .rightInv = invol - involIso .leftInv = invol + involIso .sec = invol + involIso .ret = invol involIsEquiv : isEquiv f involIsEquiv = isoToIsEquiv involIso diff --git a/Cubical/Functions/Preimage.agda b/Cubical/Functions/Preimage.agda index 167b6ec280..306e11687c 100644 --- a/Cubical/Functions/Preimage.agda +++ b/Cubical/Functions/Preimage.agda @@ -53,5 +53,5 @@ PreimageOfImage {A = A} {B = B} f = isoToPath is where is : Iso (Preimage f (Image f , imageInclusion f)) A Iso.fun is = fst Iso.inv is a = a , ∣ ((f a) , ∣ a , refl ∣₁) , refl ∣₁ - Iso.rightInv is x = refl - Iso.leftInv is x = Σ≡Prop (isPropIsInPreimage f (Image f , imageInclusion f)) refl + Iso.sec is x = refl + Iso.ret is x = Σ≡Prop (isPropIsInPreimage f (Image f , imageInclusion f)) refl diff --git a/Cubical/HITs/2GroupoidTruncation/Properties.agda b/Cubical/HITs/2GroupoidTruncation/Properties.agda index 43fa00cff9..c952e84151 100644 --- a/Cubical/HITs/2GroupoidTruncation/Properties.agda +++ b/Cubical/HITs/2GroupoidTruncation/Properties.agda @@ -60,8 +60,8 @@ is2Groupoid2GroupoidTrunc a b p q r s = squash₄ a b p q r s f : Iso ∥ A ∥₄ A Iso.fun f = rec hA (idfun A) Iso.inv f x = ∣ x ∣₄ - Iso.rightInv f _ = refl - Iso.leftInv f = elim (λ _ → isOfHLevelSuc 4 is2Groupoid2GroupoidTrunc _ _) (λ _ → refl) + Iso.sec f _ = refl + Iso.ret f = elim (λ _ → isOfHLevelSuc 4 is2Groupoid2GroupoidTrunc _ _) (λ _ → refl) 2GroupoidTruncIdempotent : is2Groupoid A → ∥ A ∥₄ ≡ A 2GroupoidTruncIdempotent hA = ua (2GroupoidTruncIdempotent≃ hA) diff --git a/Cubical/HITs/AbPath/Properties.agda b/Cubical/HITs/AbPath/Properties.agda index e02bbf80db..ec07c5db23 100644 --- a/Cubical/HITs/AbPath/Properties.agda +++ b/Cubical/HITs/AbPath/Properties.agda @@ -191,8 +191,8 @@ Abelianizeπ₁≅π₁ᵃᵇ : ∀ {ℓ} (A : Pointed ℓ) → AbGroupIso (AbelianizationAbGroup (πGr 0 A)) (π₁ᵃᵇAbGroup A) Iso.fun (fst (Abelianizeπ₁≅π₁ᵃᵇ A)) = fst Abelianizeπ₁→π₁ᵃᵇ Iso.inv (fst (Abelianizeπ₁≅π₁ᵃᵇ A)) = π₁ᵃᵇ→Abelianizeπ₁ -Iso.rightInv (fst (Abelianizeπ₁≅π₁ᵃᵇ A)) = +Iso.sec (fst (Abelianizeπ₁≅π₁ᵃᵇ A)) = ST.elim (λ _ → isSetPathImplicit) (elimProp≡ᵃᵇ (λ _ → squash₂ _ _) λ p → refl) -Iso.leftInv (fst (Abelianizeπ₁≅π₁ᵃᵇ A)) = Abi.elimProp _ (λ _ → isset _ _) +Iso.ret (fst (Abelianizeπ₁≅π₁ᵃᵇ A)) = Abi.elimProp _ (λ _ → isset _ _) (ST.elim (λ _ → isOfHLevelPath 2 isset _ _) λ p → refl) snd (Abelianizeπ₁≅π₁ᵃᵇ A) = Abelianizeπ₁→π₁ᵃᵇ {A = A} .snd diff --git a/Cubical/HITs/Bouquet/Discrete.agda b/Cubical/HITs/Bouquet/Discrete.agda index 14e189cc0d..a0057accc4 100644 --- a/Cubical/HITs/Bouquet/Discrete.agda +++ b/Cubical/HITs/Bouquet/Discrete.agda @@ -102,8 +102,8 @@ module _ {A : Type ℓ} (_≟_ : Discrete A) where (Σ _ IsNormalised) Iso.fun codeDecode p = subst CodeBouquet p ([] , lower) Iso.inv codeDecode = co← base - Iso.rightInv codeDecode = Σ≡Prop isPropIsNormalised ∘ uncurry coRet - Iso.leftInv codeDecode = coSec base + Iso.sec codeDecode = Σ≡Prop isPropIsNormalised ∘ uncurry coRet + Iso.ret codeDecode = coSec base isSetΩBouquet : isSet (Path (Bouquet A) base base) isSetΩBouquet = isOfHLevelRetractFromIso 2 codeDecode diff --git a/Cubical/HITs/Bouquet/FundamentalGroupProof.agda b/Cubical/HITs/Bouquet/FundamentalGroupProof.agda index be99b6721d..73f43d4e63 100644 --- a/Cubical/HITs/Bouquet/FundamentalGroupProof.agda +++ b/Cubical/HITs/Bouquet/FundamentalGroupProof.agda @@ -25,7 +25,7 @@ open import Cubical.Foundations.HLevels open import Cubical.Functions.Morphism open import Cubical.Data.Nat hiding (_·_ ; elim) -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin hiding (elim) open import Cubical.HITs.Bouquet.Discrete open import Cubical.HITs.FreeGroup as FG hiding (winding ; elimProp) @@ -285,8 +285,8 @@ encodeDecodeT x g = elim sethood induction g where TruncatedFamiliesIso : (x : Bouquet A) → Iso ∥ base ≡ x ∥₂ ∥ code x ∥₂ Iso.fun (TruncatedFamiliesIso x) = encodeT x Iso.inv (TruncatedFamiliesIso x) = decodeT x -Iso.rightInv (TruncatedFamiliesIso x) = encodeDecodeT x -Iso.leftInv (TruncatedFamiliesIso x) = decodeEncodeT x +Iso.sec (TruncatedFamiliesIso x) = encodeDecodeT x +Iso.ret (TruncatedFamiliesIso x) = decodeEncodeT x TruncatedFamiliesEquiv : (x : Bouquet A) → ∥ base ≡ x ∥₂ ≃ ∥ code x ∥₂ TruncatedFamiliesEquiv x = isoToEquiv (TruncatedFamiliesIso x) @@ -312,7 +312,7 @@ Iso-ΩFinBouquet-FreeGroup : {n : ℕ} Iso-ΩFinBouquet-FreeGroup {n = n} = compIso (compIso (invIso (setTruncIdempotentIso (isOfHLevelPath' 2 - (isGroupoidBouquet (DiscreteFin {n} )) _ _))) + (isGroupoidBouquet (discreteFin {n} )) _ _))) (equivToIso (TruncatedFamiliesEquiv base))) (equivToIso (invEquiv freeGroupTruncIdempotent≃)) @@ -324,7 +324,7 @@ invIso-ΩFinBouquet-FreeGroupPresStr {n = n} x y = cong (F ∘ G) (lem1 x y) ∙ lem2 (H x) (H y) where F = Iso.fun (setTruncIdempotentIso - (isOfHLevelPath' 2 (isGroupoidBouquet DiscreteFin) _ _)) + (isOfHLevelPath' 2 (isGroupoidBouquet discreteFin) _ _)) G = invEq (TruncatedFamiliesEquiv base) H = fst freeGroupTruncIdempotent≃ @@ -332,7 +332,7 @@ invIso-ΩFinBouquet-FreeGroupPresStr {n = n} x y = ≡ F (G x) ∙ F (G y) lem2 = ST.elim2 (λ _ _ → isOfHLevelPath 2 - (isOfHLevelPath' 2 (isGroupoidBouquet (DiscreteFin {n})) _ _) _ _) + (isOfHLevelPath' 2 (isGroupoidBouquet (discreteFin {n})) _ _) _ _) λ _ _ → refl lem1 : (x t : _) → H (x FG.· t) diff --git a/Cubical/HITs/Bouquet/Properties.agda b/Cubical/HITs/Bouquet/Properties.agda index 10eba449e2..b4e66bcd1f 100644 --- a/Cubical/HITs/Bouquet/Properties.agda +++ b/Cubical/HITs/Bouquet/Properties.agda @@ -48,15 +48,15 @@ module _ {ℓ} {A : Type ℓ} where Iso-SphereBouquet-Bouquet : Iso (SphereBouquet 1 A) (Bouquet A) Iso.fun Iso-SphereBouquet-Bouquet = SphereBouquet→Bouquet Iso.inv Iso-SphereBouquet-Bouquet = Bouquet→SphereBouquet - Iso.rightInv Iso-SphereBouquet-Bouquet base = refl - Iso.rightInv Iso-SphereBouquet-Bouquet (loop x i) j = + Iso.sec Iso-SphereBouquet-Bouquet base = refl + Iso.sec Iso-SphereBouquet-Bouquet (loop x i) j = SphereBouquet→Bouquet (doubleCompPath-filler (push x) (λ i → inr (x , loop i)) (sym (push x)) (~ j) i) - Iso.leftInv Iso-SphereBouquet-Bouquet (inl x) = refl - Iso.leftInv Iso-SphereBouquet-Bouquet (inr (s , base)) = push s - Iso.leftInv Iso-SphereBouquet-Bouquet (inr (s , loop i)) j = + Iso.ret Iso-SphereBouquet-Bouquet (inl x) = refl + Iso.ret Iso-SphereBouquet-Bouquet (inr (s , base)) = push s + Iso.ret Iso-SphereBouquet-Bouquet (inr (s , loop i)) j = doubleCompPath-filler (push s) (λ i → inr (s , loop i)) (sym (push s)) (~ j) i - Iso.leftInv Iso-SphereBouquet-Bouquet (push a i) j = push a (i ∧ j) + Iso.ret Iso-SphereBouquet-Bouquet (push a i) j = push a (i ∧ j) Bouquet≃∙SphereBouquet : SphereBouquet∙ 1 A ≃∙ Bouquet A , base fst Bouquet≃∙SphereBouquet = isoToEquiv (Iso-SphereBouquet-Bouquet) @@ -74,9 +74,9 @@ module _ {ℓ ℓ'} {A : Type ℓ} (B : Pointed ℓ') where CharacBouquet∙Iso : Iso (Bouquet∙ A →∙ B) (A → Ω B .fst) Iso.fun CharacBouquet∙Iso = BouquetFun∙→Ω Iso.inv CharacBouquet∙Iso = Ω→BouquetFun∙ - Iso.rightInv CharacBouquet∙Iso h i x j = + Iso.sec CharacBouquet∙Iso h i x j = compPath-filler (h x) refl (~ i) j - fst (Iso.leftInv CharacBouquet∙Iso h i) base = snd h (~ i) - fst (Iso.leftInv CharacBouquet∙Iso h i) (loop x j) = + fst (Iso.ret CharacBouquet∙Iso h i) base = snd h (~ i) + fst (Iso.ret CharacBouquet∙Iso h i) (loop x j) = doubleCompPath-filler (sym (snd h)) (cong (fst h) (loop x)) (snd h) (~ i) j - snd (Iso.leftInv CharacBouquet∙Iso h i) j = snd h (~ i ∨ j) + snd (Iso.ret CharacBouquet∙Iso h i) j = snd h (~ i ∨ j) diff --git a/Cubical/HITs/Colimit/Base.agda b/Cubical/HITs/Colimit/Base.agda index 6b448e20dc..81acf51889 100644 --- a/Cubical/HITs/Colimit/Base.agda +++ b/Cubical/HITs/Colimit/Base.agda @@ -124,8 +124,8 @@ module _ {ℓd ℓv ℓe} {I : Graph ℓv ℓe} {F : Diag ℓd I} where univ colimIsColimit ℓq Y = isoToIsEquiv record { fun = postcomp colimCone ; inv = rec - ; rightInv = λ C → refl - ; leftInv = λ h → funExt (eq h) } + ; sec = λ C → refl + ; ret = λ h → funExt (eq h) } where eq : ∀ h (x : colim _) → rec (postcomp colimCone h) x ≡ h x eq h (colim-leg j A) = refl eq h (colim-com f i A) = refl diff --git a/Cubical/HITs/Delooping/Two/Properties.agda b/Cubical/HITs/Delooping/Two/Properties.agda index c8c9f92f76..f128bccbf0 100644 --- a/Cubical/HITs/Delooping/Two/Properties.agda +++ b/Cubical/HITs/Delooping/Two/Properties.agda @@ -117,7 +117,7 @@ module BINARY where open Iso eqn : r ⊕ p ≡ q eqn = transport (λ i → - reflectIso .leftInv (r ⊕ p) i ≡ reflectIso .leftInv q i) + reflectIso .ret (r ⊕ p) i ≡ reflectIso .ret q i) (cong (reflectIso .inv) rcmp) loop²? diff --git a/Cubical/HITs/FreeAbGroup/Base.agda b/Cubical/HITs/FreeAbGroup/Base.agda index 6dddbf0e6a..92fc80c977 100644 --- a/Cubical/HITs/FreeAbGroup/Base.agda +++ b/Cubical/HITs/FreeAbGroup/Base.agda @@ -5,8 +5,8 @@ open import Cubical.Foundations.HLevels open import Cubical.Foundations.Function open import Cubical.Foundations.Isomorphism open import Cubical.Data.Nat hiding (_·_) -open import Cubical.Data.Fin.Inductive.Base -open import Cubical.Data.Fin.Inductive.Properties +open import Cubical.Data.Fin.Base +open import Cubical.Data.Fin.Properties open import Cubical.Data.Empty as ⊥ infixl 7 _·_ diff --git a/Cubical/HITs/FreeGroup/NormalForm.agda b/Cubical/HITs/FreeGroup/NormalForm.agda index 2afbca4e4e..e89789cb4a 100644 --- a/Cubical/HITs/FreeGroup/NormalForm.agda +++ b/Cubical/HITs/FreeGroup/NormalForm.agda @@ -102,9 +102,9 @@ module _ {A : Type ℓ} where GroupIso-FG-L/↘↙ : GroupIso (freeGroupGroup A) (List/↘↙group) Iso.fun (fst GroupIso-FG-L/↘↙) = fst FG→L/↘↙ Iso.inv (fst GroupIso-FG-L/↘↙) = fromL/ - Iso.rightInv (fst GroupIso-FG-L/↘↙) = + Iso.sec (fst GroupIso-FG-L/↘↙) = elimProp/ (λ _ → squash/ _ _) section-FG-L/↘↙ - Iso.leftInv (fst GroupIso-FG-L/↘↙) = + Iso.ret (fst GroupIso-FG-L/↘↙) = funExt⁻ (congS fst (freeGroupHom≡ {f = compGroupHom FG→L/↘↙ (fromL/ , isGroupHomFromL/)} {g = idGroupHom} (sym ∘ idr ∘ η ))) @@ -170,7 +170,7 @@ module _ {A : Type ℓ} where ΠNF⇒DiscreteA λ _≟_ g → let e = compIso (fst (GroupIso-FG-L/↘↙)) (invIso (Discrete.IsoNF _≟_)) (g' , n) = Iso.fun e g - in g' nf Iso.leftInv e g , n + in g' nf Iso.ret e g , n ≟→normalForm : Discrete A → (∀ g → NF g) ≟→normalForm _≟_ = invEq (NF⇔DiscreteA (Discrete→isSet _≟_)) _≟_ diff --git a/Cubical/HITs/FreeGroupoid/Properties.agda b/Cubical/HITs/FreeGroupoid/Properties.agda index bf889ae3c7..3e1c9326f3 100644 --- a/Cubical/HITs/FreeGroupoid/Properties.agda +++ b/Cubical/HITs/FreeGroupoid/Properties.agda @@ -158,13 +158,13 @@ forgetfulHom⁻¹ = invf , isHom where freeGroupTruncIdempotentBiInvEquiv : BiInvEquiv (FreeGroup A) ∥ FreeGroupoid A ∥₂ -freeGroupTruncIdempotentBiInvEquiv = biInvEquiv f invf rightInv invf leftInv where +freeGroupTruncIdempotentBiInvEquiv = biInvEquiv f invf sec invf ret where f : FreeGroup A → ∥ FreeGroupoid A ∥₂ f = fst forgetfulHom 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 + sec : ∀ (x : ∥ FreeGroupoid A ∥₂) → f (invf x) ≡ x + sec 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 ∣₂) @@ -197,8 +197,8 @@ freeGroupTruncIdempotentBiInvEquiv = biInvEquiv f invf rightInv invf leftInv whe ∣inv∣₂ ∣ g ∣₂ ≡⟨ refl ⟩ ∣ inv g ∣₂ ∎ - leftInv : ∀ (g : FreeGroup A) → invf (f g) ≡ g - leftInv g = freeGroupElimProp Bprop η-ind ·-ind ε-ind inv-ind g where + ret : ∀ (g : FreeGroup A) → invf (f g) ≡ g + ret g = freeGroupElimProp Bprop η-ind ·-ind ε-ind inv-ind g where Bprop : ∀ g → isProp (invf (f g) ≡ g) Bprop g = freeGroupIsSet (invf (f g)) g η-ind : ∀ a → invf (f (η a)) ≡ (η a) diff --git a/Cubical/HITs/GroupoidTruncation/Properties.agda b/Cubical/HITs/GroupoidTruncation/Properties.agda index 8e1aa1bf97..3dbc518fbb 100644 --- a/Cubical/HITs/GroupoidTruncation/Properties.agda +++ b/Cubical/HITs/GroupoidTruncation/Properties.agda @@ -59,8 +59,8 @@ groupoidTruncIdempotent≃ {A = A} hA = isoToEquiv f f : Iso ∥ A ∥₃ A Iso.fun f = rec hA (idfun A) Iso.inv f x = ∣ x ∣₃ - Iso.rightInv f _ = refl - Iso.leftInv f = elim (λ _ → isGroupoid→is2Groupoid isGroupoidGroupoidTrunc _ _) (λ _ → refl) + Iso.sec f _ = refl + Iso.ret f = elim (λ _ → isGroupoid→is2Groupoid isGroupoidGroupoidTrunc _ _) (λ _ → refl) groupoidTruncIdempotent : isGroupoid A → ∥ A ∥₃ ≡ A groupoidTruncIdempotent hA = ua (groupoidTruncIdempotent≃ hA) diff --git a/Cubical/HITs/InfNat/Properties.agda b/Cubical/HITs/InfNat/Properties.agda index b6c6f509e3..548785cc64 100644 --- a/Cubical/HITs/InfNat/Properties.agda +++ b/Cubical/HITs/InfNat/Properties.agda @@ -56,5 +56,5 @@ open Iso ℕ+∞⇔Cℕ+∞ : Iso ℕ+∞ Coprod.ℕ+∞ ℕ+∞⇔Cℕ+∞ .fun = ℕ+∞→Cℕ+∞ ℕ+∞⇔Cℕ+∞ .inv = Cℕ+∞→ℕ+∞ -ℕ+∞⇔Cℕ+∞ .leftInv = ℕ+∞→Cℕ+∞→ℕ+∞ -ℕ+∞⇔Cℕ+∞ .rightInv = Cℕ+∞→ℕ+∞→Cℕ+∞ +ℕ+∞⇔Cℕ+∞ .ret = ℕ+∞→Cℕ+∞→ℕ+∞ +ℕ+∞⇔Cℕ+∞ .sec = Cℕ+∞→ℕ+∞→Cℕ+∞ diff --git a/Cubical/HITs/Join/Base.agda b/Cubical/HITs/Join/Base.agda index f45fa5608d..2b3579fd11 100644 --- a/Cubical/HITs/Join/Base.agda +++ b/Cubical/HITs/Join/Base.agda @@ -84,8 +84,8 @@ joinS¹S¹→S³→joinS¹S¹ (push (loop j) (loop k) i) l = border-contraction S³IsojoinS¹S¹ : Iso S³ (join S¹ S¹) Iso.fun S³IsojoinS¹S¹ = S³→joinS¹S¹ Iso.inv S³IsojoinS¹S¹ = joinS¹S¹→S³ -Iso.rightInv S³IsojoinS¹S¹ = joinS¹S¹→S³→joinS¹S¹ -Iso.leftInv S³IsojoinS¹S¹ = S³→joinS¹S¹→S³ +Iso.sec S³IsojoinS¹S¹ = joinS¹S¹→S³→joinS¹S¹ +Iso.ret S³IsojoinS¹S¹ = S³→joinS¹S¹→S³ S³≡joinS¹S¹ : S³ ≡ join S¹ S¹ diff --git a/Cubical/HITs/Join/Properties.agda b/Cubical/HITs/Join/Properties.agda index 2cd9d519ef..83dc9d6b47 100644 --- a/Cubical/HITs/Join/Properties.agda +++ b/Cubical/HITs/Join/Properties.agda @@ -55,8 +55,8 @@ fun IsoFunSpaceJoin f = (f ∘ inl) , ((f ∘ inr) , (λ a b → cong f (push a inv IsoFunSpaceJoin (f , g , p) (inl x) = f x inv IsoFunSpaceJoin (f , g , p) (inr x) = g x inv IsoFunSpaceJoin (f , g , p) (push a b i) = p a b i -rightInv IsoFunSpaceJoin (f , g , p) = refl -leftInv IsoFunSpaceJoin f = +sec IsoFunSpaceJoin (f , g , p) = refl +ret IsoFunSpaceJoin f = funExt λ { (inl x) → refl ; (inr x) → refl ; (push a b i) → refl} -- Alternative definition of the join using a pushout @@ -465,8 +465,8 @@ join-comm : ∀ {ℓ'} {A : Type ℓ} {B : Type ℓ'} → Iso (join A B) (join B A) fun join-comm = join-commFun inv join-comm = join-commFun -rightInv join-comm = join-commFun² -leftInv join-comm = join-commFun² +sec join-comm = join-commFun² +ret join-comm = join-commFun² join→ : ∀ {ℓ'' ℓ'''} {A : Type ℓ} {B : Type ℓ'} {C : Type ℓ''} {D : Type ℓ'''} @@ -481,14 +481,14 @@ Iso→joinIso : ∀ {ℓ'' ℓ'''} → Iso A C → Iso B D → Iso (join A B) (join C D) fun (Iso→joinIso is1 is2) x = join→ (Iso.fun is1) (Iso.fun is2) x inv (Iso→joinIso is1 is2) x = join→ (Iso.inv is1) (Iso.inv is2) x -rightInv (Iso→joinIso is1 is2) (inl x) i = inl (rightInv is1 x i) -rightInv (Iso→joinIso is1 is2) (inr x) i = inr (rightInv is2 x i) -rightInv (Iso→joinIso is1 is2) (push a b j) i = - push (rightInv is1 a i) (rightInv is2 b i) j -leftInv (Iso→joinIso is1 is2) (inl x) i = inl (leftInv is1 x i) -leftInv (Iso→joinIso is1 is2) (inr x) i = inr (leftInv is2 x i) -leftInv (Iso→joinIso is1 is2) (push a b i) j = - push (leftInv is1 a j) (leftInv is2 b j) i +sec (Iso→joinIso is1 is2) (inl x) i = inl (sec is1 x i) +sec (Iso→joinIso is1 is2) (inr x) i = inr (sec is2 x i) +sec (Iso→joinIso is1 is2) (push a b j) i = + push (sec is1 a i) (sec is2 b i) j +ret (Iso→joinIso is1 is2) (inl x) i = inl (ret is1 x i) +ret (Iso→joinIso is1 is2) (inr x) i = inr (ret is2 x i) +ret (Iso→joinIso is1 is2) (push a b i) j = + push (ret is1 a j) (ret is2 b j) i joinAnnihilL : {A : Type ℓ} → isContr (join (Unit* {ℓ'}) A) @@ -709,5 +709,5 @@ module _ {A : Pointed ℓ} {B : Pointed ℓ'} (f : A →∙ B) where GaneaIso : Iso GaneaFib (join (fiber (fst f) (pt B)) (Ω B .fst)) fun GaneaIso = GaneaFib→join inv GaneaIso = join→GaneaFib - rightInv GaneaIso = join→GaneaFib→join - leftInv GaneaIso = GaneaFib→join→GaneaFib + sec GaneaIso = join→GaneaFib→join + ret GaneaIso = GaneaFib→join→GaneaFib diff --git a/Cubical/HITs/KleinBottle/Properties.agda b/Cubical/HITs/KleinBottle/Properties.agda index 7771bf5116..a82f871d31 100644 --- a/Cubical/HITs/KleinBottle/Properties.agda +++ b/Cubical/HITs/KleinBottle/Properties.agda @@ -66,8 +66,8 @@ Iso.inv K²FunCharacIso (a , p1 , p2 , sq) point = a Iso.inv K²FunCharacIso (a , p1 , p2 , sq) (line1 i) = p1 i Iso.inv K²FunCharacIso (a , p1 , p2 , sq) (line2 i) = p2 i Iso.inv K²FunCharacIso (a , p1 , p2 , sq) (square i j) = sq i j -Iso.rightInv K²FunCharacIso _ = refl -Iso.leftInv K²FunCharacIso f = +Iso.sec K²FunCharacIso _ = refl +Iso.ret K²FunCharacIso f = funExt λ { point → refl ; (line1 i) → refl ; (line2 i) → refl ; (square i i₁) → refl} diff --git a/Cubical/HITs/MappingCones/Properties.agda b/Cubical/HITs/MappingCones/Properties.agda index 3eee9af7cd..c6eb43e557 100644 --- a/Cubical/HITs/MappingCones/Properties.agda +++ b/Cubical/HITs/MappingCones/Properties.agda @@ -22,12 +22,12 @@ Iso.fun (PushoutUnit-iso-Cone f) (push x i) = spoke x i Iso.inv (PushoutUnit-iso-Cone f) (inj x) = inr x Iso.inv (PushoutUnit-iso-Cone f) hub = inl tt Iso.inv (PushoutUnit-iso-Cone f) (spoke x i) = push x i -Iso.rightInv (PushoutUnit-iso-Cone f) (inj x) = refl -Iso.rightInv (PushoutUnit-iso-Cone f) hub = refl -Iso.rightInv (PushoutUnit-iso-Cone f) (spoke x i) = refl -Iso.leftInv (PushoutUnit-iso-Cone f) (inl tt) = refl -Iso.leftInv (PushoutUnit-iso-Cone f) (inr x) = refl -Iso.leftInv (PushoutUnit-iso-Cone f) (push x i) = refl +Iso.sec (PushoutUnit-iso-Cone f) (inj x) = refl +Iso.sec (PushoutUnit-iso-Cone f) hub = refl +Iso.sec (PushoutUnit-iso-Cone f) (spoke x i) = refl +Iso.ret (PushoutUnit-iso-Cone f) (inl tt) = refl +Iso.ret (PushoutUnit-iso-Cone f) (inr x) = refl +Iso.ret (PushoutUnit-iso-Cone f) (push x i) = refl PushoutUnit≡Cone : ∀ {X : Type ℓ} {Y : Type ℓ'} (f : X → Y) → Pushout (const tt) f ≡ Cone f PushoutUnit≡Cone f = isoToPath (PushoutUnit-iso-Cone f) @@ -39,12 +39,12 @@ Iso.fun (ConesUnit-iso-Cone f) (spoke tt x i) = spoke x i Iso.inv (ConesUnit-iso-Cone f) (inj x) = inj x Iso.inv (ConesUnit-iso-Cone f) hub = hub tt Iso.inv (ConesUnit-iso-Cone f) (spoke x i) = spoke tt x i -Iso.rightInv (ConesUnit-iso-Cone f) (inj x) = refl -Iso.rightInv (ConesUnit-iso-Cone f) hub = refl -Iso.rightInv (ConesUnit-iso-Cone f) (spoke x i) = refl -Iso.leftInv (ConesUnit-iso-Cone f) (inj x) = refl -Iso.leftInv (ConesUnit-iso-Cone f) (hub x) = refl -Iso.leftInv (ConesUnit-iso-Cone f) (spoke a x i) = refl +Iso.sec (ConesUnit-iso-Cone f) (inj x) = refl +Iso.sec (ConesUnit-iso-Cone f) hub = refl +Iso.sec (ConesUnit-iso-Cone f) (spoke x i) = refl +Iso.ret (ConesUnit-iso-Cone f) (inj x) = refl +Iso.ret (ConesUnit-iso-Cone f) (hub x) = refl +Iso.ret (ConesUnit-iso-Cone f) (spoke a x i) = refl ConesUnit≡Cone : ∀ {X : Type ℓ} {Y : Type ℓ'} (f : X → Y) → (Cones Unit (λ { tt → f })) ≡ (Cone f) ConesUnit≡Cone f = isoToPath (ConesUnit-iso-Cone f) diff --git a/Cubical/HITs/Modulo/FinEquiv.agda b/Cubical/HITs/Modulo/FinEquiv.agda index d9a14ca2f7..5e0bb334fc 100644 --- a/Cubical/HITs/Modulo/FinEquiv.agda +++ b/Cubical/HITs/Modulo/FinEquiv.agda @@ -1,4 +1,3 @@ - module Cubical.HITs.Modulo.FinEquiv where open import Cubical.Foundations.Function @@ -8,6 +7,9 @@ open import Cubical.Foundations.Prelude open import Cubical.Data.Fin open import Cubical.Data.Nat open import Cubical.Data.Nat.Order +open import Cubical.Data.Nat.Order.Inductive + +open import Cubical.Data.Sigma.Properties open import Cubical.HITs.Modulo.Base @@ -19,13 +21,16 @@ module Reduction {k₀ : ℕ} where k = suc k₀ fembed : Fin k → Modulo k - fembed = embed ∘ toℕ + fembed = embed ∘ (toℕ {k}) ResiduePath : ℕ → Type₀ ResiduePath n = Σ[ f ∈ Fin k ] fembed f ≡ embed n + rbaseᵗ : ∀ n (n<ᵗk : n <ᵗ k) → ResiduePath n + rbaseᵗ n n<ᵗk = (n , n<ᵗk) , refl + rbase : ∀ n (n²-swap _ p (inr tt) _)) @@ -943,7 +943,7 @@ module _ {G' : AbGroup ℓ} {H' : AbGroup ℓ'} where → _⌣ₖ_ {n = suc m} {m = suc (suc n)} y x ≡ Fₗ p q (_⌣ₖ_ {n = suc (suc n)} {m = (suc m)} x y) improveₗ p q x y = - (sym (Iso.leftInv (Iso→EMIso ⨂-comm (suc m +' (suc (suc n)))) (y ⌣ₖ x)) + (sym (Iso.ret (Iso→EMIso ⨂-comm (suc m +' (suc (suc n)))) (y ⌣ₖ x)) ∙ cong (Iso.inv (Iso→EMIso ⨂-comm (suc m +' (suc (suc n))))) (sym (-ₖ^< suc (suc n) · suc m >² _ p q _) ∙ cong (-ₖ^< suc (suc n) · suc m > _ p q) @@ -1114,7 +1114,7 @@ module _ {G' : AbGroup ℓ} {H' : AbGroup ℓ'} where (cong (Iso.inv (Iso→EMIso ⨂-comm _)) (sym (-ₖ^< suc (suc n) · suc m >-Induced (suc (suc (m +ℕ n))) p (evenOrOdd (suc m)) (GroupEquiv→GroupHom ⨂-comm) _)) - ∙ Iso.leftInv (Iso→EMIso ⨂-comm (suc (suc (m +ℕ n)))) _) + ∙ Iso.ret (Iso→EMIso ⨂-comm (suc (suc (m +ℕ n)))) _) cong-Fₗ-expr₁ : expr₁ ≡ EM→ΩEM+1 (suc (m +ℕ suc n)) expr₂ cong-Fₗ-expr₁ = cong (cong (Iso.inv (Iso→EMIso ⨂-comm _) ∘ @@ -1294,7 +1294,7 @@ module _ {G' : AbGroup ℓ} {H' : AbGroup ℓ'} where (evenOrOdd (suc m)) (comm⨂-EM (suc m) (_⌣ₖ_ {m = zero} y x))) ⌣ₖ-comm (suc n) zero x y = - sym (Iso.leftInv (Iso→EMIso ⨂-comm _) + sym (Iso.ret (Iso→EMIso ⨂-comm _) (_⌣ₖ_ {n = suc n} {m = zero} x y)) ∙ sym (comm⨂-EM≡comm⨂-EM' (suc n) _) ∙ cong (comm⨂-EM (suc n)) (sym (⌣ₖ-comm₀ n y x)) diff --git a/Cubical/Homotopy/EilenbergMacLane/GroupStructure.agda b/Cubical/Homotopy/EilenbergMacLane/GroupStructure.agda index 85b3c45ad1..107dc7814d 100644 --- a/Cubical/Homotopy/EilenbergMacLane/GroupStructure.agda +++ b/Cubical/Homotopy/EilenbergMacLane/GroupStructure.agda @@ -405,11 +405,11 @@ module _ {G : AbGroup ℓ} where addIso : (n : ℕ) (x : EM G n) → Iso (EM G n) (EM G n) Iso.fun (addIso n x) y = y +[ n ]ₖ x Iso.inv (addIso n x) y = y -[ n ]ₖ x - Iso.rightInv (addIso n x) y = + Iso.sec (addIso n x) y = sym (assocₖ n y (-[ n ]ₖ x) x) ∙∙ cong (λ x → y +[ n ]ₖ x) (lCancelₖ n x) ∙∙ rUnitₖ n y - Iso.leftInv (addIso n x) y = + Iso.ret (addIso n x) y = sym (assocₖ n y x (-[ n ]ₖ x)) ∙∙ cong (λ x → y +[ n ]ₖ x) (rCancelₖ n x) ∙∙ rUnitₖ n y diff --git a/Cubical/Homotopy/EilenbergMacLane/Properties.agda b/Cubical/Homotopy/EilenbergMacLane/Properties.agda index 3715ff1d6a..58a63e397e 100644 --- a/Cubical/Homotopy/EilenbergMacLane/Properties.agda +++ b/Cubical/Homotopy/EilenbergMacLane/Properties.agda @@ -115,11 +115,11 @@ module _ (Ĝ : Group ℓ) where isom : Iso G G isom .Iso.fun = _· g isom .Iso.inv = _· inv g - isom .Iso.rightInv h = + isom .Iso.sec h = (h · inv g) · g ≡⟨ (·Assoc h (inv g) g) ⁻¹ ⟩ h · inv g · g ≡⟨ cong (h ·_) (·InvL g) ⟩ h · 1g ≡⟨ ·IdR h ⟩ h ∎ - isom .Iso.leftInv h = + isom .Iso.ret h = (h · g) · inv g ≡⟨ (·Assoc h g (inv g)) ⁻¹ ⟩ h · g · inv g ≡⟨ cong (h ·_) (·InvR g) ⟩ h · 1g ≡⟨ ·IdR h ⟩ h ∎ @@ -174,8 +174,8 @@ module _ (Ĝ : Group ℓ) where ΩEM₁Iso : Iso (Path (EM₁ Ĝ) embase embase) G Iso.fun ΩEM₁Iso = encode embase Iso.inv ΩEM₁Iso = emloop - Iso.rightInv ΩEM₁Iso = encode-decode embase - Iso.leftInv ΩEM₁Iso = decode-encode embase + Iso.sec ΩEM₁Iso = encode-decode embase + Iso.ret ΩEM₁Iso = decode-encode embase ΩEM₁≡ : (Path (EM₁ Ĝ) embase embase) ≡ G ΩEM₁≡ = isoToPath ΩEM₁Iso @@ -292,8 +292,8 @@ module _ {G : AbGroup ℓ} where Iso-EM-ΩEM+1 zero = invIso (ΩEM₁Iso (AbGroup→Group G)) Iso.fun (Iso-EM-ΩEM+1 (suc n)) = decode' n (0ₖ (2 + n)) Iso.inv (Iso-EM-ΩEM+1 (suc n)) = encode' n ∣ north ∣ - Iso.rightInv (Iso-EM-ΩEM+1 (suc n)) = decode'-encode' _ _ - Iso.leftInv (Iso-EM-ΩEM+1 (suc n)) = encode'-decode' _ + Iso.sec (Iso-EM-ΩEM+1 (suc n)) = decode'-encode' _ _ + Iso.ret (Iso-EM-ΩEM+1 (suc n)) = encode'-decode' _ EM≃ΩEM+1 : (n : ℕ) → EM G n ≃ typ (Ω (EM∙ G (suc n))) EM≃ΩEM+1 n = isoToEquiv (Iso-EM-ΩEM+1 n) @@ -329,15 +329,15 @@ module _ {G : AbGroup ℓ} where ΩEM+1→EM-sym : (n : ℕ) (p : typ (Ω (EM∙ G (suc n)))) → ΩEM+1→EM n (sym p) ≡ -ₖ (ΩEM+1→EM n p) ΩEM+1→EM-sym n p = sym (cong (ΩEM+1→EM n) (EM→ΩEM+1-sym n (ΩEM+1→EM n p) - ∙ cong sym (Iso.rightInv (Iso-EM-ΩEM+1 n) p))) - ∙ Iso.leftInv (Iso-EM-ΩEM+1 n) (-ₖ ΩEM+1→EM n p) + ∙ cong sym (Iso.sec (Iso-EM-ΩEM+1 n) p))) + ∙ Iso.ret (Iso-EM-ΩEM+1 n) (-ₖ ΩEM+1→EM n p) ΩEM+1→EM-hom : (n : ℕ) → (p q : typ (Ω (EM∙ G (suc n)))) → ΩEM+1→EM n (p ∙ q) ≡ (ΩEM+1→EM n p) +[ n ]ₖ (ΩEM+1→EM n q) ΩEM+1→EM-hom n = morphLemmas.isMorphInv (λ x y → x +[ n ]ₖ y) (_∙_) (EM→ΩEM+1 n) (EM→ΩEM+1-hom n) (ΩEM+1→EM n) - (Iso.rightInv (Iso-EM-ΩEM+1 n)) (Iso.leftInv (Iso-EM-ΩEM+1 n)) + (Iso.sec (Iso-EM-ΩEM+1 n)) (Iso.ret (Iso-EM-ΩEM+1 n)) ΩEM+1→EM-refl : (n : ℕ) → ΩEM+1→EM n refl ≡ 0ₖ n ΩEM+1→EM-refl zero = transportRefl 0g @@ -472,7 +472,7 @@ module _ {G : AbGroup ℓ} where (EM→ΩEM+1-gen n p y)) (EM-raw'→EM∙ G (suc n)) ∙ (λ i → ΩEM+1-gen→EM-0ₖ n (EM→ΩEM+1-gen-0ₖ n y i) i) - ∙ Iso.leftInv (Iso-EM-ΩEM+1 n) y) + ∙ Iso.ret (Iso-EM-ΩEM+1 n) y) ΩEM+1→EM→ΩEM+1-gen : (n : ℕ) (x : EM G (suc n)) → (y : x ≡ x) → EM→ΩEM+1-gen n x (ΩEM+1→EM-gen n x y) ≡ y @@ -488,14 +488,14 @@ module _ {G : AbGroup ℓ} where → EM→ΩEM+1-gen n p (ΩEM+1→EM-gen n p y) ≡ y) (sym (EM-raw'→EM∙ _ (suc n))) λ p → (λ i → EM→ΩEM+1-gen-0ₖ n (ΩEM+1-gen→EM-0ₖ n p i) i) - ∙ Iso.rightInv (Iso-EM-ΩEM+1 n) p)) + ∙ Iso.sec (Iso-EM-ΩEM+1 n) p)) Iso-EM-ΩEM+1-gen : (n : ℕ) (x : EM G (suc n)) → Iso (EM G n) (x ≡ x) Iso.fun (Iso-EM-ΩEM+1-gen n x) = EM→ΩEM+1-gen n x Iso.inv (Iso-EM-ΩEM+1-gen n x) = ΩEM+1→EM-gen n x - Iso.rightInv (Iso-EM-ΩEM+1-gen n x) = ΩEM+1→EM→ΩEM+1-gen n x - Iso.leftInv (Iso-EM-ΩEM+1-gen n x) = EM→ΩEM+1→EM-gen n x + Iso.sec (Iso-EM-ΩEM+1-gen n x) = ΩEM+1→EM→ΩEM+1-gen n x + Iso.ret (Iso-EM-ΩEM+1-gen n x) = EM→ΩEM+1→EM-gen n x ΩEM+1→EM-gen-refl : (n : ℕ) (x : EM G (suc n)) → ΩEM+1→EM-gen n x refl ≡ 0ₖ n @@ -594,8 +594,8 @@ module _ where fst (Iso.inv (EM₁→∙Iso m) f) embase-raw = 0ₖ (suc m) fst (Iso.inv (EM₁→∙Iso m) f) (emloop-raw g i) = f g i snd (Iso.inv (EM₁→∙Iso m) f) = refl - Iso.rightInv (EM₁→∙Iso m) f = funExt λ x → sym (rUnit _) - Iso.leftInv (EM₁→∙Iso m) (f , p) = + Iso.sec (EM₁→∙Iso m) f = funExt λ x → sym (rUnit _) + Iso.ret (EM₁→∙Iso m) (f , p) = →∙Homogeneous≡ (isHomogeneousEM _) (funExt λ { embase-raw → sym p ; (emloop-raw g i) j @@ -1006,7 +1006,7 @@ inducedFun-EM-rawIso : {G' : AbGroup ℓ} {H' : AbGroup ℓ'} → ∀ n → Iso (EM-raw G' n) (EM-raw H' n) Iso.fun (inducedFun-EM-rawIso e n) = inducedFun-EM-raw (_ , (snd e)) n Iso.inv (inducedFun-EM-rawIso e n) = inducedFun-EM-raw (_ , isGroupHomInv e) n -Iso.rightInv (inducedFun-EM-rawIso e n) = h n +Iso.sec (inducedFun-EM-rawIso e n) = h n where h : (n : ℕ) → section (inducedFun-EM-raw (fst e .fst , snd e) n) (inducedFun-EM-raw (invEq (fst e) , isGroupHomInv e) n) @@ -1020,7 +1020,7 @@ Iso.rightInv (inducedFun-EM-rawIso e n) = h n λ n p → λ { north → refl ; south → refl ; (merid a i) k → merid (p a k) i} -Iso.leftInv (inducedFun-EM-rawIso e n) = h n +Iso.ret (inducedFun-EM-rawIso e n) = h n where h : (n : ℕ) → retract (Iso.fun (inducedFun-EM-rawIso e n)) (Iso.inv (inducedFun-EM-rawIso e n)) @@ -1037,8 +1037,8 @@ Iso.leftInv (inducedFun-EM-rawIso e n) = h n Iso→EM₁Iso : {G : Group ℓ} {H : Group ℓ'} → GroupIso G H → Iso (EM₁ G) (EM₁ H) Iso→EM₁Iso e .Iso.fun = inducedFun-EM₁ (GroupIso→GroupHom e) Iso→EM₁Iso e .Iso.inv = inducedFun-EM₁ (GroupIso→GroupHom (invGroupIso e)) -Iso→EM₁Iso e .Iso.rightInv = elimSet _ (λ _ → emsquash _ _) refl λ x i j → emloop (e .fst .Iso.rightInv x j) i -Iso→EM₁Iso e .Iso.leftInv = elimSet _ (λ _ → emsquash _ _) refl λ x i j → emloop (e .fst .Iso.leftInv x j) i +Iso→EM₁Iso e .Iso.sec = elimSet _ (λ _ → emsquash _ _) refl λ x i j → emloop (e .fst .Iso.sec x j) i +Iso→EM₁Iso e .Iso.ret = elimSet _ (λ _ → emsquash _ _) refl λ x i j → emloop (e .fst .Iso.ret x j) i Equiv→EM₁Equiv : {G : Group ℓ} {H : Group ℓ'} → GroupEquiv G H → EM₁ G ≃ EM₁ H Equiv→EM₁Equiv e = isoToEquiv (Iso→EM₁Iso (GroupEquiv→GroupIso e)) @@ -1047,17 +1047,17 @@ module _ {G : AbGroup ℓ} {H : AbGroup ℓ'} (e : AbGroupEquiv G H) where Iso→EMIso : ∀ n → Iso (EM G n) (EM H n) Iso.fun (Iso→EMIso n) = inducedFun-EM (GroupEquiv→GroupHom e) n Iso.inv (Iso→EMIso n) = inducedFun-EM (GroupEquiv→GroupHom (invGroupEquiv e)) n - Iso.rightInv (Iso→EMIso zero) = Iso.rightInv (inducedFun-EM-rawIso e zero) - Iso.rightInv (Iso→EMIso (suc zero)) = - Iso.rightInv (inducedFun-EM-rawIso e (suc zero)) - Iso.rightInv (Iso→EMIso (suc (suc n))) = - Iso.rightInv (mapCompIso (inducedFun-EM-rawIso e (suc (suc n)))) - Iso.leftInv (Iso→EMIso zero) = - Iso.leftInv (inducedFun-EM-rawIso e zero) - Iso.leftInv (Iso→EMIso (suc zero)) = - Iso.leftInv (inducedFun-EM-rawIso e (suc zero)) - Iso.leftInv (Iso→EMIso (suc (suc n))) = - Iso.leftInv (mapCompIso (inducedFun-EM-rawIso e (suc (suc n)))) + Iso.sec (Iso→EMIso zero) = Iso.sec (inducedFun-EM-rawIso e zero) + Iso.sec (Iso→EMIso (suc zero)) = + Iso.sec (inducedFun-EM-rawIso e (suc zero)) + Iso.sec (Iso→EMIso (suc (suc n))) = + Iso.sec (mapCompIso (inducedFun-EM-rawIso e (suc (suc n)))) + Iso.ret (Iso→EMIso zero) = + Iso.ret (inducedFun-EM-rawIso e zero) + Iso.ret (Iso→EMIso (suc zero)) = + Iso.ret (inducedFun-EM-rawIso e (suc zero)) + Iso.ret (Iso→EMIso (suc (suc n))) = + Iso.ret (mapCompIso (inducedFun-EM-rawIso e (suc (suc n)))) Iso→EMIso∙ : ∀ n → Iso.fun (Iso→EMIso n) (EM∙ G n .snd) ≡ EM∙ H n .snd Iso→EMIso∙ zero = IsGroupHom.pres1 (e .snd) diff --git a/Cubical/Homotopy/Group/Base.agda b/Cubical/Homotopy/Group/Base.agda index ab2cd2092c..75c7f75476 100644 --- a/Cubical/Homotopy/Group/Base.agda +++ b/Cubical/Homotopy/Group/Base.agda @@ -241,18 +241,18 @@ SphereMapΩIso : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) (typ (Ω (S₊∙ n →∙ A ∙))) fun (SphereMapΩIso n) = SphereMapΩ n inv (SphereMapΩIso n) = ΩSphereMap n -fst (rightInv (SphereMapΩIso zero) f i j) false = rUnit (λ j → fst (f j) false) (~ i) j -fst (rightInv (SphereMapΩIso {A = A} zero) f i j) true = snd (f j) (~ i) -snd (rightInv (SphereMapΩIso {A = A} zero) f i j) k = snd (f j) (~ i ∨ k) -rightInv (SphereMapΩIso (suc n)) = leftInv IsoΩFunSuspFun -leftInv (SphereMapΩIso zero) f = +fst (sec (SphereMapΩIso zero) f i j) false = rUnit (λ j → fst (f j) false) (~ i) j +fst (sec (SphereMapΩIso {A = A} zero) f i j) true = snd (f j) (~ i) +snd (sec (SphereMapΩIso {A = A} zero) f i j) k = snd (f j) (~ i ∨ k) +sec (SphereMapΩIso (suc n)) = ret IsoΩFunSuspFun +ret (SphereMapΩIso zero) f = ΣPathP ((funExt (λ { base → sym (snd f) ; (loop i) j → doubleCompPath-filler (sym (snd f)) (cong (fst f) loop) (snd f) (~ j) i})) , λ i j → snd f (~ i ∨ j)) -leftInv (SphereMapΩIso (suc n)) = rightInv IsoΩFunSuspFun +ret (SphereMapΩIso (suc n)) = sec IsoΩFunSuspFun {- In order to show that Ω→SphereMap is an equivalence, we show that it factors @@ -324,13 +324,13 @@ isEquiv-Ω→SphereMap zero {A = A} = , λ i j → snd f (~ i ∨ j))) λ _ → refl)) isEquiv-Ω→SphereMap (suc zero) {A = A} = - isoToIsEquiv (iso _ invFun sec λ p → sym (rUnit p)) + isoToIsEquiv (iso _ invFun sec' λ p → sym (rUnit p)) where invFun : S₊∙ 1 →∙ A → typ (Ω A) invFun (f , p) = sym p ∙∙ cong f loop ∙∙ p - sec : section (Ω→SphereMap 1) invFun - sec (f , p) = + sec' : section (Ω→SphereMap 1) invFun + sec' (f , p) = ΣPathP ((funExt (λ { base → sym p ; (loop i) j → doubleCompPath-filler (sym p) (cong f loop) p (~ j) i})) @@ -418,8 +418,8 @@ IsoSphereMapΩ-pres∙Π n = morphLemmas.isMorphInv _∙_ ∙Π (Ω→SphereMap (suc n)) (isHom-Ω→SphereMap n) (SphereMap→Ω (suc n)) - (leftInv (IsoSphereMapΩ (suc n))) - (rightInv (IsoSphereMapΩ (suc n))) + (ret (IsoSphereMapΩ (suc n))) + (sec (IsoSphereMapΩ (suc n))) -- It is useful to define the ``Group Structure'' on (S₊∙ n →∙ A) -- before doing it on π'. These will be the equivalents of the @@ -572,23 +572,23 @@ snd (∙Π-lCancel {A = A} {n = suc n} f i) = refl → (f g h : S₊∙ (suc n) →∙ A) → ∙Π f (∙Π g h) ≡ ∙Π (∙Π f g) h ∙Π-assoc {n = n} f g h = - sym (leftInv (IsoSphereMapΩ (suc n)) (∙Π f (∙Π g h))) + sym (ret (IsoSphereMapΩ (suc n)) (∙Π f (∙Π g h))) ∙∙ cong (Ω→SphereMap (suc n)) (IsoSphereMapΩ-pres∙Π n f (∙Π g h) ∙∙ cong (SphereMap→Ω (suc n) f ∙_) (IsoSphereMapΩ-pres∙Π n g h) ∙∙ ∙assoc (SphereMap→Ω (suc n) f) (SphereMap→Ω (suc n) g) (SphereMap→Ω (suc n) h) ∙∙ cong (_∙ SphereMap→Ω (suc n) h) (sym (IsoSphereMapΩ-pres∙Π n f g)) ∙∙ sym (IsoSphereMapΩ-pres∙Π n (∙Π f g) h)) - ∙∙ leftInv (IsoSphereMapΩ (suc n)) (∙Π (∙Π f g) h) + ∙∙ ret (IsoSphereMapΩ (suc n)) (∙Π (∙Π f g) h) ∙Π-comm : ∀ {ℓ} {A : Pointed ℓ} {n : ℕ} → (f g : S₊∙ (suc (suc n)) →∙ A) → ∙Π f g ≡ ∙Π g f ∙Π-comm {A = A} {n = n} f g = - sym (leftInv (IsoSphereMapΩ (suc (suc n))) (∙Π f g)) + sym (ret (IsoSphereMapΩ (suc (suc n))) (∙Π f g)) ∙∙ cong (Ω→SphereMap (suc (suc n))) (IsoSphereMapΩ-pres∙Π (suc n) f g ∙∙ EH _ _ _ ∙∙ sym (IsoSphereMapΩ-pres∙Π (suc n) g f)) - ∙∙ leftInv (IsoSphereMapΩ (suc (suc n))) (∙Π g f) + ∙∙ ret (IsoSphereMapΩ (suc (suc n))) (∙Π g f) {- π'' as a group -} 1π' : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} → π' n A @@ -651,9 +651,9 @@ fun (fst (π'GrLiftIso ℓ' n)) = inv (fst (π'GrLiftIso ℓ' n)) = sMap λ f → (λ x → lift (fst f x)) , (cong lift (snd f)) -rightInv (fst (π'GrLiftIso ℓ' n)) = +sec (fst (π'GrLiftIso ℓ' n)) = sElim (λ _ → isSetPathImplicit) λ f → refl -leftInv (fst (π'GrLiftIso ℓ' n)) = +ret (fst (π'GrLiftIso ℓ' n)) = sElim (λ _ → isSetPathImplicit) λ f → refl snd (π'GrLiftIso ℓ' zero) = makeIsGroupHom (sElim2 (λ _ _ → isSetPathImplicit) @@ -1026,7 +1026,7 @@ snd (πHom n f) = (transportRefl (fun (IsoSphereMapΩ (suc n)) g) i)) i)) ∙ sym (funExt⁻ (cong fst (Ω^→≈post∘∙ n f)) (fun (IsoSphereMapΩ (suc n)) g)) - ∙ cong (f ∘∙_) (leftInv (IsoSphereMapΩ (suc n)) g))) + ∙ cong (f ∘∙_) (ret (IsoSphereMapΩ (suc n)) g))) π'∘∙Hom : ∀ {ℓ ℓ'} {A : Pointed ℓ} {B : Pointed ℓ'} (n : ℕ) (f : A →∙ B) → GroupHom (π'Gr n A) (π'Gr n B) @@ -1174,12 +1174,12 @@ sphereFunIso (suc n) = ΩSuspAdjointIso (n : ℕ) (f g : S₊∙ (suc n) →∙ A) (h : A →∙ B) → h ∘∙ ∙Π f g ≡ ∙Π (h ∘∙ f) (h ∘∙ g) ∙Π∘∙ {A = A} n f g h = - cong (h ∘∙_) (cong₂ ∙Π (sym (Iso.rightInv (sphereFunIso n) f)) - (sym (Iso.rightInv (sphereFunIso n) g))) + cong (h ∘∙_) (cong₂ ∙Π (sym (Iso.sec (sphereFunIso n) f)) + (sym (Iso.sec (sphereFunIso n) g))) ∙∙ lem2 n (Iso.inv (sphereFunIso n) f) (Iso.inv (sphereFunIso n) g) ∙∙ cong₂ (λ f g → ∙Π (h ∘∙ f) (h ∘∙ g)) - (Iso.rightInv (sphereFunIso n) f) - (Iso.rightInv (sphereFunIso n) g) + (Iso.sec (sphereFunIso n) f) + (Iso.sec (sphereFunIso n) g) where lem : ∀ {ℓ} {A : Type ℓ} {x y : A} (p : x ≡ y) → Square p refl (refl ∙ p) refl lem p = lUnit p ◁ λ i j → (refl ∙ p) (i ∨ j) diff --git a/Cubical/Homotopy/Group/Join.agda b/Cubical/Homotopy/Group/Join.agda index d2e6a04758..28c0a47887 100644 --- a/Cubical/Homotopy/Group/Join.agda +++ b/Cubical/Homotopy/Group/Join.agda @@ -221,13 +221,13 @@ private λ g → cong ∣_∣₂ (cong (fun (Iso-JoinMap-SphereMap n m)) (sym (·Π≡+* f g)) ∙ ∘∙-assoc _ _ _ - ∙ cong (∙Π f g ∘∙_) ret + ∙ cong (∙Π f g ∘∙_) ret' ∙ ∘∙-idˡ (∙Π f g) ∙ cong₂ ∙Π - ((sym (∘∙-idˡ f) ∙ cong (f ∘∙_) (sym ret)) ∙ sym (∘∙-assoc _ _ _)) - (sym (∘∙-idˡ g) ∙ cong (g ∘∙_) (sym ret) ∙ sym (∘∙-assoc _ _ _)))) + ((sym (∘∙-idˡ f) ∙ cong (f ∘∙_) (sym ret')) ∙ sym (∘∙-assoc _ _ _)) + (sym (∘∙-idˡ g) ∙ cong (g ∘∙_) (sym ret') ∙ sym (∘∙-assoc _ _ _)))) where - ret = ≃∙→ret/sec∙ {B = _ , ptSn (suc (n + m))} + ret' = ≃∙→ret/sec∙ {B = _ , ptSn (suc (n + m))} (joinSphereEquiv∙ n m) .snd -π*≡-π' : ∀ {ℓ} {A : Pointed ℓ} {n m : ℕ} @@ -241,11 +241,11 @@ private (cong (_∘∙ (≃∙map (invEquiv∙ (joinSphereEquiv∙ n m)))) (sym (-Π≡-* f)) ∙ ∘∙-assoc _ _ _ - ∙ cong (-Π f ∘∙_) ret + ∙ cong (-Π f ∘∙_) ret' ∙ ∘∙-idˡ (-Π f) - ∙ cong -Π (sym (∘∙-assoc _ _ _ ∙ cong (f ∘∙_) ret ∙ ∘∙-idˡ f)))) + ∙ cong -Π (sym (∘∙-assoc _ _ _ ∙ cong (f ∘∙_) ret' ∙ ∘∙-idˡ f)))) where - ret = ≃∙→ret/sec∙ {B = _ , ptSn (suc (n + m))} + ret' = ≃∙→ret/sec∙ {B = _ , ptSn (suc (n + m))} (joinSphereEquiv∙ n m) .snd -- Homotopy groups in terms of joins @@ -269,8 +269,8 @@ isGroup (snd (π*Gr n m A)) = → funExt λ g → transportRefl _ ∙ π*≡π' _ _ ∙ cong₂ (·π' (n + m)) - (Iso.rightInv (Iso-π*-π' n m) _ ∙ transportRefl f) - (Iso.rightInv (Iso-π*-π' n m) _ ∙ transportRefl g)) + (Iso.sec (Iso-π*-π' n m) _ ∙ transportRefl f) + (Iso.sec (Iso-π*-π' n m) _ ∙ transportRefl g)) p3 : PathP (λ i → isoToPath (Iso-π*-π' {A = A} n m) i → isoToPath (Iso-π*-π' {A = A} n m) i) @@ -278,7 +278,7 @@ isGroup (snd (π*Gr n m A)) = p3 = toPathP (funExt λ f → transportRefl _ ∙ -π*≡-π' _ ∙ cong (-π' (n + m)) - (Iso.rightInv (Iso-π*-π' n m) _ ∙ transportRefl f)) + (Iso.sec (Iso-π*-π' n m) _ ∙ transportRefl f)) -- Homotopy groups in terms of joins agrees with usual definition π*Gr≅π'Gr : ∀ {ℓ} (n m : ℕ) (A : Pointed ℓ) diff --git a/Cubical/Homotopy/Group/LES.agda b/Cubical/Homotopy/Group/LES.agda index 09465ae854..75da41c4d8 100644 --- a/Cubical/Homotopy/Group/LES.agda +++ b/Cubical/Homotopy/Group/LES.agda @@ -121,9 +121,9 @@ fun (ΩFibreIso f) p = (cong fst p) , (cong snd p) fst (inv (ΩFibreIso f) (p , q) i) = p i snd (inv (ΩFibreIso f) (p , q) i) = ←∙∙lCancel (cong (fst f) p) (snd f) q i -rightInv (ΩFibreIso f) (p , q) = ΣPathP (refl , →∙∙lCancel←∙∙lCancel _ _ q) -fst (leftInv (ΩFibreIso f) p i j) = fst (p j) -snd (leftInv (ΩFibreIso f) p i j) k = +sec (ΩFibreIso f) (p , q) = ΣPathP (refl , →∙∙lCancel←∙∙lCancel _ _ q) +fst (ret (ΩFibreIso f) p i j) = fst (p j) +snd (ret (ΩFibreIso f) p i j) k = ←∙∙lCancel→∙∙lCancel _ _ (cong snd p) i j k {- Some homomorphism properties of the above iso -} @@ -230,7 +230,7 @@ snd (leftInv (ΩFibreIso f) p i j) k = ΩFibreIso⁻∙ : {ℓ ℓ' : Level} {A : Pointed ℓ} {B : Pointed ℓ'} (f : A →∙ B) → Iso.inv (ΩFibreIso f) (refl , (∙∙lCancel (snd f))) ≡ refl ΩFibreIso⁻∙ f = - cong (Iso.inv (ΩFibreIso f)) (sym (ΩFibreIso∙ f)) ∙ leftInv (ΩFibreIso f) refl + cong (Iso.inv (ΩFibreIso f)) (sym (ΩFibreIso∙ f)) ∙ ret (ΩFibreIso f) refl {- Ωⁿ (fib f) ≃∙ fib (Ωⁿ f) -} Ω^Fibre≃∙ : {ℓ ℓ' : Level} {A : Pointed ℓ} {B : Pointed ℓ'} (n : ℕ) (f : A →∙ B) @@ -275,7 +275,7 @@ isHomogeneousΩ^→fib n f = →∙Homogeneous≡ (isHomogeneousPath _ _) (funExt λ p → cong (fst (fst (Ω≃∙ (Ω^Fibre≃∙⁻ n f)))) - (leftInv (ΩFibreIso (Ω^→ n f)) + (ret (ΩFibreIso (Ω^→ n f)) ((fst (fst (Ω≃∙ (Ω^Fibre≃∙ n f))) p))) ∙ sym (Ω→∘ (≃∙map (Ω^Fibre≃∙⁻ n f)) (≃∙map (Ω^Fibre≃∙ n f)) p) @@ -296,7 +296,7 @@ isHomogeneousΩ^→fib n f = (inv (ΩFibreIso (Ω^→ n f)) p))) ∙ (λ i → Ω→ (Ω^Fibre≃∙retr n f i) .fst (inv (ΩFibreIso (Ω^→ n f)) p)) ∙ sym (rUnit (inv (ΩFibreIso (Ω^→ n f)) p))) - ∙ rightInv (ΩFibreIso (Ω^→ n f)) p)) + ∙ sec (ΩFibreIso (Ω^→ n f)) p)) Ω^Fibre≃∙' : {ℓ ℓ' : Level} {A : Pointed ℓ} {B : Pointed ℓ'} (n : ℕ) (f : A →∙ B) diff --git a/Cubical/Homotopy/Group/Pi3S2.agda b/Cubical/Homotopy/Group/Pi3S2.agda index bfd6e3e4d1..0ac3b22464 100644 --- a/Cubical/Homotopy/Group/Pi3S2.agda +++ b/Cubical/Homotopy/Group/Pi3S2.agda @@ -51,8 +51,8 @@ IsoTotalSpaceJoin' = compIso hopfS¹.IsoTotalSpaceJoin (IsoSphereJoin 1 1) IsoFiberTotalHopfS¹ : Iso (fiber (fst TotalHopf→∙S²) north) S¹ fun IsoFiberTotalHopfS¹ ((x , y) , z) = subst S¹Hopf z y inv IsoFiberTotalHopfS¹ x = (north , x) , refl -rightInv IsoFiberTotalHopfS¹ x = refl -leftInv IsoFiberTotalHopfS¹ ((x , y) , z) = +sec IsoFiberTotalHopfS¹ x = refl +ret IsoFiberTotalHopfS¹ ((x , y) , z) = ΣPathP ((ΣPathP (sym z , (λ i → transp (λ j → S¹Hopf (z (~ i ∧ j))) i y))) diff --git a/Cubical/Homotopy/Group/Pi4S3/BrunerieNumber.agda b/Cubical/Homotopy/Group/Pi4S3/BrunerieNumber.agda index 4d3b34727d..2a272df82a 100644 --- a/Cubical/Homotopy/Group/Pi4S3/BrunerieNumber.agda +++ b/Cubical/Homotopy/Group/Pi4S3/BrunerieNumber.agda @@ -173,8 +173,8 @@ private (Σ (Unit × S₊ 2) PushoutPath×) fun fiberinr'Iso (x , p) = (tt , x) , (sym p) inv fiberinr'Iso ((tt , x) , p) = x , (sym p) - rightInv fiberinr'Iso _ = refl - leftInv fiberinr'Iso _ = refl + sec fiberinr'Iso _ = refl + ret fiberinr'Iso _ = refl P : Pointed₀ P = (fiber inr' (inl tt) , north , (sym (push north))) @@ -435,7 +435,7 @@ BrunerieIsoAbstract = ≡ [ ∣ idfun∙ (S₊∙ 2) ∣₂ ∣ ∣ idfun∙ (S₊∙ 2) ∣₂ ]π' mainPath = cong (fst (π'∘∙Hom 2 (fold∘W , refl))) (cong (Iso.inv (fst (πₙ'Sⁿ≅ℤ 2))) (sym (πₙ'Sⁿ≅ℤ-idfun∙ 2)) - ∙ (Iso.leftInv (fst (πₙ'Sⁿ≅ℤ 2)) ∣ idfun∙ (S₊∙ 3) ∣₂)) + ∙ (Iso.ret (fst (πₙ'Sⁿ≅ℤ 2)) ∣ idfun∙ (S₊∙ 3) ∣₂)) ∙ fold∘W≡Whitehead main : _ ≡ Brunerie diff --git a/Cubical/Homotopy/Group/Pi4S3/DirectProof.agda b/Cubical/Homotopy/Group/Pi4S3/DirectProof.agda index b659f92073..277778f088 100644 --- a/Cubical/Homotopy/Group/Pi4S3/DirectProof.agda +++ b/Cubical/Homotopy/Group/Pi4S3/DirectProof.agda @@ -285,7 +285,7 @@ snd (fst π₃*joinS¹S¹≅π₃*S²) = λ f → to3ConnectedId (sphereConnected 2) (funExt λ x → (λ i → fst (JoinS¹S¹→TotalHopf (Iso.inv (IsoSphereJoin 1 1) - (fst f (Iso.rightInv (IsoSphereJoin 1 1) x i))))) + (fst f (Iso.sec (IsoSphereJoin 1 1) x i))))) ∙ sym (funExt⁻ (sym (cong fst hopfMap≡HopfMap')) (fst f x))) @@ -319,7 +319,7 @@ snd π₃*joinS¹S¹≅π₃*S² = snd π₃*joinS¹S¹→π₃*S² lem₁ : fold∘W ∘ joinS¹S¹→S³ ≡ fold⋁ ∘ (joinTo⋁ {A = S₊∙ 1} {B = S₊∙ 1}) lem₁ = funExt λ x → cong (fold⋁ ∘ (joinTo⋁ {A = S₊∙ 1} {B = S₊∙ 1})) - (leftInv (IsoSphereJoin 1 1) x) + (ret (IsoSphereJoin 1 1) x) lem₂ : (x : join S¹ S¹) → fst η₁-raw x ≡ (fold⋁ ∘ joinTo⋁) x lem₂ (inl x) = refl @@ -666,7 +666,7 @@ private Iso (π₃*S³' .fst) ((π'Gr 0 (S₊∙ 1 →∙ Ω (Susp∙ S²) ∙)) .fst) fun π₃*S³'≅π₁S¹→∙ΩS³'-raw = sMap map→ inv π₃*S³'≅π₁S¹→∙ΩS³'-raw = sMap map← -rightInv π₃*S³'≅π₁S¹→∙ΩS³'-raw = +sec π₃*S³'≅π₁S¹→∙ΩS³'-raw = sElim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (→∙Homogeneous≡ @@ -692,7 +692,7 @@ rightInv π₃*S³'≅π₁S¹→∙ΩS³'-raw = (cong₂ _∙_ (fst f base .snd) (cong sym (fst f x .snd)) ∙ sym (rUnit refl)) ∙∙ sym (rUnit (f .fst x .fst y))))) -leftInv π₃*S³'≅π₁S¹→∙ΩS³'-raw = +ret π₃*S³'≅π₁S¹→∙ΩS³'-raw = sElim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (ΣPathP ((funExt diff --git a/Cubical/Homotopy/Group/Pi4S3/S3PushoutIso.agda b/Cubical/Homotopy/Group/Pi4S3/S3PushoutIso.agda index c3532270ae..f0cc313aa8 100644 --- a/Cubical/Homotopy/Group/Pi4S3/S3PushoutIso.agda +++ b/Cubical/Homotopy/Group/Pi4S3/S3PushoutIso.agda @@ -457,8 +457,8 @@ retrS²→Pushout⋁↪fold⋁S²↺ x = → Iso ∥Pushout⋁↪fold⋁S²∥₅ ∥Pushout⋁↪fold⋁S²∥₅ fun (∥Pushout⋁↪fold⋁S²∥₅≃∥Pushout⋁↪fold⋁S²∥₅ x) = S²→Pushout⋁↪fold⋁S²↺ x inv (∥Pushout⋁↪fold⋁S²∥₅≃∥Pushout⋁↪fold⋁S²∥₅ x) = S²→Pushout⋁↪fold⋁S²↺⁻¹ x -rightInv (∥Pushout⋁↪fold⋁S²∥₅≃∥Pushout⋁↪fold⋁S²∥₅ x) = secS²→Pushout⋁↪fold⋁S²↺ x -leftInv (∥Pushout⋁↪fold⋁S²∥₅≃∥Pushout⋁↪fold⋁S²∥₅ x) = retrS²→Pushout⋁↪fold⋁S²↺ x +sec (∥Pushout⋁↪fold⋁S²∥₅≃∥Pushout⋁↪fold⋁S²∥₅ x) = secS²→Pushout⋁↪fold⋁S²↺ x +ret (∥Pushout⋁↪fold⋁S²∥₅≃∥Pushout⋁↪fold⋁S²∥₅ x) = retrS²→Pushout⋁↪fold⋁S²↺ x PreCode : (x : Susp S²) → Type PreCode north = ∥Pushout⋁↪fold⋁S²∥₅ @@ -677,5 +677,5 @@ IsoΩ∥SuspS²∥₅∥Pushout⋁↪fold⋁S²∥₅ = is : Iso _ _ fun is = encode ∣ north ∣ inv is = decode ∣ north ∣ - rightInv is = decode-encode - leftInv is = encode-decode ∣ north ∣ + sec is = decode-encode + ret is = encode-decode ∣ north ∣ diff --git a/Cubical/Homotopy/Group/PiAbCofibFinSphereBouquetMap.agda b/Cubical/Homotopy/Group/PiAbCofibFinSphereBouquetMap.agda index c28db47930..366f1728ac 100644 --- a/Cubical/Homotopy/Group/PiAbCofibFinSphereBouquetMap.agda +++ b/Cubical/Homotopy/Group/PiAbCofibFinSphereBouquetMap.agda @@ -17,7 +17,7 @@ open import Cubical.Foundations.Univalence open import Cubical.Data.Int renaming (_·_ to _·ℤ_) open import Cubical.Data.Nat renaming (_+_ to _+ℕ_ ; _·_ to _·ℕ_) open import Cubical.Data.Empty as ⊥ -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Sigma @@ -577,10 +577,10 @@ module _ {m k : ℕ} (α' : Fin m → FreeGroup (Fin k)) where (fun Iso-ΩFinBouquet-FreeGroup y') p (cong (cong Bouquet→CofibFinBouquetMap) - (leftInv Iso-ΩFinBouquet-FreeGroup x') ∙ sym xe) + (ret Iso-ΩFinBouquet-FreeGroup x') ∙ sym xe) q (cong (cong Bouquet→CofibFinBouquetMap) - (leftInv Iso-ΩFinBouquet-FreeGroup y') ∙ sym ye)}) + (ret Iso-ΩFinBouquet-FreeGroup y') ∙ sym ye)}) (aux _ p) (aux _ q) ∙ sym (substComposite CofibFinBoquetFunCode q p [ η ε ]) @@ -639,9 +639,9 @@ module _ {m k : ℕ} (α' : Fin m → FreeGroup (Fin k)) where Hom-Freeᵃᵇ/ImFinBouquetMap-π₁ᵃᵇCofibFinBouquetMap .fst inv' (fst Freeᵃᵇ/ImFinBouquetMap≅π₁ᵃᵇCofibFinBouquetMap) = encodeCofibFinBoquetFun (inr base) - rightInv (fst Freeᵃᵇ/ImFinBouquetMap≅π₁ᵃᵇCofibFinBouquetMap) = + sec (fst Freeᵃᵇ/ImFinBouquetMap≅π₁ᵃᵇCofibFinBouquetMap) = decodeEncodeCofibFinBouquetMap (inr base) - leftInv (fst Freeᵃᵇ/ImFinBouquetMap≅π₁ᵃᵇCofibFinBouquetMap) = + ret (fst Freeᵃᵇ/ImFinBouquetMap≅π₁ᵃᵇCofibFinBouquetMap) = encodeDecodeCofibFinBouquetMap snd Freeᵃᵇ/ImFinBouquetMap≅π₁ᵃᵇCofibFinBouquetMap = Hom-Freeᵃᵇ/ImFinBouquetMap-π₁ᵃᵇCofibFinBouquetMap .snd @@ -661,7 +661,7 @@ module _ {m k : ℕ} (α' : Fin m → FreeGroup (Fin k)) where (invEquiv (Bouquet≃∙SphereBouquet .fst)) (λ i x → tt) (funExt λ x → cong (invEq (isoToEquiv Iso-SphereBouquet-Bouquet)) - (cong (fst α) (sym (rightInv Iso-SphereBouquet-Bouquet x)))) + (cong (fst α) (sym (sec Iso-SphereBouquet-Bouquet x)))) -- π₁ᵃᵇ(cofib α) ≅ Freeᵃᵇ/Im(deg(α)) Freeᵃᵇ/ImFinBouquetMap≅π'₁ᵃᵇCofibFinSphereBouquetMap : @@ -744,7 +744,7 @@ private π'ᵃᵇCofibFinSphereBouquetMap≅ℤ[]/BouquetDegreeMain {n = zero} {m} {k} α = lem (inv' (compIso (invIso CharacFinBouquetFunIso) Iso-Bouquet→∙-SphereBouquet₁→∙) α) α - (rightInv (compIso (invIso CharacFinBouquetFunIso) + (sec (compIso (invIso CharacFinBouquetFunIso) Iso-Bouquet→∙-SphereBouquet₁→∙) α) where Goal : (α : _) (s : (w : _) → _) → Type @@ -774,7 +774,7 @@ private ∙ cong₃ _∙∙_∙∙_ refl refl (sym (rUnit refl)) ∙ sym (rUnit refl) where - lem : rightInv (invIso (equivToIso (fst Bouquet≃∙SphereBouquet))) + lem : sec (invIso (equivToIso (fst Bouquet≃∙SphereBouquet))) ((fst (isoToEquiv (invIso (equivToIso (fst Bouquet≃∙SphereBouquet)))) (pt (Bouquet∙ (Fin m))))) ≡ refl lem = ∙∙lCancel _ @@ -826,7 +826,7 @@ private α' unlock .fst)) p ∙ cong (fun (Freeᵃᵇ/ImFinBouquetMap≅π'₁ᵃᵇCofibFinSphereBouquetMap-Lock α' unlock .fst)) (sym lem2) - ∙ rightInv (Freeᵃᵇ/ImFinBouquetMap≅π'₁ᵃᵇCofibFinSphereBouquetMap-Lock + ∙ sec (Freeᵃᵇ/ImFinBouquetMap≅π'₁ᵃᵇCofibFinSphereBouquetMap-Lock α' unlock .fst) [ η (η w) ] presGen' : (lock : _) (w : Fin k) @@ -840,7 +840,7 @@ private ≡ (πᵃᵇFinSphereBouquetMapGenerator gens→finSphereBouquetMap∙ w) presGen⁻ lock w = cong (fun (lockIso lock)) (sym (presGen lock w _ refl)) - ∙ rightInv (lockIso lock) + ∙ sec (lockIso lock) (πᵃᵇFinSphereBouquetMapGenerator gens→finSphereBouquetMap∙ w) abstract @@ -898,7 +898,7 @@ private (cong (fun (fst (isoThm1 _))) (sym (cong (inv' (fst (surjImIso (π'∘∙Hom (suc n) inr') isSurjective-π'∘∙Hominr))) t) - ∙ leftInv (fst (surjImIso (π'∘∙Hom (suc n) inr') + ∙ ret (fst (surjImIso (π'∘∙Hom (suc n) inr') isSurjective-π'∘∙Hominr)) (∣ r ∣₂ , ∣ q ∣₁)))) diff --git a/Cubical/Homotopy/Group/PiCofibFinSphereBouquetMap.agda b/Cubical/Homotopy/Group/PiCofibFinSphereBouquetMap.agda index 328b96ef01..746dccdc78 100644 --- a/Cubical/Homotopy/Group/PiCofibFinSphereBouquetMap.agda +++ b/Cubical/Homotopy/Group/PiCofibFinSphereBouquetMap.agda @@ -14,7 +14,7 @@ open import Cubical.Foundations.Pointed open import Cubical.Data.Nat renaming (_+_ to _+ℕ_ ; _·_ to _·ℕ_) open import Cubical.Data.Sigma -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin hiding (_/_) open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Empty as ⊥ open import Cubical.Data.Int @@ -113,8 +113,8 @@ module πCofibFinSphereBouquetMap (n k m : ℕ) (fiber (fst inr') (inl tt)) Iso.fun is1 ((tt , s) , p) = s , (sym p) Iso.inv is1 (s , p) = (tt , s) , sym p - Iso.rightInv is1 (s , p) = refl - Iso.leftInv is1 ((tt , s) , p) = refl + Iso.sec is1 (s , p) = refl + Iso.ret is1 ((tt , s) , p) = refl lem : isConnectedFun (suc (suc n +ℕ suc n)) (α∘inr .fst) lem = isConnectedComp _ _ _ (isEquiv→isConnected _ (isoToIsEquiv is1) _) diff --git a/Cubical/Homotopy/Group/PiSphereBouquet.agda b/Cubical/Homotopy/Group/PiSphereBouquet.agda index dcc22e8064..6ab7901eb0 100644 --- a/Cubical/Homotopy/Group/PiSphereBouquet.agda +++ b/Cubical/Homotopy/Group/PiSphereBouquet.agda @@ -20,7 +20,8 @@ open import Cubical.Algebra.Group.Instances.Pi open import Cubical.Axiom.Choice open import Cubical.Data.Nat -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin +open import Cubical.Data.Fin.Properties open import Cubical.Data.Nat.Order.Inductive open import Cubical.Data.Sigma open import Cubical.Data.Empty as ⊥ @@ -158,8 +159,8 @@ isConnected⋁Sphere→ΠSphere {n = n} {k = suc k} = snd (Iso.fun (is1 n) (f , s) x) = funExt⁻ s x fst (Iso.inv (is1 n) f) y x = f x .fst y snd (Iso.inv (is1 n) f) i x = f x .snd i - Iso.rightInv (is1 n) f = refl - Iso.leftInv (is1 n) f = refl + Iso.sec (is1 n) f = refl + Iso.ret (is1 n) f = refl is2 : (n : ℕ) → Iso (π'Gr n ((Fin k → S₊ (suc n)) , (λ _ → ptSn (suc n))) .fst) @@ -245,17 +246,17 @@ genπₙ⋁Sⁿ x = ∣ (λ s → inr (x , s)) , (sym (push x)) ∣₂ → ϕ ≡ ψ πₙ⋁SⁿHomElim {n = n} {k} {k'} ϕ ψ ind = Σ≡Prop (λ _ → isPropIsGroupHom _ _) (funExt λ x - → cong (fst ϕ) (sym (Iso.leftInv (fst (πₙ⋁Sⁿ≅ℤ[] n k)) x)) + → cong (fst ϕ) (sym (Iso.ret (fst (πₙ⋁Sⁿ≅ℤ[] n k)) x)) ∙ funExt⁻ (cong fst lem) (Iso.fun (fst (πₙ⋁Sⁿ≅ℤ[] n k)) x) - ∙ cong (fst ψ) (Iso.leftInv (fst (πₙ⋁Sⁿ≅ℤ[] n k)) x)) + ∙ cong (fst ψ) (Iso.ret (fst (πₙ⋁Sⁿ≅ℤ[] n k)) x)) where lem : compGroupHom (GroupIso→GroupHom (invGroupIso (πₙ⋁Sⁿ≅ℤ[] n k))) ϕ ≡ compGroupHom (GroupIso→GroupHom (invGroupIso (πₙ⋁Sⁿ≅ℤ[] n k))) ψ lem = agreeOnℤFinGenerator→≡ λ x → cong (fst ϕ) (cong (Iso.inv (fst (πₙ⋁Sⁿ≅ℤ[] n k))) (sym (πₙ⋁Sⁿ≅ℤ[]Generator n k x)) - ∙ Iso.leftInv (fst (πₙ⋁Sⁿ≅ℤ[] n k)) (genπₙ⋁Sⁿ x)) + ∙ Iso.ret (fst (πₙ⋁Sⁿ≅ℤ[] n k)) (genπₙ⋁Sⁿ x)) ∙ ind x - ∙ cong (fst ψ) (sym (Iso.leftInv (fst (πₙ⋁Sⁿ≅ℤ[] n k)) (genπₙ⋁Sⁿ x)) + ∙ cong (fst ψ) (sym (Iso.ret (fst (πₙ⋁Sⁿ≅ℤ[] n k)) (genπₙ⋁Sⁿ x)) ∙ sym (cong (Iso.inv (fst (πₙ⋁Sⁿ≅ℤ[] n k))) (sym (πₙ⋁Sⁿ≅ℤ[]Generator n k x)))) diff --git a/Cubical/Homotopy/Group/PinSn.agda b/Cubical/Homotopy/Group/PinSn.agda index f3e6c4cd21..5b49c3b50d 100644 --- a/Cubical/Homotopy/Group/PinSn.agda +++ b/Cubical/Homotopy/Group/PinSn.agda @@ -100,9 +100,9 @@ flipSquareIso : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → GroupIso (πGr (suc n) A) (πGr (suc n) A) fun (fst (flipSquareIso n)) = ST.map flipSquare inv (fst (flipSquareIso n)) = ST.map flipSquare -rightInv (fst (flipSquareIso n)) = +sec (fst (flipSquareIso n)) = ST.elim (λ _ → isSetPathImplicit) λ _ → refl -leftInv (fst (flipSquareIso n)) = +ret (fst (flipSquareIso n)) = ST.elim (λ _ → isSetPathImplicit) λ _ → refl snd (flipSquareIso n) = makeIsGroupHom @@ -260,10 +260,10 @@ private π₂S²≅π₁S¹-stLoop : fun (fst π₂S²≅π₁S¹) stLoop₁ ≡ ∣ loop ∣₂ π₂S²≅π₁S¹-stLoop = - sym (leftInv Isoπ₁S¹ℤ + sym (ret Isoπ₁S¹ℤ (fun (fst π₂S²≅π₁S¹) stLoop₁)) ∙∙ cong (inv Isoπ₁S¹ℤ) compute - ∙∙ leftInv (compIso (setTruncIdempotentIso (isGroupoidS¹ _ _)) ΩS¹Isoℤ) + ∙∙ ret (compIso (setTruncIdempotentIso (isGroupoidS¹ _ _)) ΩS¹Isoℤ) ∣ loop ∣₂ where compute : fun Isoπ₁S¹ℤ (fun (fst π₂S²≅π₁S¹) stLoop₁) @@ -286,13 +286,13 @@ private cong (fun (fst π₂'S²≅π₁'S¹)) p ∙∙ (λ i → inv (fst (π'Gr≅πGr zero (S₊∙ (suc zero)))) (fun (fst π₂S²≅π₁S¹) (fun (fst (flipSquareIso zero)) - (rightInv + (sec (fst (π'Gr≅πGr (suc zero) (S₊∙ (suc (suc zero))))) (inv (fst (flipSquareIso zero)) y) i) ))) ∙∙ cong (inv (fst (π'Gr≅πGr zero (S₊∙ (suc zero))))) (cong (fun (fst π₂S²≅π₁S¹)) - (rightInv (fst (flipSquareIso zero)) y)) + (sec (fst (flipSquareIso zero)) y)) ∙ q lem₂ : inv (fst (π'Gr≅πGr zero (S₊∙ 1))) ∣ loop ∣₂ ≡ ∣ idfun∙ _ ∣₂ @@ -315,7 +315,7 @@ private suspPresIdfun2 n = sym (cong (fun (fst (invGroupIso (SphereSuspGrIso n)))) (cong ∣_∣₂ (suspPresIdfun (suc n)))) - ∙ leftInv (SphereSuspIso n) ∣ idfun∙ _ ∣₂ + ∙ ret (SphereSuspIso n) ∣ idfun∙ _ ∣₂ -- We finally have our results πₙ'Sⁿ≅ℤ-idfun∙ : (n : ℕ) @@ -335,7 +335,7 @@ private πₙ'Sⁿ-gen-by-idfun n = subst (gen₁-by (π'Gr n (S₊∙ (suc n)))) (sym (cong (inv (fst (πₙ'Sⁿ≅ℤ n))) (πₙ'Sⁿ≅ℤ-idfun∙ n)) - ∙ leftInv (fst (πₙ'Sⁿ≅ℤ n)) ∣ idfun∙ _ ∣₂) + ∙ ret (fst (πₙ'Sⁿ≅ℤ n)) ∣ idfun∙ _ ∣₂) (Iso-pres-gen₁ ℤGroup (π'Gr n (S₊∙ (suc n))) (pos (suc zero)) (λ h → h , (sym (·Comm h (pos 1)) ∙ ℤ·≡· h (pos 1))) @@ -392,8 +392,8 @@ snd (snd (isIso-πₙSⁿ-unpointIso (suc n))) = πₙSⁿ-unpointIso : (n : ℕ) → Iso ∥ (S₊∙ (suc n) →∙ S₊∙ (suc n)) ∥₂ ∥ (S₊ (suc n) → S₊ (suc n)) ∥₂ Iso.fun (πₙSⁿ-unpointIso n) = πₙSⁿ-unpoint n Iso.inv (πₙSⁿ-unpointIso n) = isIso-πₙSⁿ-unpointIso n .fst -Iso.rightInv (πₙSⁿ-unpointIso n) = isIso-πₙSⁿ-unpointIso n .snd .fst -Iso.leftInv (πₙSⁿ-unpointIso n) = isIso-πₙSⁿ-unpointIso n .snd .snd +Iso.sec (πₙSⁿ-unpointIso n) = isIso-πₙSⁿ-unpointIso n .snd .fst +Iso.ret (πₙSⁿ-unpointIso n) = isIso-πₙSⁿ-unpointIso n .snd .snd @@ -553,11 +553,11 @@ multπₙ-pres' : (n : ℕ) (f g : ∥ (S₊ (suc n) → S₊ (suc n)) ∥₂) ≡ multπₙ n (Iso.inv (πₙSⁿ-unpointIso n) f) (Iso.inv (πₙSⁿ-unpointIso n) g) multπₙ-pres' n f g = (λ i → isIso-πₙSⁿ-unpointIso n .fst - (multSⁿ↬ n (Iso.rightInv (πₙSⁿ-unpointIso n) f (~ i)) - (Iso.rightInv (πₙSⁿ-unpointIso n) g (~ i)))) + (multSⁿ↬ n (Iso.sec (πₙSⁿ-unpointIso n) f (~ i)) + (Iso.sec (πₙSⁿ-unpointIso n) g (~ i)))) ∙∙ sym (cong (Iso.inv (πₙSⁿ-unpointIso n)) (multπₙ-pres n (Iso.inv (πₙSⁿ-unpointIso n) f) (Iso.inv (πₙSⁿ-unpointIso n) g))) - ∙∙ Iso.leftInv (πₙSⁿ-unpointIso n) _ + ∙∙ Iso.ret (πₙSⁿ-unpointIso n) _ multHⁿSⁿ-pres : (n : ℕ) (f g : π'Gr n (S₊∙ (suc n)) .fst) → πₙSⁿ→HⁿSⁿ-fun n (multπₙ n f g) diff --git a/Cubical/Homotopy/Group/SuspensionMap.agda b/Cubical/Homotopy/Group/SuspensionMap.agda index 41b3c75a72..baeea95c89 100644 --- a/Cubical/Homotopy/Group/SuspensionMap.agda +++ b/Cubical/Homotopy/Group/SuspensionMap.agda @@ -475,8 +475,8 @@ hom-botᵣ {A = A} n f g = morphLemmas.isMorphInv ∙Π ∙Π (botᵣ⁻ {A = A} (suc n)) (hom-botᵣ⁻' {A = A} n) (botᵣ {A = A} (suc n)) - (leftInv (botᵣIso {A = A} (suc n))) - (rightInv (botᵣIso {A = A} (suc n))) + (ret (botᵣIso {A = A} (suc n))) + (sec (botᵣIso {A = A} (suc n))) f g isHom-IsoΩSphereMapᵣ : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) @@ -523,7 +523,7 @@ private (fun e (inv e (transportRefl p i) +A inv e (transportRefl q i))) i) ∙∙ hom (inv e p) (inv e q) - ∙∙ cong₂ _+B_ (rightInv e p) (rightInv e q))) + ∙∙ cong₂ _+B_ (sec e p) (sec e q))) pₗ : ∀ {ℓ} (A : Pointed ℓ) (n : ℕ) → typ (Ω ((Ω^ n) A)) ≡ (S₊∙ (suc n) →∙ A) diff --git a/Cubical/Homotopy/HSpace.agda b/Cubical/Homotopy/HSpace.agda index ccf18a9dfe..fa3f25a709 100644 --- a/Cubical/Homotopy/HSpace.agda +++ b/Cubical/Homotopy/HSpace.agda @@ -85,15 +85,15 @@ HSpace.μₗ (Iso.inv (HSpace-Π∙-Iso A) s) x i = fst (snd s i) x HSpace.μᵣ (Iso.inv (HSpace-Π∙-Iso A) s) x = snd (fst s x) HSpace.μₗᵣ (Iso.inv (HSpace-Π∙-Iso A) s) = flipSquare (equivFun slideSquareEquiv (λ i j → snd (snd s i) j)) -fst (fst (Iso.rightInv (HSpace-Π∙-Iso A) s k) x) = fst (fst s x) -snd (fst (Iso.rightInv (HSpace-Π∙-Iso A) s k) x) = snd (fst s x) -fst (snd (Iso.rightInv (HSpace-Π∙-Iso A) s k) i) x = fst (snd s i) x -snd (snd (Iso.rightInv (HSpace-Π∙-Iso A) s k) i) j = retEq slideSquareEquiv +fst (fst (Iso.sec (HSpace-Π∙-Iso A) s k) x) = fst (fst s x) +snd (fst (Iso.sec (HSpace-Π∙-Iso A) s k) x) = snd (fst s x) +fst (snd (Iso.sec (HSpace-Π∙-Iso A) s k) i) x = fst (snd s i) x +snd (snd (Iso.sec (HSpace-Π∙-Iso A) s k) i) j = retEq slideSquareEquiv (λ i' j' → snd (snd s i') j') k i j -HSpace.μ (Iso.leftInv (HSpace-Π∙-Iso A) e k) x = HSpace.μ e x -HSpace.μₗ (Iso.leftInv (HSpace-Π∙-Iso A) e k) x = HSpace.μₗ e x -HSpace.μᵣ (Iso.leftInv (HSpace-Π∙-Iso A) e k) x = HSpace.μᵣ e x -HSpace.μₗᵣ (Iso.leftInv (HSpace-Π∙-Iso A) e k) = flipSquare +HSpace.μ (Iso.ret (HSpace-Π∙-Iso A) e k) x = HSpace.μ e x +HSpace.μₗ (Iso.ret (HSpace-Π∙-Iso A) e k) x = HSpace.μₗ e x +HSpace.μᵣ (Iso.ret (HSpace-Π∙-Iso A) e k) x = HSpace.μᵣ e x +HSpace.μₗᵣ (Iso.ret (HSpace-Π∙-Iso A) e k) = flipSquare (secEq slideSquareEquiv (flipSquare (HSpace.μₗᵣ e)) k) HSpace-Π∙-Equiv : (A : Pointed ℓ) → HSpace A ≃ diff --git a/Cubical/Homotopy/Hopf.agda b/Cubical/Homotopy/Hopf.agda index 5af27ca631..fe25066496 100644 --- a/Cubical/Homotopy/Hopf.agda +++ b/Cubical/Homotopy/Hopf.agda @@ -125,8 +125,8 @@ module Hopf {ℓ : Level} {A : Pointed ℓ} {e : HSpace A} theIso : Iso TotalSpaceHopfPush (join (typ A) (typ A)) fun theIso = F inv theIso = G - rightInv theIso = s - leftInv theIso = r + sec theIso = s + ret theIso = r isEquivTotalSpaceHopfPush→TotalSpace : isEquiv TotalSpaceHopfPush→TotalSpace @@ -188,8 +188,8 @@ module Hopf {ℓ : Level} {A : Pointed ℓ} {e : HSpace A} theIso : Iso TotalSpaceHopfPush (Σ (Susp (typ A)) Hopf) fun theIso = TotalSpaceHopfPush→TotalSpace inv theIso = inv' - rightInv theIso = sect - leftInv theIso = retr + sec theIso = sect + ret theIso = retr IsoTotalSpaceJoin : Iso (Σ[ x ∈ Susp (typ A) ] Hopf x) (join (typ A) (typ A)) IsoTotalSpaceJoin = @@ -290,12 +290,12 @@ module Hopf {ℓ : Level} {A : Pointed ℓ} {e : HSpace A} inv iso₁ (inl x) = inl (tt , x) inv iso₁ (inr x) = inr x inv iso₁ (push a i) = push (snd a , fst a) i - rightInv iso₁ (inl x) = refl - rightInv iso₁ (inr x) = refl - rightInv iso₁ (push a i) = refl - leftInv iso₁ (inl x) = refl - leftInv iso₁ (inr x) = refl - leftInv iso₁ (push a i) = refl + sec iso₁ (inl x) = refl + sec iso₁ (inr x) = refl + sec iso₁ (push a i) = refl + ret iso₁ (inl x) = refl + ret iso₁ (inr x) = refl + ret iso₁ (push a i) = refl iso₂ : Iso TotalSpacePush² (Σ (Pushout (λ _ → tt) induced) fl.E) fun iso₂ (inl x , y) = inl x , y @@ -304,12 +304,12 @@ module Hopf {ℓ : Level} {A : Pointed ℓ} {e : HSpace A} inv iso₂ (inl x , y) = inl x , y inv iso₂ (inr x , y) = inr x , y inv iso₂ (push a i , y) = push a i , y - rightInv iso₂ (inl x , snd₁) = refl - rightInv iso₂ (inr x , snd₁) = refl - rightInv iso₂ (push a i , snd₁) = refl - leftInv iso₂ (inl x , snd₁) = refl - leftInv iso₂ (inr x , snd₁) = refl - leftInv iso₂ (push a i , snd₁) = refl + sec iso₂ (inl x , snd₁) = refl + sec iso₂ (inr x , snd₁) = refl + sec iso₂ (push a i , snd₁) = refl + ret iso₂ (inl x , snd₁) = refl + ret iso₂ (inr x , snd₁) = refl + ret iso₂ (push a i , snd₁) = refl F : TotalSpacePush²' → (Pushout {A = typ A × Σ (Susp (typ A)) Hopf} fst snd) @@ -331,9 +331,9 @@ module Hopf {ℓ : Level} {A : Pointed ℓ} {e : HSpace A} (Pushout {A = typ A × Σ (Susp (typ A)) Hopf} fst snd) fun IsoTotalSpacePush²'ΣPush = F inv IsoTotalSpacePush²'ΣPush = G - rightInv IsoTotalSpacePush²'ΣPush (inl x) = refl - rightInv IsoTotalSpacePush²'ΣPush (inr x) = refl - rightInv IsoTotalSpacePush²'ΣPush (push (x , y) i) j = + sec IsoTotalSpacePush²'ΣPush (inl x) = refl + sec IsoTotalSpacePush²'ΣPush (inr x) = refl + sec IsoTotalSpacePush²'ΣPush (push (x , y) i) j = hcomp (λ k → λ { (i = i0) → inl x ; (i = i1) → inr (secEq (_ , Push→TotalSpaceHopf-equiv x) y k) @@ -351,9 +351,9 @@ module Hopf {ℓ : Level} {A : Pointed ℓ} {e : HSpace A} , (secEq (_ , Push→TotalSpaceHopf-equiv x) y k)) i}) (push (x , (secEq (_ , Push→TotalSpaceHopf-equiv x) y i0)) i) - leftInv IsoTotalSpacePush²'ΣPush (inl x) = refl - leftInv IsoTotalSpacePush²'ΣPush (inr x) = refl - leftInv IsoTotalSpacePush²'ΣPush (push (x , y) i) j = + ret IsoTotalSpacePush²'ΣPush (inl x) = refl + ret IsoTotalSpacePush²'ΣPush (inr x) = refl + ret IsoTotalSpacePush²'ΣPush (push (x , y) i) j = hcomp (λ k → λ { (i = i0) → inl x ; (i = i1) → inr (secEq (Push→TotalSpaceHopf x , Push→TotalSpaceHopf-equiv x) @@ -690,14 +690,14 @@ module S¹Hopf where IsoS³TotalHopf : Iso (S₊ 3) TotalHopf fun IsoS³TotalHopf x = JoinS¹S¹→TotalHopf (S³→joinS¹S¹ (inv IsoS³S3 x)) inv IsoS³TotalHopf x = fun IsoS³S3 (joinS¹S¹→S³ (TotalHopf→JoinS¹S¹ x)) - rightInv IsoS³TotalHopf x = + sec IsoS³TotalHopf x = cong (JoinS¹S¹→TotalHopf ∘ S³→joinS¹S¹) - (leftInv IsoS³S3 (joinS¹S¹→S³ (TotalHopf→JoinS¹S¹ x))) + (ret IsoS³S3 (joinS¹S¹→S³ (TotalHopf→JoinS¹S¹ x))) ∙∙ cong JoinS¹S¹→TotalHopf (joinS¹S¹→S³→joinS¹S¹ (TotalHopf→JoinS¹S¹ x)) ∙∙ TotalHopf→JoinS¹S¹→TotalHopf x - leftInv IsoS³TotalHopf x = + ret IsoS³TotalHopf x = cong (fun IsoS³S3 ∘ joinS¹S¹→S³) (JoinS¹S¹→TotalHopf→JoinS¹S¹ (S³→joinS¹S¹ (inv IsoS³S3 x))) ∙∙ cong (fun IsoS³S3) (S³→joinS¹S¹→S³ (inv IsoS³S3 x)) - ∙∙ Iso.rightInv IsoS³S3 x + ∙∙ Iso.sec IsoS³S3 x diff --git a/Cubical/Homotopy/HopfInvariant/Base.agda b/Cubical/Homotopy/HopfInvariant/Base.agda index 209084f9ea..8fab3c9a22 100644 --- a/Cubical/Homotopy/HopfInvariant/Base.agda +++ b/Cubical/Homotopy/HopfInvariant/Base.agda @@ -144,7 +144,7 @@ module _ (n : ℕ) (f : S₊∙ (3 +ℕ n +ℕ n) →∙ S₊∙ (2 +ℕ n)) whe (Hⁿ-Sⁿ≅ℤ (suc (suc (n +ℕ n))))) Hⁿ-Sⁿ≅ℤ-nice-generator : (n : ℕ) → Iso.inv (fst (Hⁿ-Sⁿ≅ℤ (suc n))) 1 ≡ ∣ ∣_∣ ∣₂ -Hⁿ-Sⁿ≅ℤ-nice-generator zero = Iso.leftInv (fst (Hⁿ-Sⁿ≅ℤ (suc zero))) _ +Hⁿ-Sⁿ≅ℤ-nice-generator zero = Iso.ret (fst (Hⁿ-Sⁿ≅ℤ (suc zero))) _ Hⁿ-Sⁿ≅ℤ-nice-generator (suc n) = (λ i → Iso.inv (fst (suspensionAx-Sn (suc n) (suc n))) (Hⁿ-Sⁿ≅ℤ-nice-generator n i)) @@ -158,7 +158,7 @@ Hopfβ↦1 : (n : ℕ) (f : S₊∙ (3 +ℕ n +ℕ n) →∙ S₊∙ (2 +ℕ n)) → Iso.fun (fst (Hopfβ-Iso n f)) (Hopfβ n f) ≡ 1 Hopfβ↦1 n f = sym (cong (Iso.fun (fst (Hopfβ-Iso n f))) lem) - ∙ Iso.rightInv (fst (Hopfβ-Iso n f)) (pos 1) + ∙ Iso.sec (fst (Hopfβ-Iso n f)) (pos 1) where lem : Iso.inv (fst (Hopfβ-Iso n f)) (pos 1) ≡ Hopfβ n f lem = (λ i → fst (MV.d _ _ _ (λ _ → tt) (fst f) (3 +ℕ n +ℕ n)) @@ -209,13 +209,13 @@ module _ (n : ℕ) (f : S₊∙ (3 +ℕ n +ℕ n) →∙ S₊∙ (2 +ℕ n)) whe (coHom (2 +ℕ n) (S₊ (2 +ℕ n))) Iso.fun HIPSphereCohomIso = H→Sphere Iso.inv HIPSphereCohomIso = Sphere→H - Iso.rightInv HIPSphereCohomIso = + Iso.sec HIPSphereCohomIso = sElim (λ _ → isOfHLevelPath 2 squash₂ _ _) λ g → pRec (squash₂ _ _) (λ p → cong ∣_∣₂ (funExt λ x → cong (g x +ₖ_) (cong (-ₖ_) p) ∙ rUnitₖ _ (g x))) (conCohom2+n (g north)) - Iso.leftInv HIPSphereCohomIso = + Iso.ret HIPSphereCohomIso = sElim (λ _ → isOfHLevelPath 2 squash₂ _ _) λ g → pRec (squash₂ _ _) @@ -267,7 +267,7 @@ Hopfα-Iso-α : (n : ℕ) (f : _) ≡ 1 Hopfα-Iso-α n f = sym (cong (Iso.fun (fst (Hⁿ-Sⁿ≅ℤ (suc n)))) (Hⁿ-Sⁿ≅ℤ-nice-generator n)) - ∙ Iso.rightInv (fst (Hⁿ-Sⁿ≅ℤ (suc n))) (pos 1) + ∙ Iso.sec (fst (Hⁿ-Sⁿ≅ℤ (suc n))) (pos 1) where hz : Iso.fun (HIPSphereCohomIso n f) (Hopfα n f) ≡ ∣ ∣_∣ ∣₂ hz = refl diff --git a/Cubical/Homotopy/HopfInvariant/Brunerie.agda b/Cubical/Homotopy/HopfInvariant/Brunerie.agda index 145356f14f..ff05adea1d 100644 --- a/Cubical/Homotopy/HopfInvariant/Brunerie.agda +++ b/Cubical/Homotopy/HopfInvariant/Brunerie.agda @@ -98,7 +98,7 @@ opaque fun (fst (Hⁿ⁺ᵐ-Sⁿ×Sᵐ≅ℤ-abs 1 1)) (fun (fst (H²-S²≅H⁴-S²×S²)) ∣ f ∣₂) ≡ fun (fst (Hⁿ-Sⁿ≅ℤ 1)) ∣ f ∣₂ speedUp f i = - fun (fst (Hⁿ-Sⁿ≅ℤ 1)) (leftInv (fst H²-S²≅H⁴-S²×S²) ∣ f ∣₂ i) + fun (fst (Hⁿ-Sⁿ≅ℤ 1)) (ret (fst H²-S²≅H⁴-S²×S²) ∣ f ∣₂ i) -- Some abbreviations private @@ -223,28 +223,28 @@ module BrunerieNumLem (α' ⌣ α' ≡ β' +ₕ β') ⊎ (α' ⌣ α' ≡ -ₕ (β' +ₕ β')) → (α ⌣ α ≡ β +ₕ β) ⊎ (α ⌣ α ≡ -ₕ (β +ₕ β)) rewriteEquation (inl x) = - inl ((λ i → leftInv (fst (coHomCHopfIso 2)) α (~ i) - ⌣ leftInv (fst (coHomCHopfIso 2)) α (~ i)) + inl ((λ i → ret (fst (coHomCHopfIso 2)) α (~ i) + ⌣ ret (fst (coHomCHopfIso 2)) α (~ i)) ∙∙ cong (inv (fst (coHomCHopfIso 4))) x - ∙∙ leftInv (fst (coHomCHopfIso 4)) (β +ₕ β)) + ∙∙ ret (fst (coHomCHopfIso 4)) (β +ₕ β)) rewriteEquation (inr x) = - inr ((λ i → leftInv (fst (coHomCHopfIso 2)) α (~ i) - ⌣ leftInv (fst (coHomCHopfIso 2)) α (~ i)) + inr ((λ i → ret (fst (coHomCHopfIso 2)) α (~ i) + ⌣ ret (fst (coHomCHopfIso 2)) α (~ i)) ∙∙ cong (inv (fst (coHomCHopfIso 4))) x - ∙∙ leftInv (fst (coHomCHopfIso 4)) + ∙∙ ret (fst (coHomCHopfIso 4)) (-ₕ (β +ₕ β))) rewriteEquation2 : (qHom .fst β' ≡ x ⌣ y) ⊎ (qHom .fst β' ≡ -ₕ (x ⌣ y)) rewriteEquation2 = ⊎rec - (λ p → inl (sym (leftInv (fst is) (qHom .fst β')) + (λ p → inl (sym (ret (fst is) (qHom .fst β')) ∙∙ cong (inv (fst is)) (p ∙ sym isEq) - ∙∙ leftInv (fst is) (x ⌣ y))) - (λ p → inr (sym (leftInv (fst is) (qHom .fst β')) + ∙∙ ret (fst is) (x ⌣ y))) + (λ p → inr (sym (ret (fst is) (qHom .fst β')) ∙∙ cong (inv (fst is)) (p ∙ sym (cong (GroupStr.inv (snd ℤGroup)) isEq)) ∙∙ (presinv (invGroupIso is .snd) (fun (fst is) (x ⌣ y)) - ∙ cong -ₕ_ (leftInv (fst is) (x ⌣ y))))) + ∙ cong -ₕ_ (ret (fst is) (x ⌣ y))))) eqs where grIso : GroupEquiv (coHomGr 4 (HopfInvariantPush 0 fold∘W)) ℤGroup diff --git a/Cubical/Homotopy/HopfInvariant/Homomorphism.agda b/Cubical/Homotopy/HopfInvariant/Homomorphism.agda index 2a6ffeb3e8..3270f99ae2 100644 --- a/Cubical/Homotopy/HopfInvariant/Homomorphism.agda +++ b/Cubical/Homotopy/HopfInvariant/Homomorphism.agda @@ -176,8 +176,8 @@ H²C*≅ℤ n f g = compGroupIso is (Hⁿ-Sⁿ≅ℤ (suc n)) is : GroupIso (coHomGr (2 +ℕ n) (C* n f g)) (coHomGr (2 +ℕ n) (S₊ (2 +ℕ n))) Iso.fun (fst is) = ∘inr Iso.inv (fst is) = invMap - Iso.rightInv (fst is) = ∘inrSect - Iso.leftInv (fst is) = ∘inrRetr + Iso.sec (fst is) = ∘inrSect + Iso.ret (fst is) = ∘inrRetr snd is = makeIsGroupHom (sElim2 (λ _ _ → isOfHLevelPath 2 squash₂ _ _) λ f g → refl) @@ -323,31 +323,31 @@ module _ (n : ℕ) (f g : S₊∙ (3 +ℕ (n +ℕ n)) →∙ S₊∙ (2 +ℕ n)) → Iso.fun (fst (H²C*≅ℤ n f g)) (α*' n f g) ≡ 1 α↦1 n f g = sym (cong (Iso.fun (fst (Hⁿ-Sⁿ≅ℤ (suc n)))) (Hⁿ-Sⁿ≅ℤ-nice-generator n)) - ∙ Iso.rightInv (fst (Hⁿ-Sⁿ≅ℤ (suc n))) (pos 1) + ∙ Iso.sec (fst (Hⁿ-Sⁿ≅ℤ (suc n))) (pos 1) α≡ : (n : ℕ) (f g : S₊∙ (3 +ℕ (n +ℕ n)) →∙ S₊∙ (2 +ℕ n)) → α* n f g ≡ α*' n f g -α≡ n f g = sym (Iso.leftInv (fst (H²C*≅ℤ n f g)) _) +α≡ n f g = sym (Iso.ret (fst (H²C*≅ℤ n f g)) _) ∙∙ cong (Iso.inv (fst (H²C*≅ℤ n f g))) lem - ∙∙ Iso.leftInv (fst (H²C*≅ℤ n f g)) _ + ∙∙ Iso.ret (fst (H²C*≅ℤ n f g)) _ where lem : Iso.fun (fst (H²C*≅ℤ n f g)) (α* n f g) ≡ Iso.fun (fst (H²C*≅ℤ n f g)) (α*' n f g) - lem = (Iso.rightInv (fst (H²C*≅ℤ n f g)) (pos 1)) ∙ sym (α↦1 n f g) + lem = (Iso.sec (fst (H²C*≅ℤ n f g)) (pos 1)) ∙ sym (α↦1 n f g) q-α : (n : ℕ) (f g : S₊∙ (3 +ℕ (n +ℕ n)) →∙ S₊∙ (2 +ℕ n)) → coHomFun _ (q n f g) (α* n f g) ≡ Hopfα n (∙Π f g) q-α n f g = (λ i → coHomFun _ (q n f g) (α≡ n f g i)) - ∙ sym (Iso.leftInv is _) + ∙ sym (Iso.ret is _) ∙∙ cong (Iso.inv is) lem - ∙∙ Iso.leftInv is _ + ∙∙ Iso.ret is _ where is = fst (Hopfα-Iso n (∙Π f g)) lem : Iso.fun is (coHomFun _ (q n f g) (α*' n f g)) ≡ Iso.fun is (Hopfα n (∙Π f g)) lem = sym (cong (Iso.fun (fst (Hⁿ-Sⁿ≅ℤ (suc n)))) (Hⁿ-Sⁿ≅ℤ-nice-generator n)) - ∙∙ Iso.rightInv (fst (Hⁿ-Sⁿ≅ℤ (suc n))) (pos 1) + ∙∙ Iso.sec (fst (Hⁿ-Sⁿ≅ℤ (suc n))) (pos 1) ∙∙ sym (Hopfα-Iso-α n (∙Π f g)) βₗ≡ : (n : ℕ) (f g : S₊∙ (3 +ℕ (n +ℕ n)) →∙ S₊∙ (2 +ℕ n)) @@ -486,7 +486,7 @@ q-βₗ n f g = cong (coHomFun _ (q n f g)) (βₗ≡ n f g) ∙ transportLem ∙ cong (subst (λ m → coHom m (C·Π' n f g)) (cong (suc ∘ suc ∘ suc) (sym (+-suc n n)))) - (sym (Iso.leftInv (fst (Hopfβ-Iso n (∙Π f g))) + (sym (Iso.ret (fst (Hopfβ-Iso n (∙Π f g))) (Hopfβ n (∙Π f g))) ∙ cong (Iso.inv ((fst (Hopfβ-Iso n (∙Π f g))))) (Hopfβ↦1 n (∙Π f g))) @@ -564,7 +564,7 @@ q-βᵣ n f g = cong (coHomFun _ (q n f g)) (βᵣ≡ n f g) ∙ transportLem ∙ cong (subst (λ m → coHom m (C·Π' n f g)) (cong (suc ∘ suc ∘ suc) (sym (+-suc n n)))) - (sym (Iso.leftInv (fst (Hopfβ-Iso n (∙Π f g))) + (sym (Iso.ret (fst (Hopfβ-Iso n (∙Π f g))) (Hopfβ n (∙Π f g))) ∙ cong (Iso.inv ((fst (Hopfβ-Iso n (∙Π f g))))) (Hopfβ↦1 n (∙Π f g))) @@ -835,7 +835,7 @@ isHom-HopfInvariant n f g = (Iso.inv (fst (Hopfβ-Iso n (∙Π f g))) 1) (X n f g + Y n f g) ∙∙ cong ((X n f g + Y n f g) ℤ[ ℤ , ℤGroup .snd ]·_) - (Iso.rightInv ((fst (Hopfβ-Iso n (∙Π f g)))) 1) + (Iso.sec ((fst (Hopfβ-Iso n (∙Π f g)))) 1) ∙∙ rUnitℤ·ℤ (X n f g + Y n f g) f-id : HopfInvariant n f ≡ X n f g diff --git a/Cubical/Homotopy/HopfInvariant/HopfMap.agda b/Cubical/Homotopy/HopfInvariant/HopfMap.agda index f5e9763686..e402ac822e 100644 --- a/Cubical/Homotopy/HopfInvariant/HopfMap.agda +++ b/Cubical/Homotopy/HopfInvariant/HopfMap.agda @@ -218,7 +218,7 @@ cancel-H²S²→H²CP² f = H²CP²≅H²S² : GroupIso (coHomGr 2 CP²) (coHomGr 2 (S₊ 2)) Iso.fun (fst H²CP²≅H²S²) = sMap (_∘ inr) Iso.inv (fst H²CP²≅H²S²) = H²S²→H²CP² -Iso.rightInv (fst H²CP²≅H²S²) = +Iso.sec (fst H²CP²≅H²S²) = sElim (λ _ → isOfHLevelPath 2 squash₂ _ _) λ f → trRec {B = Iso.fun (fst H²CP²≅H²S²) (Iso.inv (fst H²CP²≅H²S²) ∣ f ∣₂) ≡ ∣ f ∣₂} @@ -226,7 +226,7 @@ Iso.rightInv (fst H²CP²≅H²S²) = (λ p → cong ∣_∣₂ (funExt λ x → cong (λ y → (f x) -ₖ y) p ∙ rUnitₖ 2 (f x))) (Iso.fun (PathIdTruncIso _) (isContr→isProp (isConnectedKn 1) ∣ f north ∣ ∣ 0ₖ 2 ∣)) -Iso.leftInv (fst H²CP²≅H²S²) = +Iso.ret (fst H²CP²≅H²S²) = sElim (λ _ → isOfHLevelPath 2 squash₂ _ _) λ f → pRec (squash₂ _ _) (cong ∣_∣₂) (cancel-H²S²→H²CP² f) snd H²CP²≅H²S² = @@ -426,7 +426,7 @@ hopfMap≡HopfMap' : HopfMap ≡ (HopfMap' , refl) hopfMap≡HopfMap' = ΣPathP ((funExt (λ x → cong (λ x → JoinS¹S¹→TotalHopf x .fst) - (sym (Iso.rightInv IsoTotalHopf' + (sym (Iso.sec IsoTotalHopf' (Iso.inv (IsoSphereJoin 1 1) x))) ∙ sym (lem (Iso.inv IsoTotalHopf' (Iso.inv (IsoSphereJoin 1 1) x))))) @@ -517,10 +517,10 @@ CP2≡CP²' = -ₕeq : ∀ {ℓ} {A : Type ℓ} (n : ℕ) → Iso (coHom n A) (coHom n A) Iso.fun (-ₕeq n) = -ₕ_ Iso.inv (-ₕeq n) = -ₕ_ - Iso.rightInv (-ₕeq n) = + Iso.sec (-ₕeq n) = sElim (λ _ → isOfHLevelPath 2 squash₂ _ _) λ f → cong ∣_∣₂ (funExt λ x → -ₖ^2 (f x)) - Iso.leftInv (-ₕeq n) = + Iso.ret (-ₕeq n) = sElim (λ _ → isOfHLevelPath 2 squash₂ _ _) λ f → cong ∣_∣₂ (funExt λ x → -ₖ^2 (f x)) diff --git a/Cubical/Homotopy/Loopspace.agda b/Cubical/Homotopy/Loopspace.agda index d6574ab7f2..e650d262af 100644 --- a/Cubical/Homotopy/Loopspace.agda +++ b/Cubical/Homotopy/Loopspace.agda @@ -207,18 +207,18 @@ fst (fun (ΩfunExtIso A B) p) x = funExt⁻ (cong fst p) x snd (fun (ΩfunExtIso A B) p) i j = snd (p j) i fst (inv (ΩfunExtIso A B) (f , p) i) x = f x i snd (inv (ΩfunExtIso A B) (f , p) i) j = p j i -rightInv (ΩfunExtIso A B) _ = refl -leftInv (ΩfunExtIso A B) _ = refl +sec (ΩfunExtIso A B) _ = refl +ret (ΩfunExtIso A B) _ = refl relax→∙Ω-Iso : ∀ {ℓ ℓ'} {A : Pointed ℓ} {B : Pointed ℓ'} → Iso (Σ[ b ∈ fst B ] (fst A → b ≡ pt B)) (A →∙ (Ω B)) Iso.fun (relax→∙Ω-Iso {A = A}) (b , p) = (λ a → sym (p (pt A)) ∙ p a) , lCancel (p (snd A)) Iso.inv (relax→∙Ω-Iso {B = B}) a = (pt B) , (fst a) -Iso.rightInv (relax→∙Ω-Iso) a = +Iso.sec (relax→∙Ω-Iso) a = →∙Homogeneous≡ (isHomogeneousPath _ _) (funExt λ x → cong (_∙ fst a x) (cong sym (snd a)) ∙ sym (lUnit (fst a x))) -Iso.leftInv (relax→∙Ω-Iso {A = A}) (b , p) = +Iso.ret (relax→∙Ω-Iso {A = A}) (b , p) = ΣPathP (sym (p (pt A)) , λ i a j → compPath-filler' (sym (p (pt A))) (p a) (~ i) j) @@ -417,8 +417,8 @@ flipΩIsopres· n = (inv (flipΩIso (suc n))) (flipΩIso⁻pres· n) (fun (flipΩIso (suc n))) - (Iso.leftInv (flipΩIso (suc n))) - (Iso.rightInv (flipΩIso (suc n))) + (Iso.ret (flipΩIso (suc n))) + (Iso.sec (flipΩIso (suc n))) flipΩrefl : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → fun (flipΩIso {A = A} (suc n)) refl ≡ refl @@ -432,7 +432,7 @@ isCommA→isCommTrunc : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → isComm∙ A → isOfHLevel (suc n) (typ A) → isComm∙ (∥ typ A ∥ (suc n) , ∣ pt A ∣) isCommA→isCommTrunc {A = (A , a)} n comm hlev p q = - ((λ i j → (leftInv (truncIdempotentIso (suc n) hlev) ((p ∙ q) j) (~ i))) + ((λ i j → (ret (truncIdempotentIso (suc n) hlev) ((p ∙ q) j) (~ i))) ∙∙ (λ i → cong {B = λ _ → ∥ A ∥ (suc n) } (λ x → ∣ x ∣) (cong (trRec hlev (λ x → x)) (p ∙ q))) ∙∙ (λ i → cong {B = λ _ → ∥ A ∥ (suc n) } (λ x → ∣ x ∣) @@ -441,16 +441,16 @@ isCommA→isCommTrunc {A = (A , a)} n comm hlev p q = (comm (cong (trRec hlev (λ x → x)) p) (cong (trRec hlev (λ x → x)) q) i)) ∙∙ (λ i → cong {B = λ _ → ∥ A ∥ (suc n) } (λ x → ∣ x ∣) (congFunct {A = ∥ A ∥ (suc n)} {B = A} (trRec hlev (λ x → x)) q p (~ i))) - ∙∙ (λ i j → (leftInv (truncIdempotentIso (suc n) hlev) ((q ∙ p) j) i))) + ∙∙ (λ i j → (ret (truncIdempotentIso (suc n) hlev) ((q ∙ p) j) i))) ptdIso→comm : ∀ {ℓ ℓ'} {A : Pointed ℓ} {B : Type ℓ'} (e : Iso (typ A) B) → isComm∙ A → isComm∙ (B , fun e (pt A)) ptdIso→comm {A = (A , a)} {B = B} e comm p q = - sym (rightInv (congIso e) (p ∙ q)) + sym (sec (congIso e) (p ∙ q)) ∙∙ (cong (fun (congIso e)) ((invCongFunct e p q) ∙∙ (comm (inv (congIso e) p) (inv (congIso e) q)) ∙∙ (sym (invCongFunct e q p)))) - ∙∙ rightInv (congIso e) (q ∙ p) + ∙∙ sec (congIso e) (q ∙ p) {- Homotopy group version -} π-comp : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → ∥ typ ((Ω^ (suc n)) A) ∥₂ diff --git a/Cubical/Homotopy/Whitehead.agda b/Cubical/Homotopy/Whitehead.agda index befeb378a4..9725ea9955 100644 --- a/Cubical/Homotopy/Whitehead.agda +++ b/Cubical/Homotopy/Whitehead.agda @@ -214,10 +214,10 @@ module _ (A B : Type) (a₀ : A) (b₀ : B) where Iso-A0□-⋁ : Iso (A0□ whitehead3x3) A∨B fun Iso-A0□-⋁ = A0□→A∨B inv Iso-A0□-⋁ = A∨B→A0□ - rightInv Iso-A0□-⋁ (inl x) = refl - rightInv Iso-A0□-⋁ (inr north) = push tt - rightInv Iso-A0□-⋁ (inr south) = push tt ∙ λ i → inr (merid b₀ i) - rightInv Iso-A0□-⋁ (inr (merid a i)) j = lem j i + sec Iso-A0□-⋁ (inl x) = refl + sec Iso-A0□-⋁ (inr north) = push tt + sec Iso-A0□-⋁ (inr south) = push tt ∙ λ i → inr (merid b₀ i) + sec Iso-A0□-⋁ (inr (merid a i)) j = lem j i where lem : PathP (λ i → push tt i ≡ (push tt ∙ (λ i → inr (merid b₀ i))) i) (cong A0□→A∨B (cong A∨B→A0□ λ i → inr (merid a i))) @@ -238,10 +238,10 @@ module _ (A B : Type) (a₀ : A) (b₀ : B) where (inr (compPath-filler (merid a) (sym (merid b₀)) (~ i) j)) - rightInv Iso-A0□-⋁ (push a i) j = push tt (i ∧ j) - leftInv Iso-A0□-⋁ (inl x) = refl - leftInv Iso-A0□-⋁ (inr tt) = push b₀ - leftInv Iso-A0□-⋁ (push b i) j = help j i + sec Iso-A0□-⋁ (push a i) j = push tt (i ∧ j) + ret Iso-A0□-⋁ (inl x) = refl + ret Iso-A0□-⋁ (inr tt) = push b₀ + ret Iso-A0□-⋁ (push b i) j = help j i where help : PathP (λ i → inl north ≡ push b₀ i) (cong A∨B→A0□ (cong A0□→A∨B (push b))) @@ -261,12 +261,12 @@ module _ (A B : Type) (a₀ : A) (b₀ : B) where inv Iso-A2□-join (inl x) = inr x inv Iso-A2□-join (inr x) = inl x inv Iso-A2□-join (push a b i) = push (a , b) (~ i) - rightInv Iso-A2□-join (inl x) = refl - rightInv Iso-A2□-join (inr x) = refl - rightInv Iso-A2□-join (push a b i) = refl - leftInv Iso-A2□-join (inl x) = refl - leftInv Iso-A2□-join (inr x) = refl - leftInv Iso-A2□-join (push a i) = refl + sec Iso-A2□-join (inl x) = refl + sec Iso-A2□-join (inr x) = refl + sec Iso-A2□-join (push a b i) = refl + ret Iso-A2□-join (inl x) = refl + ret Iso-A2□-join (inr x) = refl + ret Iso-A2□-join (push a i) = refl isContrA4□ : isContr (A4□ whitehead3x3) fst isContrA4□ = inr tt @@ -282,10 +282,10 @@ module _ (A B : Type) (a₀ : A) (b₀ : B) where fun Iso-A□0-Susp (inr x) = north fun Iso-A□0-Susp (push a i) = merid a₀ (~ i) inv Iso-A□0-Susp x = inl x - rightInv Iso-A□0-Susp x = refl - leftInv Iso-A□0-Susp (inl x) = refl - leftInv Iso-A□0-Susp (inr x) = (λ i → inl (merid a₀ i)) ∙ push x - leftInv Iso-A□0-Susp (push a i) j = + sec Iso-A□0-Susp x = refl + ret Iso-A□0-Susp (inl x) = refl + ret Iso-A□0-Susp (inr x) = (λ i → inl (merid a₀ i)) ∙ push x + ret Iso-A□0-Susp (push a i) j = hcomp (λ k → λ { (i = i0) → inl (merid a₀ (k ∨ j)) ; (i = i1) → compPath-filler (λ i₁ → inl (merid a₀ i₁)) @@ -301,12 +301,12 @@ module _ (A B : Type) (a₀ : A) (b₀ : B) where inv Iso-A□2-Susp× (north , y) = inl y inv Iso-A□2-Susp× (south , y) = inr y inv Iso-A□2-Susp× (merid a i , y) = push (a , y) i - rightInv Iso-A□2-Susp× (north , snd₁) = refl - rightInv Iso-A□2-Susp× (south , snd₁) = refl - rightInv Iso-A□2-Susp× (merid a i , snd₁) = refl - leftInv Iso-A□2-Susp× (inl x) = refl - leftInv Iso-A□2-Susp× (inr x) = refl - leftInv Iso-A□2-Susp× (push a i) = refl + sec Iso-A□2-Susp× (north , snd₁) = refl + sec Iso-A□2-Susp× (south , snd₁) = refl + sec Iso-A□2-Susp× (merid a i , snd₁) = refl + ret Iso-A□2-Susp× (inl x) = refl + ret Iso-A□2-Susp× (inr x) = refl + ret Iso-A□2-Susp× (push a i) = refl Iso-A□4-Susp : Iso (A□4 whitehead3x3) (Susp A) fun Iso-A□4-Susp (inl x) = north @@ -315,12 +315,12 @@ module _ (A B : Type) (a₀ : A) (b₀ : B) where inv Iso-A□4-Susp north = inl tt inv Iso-A□4-Susp south = inr tt inv Iso-A□4-Susp (merid a i) = push a i - rightInv Iso-A□4-Susp north = refl - rightInv Iso-A□4-Susp south = refl - rightInv Iso-A□4-Susp (merid a i) = refl - leftInv Iso-A□4-Susp (inl x) = refl - leftInv Iso-A□4-Susp (inr x) = refl - leftInv Iso-A□4-Susp (push a i) = refl + sec Iso-A□4-Susp north = refl + sec Iso-A□4-Susp south = refl + sec Iso-A□4-Susp (merid a i) = refl + ret Iso-A□4-Susp (inl x) = refl + ret Iso-A□4-Susp (inr x) = refl + ret Iso-A□4-Susp (push a i) = refl Iso-PushSusp×-Susp×Susp : Iso (Pushout {A = Susp A × B} fst fst) (Susp A × Susp B) @@ -354,11 +354,11 @@ module _ (A B : Type) (a₀ : A) (b₀ : B) where theIso : Iso (Pushout fst fst) (Susp A × Susp B) fun theIso = F inv theIso = G - rightInv theIso (a , north) = refl - rightInv theIso (a , south) = ΣPathP (refl , merid b₀) - rightInv theIso (a , merid b i) j = + sec theIso (a , north) = refl + sec theIso (a , south) = ΣPathP (refl , merid b₀) + sec theIso (a , merid b i) j = a , compPath-filler (merid b) (sym (merid b₀)) (~ j) i - leftInv theIso = retr + ret theIso = retr Iso-A□○-PushSusp× : Iso (A□○ whitehead3x3) (Pushout {A = Susp A × B} fst fst) diff --git a/Cubical/Homotopy/WhiteheadsLemma.agda b/Cubical/Homotopy/WhiteheadsLemma.agda index de31d2b2bd..2f12404568 100644 --- a/Cubical/Homotopy/WhiteheadsLemma.agda +++ b/Cubical/Homotopy/WhiteheadsLemma.agda @@ -157,9 +157,9 @@ private sym ( funExt ( λ x → - sym ((Iso.rightInv J) (g x)) + sym ((Iso.sec J) (g x)) ∙ cong (λ y → Iso.fun J (Iso.inv J (g y))) - (sym ((Iso.rightInv H) x)) + (sym ((Iso.sec H) x)) ∙ cong (λ h → (Iso.fun J ∘ h ∘ Iso.inv H) x) p)) {- diff --git a/Cubical/Modalities/Lex.agda b/Cubical/Modalities/Lex.agda index 4b3d27c474..7868b54b6b 100644 --- a/Cubical/Modalities/Lex.agda +++ b/Cubical/Modalities/Lex.agda @@ -75,8 +75,8 @@ module IsModalToUnitIsEquiv (A : Type ℓ) (A-mod : isModal A) where η-iso : Iso A (◯ A) Iso.fun η-iso = η Iso.inv η-iso = inv - Iso.rightInv η-iso = η-section - Iso.leftInv η-iso = η-retract + Iso.sec η-iso = η-section + Iso.ret η-iso = η-retract η-is-equiv : isEquiv (η-at A) η-is-equiv = isoToIsEquiv η-iso diff --git a/Cubical/Modalities/Modality.agda b/Cubical/Modalities/Modality.agda index 224360ec6e..97a6eef0eb 100644 --- a/Cubical/Modalities/Modality.agda +++ b/Cubical/Modalities/Modality.agda @@ -66,11 +66,11 @@ record Modality ℓ : Type (ℓ-suc ℓ) where to-from : ∀ ◯b → ◯-map f (◯-map inv ◯b) ≡ ◯b to-from = ◯-elim (λ ◯b → ◯-=-isModal (◯-map f (◯-map inv ◯b)) ◯b) - (λ b → cong (◯-map f) (◯-map-β inv b) ∙ ◯-map-β f (inv b) ∙ cong η (rightInv b)) + (λ b → cong (◯-map f) (◯-map-β inv b) ∙ ◯-map-β f (inv b) ∙ cong η (sec b)) from-to : ∀ ◯a → ◯-map inv (◯-map f ◯a) ≡ ◯a from-to = ◯-elim (λ ◯a → ◯-=-isModal (◯-map inv (◯-map f ◯a)) ◯a) - (λ a → cong (◯-map inv) (◯-map-β f a) ∙ ◯-map-β inv (f a) ∙ cong η (leftInv a)) + (λ a → cong (◯-map inv) (◯-map-β f a) ∙ ◯-map-β inv (f a) ∙ cong η (ret a)) ◯-equiv : {A B : Type ℓ} → A ≃ B → ◯ A ≃ ◯ B @@ -88,8 +88,8 @@ record Modality ℓ : Type (ℓ-suc ℓ) where isModalToIso : {A : Type ℓ} → isModal A → Iso A (◯ A) Iso.fun (isModalToIso _) = η Iso.inv (isModalToIso w) = ◯-rec w (idfun _) - Iso.rightInv (isModalToIso w) = ◯-elim (λ _ → ◯-=-isModal _ _) (λ a₀ → cong η (◯-rec-β w (idfun _) a₀)) - Iso.leftInv (isModalToIso w) = ◯-rec-β w (idfun _) + Iso.sec (isModalToIso w) = ◯-elim (λ _ → ◯-=-isModal _ _) (λ a₀ → cong η (◯-rec-β w (idfun _) a₀)) + Iso.ret (isModalToIso w) = ◯-rec-β w (idfun _) isModalToIsEquiv : {A : Type ℓ} → isModal A → isEquiv (η {A}) isModalToIsEquiv {A} w = isoToIsEquiv (isModalToIso w) diff --git a/Cubical/Papers/CellularMethods.agda b/Cubical/Papers/CellularMethods.agda new file mode 100644 index 0000000000..f7591defbf --- /dev/null +++ b/Cubical/Papers/CellularMethods.agda @@ -0,0 +1,73 @@ +{- + +Please do not move this file. Changes should only be made if necessary. + +This file contains pointers to the code examples and main results from +the paper: + +Cellular Methods in Homotopy Type Theory + +-} + +module Cubical.Papers.CellularMethods where +open import Cubical.Foundations.Prelude +open import Cubical.Data.Nat + +{- Cubical.CW.Base contains the definition of + - CW structures (CWskel) + - Finite CW structures (finCWskel) + - The colimit of a CW structure (realise) + - The category of CW complexes (CW , _→ᶜʷ_) + - The category of finite CW complexes (finCW , _→ᶜʷ_) -} +open import Cubical.CW.Base + +{- Cubical.CW.Properties contains the proof of + - Lemma 12 from the paper (isConnected-CW↪) + - Lemma 13 from the paper (isConnected-CW↪∞) -} +open import Cubical.CW.Properties + +{- Cubical.HITs.SphereBouquet.Base contains the definition of sphere bouquets -} +open import Cubical.HITs.SphereBouquet.Base + +{- Cubical.HITs.SphereBouquet.Degree contains the definition/proof of + - The degree of a sphere bouquet (bouquetDegree) + - Proposition 29 from the paper (bouquetDegreeSusp, bouquetDegreeComp) -} +open import Cubical.HITs.SphereBouquet.Degree + +{- Cubical.CW.ChainComplex contains the definition of + - The augmented chain complex associated to a CW structure (CW-AugChainComplex) + - The reduced cellular homology groups of a CW structure (H̃ˢᵏᵉˡ) -} +open import Cubical.CW.ChainComplex + +{- Cubical.CW.Map contains the definition/proof of + - Cellular maps (cellMap) + - Finite cellular maps (finCellMap) + - The colimit of a cellular map (realiseCellMap) + - The identity and composition of cellular maps (idCellMap, composeCellMap) + - The functor from finite CW complexes to finite chains (finCellMap→finChainComplexMap) + - The functoriality of cellular homology (finCellMap→HomologyMap) -} +open import Cubical.CW.Map + +{- Cubical.CW.Homotopy contains the definition/proof of + - Cellular homotopies (cellHom) + - Finite cellular homotopies (finCellHom) + - Finite cellular homotopies induce finite chain homotopies (cellHom-to-ChainHomotopy) -} +open import Cubical.CW.Homotopy + +{- Cubical.CW.Approximation contains the proof of + - The first cellular approximation theorem (CWmap→finCellMap) + - The second cellular approximation theorem (pathToCellularHomotopy) -} +open import Cubical.CW.Approximation + +{- Cubical.CW.Homology contains the definition/proof of + - The functoriality of cellular homology for CW structures (H̃ˢᵏᵉˡ→-pre) + - The definition of cellular homology groups for CW complexes (H̃ᶜʷ) + - The functoriality of cellular homology for CW complexes (H̃ᶜʷ→ , H̃ᶜʷ→id , H̃ᶜʷ→comp) -} + +open import Cubical.CW.Homology.Base + +{- Cubical.CW.Connected contains the proof of the Hurewicz approximation theorem (makeConnectedCW) -} +open import Cubical.CW.Connected + +{- Cubical.CW.HurewiczTheorem contains the proof of the Hurewicz theorem (HurewiczTheorem) -} +open import Cubical.CW.HurewiczTheorem diff --git a/Cubical/Papers/ZCohomology.agda b/Cubical/Papers/ZCohomology.agda index c45d417188..ab8c875d1a 100644 --- a/Cubical/Papers/ZCohomology.agda +++ b/Cubical/Papers/ZCohomology.agda @@ -144,7 +144,7 @@ truncPathElim : ∀ {ℓ ℓ'} {A : Type ℓ} {x y : A} (n : ℕ) → (q : _) → B q truncPathElim zero hlev ind q = hlev q .fst truncPathElim (suc n) {B = B} hlev ind q = - subst B (Iso.leftInv (Trunc.PathIdTruncIso _) q) + subst B (Iso.ret (Trunc.PathIdTruncIso _) q) (help (ΩTrunc.encode-fun ∣ _ ∣ ∣ _ ∣ q)) where help : (q : _) → B (ΩTrunc.decode-fun ∣ _ ∣ ∣ _ ∣ q) @@ -459,9 +459,9 @@ n=m=1 (loop i) (loop j) k = -- This hcomp is just a simple rewriting to get path computation = refl main : p₁ ≡ p₂ - main = p₁ ≡⟨ sym (Iso.leftInv t p₁) ⟩ + main = p₁ ≡⟨ sym (Iso.ret t p₁) ⟩ (Iso.inv t (Iso.fun t p₁)) ≡⟨ cong (Iso.inv t) computation ⟩ - Iso.inv t (Iso.fun t p₂) ≡⟨ Iso.leftInv t p₂ ⟩ + Iso.inv t (Iso.fun t p₂) ≡⟨ Iso.ret t p₂ ⟩ p₂ ∎ -} diff --git a/Cubical/Reflection/RecordEquiv.agda b/Cubical/Reflection/RecordEquiv.agda index 7a05d59872..32f76e506c 100644 --- a/Cubical/Reflection/RecordEquiv.agda +++ b/Cubical/Reflection/RecordEquiv.agda @@ -180,8 +180,8 @@ recordIsoΣClauses σ = funClauses (quote Iso.fun) R↔Σ ++ funClauses (quote Iso.inv) Σ↔R ++ -- Clauses for the forward and backward inverse conditions - pathClauses (quote Iso.rightInv) Σ↔R ++ - pathClauses (quote Iso.leftInv) R↔Σ + pathClauses (quote Iso.sec) Σ↔R ++ + pathClauses (quote Iso.ret) R↔Σ where R↔Σ = ΣFormat→RecordAssoc σ Σ↔R = flipRecordAssoc R↔Σ diff --git a/Cubical/Relation/Binary/Base.agda b/Cubical/Relation/Binary/Base.agda index 500c849b9c..1c703c358c 100644 --- a/Cubical/Relation/Binary/Base.agda +++ b/Cubical/Relation/Binary/Base.agda @@ -191,12 +191,12 @@ module BinaryRelation {ℓ ℓ' : Level} {A : Type ℓ} (R : Rel A A ℓ') where 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) + Iso.sec 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) + Iso.ret i r = J (λ w β → J Q (ρ a) (cong fst β) ≡ snd w) (JRefl Q (ρ a)) (h aρa (a' , r)) isUnivalent→contrRelSingl : isUnivalent → contrRelSingl @@ -225,8 +225,8 @@ record RelIso {A : Type ℓA} (_≅_ : Rel A A ℓ≅A) field fun : A → A' inv : A' → A - rightInv : (a' : A') → fun (inv a') ≅' a' - leftInv : (a : A) → inv (fun a) ≅ a + sec : (a' : A') → fun (inv a') ≅' a' + ret : (a : A) → inv (fun a) ≅ a open BinaryRelation @@ -237,10 +237,10 @@ RelIso→Iso : {A : Type ℓA} {A' : Type ℓA'} → 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) +Iso.sec (RelIso→Iso _ _ uni uni' f) a' + = uni' (RelIso.sec f a') +Iso.ret (RelIso→Iso _ _ uni uni' f) a + = uni (RelIso.ret f a) isIrreflIrreflKernel : ∀{ℓ ℓ'} {A : Type ℓ} (R : Rel A A ℓ') → isIrrefl (IrreflKernel R) isIrreflIrreflKernel _ _ (_ , ¬a≡a) = ¬a≡a refl diff --git a/Cubical/Relation/Binary/Order/Poset/Covering.agda b/Cubical/Relation/Binary/Order/Poset/Covering.agda index ae26765c52..7a851244fd 100644 --- a/Cubical/Relation/Binary/Order/Poset/Covering.agda +++ b/Cubical/Relation/Binary/Order/Poset/Covering.agda @@ -57,14 +57,14 @@ module Cover (P' : Poset ℓ ℓ') where isom .inv i with cov' i ... | inl z≡x = false ... | inr z≡y = true - isom .rightInv i with cov' i + isom .sec i with cov' i ... | inl z≡x = Interval≡ P' x y _ _ (sym z≡x) ... | inr z≡y = Interval≡ P' x y _ _ (sym z≡y) - isom .leftInv b with cov' (2→Interval P' x y x≤y b) - isom .leftInv false | inl _ = refl - isom .leftInv false | inr x≡y = ⊥.rec (x≠y x≡y) - isom .leftInv true | inl y≡x = ⊥.rec (x≠y (sym y≡x)) - isom .leftInv true | inr _ = refl + isom .ret b with cov' (2→Interval P' x y x≤y b) + isom .ret false | inl _ = refl + isom .ret false | inr x≡y = ⊥.rec (x≠y x≡y) + isom .ret true | inl y≡x = ⊥.rec (x≠y (sym y≡x)) + isom .ret true | inr _ = refl -- Subset of faces and cofaces -- terminology from "Combinatorics of higher-categorical diagrams" by Amar Hadzihasanovic diff --git a/Cubical/Relation/Binary/Order/Woset/Simulation.agda b/Cubical/Relation/Binary/Order/Woset/Simulation.agda index 410d1eb240..2e4ce22604 100644 --- a/Cubical/Relation/Binary/Order/Woset/Simulation.agda +++ b/Cubical/Relation/Binary/Order/Woset/Simulation.agda @@ -226,11 +226,11 @@ isAntisym≼Equiv A B (f , simf) (g , simg) where is : Iso ⟨ A ⟩ ⟨ B ⟩ Iso.fun is = f Iso.inv is = g - Iso.rightInv is b i + Iso.sec 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 + Iso.ret is a i = cong (_$_ ∘ fst) (isPropValued≼ A A (isTrans≼ A B A (f , simf) (g , simg)) (isRefl≼ A)) i a @@ -690,14 +690,14 @@ isWeaklyExtensional≺ 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 + Iso.sec 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 + Iso.ret is p = isEmbedding→Inj (isEmbedding↓ A) q p (equivFun (WosetPath (A ↓ q) (A ↓ p)) (compWosetEquiv (invEq (ex (B ↓ (Iso.fun is p))) diff --git a/Cubical/Relation/Nullary/Properties.agda b/Cubical/Relation/Nullary/Properties.agda index ee5a2a4fcd..28e13badca 100644 --- a/Cubical/Relation/Nullary/Properties.agda +++ b/Cubical/Relation/Nullary/Properties.agda @@ -35,7 +35,7 @@ sectionDiscrete f g sect dA x y with dA (g x) (g y) ... | no ¬p = no (λ p → ¬p (cong g p)) isoPresDiscrete : Iso A B → Discrete A → Discrete B -isoPresDiscrete e = sectionDiscrete fun inv rightInv +isoPresDiscrete e = sectionDiscrete fun inv sec where open Iso e EquivPresDiscrete : ∀ {ℓ ℓ'}{A : Type ℓ} {B : Type ℓ'} → A ≃ B diff --git a/Cubical/Structures/Maybe.agda b/Cubical/Structures/Maybe.agda index f375148a92..910d00f575 100644 --- a/Cubical/Structures/Maybe.agda +++ b/Cubical/Structures/Maybe.agda @@ -79,8 +79,8 @@ module MaybePathP where isom : Iso _ _ isom .Iso.fun = decode ox oy isom .Iso.inv = encode _ ox oy - isom .Iso.rightInv = decodeEncode ox oy - isom .Iso.leftInv = encodeDecode A ox oy + isom .Iso.sec = decodeEncode ox oy + isom .Iso.ret = encodeDecode A ox oy -- Structured isomorphisms diff --git a/Cubical/Structures/Record.agda b/Cubical/Structures/Record.agda index 64a076c337..39ab85557e 100644 --- a/Cubical/Structures/Record.agda +++ b/Cubical/Structures/Record.agda @@ -180,8 +180,8 @@ private isom : Iso _ _ isom .fun = fwd A B e isom .inv = bwd A B e - isom .rightInv = fwdBwd A B e - isom .leftInv = bwdFwd A B e + isom .sec = fwdBwd A B e + isom .ret = bwdFwd A B e ExplicitUnivalentDesc : ∀ ℓ {ℓ₁ ℓ₁'} → (d : M.Desc ℓ ℓ₁ ℓ₁') → Type _ ExplicitUnivalentDesc _ d = diff --git a/Cubical/Structures/Relational/Constant.agda b/Cubical/Structures/Relational/Constant.agda index cf0d033688..84a038451f 100644 --- a/Cubical/Structures/Relational/Constant.agda +++ b/Cubical/Structures/Relational/Constant.agda @@ -52,5 +52,5 @@ module _ (A : hSet ℓ') where isom : Iso _ _ isom .fun = _ isom .inv = [_] - isom .rightInv _ = refl - isom .leftInv = elimProp (λ _ → squash/ _ _) (λ a → refl) + isom .sec _ = refl + isom .ret = elimProp (λ _ → squash/ _ _) (λ a → refl) diff --git a/Cubical/Structures/Relational/Function.agda b/Cubical/Structures/Relational/Function.agda index 7ad9ab19d5..bd890f9148 100644 --- a/Cubical/Structures/Relational/Function.agda +++ b/Cubical/Structures/Relational/Function.agda @@ -180,11 +180,11 @@ functionRelMatchesEquiv+ ρ₁ α₁ ρ₂ ι₂ μ₁ μ₂ (X , f) (Y , g) e = (FunctionEquivStr+ α₁ ι₂ (X , f) (Y , g) e) isom .fun h s = h refl isom .inv k {x} = J (λ y _ → ι₂ (X , f x) (Y , g y) e) (k x) - isom .rightInv k i x = JRefl (λ y _ → ι₂ (X , f x) (Y , g y) e) (k x) i - isom .leftInv h = + isom .sec k i x = JRefl (λ y _ → ι₂ (X , f x) (Y , g y) e) (k x) i + isom .ret h = implicitFunExt λ {x} → implicitFunExt λ {y} → funExt λ p → J (λ y p → isom .inv (isom .fun h) p ≡ h p) - (funExt⁻ (isom .rightInv (isom .fun h)) x) + (funExt⁻ (isom .sec (isom .fun h)) x) p diff --git a/Cubical/Structures/Relational/Maybe.agda b/Cubical/Structures/Relational/Maybe.agda index d613bcf899..7f7d130e08 100644 --- a/Cubical/Structures/Relational/Maybe.agda +++ b/Cubical/Structures/Relational/Maybe.agda @@ -105,13 +105,13 @@ maybePositiveRel {S = S} {ρ = ρ} {θ = θ} σ .quo {X} R = isom : Iso (Maybe (S X) / MaybeRel (ρ (R .fst .fst))) (Maybe (S X / ρ (R .fst .fst))) isom .fun = fwd isom .inv = bwd - isom .rightInv nothing = refl - isom .rightInv (just x) = + isom .sec nothing = refl + isom .sec (just x) = elimProp {P = λ x → fwd (bwd (just x)) ≡ just x} (λ _ → isOfHLevelMaybe 0 squash/ _ _) (λ _ → refl) x - isom .leftInv = elimProp (λ _ → squash/ _ _) (λ {nothing → refl; (just _) → refl}) + isom .ret = elimProp (λ _ → squash/ _ _) (λ {nothing → refl; (just _) → refl}) maybeRelMatchesTransp : {S : Type ℓ → Type ℓ₁} (ρ : StrRel S ℓ₁') (α : EquivAction S) diff --git a/Cubical/Structures/Relational/Pointed.agda b/Cubical/Structures/Relational/Pointed.agda index a52cee9b26..63692c1b7c 100644 --- a/Cubical/Structures/Relational/Pointed.agda +++ b/Cubical/Structures/Relational/Pointed.agda @@ -51,5 +51,5 @@ pointedPositiveRel .quo R = isoToIsEquiv isom isom : Iso _ _ isom .fun = _ isom .inv q = q - isom .rightInv = elimProp (λ _ → squash/ _ _) (λ _ → refl) - isom .leftInv = elimProp (λ _ → squash/ _ _) (λ _ → refl) + isom .sec = elimProp (λ _ → squash/ _ _) (λ _ → refl) + isom .ret = elimProp (λ _ → squash/ _ _) (λ _ → refl) diff --git a/Cubical/Structures/Relational/Product.agda b/Cubical/Structures/Relational/Product.agda index f868be83e1..973b3d6529 100644 --- a/Cubical/Structures/Relational/Product.agda +++ b/Cubical/Structures/Relational/Product.agda @@ -123,11 +123,11 @@ productPositiveRel {S₁ = S₁} {ρ₁} {θ₁} {S₂} {ρ₂} {θ₂} σ₁ σ isom : Iso _ _ isom .fun = fwd isom .inv = uncurry bwd - isom .rightInv = + isom .sec = uncurry (elimProp (λ _ → isPropΠ λ _ → isSet× squash/ squash/ _ _) (λ _ → elimProp (λ _ → isSet× squash/ squash/ _ _) (λ _ → refl))) - isom .leftInv = elimProp (λ _ → squash/ _ _) (λ _ → refl) + isom .ret = elimProp (λ _ → squash/ _ _) (λ _ → refl) productRelMatchesTransp : {S₁ : Type ℓ → Type ℓ₁} (ρ₁ : StrRel S₁ ℓ₁') (α₁ : EquivAction S₁) diff --git a/Cubical/ZCohomology/CohomologyRings/CP2.agda b/Cubical/ZCohomology/CohomologyRings/CP2.agda index 8fe6b53251..5a706ab2ef 100644 --- a/Cubical/ZCohomology/CohomologyRings/CP2.agda +++ b/Cubical/ZCohomology/CohomologyRings/CP2.agda @@ -155,13 +155,13 @@ module ComputeCP²Notation ϕ₄⁻¹ = inv (fst e₄) ϕ₄⁻¹str = snd (invGroupIso e₄) - ϕ₀-sect = rightInv (fst e₀) - ϕ₂-sect = rightInv (fst e₂) - ϕ₄-sect = rightInv (fst e₄) + ϕ₀-sect = sec (fst e₀) + ϕ₂-sect = sec (fst e₂) + ϕ₄-sect = sec (fst e₄) - ϕ₀-retr = leftInv (fst e₀) - ϕ₂-retr = leftInv (fst e₂) - ϕ₄-retr = leftInv (fst e₄) + ϕ₀-retr = ret (fst e₀) + ϕ₂-retr = ret (fst e₂) + ϕ₄-retr = ret (fst e₄) -- End Notation @@ -448,8 +448,8 @@ fst CP²-CohomologyRing = isoToEquiv is is : Iso ℤ[x]/x³ (H* CP²) fun is = ℤ[x]/x³→H*-CP² inv is = H*-CP²→ℤ[x]/x³ - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd CP²-CohomologyRing = snd ℤ[X]/X³→H*R-CP² CohomologyRing-CP² : RingEquiv (H*R CP²) (CommRing→Ring ℤ[X]/X³) diff --git a/Cubical/ZCohomology/CohomologyRings/Coproduct.agda b/Cubical/ZCohomology/CohomologyRings/Coproduct.agda index 52c3c2993e..21c1b216a8 100644 --- a/Cubical/ZCohomology/CohomologyRings/Coproduct.agda +++ b/Cubical/ZCohomology/CohomologyRings/Coproduct.agda @@ -196,16 +196,16 @@ module Equiv-Coproduct-Properties e-sectX : (x : H* X) → H*-X⊎Y→H*-X×H*-Y (H*-X→H*-X⊎Y x) ≡ (x , 0H*Y) e-sectX = DS-Ind-Prop.f _ _ _ _ (λ _ → isSetH*X×Y _ _) refl - (λ n a → ≡-× (cong (base n) (cong fst (rightInv (fst Equiv-Coproduct-CoHom) (a , 0ₕ n)))) - (cong (base n) (cong snd (rightInv (fst Equiv-Coproduct-CoHom) (a , 0ₕ n)))) + (λ n a → ≡-× (cong (base n) (cong fst (sec (fst Equiv-Coproduct-CoHom) (a , 0ₕ n)))) + (cong (base n) (cong snd (sec (fst Equiv-Coproduct-CoHom) (a , 0ₕ n)))) ∙ ≡-× refl (base-neutral n)) λ {U V} ind-U ind-V → cong₂ _+H*X×Y_ ind-U ind-V ∙ ≡-× refl (+H*YIdR _) e-sectY : (y : H* Y) → (H*-X⊎Y→H*-X×H*-Y (H*-Y→H*-X⊎Y y)) ≡ (0H*X , y) e-sectY = DS-Ind-Prop.f _ _ _ _ (λ _ → isSetH*X×Y _ _) refl - (λ m b → ≡-× (cong (base m) (cong fst (rightInv (fst Equiv-Coproduct-CoHom) (0ₕ m , b)))) - (cong (base m) (cong snd (rightInv (fst Equiv-Coproduct-CoHom) (0ₕ m , b)))) + (λ m b → ≡-× (cong (base m) (cong fst (sec (fst Equiv-Coproduct-CoHom) (0ₕ m , b)))) + (cong (base m) (cong snd (sec (fst Equiv-Coproduct-CoHom) (0ₕ m , b)))) ∙ ≡-× (base-neutral m) refl) λ {U V} ind-U ind-V → cong₂ _+H*X×Y_ ind-U ind-V ∙ ≡-× (+H*XIdR _) refl @@ -229,7 +229,7 @@ module Equiv-Coproduct-Properties base n (T⁻ ( fst (T a) , snd (T a))) ≡⟨ cong (base n) (cong T⁻ (helper1 _ _ (T a))) ⟩ base n (T⁻ (T a)) - ≡⟨ cong (base n) (leftInv (fst Equiv-Coproduct-CoHom) a) ⟩ + ≡⟨ cong (base n) (ret (fst Equiv-Coproduct-CoHom) a) ⟩ base n a ∎) λ {U V} ind-U ind-V → (H*-X×H*-Y→H*-X⊎Y-pres+ _ _) ∙ (cong₂ _+H*X⊎Y_ ind-U ind-V) @@ -304,8 +304,8 @@ module _ is : Iso (H* (X ⊎ Y)) (H* X × H* Y) fun is = H*-X⊎Y→H*-X×H*-Y inv is = H*-X×H*-Y→H*-X⊎Y - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd (CohomologyRing-Coproduct) = makeIsRingHom H*-X⊎Y→H*-X×H*-Y-pres1 H*-X⊎Y→H*-X×H*-Y-pres+ diff --git a/Cubical/ZCohomology/CohomologyRings/CupProductProperties.agda b/Cubical/ZCohomology/CohomologyRings/CupProductProperties.agda index 348948991a..4875172961 100644 --- a/Cubical/ZCohomology/CohomologyRings/CupProductProperties.agda +++ b/Cubical/ZCohomology/CohomologyRings/CupProductProperties.agda @@ -261,7 +261,7 @@ module cupTrivial where cancelElement : (x : coHom (n +' n) X) → x ≡ (-ₕ x) → x ≡ 0ₕ (n +' n) - cancelElement x q = sym (leftInv (fst e) x) + cancelElement x q = sym (ret (fst e) x) ∙ cong (inv (fst e)) (-Cancel'' (fun (fst e) x) (cong (fun (fst e)) q ∙ presinv (snd e) x)) ∙ pres1 (snd (invGroupIso e)) diff --git a/Cubical/ZCohomology/CohomologyRings/KleinBottle.agda b/Cubical/ZCohomology/CohomologyRings/KleinBottle.agda index 629304f799..ab98b2eb77 100644 --- a/Cubical/ZCohomology/CohomologyRings/KleinBottle.agda +++ b/Cubical/ZCohomology/CohomologyRings/KleinBottle.agda @@ -176,22 +176,22 @@ module Equiv-𝕂²-Properties ϕ₀str = snd e₀ ϕ₀⁻¹ = inv (fst e₀) ϕ₀⁻¹str = snd (invGroupIso e₀) - ϕ₀-sect = rightInv (fst e₀) - ϕ₀-retr = leftInv (fst e₀) + ϕ₀-sect = sec (fst e₀) + ϕ₀-retr = ret (fst e₀) ϕ₁ = fun (fst e₁) ϕ₁str = snd e₁ ϕ₁⁻¹ = inv (fst e₁) ϕ₁⁻¹str = snd (invGroupIso e₁) - ϕ₁-sect = rightInv (fst e₁) - ϕ₁-retr = leftInv (fst e₁) + ϕ₁-sect = sec (fst e₁) + ϕ₁-retr = ret (fst e₁) ϕ₂ = fun (fst e₂) ϕ₂str = snd e₂ ϕ₂⁻¹ = inv (fst e₂) ϕ₂⁻¹str = snd (invGroupIso e₂) - ϕ₂-sect = rightInv (fst e₂) - ϕ₂-retr = leftInv (fst e₂) + ϕ₂-sect = sec (fst e₂) + ϕ₂-retr = ret (fst e₂) module PblComp (null-H¹ : (a b : ℤ) → (ϕ₁ a) ⌣ (ϕ₁ b) ≡ 0ₕ 2) @@ -564,8 +564,8 @@ module _ where is : Iso ℤ[x,y]/<2y,y²,xy,x²> (H* KleinBottle) fun is = ℤ[x,y]/<2y,y²,xy,x²>→H*-𝕂² inv is = H*-𝕂²→ℤ[x,y]/<2y,y²,xy,x²> - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd 𝕂²-CohomologyRing = snd ℤ[X,Y]/<2Y,Y²,XY,X²>→H*R-𝕂² CohomologyRing-𝕂² : RingEquiv (H*R KleinBottle) (CommRing→Ring ℤ[X,Y]/<2Y,Y²,XY,X²>) diff --git a/Cubical/ZCohomology/CohomologyRings/RP2.agda b/Cubical/ZCohomology/CohomologyRings/RP2.agda index 615ffcc84c..bfd09e1f12 100644 --- a/Cubical/ZCohomology/CohomologyRings/RP2.agda +++ b/Cubical/ZCohomology/CohomologyRings/RP2.agda @@ -163,16 +163,16 @@ module Equiv-RP2-Properties where ϕ₀str = snd e₀ ϕ₀⁻¹ = inv (fst e₀) ϕ₀⁻¹str = snd (invGroupIso e₀) - ϕ₀-sect = rightInv (fst e₀) - ϕ₀-retr = leftInv (fst e₀) + ϕ₀-sect = sec (fst e₀) + ϕ₀-retr = ret (fst e₀) e₂ = invGroupIso H²-RP²≅Bool ϕ₂ = fun (fst e₂) ϕ₂str = snd e₂ ϕ₂⁻¹ = inv (fst e₂) ϕ₂⁻¹str = snd (invGroupIso e₂) - ϕ₂-sect = rightInv (fst e₂) - ϕ₂-retr = leftInv (fst e₂) + ϕ₂-sect = sec (fst e₂) + ϕ₂-retr = ret (fst e₂) Hⁿ-RP²≅0' : (n : ℕ) → (n ≡ 0 → ⊥) → (n ≡ 2 → ⊥) → GroupIso (coHomGr n RP²) UnitGroup₀ Hⁿ-RP²≅0' zero ¬p ¬q = ⊥.rec (¬p refl) @@ -506,8 +506,8 @@ module _ where is : Iso ℤ[x]/<2x,x²> (H* RP²) fun is = ℤ[x]/<2x,x²>→H*-RP² inv is = H*-RP²→ℤ[x]/<2x,x²> - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd RP²-CohomologyRing = snd ℤ[X]/<2X,X²>→H*R-RP² CohomologyRing-RP² : RingEquiv (H*R RP²) (CommRing→Ring ℤ[X]/<2X,X²>) diff --git a/Cubical/ZCohomology/CohomologyRings/RP2wedgeS1.agda b/Cubical/ZCohomology/CohomologyRings/RP2wedgeS1.agda index 6cc89f6619..5a62adf8e3 100644 --- a/Cubical/ZCohomology/CohomologyRings/RP2wedgeS1.agda +++ b/Cubical/ZCohomology/CohomologyRings/RP2wedgeS1.agda @@ -177,22 +177,22 @@ module Equiv-RP²⋁S¹-Properties ϕ₀str = snd e₀ ϕ₀⁻¹ = inv (fst e₀) ϕ₀⁻¹str = snd (invGroupIso e₀) - ϕ₀-sect = rightInv (fst e₀) - ϕ₀-retr = leftInv (fst e₀) + ϕ₀-sect = sec (fst e₀) + ϕ₀-retr = ret (fst e₀) ϕ₁ = fun (fst e₁) ϕ₁str = snd e₁ ϕ₁⁻¹ = inv (fst e₁) ϕ₁⁻¹str = snd (invGroupIso e₁) - ϕ₁-sect = rightInv (fst e₁) - ϕ₁-retr = leftInv (fst e₁) + ϕ₁-sect = sec (fst e₁) + ϕ₁-retr = ret (fst e₁) ϕ₂ = fun (fst e₂) ϕ₂str = snd e₂ ϕ₂⁻¹ = inv (fst e₂) ϕ₂⁻¹str = snd (invGroupIso e₂) - ϕ₂-sect = rightInv (fst e₂) - ϕ₂-retr = leftInv (fst e₂) + ϕ₂-sect = sec (fst e₂) + ϕ₂-retr = ret (fst e₂) module PblComp (null-H¹ : (a b : ℤ) → (ϕ₁ a) ⌣ (ϕ₁ b) ≡ 0ₕ 2) @@ -565,8 +565,8 @@ module _ where is : Iso ℤ[x,y]/<2y,y²,xy,x²> (H* RP²⋁S¹) fun is = ℤ[x,y]/<2y,y²,xy,x²>→H*-RP²⋁S¹ inv is = H*-RP²⋁S¹→ℤ[x,y]/<2y,y²,xy,x²> - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd RP²⋁S¹-CohomologyRing = snd ℤ[X,Y]/<2Y,Y²,XY,X²>→H*R-RP²⋁S¹ CohomologyRing-RP²⋁S¹ : RingEquiv (H*R RP²⋁S¹) (CommRing→Ring ℤ[X,Y]/<2Y,Y²,XY,X²>) diff --git a/Cubical/ZCohomology/CohomologyRings/S1.agda b/Cubical/ZCohomology/CohomologyRings/S1.agda index 033c4e244d..d508b91e0c 100644 --- a/Cubical/ZCohomology/CohomologyRings/S1.agda +++ b/Cubical/ZCohomology/CohomologyRings/S1.agda @@ -131,8 +131,8 @@ module Equiv-S1-Properties where ϕ₀str = snd e₀ ϕ₀⁻¹ = inv (fst e₀) ϕ₀⁻¹str = snd (invGroupIso e₀) - ϕ₀-sect = rightInv (fst e₀) - ϕ₀-retr = leftInv (fst e₀) + ϕ₀-sect = sec (fst e₀) + ϕ₀-retr = ret (fst e₀) e₁ = invGroupIso (Hⁿ-Sᵐ 1 1) @@ -140,8 +140,8 @@ module Equiv-S1-Properties where ϕ₁str = snd e₁ ϕ₁⁻¹ = inv (fst e₁) ϕ₁⁻¹str = snd (invGroupIso e₁) - ϕ₁-sect = rightInv (fst e₁) - ϕ₁-retr = leftInv (fst e₁) + ϕ₁-sect = sec (fst e₁) + ϕ₁-retr = ret (fst e₁) ----------------------------------------------------------------------------- -- Direct Sens on ℤ[x] @@ -331,8 +331,8 @@ module _ where is : Iso ℤ[x]/x² (H* (S₊ 1)) fun is = ℤ[x]/x²→H*-S¹ inv is = H*-S¹→ℤ[x]/x² - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd S¹-CohomologyRing = snd ℤ[X]/X²→H*R-S¹ CohomologyRing-S¹ : RingEquiv (H*R (S₊ 1)) (CommRing→Ring ℤ[X]/X²) diff --git a/Cubical/ZCohomology/CohomologyRings/S2wedgeS4.agda b/Cubical/ZCohomology/CohomologyRings/S2wedgeS4.agda index aaa5f001b8..70b5dd7eca 100644 --- a/Cubical/ZCohomology/CohomologyRings/S2wedgeS4.agda +++ b/Cubical/ZCohomology/CohomologyRings/S2wedgeS4.agda @@ -155,16 +155,16 @@ module Equiv-RP2-Properties where ϕ₀str = snd e₀ ϕ₀⁻¹ = inv (fst e₀) ϕ₀⁻¹str = snd (invGroupIso e₀) - ϕ₀-sect = rightInv (fst e₀) - ϕ₀-retr = leftInv (fst e₀) + ϕ₀-sect = sec (fst e₀) + ϕ₀-retr = ret (fst e₀) e₂ = invGroupIso H²-S²⋁S⁴≅ℤ ϕ₂ = fun (fst e₂) ϕ₂str = snd e₂ ϕ₂⁻¹ = inv (fst e₂) ϕ₂⁻¹str = snd (invGroupIso e₂) - ϕ₂-sect = rightInv (fst e₂) - ϕ₂-retr = leftInv (fst e₂) + ϕ₂-sect = sec (fst e₂) + ϕ₂-retr = ret (fst e₂) -- This equivalence need to be put in module -- However, it never type checks @@ -179,8 +179,8 @@ module Equiv-RP2-Properties where ϕ₄⁻¹ : coHom 4 S²⋁S⁴ → ℤ ϕ₄⁻¹ = inv (fst e₄) ϕ₄⁻¹str = snd (invGroupIso e₄) - ϕ₄-sect = rightInv (fst e₄) - ϕ₄-retr = leftInv (fst e₄) + ϕ₄-sect = sec (fst e₄) + ϕ₄-retr = ret (fst e₄) -- Partition data partℕ (k : ℕ) : Type ℓ-zero where @@ -516,8 +516,8 @@ module _ where is : Iso ℤ[x,y]/ (H* S²⋁S⁴) fun is = ℤ[x,y]/→H*-S²⋁S⁴ inv is = H*-S²⋁S⁴→ℤ[x,y]/ - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd S²⋁S⁴-CohomologyRing = snd ℤ[X,Y]/→H*R-S²⋁S⁴ CohomologyRing-S²⋁S⁴ : RingEquiv (H*R S²⋁S⁴) (CommRing→Ring ℤ[X,Y]/) diff --git a/Cubical/ZCohomology/CohomologyRings/Sn.agda b/Cubical/ZCohomology/CohomologyRings/Sn.agda index 3519372104..800316c361 100644 --- a/Cubical/ZCohomology/CohomologyRings/Sn.agda +++ b/Cubical/ZCohomology/CohomologyRings/Sn.agda @@ -141,16 +141,16 @@ module Equiv-Sn-Properties (n : ℕ) where ϕ₀str = snd e₀ ϕ₀⁻¹ = inv (fst e₀) ϕ₀⁻¹str = snd (invGroupIso e₀) - ϕ₀-sect = rightInv (fst e₀) - ϕ₀-retr = leftInv (fst e₀) + ϕ₀-sect = sec (fst e₀) + ϕ₀-retr = ret (fst e₀) eₙ = invGroupIso (Hⁿ-Sⁿ≅ℤ n) ϕₙ = fun (fst eₙ) ϕₙstr = snd eₙ ϕₙ⁻¹ = inv (fst eₙ) ϕₙ⁻¹str = snd (invGroupIso eₙ) - ϕₙ-sect = rightInv (fst eₙ) - ϕₙ-retr = leftInv (fst eₙ) + ϕₙ-sect = sec (fst eₙ) + ϕₙ-retr = ret (fst eₙ) ----------------------------------------------------------------------------- -- Partition of ℕ @@ -404,8 +404,8 @@ module _ (n : ℕ) where is : Iso ℤ[x]/x² (H* (S₊ (suc n))) fun is = ℤ[x]/x²→H*-Sⁿ inv is = H*-Sⁿ→ℤ[x]/x² - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd Sⁿ-CohomologyRing = snd ℤ[X]/X²→H*R-Sⁿ CohomologyRing-Sⁿ : RingEquiv (H*R (S₊ (suc n))) (CommRing→Ring ℤ[X]/X²) diff --git a/Cubical/ZCohomology/CohomologyRings/Unit.agda b/Cubical/ZCohomology/CohomologyRings/Unit.agda index 4739e7f8ea..6c2a7aa62d 100644 --- a/Cubical/ZCohomology/CohomologyRings/Unit.agda +++ b/Cubical/ZCohomology/CohomologyRings/Unit.agda @@ -124,8 +124,8 @@ module Equiv-Unit-Properties where ϕ₀str = snd e₀ ϕ₀⁻¹ = inv (fst e₀) ϕ₀⁻¹str = snd (invGroupIso e₀) - ϕ₀-sect = rightInv (fst e₀) - ϕ₀-retr = leftInv (fst e₀) + ϕ₀-sect = sec (fst e₀) + ϕ₀-retr = ret (fst e₀) ----------------------------------------------------------------------------- @@ -302,8 +302,8 @@ module _ where is : Iso ℤ[x]/x (H* Unit) fun is = ℤ[x]/x→H*-Unit inv is = H*-Unit→ℤ[x]/x - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd Unit-CohomologyRingP = snd ℤ[X]/X→H*R-Unit CohomologyRing-UnitP : RingEquiv (H*R Unit) (CommRing→Ring ℤ[X]/X) diff --git a/Cubical/ZCohomology/EilenbergSteenrodZ.agda b/Cubical/ZCohomology/EilenbergSteenrodZ.agda index e1134de0cc..36c98d4bbe 100644 --- a/Cubical/ZCohomology/EilenbergSteenrodZ.agda +++ b/Cubical/ZCohomology/EilenbergSteenrodZ.agda @@ -130,7 +130,7 @@ private (fId : f (pt A) ≡ refl) → Kn→ΩKn+1 n (suspFunCharacFun {A = A} n (suspΩFun' n f) a) ≡ f a helper zero a f fId = - Iso.rightInv (Iso-Kn-ΩKn+1 0) (sym (rCancelₖ 1 (0ₖ 1)) + Iso.sec (Iso-Kn-ΩKn+1 0) (sym (rCancelₖ 1 (0ₖ 1)) ∙∙ cong (λ x → suspΩFun' 0 f x +ₖ 0ₖ 1) (merid a ∙ (sym (merid (pt A)))) ∙∙ (rCancelₖ 1 (0ₖ 1))) ∙∙ sym (rUnit _) @@ -138,7 +138,7 @@ private ∙∙ cong (λ p → f a ∙ sym p) fId ∙∙ sym (rUnit (f a)) helper (suc n) a f fId = - Iso.rightInv (Iso-Kn-ΩKn+1 (suc n)) + Iso.sec (Iso-Kn-ΩKn+1 (suc n)) ((sym (rCancelₖ _ (0ₖ (suc (suc n)))) ∙∙ cong (λ x → suspΩFun' (suc n) f x +ₖ 0ₖ (suc (suc n))) (merid a ∙ (sym (merid (pt A)))) ∙∙ rCancelₖ _ (0ₖ (suc (suc n))))) @@ -154,7 +154,7 @@ suspFunCharac : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → Iso (coHom (suc (suc n 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)) -rightInv (suspFunCharac {A = A} n) = +sec (suspFunCharac {A = A} n) = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) λ f → T.rec (isProp→isOfHLevelSuc n (isSetSetTrunc _ _)) (λ fId → cong ∣_∣₂ @@ -167,13 +167,13 @@ rightInv (suspFunCharac {A = A} n) = (merid x) (sym (merid (pt A))) i) ∙∙ ΩKn+1→Kn-hom (suc n) (Kn→ΩKn+1 (suc n) (f x)) (sym (Kn→ΩKn+1 (suc n) (f (pt A)))) - ∙∙ cong₂ _+ₖ_ (Iso.leftInv (Iso-Kn-ΩKn+1 (suc n)) (f x)) + ∙∙ cong₂ _+ₖ_ (Iso.ret (Iso-Kn-ΩKn+1 (suc n)) (f x)) (cong (λ x → ΩKn+1→Kn (suc n) (sym (Kn→ΩKn+1 (suc n) x))) fId) ∙∙ cong (λ y → f x +ₖ ΩKn+1→Kn (suc n) (sym y)) (Kn→ΩKn+10ₖ (suc n)) ∙∙ cong (f x +ₖ_) (ΩKn+1→Kn-refl (suc n)) ∙ rUnitₖ _ (f x)))) (fst (isConnectedPathKn n (f (pt A)) (0ₖ _))) -leftInv (suspFunCharac {A = A} n) = +ret (suspFunCharac {A = A} n) = SuspCohomElim {A = A} _ (λ _ → isSetSetTrunc _ _) λ f fId → cong ∣_∣₂ (funExt (linvLem (suc n) f fId)) @@ -188,7 +188,7 @@ fun (suspFunCharac0 {A = A}) = ∙∙ (cong (_∙ (rCancelₖ _ (f north))) (sym (rUnit (sym (rCancelₖ _ (f north)))))) ∙ (lCancel (rCancelₖ _ (f north))))) inv suspFunCharac0 = ST.map λ f → suspΩFun 0 (fst f) -rightInv (suspFunCharac0 {A = A}) = +sec (suspFunCharac0 {A = A}) = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) λ {(f , p) → cong ∣_∣₂ (Σ≡Prop (λ _ → isSetℤ _ _) @@ -197,7 +197,7 @@ rightInv (suspFunCharac0 {A = A}) = (rUnitₖ 1 ∣ intLoop (f x) i ∣ j))) (pos 0)))) ∙ windingℤLoop (f x))))} -leftInv (suspFunCharac0 {A = A}) = +ret (suspFunCharac0 {A = A}) = SuspCohomElim {A = A} _ (λ _ → isSetSetTrunc _ _) λ f fId → cong ∣_∣₂ (funExt (linvLem 0 f fId)) @@ -323,12 +323,12 @@ private ∙ snd pushmap)))) (Iso.fun PathIdTrunc₀Iso pushId')))) inim'}) - rightInv (exactnessIso (pos zero) (f , p)) = + sec (exactnessIso (pos zero) (f , p)) = uncurry (ST.elim (λ _ → isSetΠ λ _ → isOfHLevelPath 2 (isSetΣ isSetSetTrunc (λ _ → isProp→isSet isPropPropTrunc)) _ _) λ {(p , q) _ → Σ≡Prop (λ _ → isPropPropTrunc) refl}) - leftInv (exactnessIso (pos zero) (f , p)) = + ret (exactnessIso (pos zero) (f , p)) = uncurry (ST.elim (λ _ → isSetΠ λ _ → isOfHLevelPath 2 (isSetΣ isSetSetTrunc (λ _ → isProp→isSet (isSetSetTrunc _ _))) _ _) @@ -365,8 +365,8 @@ private (λ 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 + sec (exactnessIso (pos (suc n)) f) _ = Σ≡Prop (λ _ → isPropPropTrunc) refl + ret (exactnessIso (pos (suc n)) f) _ = Σ≡Prop (λ _ → isSetSetTrunc _ _) refl exactnessIso (negsuc n) (f , p) = isContr→Iso ((tt* , refl) , λ {(tt* , p) → Σ≡Prop (λ _ → isOfHLevelPath 1 isPropUnit* _ _) diff --git a/Cubical/ZCohomology/GroupStructure.agda b/Cubical/ZCohomology/GroupStructure.agda index edc00fe3c8..1bca019d30 100644 --- a/Cubical/ZCohomology/GroupStructure.agda +++ b/Cubical/ZCohomology/GroupStructure.agda @@ -15,7 +15,7 @@ open import Cubical.Foundations.GroupoidLaws renaming (assoc to assoc∙) open import Cubical.Data.Sigma open import Cubical.Data.Int renaming (_+_ to _+ℤ_ ; -_ to -ℤ_) open import Cubical.Data.Nat renaming (+-assoc to +-assocℕ ; +-comm to +-commℕ) -open import Cubical.Data.Fin.Inductive +open import Cubical.Data.Fin open import Cubical.Algebra.Group open import Cubical.Algebra.Group.Morphisms @@ -694,10 +694,10 @@ 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)) -leftInv (fst (coHomIso n is)) = - ST.elim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (funExt λ x → cong f (rightInv is x)) +sec (fst (coHomIso n is)) = + ST.elim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (funExt λ x → cong f (ret is x)) +ret (fst (coHomIso n is)) = + ST.elim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (funExt λ x → cong f (sec 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 @@ -726,8 +726,8 @@ coHomGrΩ n A = ∥ (A → typ (Ω (coHomK-ptd (suc n)))) ∥₂ , coHomGrnA addIso : (n : ℕ) (x : coHomK n) → Iso (coHomK n) (coHomK n) fun (addIso n x) y = y +[ n ]ₖ x inv' (addIso n x) y = y -[ n ]ₖ x -rightInv (addIso n x) y = -+cancelₖ n y x -leftInv (addIso n x) y = -cancelRₖ n x y +sec (addIso n x) y = -+cancelₖ n y x +ret (addIso n x) y = -cancelRₖ n x y baseChange : (n : ℕ) (x : coHomK (suc n)) → (0ₖ (suc n) ≡ 0ₖ (suc n)) ≃ (x ≡ x) baseChange n x = isoToEquiv is @@ -781,8 +781,8 @@ baseChange n x = isoToEquiv is is : Iso _ _ fun is = f n x inv' is = g n x - rightInv is = f-g n x - leftInv is = g-f n x + sec is = f-g n x + ret is = g-f n x isCommΩK-based : (n : ℕ) (x : coHomK n) → isComm∙ (coHomK n , x) isCommΩK-based zero x p q = isSetℤ _ _ (p ∙ q) (q ∙ p) @@ -929,7 +929,7 @@ open IsGroupHom -- (coHom n A , λ x y → Iso.inv (isom e) (_+gr_ (snd G) (fun (isom e) x) -- (fun (isom e) y))) -- (idEquiv _) --- λ x y → sym (leftInv (isom e) _) +-- λ x y → sym (ret (isom e) _) -- ∙ cong (Iso.inv (isom e)) (isHom e x y) -- induced+ : ∀ {ℓ ℓ'} {A : Type ℓ} {G : Group {ℓ'}} {n : ℕ} @@ -941,7 +941,7 @@ open IsGroupHom -- → (e : GroupIso (coHomGr n A) G) -- → GroupIso (coHomGr n A) (inducedCoHom e) -- isom (inducedCoHomIso e) = idIso --- isHom (inducedCoHomIso e) x y = sym (leftInv (isom e) _) +-- isHom (inducedCoHomIso e) x y = sym (ret (isom e) _) -- ∙ cong (Iso.inv (isom e)) (isHom e x y) -- inducedCoHomPath : ∀ {ℓ ℓ'} {A : Type ℓ} {G : Group {ℓ'}} {n : ℕ} diff --git a/Cubical/ZCohomology/Groups/CP2.agda b/Cubical/ZCohomology/Groups/CP2.agda index ea96b639e9..f400ec162d 100644 --- a/Cubical/ZCohomology/Groups/CP2.agda +++ b/Cubical/ZCohomology/Groups/CP2.agda @@ -63,8 +63,8 @@ fun characFunSpaceCP² f = (f (inr tt)) , ((f ∘ inl ) , (λ a → cong f (push inv characFunSpaceCP² (a , f , p) (inl x) = f x inv characFunSpaceCP² (a , f , p) (inr x) = a inv characFunSpaceCP² (a , f , p) (push b i) = p b i -rightInv characFunSpaceCP² _ = refl -leftInv characFunSpaceCP² _ = +sec characFunSpaceCP² _ = refl +ret characFunSpaceCP² _ = funExt λ { (inl x) → refl ; (inr x) → refl ; (push a i) → refl} @@ -97,9 +97,9 @@ H²CP²≅ℤ = compGroupIso (BijectionIso→GroupIso bij) trivIso : GroupIso (coHomGr 2 (Susp S¹)) (×coHomGr 2 (Susp S¹) Unit) fun (fst trivIso) x = x , 0ₕ _ inv (fst trivIso) = fst - rightInv (fst trivIso) (x , p) = + sec (fst trivIso) (x , p) = ΣPathP (refl , isContr→isProp (isContrHⁿ-Unit 1) _ _) - leftInv (fst trivIso) x = refl + ret (fst trivIso) x = refl snd trivIso = makeIsGroupHom λ _ _ → refl bij : BijectionIso (coHomGr 2 CP²) (×coHomGr 2 (Susp S¹) Unit) @@ -173,12 +173,12 @@ H¹-CP²≅0 = ∥ (Σ[ f ∈ (Susp S¹ → 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 - rightInv lem₂ = + sec lem₂ = 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₂ = + ret lem₂ = ST.elim (λ _ → isOfHLevelPath 2 squash₂ _ _) (uncurry (coHomK-elim _ (λ _ → isPropΠ (λ _ → squash₂ _ _)) (uncurry λ f p → cong ∣_∣₂ (ΣPathP (refl , (ΣPathP ((funExt (λ x → lUnitₖ _ (f x))) @@ -319,9 +319,9 @@ CP²≡CP2 = compIso (equivToIso (symPushout fst (λ _ → tt))) (invIso CP²-is genId : Iso.fun (fst (coHomIso 2 CP²≡CP2)) genCP² ≡ gen' - genId = sym (Iso.leftInv (fst H²CP²≅ℤ) _) + genId = sym (Iso.ret (fst H²CP²≅ℤ) _) ∙∙ cong (Iso.inv (fst H²CP²≅ℤ)) lem - ∙∙ Iso.leftInv (fst H²CP²≅ℤ) _ + ∙∙ Iso.ret (fst H²CP²≅ℤ) _ where lem : Iso.fun (fst H²CP²≅ℤ) (Iso.fun (fst (coHomIso 2 CP²≡CP2)) genCP²) ≡ Iso.fun (fst H²CP²≅ℤ) gen' @@ -353,7 +353,7 @@ CP²≡CP2 = compIso (equivToIso (symPushout fst (λ _ → tt))) (invIso CP²-is (idGroupEquiv , refl)) lem : inv (fst H²CP²≅ℤ) (pos 1) ≡ gen' - lem = Iso.leftInv (fst H²CP²≅ℤ) gen' + lem = Iso.ret (fst H²CP²≅ℤ) gen' c = main isEquiv⌣gen' (GroupIso→GroupEquiv (invGroupIso H²CP²≅ℤ)) diff --git a/Cubical/ZCohomology/Groups/Connected.agda b/Cubical/ZCohomology/Groups/Connected.agda index a45c50e9dc..3e9166d13a 100644 --- a/Cubical/ZCohomology/Groups/Connected.agda +++ b/Cubical/ZCohomology/Groups/Connected.agda @@ -30,8 +30,8 @@ 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.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) = + Iso.sec (H⁰-connected-type a con) b = refl + Iso.ret (H⁰-connected-type a con) = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) λ f → cong ∣_∣₂ (funExt λ x → T.rec₊ (isSetℤ _ _) (cong f) (isConnectedPath 1 con a x .fst)) @@ -41,8 +41,8 @@ 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) inv (fst (H⁰-connected a con)) b = ∣ (λ _ → b) ∣₂ -rightInv (fst (H⁰-connected a con)) _ = refl -leftInv (fst (H⁰-connected a con)) = +sec (fst (H⁰-connected a con)) _ = refl +ret (fst (H⁰-connected a con)) = 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) diff --git a/Cubical/ZCohomology/Groups/Coproduct.agda b/Cubical/ZCohomology/Groups/Coproduct.agda index 1ebd9bebe3..a1db5d1b36 100644 --- a/Cubical/ZCohomology/Groups/Coproduct.agda +++ b/Cubical/ZCohomology/Groups/Coproduct.agda @@ -39,11 +39,11 @@ module _ 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 ∣₂))) - Iso.rightInv (fst Equiv-Coproduct-CoHom) = uncurry + Iso.sec (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₂ _ _)) (λ h → refl))) - Iso.leftInv (fst Equiv-Coproduct-CoHom) = ST.elim (λ _ → isProp→isSet (squash₂ _ _)) + Iso.ret (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) diff --git a/Cubical/ZCohomology/Groups/KleinBottle.agda b/Cubical/ZCohomology/Groups/KleinBottle.agda index 793dff1511..4b0f09cdb5 100644 --- a/Cubical/ZCohomology/Groups/KleinBottle.agda +++ b/Cubical/ZCohomology/Groups/KleinBottle.agda @@ -65,12 +65,12 @@ inv (characFunSpace𝕂² A) (x , p , q , sq) (line1 i) = p i inv (characFunSpace𝕂² A) (x , p , q , sq) (line2 i) = q i inv (characFunSpace𝕂² A) (x , p , q , sq) (square i j) = invEq (Square≃doubleComp q q (sym p) p) sq i j -rightInv (characFunSpace𝕂² A) (x , (p , (q , sq))) = +sec (characFunSpace𝕂² A) (x , (p , (q , sq))) = ΣPathP (refl , (ΣPathP (refl , (ΣPathP (refl , secEq (Square≃doubleComp q q (sym p) p) sq))))) -leftInv (characFunSpace𝕂² A) f _ point = f point -leftInv (characFunSpace𝕂² A) f _ (line1 i) = f (line1 i) -leftInv (characFunSpace𝕂² A) f _ (line2 i) = f (line2 i) -leftInv (characFunSpace𝕂² A) f z (square i j) = +ret (characFunSpace𝕂² A) f _ point = f point +ret (characFunSpace𝕂² A) f _ (line1 i) = f (line1 i) +ret (characFunSpace𝕂² A) f _ (line2 i) = f (line2 i) +ret (characFunSpace𝕂² A) f z (square i j) = retEq (Square≃doubleComp (cong f line2) (cong f line2) (sym (cong f line1)) (cong f line1)) @@ -101,8 +101,8 @@ private H⁰-𝕂²≅ℤ : GroupIso (coHomGr 0 KleinBottle) ℤGroup fun (fst H⁰-𝕂²≅ℤ) = ST.rec isSetℤ λ f → f point inv (fst H⁰-𝕂²≅ℤ) x = ∣ (λ _ → x) ∣₂ -rightInv (fst H⁰-𝕂²≅ℤ) _ = refl -leftInv (fst H⁰-𝕂²≅ℤ) = +sec (fst H⁰-𝕂²≅ℤ) _ = refl +ret (fst H⁰-𝕂²≅ℤ) = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) λ f → cong ∣_∣₂ (funExt (λ {point → refl ; (line1 i) j → isSetℤ (f point) (f point) refl (cong f line1) j i @@ -156,7 +156,7 @@ nilpotent→≡refl : (x : coHomK 1) (p : x ≡ x) → p ∙ p ≡ refl → p nilpotent→≡refl = T.elim (λ _ → isGroupoidΠ2 λ _ _ → isOfHLevelPlus {n = 1} 2 (isOfHLevelTrunc 3 _ _ _ _)) (toPropElim (λ _ → isPropΠ2 λ _ _ → isOfHLevelTrunc 3 _ _ _ _) - λ p pId → sym (rightInv (Iso-Kn-ΩKn+1 0) p) + λ p pId → sym (sec (Iso-Kn-ΩKn+1 0) p) ∙∙ cong (Kn→ΩKn+1 0) (nilpotent→≡0 (ΩKn+1→Kn 0 p) (sym (ΩKn+1→Kn-hom 0 p p) ∙ cong (ΩKn+1→Kn 0) pId)) @@ -166,8 +166,8 @@ Iso-H¹-𝕂²₁ : Iso (Σ[ x ∈ coHomK 1 ] Σ[ p ∈ x ≡ x ] Σ[ q ∈ x (Σ[ x ∈ coHomK 1 ] x ≡ x) fun Iso-H¹-𝕂²₁ (x , (_ , (q , _))) = x , q inv Iso-H¹-𝕂²₁ (x , q) = x , (refl , (q , (sym (rUnit refl)))) -rightInv Iso-H¹-𝕂²₁ _ = refl -leftInv Iso-H¹-𝕂²₁ (x , (p , (q , P))) = +sec Iso-H¹-𝕂²₁ _ = refl +ret Iso-H¹-𝕂²₁ (x , (p , (q , P))) = ΣPathP (refl , (ΣPathP (sym (nilpotent→≡refl x p P) , toPathP (Σ≡Prop (λ _ → isOfHLevelTrunc 3 _ _ _ _) @@ -221,10 +221,10 @@ fun Iso-H²-𝕂²₁ = λ y → ∣ fst y , snd (snd y) ∣₂))) inv Iso-H²-𝕂²₁ = ST.map λ p → (0ₖ 2) , ((fst p) , (refl , (snd p))) -rightInv Iso-H²-𝕂²₁ = +sec Iso-H²-𝕂²₁ = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) λ p → refl -leftInv Iso-H²-𝕂²₁ = +ret Iso-H²-𝕂²₁ = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) (uncurry (T.elim (λ _ → is2GroupoidΠ λ _ → isOfHLevelPlus {n = 1} 3 (isSetSetTrunc _ _)) (sphereToPropElim _ @@ -376,9 +376,9 @@ 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 inv testIso = Bool→ΣKₙNilpot -rightInv testIso false = refl -rightInv testIso true = refl -leftInv testIso = +sec testIso false = refl +sec testIso true = refl +ret testIso = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) (uncurry (T.elim (λ _ → isGroupoidΠ λ _ → isOfHLevelPlus {n = 1} 2 (isSetSetTrunc _ _)) @@ -390,11 +390,11 @@ leftInv testIso = path p false q = (cong Bool→ΣKₙNilpot q) ∙∙ sym (oddCharac (ΩKn+1→Kn 0 p) q) - ∙∙ cong ∣_∣₂ λ i → 0ₖ 1 , rightInv (Iso-Kn-ΩKn+1 0) p i + ∙∙ cong ∣_∣₂ λ i → 0ₖ 1 , sec (Iso-Kn-ΩKn+1 0) p i path p true q = cong Bool→ΣKₙNilpot q ∙∙ sym (evenCharac (ΩKn+1→Kn 0 p) q) - ∙∙ cong ∣_∣₂ λ i → 0ₖ 1 , rightInv (Iso-Kn-ΩKn+1 0) p i + ∙∙ cong ∣_∣₂ λ i → 0ₖ 1 , sec (Iso-Kn-ΩKn+1 0) p i H²-𝕂²≅Bool : GroupIso (coHomGr 2 KleinBottle) BoolGroup @@ -474,7 +474,7 @@ Hⁿ⁺³-𝕂²≅0 n = contrGroupIsoUnit (isContrHⁿ-𝕂² n) 1↦α : Iso.inv (fst H¹-𝕂²≅ℤ) 1 ≡ α 1↦α = cong (Iso.inv (fst H¹-𝕂²≅ℤ)) (sym α↦1) - ∙ leftInv (fst H¹-𝕂²≅ℤ) α + ∙ ret (fst H¹-𝕂²≅ℤ) α -- still too long to compute, but works for RP2⋁S1 diff --git a/Cubical/ZCohomology/Groups/Prelims.agda b/Cubical/ZCohomology/Groups/Prelims.agda index 6578c33758..d30a92865b 100644 --- a/Cubical/ZCohomology/Groups/Prelims.agda +++ b/Cubical/ZCohomology/Groups/Prelims.agda @@ -104,9 +104,9 @@ Iso.fun S¹→S¹≡S¹×ℤ f = S¹map (f base) , winding (basechange2⁻ (S¹map (f base)) λ i → S¹map (f (loop i))) Iso.inv S¹→S¹≡S¹×ℤ (s , int) base = ∣ s ∣ Iso.inv S¹→S¹≡S¹×ℤ (s , int) (loop i) = ∣ basechange2 s (intLoop int) i ∣ -Iso.rightInv S¹→S¹≡S¹×ℤ (s , int) = ΣPathP (refl , ((λ i → winding (basechange2-retr s (λ i → intLoop int i) i)) +Iso.sec S¹→S¹≡S¹×ℤ (s , int) = ΣPathP (refl , ((λ i → winding (basechange2-retr s (λ i → intLoop int i) i)) ∙ windingℤLoop int)) -Iso.leftInv S¹→S¹≡S¹×ℤ f = funExt λ { base → S¹map-id (f base) +Iso.ret S¹→S¹≡S¹×ℤ f = funExt λ { base → S¹map-id (f base) ; (loop i) j → helper j i} where helper : PathP (λ i → S¹map-id (f base) i ≡ S¹map-id (f base) i) @@ -165,14 +165,14 @@ module _ (key : Unit') where invmap : (∥ Susp S¹ ∥ 4) × (∥ S¹ ∥ 3) → S¹ → ∥ Susp S¹ ∥ 4 invmap (a , b) base = a +K 0₂ invmap (a , b) (loop i) = a +K Kn→ΩKn+1 1 b i - Iso.rightInv S1→K2≡K2×K1' (a , b) = ΣPathP ((P.rUnitK 2 a) + Iso.sec S1→K2≡K2×K1' (a , b) = ΣPathP ((P.rUnitK 2 a) , (cong (ΩKn+1→Kn 1) (doubleCompPath-elim' (sym (P.rCancelK 2 (a +K 0₂))) (λ i → (a +K Kn→ΩKn+1 1 b i) -K (a +K 0₂)) (P.rCancelK 2 (a +K 0₂))) ∙∙ cong (ΩKn+1→Kn 1) (congHelper2 (Kn→ΩKn+1 1 b) (λ x → (a +K x) -K (a +K 0₂)) (funExt (λ x → sym (cancelHelper a x))) (P.rCancelK 2 (a +K 0₂))) - ∙∙ Iso.leftInv (Iso-Kn-ΩKn+1 1) b)) + ∙∙ Iso.ret (Iso-Kn-ΩKn+1 1) b)) module _ where cancelHelper : (a b : coHomK 2) → (a +K b) -K (a +K 0₂) ≡ b @@ -190,8 +190,8 @@ module _ (key : Unit') where conghelper3 x p f = J (λ f _ → (q : (f x) ≡ x) → (sym q) ∙ cong f p ∙ q ≡ p) λ q → (cong (sym q ∙_) (isCommΩK-based 2 x p _) ∙∙ assoc _ _ _ ∙∙ cong (_∙ p) (lCancel q)) ∙ sym (lUnit p) - Iso.leftInv S1→K2≡K2×K1' a i base = P.rUnitK _ (a base) i - Iso.leftInv S1→K2≡K2×K1' a i (loop j) = loop-helper i j + Iso.ret S1→K2≡K2×K1' a i base = P.rUnitK _ (a base) i + Iso.ret S1→K2≡K2×K1' a i (loop j) = loop-helper i j where loop-helper : PathP (λ i → P.rUnitK _ (a base) i ≡ P.rUnitK _ (a base) i) (cong (a base +K_) (Kn→ΩKn+1 1 (ΩKn+1→Kn 1 ((sym (P.rCancelK 2 (a base)) @@ -218,7 +218,7 @@ module _ (key : Unit') where lem : (x : coHomK 2) (p : x ≡ x) (q : 0₂ ≡ x) → Kn→ΩKn+1 1 (ΩKn+1→Kn 1 (q ∙ p ∙ sym q)) ≡ q ∙ p ∙ sym q - lem x p q = Iso.rightInv (Iso-Kn-ΩKn+1 1) (q ∙ p ∙ sym q) + lem x p q = Iso.sec (Iso-Kn-ΩKn+1 1) (q ∙ p ∙ sym q) subtr-lem : (a b : hLevelTrunc 4 (S₊ 2)) → a +K (b -K a) ≡ b subtr-lem a b = P.commK 2 a (b -K a) ∙ P.-+cancelK 2 b a diff --git a/Cubical/ZCohomology/Groups/RP2.agda b/Cubical/ZCohomology/Groups/RP2.agda index 20cfd74308..c3e85bf21c 100644 --- a/Cubical/ZCohomology/Groups/RP2.agda +++ b/Cubical/ZCohomology/Groups/RP2.agda @@ -51,10 +51,10 @@ Iso.fun funSpaceIso-RP² f = f point , (cong f line , λ i j → f (square i j)) Iso.inv funSpaceIso-RP² (x , p , P) point = x Iso.inv funSpaceIso-RP² (x , p , P) (line i) = p i Iso.inv funSpaceIso-RP² (x , p , P) (square i j) = P i j -Iso.rightInv funSpaceIso-RP² (x , p , P) i = x , p , P -Iso.leftInv funSpaceIso-RP² f _ point = f point -Iso.leftInv funSpaceIso-RP² f _ (line i) = f (line i) -Iso.leftInv funSpaceIso-RP² f _ (square i j) = f (square i j) +Iso.sec funSpaceIso-RP² (x , p , P) i = x , p , P +Iso.ret funSpaceIso-RP² f _ point = f point +Iso.ret funSpaceIso-RP² f _ (line i) = f (line i) +Iso.ret funSpaceIso-RP² f _ (square i j) = f (square i j) private pathIso : {x : A} {p : x ≡ x} → Iso (p ≡ sym p) (p ∙ p ≡ refl) @@ -96,7 +96,7 @@ snd isContr-H¹-RP²-helper = ∙∙ cong (Kn→ΩKn+1 0) (sym (nilpotent→≡0 (ΩKn+1→Kn 0 p) (sym (ΩKn+1→Kn-hom 0 p p) ∙ cong (ΩKn+1→Kn 0) nilp))) - ∙∙ Iso.rightInv (Iso-Kn-ΩKn+1 0) p)))}))) + ∙∙ Iso.sec (Iso-Kn-ΩKn+1 0) p)))}))) H¹-RP²≅0 : GroupIso (coHomGr 1 RP²) UnitGroup₀ H¹-RP²≅0 = @@ -117,9 +117,9 @@ Iso.fun Iso-H²-RP²₁ = (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.sec Iso-H²-RP²₁ = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) λ _ → refl -Iso.leftInv Iso-H²-RP²₁ = +Iso.ret Iso-H²-RP²₁ = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) (uncurry (T.elim (λ _ → is2GroupoidΠ λ _ → isOfHLevelPlus {n = 1} 3 (isSetSetTrunc _ _)) (sphereToPropElim _ (λ _ → isPropΠ (λ _ → isSetSetTrunc _ _)) diff --git a/Cubical/ZCohomology/Groups/RP2wedgeS1.agda b/Cubical/ZCohomology/Groups/RP2wedgeS1.agda index a77e47acc2..a0435fba09 100644 --- a/Cubical/ZCohomology/Groups/RP2wedgeS1.agda +++ b/Cubical/ZCohomology/Groups/RP2wedgeS1.agda @@ -83,14 +83,14 @@ open IsGroupHom 1↦α : Iso.inv (fst H¹-RP²⋁S¹≅ℤ) 1 ≡ α 1↦α = cong (Iso.inv (fst H¹-RP²⋁S¹≅ℤ)) (sym α↦1) - ∙ leftInv (fst H¹-RP²⋁S¹≅ℤ) α + ∙ ret (fst H¹-RP²⋁S¹≅ℤ) α -- computes ! lem-α²≡0 : Iso.fun (fst H²-RP²⋁S¹≅Bool) (α ⌣ α) ≡ true lem-α²≡0 = refl α²≡0 : α ⌣ α ≡ 0ₕ 2 -α²≡0 = sym (leftInv (fst H²-RP²⋁S¹≅Bool) (α ⌣ α)) +α²≡0 = sym (ret (fst H²-RP²⋁S¹≅Bool) (α ⌣ α)) ∙ cong (Iso.inv (fst H²-RP²⋁S¹≅Bool)) lem-α²≡0 ∙ pres1 (snd (invGroupIso H²-RP²⋁S¹≅Bool)) diff --git a/Cubical/ZCohomology/Groups/S2wedgeS4.agda b/Cubical/ZCohomology/Groups/S2wedgeS4.agda index ace91990e0..467aa69900 100644 --- a/Cubical/ZCohomology/Groups/S2wedgeS4.agda +++ b/Cubical/ZCohomology/Groups/S2wedgeS4.agda @@ -92,6 +92,6 @@ open Iso open IsGroupHom null-H² : (a b : ℤ) → (inv (fst H²-S²⋁S⁴≅ℤ) a) ⌣ (inv (fst H²-S²⋁S⁴≅ℤ) b) ≡ 0ₕ 4 -null-H² a b = sym (leftInv (fst H⁴-S²⋁S⁴≅ℤ) _) +null-H² a b = sym (ret (fst H⁴-S²⋁S⁴≅ℤ) _) ∙ cong (inv (fst H⁴-S²⋁S⁴≅ℤ)) refl ∙ pres1 (snd (invGroupIso H⁴-S²⋁S⁴≅ℤ)) diff --git a/Cubical/ZCohomology/Groups/Sn.agda b/Cubical/ZCohomology/Groups/Sn.agda index 4db8b7c708..70eeeacfe8 100644 --- a/Cubical/ZCohomology/Groups/Sn.agda +++ b/Cubical/ZCohomology/Groups/Sn.agda @@ -84,10 +84,10 @@ suspensionAx-Sn n m = λ 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)) - Iso.rightInv helperIso = + Iso.sec helperIso = coHomPointedElim _ (ptSn (suc m)) (λ _ → isSetSetTrunc _ _) - λ f fId → cong ∣_∣₂ (funExt (λ x → Iso.leftInv (Iso-Kn-ΩKn+1 _) (f x))) - Iso.leftInv helperIso = + λ f fId → cong ∣_∣₂ (funExt (λ x → Iso.ret (Iso-Kn-ΩKn+1 _) (f x))) + Iso.ret helperIso = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) (uncurry (coHomK-elim _ @@ -98,7 +98,7 @@ suspensionAx-Sn n m = λ f → cong ∣_∣₂ (ΣPathP (refl , ΣPathP (refl , - (λ i x → Iso.rightInv (Iso-Kn-ΩKn+1 (suc n)) (f x) i)))))))) + (λ i x → Iso.sec (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)) @@ -143,8 +143,8 @@ 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) inv (fst H⁰-S⁰≅ℤ×ℤ) a = ∣ S0→ℤ a ∣₂ -rightInv (fst H⁰-S⁰≅ℤ×ℤ) _ = refl -leftInv (fst H⁰-S⁰≅ℤ×ℤ) = +sec (fst H⁰-S⁰≅ℤ×ℤ) _ = refl +ret (fst H⁰-S⁰≅ℤ×ℤ) = ST.elim (λ _ → isSet→isGroupoid isSetSetTrunc _ _) (λ f → cong ∣_∣₂ (funExt (λ {true → refl ; false → refl}))) snd H⁰-S⁰≅ℤ×ℤ = @@ -160,13 +160,13 @@ private Iso.fun (Hⁿ-S0≃Kₙ×Kₙ n) f = (f true) , (f false) Iso.inv (Hⁿ-S0≃Kₙ×Kₙ n) (a , b) true = a Iso.inv (Hⁿ-S0≃Kₙ×Kₙ n) (a , b) false = b - Iso.rightInv (Hⁿ-S0≃Kₙ×Kₙ n) a = refl - Iso.leftInv (Hⁿ-S0≃Kₙ×Kₙ n) b = funExt λ {true → refl ; false → refl} + Iso.sec (Hⁿ-S0≃Kₙ×Kₙ n) a = refl + Iso.ret (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))) + (Iso.ret (setTruncIso (Hⁿ-S0≃Kₙ×Kₙ n))) (isContrHelper n) where isContrHelper : (n : ℕ) → isContr (∥ (coHomK (suc n) × coHomK (suc n)) ∥₂) @@ -270,13 +270,13 @@ H¹-S¹≅ℤ = theIso theIso : GroupIso (coHomGr 1 (S₊ 1)) ℤGroup 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) = + sec (fst theIso) a = cong snd (Iso.sec S¹→S¹≡S¹×ℤ (base , a)) + ret (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)))) - ∙ cong ∣_∣₂ (Iso.leftInv S¹→S¹≡S¹×ℤ f) + ∙ cong ∣_∣₂ (Iso.ret S¹→S¹≡S¹×ℤ f) snd theIso = makeIsGroupHom (coHomPointedElimS¹2 _ (λ _ _ → isSetℤ _ _) @@ -319,7 +319,7 @@ HⁿSⁿ-gen (suc n) = cong (Iso.fun (fst (Hⁿ-Sⁿ≅ℤ n))) main ∙ HⁿS main : Iso.fun (fst (suspensionAx-Sn n n)) ∣ ∣_∣ₕ ∣₂ ≡ ∣ ∣_∣ₕ ∣₂ main = (sym (cong (Iso.fun (fst (suspensionAx-Sn n n))) lem) - ∙ Iso.rightInv (fst (suspensionAx-Sn n n)) ∣ ∣_∣ₕ ∣₂) + ∙ Iso.sec (fst (suspensionAx-Sn n n)) ∣ ∣_∣ₕ ∣₂) ----------------------- multiplication ---------------------------- -- explicit description of the (ring) multiplication on Hⁿ(Sⁿ) @@ -435,9 +435,9 @@ Hⁿ-Sⁿ≅ℤ-pres· n f g = H = coHomGr (suc n) (S₊ (suc n)) repl : (f : H .fst) → (ϕ f ℤ[ H ]· ∣ ∣_∣ₕ ∣₂) ≡ f - repl f = sym (Iso.leftInv (fst (Hⁿ-Sⁿ≅ℤ n)) _) + repl f = sym (Iso.ret (fst (Hⁿ-Sⁿ≅ℤ n)) _) ∙∙ cong ϕ⁻ lem - ∙∙ Iso.leftInv (fst (Hⁿ-Sⁿ≅ℤ n)) f + ∙∙ Iso.ret (fst (Hⁿ-Sⁿ≅ℤ n)) f where lem : ϕ (ϕ f ℤ[ H ]· ∣ ∣_∣ₕ ∣₂) ≡ ϕ f lem = homPresℤ· (_ , snd (Hⁿ-Sⁿ≅ℤ n)) ∣ ∣_∣ₕ ∣₂ (ϕ f) diff --git a/Cubical/ZCohomology/Groups/SphereProduct.agda b/Cubical/ZCohomology/Groups/SphereProduct.agda index ffa821bd3b..3348251908 100644 --- a/Cubical/ZCohomology/Groups/SphereProduct.agda +++ b/Cubical/ZCohomology/Groups/SphereProduct.agda @@ -98,7 +98,7 @@ fun (fst (×leftSuspensionIso n m)) = ST.map (uncurry ∘ ↑Sⁿ×Sᵐ→Kₙ₊ₘ n m ∘ curry) inv (fst (×leftSuspensionIso n m)) = ST.map ((uncurry ∘ ↓Sⁿ×Sᵐ→Kₙ₊ₘ n m ∘ curry)) -rightInv (fst (×leftSuspensionIso n m)) = +sec (fst (×leftSuspensionIso n m)) = ST.elim (λ _ → isSetPathImplicit) λ f → inv PathIdTrunc₀Iso (PT.rec squash₁ @@ -176,7 +176,7 @@ rightInv (fst (×leftSuspensionIso n m)) = (↓Sⁿ×Sᵐ→Kₙ₊ₘ n m (curry (charac-fun g)))) (merid a i , y)) ≡ g a y - helper = (λ i → rightInv (Iso-Kn-ΩKn+1 _) + helper = (λ i → sec (Iso-Kn-ΩKn+1 _) ((sym (rCancel≡refl _ i) ∙∙ cong-∙ (λ x → rUnitₖ _ (charac-fun g (x , y)) i) (merid a) (sym (merid (ptSn (suc n)))) i @@ -184,7 +184,7 @@ rightInv (fst (×leftSuspensionIso n m)) = ∙∙ sym (rUnit _) ∙∙ (cong (g a y ∙_) (cong sym (funExt⁻ gid y)) ∙ sym (rUnit (g a y))) -leftInv (fst (×leftSuspensionIso n m)) = +ret (fst (×leftSuspensionIso n m)) = ST.elim (λ _ → isSetPathImplicit) λ f → PT.rec (squash₂ _ _) (λ id @@ -201,7 +201,7 @@ leftInv (fst (×leftSuspensionIso n m)) = (cong sym (cong (Kn→ΩKn+1 _) (funExt⁻ id y) ∙ (Kn→ΩKn+10ₖ _))) ∙ sym (rUnit _)) - ∙ leftInv (Iso-Kn-ΩKn+1 _) (f (x , y))}))) + ∙ ret (Iso-Kn-ΩKn+1 _) (f (x , y))}))) (∥HⁿSᵐPath∥ (suc n + m) m (λ x → f (ptSn _ , x)) (¬lem n m)) snd (×leftSuspensionIso n m) = @@ -238,7 +238,7 @@ Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ : (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) -rightInv (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = +sec (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = ST.elim (λ _ → isSetPathImplicit) λ f → inv PathIdTrunc₀Iso (PT.map (uncurry (λ g p @@ -265,7 +265,7 @@ rightInv (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = help : cong (λ x → Hⁿ-S¹×Sⁿ→Hⁿ-Sⁿ m (Hⁿ-Sⁿ→Hⁿ-S¹×Sⁿ m (curry (characFun g))) x y) loop ≡ Kn→ΩKn+1 _ (g y) - help = rightInv (Iso-Kn-ΩKn+1 (suc m)) + help = sec (Iso-Kn-ΩKn+1 (suc m)) (sym (rCancelₖ _ (0ₖ _)) ∙∙ ((λ i → Kn→ΩKn+1 _ (g y) i -ₖ 0ₖ _)) ∙∙ rCancelₖ _ (0ₖ _)) @@ -290,7 +290,7 @@ rightInv (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = ; (i = i1) → funExt⁻ p x j ; (j = i0) → f (loop i , x) ; (j = i1) → - rightInv (Iso-Kn-ΩKn+1 (suc m)) + sec (Iso-Kn-ΩKn+1 (suc m)) (sym (funExt⁻ p x) ∙∙ (λ i → f (loop i , x)) ∙∙ funExt⁻ p x) (~ k) i}) @@ -299,7 +299,7 @@ rightInv (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = (λ i → f (loop i , x)) (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)) = +ret (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = ST.elim (λ _ → isSetPathImplicit) λ f → cong ∣_∣₂ (funExt λ x @@ -307,7 +307,7 @@ leftInv (fst (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m)) = ((λ i → sym (rCancel≡refl _ i) ∙∙ cong (λ z → rUnitₖ _ (Hⁿ-S¹×Sⁿ→Hⁿ-Sⁿ m f z x) i) loop ∙∙ rCancel≡refl _ i) ∙ sym (rUnit (Kn→ΩKn+1 (suc m) (f x)))) - ∙ leftInv (Iso-Kn-ΩKn+1 _) (f x)) + ∙ ret (Iso-Kn-ΩKn+1 _) (f x)) snd (Hⁿ-Sⁿ≅Hⁿ-S¹×Sⁿ m) = makeIsGroupHom (ST.elim2 diff --git a/Cubical/ZCohomology/Groups/Torus.agda b/Cubical/ZCohomology/Groups/Torus.agda index 31a9e4703f..dc45a62512 100644 --- a/Cubical/ZCohomology/Groups/Torus.agda +++ b/Cubical/ZCohomology/Groups/Torus.agda @@ -207,10 +207,10 @@ H²-T²≅ℤ = compGroupIso helper2 (Hⁿ-Sⁿ≅ℤ 0) helper : Iso (∥ ((a : S¹) → coHomK 2) ∥₂ × ∥ ((a : S¹) → coHomK 1) ∥₂) (coHom 1 S¹) inv helper s = 0ₕ _ , s fun helper = snd - leftInv helper _ = + ret helper _ = ΣPathP (isOfHLevelSuc 0 (isOfHLevelRetractFromIso 0 (fst (Hⁿ-S¹≅0 0)) (isContrUnit)) _ _ , refl) - rightInv helper _ = refl + sec helper _ = refl theIso : Iso (coHom 2 (S¹ × S¹)) (coHom 1 S¹) theIso = setTruncIso (curryIso ⋄ codomainIso S1→K2≡K2×K1 ⋄ toProdIso) ⋄ setTruncOfProdIso @@ -293,8 +293,8 @@ private hasTrivial⌣₁S²∨S¹∨S¹ : hasTrivial⌣₁ S²⋁S¹⋁S¹ hasTrivial⌣₁S²∨S¹∨S¹ x y = - x ⌣ y ≡⟨ cong₂ _⌣_ (sym (leftInv (fst (H¹-S²⋁S¹⋁S¹)) x)) (sym (leftInv (fst (H¹-S²⋁S¹⋁S¹)) y)) ⟩ - from₁-∨ (to₁-∨ x) ⌣ from₁-∨ (to₁-∨ y) ≡⟨ sym (leftInv (fst (H²-S²⋁S¹⋁S¹)) (from₁-∨ (to₁-∨ x) ⌣ from₁-∨ (to₁-∨ y))) ⟩ + x ⌣ y ≡⟨ cong₂ _⌣_ (sym (ret (fst (H¹-S²⋁S¹⋁S¹)) x)) (sym (ret (fst (H¹-S²⋁S¹⋁S¹)) y)) ⟩ + from₁-∨ (to₁-∨ x) ⌣ from₁-∨ (to₁-∨ y) ≡⟨ sym (ret (fst (H²-S²⋁S¹⋁S¹)) (from₁-∨ (to₁-∨ x) ⌣ from₁-∨ (to₁-∨ y))) ⟩ from₂-∨ (to₂-∨ (from₁-∨ (to₁-∨ x) ⌣ from₁-∨ (to₁-∨ y))) ≡⟨ refl ⟩ -- holds by computation (even with open terms in the context)! from₂-∨ 0 ≡⟨ hom1g (snd ℤGroup) from₂-∨ (snd (coHomGr 2 S²⋁S¹⋁S¹)) ((invGroupEquiv (GroupIso→GroupEquiv H²-S²⋁S¹⋁S¹)) .snd .pres·) ⟩ diff --git a/Cubical/ZCohomology/Groups/Unit.agda b/Cubical/ZCohomology/Groups/Unit.agda index f7ee121750..45b9550bf0 100644 --- a/Cubical/ZCohomology/Groups/Unit.agda +++ b/Cubical/ZCohomology/Groups/Unit.agda @@ -34,8 +34,8 @@ open Iso H⁰-Unit≅ℤ : GroupIso (coHomGr 0 Unit) ℤGroup 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 +sec (fst H⁰-Unit≅ℤ) _ = refl +ret (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 -} @@ -58,8 +58,8 @@ isContrHⁿ-Unit n = subst isContr (λ i → ∥ UnitToTypePath (coHomK (suc n)) Hⁿ-Unit≅0 : (n : ℕ) → GroupIso (coHomGr (suc n) Unit) UnitGroup₀ fun (fst (Hⁿ-Unit≅0 n)) _ = _ inv (fst (Hⁿ-Unit≅0 n)) _ = 0ₕ (suc n) -rightInv (fst (Hⁿ-Unit≅0 n)) _ = refl -leftInv (fst (Hⁿ-Unit≅0 n)) _ = isOfHLevelSuc 0 (isContrHⁿ-Unit n) _ _ +sec (fst (Hⁿ-Unit≅0 n)) _ = refl +ret (fst (Hⁿ-Unit≅0 n)) _ = isOfHLevelSuc 0 (isContrHⁿ-Unit n) _ _ snd (Hⁿ-Unit≅0 n) = makeIsGroupHom λ _ _ → refl @@ -74,14 +74,14 @@ Hⁿ-contrType≅0 : ∀ {ℓ} {A : Type ℓ} (n : ℕ) → isContr A → GroupIso (coHomGr (suc n) A) UnitGroup₀ fun (fst (Hⁿ-contrType≅0 n contr)) _ = _ inv (fst (Hⁿ-contrType≅0 n contr)) _ = 0ₕ (suc n) -rightInv (fst (Hⁿ-contrType≅0 n contr)) _ = refl -leftInv (fst (Hⁿ-contrType≅0 {A = A} n contr)) _ = isOfHLevelSuc 0 helper _ _ +sec (fst (Hⁿ-contrType≅0 n contr)) _ = refl +ret (fst (Hⁿ-contrType≅0 {A = A} n contr)) _ = isOfHLevelSuc 0 helper _ _ where helper : isContr (coHom (suc n) A) helper = (inv (Hⁿ-contrTypeIso n contr) (0ₕ (suc n))) , λ y → cong (inv (Hⁿ-contrTypeIso n contr)) (isOfHLevelSuc 0 (isContrHⁿ-Unit n) (0ₕ (suc n)) (fun (Hⁿ-contrTypeIso n contr) y)) - ∙ leftInv (Hⁿ-contrTypeIso n contr) y + ∙ ret (Hⁿ-contrTypeIso n contr) y snd (Hⁿ-contrType≅0 n contr) = makeIsGroupHom λ _ _ → refl isContr-HⁿRed-Unit : (n : ℕ) → isContr (coHomRed n (Unit , tt)) @@ -95,7 +95,7 @@ snd (isContr-HⁿRed-Unit n) = → GroupIso (×coHomGr (suc n) A Unit) (coHomGr (suc n) A) fun (fst (×rUnitCohomIso n)) = fst inv (fst (×rUnitCohomIso n)) x = x , 0ₕ (suc n) -rightInv (fst (×rUnitCohomIso n)) _ = refl -leftInv (fst (×rUnitCohomIso n)) x = +sec (fst (×rUnitCohomIso n)) _ = refl +ret (fst (×rUnitCohomIso n)) x = ΣPathP (refl , isContr→isProp (isContrHⁿ-Unit n) (0ₕ (suc n)) (snd x)) snd (×rUnitCohomIso n) = makeIsGroupHom λ _ _ → refl diff --git a/Cubical/ZCohomology/Groups/Wedge.agda b/Cubical/ZCohomology/Groups/Wedge.agda index 15420518bf..5c4d4ec022 100644 --- a/Cubical/ZCohomology/Groups/Wedge.agda +++ b/Cubical/ZCohomology/Groups/Wedge.agda @@ -120,13 +120,13 @@ module _ {ℓ ℓ'} (A : Pointed ℓ) (B : Pointed ℓ') where inv (fst (Hⁿ-⋁ zero)) = uncurry (ST.elim2 (λ _ _ → isSetSetTrunc) λ f g → ∣ wedgeFun⁻ 0 f g ∣₂) - rightInv (fst (Hⁿ-⋁ zero)) = + sec (fst (Hⁿ-⋁ zero)) = uncurry (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)) = + ret (fst (Hⁿ-⋁ zero)) = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) (λ f → PT.rec (isSetSetTrunc _ _) (λ fId → cong ∣_∣₂ (sym fId)) @@ -168,13 +168,13 @@ module _ {ℓ ℓ'} (A : Pointed ℓ) (B : Pointed ℓ') where inv (fst (Hⁿ-⋁ (suc n))) = uncurry (ST.elim2 (λ _ _ → isSetSetTrunc) λ f g → ∣ wedgeFun⁻ (suc n) f g ∣₂) - rightInv (fst (Hⁿ-⋁ (suc n))) = + sec (fst (Hⁿ-⋁ (suc n))) = uncurry (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))) = + ret (fst (Hⁿ-⋁ (suc n))) = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) (λ f → PT.rec (isSetSetTrunc _ _) (λ fId → cong ∣_∣₂ (sym fId)) @@ -223,12 +223,12 @@ module _ {ℓ ℓ'} (A : Pointed ℓ) (B : Pointed ℓ') where ; (inr b) → g b ; (push tt i) → (p ∙ sym q) i}) , p ∣₂}) - rightInv (fst H⁰Red-⋁) = + sec (fst H⁰Red-⋁) = uncurry (ST.elim2 (λ _ _ → isOfHLevelPath 2 (isSet× isSetSetTrunc isSetSetTrunc) _ _) λ {(_ , _) (_ , _) → ΣPathP (cong ∣_∣₂ (Σ≡Prop (λ _ → isSetℤ _ _) refl) , cong ∣_∣₂ (Σ≡Prop (λ _ → isSetℤ _ _) refl))}) - leftInv (fst H⁰Red-⋁) = + ret (fst H⁰Red-⋁) = ST.elim (λ _ → isOfHLevelPath 2 isSetSetTrunc _ _) λ {(f , p) → cong ∣_∣₂ (Σ≡Prop (λ _ → isSetℤ _ _) (funExt λ {(inl a) → refl diff --git a/Cubical/ZCohomology/Gysin.agda b/Cubical/ZCohomology/Gysin.agda index 1d3c718633..821527c6d9 100644 --- a/Cubical/ZCohomology/Gysin.agda +++ b/Cubical/ZCohomology/Gysin.agda @@ -195,7 +195,7 @@ Iso-πS-ℤPres1 (suc n) = (merid (transportRefl (transportRefl x i) i)) (sym (merid north)) i z ∣)))) i) - ∙ Iso.leftInv (Iso-Kn-ΩKn+1 (suc (suc n))) ∣ x ∣) + ∙ Iso.ret (Iso-Kn-ΩKn+1 (suc (suc n))) ∣ x ∣) -- The first step of the Gysin sequence is to formulate -- an equivalence g : Kᵢ ≃ (Sⁿ →∙ Kᵢ₊ₙ) @@ -290,12 +290,12 @@ module g-base where Iso.fun (suspKn-Iso n m) f = (suspKn-Iso-fun n m f) , (suspKn-Iso-fun∙ n m f) Iso.inv (suspKn-Iso n m) = suspKn-Iso-inv n m - Iso.rightInv (suspKn-Iso zero m) (f , p) = + Iso.sec (suspKn-Iso zero m) (f , p) = →∙Homogeneous≡ (isHomogeneousKn _) (funExt λ { false → cong (ΩKn+1→Kn m) (sym (rUnit _)) - ∙ Iso.leftInv (Iso-Kn-ΩKn+1 _) (f false) + ∙ Iso.ret (Iso-Kn-ΩKn+1 _) (f false) ; true → sym p}) - Iso.rightInv (suspKn-Iso (suc n) m) (f , p) = + Iso.sec (suspKn-Iso (suc n) m) (f , p) = →∙Homogeneous≡ (isHomogeneousKn _) (funExt λ x → (λ i → ΩKn+1→Kn m @@ -307,17 +307,17 @@ module g-base where (cong (Kn→ΩKn+1 m (f x) ∙_) (cong sym (cong (Kn→ΩKn+1 m) p ∙ Kn→ΩKn+10ₖ m)) ∙ sym (rUnit _)) - ∙∙ Iso.leftInv (Iso-Kn-ΩKn+1 _) (f x)) - Iso.leftInv (suspKn-Iso zero m) (f , p) = →∙Homogeneous≡ (isHomogeneousKn _) + ∙∙ Iso.ret (Iso-Kn-ΩKn+1 _) (f x)) + Iso.ret (suspKn-Iso zero m) (f , p) = →∙Homogeneous≡ (isHomogeneousKn _) (funExt λ { base → sym p ; (loop i) j → lem j i}) where lem : PathP (λ i → p (~ i) ≡ p (~ i)) (Kn→ΩKn+1 m (ΩKn+1→Kn m (sym p ∙∙ cong f loop ∙∙ p))) (cong f loop) - lem = Iso.rightInv (Iso-Kn-ΩKn+1 _) _ + lem = Iso.sec (Iso-Kn-ΩKn+1 _) _ ◁ λ i → doubleCompPath-filler (sym p) (cong f loop) p (~ i) - Iso.leftInv (suspKn-Iso (suc n) m) (f , p) = + Iso.ret (suspKn-Iso (suc n) m) (f , p) = →∙Homogeneous≡ (isHomogeneousKn _) (funExt λ { north → sym p ; south → sym p ∙ cong f (merid (ptSn _)) @@ -329,7 +329,7 @@ module g-base where (ΩKn+1→Kn m (sym p ∙∙ cong f (merid a ∙ sym (merid (ptSn _))) ∙∙ p))) (cong f (merid a)) - lem a = Iso.rightInv (Iso-Kn-ΩKn+1 _) _ + lem a = Iso.sec (Iso-Kn-ΩKn+1 _) _ ◁ λ i j → hcomp (λ k → λ { (i = i1) → (f (merid a j)) ; (j = i0) → p (k ∧ ~ i) @@ -548,7 +548,7 @@ module _ {ℓ} (B : Pointed ℓ) (Q : typ B → Pointed ℓ-zero) (Iso.inv Q-is (transportRefl y i))) i) ∙ cong (x ⌣ₖ_) (funExt⁻ c-pt (Iso.inv Q-is y) - ∙ cong (genFunSpace n .fst) (Iso.rightInv Q-is y)))) + ∙ cong (genFunSpace n .fst) (Iso.sec Q-is y)))) g-base : (i : ℕ) → isEquiv (g (pt B) i) g-base i = transport (λ j → isEquiv (gPathP' i (~ j))) (g-base.isEquiv-g n i) @@ -571,7 +571,7 @@ module _ {ℓ} (B : Pointed ℓ) (Q : typ B → Pointed ℓ-zero) (J (λ b _ → isSet (Q b →∙ coHomK-ptd n)) (subst isSet (cong (_→∙ coHomK-ptd n) (ua∙ (isoToEquiv (invIso Q-is)) - (cong (Iso.inv Q-is) (sym Q-is-ptd) ∙ Iso.leftInv Q-is _))) + (cong (Iso.inv Q-is) (sym Q-is-ptd) ∙ Iso.ret Q-is _))) (isOfHLevelRetractFromIso 2 (fst (πS≅ℤ n)) isSetℤ))) (conB (pt B) b) @@ -681,20 +681,20 @@ module preThom {ℓ ℓ'} (B : Pointed ℓ) (P : typ B → Type ℓ') where IsoFE : Iso F̃ Ẽ Iso.fun IsoFE = funFE Iso.inv IsoFE = invFE - Iso.rightInv IsoFE (inl x) = refl - Iso.rightInv IsoFE (inr x) = refl - Iso.rightInv IsoFE (push (x , a) i₁) k = lem k i₁ + Iso.sec IsoFE (inl x) = refl + Iso.sec IsoFE (inr x) = refl + Iso.sec IsoFE (push (x , a) i₁) k = lem k i₁ where lem : cong funFE (((push x) ∙ λ i → inr (x , merid a i))) ≡ push (x , a) lem = congFunct funFE (push x) (λ i → inr (x , merid a i)) ∙ sym (lUnit (push (x , a))) - Iso.leftInv IsoFE (inl x) = refl - Iso.leftInv IsoFE (inr (x , north)) = push x - Iso.leftInv IsoFE (inr (x , south)) = refl - Iso.leftInv IsoFE (inr (x , merid a i)) j = + Iso.ret IsoFE (inl x) = refl + Iso.ret IsoFE (inr (x , north)) = push x + Iso.ret IsoFE (inr (x , south)) = refl + Iso.ret IsoFE (inr (x , merid a i)) j = compPath-filler' (push x) (λ i₁ → inr (x , merid a i₁)) (~ j) i - Iso.leftInv IsoFE (push a i₁) k = push a (i₁ ∧ k) + Iso.ret IsoFE (push a i₁) k = push a (i₁ ∧ k) F̃→Q : ∀ {ℓ} {A : Pointed ℓ} → (F̃ , inl tt) →∙ A → (b : typ B) → Q b →∙ A @@ -744,10 +744,10 @@ module preThom {ℓ ℓ'} (B : Pointed ℓ) (P : typ B → Type ℓ') where ((b : typ B) → Q b →∙ A) Iso.fun (IsoF̃Q {A = A , a}) = F̃→Q Iso.inv (IsoF̃Q {A = A , a}) = Q→F̃ - Iso.rightInv (IsoF̃Q {A = A , a}) f = + Iso.sec (IsoF̃Q {A = A , a}) f = funExt λ b → ΣPathP (funExt (Q→F̃→Q f b) , sym (rUnit (snd (f b)))) - Iso.leftInv (IsoF̃Q {A = A , a}) (f , p) = + Iso.ret (IsoF̃Q {A = A , a}) (f , p) = ΣPathP ((funExt (F̃→Q→F̃ f p)) , λ i j → p (~ i ∨ j)) @@ -763,12 +763,12 @@ module preThom {ℓ ℓ'} (B : Pointed ℓ) (P : typ B → Type ℓ') where , (snd G) Iso.inv IsoFE-extend G = (λ x → G .fst (Iso.fun IsoFE x)) , (snd G) - Iso.rightInv IsoFE-extend G = + Iso.sec IsoFE-extend G = →∙Homogeneous≡ (isHomogeneousKn _) - (funExt λ x → cong (G .fst) (Iso.rightInv IsoFE x)) - Iso.leftInv IsoFE-extend G = + (funExt λ x → cong (G .fst) (Iso.sec IsoFE x)) + Iso.ret IsoFE-extend G = →∙Homogeneous≡ (isHomogeneousKn _) - (funExt λ x → cong (G .fst) (Iso.leftInv IsoFE x)) + (funExt λ x → cong (G .fst) (Iso.ret IsoFE x)) ι-hom : (k : ℕ) → (f g : ((b : typ B) → Q b →∙ coHomK-ptd k)) → Iso.fun (ι k) (λ b → f b ++ g b) @@ -939,7 +939,7 @@ module Gysin {ℓ} (B : Pointed ℓ) (P : typ B → Type ℓ-zero) ∙ (sym (assoc _ _ _) ∙∙ cong (Kn→ΩKn+1 i (f (a , b)) ∙_) (rCancel _) ∙∙ sym (rUnit _))) - ∙ Iso.leftInv (Iso-Kn-ΩKn+1 _) (f (a , b))})) ∣₁) + ∙ Iso.ret (Iso-Kn-ΩKn+1 _) (f (a , b))})) ∣₁) (Iso.fun PathIdTrunc₀Iso ker) Im-Susp⊂Ker-j : (i : ℕ) (x : _) @@ -977,7 +977,7 @@ module Gysin {ℓ} (B : Pointed ℓ) (P : typ B → Type ℓ-zero) ∙∙ funExt⁻ p (fst a)))) (cong (fst f) (push a)) h3 f p a = - Iso.rightInv (Iso-Kn-ΩKn+1 i) _ + Iso.sec (Iso-Kn-ΩKn+1 i) _ ◁ λ i j → doubleCompPath-filler (sym (snd f)) (cong (fst f) (push a)) (funExt⁻ p (fst a)) (~ i) j diff --git a/Cubical/ZCohomology/MayerVietorisUnreduced.agda b/Cubical/ZCohomology/MayerVietorisUnreduced.agda index 83ecade730..8fdf23d7ff 100644 --- a/Cubical/ZCohomology/MayerVietorisUnreduced.agda +++ b/Cubical/ZCohomology/MayerVietorisUnreduced.agda @@ -140,7 +140,7 @@ module MV {ℓ ℓ' ℓ''} (A : Type ℓ) (B : Type ℓ') (C : Type ℓ'') (f : helper F p1 p2 (push a i) j = hcomp (λ k → λ { (i = i0) → p1 (~ j) (f a) ; (i = i1) → p2 (~ j) (g a) - ; (j = i0) → Iso.rightInv (Iso-Kn-ΩKn+1 n) ((λ i₁ → p1 (~ i₁) (f a)) + ; (j = i0) → Iso.sec (Iso-Kn-ΩKn+1 n) ((λ i₁ → p1 (~ i₁) (f a)) ∙∙ cong F (push a) ∙∙ cong (λ F₁ → F₁ (g a)) p2) (~ k) i ; (j = i1) → F (push a i)}) @@ -221,7 +221,7 @@ module MV {ℓ ℓ' ℓ''} (A : Type ℓ) (B : Type ℓ') (C : Type ℓ'') (f : helper2 : (Fc : C → coHomK n) (p : d-pre n Fc ≡ (λ _ → coHom-pt (suc n))) (c : C) → ΩKn+1→Kn n (λ i₁ → p i₁ (inl (f c))) -[ n ]ₖ (ΩKn+1→Kn n (λ i₁ → p i₁ (inr (g c)))) ≡ Fc c - helper2 Fc p c = distrHelper n _ _ ∙∙ cong (ΩKn+1→Kn n) helper3 ∙∙ Iso.leftInv (Iso-Kn-ΩKn+1 n) (Fc c) + helper2 Fc p c = distrHelper n _ _ ∙∙ cong (ΩKn+1→Kn n) helper3 ∙∙ Iso.ret (Iso-Kn-ΩKn+1 n) (Fc c) where helper3 : (λ i₁ → p i₁ (inl (f c))) ∙ sym (λ i₁ → p i₁ (inr (g c))) ≡ Kn→ΩKn+1 n (Fc c) helper3 = cong ((λ i₁ → p i₁ (inl (f c))) ∙_) (lUnit _) ∙ sym (PathP→compPathR (cong (λ f → cong f (push c)) p)) diff --git a/Cubical/ZCohomology/Properties.agda b/Cubical/ZCohomology/Properties.agda index ed46bee968..036d6f39d3 100644 --- a/Cubical/ZCohomology/Properties.agda +++ b/Cubical/ZCohomology/Properties.agda @@ -196,12 +196,12 @@ coHomRed+1Equiv (suc (suc n)) A i = ∥ coHomRed+1.helpLemma A i {C = (coHomK (2 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ₖ _ _ -rightInv (Iso-coHom-coHomRed {A = A , a} n) = +sec (Iso-coHom-coHomRed {A = A , a} n) = 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) = +ret (Iso-coHom-coHomRed {A = A , a} n) = ST.elim (λ _ → isOfHLevelPath 2 § _ _) λ {(f , p) → cong ∣_∣₂ (ΣPathP (((funExt λ x → (cong (λ y → f x -ₖ y) p ∙∙ cong (λ y → f x +ₖ y) -0ₖ @@ -234,7 +234,7 @@ private ≡ Iso.inv (Iso-coHom-coHomRed n) x +ₕ∙ Iso.inv (Iso-coHom-coHomRed n) y homhelp n A = morphLemmas.isMorphInv _+ₕ∙_ _+ₕ_ (Iso.fun (Iso-coHom-coHomRed n)) (+∙≡+ n) _ - (Iso.rightInv (Iso-coHom-coHomRed n)) (Iso.leftInv (Iso-coHom-coHomRed n)) + (Iso.sec (Iso-coHom-coHomRed n)) (Iso.ret (Iso-coHom-coHomRed n)) coHomGr≅coHomRedGr : ∀ {ℓ} (n : ℕ) (A : Pointed ℓ) → GroupEquiv (coHomRedGrDir (suc n) A) (coHomGr (suc n) (typ A)) @@ -421,8 +421,8 @@ private stabSpheres : (n : ℕ) → Iso (coHomK (suc n)) (typ (Ω (coHomK-ptd (2 + n)))) fun (stabSpheres n) = decode _ inv' (stabSpheres n) = encode -rightInv (stabSpheres n) p = decode-encode p -leftInv (stabSpheres n) = +sec (stabSpheres n) p = decode-encode p +ret (stabSpheres n) = T.elim (λ _ → isOfHLevelPath (3 + n) (isOfHLevelTrunc (3 + n)) _ _) λ a → cong encode (congFunct ∣_∣ (merid a) (sym (merid (ptSn (suc n))))) ∙∙ (λ i → transport (congFunct (Code n) (cong ∣_∣ (merid a)) @@ -503,12 +503,12 @@ 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) -rightInv (fst (coHom≅coHomΩ n A)) = +sec (fst (coHom≅coHomΩ n A)) = ST.elim (λ _ → isOfHLevelPath 2 § _ _) - λ f → cong ∣_∣₂ (funExt λ x → rightInv (Iso-Kn-ΩKn+1 n) (f x)) -leftInv (fst (coHom≅coHomΩ n A)) = + λ f → cong ∣_∣₂ (funExt λ x → sec (Iso-Kn-ΩKn+1 n) (f x)) +ret (fst (coHom≅coHomΩ n A)) = ST.elim (λ _ → isOfHLevelPath 2 § _ _) - λ f → cong ∣_∣₂ (funExt λ x → leftInv (Iso-Kn-ΩKn+1 n) (f x)) + λ f → cong ∣_∣₂ (funExt λ x → ret (Iso-Kn-ΩKn+1 n) (f x)) snd (coHom≅coHomΩ n A) = makeIsGroupHom (ST.elim2 (λ _ _ → isOfHLevelPath 2 § _ _) @@ -525,13 +525,13 @@ module lockedKnIso (key : Unit') where ΩKn+1→Kn→ΩKn+1 n x = pm key where pm : (key : Unit') → lock key (Iso.fun (Iso-Kn-ΩKn+1 n)) (lock key (Iso.inv (Iso-Kn-ΩKn+1 n)) x) ≡ x - pm unlock = Iso.rightInv (Iso-Kn-ΩKn+1 n) x + pm unlock = Iso.sec (Iso-Kn-ΩKn+1 n) x Kn→ΩKn+1→Kn : (n : ℕ) → (x : coHomK n) → ΩKn+1→Kn' n (Kn→ΩKn+1' n x) ≡ x Kn→ΩKn+1→Kn n x = pm key where pm : (key : Unit') → lock key (Iso.inv (Iso-Kn-ΩKn+1 n)) (lock key (Iso.fun (Iso-Kn-ΩKn+1 n)) x) ≡ x - pm unlock = Iso.leftInv (Iso-Kn-ΩKn+1 n) x + pm unlock = Iso.ret (Iso-Kn-ΩKn+1 n) x -distrLemma : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} (n m : ℕ) (f : GroupHom (coHomGr n A) (coHomGr m B)) (x y : coHom n A) @@ -666,9 +666,9 @@ transportCohomIso : {A : Type ℓ} {n m : ℕ} → GroupIso (coHomGr n A) (coHomGr m A) Iso.fun (fst (transportCohomIso {A = A} p)) = subst (λ n → coHom n A) p Iso.inv (fst (transportCohomIso {A = A} p)) = subst (λ n → coHom n A) (sym p) -Iso.rightInv (fst (transportCohomIso p)) = +Iso.sec (fst (transportCohomIso p)) = transportTransport⁻ (cong (\ n → coHomGr n _ .fst) p) -Iso.leftInv (fst (transportCohomIso p)) = +Iso.ret (fst (transportCohomIso p)) = transportTransport⁻ (cong (\ n → coHomGr n _ .fst) (sym p)) snd (transportCohomIso {A = A} {n = n} {m = m} p) = makeIsGroupHom (λ x y → help x y p) diff --git a/Cubical/ZCohomology/RingStructure/CohomologyRing.agda b/Cubical/ZCohomology/RingStructure/CohomologyRing.agda index 899ccd70b4..e35c45ea77 100644 --- a/Cubical/ZCohomology/RingStructure/CohomologyRing.agda +++ b/Cubical/ZCohomology/RingStructure/CohomologyRing.agda @@ -143,8 +143,8 @@ module CohomologyRing-Equiv 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)))) + sec is = ST.elim (λ _ → isProp→isSet (squash₂ _ _)) (λ f → cong ∣_∣₂ (funExt (λ y → cong f (sec e y)))) + ret is = ST.elim (λ _ → isProp→isSet (squash₂ _ _)) (λ g → cong ∣_∣₂ (funExt (λ x → cong g (ret 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₂ _ _)) @@ -175,13 +175,13 @@ module CohomologyRing-Equiv e-sect : (y : H* Y) → H*-X→H*-Y (H*-Y→H*-X y) ≡ y e-sect = DS-Ind-Prop.f _ _ _ _ (λ _ → isSetH*Y _ _) refl - (λ m a → cong (base m) (rightInv (fst coHomGr-Iso) a)) + (λ m a → cong (base m) (sec (fst coHomGr-Iso) a)) (λ {U V} ind-U ind-V → cong₂ _+H*Y_ ind-U ind-V) e-retr : (x : H* X) → H*-Y→H*-X (H*-X→H*-Y x) ≡ x e-retr = DS-Ind-Prop.f _ _ _ _ (λ _ → isSetH*X _ _) refl - (λ n a → cong (base n) (leftInv (fst coHomGr-Iso) a)) + (λ n a → cong (base n) (ret (fst coHomGr-Iso) a)) (λ {U V} ind-U ind-V → cong₂ _+H*X_ ind-U ind-V) H*-X→H*-Y-pres1 : H*-X→H*-Y 1H*X ≡ 1H*Y @@ -216,6 +216,6 @@ module _ is : Iso (H* X) (H* Y) fun is = H*-X→H*-Y inv is = H*-Y→H*-X - rightInv is = e-sect - leftInv is = e-retr + sec is = e-sect + ret is = e-retr snd CohomologyRing-Equiv = makeIsRingHom H*-X→H*-Y-pres1 H*-X→H*-Y-pres+ H*-X→H*-Y-pres· diff --git a/Cubical/ZCohomology/RingStructure/GradedCommutativity.agda b/Cubical/ZCohomology/RingStructure/GradedCommutativity.agda index 8bff132978..8f827bf187 100644 --- a/Cubical/ZCohomology/RingStructure/GradedCommutativity.agda +++ b/Cubical/ZCohomology/RingStructure/GradedCommutativity.agda @@ -178,8 +178,8 @@ private → Iso (coHomK k) (coHomK k) Iso.fun (-ₖ'-genIso {k = k} n m p q) = -ₖ'-gen n m p q Iso.inv (-ₖ'-genIso {k = k} n m p q) = -ₖ'-gen n m p q -Iso.rightInv (-ₖ'-genIso {k = k} n m p q) = -ₖ'-gen² n m p q -Iso.leftInv (-ₖ'-genIso {k = k} n m p q) = -ₖ'-gen² n m p q +Iso.sec (-ₖ'-genIso {k = k} n m p q) = -ₖ'-gen² n m p q +Iso.ret (-ₖ'-genIso {k = k} n m p q) = -ₖ'-gen² n m p q -- action of cong on -ₖ'ⁿ̇*ᵐ cong-ₖ'-gen-inr : {k : ℕ} (n m : ℕ) (p : _) (q : _) (P : Path (coHomK (2 + k)) (0ₖ _) (0ₖ _)) From f22fa6456213148f02ccbf4db84b0f8909be04ef Mon Sep 17 00:00:00 2001 From: Lorenzo Molena Date: Sat, 14 Feb 2026 16:06:41 +0100 Subject: [PATCH 10/11] add `Fast` integer order and the related instaces --- .../OrderedCommRing/Instances/Fast/Int.agda | 66 ++ Cubical/Data/Fast/Int/Order.agda | 741 ++++++++++++++++++ Cubical/Relation/Binary/Base.agda | 5 + .../Order/Loset/Instances/Fast/Int.agda | 40 + .../Order/Poset/Instances/Fast/Int.agda | 11 + .../Order/Proset/Instances/Fast/Int.agda | 11 + .../Pseudolattice/Instances/Fast/Int.agda | 18 + .../Order/Quoset/Instances/Fast/Int.agda | 11 + .../Order/StrictOrder/Instances/Fast/Int.agda | 11 + .../Order/Toset/Instances/Fast/Int.agda | 34 + 10 files changed, 948 insertions(+) create mode 100644 Cubical/Algebra/OrderedCommRing/Instances/Fast/Int.agda create mode 100644 Cubical/Data/Fast/Int/Order.agda create mode 100644 Cubical/Relation/Binary/Order/Loset/Instances/Fast/Int.agda create mode 100644 Cubical/Relation/Binary/Order/Poset/Instances/Fast/Int.agda create mode 100644 Cubical/Relation/Binary/Order/Proset/Instances/Fast/Int.agda create mode 100644 Cubical/Relation/Binary/Order/Pseudolattice/Instances/Fast/Int.agda create mode 100644 Cubical/Relation/Binary/Order/Quoset/Instances/Fast/Int.agda create mode 100644 Cubical/Relation/Binary/Order/StrictOrder/Instances/Fast/Int.agda create mode 100644 Cubical/Relation/Binary/Order/Toset/Instances/Fast/Int.agda diff --git a/Cubical/Algebra/OrderedCommRing/Instances/Fast/Int.agda b/Cubical/Algebra/OrderedCommRing/Instances/Fast/Int.agda new file mode 100644 index 0000000000..45a38d41c6 --- /dev/null +++ b/Cubical/Algebra/OrderedCommRing/Instances/Fast/Int.agda @@ -0,0 +1,66 @@ +module Cubical.Algebra.OrderedCommRing.Instances.Fast.Int where + +open import Cubical.Foundations.Prelude +open import Cubical.Foundations.Function +open import Cubical.Foundations.Equiv + +open import Cubical.Data.Empty as ⊥ + +open import Cubical.HITs.PropositionalTruncation + +open import Cubical.Data.Fast.Int as ℤ + renaming (_+_ to _+ℤ_ ; _-_ to _-ℤ_; -_ to -ℤ_ ; _·_ to _·ℤ_) +open import Cubical.Data.Fast.Int.Order + renaming (_<_ to _<ℤ_ ; _≤_ to _≤ℤ_) + +open import Cubical.Algebra.CommRing +open import Cubical.Algebra.CommRing.Instances.Fast.Int + +open import Cubical.Algebra.OrderedCommRing + +open import Cubical.Relation.Nullary + +open import Cubical.Relation.Binary.Order.StrictOrder +open import Cubical.Relation.Binary.Order.StrictOrder.Instances.Fast.Int + +open import Cubical.Relation.Binary.Order.Pseudolattice +open import Cubical.Relation.Binary.Order.Pseudolattice.Instances.Fast.Int + +open import Cubical.Relation.Binary +open BinaryRelation + +open CommRingStr +open OrderedCommRingStr +open PseudolatticeStr +open StrictOrderStr + +ℤOrderedCommRing : OrderedCommRing ℓ-zero ℓ-zero +fst ℤOrderedCommRing = ℤ +0r (snd ℤOrderedCommRing) = 0 +1r (snd ℤOrderedCommRing) = 1 +_+_ (snd ℤOrderedCommRing) = _+ℤ_ +_·_ (snd ℤOrderedCommRing) = _·ℤ_ +-_ (snd ℤOrderedCommRing) = -ℤ_ +_<_ (snd ℤOrderedCommRing) = _<ℤ_ +_≤_ (snd ℤOrderedCommRing) = _≤ℤ_ +isOrderedCommRing (snd ℤOrderedCommRing) = isOrderedCommRingℤ + where + open IsOrderedCommRing + + isOrderedCommRingℤ : IsOrderedCommRing 0 1 _+ℤ_ _·ℤ_ -ℤ_ _<ℤ_ _≤ℤ_ + isOrderedCommRingℤ .isCommRing = ℤCommRing .snd .isCommRing + isOrderedCommRingℤ .isPseudolattice = ℤ≤Pseudolattice .snd .is-pseudolattice + isOrderedCommRingℤ .isStrictOrder = ℤ = λ x y → + propBiimpl→Equiv isProp≤ (isProp¬ (y <ℤ x)) + (λ x≤y y_ + +data _≤_ : ℤ → ℤ → Type where + pos≤pos : ∀ {x y} → x ℕ.≤ᵗ y → pos x ≤ pos y + negsuc≤negsuc : ∀ {x y} → x ℕ.≥ᵗ y → negsuc x ≤ negsuc y + negsuc≤pos : ∀ {x y} → negsuc x ≤ pos y + +data _<_ : ℤ → ℤ → Type where + posᵗ y → negsuc x < negsuc y + negsuc_ : ℤ → ℤ → Type +_≥_ = flip _≤_ +_>_ = flip _<_ + +¬pos≤negsuc : ∀ {x y} → ¬ pos x ≤ negsuc y +¬pos≤negsuc () + +¬posℕ→¬negsucᵗ y) → ¬ negsuc x < negsuc y +¬>ℕ→¬negsucℕ→¬negsucℕ→¬negsucnegsuc : pos k < pos l → negsuc k > negsuc l +posnegsuc (pospos : negsuc k < negsuc l → pos k > pos l +negsucpos (negsucneg : pos k < pos l → neg k > neg l +posneg {zero} {suc l} (posneg {suc k} {suc l} (posnegsuc + (subst (_< pos k ℤ.+ pos (suc m ℕ.· suc k)) (sym (ℤ.+IdR (pos k))) ℕ→¬negsuc Date: Tue, 17 Feb 2026 12:51:41 +0100 Subject: [PATCH 11/11] fix conflicts --- Cubical/Data/Fast/Int/Divisibility.agda | 5 +---- Cubical/Relation/Binary/Order/Pseudolattice/Base.agda | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cubical/Data/Fast/Int/Divisibility.agda b/Cubical/Data/Fast/Int/Divisibility.agda index b0ee19f2c4..77d0da8176 100644 --- a/Cubical/Data/Fast/Int/Divisibility.agda +++ b/Cubical/Data/Fast/Int/Divisibility.agda @@ -17,10 +17,7 @@ open import Cubical.Data.Nat.Order open import Cubical.Data.Nat.Divisibility using (m∣n→m≤n) renaming (_∣_ to _∣ℕ_ ; isProp∣ to isProp∣ℕ ; stDivIneq to stDivIneqℕ) -open import Cubical.Data.Nat.Mod renaming ( - quotient'_/_ to quotient_/_ ; remainder'_/_ to remainder_/_ ; - ≡remainder'+quotient' to ≡remainder+quotient ; mod'< to mod< - ) hiding (quotient_/_ ; remainder_/_ ; ≡remainder+quotient ; mod<) +open import Cubical.Data.Nat.Mod open import Cubical.Data.Fast.Int.Base as ℤ hiding (_+_ ; _·_ ; _-_ ; -_) open import Cubical.Data.Fast.Int.Properties as ℤ diff --git a/Cubical/Relation/Binary/Order/Pseudolattice/Base.agda b/Cubical/Relation/Binary/Order/Pseudolattice/Base.agda index 7d36f2f931..7f44192b81 100644 --- a/Cubical/Relation/Binary/Order/Pseudolattice/Base.agda +++ b/Cubical/Relation/Binary/Order/Pseudolattice/Base.agda @@ -178,3 +178,6 @@ module PseudolatticeReasoning (P' : Pseudolattice ℓ ℓ') where _◾ : (x : P) → x ≤ x x ◾ = is-pseudolattice .is-refl x + + infixr 0 _≤⟨_⟩_ + infix 1 _◾