diff --git a/Cubical.Algebra.AbGroup.Base.html b/Cubical.Algebra.AbGroup.Base.html index 497a56efcc..eb8d149706 100644 --- a/Cubical.Algebra.AbGroup.Base.html +++ b/Cubical.Algebra.AbGroup.Base.html @@ -88,7 +88,7 @@ makeIsAbGroup : IsAbGroup 0g _+_ -_ makeIsAbGroup .IsAbGroup.isGroup = - makeIsGroup is-setG +Assoc +IdR + makeIsGroup is-setG +Assoc +IdR x +Comm _ _ +IdR x) +InvR x +Comm _ _ +InvR x) @@ -140,218 +140,218 @@ AbGroup→CommMonoid .snd .CommMonoidStr.isCommMonoid .IsCommMonoid.·Comm = IsAbGroup.+Comm GisGroup isSetAbGroup : (A : AbGroup ) isSet A -isSetAbGroup A = isSetGroup (AbGroup→Group A) - -AbGroupHom : (G : AbGroup ) (H : AbGroup ℓ') Type (ℓ-max ℓ') -AbGroupHom G H = GroupHom (AbGroup→Group G) (AbGroup→Group H) - -AbGroupIso : (G : AbGroup ) (H : AbGroup ℓ') Type (ℓ-max ℓ') -AbGroupIso G H = GroupIso (AbGroup→Group G) (AbGroup→Group H) - -IsAbGroupEquiv : {A : Type } {B : Type ℓ'} - (G : AbGroupStr A) (e : A B) (H : AbGroupStr B) Type (ℓ-max ℓ') -IsAbGroupEquiv G e H = IsGroupHom (AbGroupStr→GroupStr G) (e .fst) (AbGroupStr→GroupStr H) - -AbGroupEquiv : (G : AbGroup ) (H : AbGroup ℓ') Type (ℓ-max ℓ') -AbGroupEquiv G H = Σ[ e (G .fst H .fst) ] IsAbGroupEquiv (G .snd) e (H .snd) - -isPropIsAbGroup : {G : Type } (0g : G) (_+_ : G G G) (-_ : G G) - isProp (IsAbGroup 0g _+_ (-_)) -isPropIsAbGroup 0g _+_ -_ = - isOfHLevelRetractFromIso 1 IsAbGroupIsoΣ - (isPropΣ (isPropIsGroup 0g _+_ (-_)) - grp isPropΠ2 _ _ grp .is-set _ _))) - where - open IsGroup - - -𝒮ᴰ-AbGroup : DUARel (𝒮-Univ ) AbGroupStr -𝒮ᴰ-AbGroup = - 𝒮ᴰ-Record (𝒮-Univ _) IsAbGroupEquiv - (fields: - data[ _+_ autoDUARel _ _ pres· ] - data[ 0g autoDUARel _ _ pres1 ] - data[ -_ autoDUARel _ _ presinv ] - prop[ isAbGroup _ _ isPropIsAbGroup _ _ _) ]) - where - open AbGroupStr - open IsGroupHom - --- Extract the characterization of equality of groups -AbGroupPath : (G H : AbGroup ) (AbGroupEquiv G H) (G H) -AbGroupPath = 𝒮ᴰ-AbGroup .UARel.ua - - --- The module below defines an abelian group induced from an --- equivalence between an abelian group G and a type A which preserves --- the full raw group structure from G to A. This version is useful --- when proving that some type equivalent to an abelian group is an --- abelian group while also specifying the binary operation, unit and --- inverse. For an example of this see Algebra.Matrix -module _ (G : AbGroup ) {A : Type } - (m : A A A) - (u : A) - (inverse : A A) - (e : G A) - (p+ : x y e .fst (G .snd ._+_ x y) m (e .fst x) (e .fst y)) - (pu : e .fst (G .snd .0g) u) - (pinv : x e .fst (G .snd .-_ x) inverse (e .fst x)) - where - - private - module G = AbGroupStr (G .snd) - - BaseΣ : Type (ℓ-suc ) - BaseΣ = Σ[ B Type ] (B B B) × B × (B B) - - FamilyΣ : BaseΣ Type - FamilyΣ (B , m , u , i) = IsAbGroup u m i - - inducedΣ : FamilyΣ (A , m , u , inverse) - inducedΣ = - subst FamilyΣ - (UARel.≅→≡ (autoUARel BaseΣ) (e , p+ , pu , pinv)) - G.isAbGroup - - InducedAbGroup : AbGroup - InducedAbGroup .fst = A - InducedAbGroup .snd ._+_ = m - InducedAbGroup .snd .0g = u - InducedAbGroup .snd .-_ = inverse - InducedAbGroup .snd .isAbGroup = inducedΣ - - InducedAbGroupEquiv : AbGroupEquiv G InducedAbGroup - fst InducedAbGroupEquiv = e - snd InducedAbGroupEquiv = makeIsGroupHom p+ - - InducedAbGroupPath : G InducedAbGroup - InducedAbGroupPath = AbGroupPath _ _ .fst InducedAbGroupEquiv - - - --- The module below defines an abelian group induced from an --- equivalence which preserves the binary operation (i.e. a group --- isomorphism). This version is useful when proving that some type --- equivalent to an abelian group G is an abelian group when one --- doesn't care about what the unit and inverse are. When using this --- version the unit and inverse will both be defined by transporting --- over the unit and inverse from G to A. -module _ (G : AbGroup ) {A : Type } - (m : A A A) - (e : G A) - ( : x y e .fst (G .snd ._+_ x y) m (e .fst x) (e .fst y)) - where - - private - module G = AbGroupStr (G .snd) - - FamilyΣ : Σ[ B Type ] (B B B) Type - FamilyΣ (B , n) = Σ[ e B ] Σ[ i (B B) ] IsAbGroup e n i - - inducedΣ : FamilyΣ (A , m) - inducedΣ = - subst FamilyΣ - (UARel.≅→≡ (autoUARel (Σ[ B Type ] (B B B))) (e , )) - (G.0g , G.-_ , G.isAbGroup) - - InducedAbGroupFromPres· : AbGroup - InducedAbGroupFromPres· .fst = A - InducedAbGroupFromPres· .snd ._+_ = m - InducedAbGroupFromPres· .snd .0g = inducedΣ .fst - InducedAbGroupFromPres· .snd .-_ = inducedΣ .snd .fst - InducedAbGroupFromPres· .snd .isAbGroup = inducedΣ .snd .snd - - InducedAbGroupEquivFromPres· : AbGroupEquiv G InducedAbGroupFromPres· - fst InducedAbGroupEquivFromPres· = e - snd InducedAbGroupEquivFromPres· = makeIsGroupHom - - InducedAbGroupPathFromPres· : G InducedAbGroupFromPres· - InducedAbGroupPathFromPres· = AbGroupPath _ _ .fst InducedAbGroupEquivFromPres· - - -dirProdAb : AbGroup AbGroup ℓ' AbGroup (ℓ-max ℓ') -dirProdAb A B = - Group→AbGroup (DirProd (AbGroup→Group A) (AbGroup→Group B)) - λ p q ΣPathP (+Comm (isAbGroup (snd A)) _ _ - , +Comm (isAbGroup (snd B)) _ _) - -trivialAbGroup : {} AbGroup -fst trivialAbGroup = Unit* -0g (snd trivialAbGroup) = tt* -_+_ (snd trivialAbGroup) _ _ = tt* -(- snd trivialAbGroup) _ = tt* -isAbGroup (snd trivialAbGroup) = makeIsAbGroup - (isProp→isSet isPropUnit*) - _ _ _ refl) - _ refl) - _ refl) - _ _ refl) - --- useful lemma --- duplicate propeerties => this file should be split ! -move4 : {} {A : Type } (x y z w : A) (_+_ : A A A) - ((x y z : A) x + (y + z) (x + y) + z) - ((x y : A) x + y y + x) - (x + y) + (z + w) ((x + z) + (y + w)) -move4 x y z w _+_ assoc +Comm = - sym (assoc x y (z + w)) - ∙∙ cong (x +_) (assoc y z w ∙∙ cong (_+ w) (+Comm y z) ∙∙ sym (assoc z y w)) - ∙∙ assoc x z (y + w) - ----- The type of homomorphisms A → B is an AbGroup if B is ----- -module _ { ℓ' : Level} (AGr : Group ) (BGr : AbGroup ℓ') where - private - strA = snd AGr - strB = snd BGr - - _* = AbGroup→Group - - A = fst AGr - B = fst BGr - open IsGroupHom - - open AbGroupStr strB - renaming (_+_ to _+B_ ; -_ to -B_ ; 0g to 0B - ; +IdR to +IdRB ; +IdL to +IdLB - ; +Assoc to +AssocB ; +Comm to +CommB - ; +InvR to +InvRB ; +InvL to +InvLB) - open GroupStr strA - renaming (_·_ to _∙A_ ; inv to -A_ - ; 1g to 1A ; ·IdR to ·IdRA) - - trivGroupHom : GroupHom AGr (BGr *) - fst trivGroupHom x = 0B - snd trivGroupHom = makeIsGroupHom λ _ _ sym (+IdRB 0B) - - compHom : GroupHom AGr (BGr *) GroupHom AGr (BGr *) GroupHom AGr (BGr *) - fst (compHom f g) x = fst f x +B fst g x - snd (compHom f g) = - makeIsGroupHom λ x y - cong₂ _+B_ (pres· (snd f) x y) (pres· (snd g) x y) - move4 (fst f x) (fst f y) (fst g x) (fst g y) - _+B_ +AssocB +CommB - - invHom : GroupHom AGr (BGr *) GroupHom AGr (BGr *) - fst (invHom (f , p)) x = -B f x - snd (invHom (f , p)) = - makeIsGroupHom - λ x y cong -B_ (pres· p x y) - ∙∙ GroupTheory.invDistr (BGr *) (f x) (f y) - ∙∙ +CommB _ _ - - open AbGroupStr - - HomGroup : AbGroup (ℓ-max ℓ') - fst HomGroup = GroupHom AGr (BGr *) - 0g (snd HomGroup) = trivGroupHom - _+_ (snd HomGroup) = compHom - - snd HomGroup = invHom - isAbGroup (snd HomGroup) = - makeIsAbGroup - isSetGroupHom - { (f , p) (g , q) (h , r) Σ≡Prop _ isPropIsGroupHom _ _) - (funExt λ x +AssocB _ _ _) }) - { (f , p) Σ≡Prop _ isPropIsGroupHom _ _) (funExt λ y +IdRB _)}) - ((λ { (f , p) Σ≡Prop _ isPropIsGroupHom _ _) (funExt λ y +InvRB _)})) - { (f , p) (g , q) Σ≡Prop _ isPropIsGroupHom _ _) (funExt λ x +CommB _ _)}) +isSetAbGroup A = is-set (str A) + +AbGroupHom : (G : AbGroup ) (H : AbGroup ℓ') Type (ℓ-max ℓ') +AbGroupHom G H = GroupHom (AbGroup→Group G) (AbGroup→Group H) + +AbGroupIso : (G : AbGroup ) (H : AbGroup ℓ') Type (ℓ-max ℓ') +AbGroupIso G H = GroupIso (AbGroup→Group G) (AbGroup→Group H) + +IsAbGroupEquiv : {A : Type } {B : Type ℓ'} + (G : AbGroupStr A) (e : A B) (H : AbGroupStr B) Type (ℓ-max ℓ') +IsAbGroupEquiv G e H = IsGroupHom (AbGroupStr→GroupStr G) (e .fst) (AbGroupStr→GroupStr H) + +AbGroupEquiv : (G : AbGroup ) (H : AbGroup ℓ') Type (ℓ-max ℓ') +AbGroupEquiv G H = Σ[ e (G .fst H .fst) ] IsAbGroupEquiv (G .snd) e (H .snd) + +isPropIsAbGroup : {G : Type } (0g : G) (_+_ : G G G) (-_ : G G) + isProp (IsAbGroup 0g _+_ (-_)) +isPropIsAbGroup 0g _+_ -_ = + isOfHLevelRetractFromIso 1 IsAbGroupIsoΣ + (isPropΣ (isPropIsGroup 0g _+_ (-_)) + grp isPropΠ2 _ _ grp .is-set _ _))) + where + open IsGroup + + +𝒮ᴰ-AbGroup : DUARel (𝒮-Univ ) AbGroupStr +𝒮ᴰ-AbGroup = + 𝒮ᴰ-Record (𝒮-Univ _) IsAbGroupEquiv + (fields: + data[ _+_ autoDUARel _ _ pres· ] + data[ 0g autoDUARel _ _ pres1 ] + data[ -_ autoDUARel _ _ presinv ] + prop[ isAbGroup _ _ isPropIsAbGroup _ _ _) ]) + where + open AbGroupStr + open IsGroupHom + +-- Extract the characterization of equality of groups +AbGroupPath : (G H : AbGroup ) (AbGroupEquiv G H) (G H) +AbGroupPath = 𝒮ᴰ-AbGroup .UARel.ua + + +-- The module below defines an abelian group induced from an +-- equivalence between an abelian group G and a type A which preserves +-- the full raw group structure from G to A. This version is useful +-- when proving that some type equivalent to an abelian group is an +-- abelian group while also specifying the binary operation, unit and +-- inverse. For an example of this see Algebra.Matrix +module _ (G : AbGroup ) {A : Type } + (m : A A A) + (u : A) + (inverse : A A) + (e : G A) + (p+ : x y e .fst (G .snd ._+_ x y) m (e .fst x) (e .fst y)) + (pu : e .fst (G .snd .0g) u) + (pinv : x e .fst (G .snd .-_ x) inverse (e .fst x)) + where + + private + module G = AbGroupStr (G .snd) + + BaseΣ : Type (ℓ-suc ) + BaseΣ = Σ[ B Type ] (B B B) × B × (B B) + + FamilyΣ : BaseΣ Type + FamilyΣ (B , m , u , i) = IsAbGroup u m i + + inducedΣ : FamilyΣ (A , m , u , inverse) + inducedΣ = + subst FamilyΣ + (UARel.≅→≡ (autoUARel BaseΣ) (e , p+ , pu , pinv)) + G.isAbGroup + + InducedAbGroup : AbGroup + InducedAbGroup .fst = A + InducedAbGroup .snd ._+_ = m + InducedAbGroup .snd .0g = u + InducedAbGroup .snd .-_ = inverse + InducedAbGroup .snd .isAbGroup = inducedΣ + + InducedAbGroupEquiv : AbGroupEquiv G InducedAbGroup + fst InducedAbGroupEquiv = e + snd InducedAbGroupEquiv = makeIsGroupHom p+ + + InducedAbGroupPath : G InducedAbGroup + InducedAbGroupPath = AbGroupPath _ _ .fst InducedAbGroupEquiv + + + +-- The module below defines an abelian group induced from an +-- equivalence which preserves the binary operation (i.e. a group +-- isomorphism). This version is useful when proving that some type +-- equivalent to an abelian group G is an abelian group when one +-- doesn't care about what the unit and inverse are. When using this +-- version the unit and inverse will both be defined by transporting +-- over the unit and inverse from G to A. +module _ (G : AbGroup ) {A : Type } + (m : A A A) + (e : G A) + ( : x y e .fst (G .snd ._+_ x y) m (e .fst x) (e .fst y)) + where + + private + module G = AbGroupStr (G .snd) + + FamilyΣ : Σ[ B Type ] (B B B) Type + FamilyΣ (B , n) = Σ[ e B ] Σ[ i (B B) ] IsAbGroup e n i + + inducedΣ : FamilyΣ (A , m) + inducedΣ = + subst FamilyΣ + (UARel.≅→≡ (autoUARel (Σ[ B Type ] (B B B))) (e , )) + (G.0g , G.-_ , G.isAbGroup) + + InducedAbGroupFromPres· : AbGroup + InducedAbGroupFromPres· .fst = A + InducedAbGroupFromPres· .snd ._+_ = m + InducedAbGroupFromPres· .snd .0g = inducedΣ .fst + InducedAbGroupFromPres· .snd .-_ = inducedΣ .snd .fst + InducedAbGroupFromPres· .snd .isAbGroup = inducedΣ .snd .snd + + InducedAbGroupEquivFromPres· : AbGroupEquiv G InducedAbGroupFromPres· + fst InducedAbGroupEquivFromPres· = e + snd InducedAbGroupEquivFromPres· = makeIsGroupHom + + InducedAbGroupPathFromPres· : G InducedAbGroupFromPres· + InducedAbGroupPathFromPres· = AbGroupPath _ _ .fst InducedAbGroupEquivFromPres· + + +dirProdAb : AbGroup AbGroup ℓ' AbGroup (ℓ-max ℓ') +dirProdAb A B = + Group→AbGroup (DirProd (AbGroup→Group A) (AbGroup→Group B)) + λ p q ΣPathP (+Comm (isAbGroup (snd A)) _ _ + , +Comm (isAbGroup (snd B)) _ _) + +trivialAbGroup : {} AbGroup +fst trivialAbGroup = Unit* +0g (snd trivialAbGroup) = tt* +_+_ (snd trivialAbGroup) _ _ = tt* +(- snd trivialAbGroup) _ = tt* +isAbGroup (snd trivialAbGroup) = makeIsAbGroup + (isProp→isSet isPropUnit*) + _ _ _ refl) + _ refl) + _ refl) + _ _ refl) + +-- useful lemma +-- duplicate propeerties => this file should be split ! +move4 : {} {A : Type } (x y z w : A) (_+_ : A A A) + ((x y z : A) x + (y + z) (x + y) + z) + ((x y : A) x + y y + x) + (x + y) + (z + w) ((x + z) + (y + w)) +move4 x y z w _+_ assoc +Comm = + sym (assoc x y (z + w)) + ∙∙ cong (x +_) (assoc y z w ∙∙ cong (_+ w) (+Comm y z) ∙∙ sym (assoc z y w)) + ∙∙ assoc x z (y + w) + +---- The type of homomorphisms A → B is an AbGroup if B is ----- +module _ { ℓ' : Level} (AGr : Group ) (BGr : AbGroup ℓ') where + private + strA = snd AGr + strB = snd BGr + + _* = AbGroup→Group + + A = fst AGr + B = fst BGr + open IsGroupHom + + open AbGroupStr strB + renaming (_+_ to _+B_ ; -_ to -B_ ; 0g to 0B + ; +IdR to +IdRB ; +IdL to +IdLB + ; +Assoc to +AssocB ; +Comm to +CommB + ; +InvR to +InvRB ; +InvL to +InvLB) + open GroupStr strA + renaming (_·_ to _∙A_ ; inv to -A_ + ; 1g to 1A ; ·IdR to ·IdRA) + + trivGroupHom : GroupHom AGr (BGr *) + fst trivGroupHom x = 0B + snd trivGroupHom = makeIsGroupHom λ _ _ sym (+IdRB 0B) + + compHom : GroupHom AGr (BGr *) GroupHom AGr (BGr *) GroupHom AGr (BGr *) + fst (compHom f g) x = fst f x +B fst g x + snd (compHom f g) = + makeIsGroupHom λ x y + cong₂ _+B_ (pres· (snd f) x y) (pres· (snd g) x y) + move4 (fst f x) (fst f y) (fst g x) (fst g y) + _+B_ +AssocB +CommB + + invHom : GroupHom AGr (BGr *) GroupHom AGr (BGr *) + fst (invHom (f , p)) x = -B f x + snd (invHom (f , p)) = + makeIsGroupHom + λ x y cong -B_ (pres· p x y) + ∙∙ GroupTheory.invDistr (BGr *) (f x) (f y) + ∙∙ +CommB _ _ + + open AbGroupStr + + HomGroup : AbGroup (ℓ-max ℓ') + fst HomGroup = GroupHom AGr (BGr *) + 0g (snd HomGroup) = trivGroupHom + _+_ (snd HomGroup) = compHom + - snd HomGroup = invHom + isAbGroup (snd HomGroup) = + makeIsAbGroup + isSetGroupHom + { (f , p) (g , q) (h , r) Σ≡Prop _ isPropIsGroupHom _ _) + (funExt λ x +AssocB _ _ _) }) + { (f , p) Σ≡Prop _ isPropIsGroupHom _ _) (funExt λ y +IdRB _)}) + ((λ { (f , p) Σ≡Prop _ isPropIsGroupHom _ _) (funExt λ y +InvRB _)})) + { (f , p) (g , q) Σ≡Prop _ isPropIsGroupHom _ _) (funExt λ x +CommB _ _)}) \ No newline at end of file diff --git a/Cubical.Algebra.AbGroup.Instances.Hom.html b/Cubical.Algebra.AbGroup.Instances.Hom.html index 3e91ca507b..9f78fe365b 100644 --- a/Cubical.Algebra.AbGroup.Instances.Hom.html +++ b/Cubical.Algebra.AbGroup.Instances.Hom.html @@ -36,17 +36,17 @@ invrB : (b : B .fst) b + (- b) 0B invrB b = +InvR b - hom0AB : (f : AbGroupHom A B) f .fst 0A 0B + hom0AB : (f : AbGroupHom A B) f .fst 0A 0B hom0AB f = hom1g (AbGroupStr→GroupStr (A .snd)) (f .fst) (AbGroupStr→GroupStr (B .snd)) (f .snd .pres·) - homInvAB : (f : AbGroupHom A B) (a : A .fst) f .fst (inv a) (- f .fst a) + homInvAB : (f : AbGroupHom A B) (a : A .fst) f .fst (inv a) (- f .fst a) homInvAB f a = homInv (AbGroupStr→GroupStr (A .snd)) (f .fst) (AbGroupStr→GroupStr (B .snd)) (f .snd .pres·) a -- Zero morphism - zero : AbGroupHom A B + zero : AbGroupHom A B zero .fst a = 0B zero .snd .pres· a a' = sym (idrB _) zero .snd .pres1 = refl @@ -54,12 +54,12 @@ -- Pointwise addition of morphisms - module _ (f* g* : AbGroupHom A B) where + module _ (f* g* : AbGroupHom A B) where private f = f* .fst g = g* .fst - HomAdd : AbGroupHom A B + HomAdd : AbGroupHom A B HomAdd .fst = λ a f a + g a HomAdd .snd .pres· a a' = @@ -87,11 +87,11 @@ -- Pointwise inverse of morphism - module _ (f* : AbGroupHom A B) where + module _ (f* : AbGroupHom A B) where private f = f* .fst - HomInv : AbGroupHom A B + HomInv : AbGroupHom A B HomInv .fst = λ a - f a HomInv .snd .pres· a a' = @@ -117,25 +117,25 @@ -ₕ_ = HomInv -- Morphism addition is associative - HomAdd-assoc : (f g h : AbGroupHom A B) (f +ₕ (g +ₕ h)) ((f +ₕ g) +ₕ h) + HomAdd-assoc : (f g h : AbGroupHom A B) (f +ₕ (g +ₕ h)) ((f +ₕ g) +ₕ h) HomAdd-assoc f g h = GroupHom≡ (funExt λ a +Assoc _ _ _) -- Morphism addition is commutative - HomAdd-comm : (f g : AbGroupHom A B) (f +ₕ g) (g +ₕ f) + HomAdd-comm : (f g : AbGroupHom A B) (f +ₕ g) (g +ₕ f) HomAdd-comm f g = GroupHom≡ (funExt λ a +Comm _ _) -- zero is right identity - HomAdd-zero : (f : AbGroupHom A B) (f +ₕ zero) f + HomAdd-zero : (f : AbGroupHom A B) (f +ₕ zero) f HomAdd-zero f = GroupHom≡ (funExt λ a idrB _) -- -ₕ is right inverse - HomInv-invr : (f : AbGroupHom A B) (f +ₕ (-ₕ f)) zero + HomInv-invr : (f : AbGroupHom A B) (f +ₕ (-ₕ f)) zero HomInv-invr f = GroupHom≡ (funExt λ a invrB _) -- Abelian group structure on AbGroupHom A B open AbGroupStr -HomAbGroupStr : (A : AbGroup ) (B : AbGroup ℓ') AbGroupStr (AbGroupHom A B) +HomAbGroupStr : (A : AbGroup ) (B : AbGroup ℓ') AbGroupStr (AbGroupHom A B) HomAbGroupStr A B .0g = zero A B HomAbGroupStr A B ._+_ = HomAdd A B HomAbGroupStr A B .-_ = HomInv A B @@ -143,5 +143,5 @@ (HomAdd-assoc A B) (HomAdd-zero A B) (HomInv-invr A B) (HomAdd-comm A B) HomAbGroup : (A : AbGroup ) (B : AbGroup ℓ') AbGroup (ℓ-max ℓ') -HomAbGroup A B = AbGroupHom A B , HomAbGroupStr A B +HomAbGroup A B = AbGroupHom A B , HomAbGroupStr A B \ No newline at end of file diff --git a/Cubical.Algebra.AbGroup.TensorProduct.html b/Cubical.Algebra.AbGroup.TensorProduct.html index cacd806db3..548392c85c 100644 --- a/Cubical.Algebra.AbGroup.TensorProduct.html +++ b/Cubical.Algebra.AbGroup.TensorProduct.html @@ -215,7 +215,7 @@ h : (x : List (A × B)) (unlist x +⊗ -⊗ (unlist x)) 0⊗ h [] = sym (⊗DistL+⊗ 0A (-A 0A) (0B)) cong x _⊗_ {AGr = AGr} {BGr = BGr} x 0B) (+InvR strA 0A) - h (x x₁) = move4 (fst x snd x) (unlist x₁) ((-A fst x) snd x) (-⊗ (unlist x₁)) + h (x x₁) = move4 (fst x snd x) (unlist x₁) ((-A fst x) snd x) (-⊗ (unlist x₁)) _+⊗_ +⊗Assoc +⊗Comm ∙∙ cong₂ _+⊗_ (sym (⊗DistL+⊗ (fst x) (-A (fst x)) (snd x)) ∙∙ i +InvR strA (fst x) i (snd x)) @@ -278,7 +278,7 @@ ⨂→AbGroup-elim-hom : {} (C : AbGroup ) (f : (fst A × fst B) fst C) (linR : _) (linL : _) (p : _) - AbGroupHom (A B) C + AbGroupHom (A B) C fst (⨂→AbGroup-elim-hom C f linR linL p) = ⨂→AbGroup-elim C f p linR linL snd (⨂→AbGroup-elim-hom C f linR linL p) = makeIsGroupHom x y refl) @@ -288,9 +288,9 @@ ----------- Definition of universal property ------------ tensorFun : (A : Group ) (B : Group ℓ') (T C : AbGroup (ℓ-max ℓ')) - (f : GroupHom A (HomGroup B T *)) + (f : GroupHom A (HomGroup B T *)) GroupHom (T *) (C *) - GroupHom A (HomGroup B C *) + GroupHom A (HomGroup B C *) fst (fst (tensorFun A B T C (f , p) (g , q)) a) b = g (fst (f a) b) snd (fst (tensorFun A B T C (f , p) (g , q)) a) = makeIsGroupHom @@ -304,9 +304,9 @@ isTensorProductOf_and_ : AbGroup AbGroup ℓ' AbGroup (ℓ-max ℓ')→ Type _ isTensorProductOf_and_ {} {ℓ'} A B T = - Σ[ f GroupHom (A *) ((HomGroup (B *) T) *) ] + Σ[ f GroupHom (A *) ((HomGroup (B *) T) *) ] ((C : AbGroup (ℓ-max ℓ')) isEquiv {A = GroupHom (T *) (C *)} - {B = GroupHom (A *) ((HomGroup (B *) C) *)} + {B = GroupHom (A *) ((HomGroup (B *) C) *)} (tensorFun (A *) (B *) T C f)) ------ _⨂_ satisfies the universal property -------- @@ -329,7 +329,7 @@ -A_ = -G_ strA -B_ = -G_ strB - mainF : GroupHom (AGr *) (HomGroup (BGr *) (AGr BGr) *) + mainF : GroupHom (AGr *) (HomGroup (BGr *) (AGr BGr) *) fst (fst mainF a) b = a b snd (fst mainF a) = makeIsGroupHom (⊗DistR+⊗ a) snd mainF = makeIsGroupHom @@ -340,7 +340,7 @@ fst isTensorProduct⨂ = mainF snd isTensorProduct⨂ C = isoToIsEquiv mainIso where - invF : GroupHom (AGr *) (HomGroup (BGr *) C *) GroupHom ((AGr BGr) *) (C *) + invF : GroupHom (AGr *) (HomGroup (BGr *) C *) GroupHom ((AGr BGr) *) (C *) fst (invF (f , p)) = F where lem : f (0g (snd AGr)) .fst (0g (snd BGr)) 0g (snd C) @@ -358,7 +358,7 @@ snd (invF (f , p)) = makeIsGroupHom λ x y refl mainIso : Iso (GroupHom ((AGr BGr) *) (C *)) - (GroupHom (AGr *) (HomGroup (BGr *) C *)) + (GroupHom (AGr *) (HomGroup (BGr *) C *)) Iso.fun mainIso = _ Iso.inv mainIso = invF Iso.rightInv mainIso (f , p) = Σ≡Prop _ isPropIsGroupHom _ _) @@ -372,7 +372,7 @@ module _ {ℓ'' ℓ''' : Level} {A : AbGroup } {B : AbGroup ℓ'} {C : AbGroup ℓ''} {D : AbGroup ℓ'''} - (ϕ : AbGroupHom A C) (ψ : AbGroupHom B D) where + (ϕ : AbGroupHom A C) (ψ : AbGroupHom B D) where inducedFun⨂ : A ⨂₁ B C ⨂₁ D inducedFun⨂ = ⨂→AbGroup-elim (C D) @@ -381,7 +381,7 @@ x y z cong (fst ϕ x ⊗_) (IsGroupHom.pres· (snd ψ) y z) ⊗DistR+⊗ _ _ _) λ x y z cong (_⊗ fst ψ z) (IsGroupHom.pres· (snd ϕ) x y) ⊗DistL+⊗ _ _ _ - inducedHom⨂ : AbGroupHom (A B) (C D) + inducedHom⨂ : AbGroupHom (A B) (C D) fst inducedHom⨂ = inducedFun⨂ snd inducedHom⨂ = makeIsGroupHom λ _ _ refl @@ -412,7 +412,7 @@ Iso.leftInv (fst ⨂-commIso) = commFun²≡id snd ⨂-commIso = makeIsGroupHom λ x y refl -⨂-comm : { ℓ'} {A : AbGroup } {B : AbGroup ℓ'} AbGroupEquiv (A B) (B A) +⨂-comm : { ℓ'} {A : AbGroup } {B : AbGroup ℓ'} AbGroupEquiv (A B) (B A) fst ⨂-comm = isoToEquiv (fst (⨂-commIso)) snd ⨂-comm = snd ⨂-commIso @@ -421,14 +421,14 @@ -------------------- Associativity ------------------------ module _ { ℓ' ℓ'' : Level} {A : AbGroup } {B : AbGroup ℓ'} {C : AbGroup ℓ''} where private - f : (c : fst C) AbGroupHom (A B) (A (B C)) + f : (c : fst C) AbGroupHom (A B) (A (B C)) f c = ⨂→AbGroup-elim-hom (A (B C)) ab (fst ab) ((snd ab) c)) a b b' i a (⊗DistL+⊗ b b' c i)) ⊗DistR+⊗ a (b c) (b' c)) a a' b ⊗DistL+⊗ a a' (b c)) (⊗AnnihilL _ sym (⊗AnnihilL _)) - assocHom : AbGroupHom ((A B) C) (A (B C)) + assocHom : AbGroupHom ((A B) C) (A (B C)) assocHom = ⨂→AbGroup-elim-hom (A (B C)) x f (snd x) .fst (fst x)) helper @@ -441,7 +441,7 @@ ∙∙ ⊗DistR+⊗ a (b x) (b y) ∙∙ refl) λ a b ind1 ind2 x y cong₂ _+⊗_ (ind1 x y) (ind2 x y) - ∙∙ move4 (f x .fst a) (f y .fst a) (f x .fst b) (f y .fst b) + ∙∙ move4 (f x .fst a) (f y .fst a) (f x .fst b) (f y .fst b) _+⊗_ +⊗Assoc +⊗Comm ∙∙ cong₂ _+⊗_ (sym (IsGroupHom.pres· (snd (f x)) a b)) @@ -449,7 +449,7 @@ module _ { ℓ' ℓ'' : Level} {A : AbGroup } {B : AbGroup ℓ'} {C : AbGroup ℓ''} where private - f' : (a : fst A) AbGroupHom (B C) ((A B) C) + f' : (a : fst A) AbGroupHom (B C) ((A B) C) f' a = ⨂→AbGroup-elim-hom ((A B) C) bc (a fst bc) snd bc) @@ -458,7 +458,7 @@ ⊗DistL+⊗ (a x) (a y) b) λ i ⊗AnnihilR a i (0g (snd C)) - assocHom⁻ : AbGroupHom (A (B C)) ((A B) C) + assocHom⁻ : AbGroupHom (A (B C)) ((A B) C) assocHom⁻ = ⨂→AbGroup-elim-hom ((A B) C) abc f' (fst abc) .fst (snd abc)) @@ -472,7 +472,7 @@ b c i ⊗DistL+⊗ x y b i c) ⊗DistL+⊗ (x b) (y b) c) λ a b ind1 ind2 cong₂ _+⊗_ ind1 ind2 - ∙∙ move4 _ _ _ _ _+⊗_ +⊗Assoc +⊗Comm + ∙∙ move4 _ _ _ _ _+⊗_ +⊗Assoc +⊗Comm ∙∙ cong₂ _+⊗_ (IsGroupHom.pres· (snd (f' x)) a b) (IsGroupHom.pres· (snd (f' y)) a b) @@ -502,13 +502,13 @@ ∙∙ IsGroupHom.pres· (snd assocHom) (fst assocHom⁻ x) (fst assocHom⁻ y) ∙∙ cong₂ _+⊗_ p q - ⨂assoc : AbGroupEquiv (A (B C)) ((A B) C) + ⨂assoc : AbGroupEquiv (A (B C)) ((A B) C) fst ⨂assoc = isoToEquiv ⨂assocIso snd ⨂assoc = snd assocHom⁻ module _ {G' : Ring } where private - G = Ring→AbGroup G' + G = Ring→AbGroup G' _·G_ = RingStr._·_ (snd G') TensorMult : fst (G G) fst G @@ -519,21 +519,21 @@ (IsRing.·DistR+ (RingStr.isRing (snd G'))) (IsRing.·DistL+ (RingStr.isRing (snd G'))) - TensorMultHom : AbGroupHom (G G) G + TensorMultHom : AbGroupHom (G G) G fst TensorMultHom = TensorMult snd TensorMultHom = makeIsGroupHom λ x y refl -lIncl⨂ : {G : AbGroup } {H : AbGroup ℓ'} (h : fst H) AbGroupHom G (G H) +lIncl⨂ : {G : AbGroup } {H : AbGroup ℓ'} (h : fst H) AbGroupHom G (G H) fst (lIncl⨂ h) g = g h snd (lIncl⨂ h) = makeIsGroupHom λ x y ⊗DistL+⊗ x y h -rIncl⨂ : {G : AbGroup } {H : AbGroup ℓ'} (g : fst G) AbGroupHom H (G H) +rIncl⨂ : {G : AbGroup } {H : AbGroup ℓ'} (g : fst G) AbGroupHom H (G H) fst (rIncl⨂ g) h = g h snd (rIncl⨂ g) = makeIsGroupHom (⊗DistR+⊗ g) G→G⨂G→Gₗ : {G : Ring } - Path (AbGroupHom (Ring→AbGroup G) (Ring→AbGroup G)) + Path (AbGroupHom (Ring→AbGroup G) (Ring→AbGroup G)) ((compGroupHom (lIncl⨂ (RingStr.1r (snd G))) TensorMultHom)) idGroupHom G→G⨂G→Gₗ {G = G} = @@ -541,7 +541,7 @@ (funExt (RingStr.·IdR (snd G))) G→G⨂G→Gᵣ : {G : Ring } - Path (AbGroupHom (Ring→AbGroup G) (Ring→AbGroup G)) + Path (AbGroupHom (Ring→AbGroup G) (Ring→AbGroup G)) ((compGroupHom (rIncl⨂ (RingStr.1r (snd G))) TensorMultHom)) idGroupHom G→G⨂G→Gᵣ {G = G} = diff --git a/Cubical.Algebra.Algebra.Base.html b/Cubical.Algebra.Algebra.Base.html index 8b5884e05a..fb9d2a97dc 100644 --- a/Cubical.Algebra.Algebra.Base.html +++ b/Cubical.Algebra.Algebra.Base.html @@ -53,244 +53,247 @@ isRing : IsRing _ _ _ _ _ isRing = isring (IsLeftModule.+IsAbGroup +IsLeftModule) ·IsMonoid ·DistR+ ·DistL+ - open IsRing isRing public hiding (_-_; +Assoc; +IdL; +InvL; +IdR; +InvR; +Comm ; ·DistR+ ; ·DistL+) - -unquoteDecl IsAlgebraIsoΣ = declareRecordIsoΣ IsAlgebraIsoΣ (quote IsAlgebra) - -record AlgebraStr (R : Ring ) (A : Type ℓ') : Type (ℓ-max ℓ') where - - constructor algebrastr - - field - 0a : A - 1a : A - _+_ : A A A - _·_ : A A A - -_ : A A - _⋆_ : R A A - isAlgebra : IsAlgebra R 0a 1a _+_ _·_ -_ _⋆_ - - open IsAlgebra isAlgebra public - -Algebra : (R : Ring ) ℓ' Type (ℓ-max (ℓ-suc ℓ')) -Algebra R ℓ' = Σ[ A Type ℓ' ] AlgebraStr R A - -module commonExtractors {R : Ring } where - - module _ where - open IsAlgebra - open RingStr - open LeftModuleStr - - Algebra→Module : (A : Algebra R ℓ') LeftModule R ℓ' - Algebra→Module A .fst = A .fst - Algebra→Module A .snd .0m = _ - Algebra→Module A .snd ._+_ = _ - Algebra→Module A .snd .-_ = _ - Algebra→Module A .snd ._⋆_ = _ - Algebra→Module A .snd .isLeftModule = (A .snd .AlgebraStr.isAlgebra) .+IsLeftModule - - Algebra→Ring : (A : Algebra R ℓ') Ring ℓ' - Algebra→Ring A .fst = A .fst - Algebra→Ring A .snd .0r = _ - Algebra→Ring A .snd .1r = _ - Algebra→Ring A .snd ._+_ = _ - Algebra→Ring A .snd ._·_ = _ - Algebra→Ring A .snd .-_ = _ - Algebra→Ring A .snd .RingStr.isRing = IsAlgebra.isRing (A .snd .AlgebraStr.isAlgebra) - - Algebra→AbGroup : (A : Algebra R ℓ') AbGroup ℓ' - Algebra→AbGroup A = LeftModule→AbGroup (Algebra→Module A) - - Algebra→Group : (A : Algebra R ℓ') Group ℓ' - Algebra→Group A = Ring→Group (Algebra→Ring A) - - Algebra→AddMonoid : (A : Algebra R ℓ') Monoid ℓ' - Algebra→AddMonoid A = Group→Monoid (Algebra→Group A) - - Algebra→MultMonoid : (A : Algebra R ℓ') Monoid ℓ' - Algebra→MultMonoid A = Ring→MultMonoid (Algebra→Ring A) - - isSetAlgebra : (A : Algebra R ℓ') isSet A - isSetAlgebra A = isSetAbGroup (Algebra→AbGroup A) - - open RingStr (snd R) using (1r; ·DistL+) renaming (_+_ to _+r_; _·_ to _·s_) - - module _ {A : Type ℓ'} {0a 1a : A} - (isSet-A : isSet A) - {_+_ _·_ : A A A} { -_ : A A} {_⋆_ : R A A} - (+Assoc : (x y z : A) x + (y + z) (x + y) + z) - (+IdR : (x : A) x + 0a x) - (+InvR : (x : A) x + (- x) 0a) - (+Comm : (x y : A) x + y y + x) - (·Assoc : (x y z : A) x · (y · z) (x · y) · z) - (·IdR : (x : A) x · 1a x) - (·IdL : (x : A) 1a · x x) - (·DistR+ : (x y z : A) x · (y + z) (x · y) + (x · z)) - (·DistL+ : (x y z : A) (x + y) · z (x · z) + (y · z)) - (⋆Assoc : (r s : R ) (x : A) (r ·s s) x r (s x)) - (⋆DistR+ : (r : R ) (x y : A) r (x + y) (r x) + (r y)) - (⋆DistL+ : (r s : R ) (x : A) (r +r s) x (r x) + (s x)) - (⋆IdL : (x : A) 1r x x) - (⋆AssocR : (r : R ) (x y : A) r (x · y) x · (r y)) - (⋆AssocL : (r : R ) (x y : A) (r x) · y r (x · y)) - where - makeIsAlgebra : IsAlgebra R 0a 1a _+_ _·_ -_ _⋆_ - makeIsAlgebra .IsAlgebra.+IsLeftModule = makeIsLeftModule - isSet-A - +Assoc +IdR +InvR +Comm - ⋆Assoc ⋆DistR+ ⋆DistL+ ⋆IdL - makeIsAlgebra .IsAlgebra.·IsMonoid = makeIsMonoid isSet-A ·Assoc ·IdR ·IdL - makeIsAlgebra .IsAlgebra.·DistR+ = ·DistR+ - makeIsAlgebra .IsAlgebra.·DistL+ = ·DistL+ - makeIsAlgebra .IsAlgebra.⋆AssocR = ⋆AssocR - makeIsAlgebra .IsAlgebra.⋆AssocL = ⋆AssocL - -open commonExtractors public - -record IsAlgebraHom {R : Ring } {A : Type ℓ'} {B : Type ℓ''} - (M : AlgebraStr R A) (f : A B) (N : AlgebraStr R B) - : Type (ℓ-max (ℓ-max ℓ' ℓ'')) - where - - -- Shorter qualified names - private - module M = AlgebraStr M - module N = AlgebraStr N - - field - pres0 : f M.0a N.0a - pres1 : f M.1a N.1a - pres+ : (x y : A) f (x M.+ y) f x N.+ f y - pres· : (x y : A) f (x M.· y) f x N.· f y - pres- : (x : A) f (M.- x) N.- (f x) - pres⋆ : (r : R ) (y : A) f (r M.⋆ y) r N.⋆ f y - -unquoteDecl IsAlgebraHomIsoΣ = declareRecordIsoΣ IsAlgebraHomIsoΣ (quote IsAlgebraHom) -open IsAlgebraHom - -private - variable - R : Ring - A B : Algebra R - -AlgebraHom : (M : Algebra R ℓ') (N : Algebra R ℓ'') Type _ -AlgebraHom M N = Σ[ f ( M N ) ] IsAlgebraHom (M .snd) f (N .snd) - -IsAlgebraEquiv : {A : Type ℓ'} {B : Type ℓ''} - (M : AlgebraStr R A) (e : A B) (N : AlgebraStr R B) - Type _ -IsAlgebraEquiv M e N = IsAlgebraHom M (e .fst) N - -AlgebraEquiv : (M : Algebra R ℓ') (N : Algebra R ℓ'') Type _ -AlgebraEquiv M N = Σ[ e M N ] IsAlgebraEquiv (M .snd) e (N .snd) - -_$a_ : AlgebraHom A B A B -f $a x = fst f x - -AlgebraEquiv→AlgebraHom : AlgebraEquiv A B AlgebraHom A B -AlgebraEquiv→AlgebraHom (e , eIsHom) = e .fst , eIsHom - -isPropIsAlgebra : (R : Ring ) {A : Type ℓ'} - (0a 1a : A) - (_+_ _·_ : A A A) - (-_ : A A) - (_⋆_ : R A A) - isProp (IsAlgebra R 0a 1a _+_ _·_ -_ _⋆_) -isPropIsAlgebra R _ _ _ _ _ _ = let open IsLeftModule in - isOfHLevelRetractFromIso 1 IsAlgebraIsoΣ - (isPropΣ - (isPropIsLeftModule _ _ _ _ _) - mo isProp×4 (isPropIsMonoid _ _) - (isPropΠ3 λ _ _ _ mo .is-set _ _) - (isPropΠ3 λ _ _ _ mo .is-set _ _) - (isPropΠ3 λ _ _ _ mo .is-set _ _) - (isPropΠ3 λ _ _ _ mo .is-set _ _) )) - - -isPropIsAlgebraHom : (R : Ring ) {A : Type ℓ'} {B : Type ℓ''} - (AS : AlgebraStr R A) (f : A B) (BS : AlgebraStr R B) - isProp (IsAlgebraHom AS f BS) -isPropIsAlgebraHom R AS f BS = isOfHLevelRetractFromIso 1 IsAlgebraHomIsoΣ - (isProp×5 (isSetAlgebra (_ , BS) _ _) - (isSetAlgebra (_ , BS) _ _) - (isPropΠ2 λ _ _ isSetAlgebra (_ , BS) _ _) - (isPropΠ2 λ _ _ isSetAlgebra (_ , BS) _ _) - (isPropΠ λ _ isSetAlgebra (_ , BS) _ _) - (isPropΠ2 λ _ _ isSetAlgebra (_ , BS) _ _)) - -isSetAlgebraHom : (M : Algebra R ℓ') (N : Algebra R ℓ'') - isSet (AlgebraHom M N) -isSetAlgebraHom _ N = isSetΣ (isSetΠ _ isSetAlgebra N)) - λ _ isProp→isSet (isPropIsAlgebraHom _ _ _ _) - - -isSetAlgebraEquiv : (M : Algebra R ℓ') (N : Algebra R ℓ'') - isSet (AlgebraEquiv M N) -isSetAlgebraEquiv M N = isSetΣ (isOfHLevel≃ 2 (isSetAlgebra M) (isSetAlgebra N)) - λ _ isProp→isSet (isPropIsAlgebraHom _ _ _ _) - -AlgebraHom≡ : {φ ψ : AlgebraHom A B} fst φ fst ψ φ ψ -AlgebraHom≡ = Σ≡Prop λ f isPropIsAlgebraHom _ _ f _ - -𝒮ᴰ-Algebra : (R : Ring ) DUARel (𝒮-Univ ℓ') (AlgebraStr R) (ℓ-max ℓ') -𝒮ᴰ-Algebra R = - 𝒮ᴰ-Record (𝒮-Univ _) (IsAlgebraEquiv {R = R}) - (fields: - data[ 0a nul pres0 ] - data[ 1a nul pres1 ] - data[ _+_ bin pres+ ] - data[ _·_ bin pres· ] - data[ -_ autoDUARel _ _ pres- ] - data[ _⋆_ autoDUARel _ _ pres⋆ ] - prop[ isAlgebra _ _ isPropIsAlgebra _ _ _ _ _ _ _) ]) - where - open AlgebraStr - - -- faster with some sharing - nul = autoDUARel (𝒮-Univ _) A A) - bin = autoDUARel (𝒮-Univ _) A A A A) - -AlgebraPath : (A B : Algebra R ℓ') (AlgebraEquiv A B) (A B) -AlgebraPath {R = R} = (𝒮ᴰ-Algebra R) .UARel.ua - -uaAlgebra : AlgebraEquiv A B A B -uaAlgebra {A = A} {B = B} = equivFun (AlgebraPath A B) - -isGroupoidAlgebra : isGroupoid (Algebra R ℓ') -isGroupoidAlgebra _ _ = isOfHLevelRespectEquiv 2 (AlgebraPath _ _) (isSetAlgebraEquiv _ _) - --- Smart constructor for algebra homomorphisms --- that infers the other equations from pres1, pres+, pres·, and pres⋆ - -module _ - -- Variable generalization would fail below without the module parameters A and B. - {A : Algebra R } - {B : Algebra R ℓ'} - {f : A B } - where - - private - module A = AlgebraStr (A .snd) - module B = AlgebraStr (B .snd) - - module _ - (p1 : f A.1a B.1a) - (p+ : (x y : A ) f (x A.+ y) f x B.+ f y) - ( : (x y : A ) f (x A.· y) f x B.· f y) - (p⋆ : (r : R ) (x : A ) f (r A.⋆ x) r B.⋆ f x) - where - - open IsAlgebraHom - private - isGHom : IsGroupHom (Algebra→Group A .snd) f (Algebra→Group B .snd) - isGHom = makeIsGroupHom p+ - - makeIsAlgebraHom : IsAlgebraHom (A .snd) f (B .snd) - makeIsAlgebraHom .pres0 = isGHom .IsGroupHom.pres1 - makeIsAlgebraHom .pres1 = p1 - makeIsAlgebraHom .pres+ = p+ - makeIsAlgebraHom .pres· = - makeIsAlgebraHom .pres- = isGHom .IsGroupHom.presinv - makeIsAlgebraHom .pres⋆ = p⋆ + open IsRing isRing public + hiding (_-_; +Assoc; +IdL; +InvL; +IdR; +InvR; +Comm; ·DistR+; ·DistL+; is-set) + +unquoteDecl IsAlgebraIsoΣ = declareRecordIsoΣ IsAlgebraIsoΣ (quote IsAlgebra) + +record AlgebraStr (R : Ring ) (A : Type ℓ') : Type (ℓ-max ℓ') where + + constructor algebrastr + + field + 0a : A + 1a : A + _+_ : A A A + _·_ : A A A + -_ : A A + _⋆_ : R A A + isAlgebra : IsAlgebra R 0a 1a _+_ _·_ -_ _⋆_ + + open IsAlgebra isAlgebra public + +Algebra : (R : Ring ) ℓ' Type (ℓ-max (ℓ-suc ℓ')) +Algebra R ℓ' = Σ[ A Type ℓ' ] AlgebraStr R A + +module commonExtractors {R : Ring } where + + module _ where + open IsAlgebra + open RingStr + open LeftModuleStr + + Algebra→Module : (A : Algebra R ℓ') LeftModule R ℓ' + Algebra→Module A .fst = A .fst + Algebra→Module A .snd .0m = _ + Algebra→Module A .snd ._+_ = _ + Algebra→Module A .snd .-_ = _ + Algebra→Module A .snd ._⋆_ = _ + Algebra→Module A .snd .isLeftModule = (A .snd .AlgebraStr.isAlgebra) .+IsLeftModule + + Algebra→Ring : (A : Algebra R ℓ') Ring ℓ' + Algebra→Ring A .fst = A .fst + Algebra→Ring A .snd .0r = _ + Algebra→Ring A .snd .1r = _ + Algebra→Ring A .snd ._+_ = _ + Algebra→Ring A .snd ._·_ = _ + Algebra→Ring A .snd .-_ = _ + Algebra→Ring A .snd .RingStr.isRing = IsAlgebra.isRing (A .snd .AlgebraStr.isAlgebra) + + Algebra→AbGroup : (A : Algebra R ℓ') AbGroup ℓ' + Algebra→AbGroup A = LeftModule→AbGroup (Algebra→Module A) + + Algebra→Group : (A : Algebra R ℓ') Group ℓ' + Algebra→Group A = Ring→Group (Algebra→Ring A) + + Algebra→AddMonoid : (A : Algebra R ℓ') Monoid ℓ' + Algebra→AddMonoid A = Group→Monoid (Algebra→Group A) + + Algebra→MultMonoid : (A : Algebra R ℓ') Monoid ℓ' + Algebra→MultMonoid A = Ring→MultMonoid (Algebra→Ring A) + + isSetAlgebra : (A : Algebra R ℓ') isSet A + isSetAlgebra A = is-set + where + open AlgebraStr (str A) + + open RingStr (snd R) using (1r; ·DistL+) renaming (_+_ to _+r_; _·_ to _·s_) + + module _ {A : Type ℓ'} {0a 1a : A} + (isSet-A : isSet A) + {_+_ _·_ : A A A} { -_ : A A} {_⋆_ : R A A} + (+Assoc : (x y z : A) x + (y + z) (x + y) + z) + (+IdR : (x : A) x + 0a x) + (+InvR : (x : A) x + (- x) 0a) + (+Comm : (x y : A) x + y y + x) + (·Assoc : (x y z : A) x · (y · z) (x · y) · z) + (·IdR : (x : A) x · 1a x) + (·IdL : (x : A) 1a · x x) + (·DistR+ : (x y z : A) x · (y + z) (x · y) + (x · z)) + (·DistL+ : (x y z : A) (x + y) · z (x · z) + (y · z)) + (⋆Assoc : (r s : R ) (x : A) (r ·s s) x r (s x)) + (⋆DistR+ : (r : R ) (x y : A) r (x + y) (r x) + (r y)) + (⋆DistL+ : (r s : R ) (x : A) (r +r s) x (r x) + (s x)) + (⋆IdL : (x : A) 1r x x) + (⋆AssocR : (r : R ) (x y : A) r (x · y) x · (r y)) + (⋆AssocL : (r : R ) (x y : A) (r x) · y r (x · y)) + where + makeIsAlgebra : IsAlgebra R 0a 1a _+_ _·_ -_ _⋆_ + makeIsAlgebra .IsAlgebra.+IsLeftModule = makeIsLeftModule + isSet-A + +Assoc +IdR +InvR +Comm + ⋆Assoc ⋆DistR+ ⋆DistL+ ⋆IdL + makeIsAlgebra .IsAlgebra.·IsMonoid = makeIsMonoid isSet-A ·Assoc ·IdR ·IdL + makeIsAlgebra .IsAlgebra.·DistR+ = ·DistR+ + makeIsAlgebra .IsAlgebra.·DistL+ = ·DistL+ + makeIsAlgebra .IsAlgebra.⋆AssocR = ⋆AssocR + makeIsAlgebra .IsAlgebra.⋆AssocL = ⋆AssocL + +open commonExtractors public + +record IsAlgebraHom {R : Ring } {A : Type ℓ'} {B : Type ℓ''} + (M : AlgebraStr R A) (f : A B) (N : AlgebraStr R B) + : Type (ℓ-max (ℓ-max ℓ' ℓ'')) + where + + -- Shorter qualified names + private + module M = AlgebraStr M + module N = AlgebraStr N + + field + pres0 : f M.0a N.0a + pres1 : f M.1a N.1a + pres+ : (x y : A) f (x M.+ y) f x N.+ f y + pres· : (x y : A) f (x M.· y) f x N.· f y + pres- : (x : A) f (M.- x) N.- (f x) + pres⋆ : (r : R ) (y : A) f (r M.⋆ y) r N.⋆ f y + +unquoteDecl IsAlgebraHomIsoΣ = declareRecordIsoΣ IsAlgebraHomIsoΣ (quote IsAlgebraHom) +open IsAlgebraHom + +private + variable + R : Ring + A B : Algebra R + +AlgebraHom : (M : Algebra R ℓ') (N : Algebra R ℓ'') Type _ +AlgebraHom M N = Σ[ f ( M N ) ] IsAlgebraHom (M .snd) f (N .snd) + +IsAlgebraEquiv : {A : Type ℓ'} {B : Type ℓ''} + (M : AlgebraStr R A) (e : A B) (N : AlgebraStr R B) + Type _ +IsAlgebraEquiv M e N = IsAlgebraHom M (e .fst) N + +AlgebraEquiv : (M : Algebra R ℓ') (N : Algebra R ℓ'') Type _ +AlgebraEquiv M N = Σ[ e M N ] IsAlgebraEquiv (M .snd) e (N .snd) + +_$a_ : AlgebraHom A B A B +f $a x = fst f x + +AlgebraEquiv→AlgebraHom : AlgebraEquiv A B AlgebraHom A B +AlgebraEquiv→AlgebraHom (e , eIsHom) = e .fst , eIsHom + +isPropIsAlgebra : (R : Ring ) {A : Type ℓ'} + (0a 1a : A) + (_+_ _·_ : A A A) + (-_ : A A) + (_⋆_ : R A A) + isProp (IsAlgebra R 0a 1a _+_ _·_ -_ _⋆_) +isPropIsAlgebra R _ _ _ _ _ _ = let open IsLeftModule in + isOfHLevelRetractFromIso 1 IsAlgebraIsoΣ + (isPropΣ + (isPropIsLeftModule _ _ _ _ _) + mo isProp×4 (isPropIsMonoid _ _) + (isPropΠ3 λ _ _ _ mo .is-set _ _) + (isPropΠ3 λ _ _ _ mo .is-set _ _) + (isPropΠ3 λ _ _ _ mo .is-set _ _) + (isPropΠ3 λ _ _ _ mo .is-set _ _) )) + + +isPropIsAlgebraHom : (R : Ring ) {A : Type ℓ'} {B : Type ℓ''} + (AS : AlgebraStr R A) (f : A B) (BS : AlgebraStr R B) + isProp (IsAlgebraHom AS f BS) +isPropIsAlgebraHom R AS f BS = isOfHLevelRetractFromIso 1 IsAlgebraHomIsoΣ + (isProp×5 (isSetAlgebra (_ , BS) _ _) + (isSetAlgebra (_ , BS) _ _) + (isPropΠ2 λ _ _ isSetAlgebra (_ , BS) _ _) + (isPropΠ2 λ _ _ isSetAlgebra (_ , BS) _ _) + (isPropΠ λ _ isSetAlgebra (_ , BS) _ _) + (isPropΠ2 λ _ _ isSetAlgebra (_ , BS) _ _)) + +isSetAlgebraHom : (M : Algebra R ℓ') (N : Algebra R ℓ'') + isSet (AlgebraHom M N) +isSetAlgebraHom _ N = isSetΣ (isSetΠ _ isSetAlgebra N)) + λ _ isProp→isSet (isPropIsAlgebraHom _ _ _ _) + + +isSetAlgebraEquiv : (M : Algebra R ℓ') (N : Algebra R ℓ'') + isSet (AlgebraEquiv M N) +isSetAlgebraEquiv M N = isSetΣ (isOfHLevel≃ 2 (isSetAlgebra M) (isSetAlgebra N)) + λ _ isProp→isSet (isPropIsAlgebraHom _ _ _ _) + +AlgebraHom≡ : {φ ψ : AlgebraHom A B} fst φ fst ψ φ ψ +AlgebraHom≡ = Σ≡Prop λ f isPropIsAlgebraHom _ _ f _ + +𝒮ᴰ-Algebra : (R : Ring ) DUARel (𝒮-Univ ℓ') (AlgebraStr R) (ℓ-max ℓ') +𝒮ᴰ-Algebra R = + 𝒮ᴰ-Record (𝒮-Univ _) (IsAlgebraEquiv {R = R}) + (fields: + data[ 0a nul pres0 ] + data[ 1a nul pres1 ] + data[ _+_ bin pres+ ] + data[ _·_ bin pres· ] + data[ -_ autoDUARel _ _ pres- ] + data[ _⋆_ autoDUARel _ _ pres⋆ ] + prop[ isAlgebra _ _ isPropIsAlgebra _ _ _ _ _ _ _) ]) + where + open AlgebraStr + + -- faster with some sharing + nul = autoDUARel (𝒮-Univ _) A A) + bin = autoDUARel (𝒮-Univ _) A A A A) + +AlgebraPath : (A B : Algebra R ℓ') (AlgebraEquiv A B) (A B) +AlgebraPath {R = R} = (𝒮ᴰ-Algebra R) .UARel.ua + +uaAlgebra : AlgebraEquiv A B A B +uaAlgebra {A = A} {B = B} = equivFun (AlgebraPath A B) + +isGroupoidAlgebra : isGroupoid (Algebra R ℓ') +isGroupoidAlgebra _ _ = isOfHLevelRespectEquiv 2 (AlgebraPath _ _) (isSetAlgebraEquiv _ _) + +-- Smart constructor for algebra homomorphisms +-- that infers the other equations from pres1, pres+, pres·, and pres⋆ + +module _ + -- Variable generalization would fail below without the module parameters A and B. + {A : Algebra R } + {B : Algebra R ℓ'} + {f : A B } + where + + private + module A = AlgebraStr (A .snd) + module B = AlgebraStr (B .snd) + + module _ + (p1 : f A.1a B.1a) + (p+ : (x y : A ) f (x A.+ y) f x B.+ f y) + ( : (x y : A ) f (x A.· y) f x B.· f y) + (p⋆ : (r : R ) (x : A ) f (r A.⋆ x) r B.⋆ f x) + where + + open IsAlgebraHom + private + isGHom : IsGroupHom (Algebra→Group A .snd) f (Algebra→Group B .snd) + isGHom = makeIsGroupHom p+ + + makeIsAlgebraHom : IsAlgebraHom (A .snd) f (B .snd) + makeIsAlgebraHom .pres0 = isGHom .IsGroupHom.pres1 + makeIsAlgebraHom .pres1 = p1 + makeIsAlgebraHom .pres+ = p+ + makeIsAlgebraHom .pres· = + makeIsAlgebraHom .pres- = isGHom .IsGroupHom.presinv + makeIsAlgebraHom .pres⋆ = p⋆ \ No newline at end of file diff --git a/Cubical.Algebra.Algebra.Properties.html b/Cubical.Algebra.Algebra.Properties.html index 21e64abf53..4cbf4be798 100644 --- a/Cubical.Algebra.Algebra.Properties.html +++ b/Cubical.Algebra.Algebra.Properties.html @@ -34,82 +34,82 @@ variable ℓ' ℓ'' ℓ''' : Level R : Ring - A B C D : Algebra R + A B C D : Algebra R -module AlgebraTheory (R : Ring ) (A : Algebra R ℓ') where +module AlgebraTheory (R : Ring ) (A : Algebra R ℓ') where open RingStr (snd R) renaming (_+_ to _+r_ ; _·_ to _·r_) - open AlgebraStr (A .snd) + open AlgebraStr (A .snd) - ⋆AnnihilL : (x : A ) 0r x 0a - ⋆AnnihilL = ModuleTheory.⋆AnnihilL R (Algebra→Module A) + ⋆AnnihilL : (x : A ) 0r x 0a + ⋆AnnihilL = ModuleTheory.⋆AnnihilL R (Algebra→Module A) - ⋆AnnihilR : (r : R ) r 0a 0a - ⋆AnnihilR = ModuleTheory.⋆AnnihilR R (Algebra→Module A) + ⋆AnnihilR : (r : R ) r 0a 0a + ⋆AnnihilR = ModuleTheory.⋆AnnihilR R (Algebra→Module A) - ⋆Dist· : (x y : R ) (a b : A ) (x ·r y) (a · b) (x a) · (y b) - ⋆Dist· x y a b = (x ·r y) (a · b) ≡⟨ ⋆AssocR _ _ _ - a · ((x ·r y) b) ≡⟨ cong (a ·_) (⋆Assoc _ _ _) - a · (x (y b)) ≡⟨ sym (⋆AssocR _ _ _) - x (a · (y b)) ≡⟨ sym (⋆AssocL _ _ _) - (x a) · (y b) + ⋆Dist· : (x y : R ) (a b : A ) (x ·r y) (a · b) (x a) · (y b) + ⋆Dist· x y a b = (x ·r y) (a · b) ≡⟨ ⋆AssocR _ _ _ + a · ((x ·r y) b) ≡⟨ cong (a ·_) (⋆Assoc _ _ _) + a · (x (y b)) ≡⟨ sym (⋆AssocR _ _ _) + x (a · (y b)) ≡⟨ sym (⋆AssocL _ _ _) + (x a) · (y b) module AlgebraHoms where - open IsAlgebraHom + open IsAlgebraHom - idAlgebraHom : (A : Algebra R ℓ') AlgebraHom A A + idAlgebraHom : (A : Algebra R ℓ') AlgebraHom A A fst (idAlgebraHom A) x = x - pres0 (snd (idAlgebraHom A)) = refl - pres1 (snd (idAlgebraHom A)) = refl - pres+ (snd (idAlgebraHom A)) x y = refl - pres· (snd (idAlgebraHom A)) x y = refl - pres- (snd (idAlgebraHom A)) x = refl - pres⋆ (snd (idAlgebraHom A)) r x = refl + pres0 (snd (idAlgebraHom A)) = refl + pres1 (snd (idAlgebraHom A)) = refl + pres+ (snd (idAlgebraHom A)) x y = refl + pres· (snd (idAlgebraHom A)) x y = refl + pres- (snd (idAlgebraHom A)) x = refl + pres⋆ (snd (idAlgebraHom A)) r x = refl compIsAlgebraHom : {g : B C } {f : A B } - IsAlgebraHom (B .snd) g (C .snd) - IsAlgebraHom (A .snd) f (B .snd) - IsAlgebraHom (A .snd) (g f) (C .snd) - compIsAlgebraHom {g = g} {f} gh fh .pres0 = cong g (fh .pres0) gh .pres0 - compIsAlgebraHom {g = g} {f} gh fh .pres1 = cong g (fh .pres1) gh .pres1 - compIsAlgebraHom {g = g} {f} gh fh .pres+ x y = cong g (fh .pres+ x y) gh .pres+ (f x) (f y) - compIsAlgebraHom {g = g} {f} gh fh .pres· x y = cong g (fh .pres· x y) gh .pres· (f x) (f y) - compIsAlgebraHom {g = g} {f} gh fh .pres- x = cong g (fh .pres- x) gh .pres- (f x) - compIsAlgebraHom {g = g} {f} gh fh .pres⋆ r x = cong g (fh .pres⋆ r x) gh .pres⋆ r (f x) - - _∘≃a_ : AlgebraEquiv B C AlgebraEquiv A B AlgebraEquiv A C + IsAlgebraHom (B .snd) g (C .snd) + IsAlgebraHom (A .snd) f (B .snd) + IsAlgebraHom (A .snd) (g f) (C .snd) + compIsAlgebraHom {g = g} {f} gh fh .pres0 = cong g (fh .pres0) gh .pres0 + compIsAlgebraHom {g = g} {f} gh fh .pres1 = cong g (fh .pres1) gh .pres1 + compIsAlgebraHom {g = g} {f} gh fh .pres+ x y = cong g (fh .pres+ x y) gh .pres+ (f x) (f y) + compIsAlgebraHom {g = g} {f} gh fh .pres· x y = cong g (fh .pres· x y) gh .pres· (f x) (f y) + compIsAlgebraHom {g = g} {f} gh fh .pres- x = cong g (fh .pres- x) gh .pres- (f x) + compIsAlgebraHom {g = g} {f} gh fh .pres⋆ r x = cong g (fh .pres⋆ r x) gh .pres⋆ r (f x) + + _∘≃a_ : AlgebraEquiv B C AlgebraEquiv A B AlgebraEquiv A C _∘≃a_ g f .fst = compEquiv (fst f) (fst g) _∘≃a_ g f .snd = compIsAlgebraHom (g .snd) (f .snd) - compAlgebraHom : AlgebraHom A B AlgebraHom B C AlgebraHom A C + compAlgebraHom : AlgebraHom A B AlgebraHom B C AlgebraHom A C compAlgebraHom f g .fst = g .fst f .fst compAlgebraHom f g .snd = compIsAlgebraHom (g .snd) (f .snd) syntax compAlgebraHom f g = g ∘a f - compIdAlgebraHom : (φ : AlgebraHom A B) compAlgebraHom (idAlgebraHom A) φ φ - compIdAlgebraHom φ = AlgebraHom≡ refl + compIdAlgebraHom : (φ : AlgebraHom A B) compAlgebraHom (idAlgebraHom A) φ φ + compIdAlgebraHom φ = AlgebraHom≡ refl - idCompAlgebraHom :(φ : AlgebraHom A B) compAlgebraHom φ (idAlgebraHom B) φ - idCompAlgebraHom φ = AlgebraHom≡ refl + idCompAlgebraHom :(φ : AlgebraHom A B) compAlgebraHom φ (idAlgebraHom B) φ + idCompAlgebraHom φ = AlgebraHom≡ refl - compAssocAlgebraHom : (φ : AlgebraHom A B) (ψ : AlgebraHom B C) (χ : AlgebraHom C D) + compAssocAlgebraHom : (φ : AlgebraHom A B) (ψ : AlgebraHom B C) (χ : AlgebraHom C D) compAlgebraHom (compAlgebraHom φ ψ) χ compAlgebraHom φ (compAlgebraHom ψ χ) - compAssocAlgebraHom _ _ _ = AlgebraHom≡ refl + compAssocAlgebraHom _ _ _ = AlgebraHom≡ refl module AlgebraEquivs where - open IsAlgebraHom + open IsAlgebraHom open AlgebraHoms module _ where - invAlgebraEquiv : AlgebraEquiv A B AlgebraEquiv B A + invAlgebraEquiv : AlgebraEquiv A B AlgebraEquiv B A (invAlgebraEquiv f').fst = invEquiv (fst f') (invAlgebraEquiv {A = A} {B = B} f').snd = hom where - open AlgebraStr {{...}} + open AlgebraStr {{...}} private instance _ = snd A _ = snd B @@ -121,95 +121,95 @@ f∘f⁻¹≡id : (y : _) f (f⁻¹ y) y f∘f⁻¹≡id = snd (isEquiv→hasSection (snd (fst f'))) - hom : IsAlgebraHom (B .snd) f⁻¹ (A .snd) - pres0 hom = - f⁻¹ 0a ≡⟨ sym (cong f⁻¹ (snd f' .pres0)) - f⁻¹ (f 0a) ≡⟨ f⁻¹∘f≡id 0a - 0a - pres1 hom = - f⁻¹ 1a ≡⟨ sym (cong f⁻¹ (snd f' .pres1)) - f⁻¹ (f 1a) ≡⟨ f⁻¹∘f≡id 1a - 1a - pres+ hom x y = - f⁻¹ (x + y) ≡[ i ]⟨ f⁻¹ ((f∘f⁻¹≡id x (~ i)) + (f∘f⁻¹≡id y (~ i))) - f⁻¹ (f (f⁻¹ x) + f (f⁻¹ y)) ≡⟨ sym (cong f⁻¹ (snd f' .pres+ _ _)) - f⁻¹ (f (f⁻¹ x + f⁻¹ y)) ≡⟨ f⁻¹∘f≡id _ - f⁻¹ x + f⁻¹ y - pres· hom x y = - f⁻¹ (x · y) ≡[ i ]⟨ f⁻¹ ((f∘f⁻¹≡id x (~ i)) · (f∘f⁻¹≡id y (~ i))) - f⁻¹ (f (f⁻¹ x) · f (f⁻¹ y)) ≡⟨ sym (cong f⁻¹ (snd f' .pres· _ _)) - f⁻¹ (f (f⁻¹ x · f⁻¹ y)) ≡⟨ f⁻¹∘f≡id _ - f⁻¹ x · f⁻¹ y - pres- hom x = - f⁻¹ (- x) ≡⟨ sym (cong u f⁻¹ (- u)) (f∘f⁻¹≡id _)) - f⁻¹ (- f (f⁻¹ x)) ≡⟨ sym (cong f⁻¹ (snd f' .pres- (f⁻¹ x)) ) - f⁻¹ (f (- f⁻¹ x)) ≡⟨ f⁻¹∘f≡id _ - (- f⁻¹ x) - pres⋆ hom r x = - f⁻¹ (r x) ≡⟨ cong u f⁻¹ (r u)) (sym (f∘f⁻¹≡id _)) - f⁻¹ (r f (f⁻¹ x)) ≡⟨ sym (cong f⁻¹ (snd f' .pres⋆ r (f⁻¹ x))) - f⁻¹ (f (r (f⁻¹ x))) ≡⟨ f⁻¹∘f≡id _ - r (f⁻¹ x) + hom : IsAlgebraHom (B .snd) f⁻¹ (A .snd) + pres0 hom = + f⁻¹ 0a ≡⟨ sym (cong f⁻¹ (snd f' .pres0)) + f⁻¹ (f 0a) ≡⟨ f⁻¹∘f≡id 0a + 0a + pres1 hom = + f⁻¹ 1a ≡⟨ sym (cong f⁻¹ (snd f' .pres1)) + f⁻¹ (f 1a) ≡⟨ f⁻¹∘f≡id 1a + 1a + pres+ hom x y = + f⁻¹ (x + y) ≡[ i ]⟨ f⁻¹ ((f∘f⁻¹≡id x (~ i)) + (f∘f⁻¹≡id y (~ i))) + f⁻¹ (f (f⁻¹ x) + f (f⁻¹ y)) ≡⟨ sym (cong f⁻¹ (snd f' .pres+ _ _)) + f⁻¹ (f (f⁻¹ x + f⁻¹ y)) ≡⟨ f⁻¹∘f≡id _ + f⁻¹ x + f⁻¹ y + pres· hom x y = + f⁻¹ (x · y) ≡[ i ]⟨ f⁻¹ ((f∘f⁻¹≡id x (~ i)) · (f∘f⁻¹≡id y (~ i))) + f⁻¹ (f (f⁻¹ x) · f (f⁻¹ y)) ≡⟨ sym (cong f⁻¹ (snd f' .pres· _ _)) + f⁻¹ (f (f⁻¹ x · f⁻¹ y)) ≡⟨ f⁻¹∘f≡id _ + f⁻¹ x · f⁻¹ y + pres- hom x = + f⁻¹ (- x) ≡⟨ sym (cong u f⁻¹ (- u)) (f∘f⁻¹≡id _)) + f⁻¹ (- f (f⁻¹ x)) ≡⟨ sym (cong f⁻¹ (snd f' .pres- (f⁻¹ x)) ) + f⁻¹ (f (- f⁻¹ x)) ≡⟨ f⁻¹∘f≡id _ + (- f⁻¹ x) + pres⋆ hom r x = + f⁻¹ (r x) ≡⟨ cong u f⁻¹ (r u)) (sym (f∘f⁻¹≡id _)) + f⁻¹ (r f (f⁻¹ x)) ≡⟨ sym (cong f⁻¹ (snd f' .pres⋆ r (f⁻¹ x))) + f⁻¹ (f (r (f⁻¹ x))) ≡⟨ f⁻¹∘f≡id _ + r (f⁻¹ x) compIsAlgebraEquiv : {g : B C } {f : A B } - IsAlgebraEquiv (B .snd) g (C .snd) - IsAlgebraEquiv (A .snd) f (B .snd) - IsAlgebraEquiv (A .snd) (compEquiv f g) (C .snd) + IsAlgebraEquiv (B .snd) g (C .snd) + IsAlgebraEquiv (A .snd) f (B .snd) + IsAlgebraEquiv (A .snd) (compEquiv f g) (C .snd) compIsAlgebraEquiv {g = g} {f} gh fh = compIsAlgebraHom {g = g .fst} {f .fst} gh fh - compAlgebraEquiv : AlgebraEquiv A B AlgebraEquiv B C AlgebraEquiv A C + compAlgebraEquiv : AlgebraEquiv A B AlgebraEquiv B C AlgebraEquiv A C fst (compAlgebraEquiv f g) = compEquiv (f .fst) (g .fst) snd (compAlgebraEquiv f g) = compIsAlgebraEquiv {g = g .fst} {f = f .fst} (g .snd) (f .snd) preCompAlgEquiv : - AlgebraEquiv A B AlgebraHom B C AlgebraHom A C - (preCompAlgEquiv f).fst g = g ∘a (AlgebraEquiv→AlgebraHom f) + AlgebraEquiv A B AlgebraHom B C AlgebraHom A C + (preCompAlgEquiv f).fst g = g ∘a (AlgebraEquiv→AlgebraHom f) (preCompAlgEquiv {A = A} {B = B} {C = C} f).snd = snd (isoToEquiv isoOnHoms) where isoOnTypes : Iso (fst B fst C) (fst A fst C) isoOnTypes = equivToIso (_ , (snd (preCompEquiv (fst f)))) - f⁻¹ : AlgebraEquiv B A + f⁻¹ : AlgebraEquiv B A f⁻¹ = invAlgebraEquiv f - isoOnHoms : Iso (AlgebraHom B C) (AlgebraHom A C) - fun isoOnHoms g = g ∘a AlgebraEquiv→AlgebraHom f - inv isoOnHoms h = h ∘a AlgebraEquiv→AlgebraHom f⁻¹ + 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 = Σ≡Prop - h isPropIsAlgebraHom _ (A .snd) h (C .snd)) + h isPropIsAlgebraHom _ (A .snd) h (C .snd)) (isoOnTypes .rightInv (h .fst)) leftInv isoOnHoms g = Σ≡Prop - g isPropIsAlgebraHom _ (B .snd) g (C .snd)) + g isPropIsAlgebraHom _ (B .snd) g (C .snd)) (isoOnTypes .leftInv (g .fst)) -- the Algebra version of uaCompEquiv module AlgebraUAFunctoriality where - open AlgebraStr + open AlgebraStr open AlgebraEquivs - Algebra≡ : (A B : Algebra R ℓ') ( + Algebra≡ : (A B : Algebra R ℓ') ( Σ[ p A B ] - Σ[ q0 PathP i p i) (0a (snd A)) (0a (snd B)) ] - Σ[ q1 PathP i p i) (1a (snd A)) (1a (snd B)) ] - Σ[ r+ PathP i p i p i p i) (_+_ (snd A)) (_+_ (snd B)) ] - Σ[ PathP i p i p i p i) (_·_ (snd A)) (_·_ (snd B)) ] - Σ[ s- PathP i p i p i) (-_ (snd A)) (-_ (snd B)) ] - Σ[ s⋆ PathP i R p i p i) (_⋆_ (snd A)) (_⋆_ (snd B)) ] - PathP i IsAlgebra R (q0 i) (q1 i) (r+ i) ( i) (s- i) (s⋆ i)) (isAlgebra (snd A)) - (isAlgebra (snd B))) + Σ[ q0 PathP i p i) (0a (snd A)) (0a (snd B)) ] + Σ[ q1 PathP i p i) (1a (snd A)) (1a (snd B)) ] + Σ[ r+ PathP i p i p i p i) (_+_ (snd A)) (_+_ (snd B)) ] + Σ[ PathP i p i p i p i) (_·_ (snd A)) (_·_ (snd B)) ] + Σ[ s- PathP i p i p i) (-_ (snd A)) (-_ (snd B)) ] + Σ[ s⋆ PathP i R p i p i) (_⋆_ (snd A)) (_⋆_ (snd B)) ] + PathP i IsAlgebra R (q0 i) (q1 i) (r+ i) ( i) (s- i) (s⋆ i)) (isAlgebra (snd A)) + (isAlgebra (snd B))) (A B) Algebra≡ A B = isoToEquiv theIso where open Iso theIso : Iso _ _ fun theIso (p , q0 , q1 , r+ , , s- , s⋆ , t) i = p i - , algebrastr (q0 i) (q1 i) (r+ i) ( i) (s- i) (s⋆ i) (t i) - inv theIso x = cong ⟨_⟩ x , cong (0a snd) x , cong (1a snd) x - , cong (_+_ snd) x , cong (_·_ snd) x , cong (-_ snd) x , cong (_⋆_ snd) x - , cong (isAlgebra snd) x + , algebrastr (q0 i) (q1 i) (r+ i) ( i) (s- i) (s⋆ i) (t i) + inv theIso x = cong ⟨_⟩ x , cong (0a snd) x , cong (1a snd) x + , cong (_+_ snd) x , cong (_·_ snd) x , cong (-_ snd) x , cong (_⋆_ snd) x + , cong (isAlgebra snd) x rightInv theIso _ = refl leftInv theIso _ = refl @@ -222,21 +222,21 @@ helper : transport (sym (ua (Algebra≡ A B))) p transport (sym (ua (Algebra≡ A B))) q helper = Σ≡Prop _ isPropΣ - (isOfHLevelPathP' 1 (is-set (snd B)) _ _) - λ _ isPropΣ (isOfHLevelPathP' 1 (is-set (snd B)) _ _) - λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) - λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) - λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ λ _ is-set (snd B)) _ _) - λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) - λ _ isOfHLevelPathP 1 (isPropIsAlgebra _ _ _ _ _ _ _) _ _) + (isOfHLevelPathP' 1 (is-set (snd B)) _ _) + λ _ isPropΣ (isOfHLevelPathP' 1 (is-set (snd B)) _ _) + λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) + λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) + λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ λ _ is-set (snd B)) _ _) + λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) + λ _ isOfHLevelPathP 1 (isPropIsAlgebra _ _ _ _ _ _ _) _ _) (transportRefl (cong ⟨_⟩ p) P sym (transportRefl (cong ⟨_⟩ q))) - uaCompAlgebraEquiv : (f : AlgebraEquiv A B) (g : AlgebraEquiv B C) - uaAlgebra (compAlgebraEquiv f g) uaAlgebra f uaAlgebra g + uaCompAlgebraEquiv : (f : AlgebraEquiv A B) (g : AlgebraEquiv B C) + uaAlgebra (compAlgebraEquiv f g) uaAlgebra f uaAlgebra g uaCompAlgebraEquiv f g = caracAlgebra≡ _ _ ( - cong ⟨_⟩ (uaAlgebra (compAlgebraEquiv f g)) + cong ⟨_⟩ (uaAlgebra (compAlgebraEquiv f g)) ≡⟨ uaCompEquiv _ _ - cong ⟨_⟩ (uaAlgebra f) cong ⟨_⟩ (uaAlgebra g) - ≡⟨ sym (cong-∙ ⟨_⟩ (uaAlgebra f) (uaAlgebra g)) - cong ⟨_⟩ (uaAlgebra f uaAlgebra g) ) + cong ⟨_⟩ (uaAlgebra f) cong ⟨_⟩ (uaAlgebra g) + ≡⟨ sym (cong-∙ ⟨_⟩ (uaAlgebra f) (uaAlgebra g)) + cong ⟨_⟩ (uaAlgebra f uaAlgebra g) ) \ No newline at end of file diff --git a/Cubical.Algebra.Algebra.Subalgebra.html b/Cubical.Algebra.Algebra.Subalgebra.html index 796ff57676..9c577c4c31 100644 --- a/Cubical.Algebra.Algebra.Subalgebra.html +++ b/Cubical.Algebra.Algebra.Subalgebra.html @@ -15,15 +15,15 @@ module Cubical.Algebra.Algebra.Subalgebra { ℓ' : Level} - (R : Ring ) (A : Algebra R ℓ') + (R : Ring ) (A : Algebra R ℓ') where -open AlgebraStr (str A) +open AlgebraStr (str A) record isSubalgebra (S : A ) : Type (ℓ-max ℓ') where field - submodule : isSubmodule R (Algebra→Module A) S - submonoid : isSubmonoid (Algebra→MultMonoid A) S + submodule : isSubmodule R (Algebra→Module A) S + submonoid : isSubmonoid (Algebra→MultMonoid A) S open isSubmodule submodule public renaming ( 0r-closed to 0a-closed ) open isSubmonoid submonoid public @@ -31,11 +31,11 @@ module _ (S : A ) - (+-closed : {x y : A } x S y S x + y S) - (0a-closed : 0a S) - (⋆-closed : {x : A } (r : R ) x S r x S) - (1a-closed : 1a S) - (·-closed : {x y : A } (x S) (y S) (x · y) S) + (+-closed : {x y : A } x S y S x + y S) + (0a-closed : 0a S) + (⋆-closed : {x : A } (r : R ) x S r x S) + (1a-closed : 1a S) + (·-closed : {x y : A } (x S) (y S) (x · y) S) where private module sAlg = isSubalgebra @@ -54,22 +54,22 @@ module _ ((S , isSubalgebra) : Subalgebra) where open isSubalgebra isSubalgebra - private module algStr = AlgebraStr + private module algStr = AlgebraStr Subalgebra→Algebra≡ : {x y : Σ[ a A ] a S} fst x fst y x y Subalgebra→Algebra≡ eq = Σ≡Prop (∈-isProp S) eq - Subalgebra→Algebra : Algebra R ℓ' + Subalgebra→Algebra : Algebra R ℓ' Subalgebra→Algebra .fst = Σ[ a A ] a S - Subalgebra→Algebra .snd .algStr.0a = 0a , 0a-closed - Subalgebra→Algebra .snd .algStr.1a = 1a , 1a-closed - Subalgebra→Algebra .snd .algStr._+_ (a , a∈) (b , b∈) = a + b , +-closed a∈ b∈ - Subalgebra→Algebra .snd .algStr._·_ (a , a∈) (b , b∈) = a · b , ·-closed a∈ b∈ - Subalgebra→Algebra .snd .algStr.-_ (a , a∈) = - a , -closed a∈ - Subalgebra→Algebra .snd .algStr._⋆_ r (a , a∈) = r a , ⋆-closed r a∈ - Subalgebra→Algebra .snd .algStr.isAlgebra = + Subalgebra→Algebra .snd .algStr.0a = 0a , 0a-closed + Subalgebra→Algebra .snd .algStr.1a = 1a , 1a-closed + Subalgebra→Algebra .snd .algStr._+_ (a , a∈) (b , b∈) = a + b , +-closed a∈ b∈ + Subalgebra→Algebra .snd .algStr._·_ (a , a∈) (b , b∈) = a · b , ·-closed a∈ b∈ + Subalgebra→Algebra .snd .algStr.-_ (a , a∈) = - a , -closed a∈ + Subalgebra→Algebra .snd .algStr._⋆_ r (a , a∈) = r a , ⋆-closed r a∈ + Subalgebra→Algebra .snd .algStr.isAlgebra = let - isSet-A' = isSetΣSndProp (isSetAlgebra A) (∈-isProp S) + isSet-A' = isSetΣSndProp (isSetAlgebra A) (∈-isProp S) +Assoc' = λ x y z Subalgebra→Algebra≡ (+Assoc (fst x) (fst y) (fst z)) +IdR' = λ x Subalgebra→Algebra≡ (+IdR (fst x)) +InvR' = λ x Subalgebra→Algebra≡ (+InvR (fst x)) @@ -85,11 +85,11 @@ ⋆IdL' = λ x Subalgebra→Algebra≡ (⋆IdL (fst x)) ⋆AssocR' = λ r x y Subalgebra→Algebra≡ (⋆AssocR r (fst x) (fst y)) ⋆AssocL' = λ r x y Subalgebra→Algebra≡ (⋆AssocL r (fst x) (fst y)) - in makeIsAlgebra isSet-A' + in makeIsAlgebra isSet-A' +Assoc' +IdR' +InvR' +Comm' ·Assoc' ·IdR' ·IdL' ·DistR+' ·DistL+' ⋆Assoc' ⋆DistR+' ⋆DistL+' ⋆IdL' ⋆AssocR' ⋆AssocL' - Subalgebra→AlgebraHom : AlgebraHom Subalgebra→Algebra A + Subalgebra→AlgebraHom : AlgebraHom Subalgebra→Algebra A Subalgebra→AlgebraHom = - fst , makeIsAlgebraHom refl x y refl) x y refl) x y refl) + fst , makeIsAlgebraHom refl x y refl) x y refl) x y refl) \ No newline at end of file diff --git a/Cubical.Algebra.CommAlgebra.Base.html b/Cubical.Algebra.CommAlgebra.Base.html index 63f663051a..9c17dc874f 100644 --- a/Cubical.Algebra.CommAlgebra.Base.html +++ b/Cubical.Algebra.CommAlgebra.Base.html @@ -67,11 +67,11 @@ module _ {R : CommRing } where open CommRingStr (snd R) using (1r) renaming (_+_ to _+r_; _·_ to _·s_) - CommAlgebraStr→AlgebraStr : {A : Type ℓ'} CommAlgebraStr R A AlgebraStr (CommRing→Ring R) A + CommAlgebraStr→AlgebraStr : {A : Type ℓ'} CommAlgebraStr R A AlgebraStr (CommRing→Ring R) A CommAlgebraStr→AlgebraStr (commalgebrastr _ _ _ _ _ _ (iscommalgebra isAlgebra ·-comm)) = - algebrastr _ _ _ _ _ _ isAlgebra + algebrastr _ _ _ _ _ _ isAlgebra - CommAlgebra→Algebra : (A : CommAlgebra R ℓ') Algebra (CommRing→Ring R) ℓ' + CommAlgebra→Algebra : (A : CommAlgebra R ℓ') Algebra (CommRing→Ring R) ℓ' CommAlgebra→Algebra (_ , str) = (_ , CommAlgebraStr→AlgebraStr str) CommAlgebra→CommRing : (A : CommAlgebra R ℓ') CommRing ℓ' @@ -79,209 +79,211 @@ _ , commringstr _ _ _ _ _ (iscommring (IsAlgebra.isRing isAlgebra) ·-comm) isSetCommAlgebra : (A : CommAlgebra R ℓ') isSet A - isSetCommAlgebra A = isSetAlgebra (CommAlgebra→Algebra A) - - module _ - {A : Type ℓ'} {0a 1a : A} - {_+_ _·_ : A A A} { -_ : A A} {_⋆_ : R A A} - (isSet-A : isSet A) - (+Assoc : (x y z : A) x + (y + z) (x + y) + z) - (+IdR : (x : A) x + 0a x) - (+InvR : (x : A) x + (- x) 0a) - (+Comm : (x y : A) x + y y + x) - (·Assoc : (x y z : A) x · (y · z) (x · y) · z) - (·IdL : (x : A) 1a · x x) - (·DistL+ : (x y z : A) (x + y) · z (x · z) + (y · z)) - (·Comm : (x y : A) x · y y · x) - (⋆Assoc : (r s : R ) (x : A) (r ·s s) x r (s x)) - (⋆DistR+ : (r : R ) (x y : A) r (x + y) (r x) + (r y)) - (⋆DistL+ : (r s : R ) (x : A) (r +r s) x (r x) + (s x)) - (⋆IdL : (x : A) 1r x x) - (⋆AssocL : (r : R ) (x y : A) (r x) · y r (x · y)) - where - - - makeIsCommAlgebra : IsCommAlgebra R 0a 1a _+_ _·_ -_ _⋆_ - makeIsCommAlgebra .IsCommAlgebra.isAlgebra = makeIsAlgebra - isSet-A - +Assoc +IdR +InvR +Comm - ·Assoc ·IdR ·IdL ·DistR+ ·DistL+ - ⋆Assoc - ⋆DistR+ - ⋆DistL+ - ⋆IdL - ⋆AssocR - ⋆AssocL - where - ·IdR : _ - ·IdR x = x · 1a ≡⟨ ·Comm _ _ 1a · x ≡⟨ ·IdL _ x - ·DistR+ : _ - ·DistR+ x y z = x · (y + z) ≡⟨ ·Comm _ _ - (y + z) · x ≡⟨ ·DistL+ _ _ _ - (y · x) + (z · x) ≡⟨ cong u (y · x) + u) (·Comm _ _) - (y · x) + (x · z) ≡⟨ cong u u + (x · z)) (·Comm _ _) - (x · y) + (x · z) - ⋆AssocR : _ - ⋆AssocR r x y = r (x · y) ≡⟨ cong u r u) (·Comm _ _) - r (y · x) ≡⟨ sym (⋆AssocL _ _ _) - (r y) · x ≡⟨ ·Comm _ _ - x · (r y) - makeIsCommAlgebra .IsCommAlgebra.·Comm = ·Comm - - module _ (S : CommRing ℓ') where - open CommRingStr (snd S) renaming (1r to 1S) - open CommRingStr (snd R) using () renaming (_·_ to _·R_; _+_ to _+R_; 1r to 1R) - - module _ - (_⋆_ : fst R fst S fst S) - (·Assoc⋆ : (r s : fst R) (x : fst S) (r ·R s) x r (s x)) - (⋆DistR+ : (r : fst R) (x y : fst S) r (x + y) (r x) + (r y)) - (⋆DistL+ : (r s : fst R) (x : fst S) (r +R s) x (r x) + (s x)) - (⋆IdL : (x : fst S) 1R x x) - (⋆AssocL : (r : fst R) (x y : fst S) (r x) · y r (x · y)) - where - - commAlgebraFromCommRing : CommAlgebra R ℓ' - commAlgebraFromCommRing .fst = fst S - commAlgebraFromCommRing .snd .CommAlgebraStr.0a = 0r - commAlgebraFromCommRing .snd .CommAlgebraStr.1a = 1S - commAlgebraFromCommRing .snd .CommAlgebraStr._+_ = _+_ - commAlgebraFromCommRing .snd .CommAlgebraStr._·_ = _·_ - commAlgebraFromCommRing .snd .CommAlgebraStr.-_ = -_ - commAlgebraFromCommRing .snd .CommAlgebraStr._⋆_ = _⋆_ - commAlgebraFromCommRing .snd .CommAlgebraStr.isCommAlgebra = - makeIsCommAlgebra is-set +Assoc +IdR +InvR +Comm ·Assoc ·IdL ·DistL+ ·Comm - ·Assoc⋆ ⋆DistR+ ⋆DistL+ ⋆IdL ⋆AssocL - - commAlgebraFromCommRing→CommRing : CommAlgebra→CommRing commAlgebraFromCommRing S - -- Note that this is not definitional: the proofs of the axioms might differ. - commAlgebraFromCommRing→CommRing i .fst = S - commAlgebraFromCommRing→CommRing i .snd .CommRingStr.0r = 0r - commAlgebraFromCommRing→CommRing i .snd .CommRingStr.1r = 1S - commAlgebraFromCommRing→CommRing i .snd .CommRingStr._+_ = _+_ - commAlgebraFromCommRing→CommRing i .snd .CommRingStr._·_ = _·_ - commAlgebraFromCommRing→CommRing i .snd .CommRingStr.-_ = -_ - commAlgebraFromCommRing→CommRing i .snd .CommRingStr.isCommRing = - isProp→PathP i isPropIsCommRing _ _ _ _ _) - (CommRingStr.isCommRing (snd (CommAlgebra→CommRing commAlgebraFromCommRing))) - isCommRing - i - - IsCommAlgebraEquiv : {A : Type ℓ'} {B : Type ℓ''} - (M : CommAlgebraStr R A) (e : A B) (N : CommAlgebraStr R B) - Type _ - IsCommAlgebraEquiv M e N = - IsAlgebraHom (CommAlgebraStr→AlgebraStr M) (e .fst) (CommAlgebraStr→AlgebraStr N) - - CommAlgebraEquiv : (M : CommAlgebra R ℓ') (N : CommAlgebra R ℓ'') Type _ - CommAlgebraEquiv M N = Σ[ e M N ] IsCommAlgebraEquiv (M .snd) e (N .snd) - - IsCommAlgebraHom : {A : Type ℓ'} {B : Type ℓ''} - (M : CommAlgebraStr R A) (f : A B) (N : CommAlgebraStr R B) - Type _ - IsCommAlgebraHom M f N = - IsAlgebraHom (CommAlgebraStr→AlgebraStr M) f (CommAlgebraStr→AlgebraStr N) - - CommAlgebraHom : (M : CommAlgebra R ℓ') (N : CommAlgebra R ℓ'') Type _ - CommAlgebraHom M N = Σ[ f ( M N ) ] IsCommAlgebraHom (M .snd) f (N .snd) - - CommAlgebraEquiv→CommAlgebraHom : {A : CommAlgebra R ℓ'} {B : CommAlgebra R ℓ''} - CommAlgebraEquiv A B CommAlgebraHom A B - CommAlgebraEquiv→CommAlgebraHom (e , eIsHom) = e .fst , eIsHom - - CommAlgebraHom→CommRingHom : (A : CommAlgebra R ℓ') (B : CommAlgebra R ℓ'') - CommAlgebraHom A B - CommRingHom (CommAlgebra→CommRing A) (CommAlgebra→CommRing B) - fst (CommAlgebraHom→CommRingHom A B f) = fst f - IsRingHom.pres0 (snd (CommAlgebraHom→CommRingHom A B f)) = IsAlgebraHom.pres0 (snd f) - IsRingHom.pres1 (snd (CommAlgebraHom→CommRingHom A B f)) = IsAlgebraHom.pres1 (snd f) - IsRingHom.pres+ (snd (CommAlgebraHom→CommRingHom A B f)) = IsAlgebraHom.pres+ (snd f) - IsRingHom.pres· (snd (CommAlgebraHom→CommRingHom A B f)) = IsAlgebraHom.pres· (snd f) - IsRingHom.pres- (snd (CommAlgebraHom→CommRingHom A B f)) = IsAlgebraHom.pres- (snd f) - - module _ {M : CommAlgebra R ℓ'} {N : CommAlgebra R ℓ''} where - open CommAlgebraStr {{...}} - open IsAlgebraHom - private - instance - _ = snd M - _ = snd N - - makeCommAlgebraHom : (f : fst M fst N) - (fPres1 : f 1a 1a) - (fPres+ : (x y : fst M) f (x + y) f x + f y) - (fPres· : (x y : fst M) f (x · y) f x · f y) - (fPres⋆ : (r : fst R) (x : fst M) f (r x) r f x) - CommAlgebraHom M N - makeCommAlgebraHom f fPres1 fPres+ fPres· fPres⋆ = f , isHom - where fPres0 = - f 0a ≡⟨ sym (+IdR _) - f 0a + 0a ≡⟨ cong u f 0a + u) (sym (+InvR (f 0a))) - f 0a + (f 0a - f 0a) ≡⟨ +Assoc (f 0a) (f 0a) (- f 0a) - (f 0a + f 0a) - f 0a ≡⟨ cong u u - f 0a) (sym (fPres+ 0a 0a)) - f (0a + 0a) - f 0a ≡⟨ cong u f u - f 0a) (+IdL 0a) - f 0a - f 0a ≡⟨ +InvR (f 0a) - 0a - - isHom : IsCommAlgebraHom (snd M) f (snd N) - pres0 isHom = fPres0 - pres1 isHom = fPres1 - pres+ isHom = fPres+ - pres· isHom = fPres· - pres- isHom = x - f (- x) ≡⟨ sym (+IdR _) - (f (- x) + 0a) ≡⟨ cong u f (- x) + u) (sym (+InvR (f x))) - (f (- x) + (f x - f x)) ≡⟨ +Assoc _ _ _ - ((f (- x) + f x) - f x) ≡⟨ cong u u - f x) (sym (fPres+ _ _)) - (f ((- x) + x) - f x) ≡⟨ cong u f u - f x) (+InvL x) - (f 0a - f x) ≡⟨ cong u u - f x) fPres0 - (0a - f x) ≡⟨ +IdL _ (- f x) ) - pres⋆ isHom = fPres⋆ - - isPropIsCommAlgebraHom : (f : fst M fst N) isProp (IsCommAlgebraHom (snd M) f (snd N)) - isPropIsCommAlgebraHom f = isPropIsAlgebraHom - (CommRing→Ring R) - (snd (CommAlgebra→Algebra M)) - f - (snd (CommAlgebra→Algebra N)) - -isPropIsCommAlgebra : (R : CommRing ) {A : Type ℓ'} - (0a 1a : A) - (_+_ _·_ : A A A) - (-_ : A A) - (_⋆_ : R A A) - isProp (IsCommAlgebra R 0a 1a _+_ _·_ -_ _⋆_) -isPropIsCommAlgebra R _ _ _ _ _ _ = - isOfHLevelRetractFromIso 1 IsCommAlgebraIsoΣ - (isPropΣ (isPropIsAlgebra _ _ _ _ _ _ _) - alg isPropΠ2 λ _ _ alg .IsAlgebra.is-set _ _)) - -𝒮ᴰ-CommAlgebra : (R : CommRing ) DUARel (𝒮-Univ ℓ') (CommAlgebraStr R) (ℓ-max ℓ') -𝒮ᴰ-CommAlgebra R = - 𝒮ᴰ-Record (𝒮-Univ _) (IsCommAlgebraEquiv {R = R}) - (fields: - data[ 0a nul pres0 ] - data[ 1a nul pres1 ] - data[ _+_ bin pres+ ] - data[ _·_ bin pres· ] - data[ -_ autoDUARel _ _ pres- ] - data[ _⋆_ autoDUARel _ _ pres⋆ ] - prop[ isCommAlgebra _ _ isPropIsCommAlgebra _ _ _ _ _ _ _) ]) - where - open CommAlgebraStr - open IsAlgebraHom - - -- faster with some sharing - nul = autoDUARel (𝒮-Univ _) A A) - bin = autoDUARel (𝒮-Univ _) A A A A) - -CommAlgebraPath : (R : CommRing ) (A B : CommAlgebra R ℓ') (CommAlgebraEquiv A B) (A B) -CommAlgebraPath R = (𝒮ᴰ-CommAlgebra R) .UARel.ua - -uaCommAlgebra : {R : CommRing } {A B : CommAlgebra R ℓ'} CommAlgebraEquiv A B A B -uaCommAlgebra {R = R} {A = A} {B = B} = equivFun (CommAlgebraPath R A B) - -isGroupoidCommAlgebra : {R : CommRing } isGroupoid (CommAlgebra R ℓ') -isGroupoidCommAlgebra A B = isOfHLevelRespectEquiv 2 (CommAlgebraPath _ _ _) (isSetAlgebraEquiv _ _) --- -} + isSetCommAlgebra A = is-set + where + open CommAlgebraStr (str A) + + module _ + {A : Type ℓ'} {0a 1a : A} + {_+_ _·_ : A A A} { -_ : A A} {_⋆_ : R A A} + (isSet-A : isSet A) + (+Assoc : (x y z : A) x + (y + z) (x + y) + z) + (+IdR : (x : A) x + 0a x) + (+InvR : (x : A) x + (- x) 0a) + (+Comm : (x y : A) x + y y + x) + (·Assoc : (x y z : A) x · (y · z) (x · y) · z) + (·IdL : (x : A) 1a · x x) + (·DistL+ : (x y z : A) (x + y) · z (x · z) + (y · z)) + (·Comm : (x y : A) x · y y · x) + (⋆Assoc : (r s : R ) (x : A) (r ·s s) x r (s x)) + (⋆DistR+ : (r : R ) (x y : A) r (x + y) (r x) + (r y)) + (⋆DistL+ : (r s : R ) (x : A) (r +r s) x (r x) + (s x)) + (⋆IdL : (x : A) 1r x x) + (⋆AssocL : (r : R ) (x y : A) (r x) · y r (x · y)) + where + + + makeIsCommAlgebra : IsCommAlgebra R 0a 1a _+_ _·_ -_ _⋆_ + makeIsCommAlgebra .IsCommAlgebra.isAlgebra = makeIsAlgebra + isSet-A + +Assoc +IdR +InvR +Comm + ·Assoc ·IdR ·IdL ·DistR+ ·DistL+ + ⋆Assoc + ⋆DistR+ + ⋆DistL+ + ⋆IdL + ⋆AssocR + ⋆AssocL + where + ·IdR : _ + ·IdR x = x · 1a ≡⟨ ·Comm _ _ 1a · x ≡⟨ ·IdL _ x + ·DistR+ : _ + ·DistR+ x y z = x · (y + z) ≡⟨ ·Comm _ _ + (y + z) · x ≡⟨ ·DistL+ _ _ _ + (y · x) + (z · x) ≡⟨ cong u (y · x) + u) (·Comm _ _) + (y · x) + (x · z) ≡⟨ cong u u + (x · z)) (·Comm _ _) + (x · y) + (x · z) + ⋆AssocR : _ + ⋆AssocR r x y = r (x · y) ≡⟨ cong u r u) (·Comm _ _) + r (y · x) ≡⟨ sym (⋆AssocL _ _ _) + (r y) · x ≡⟨ ·Comm _ _ + x · (r y) + makeIsCommAlgebra .IsCommAlgebra.·Comm = ·Comm + + module _ (S : CommRing ℓ') where + open CommRingStr (snd S) renaming (1r to 1S) + open CommRingStr (snd R) using () renaming (_·_ to _·R_; _+_ to _+R_; 1r to 1R) + + module _ + (_⋆_ : fst R fst S fst S) + (·Assoc⋆ : (r s : fst R) (x : fst S) (r ·R s) x r (s x)) + (⋆DistR+ : (r : fst R) (x y : fst S) r (x + y) (r x) + (r y)) + (⋆DistL+ : (r s : fst R) (x : fst S) (r +R s) x (r x) + (s x)) + (⋆IdL : (x : fst S) 1R x x) + (⋆AssocL : (r : fst R) (x y : fst S) (r x) · y r (x · y)) + where + + commAlgebraFromCommRing : CommAlgebra R ℓ' + commAlgebraFromCommRing .fst = fst S + commAlgebraFromCommRing .snd .CommAlgebraStr.0a = 0r + commAlgebraFromCommRing .snd .CommAlgebraStr.1a = 1S + commAlgebraFromCommRing .snd .CommAlgebraStr._+_ = _+_ + commAlgebraFromCommRing .snd .CommAlgebraStr._·_ = _·_ + commAlgebraFromCommRing .snd .CommAlgebraStr.-_ = -_ + commAlgebraFromCommRing .snd .CommAlgebraStr._⋆_ = _⋆_ + commAlgebraFromCommRing .snd .CommAlgebraStr.isCommAlgebra = + makeIsCommAlgebra is-set +Assoc +IdR +InvR +Comm ·Assoc ·IdL ·DistL+ ·Comm + ·Assoc⋆ ⋆DistR+ ⋆DistL+ ⋆IdL ⋆AssocL + + commAlgebraFromCommRing→CommRing : CommAlgebra→CommRing commAlgebraFromCommRing S + -- Note that this is not definitional: the proofs of the axioms might differ. + commAlgebraFromCommRing→CommRing i .fst = S + commAlgebraFromCommRing→CommRing i .snd .CommRingStr.0r = 0r + commAlgebraFromCommRing→CommRing i .snd .CommRingStr.1r = 1S + commAlgebraFromCommRing→CommRing i .snd .CommRingStr._+_ = _+_ + commAlgebraFromCommRing→CommRing i .snd .CommRingStr._·_ = _·_ + commAlgebraFromCommRing→CommRing i .snd .CommRingStr.-_ = -_ + commAlgebraFromCommRing→CommRing i .snd .CommRingStr.isCommRing = + isProp→PathP i isPropIsCommRing _ _ _ _ _) + (CommRingStr.isCommRing (snd (CommAlgebra→CommRing commAlgebraFromCommRing))) + isCommRing + i + + IsCommAlgebraEquiv : {A : Type ℓ'} {B : Type ℓ''} + (M : CommAlgebraStr R A) (e : A B) (N : CommAlgebraStr R B) + Type _ + IsCommAlgebraEquiv M e N = + IsAlgebraHom (CommAlgebraStr→AlgebraStr M) (e .fst) (CommAlgebraStr→AlgebraStr N) + + CommAlgebraEquiv : (M : CommAlgebra R ℓ') (N : CommAlgebra R ℓ'') Type _ + CommAlgebraEquiv M N = Σ[ e M N ] IsCommAlgebraEquiv (M .snd) e (N .snd) + + IsCommAlgebraHom : {A : Type ℓ'} {B : Type ℓ''} + (M : CommAlgebraStr R A) (f : A B) (N : CommAlgebraStr R B) + Type _ + IsCommAlgebraHom M f N = + IsAlgebraHom (CommAlgebraStr→AlgebraStr M) f (CommAlgebraStr→AlgebraStr N) + + CommAlgebraHom : (M : CommAlgebra R ℓ') (N : CommAlgebra R ℓ'') Type _ + CommAlgebraHom M N = Σ[ f ( M N ) ] IsCommAlgebraHom (M .snd) f (N .snd) + + CommAlgebraEquiv→CommAlgebraHom : {A : CommAlgebra R ℓ'} {B : CommAlgebra R ℓ''} + CommAlgebraEquiv A B CommAlgebraHom A B + CommAlgebraEquiv→CommAlgebraHom (e , eIsHom) = e .fst , eIsHom + + CommAlgebraHom→CommRingHom : (A : CommAlgebra R ℓ') (B : CommAlgebra R ℓ'') + CommAlgebraHom A B + CommRingHom (CommAlgebra→CommRing A) (CommAlgebra→CommRing B) + fst (CommAlgebraHom→CommRingHom A B f) = fst f + IsRingHom.pres0 (snd (CommAlgebraHom→CommRingHom A B f)) = IsAlgebraHom.pres0 (snd f) + IsRingHom.pres1 (snd (CommAlgebraHom→CommRingHom A B f)) = IsAlgebraHom.pres1 (snd f) + IsRingHom.pres+ (snd (CommAlgebraHom→CommRingHom A B f)) = IsAlgebraHom.pres+ (snd f) + IsRingHom.pres· (snd (CommAlgebraHom→CommRingHom A B f)) = IsAlgebraHom.pres· (snd f) + IsRingHom.pres- (snd (CommAlgebraHom→CommRingHom A B f)) = IsAlgebraHom.pres- (snd f) + + module _ {M : CommAlgebra R ℓ'} {N : CommAlgebra R ℓ''} where + open CommAlgebraStr {{...}} + open IsAlgebraHom + private + instance + _ = snd M + _ = snd N + + makeCommAlgebraHom : (f : fst M fst N) + (fPres1 : f 1a 1a) + (fPres+ : (x y : fst M) f (x + y) f x + f y) + (fPres· : (x y : fst M) f (x · y) f x · f y) + (fPres⋆ : (r : fst R) (x : fst M) f (r x) r f x) + CommAlgebraHom M N + makeCommAlgebraHom f fPres1 fPres+ fPres· fPres⋆ = f , isHom + where fPres0 = + f 0a ≡⟨ sym (+IdR _) + f 0a + 0a ≡⟨ cong u f 0a + u) (sym (+InvR (f 0a))) + f 0a + (f 0a - f 0a) ≡⟨ +Assoc (f 0a) (f 0a) (- f 0a) + (f 0a + f 0a) - f 0a ≡⟨ cong u u - f 0a) (sym (fPres+ 0a 0a)) + f (0a + 0a) - f 0a ≡⟨ cong u f u - f 0a) (+IdL 0a) + f 0a - f 0a ≡⟨ +InvR (f 0a) + 0a + + isHom : IsCommAlgebraHom (snd M) f (snd N) + pres0 isHom = fPres0 + pres1 isHom = fPres1 + pres+ isHom = fPres+ + pres· isHom = fPres· + pres- isHom = x + f (- x) ≡⟨ sym (+IdR _) + (f (- x) + 0a) ≡⟨ cong u f (- x) + u) (sym (+InvR (f x))) + (f (- x) + (f x - f x)) ≡⟨ +Assoc _ _ _ + ((f (- x) + f x) - f x) ≡⟨ cong u u - f x) (sym (fPres+ _ _)) + (f ((- x) + x) - f x) ≡⟨ cong u f u - f x) (+InvL x) + (f 0a - f x) ≡⟨ cong u u - f x) fPres0 + (0a - f x) ≡⟨ +IdL _ (- f x) ) + pres⋆ isHom = fPres⋆ + + isPropIsCommAlgebraHom : (f : fst M fst N) isProp (IsCommAlgebraHom (snd M) f (snd N)) + isPropIsCommAlgebraHom f = isPropIsAlgebraHom + (CommRing→Ring R) + (snd (CommAlgebra→Algebra M)) + f + (snd (CommAlgebra→Algebra N)) + +isPropIsCommAlgebra : (R : CommRing ) {A : Type ℓ'} + (0a 1a : A) + (_+_ _·_ : A A A) + (-_ : A A) + (_⋆_ : R A A) + isProp (IsCommAlgebra R 0a 1a _+_ _·_ -_ _⋆_) +isPropIsCommAlgebra R _ _ _ _ _ _ = + isOfHLevelRetractFromIso 1 IsCommAlgebraIsoΣ + (isPropΣ (isPropIsAlgebra _ _ _ _ _ _ _) + alg isPropΠ2 λ _ _ alg .IsAlgebra.is-set _ _)) + +𝒮ᴰ-CommAlgebra : (R : CommRing ) DUARel (𝒮-Univ ℓ') (CommAlgebraStr R) (ℓ-max ℓ') +𝒮ᴰ-CommAlgebra R = + 𝒮ᴰ-Record (𝒮-Univ _) (IsCommAlgebraEquiv {R = R}) + (fields: + data[ 0a nul pres0 ] + data[ 1a nul pres1 ] + data[ _+_ bin pres+ ] + data[ _·_ bin pres· ] + data[ -_ autoDUARel _ _ pres- ] + data[ _⋆_ autoDUARel _ _ pres⋆ ] + prop[ isCommAlgebra _ _ isPropIsCommAlgebra _ _ _ _ _ _ _) ]) + where + open CommAlgebraStr + open IsAlgebraHom + + -- faster with some sharing + nul = autoDUARel (𝒮-Univ _) A A) + bin = autoDUARel (𝒮-Univ _) A A A A) + +CommAlgebraPath : (R : CommRing ) (A B : CommAlgebra R ℓ') (CommAlgebraEquiv A B) (A B) +CommAlgebraPath R = (𝒮ᴰ-CommAlgebra R) .UARel.ua + +uaCommAlgebra : {R : CommRing } {A B : CommAlgebra R ℓ'} CommAlgebraEquiv A B A B +uaCommAlgebra {R = R} {A = A} {B = B} = equivFun (CommAlgebraPath R A B) + +isGroupoidCommAlgebra : {R : CommRing } isGroupoid (CommAlgebra R ℓ') +isGroupoidCommAlgebra A B = isOfHLevelRespectEquiv 2 (CommAlgebraPath _ _ _) (isSetAlgebraEquiv _ _) +-- -} \ No newline at end of file diff --git a/Cubical.Algebra.CommAlgebra.FPAlgebra.Base.html b/Cubical.Algebra.CommAlgebra.FPAlgebra.Base.html index 6a0e8434bc..6698b68a48 100644 --- a/Cubical.Algebra.CommAlgebra.FPAlgebra.Base.html +++ b/Cubical.Algebra.CommAlgebra.FPAlgebra.Base.html @@ -46,7 +46,7 @@ evPolyPoly : {n : } (P : Polynomials n ) evPoly (Polynomials n) P var P evPolyPoly {n = n} P = cong u fst u P) (inducedHomVar R (Fin n)) - evPolyHomomorphic : {n : } (A B : CommAlgebra R ) (f : CommAlgebraHom A B) + evPolyHomomorphic : {n : } (A B : CommAlgebra R ) (f : CommAlgebraHom A B) (P : Polynomials n ) (values : FinVec A n) (fst f) (evPoly A P values) evPoly B P (fst f values) evPolyHomomorphic A B f P values = @@ -72,7 +72,7 @@ FPAlgebra : CommAlgebra R FPAlgebra = Polynomials n / relationsIdeal - modRelations : CommAlgebraHom (Polynomials n) (Polynomials n / relationsIdeal) + modRelations : CommAlgebraHom (Polynomials n) (Polynomials n / relationsIdeal) modRelations = quotientHom (Polynomials n) relationsIdeal generator : (i : Fin n) FPAlgebra @@ -104,7 +104,7 @@ -} private - freeHom : CommAlgebraHom (Polynomials n) A + freeHom : CommAlgebraHom (Polynomials n) A freeHom = freeInducedHom A values isInKernel : fst (generatedIdeal (Polynomials n) relation) @@ -115,7 +115,7 @@ (kernel (Polynomials n) A freeHom) relationsHold - inducedHom : CommAlgebraHom FPAlgebra A + inducedHom : CommAlgebraHom FPAlgebra A inducedHom = quotientInducedHom (Polynomials n) @@ -132,7 +132,7 @@ (inducedHom∘quotientHom (Polynomials n) relationsIdeal A freeHom isInKernel) unique : - (f : CommAlgebraHom FPAlgebra A) + (f : CommAlgebraHom FPAlgebra A) ((i : Fin n) fst f (generator i) values i) inducedHom f unique f hasCorrectValues = @@ -158,7 +158,7 @@ ↓ ↘ FPAlgebra ─f→ A -} - f' iHom' : CommAlgebraHom (Polynomials n) A + f' iHom' : CommAlgebraHom (Polynomials n) A f' = compAlgebraHom modRelations f iHom' = compAlgebraHom modRelations inducedHom @@ -166,7 +166,7 @@ inv = Iso.leftInv (homMapIso {R = R} {I = Fin n} A) universal : - isContr (Σ[ f CommAlgebraHom FPAlgebra A ] ((i : Fin n) fst f (generator i) values i)) + isContr (Σ[ f CommAlgebraHom FPAlgebra A ] ((i : Fin n) fst f (generator i) values i)) universal = (inducedHom , inducedHomOnGenerators) , λ {(f , mapsValues) @@ -182,11 +182,11 @@ zeroLocus A = Σ[ v FinVec A n ] ((i : Fin m) evPoly A (relation i) v 0a (snd A)) inducedHomFP : (A : CommAlgebra R ) - zeroLocus A CommAlgebraHom FPAlgebra A + zeroLocus A CommAlgebraHom FPAlgebra A inducedHomFP A d = inducedHom A (fst d) (snd d) evaluateAtFP : {A : CommAlgebra R } - CommAlgebraHom FPAlgebra A zeroLocus A + CommAlgebraHom FPAlgebra A zeroLocus A evaluateAtFP {A} f = value , λ i evPoly A (relation i) value ≡⟨ step1 (relation i) fst compHom (evPoly (Polynomials n) (relation i) var) ≡⟨ refl @@ -199,10 +199,10 @@ modRelations (relation i) var) (fst f) (evPoly FPAlgebra (relation i) generator) ≡⟨ cong (fst f) (relationsHold i) - (fst f) (0a (snd FPAlgebra)) ≡⟨ IsAlgebraHom.pres0 (snd f) + (fst f) (0a (snd FPAlgebra)) ≡⟨ IsAlgebraHom.pres0 (snd f) 0a (snd A) where - compHom : CommAlgebraHom (Polynomials n) A + compHom : CommAlgebraHom (Polynomials n) A compHom = CommAlgebraHoms.compCommAlgebraHom (Polynomials n) FPAlgebra A modRelations f value : FinVec A n value = (Iso.fun (homMapIso A)) compHom @@ -210,7 +210,7 @@ step1 x = sym (evPolyHomomorphic (Polynomials n) A compHom x var) FPHomIso : {A : CommAlgebra R } - Iso (CommAlgebraHom FPAlgebra A) (zeroLocus A) + Iso (CommAlgebraHom FPAlgebra A) (zeroLocus A) Iso.fun FPHomIso = evaluateAtFP Iso.inv FPHomIso = inducedHomFP _ Iso.rightInv (FPHomIso {A}) = @@ -221,7 +221,7 @@ (0a (snd A)))) (funExt (inducedHomOnGenerators A (fst b) (snd b))) Iso.leftInv (FPHomIso {A}) = - λ a Σ≡Prop f isPropIsCommAlgebraHom {} {R} {} {} {FPAlgebra} {A} f) + λ a Σ≡Prop f isPropIsCommAlgebraHom {} {R} {} {} {FPAlgebra} {A} f) λ i fst (unique A (fst (evaluateAtFP {A} a)) (snd (evaluateAtFP a)) @@ -229,12 +229,12 @@ j refl) i) - homMapPathFP : (A : CommAlgebra R )→ CommAlgebraHom FPAlgebra A zeroLocus A + homMapPathFP : (A : CommAlgebra R )→ CommAlgebraHom FPAlgebra A zeroLocus A homMapPathFP A = isoToPath (FPHomIso {A}) isSetZeroLocus : (A : CommAlgebra R ) isSet (zeroLocus A) isSetZeroLocus A = J y _ isSet y) - (isSetAlgebraHom (CommAlgebra→Algebra FPAlgebra) (CommAlgebra→Algebra A)) + (isSetAlgebraHom (CommAlgebra→Algebra FPAlgebra) (CommAlgebra→Algebra A)) (homMapPathFP A) record FinitePresentation (A : CommAlgebra R ℓ') : Type (ℓ-max ℓ') where @@ -242,7 +242,7 @@ n : m : relations : FinVec Polynomials n m - equiv : CommAlgebraEquiv (FPAlgebra n relations) A + equiv : CommAlgebraEquiv (FPAlgebra n relations) A isFPAlgebra : (A : CommAlgebra R ℓ') Type _ isFPAlgebra A = FinitePresentation A ∥₁ diff --git a/Cubical.Algebra.CommAlgebra.FPAlgebra.Instances.html b/Cubical.Algebra.CommAlgebra.FPAlgebra.Instances.html index 17b4f56774..a1b85e9032 100644 --- a/Cubical.Algebra.CommAlgebra.FPAlgebra.Instances.html +++ b/Cubical.Algebra.CommAlgebra.FPAlgebra.Instances.html @@ -71,9 +71,9 @@ -- Idea: A and B enjoy the same universal property. toAAsEquiv , snd toA where - toA : CommAlgebraHom B A + toA : CommAlgebraHom B A toA = inducedHom n emptyGen A Construction.var ()) - fromA : CommAlgebraHom A B + fromA : CommAlgebraHom A B fromA = freeInducedHom B (generator _ _) open AlgebraHoms inverse1 : fromA ∘a toA idAlgebraHom _ @@ -112,12 +112,12 @@ R[⊥]/⟨0⟩ = FPAlgebra 0 emptyGen R[⊥]/⟨0⟩IsInitial : (B : CommAlgebra R ) - isContr (CommAlgebraHom R[⊥]/⟨0⟩ B) + isContr (CommAlgebraHom R[⊥]/⟨0⟩ B) R[⊥]/⟨0⟩IsInitial B = iHom , uniqueness where - iHom : CommAlgebraHom R[⊥]/⟨0⟩ B + iHom : CommAlgebraHom R[⊥]/⟨0⟩ B iHom = inducedHom 0 emptyGen B ()) ()) - uniqueness : (f : CommAlgebraHom R[⊥]/⟨0⟩ B) + uniqueness : (f : CommAlgebraHom R[⊥]/⟨0⟩ B) iHom f uniqueness f = unique 0 emptyGen B ()) ()) f ()) @@ -167,7 +167,7 @@ _ = snd (initialCAlg R) _ = snd B - πxs≡0 : (i : Fin m) π $a xs i 0a + πxs≡0 : (i : Fin m) π $a xs i 0a πxs≡0 i = isZeroFromIdeal {A = initialCAlg R} {I = ⟨xs⟩} (xs i) (incInIdeal (initialCAlg R) xs i) @@ -178,11 +178,11 @@ FinitePresentation.m R/⟨xs⟩FP = m relations R/⟨xs⟩FP = rels equiv R/⟨xs⟩FP = (isoToEquiv (iso (fst toA) (fst fromA) - a i toFrom i $a a) - λ a i fromTo i $a a)) + a i toFrom i $a a) + λ a i fromTo i $a a)) , (snd toA) where - toA : CommAlgebraHom B R/⟨xs⟩ + toA : CommAlgebraHom B R/⟨xs⟩ toA = inducedHom 0 rels R/⟨xs⟩ ()) relation-holds where vals : FinVec R/⟨xs⟩ 0 @@ -197,10 +197,10 @@ π (rels i) vals') - π $a (evPoly (initialCAlg R) + π $a (evPoly (initialCAlg R) (rels i) - vals') ≡⟨ cong (π $a_) (·IdR (xs i)) - π $a xs i ≡⟨ πxs≡0 i + vals') ≡⟨ cong (π $a_) (·IdR (xs i)) + π $a xs i ≡⟨ πxs≡0 i 0a {- R ─→ R/⟨xs⟩ @@ -208,7 +208,7 @@ R ─→ R[⊥]/⟨rels⟩ -} - fromA : CommAlgebraHom R/⟨xs⟩ B + fromA : CommAlgebraHom R/⟨xs⟩ B fromA = quotientInducedHom (initialCAlg R) diff --git a/Cubical.Algebra.CommAlgebra.FreeCommAlgebra.Base.html b/Cubical.Algebra.CommAlgebra.FreeCommAlgebra.Base.html index 7e1506eae9..7f56a5db20 100644 --- a/Cubical.Algebra.CommAlgebra.FreeCommAlgebra.Base.html +++ b/Cubical.Algebra.CommAlgebra.FreeCommAlgebra.Base.html @@ -86,7 +86,7 @@ 1a = (const 1r) isCommAlgebra : {I : Type ℓ'} IsCommAlgebra R {A = R[ I ]} 0a 1a _+_ _·_ -_ _⋆_ - isCommAlgebra = makeIsCommAlgebra 0-trunc + isCommAlgebra = makeIsCommAlgebra 0-trunc +-assoc +-rid +-rinv +-comm ·-assoc ·-lid ldist ·-comm ⋆-assoc ⋆-rdist-+ ⋆-ldist-+ ·-lid ⋆-assoc-· diff --git a/Cubical.Algebra.CommAlgebra.FreeCommAlgebra.OnCoproduct.html b/Cubical.Algebra.CommAlgebra.FreeCommAlgebra.OnCoproduct.html index 64efbe9b17..c64c1d06cd 100644 --- a/Cubical.Algebra.CommAlgebra.FreeCommAlgebra.OnCoproduct.html +++ b/Cubical.Algebra.CommAlgebra.FreeCommAlgebra.OnCoproduct.html @@ -44,11 +44,11 @@ R[I][J] : CommAlgebra R R[I][J] = baseChange baseRingHom R[I][J]overR[I] - ψOverR : CommAlgebraHom (R [ I ]) (R [ I J ]) + ψOverR : CommAlgebraHom (R [ I ]) (R [ I J ]) ψOverR = inducedHom (R [ I J ]) i var (inl i)) ψ : CommRingHom (CommAlgebra→CommRing (R [ I ])) (CommAlgebra→CommRing (R [ I J ])) - ψ = CommAlgebraHom→CommRingHom (R [ I ]) (R [ I J ]) ψOverR + ψ = CommAlgebraHom→CommRingHom (R [ I ]) (R [ I J ]) ψOverR R[I⊎J]overR[I] : CommAlgebra (CommAlgebra→CommRing (R [ I ])) R[I⊎J]overR[I] = Iso.inv (CommAlgChar.CommAlgIso (CommAlgebra→CommRing (R [ I ]))) @@ -67,7 +67,7 @@ module R[I⊎J]overR[I] = CommAlgebraStr (snd R[I⊎J]overR[I]) module R[I⊎J] = CommAlgebraStr (snd (R [ I J ])) - to : CommAlgebraHom (R [ I J ]) R[I][J] + to : CommAlgebraHom (R [ I J ]) R[I][J] to = inducedHom R[I][J] (⊎.rec i const (var i)) λ j var j) @@ -79,7 +79,7 @@ ≡RingHoms : snd asHomOverR[I] ∘r baseRingHom baseRingHom ≡RingHoms = - RingHom≡ + RingHom≡ (funExt λ x fst (snd asHomOverR[I] ∘r baseRingHom) x ≡⟨⟩ fst (snd asHomOverR[I]) (const x · 1a) ≡⟨⟩ @@ -109,18 +109,18 @@ refl refl ≡⟨ sym (lUnit _) refl - fromOverR[I] : CommAlgebraHom R[I][J]overR[I] R[I⊎J]overR[I] + fromOverR[I] : CommAlgebraHom R[I][J]overR[I] R[I⊎J]overR[I] fromOverR[I] = inducedHom R[I⊎J]overR[I] j var (inr j)) - from' : CommAlgebraHom R[I][J] (baseChange baseRingHom R[I⊎J]overR[I]) + from' : CommAlgebraHom R[I][J] (baseChange baseRingHom R[I⊎J]overR[I]) from' = baseChangeHom {S = R} baseRingHom R[I][J]overR[I] R[I⊎J]overR[I] fromOverR[I] - from : CommAlgebraHom R[I][J] (R [ I J ]) - from = subst (CommAlgebraHom R[I][J]) ≡R[I⊎J] from' + from : CommAlgebraHom R[I][J] (R [ I J ]) + from = subst (CommAlgebraHom R[I][J]) ≡R[I⊎J] from' {- @@ -172,23 +172,23 @@ -} module _ where - open IsAlgebraHom + open IsAlgebraHom private z = to .snd instance _ = snd R[I][J]overR[I] -- _ = snd R[I][J] _ = snd R - toOverR[I] : CommAlgebraHom R[I⊎J]overR[I] R[I][J]overR[I] + toOverR[I] : CommAlgebraHom R[I⊎J]overR[I] R[I][J]overR[I] toOverR[I] .fst = to .fst - (toOverR[I] .snd) .pres0 = z .pres0 - (toOverR[I] .snd) .pres1 = z .pres1 - (toOverR[I] .snd) .pres+ = z .pres+ - (toOverR[I] .snd) .pres· = z .pres· - (toOverR[I] .snd) .pres- = z .pres- - (toOverR[I] .snd) .pres⋆ r x = + (toOverR[I] .snd) .pres0 = z .pres0 + (toOverR[I] .snd) .pres1 = z .pres1 + (toOverR[I] .snd) .pres+ = z .pres+ + (toOverR[I] .snd) .pres· = z .pres· + (toOverR[I] .snd) .pres- = z .pres- + (toOverR[I] .snd) .pres⋆ r x = fst to (r x) ≡⟨⟩ - fst to (fst ψ r · x) ≡⟨ z .pres· (fst ψ r) x + fst to (fst ψ r · x) ≡⟨ z .pres· (fst ψ r) x fst to (fst ψ r) · fst to x ≡⟨ cong ( fst to x) (to∘ψ≡const r) const r · fst to x ≡⟨⟩ (r fst to x) @@ -204,10 +204,10 @@ const is an R-algebra homomorphism -} open Construction using (+HomConst; ·HomConst) - constHom : CommAlgebraHom (R [ I ]) R[I][J] + constHom : CommAlgebraHom (R [ I ]) R[I][J] constHom .fst = const constHom .snd = - makeIsAlgebraHom + makeIsAlgebraHom refl +HomConst ·HomConst @@ -236,7 +236,7 @@ module _ {R : CommRing } {I J : Type } where open CalculateFreeCommAlgebraOnCoproduct R I J - equivFreeCommSum : CommAlgebraEquiv (R [ I J ]) R[I][J] + equivFreeCommSum : CommAlgebraEquiv (R [ I J ]) R[I][J] equivFreeCommSum = (biInvEquiv→Equiv-left asBiInv) , snd to where open BiInvEquiv @@ -247,7 +247,7 @@ invl asBiInv = fst from invl-leftInv asBiInv = fromTo - equivFreeCommSumOverR[I] : CommAlgebraEquiv R[I⊎J]overR[I] R[I][J]overR[I] + equivFreeCommSumOverR[I] : CommAlgebraEquiv R[I⊎J]overR[I] R[I][J]overR[I] equivFreeCommSumOverR[I] = biInvEquiv→Equiv-right asBiInv , snd toOverR[I] where open BiInvEquiv diff --git a/Cubical.Algebra.CommAlgebra.FreeCommAlgebra.Properties.html b/Cubical.Algebra.CommAlgebra.FreeCommAlgebra.Properties.html index bc688a7b9d..5f52f82b70 100644 --- a/Cubical.Algebra.CommAlgebra.FreeCommAlgebra.Properties.html +++ b/Cubical.Algebra.CommAlgebra.FreeCommAlgebra.Properties.html @@ -99,19 +99,19 @@ (s 1a) · (t 1a) in eq i inducedMap (Construction.0-trunc P Q p q i j) = - isSetAlgebra (CommAlgebra→Algebra A) (inducedMap P) (inducedMap Q) (cong _ p) (cong _ q) i j + isSetAlgebra (CommAlgebra→Algebra A) (inducedMap P) (inducedMap Q) (cong _ p) (cong _ q) i j module _ where - open IsAlgebraHom + open IsAlgebraHom - inducedHom : CommAlgebraHom (R [ I ]) A + inducedHom : CommAlgebraHom (R [ I ]) A inducedHom .fst = inducedMap - inducedHom .snd .pres0 = ⋆AnnihilL _ - inducedHom .snd .pres1 = imageOf1Works - inducedHom .snd .pres+ x y = refl - inducedHom .snd .pres· x y = refl - inducedHom .snd .pres- x = refl - inducedHom .snd .pres⋆ r x = + inducedHom .snd .pres0 = ⋆AnnihilL _ + inducedHom .snd .pres1 = imageOf1Works + inducedHom .snd .pres+ x y = refl + inducedHom .snd .pres· x y = refl + inducedHom .snd .pres- x = refl + inducedHom .snd .pres⋆ r x = (r 1a) · inducedMap x ≡⟨ ⋆AssocL r 1a (inducedMap x) r (1a · inducedMap x) ≡⟨ cong u r u) (·IdL (inducedMap x)) r inducedMap x @@ -121,8 +121,8 @@ open AlgebraTheory (CommRing→Ring R) (CommAlgebra→Algebra A) open Construction using (var; const) renaming (_+_ to _+c_; -_ to -c_; _·_ to _·c_) - Hom = CommAlgebraHom (R [ I ]) A - open IsAlgebraHom + Hom = CommAlgebraHom (R [ I ]) A + open IsAlgebraHom evaluateAt : Hom I A evaluateAt φ x = φ .fst (var x) @@ -314,74 +314,74 @@ inducedMap A (evaluateAt f) fst f homRetrievable f = proveEq - (isSetAlgebra (CommAlgebra→Algebra A)) + (isSetAlgebra (CommAlgebra→Algebra A)) (inducedMap A (evaluateAt f)) - x f $a x) + x f $a x) x refl) - r r 1a ≡⟨ cong u r u) (sym f.pres1) - r (f $a (const 1r)) ≡⟨ sym (f.pres⋆ r _) - f $a (const r ·c const 1r) ≡⟨ cong u f $a u) (sym (Construction.·HomConst r 1r)) - f $a (const (r ·r 1r)) ≡⟨ cong u f $a (const u)) (·r-rid r) - f $a (const r) ) + r r 1a ≡⟨ cong u r u) (sym f.pres1) + r (f $a (const 1r)) ≡⟨ sym (f.pres⋆ r _) + f $a (const r ·c const 1r) ≡⟨ cong u f $a u) (sym (Construction.·HomConst r 1r)) + f $a (const (r ·r 1r)) ≡⟨ cong u f $a (const u)) (·r-rid r) + f $a (const r) ) x y eq-x eq-y ι (x +c y) ≡⟨ refl (ι x + ι y) ≡⟨ cong u u + ι y) eq-x - ((f $a x) + ι y) ≡⟨ - cong u (f $a x) + u) eq-y - ((f $a x) + (f $a y)) ≡⟨ sym (f.pres+ _ _) (f $a (x +c y)) ) + ((f $a x) + ι y) ≡⟨ + cong u (f $a x) + u) eq-y + ((f $a x) + (f $a y)) ≡⟨ sym (f.pres+ _ _) (f $a (x +c y)) ) x y eq-x eq-y ι (x ·c y) ≡⟨ refl ι x · ι y ≡⟨ cong u u · ι y) eq-x - (f $a x) · (ι y) ≡⟨ cong u (f $a x) · u) eq-y - (f $a x) · (f $a y) ≡⟨ sym (f.pres· _ _) - f $a (x ·c y) ) + (f $a x) · (ι y) ≡⟨ cong u (f $a x) · u) eq-y + (f $a x) · (f $a y) ≡⟨ sym (f.pres· _ _) + f $a (x ·c y) ) x eq-x ι (-c x) ≡⟨ refl - ι x ≡⟨ cong u - u) eq-x - - (f $a x) ≡⟨ sym (f.pres- x) - f $a (-c x) ) + - (f $a x) ≡⟨ sym (f.pres- x) + f $a (-c x) ) where ι = inducedMap A (evaluateAt f) - module f = IsAlgebraHom (f .snd) + module f = IsAlgebraHom (f .snd) evaluateAt : {R : CommRing } {I : Type ℓ'} (A : CommAlgebra R ℓ'') - (f : CommAlgebraHom (R [ I ]) A) + (f : CommAlgebraHom (R [ I ]) A) (I fst A) -evaluateAt A f x = f $a (Construction.var x) +evaluateAt A f x = f $a (Construction.var x) inducedHom : {R : CommRing } {I : Type ℓ'} (A : CommAlgebra R ℓ'') (φ : I fst A ) - CommAlgebraHom (R [ I ]) A + CommAlgebraHom (R [ I ]) A inducedHom A φ = Theory.inducedHom A φ homMapIso : {R : CommRing } {I : Type ℓ''} (A : CommAlgebra R ℓ') - Iso (CommAlgebraHom (R [ I ]) A) (I (fst A)) + 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) = - λ f Σ≡Prop f isPropIsCommAlgebraHom {M = R [ I ]} {N = A} f) + λ f Σ≡Prop f isPropIsCommAlgebraHom {M = R [ I ]} {N = A} f) (Theory.homRetrievable A f) inducedHomUnique : {R : CommRing } {I : Type ℓ'} (A : CommAlgebra R ℓ'') (φ : I fst A ) - (f : CommAlgebraHom (R [ I ]) A) ((i : I) fst f (Construction.var i) φ i) + (f : CommAlgebraHom (R [ I ]) A) ((i : I) fst f (Construction.var i) φ i) f inducedHom A φ inducedHomUnique {I = I} A φ f p = isoFunInjective (homMapIso A) f (inducedHom A φ) λ j i p i j homMapPath : {R : CommRing } {I : Type ℓ'} (A : CommAlgebra R (ℓ-max ℓ')) - CommAlgebraHom (R [ I ]) A (I fst A) + CommAlgebraHom (R [ I ]) A (I fst A) homMapPath A = isoToPath (homMapIso A) {- Corollary: Two homomorphisms with the same values on generators are equal -} equalByUMP : {R : CommRing } {I : Type ℓ'} (A : CommAlgebra R ℓ'') - (f g : CommAlgebraHom (R [ I ]) A) + (f g : CommAlgebraHom (R [ I ]) A) ((i : I) fst f (Construction.var i) fst g (Construction.var i)) (x : R [ I ] ) fst f x fst g x equalByUMP {R = R} {I = I} A f g = funExt⁻ cong fst isoFunInjective (homMapIso A) f g funExt @@ -389,7 +389,7 @@ {- A corollary, which is useful for constructing isomorphisms to algebras with the same universal property -} isIdByUMP : {R : CommRing } {I : Type ℓ'} - (f : CommAlgebraHom (R [ I ]) (R [ I ])) + (f : CommAlgebraHom (R [ I ]) (R [ I ])) ((i : I) fst f (Construction.var i) Construction.var i) (x : R [ I ] ) fst f x x isIdByUMP {R = R} {I = I} f p = equalByUMP (R [ I ]) f (idCAlgHom (R [ I ])) p @@ -404,7 +404,7 @@ A′ = CommAlgebra→Algebra A B′ = CommAlgebra→Algebra B R′ = (CommRing→Ring R) - ν : AlgebraHom A′ B′ ( A B ) + ν : AlgebraHom A′ B′ ( A B ) ν φ = φ .fst {- @@ -412,8 +412,8 @@ ↓ ↓ψ Hom(R[I],B) → (I → B) -} - naturalEvR : {I : Type ℓ'} (ψ : CommAlgebraHom A B) - (f : CommAlgebraHom (R [ I ]) A) + naturalEvR : {I : Type ℓ'} (ψ : CommAlgebraHom A B) + (f : CommAlgebraHom (R [ I ]) A) (fst ψ) evaluateAt A f evaluateAt B (ψ ∘a f) naturalEvR ψ f = refl @@ -422,7 +422,7 @@ ↓ ↓ψ Hom(R[I],B) ← (I → B) -} - natIndHomR : {I : Type ℓ'} (ψ : CommAlgebraHom A B) + natIndHomR : {I : Type ℓ'} (ψ : CommAlgebraHom A B) (ϕ : I A ) ψ ∘a inducedHom A ϕ inducedHom B (fst ψ ϕ) natIndHomR ψ ϕ = isoFunInjective (homMapIso B) _ _ @@ -437,7 +437,7 @@ Hom(R[J],A) → (J → A) -} naturalEvL : {I J : Type ℓ'} (φ : J I) - (f : CommAlgebraHom (R [ I ]) A) + (f : CommAlgebraHom (R [ I ]) A) (evaluateAt A f) φ evaluateAt A (f ∘a (inducedHom (R [ I ]) x Construction.var (φ x)))) naturalEvL φ f = refl @@ -447,24 +447,24 @@ Prove that the FreeCommAlgebra over R on zero generators is isomorphic to the initial R-Algebra - R itsself. -} - freeOn⊥ : CommAlgebraEquiv (R [ ]) (initialCAlg R) + freeOn⊥ : CommAlgebraEquiv (R [ ]) (initialCAlg R) freeOn⊥ = equivByInitiality R (R [ ]) {- Show that R[⊥] has the universal property of the initial R-Algbera and conclude that those are isomorphic -} - λ B let to : CommAlgebraHom (R [ ]) B ( fst B) + λ B let to : CommAlgebraHom (R [ ]) B ( fst B) to = evaluateAt B - from : ( fst B) CommAlgebraHom (R [ ]) B + from : ( fst B) CommAlgebraHom (R [ ]) B from = inducedHom B from-to : (x : _) from (to x) x from-to x = - Σ≡Prop f isPropIsCommAlgebraHom {M = R [ ]} {N = B} f) + Σ≡Prop f isPropIsCommAlgebraHom {M = R [ ]} {N = B} f) (Theory.homRetrievable B x) - equiv : CommAlgebraHom (R [ ]) B ( fst B) + equiv : CommAlgebraHom (R [ ]) B ( fst B) equiv = isoToEquiv (iso to from x isContr→isOfHLevel 1 isContr⊥→A _ _) from-to) diff --git a/Cubical.Algebra.CommAlgebra.Instances.Initial.html b/Cubical.Algebra.CommAlgebra.Instances.Initial.html index 93df0b963d..7f504bed78 100644 --- a/Cubical.Algebra.CommAlgebra.Instances.Initial.html +++ b/Cubical.Algebra.CommAlgebra.Instances.Initial.html @@ -11,7 +11,7 @@ open import Cubical.Algebra.CommRing open import Cubical.Algebra.Ring -open import Cubical.Algebra.Algebra.Base using (IsAlgebraHom) +open import Cubical.Algebra.Algebra.Base using (IsAlgebraHom) open import Cubical.Algebra.Algebra.Properties open import Cubical.Algebra.CommAlgebra import Cubical.Algebra.Algebra.Properties @@ -36,7 +36,7 @@ initialCAlg .snd .CommAlgebraStr.-_ = _ initialCAlg .snd .CommAlgebraStr._⋆_ r x = r · x initialCAlg .snd .CommAlgebraStr.isCommAlgebra = - makeIsCommAlgebra (isSetRing (CommRing→Ring R)) + makeIsCommAlgebra (isSetRing (CommRing→Ring R)) +Assoc +IdR +InvR +Comm ·Assoc ·IdL ·DistL+ ·Comm @@ -55,9 +55,9 @@ _*_ : fst R (fst A) (fst A) r * a = CommAlgebraStr._⋆_ (snd A) r a - initialMap : CommAlgebraHom initialCAlg A + initialMap : CommAlgebraHom initialCAlg A initialMap = - makeCommAlgebraHom {M = initialCAlg} {N = A} + makeCommAlgebraHom {M = initialCAlg} {N = A} r r * 1a) (⋆IdL _) x y ⋆DistL+ x y 1a) @@ -68,34 +68,34 @@ r x (r · x) * 1a ≡⟨ ⋆Assoc _ _ _ (r * (x * 1a)) ) - initialMapEq : (f : CommAlgebraHom initialCAlg A) + initialMapEq : (f : CommAlgebraHom initialCAlg A) f initialMap initialMapEq f = - let open IsAlgebraHom (snd f) + let open IsAlgebraHom (snd f) in Σ≡Prop - (isPropIsCommAlgebraHom {M = initialCAlg} {N = A}) + (isPropIsCommAlgebraHom {M = initialCAlg} {N = A}) λ i x ((fst f) x ≡⟨ cong (fst f) (sym (·IdR _)) - fst f (x · 1a) ≡⟨ pres⋆ x 1a + fst f (x · 1a) ≡⟨ pres⋆ x 1a CommAlgebraStr._⋆_ (snd A) x (fst f 1a) ≡⟨ cong u (snd A CommAlgebraStr.⋆ x) u) - pres1 + pres1 (CommAlgebraStr._⋆_ (snd A) x 1a) ) i - initialMapProp : (f g : CommAlgebraHom initialCAlg A) + initialMapProp : (f g : CommAlgebraHom initialCAlg A) f g initialMapProp f g = initialMapEq f sym (initialMapEq g) - initialityIso : Iso (CommAlgebraHom initialCAlg A) (Unit* { = }) + initialityIso : Iso (CommAlgebraHom initialCAlg A) (Unit* { = }) initialityIso = iso _ tt*) _ initialMap) {tt*x refl}) λ f sym (initialMapEq f) - initialityPath : CommAlgebraHom initialCAlg A Unit* + initialityPath : CommAlgebraHom initialCAlg A Unit* initialityPath = isoToPath initialityIso - initialityContr : isContr (CommAlgebraHom initialCAlg A) + initialityContr : isContr (CommAlgebraHom initialCAlg A) initialityContr = initialMap , λ ϕ sym (initialMapEq ϕ) {- @@ -105,15 +105,15 @@ -} module _ (A : CommAlgebra R ) where equivByInitiality : - (isInitial : (B : CommAlgebra R ) isContr (CommAlgebraHom A B)) - CommAlgebraEquiv A (initialCAlg) + (isInitial : (B : CommAlgebra R ) isContr (CommAlgebraHom A B)) + CommAlgebraEquiv A (initialCAlg) equivByInitiality isInitial = isoToEquiv asIso , snd to where open CommAlgebraHoms - to : CommAlgebraHom A initialCAlg + to : CommAlgebraHom A initialCAlg to = fst (isInitial initialCAlg) - from : CommAlgebraHom initialCAlg A + from : CommAlgebraHom initialCAlg A from = initialMap A asIso : Iso (fst A) (fst initialCAlg) diff --git a/Cubical.Algebra.CommAlgebra.Instances.Pointwise.html b/Cubical.Algebra.CommAlgebra.Instances.Pointwise.html index 64ae7b1908..022f7d75f0 100644 --- a/Cubical.Algebra.CommAlgebra.Instances.Pointwise.html +++ b/Cubical.Algebra.CommAlgebra.Instances.Pointwise.html @@ -8,7 +8,7 @@ open import Cubical.Algebra.CommRing.Base open import Cubical.Algebra.CommRing.Instances.Pointwise open import Cubical.Algebra.CommAlgebra.Base -open import Cubical.Algebra.Algebra using (IsAlgebraHom) +open import Cubical.Algebra.Algebra using (IsAlgebraHom) private variable @@ -19,7 +19,7 @@ pointwiseAlgebra = let open CommAlgebraStr (snd A) isSetX→A = isOfHLevelΠ 2 (x : X) isSetCommRing (CommAlgebra→CommRing A)) - in commAlgebraFromCommRing + in commAlgebraFromCommRing (pointwiseRing X (CommAlgebra→CommRing A)) r f x r (f x))) r s f i x ⋆Assoc r s (f x) i) @@ -28,14 +28,14 @@ f i x ⋆IdL (f x) i) λ r f g i x ⋆AssocL r (f x) (g x) i - open IsAlgebraHom + open IsAlgebraHom - evaluationHom : X CommAlgebraHom pointwiseAlgebra A + evaluationHom : X CommAlgebraHom pointwiseAlgebra A fst (evaluationHom x) f = f x - pres0 (snd (evaluationHom x)) = refl - pres1 (snd (evaluationHom x)) = refl - pres+ (snd (evaluationHom x)) _ _ = refl - pres· (snd (evaluationHom x)) _ _ = refl - pres- (snd (evaluationHom x)) _ = refl - pres⋆ (snd (evaluationHom x)) _ _ = refl + pres0 (snd (evaluationHom x)) = refl + pres1 (snd (evaluationHom x)) = refl + pres+ (snd (evaluationHom x)) _ _ = refl + pres· (snd (evaluationHom x)) _ _ = refl + pres- (snd (evaluationHom x)) _ = refl + pres⋆ (snd (evaluationHom x)) _ _ = refl \ No newline at end of file diff --git a/Cubical.Algebra.CommAlgebra.Instances.Unit.html b/Cubical.Algebra.CommAlgebra.Instances.Unit.html index e2ecef60c8..95a84f917c 100644 --- a/Cubical.Algebra.CommAlgebra.Instances.Unit.html +++ b/Cubical.Algebra.CommAlgebra.Instances.Unit.html @@ -12,7 +12,7 @@ open import Cubical.Algebra.CommRing open import Cubical.Algebra.CommAlgebra.Base open import Cubical.Algebra.CommRing.Instances.Unit -open import Cubical.Algebra.Algebra.Base using (IsAlgebraHom) +open import Cubical.Algebra.Algebra.Base using (IsAlgebraHom) open import Cubical.Tactics.CommRingSolver.Reflection private @@ -22,27 +22,27 @@ module _ (R : CommRing ) where UnitCommAlgebra : CommAlgebra R ℓ' UnitCommAlgebra = - commAlgebraFromCommRing + commAlgebraFromCommRing UnitCommRing _ _ tt*) _ _ _ refl) _ _ _ refl) _ _ _ refl) _ refl) _ _ _ refl) module _ (A : CommAlgebra R ) where - terminalMap : CommAlgebraHom A (UnitCommAlgebra {ℓ' = }) + terminalMap : CommAlgebraHom A (UnitCommAlgebra {ℓ' = }) terminalMap = _ tt*) , isHom - where open IsAlgebraHom - isHom : IsCommAlgebraHom (snd A) _ (snd UnitCommAlgebra) - pres0 isHom = isPropUnit* _ _ - pres1 isHom = isPropUnit* _ _ - pres+ isHom = λ _ _ isPropUnit* _ _ - pres· isHom = λ _ _ isPropUnit* _ _ - pres- isHom = λ _ isPropUnit* _ _ - pres⋆ isHom = λ _ _ isPropUnit* _ _ + where open IsAlgebraHom + isHom : IsCommAlgebraHom (snd A) _ (snd UnitCommAlgebra) + pres0 isHom = isPropUnit* _ _ + pres1 isHom = isPropUnit* _ _ + pres+ isHom = λ _ _ isPropUnit* _ _ + pres· isHom = λ _ _ isPropUnit* _ _ + pres- isHom = λ _ isPropUnit* _ _ + pres⋆ isHom = λ _ _ isPropUnit* _ _ - terminalityContr : isContr (CommAlgebraHom A UnitCommAlgebra) + terminalityContr : isContr (CommAlgebraHom A UnitCommAlgebra) terminalityContr = terminalMap , path - where path : (ϕ : CommAlgebraHom A UnitCommAlgebra) terminalMap ϕ - path ϕ = Σ≡Prop (isPropIsCommAlgebraHom {M = A} {N = UnitCommAlgebra}) + where path : (ϕ : CommAlgebraHom A UnitCommAlgebra) terminalMap ϕ + path ϕ = Σ≡Prop (isPropIsCommAlgebraHom {M = A} {N = UnitCommAlgebra}) λ i _ isPropUnit* _ _ i open CommAlgebraStr (snd A) @@ -61,7 +61,7 @@ step2 : (x : A ) x ·s 1r x step2 = solve S - equivFrom1≡0 : CommAlgebraEquiv A UnitCommAlgebra + equivFrom1≡0 : CommAlgebraEquiv A UnitCommAlgebra equivFrom1≡0 = isContr→Equiv 1≡0→isContr isContrUnit* , snd terminalMap \ No newline at end of file diff --git a/Cubical.Algebra.CommAlgebra.Kernel.html b/Cubical.Algebra.CommAlgebra.Kernel.html index 0f87e24e39..117cf57c9c 100644 --- a/Cubical.Algebra.CommAlgebra.Kernel.html +++ b/Cubical.Algebra.CommAlgebra.Kernel.html @@ -16,7 +16,7 @@ variable : Level -module _ {R : CommRing } (A B : CommAlgebra R ) (ϕ : CommAlgebraHom A B) where +module _ {R : CommRing } (A B : CommAlgebra R ) (ϕ : CommAlgebraHom A B) where kernel : IdealsIn A kernel = Ideal→CommIdeal (ringKernel (CommAlgebraHom→RingHom {A = A} {B = B} ϕ)) diff --git a/Cubical.Algebra.CommAlgebra.Localisation.html b/Cubical.Algebra.CommAlgebra.Localisation.html index ad07f066dd..f366d9fd3c 100644 --- a/Cubical.Algebra.CommAlgebra.Localisation.html +++ b/Cubical.Algebra.CommAlgebra.Localisation.html @@ -49,7 +49,7 @@ open isMultClosedSubset private R = fst R' open CommAlgebraStr - open IsAlgebraHom + open IsAlgebraHom open CommRingStr (snd R') renaming (_+_ to _+r_ ; _·_ to _·r_ ; ·IdR to ·rRid) open RingTheory (CommRing→Ring R') open CommRingTheory R' @@ -69,7 +69,7 @@ Type (ℓ-suc ) hasLocAlgUniversalProp A _ = (B : CommAlgebra R' ) (∀ s s S' _⋆_ (snd B) s (1a (snd B)) (CommAlgebra→CommRing B) ˣ) - isContr (CommAlgebraHom A B) + isContr (CommAlgebraHom A B) S⋆1⊆S⁻¹Rˣ : s s S' _⋆_ (snd S⁻¹RAsCommAlg) s (1a (snd S⁻¹RAsCommAlg)) S⁻¹Rˣ S⋆1⊆S⁻¹Rˣ s s∈S' = subst-∈ S⁻¹Rˣ @@ -90,17 +90,17 @@ χcomp : r fst χ (r /1) fst φ r χcomp = funExt⁻ (S⁻¹RHasUniversalProp B φ S⋆1⊆Bˣ .fst .snd) - χᴬ : CommAlgebraHom S⁻¹RAsCommAlg B' + χᴬ : CommAlgebraHom S⁻¹RAsCommAlg B' fst χᴬ = fst χ - pres0 (snd χᴬ) = IsRingHom.pres0 (snd χ) - pres1 (snd χᴬ) = IsRingHom.pres1 (snd χ) - pres+ (snd χᴬ) = IsRingHom.pres+ (snd χ) - pres· (snd χᴬ) = IsRingHom.pres· (snd χ) - pres- (snd χᴬ) = IsRingHom.pres- (snd χ) - pres⋆ (snd χᴬ) r x = path + pres0 (snd χᴬ) = IsRingHom.pres0 (snd χ) + pres1 (snd χᴬ) = IsRingHom.pres1 (snd χ) + pres+ (snd χᴬ) = IsRingHom.pres+ (snd χ) + pres· (snd χᴬ) = IsRingHom.pres· (snd χ) + pres- (snd χᴬ) = IsRingHom.pres- (snd χ) + pres⋆ (snd χᴬ) r x = path where path : fst χ ((r /1) ·ₗ x) _⋆_ (snd B') r (fst χ x) - path = fst χ ((r /1) ·ₗ x) ≡⟨ IsRingHom.pres· (snd χ) _ _ + path = fst χ ((r /1) ·ₗ x) ≡⟨ IsRingHom.pres· (snd χ) _ _ fst χ (r /1) ·b fst χ x ≡⟨ cong (_·b fst χ x) (χcomp r) fst φ r ·b fst χ x ≡⟨ refl _⋆_ (snd B') r 1b ·b fst χ x ≡⟨ ⋆AssocL (snd B') _ _ _ @@ -108,38 +108,38 @@ _⋆_ (snd B') r (fst χ x) - χᴬuniqueness : (ψ : CommAlgebraHom S⁻¹RAsCommAlg B') χᴬ ψ - χᴬuniqueness ψ = Σ≡Prop _ isPropIsAlgebraHom _ _ _ _) + χᴬuniqueness : (ψ : CommAlgebraHom S⁻¹RAsCommAlg B') χᴬ ψ + χᴬuniqueness ψ = Σ≡Prop _ isPropIsAlgebraHom _ _ _ _) (cong (fst fst) (χuniqueness (ψ' , funExt ψ'r/1≡φr))) where χuniqueness = S⁻¹RHasUniversalProp B φ S⋆1⊆Bˣ .snd ψ' : CommRingHom S⁻¹RAsCommRing B fst ψ' = fst ψ - IsRingHom.pres0 (snd ψ') = pres0 (snd ψ) - IsRingHom.pres1 (snd ψ') = pres1 (snd ψ) - IsRingHom.pres+ (snd ψ') = pres+ (snd ψ) - IsRingHom.pres· (snd ψ') = pres· (snd ψ) - IsRingHom.pres- (snd ψ') = pres- (snd ψ) + IsRingHom.pres0 (snd ψ') = pres0 (snd ψ) + IsRingHom.pres1 (snd ψ') = pres1 (snd ψ) + IsRingHom.pres+ (snd ψ') = pres+ (snd ψ) + IsRingHom.pres· (snd ψ') = pres· (snd ψ) + IsRingHom.pres- (snd ψ') = pres- (snd ψ) ψ'r/1≡φr : r fst ψ (r /1) fst φ r ψ'r/1≡φr r = fst ψ (r /1) ≡⟨ cong (fst ψ) (sym (·ₗ-rid _)) - fst ψ (_⋆_ (snd S⁻¹RAsCommAlg) r (1a (snd S⁻¹RAsCommAlg))) ≡⟨ pres⋆ (snd ψ) _ _ - _⋆_ (snd B') r (fst ψ (1a (snd S⁻¹RAsCommAlg))) ≡⟨ cong (_⋆_ (snd B') r) (pres1 (snd ψ)) + fst ψ (_⋆_ (snd S⁻¹RAsCommAlg) r (1a (snd S⁻¹RAsCommAlg))) ≡⟨ pres⋆ (snd ψ) _ _ + _⋆_ (snd B') r (fst ψ (1a (snd S⁻¹RAsCommAlg))) ≡⟨ cong (_⋆_ (snd B') r) (pres1 (snd ψ)) _⋆_ (snd B') r 1b -- an immediate corollary: - isContrHomS⁻¹RS⁻¹R : isContr (CommAlgebraHom S⁻¹RAsCommAlg S⁻¹RAsCommAlg) + isContrHomS⁻¹RS⁻¹R : isContr (CommAlgebraHom S⁻¹RAsCommAlg S⁻¹RAsCommAlg) isContrHomS⁻¹RS⁻¹R = S⁻¹RHasAlgUniversalProp S⁻¹RAsCommAlg S⋆1⊆S⁻¹Rˣ S⁻¹RAlgCharEquiv : (A' : CommRing ) (φ : CommRingHom R' A') PathToS⁻¹R R' S' SMultClosedSubset A' φ - CommAlgebraEquiv S⁻¹RAsCommAlg (toCommAlg (A' , φ)) + CommAlgebraEquiv S⁻¹RAsCommAlg (toCommAlg (A' , φ)) S⁻¹RAlgCharEquiv A' φ cond = toCommAlgebraEquiv (S⁻¹RAsCommRing , /1AsCommRingHom) (A' , φ) (S⁻¹RCharEquiv R' S' SMultClosedSubset A' φ cond) - (RingHom≡ (S⁻¹RHasUniversalProp A' φ (cond .φS⊆Aˣ) .fst .snd)) + (RingHom≡ (S⁻¹RHasUniversalProp A' φ (cond .φS⊆Aˣ) .fst .snd)) where open PathToS⁻¹R @@ -176,7 +176,7 @@ ; S⁻¹RHasAlgUniversalProp to S₂⁻¹RHasAlgUniversalProp ; isContrHomS⁻¹RS⁻¹R to isContrHomS₂⁻¹RS₂⁻¹R) - open IsAlgebraHom + open IsAlgebraHom open AlgebraHoms open CommAlgebraHoms open CommAlgebraStr ⦃...⦄ @@ -194,13 +194,13 @@ (∀ s₂ s₂ S₂ s₂ 1a S₁⁻¹Rˣ) isContr (S₁⁻¹RAsCommAlg S₂⁻¹RAsCommAlg) isContrS₁⁻¹R≡S₂⁻¹R S₁⊆S₂⁻¹Rˣ S₂⊆S₁⁻¹Rˣ = isOfHLevelRetractFromIso 0 - (equivToIso (invEquiv (CommAlgebraPath _ _ _))) + (equivToIso (invEquiv (CommAlgebraPath _ _ _))) isContrS₁⁻¹R≅S₂⁻¹R where - χ₁ : CommAlgebraHom S₁⁻¹RAsCommAlg S₂⁻¹RAsCommAlg + χ₁ : CommAlgebraHom S₁⁻¹RAsCommAlg S₂⁻¹RAsCommAlg χ₁ = S₁⁻¹RHasAlgUniversalProp S₂⁻¹RAsCommAlg S₁⊆S₂⁻¹Rˣ .fst - χ₂ : CommAlgebraHom S₂⁻¹RAsCommAlg S₁⁻¹RAsCommAlg + χ₂ : CommAlgebraHom S₂⁻¹RAsCommAlg S₁⁻¹RAsCommAlg χ₂ = S₂⁻¹RHasAlgUniversalProp S₁⁻¹RAsCommAlg S₂⊆S₁⁻¹Rˣ .fst χ₁∘χ₂≡id : χ₁ ∘a χ₂ idCommAlgebraHom _ @@ -215,23 +215,23 @@ Iso.rightInv IsoS₁⁻¹RS₂⁻¹R = funExt⁻ (cong fst χ₁∘χ₂≡id) Iso.leftInv IsoS₁⁻¹RS₂⁻¹R = funExt⁻ (cong fst χ₂∘χ₁≡id) - isContrS₁⁻¹R≅S₂⁻¹R : isContr (CommAlgebraEquiv S₁⁻¹RAsCommAlg S₂⁻¹RAsCommAlg) + isContrS₁⁻¹R≅S₂⁻¹R : isContr (CommAlgebraEquiv S₁⁻¹RAsCommAlg S₂⁻¹RAsCommAlg) isContrS₁⁻¹R≅S₂⁻¹R = center , uniqueness where - center : CommAlgebraEquiv S₁⁻¹RAsCommAlg S₂⁻¹RAsCommAlg + center : CommAlgebraEquiv S₁⁻¹RAsCommAlg S₂⁻¹RAsCommAlg fst center = isoToEquiv IsoS₁⁻¹RS₂⁻¹R - pres0 (snd center) = pres0 (snd χ₁) - pres1 (snd center) = pres1 (snd χ₁) - pres+ (snd center) = pres+ (snd χ₁) - pres· (snd center) = pres· (snd χ₁) - pres- (snd center) = pres- (snd χ₁) - pres⋆ (snd center) = pres⋆ (snd χ₁) - - uniqueness : (φ : CommAlgebraEquiv S₁⁻¹RAsCommAlg S₂⁻¹RAsCommAlg) center φ - uniqueness φ = Σ≡Prop _ isPropIsAlgebraHom _ _ _ _) + pres0 (snd center) = pres0 (snd χ₁) + pres1 (snd center) = pres1 (snd χ₁) + pres+ (snd center) = pres+ (snd χ₁) + pres· (snd center) = pres· (snd χ₁) + pres- (snd center) = pres- (snd χ₁) + pres⋆ (snd center) = pres⋆ (snd χ₁) + + uniqueness : (φ : CommAlgebraEquiv S₁⁻¹RAsCommAlg S₂⁻¹RAsCommAlg) center φ + uniqueness φ = Σ≡Prop _ isPropIsAlgebraHom _ _ _ _) (equivEq (cong fst (S₁⁻¹RHasAlgUniversalProp S₂⁻¹RAsCommAlg S₁⊆S₂⁻¹Rˣ .snd - (AlgebraEquiv→AlgebraHom φ)))) + (AlgebraEquiv→AlgebraHom φ)))) isPropS₁⁻¹R≡S₂⁻¹R : isProp (S₁⁻¹RAsCommAlg S₂⁻¹RAsCommAlg) @@ -279,7 +279,7 @@ R[1/f][1/g]AsCommAlgebra = toCommAlg (R[1/f][1/g]AsCommRing , /1/1AsCommRingHom) R[1/fg]≡R[1/f][1/g] : R[1/fg]AsCommAlgebra R[1/f][1/g]AsCommAlgebra - R[1/fg]≡R[1/f][1/g] = uaCommAlgebra (R[1/fg]AlgCharEquiv _ _ pathtoR[1/fg]) + R[1/fg]≡R[1/f][1/g] = uaCommAlgebra (R[1/fg]AlgCharEquiv _ _ pathtoR[1/fg]) doubleLocCancel : g ∈ᵢ f R[1/f][1/g]AsCommAlgebra R[1/g]AsCommAlgebra doubleLocCancel g∈√⟨f⟩ = sym R[1/fg]≡R[1/f][1/g] isContrR[1/fg]≡R[1/g] toUnit1 toUnit2 .fst diff --git a/Cubical.Algebra.CommAlgebra.LocalisationAlgebra.html b/Cubical.Algebra.CommAlgebra.LocalisationAlgebra.html index a720340b19..51b63d3c45 100644 --- a/Cubical.Algebra.CommAlgebra.LocalisationAlgebra.html +++ b/Cubical.Algebra.CommAlgebra.LocalisationAlgebra.html @@ -123,11 +123,11 @@ S⁻¹AAsCommAlgebra : CommAlgebra R ℓAlg S⁻¹AAsCommAlgebra = let open AlgebraStructureOnLocalisation - in commAlgebraFromCommRing {R = R} S⁻¹Aᵣ _⋆_ ·Assoc⋆ ⋆DistR+ ⋆DistL+ ⋆IdL ⋆AssocL + in commAlgebraFromCommRing {R = R} S⁻¹Aᵣ _⋆_ ·Assoc⋆ ⋆DistR+ ⋆DistL+ ⋆IdL ⋆AssocL S⁻¹AAsCommAlgebra→CommRing : CommAlgebra→CommRing S⁻¹AAsCommAlgebra RLoc.S⁻¹RAsCommRing S⁻¹AAsCommAlgebra→CommRing = let open AlgebraStructureOnLocalisation - in commAlgebraFromCommRing→CommRing {R = R} S⁻¹Aᵣ _⋆_ ·Assoc⋆ ⋆DistR+ + in commAlgebraFromCommRing→CommRing {R = R} S⁻¹Aᵣ _⋆_ ·Assoc⋆ ⋆DistR+ ⋆DistL+ ⋆IdL ⋆AssocL module S⁻¹AUniversalProp where @@ -139,31 +139,31 @@ _ = str A _ = str S⁻¹AAsCommAlgebra - hasLocUniversalProp : (X : CommAlgebra R ℓAlg) (φ : CommAlgebraHom A X) + hasLocUniversalProp : (X : CommAlgebra R ℓAlg) (φ : CommAlgebraHom A X) (∀ s s S fst φ s X ˣ) Type (ℓ-max ℓR (ℓ-suc ℓAlg)) - hasLocUniversalProp X φ _ = (B : CommAlgebra R ℓAlg) (ψ : CommAlgebraHom A B) + hasLocUniversalProp X φ _ = (B : CommAlgebra R ℓAlg) (ψ : CommAlgebraHom A B) (∀ s s S fst ψ s B ˣ) - ∃![ χ CommAlgebraHom X B ] (fst χ) (fst φ) (fst ψ) + ∃![ χ CommAlgebraHom X B ] (fst χ) (fst φ) (fst ψ) -- Can't use CommAlgebraHomFromRingHom directly for this as -- CommAlgebra→CommRing (commAlgebraFromCommRing R ...) is not -- definitionally equal to R. We could use transports, but a manual -- definition works just as well. - /1AsCommAlgebraHom : CommAlgebraHom A S⁻¹AAsCommAlgebra + /1AsCommAlgebraHom : CommAlgebraHom A S⁻¹AAsCommAlgebra /1AsCommAlgebraHom = RUniv./1AsCommRingHom .fst , record { IsRingHom (RUniv./1AsCommRingHom .snd) - ; pres⋆ = λ r x refl} + ; pres⋆ = λ r x refl} -- /1AsCommAlgebraHom and /1AsCommRingHom are equal over equality of the -- codomain rings. /1AsCommAlgebraHom→CommRingHom : PathP i CommRingHom Aᵣ (S⁻¹AAsCommAlgebra→CommRing i)) - (CommAlgebraHom→CommRingHom A S⁻¹AAsCommAlgebra /1AsCommAlgebraHom) + (CommAlgebraHom→CommRingHom A S⁻¹AAsCommAlgebra /1AsCommAlgebraHom) RUniv./1AsCommRingHom - /1AsCommAlgebraHom→CommRingHom = ΣPathPProp f isPropIsRingHom _ f _) + /1AsCommAlgebraHom→CommRingHom = ΣPathPProp f isPropIsRingHom _ f _) i RUniv._/1) S⁻¹AHasUniversalProp : hasLocUniversalProp S⁻¹AAsCommAlgebra @@ -193,7 +193,7 @@ ψS⊂Bˣ univ : type-univ (CommAlgebra→CommRing S⁻¹AAsCommAlgebra) - (CommAlgebraHom→CommRingHom A S⁻¹AAsCommAlgebra /1AsCommAlgebraHom) + (CommAlgebraHom→CommRingHom A S⁻¹AAsCommAlgebra /1AsCommAlgebraHom) univ = transport (sym $ cong₂ type-univ S⁻¹AAsCommAlgebra→CommRing @@ -225,7 +225,7 @@ original-pres⋆ : type-pres⋆ RLoc.S⁻¹RAsCommRing _⋆_ (original-univ .fst .fst) original-pres⋆ r = SQ.elimProp _ _ _ isSetCommAlgebra B _ _ _ _) - (a , s , s∈S') cong ( _) (ψ .snd .IsAlgebraHom.pres⋆ r a) + (a , s , s∈S') cong ( _) (ψ .snd .IsAlgebraHom.pres⋆ r a) ⋆AssocL _ _ _) -- The transported function respects UP also, by transporting original-pres⋆. @@ -237,11 +237,11 @@ original-pres⋆ -- We can now define χₐ as an algebra morphism. - χₐ : CommAlgebraHom S⁻¹AAsCommAlgebra B + χₐ : CommAlgebraHom S⁻¹AAsCommAlgebra B χₐ = univ .fst .fst .fst , record { IsRingHom (univ .fst .fst .snd) - ; pres⋆ = pres⋆ } + ; pres⋆ = pres⋆ } -- Commutativity is the same as the one for rings, since it only cares -- about the underlying function. @@ -249,11 +249,11 @@ χₐcomm = univ .fst .snd -- Lift unicity from the ring unicity. - χₐunique : (el : Σ[ φ CommAlgebraHom S⁻¹AAsCommAlgebra B ] + χₐunique : (el : Σ[ φ CommAlgebraHom S⁻¹AAsCommAlgebra B ] (fst φ) RUniv._/1 (fst ψ)) (χₐ , χₐcomm) el χₐunique (φ' , φ'comm) = - Σ≡Prop ((λ _ isSetΠ _ isSetCommAlgebra B) _ _)) $ AlgebraHom≡ $ + Σ≡Prop ((λ _ isSetΠ _ isSetCommAlgebra B) _ _)) $ AlgebraHom≡ $ cong (fst fst) -- Get underlying bare function. (univ .snd (CommAlgebraHom→RingHom {A = S⁻¹AAsCommAlgebra} {B = B} φ' , φ'comm)) @@ -281,7 +281,7 @@ totalg≡ = Subalgebra→CommAlgebra≡ R S⁻¹AAsCommAlgebra P ι = Subalgebra→CommAlgebraHom R S⁻¹AAsCommAlgebra P - mor : CommAlgebraHom A totalg + mor : CommAlgebraHom A totalg mor = SubalgebraHom R S⁻¹AAsCommAlgebra P A /1AsCommAlgebraHom A/1∈P morS⊂totalgˣ : (s : A ) (s∈S : s S) (fst mor s totalg ˣ) @@ -289,11 +289,11 @@ let inv = RUniv.S/1⊆S⁻¹Rˣ s s∈S in (inv .fst , 1/S∈P s s∈S) , totalg≡ (inv .snd) - sec : Σ[ f CommAlgebraHom S⁻¹AAsCommAlgebra totalg ] + sec : Σ[ f CommAlgebraHom S⁻¹AAsCommAlgebra totalg ] (fst f) (fst /1AsCommAlgebraHom) (fst mor) sec = S⁻¹AHasUniversalProp totalg mor morS⊂totalgˣ .fst - post-composed : Σ[ f CommAlgebraHom S⁻¹AAsCommAlgebra S⁻¹AAsCommAlgebra ] + post-composed : Σ[ f CommAlgebraHom S⁻¹AAsCommAlgebra S⁻¹AAsCommAlgebra ] (fst f) (fst /1AsCommAlgebraHom) (fst /1AsCommAlgebraHom) post-composed = compCommAlgebraHom @@ -302,16 +302,16 @@ , cong (fst ι ∘_) (snd sec) where open CommAlgebraHoms - id-also-good : Σ[ f CommAlgebraHom S⁻¹AAsCommAlgebra S⁻¹AAsCommAlgebra ] + id-also-good : Σ[ f CommAlgebraHom S⁻¹AAsCommAlgebra S⁻¹AAsCommAlgebra ] (fst f) (fst /1AsCommAlgebraHom) (fst /1AsCommAlgebraHom) id-also-good = - ((λ x x) , makeIsAlgebraHom refl x y refl) + ((λ x x) , makeIsAlgebraHom refl x y refl) x y refl) x y refl)) , refl contr-at-/1AsCommAlgebraHom : - isContr (Σ[ f CommAlgebraHom S⁻¹AAsCommAlgebra S⁻¹AAsCommAlgebra ] + isContr (Σ[ f CommAlgebraHom S⁻¹AAsCommAlgebra S⁻¹AAsCommAlgebra ] (fst f) (fst /1AsCommAlgebraHom) (fst /1AsCommAlgebraHom)) contr-at-/1AsCommAlgebraHom = S⁻¹AHasUniversalProp S⁻¹AAsCommAlgebra diff --git a/Cubical.Algebra.CommAlgebra.Properties.html b/Cubical.Algebra.CommAlgebra.Properties.html index a0678a7ccc..1e44d3a6a0 100644 --- a/Cubical.Algebra.CommAlgebra.Properties.html +++ b/Cubical.Algebra.CommAlgebra.Properties.html @@ -41,19 +41,19 @@ idCAlgHom : (A : CommAlgebra R ) _ idCAlgHom A = idAlgebraHom (CommAlgebra→Algebra A) -idCAlgEquiv : (A : CommAlgebra R ) CommAlgebraEquiv A A +idCAlgEquiv : (A : CommAlgebra R ) CommAlgebraEquiv A A fst (idCAlgEquiv A) = idEquiv (fst A) snd (idCAlgEquiv A) = snd (idCAlgHom A) infix 3 _≃CAlg∎ infixr 2 _≃CAlg⟨_⟩_ -_≃CAlg∎ : (A : CommAlgebra R ) CommAlgebraEquiv A A +_≃CAlg∎ : (A : CommAlgebra R ) CommAlgebraEquiv A A A ≃CAlg∎ = idCAlgEquiv A _≃CAlg⟨_⟩_ : {B C : CommAlgebra R } - (A : CommAlgebra R ) (f : CommAlgebraEquiv A B) (g : CommAlgebraEquiv B C) - CommAlgebraEquiv A C + (A : CommAlgebra R ) (f : CommAlgebraEquiv A B) (g : CommAlgebraEquiv B C) + CommAlgebraEquiv A C A ≃CAlg⟨ f g = g ∘≃a f -- An R-algebra is the same as a CommRing A with a CommRingHom φ : R → A @@ -67,17 +67,17 @@ toCommAlg : CommRingWithHom CommAlgebra R ℓ' toCommAlg (A , φ , φIsHom) = - commAlgebraFromCommRing + commAlgebraFromCommRing A r a (φ r) · a) - r s x cong ( x) (pres· r s) sym (·Assoc _ _ _)) + r s x cong ( x) (pres· r s) sym (·Assoc _ _ _)) r x y ·DistR+ _ _ _) - r s x cong ( x) (pres+ r s) ·DistL+ _ _ _) - x cong ( x) pres1 ·IdL x) + r s x cong ( x) (pres+ r s) ·DistL+ _ _ _) + x cong ( x) pres1 ·IdL x) λ r x y sym (·Assoc _ _ _) where open CommRingStr (snd A) - open IsRingHom φIsHom + open IsRingHom φIsHom fromCommAlg : CommAlgebra R ℓ' CommRingWithHom fromCommAlg A = (CommAlgebra→CommRing A) , φ , φIsHom @@ -87,8 +87,8 @@ open AlgebraTheory (CommRing→Ring R) (CommAlgebra→Algebra A) φ : R A φ r = r 1a - φIsHom : IsRingHom (CommRing→Ring R .snd) φ (CommRing→Ring (CommAlgebra→CommRing A) .snd) - φIsHom = makeIsRingHom (⋆IdL _) _ _ ⋆DistL+ _ _ _) + φIsHom : IsRingHom (CommRing→Ring R .snd) φ (CommRing→Ring (CommAlgebra→CommRing A) .snd) + φIsHom = makeIsRingHom (⋆IdL _) _ _ ⋆DistL+ _ _ _) λ x y cong a (x ·r y) a) (sym (·IdL _)) ⋆Dist· _ _ _ _ -- helpful for localisations @@ -114,7 +114,7 @@ -- this only works because fst (CommAlgebra→CommRing≡ (A , φ) i) = fst A definitionally! φPathP : PathP i CommRingHom R (CommAlgebra→CommRing≡ (A , φ) i)) (snd (fromCommAlg (toCommAlg (A , φ)))) φ - φPathP = RingHomPathP _ _ _ _ _ _ λ i x ·IdR (snd A) (fst φ x) i + φPathP = RingHomPathP _ _ _ _ _ _ λ i x ·IdR (snd A) (fst φ x) i CommAlgRoundTrip : (A : CommAlgebra R ℓ') toCommAlg (fromCommAlg A) A CommAlgRoundTrip A = ΣPathP (refl , AlgStrPathP) @@ -130,7 +130,7 @@ CommAlgebraStr.-_ (AlgStrPathP i) = -_ CommAlgebraStr._⋆_ (AlgStrPathP i) r x = (⋆AssocL r 1a x cong (r ⋆_) (·IdL x)) i CommAlgebraStr.isCommAlgebra (AlgStrPathP i) = isProp→PathP - i isPropIsCommAlgebra _ _ _ _ _ _ (CommAlgebraStr._⋆_ (AlgStrPathP i))) + i isPropIsCommAlgebra _ _ _ _ _ _ (CommAlgebraStr._⋆_ (AlgStrPathP i))) (CommAlgebraStr.isCommAlgebra (snd (toCommAlg (fromCommAlg A)))) isCommAlgebra i CommAlgIso : Iso (CommAlgebra R ℓ') CommRingWithHom @@ -140,7 +140,7 @@ leftInv CommAlgIso = CommAlgRoundTrip open RingHoms - open IsRingHom + open IsRingHom isCommRingWithHomHom : (A B : CommRingWithHom) CommRingHom (fst A) (fst B) Type (ℓ-max ℓ') isCommRingWithHomHom (_ , f) (_ , g) h = h ∘r f g @@ -150,42 +150,42 @@ toCommAlgebraHom : (A B : CommRingWithHom) (h : CommRingHom (fst A) (fst B)) isCommRingWithHomHom A B h - CommAlgebraHom (toCommAlg A) (toCommAlg B) + CommAlgebraHom (toCommAlg A) (toCommAlg B) toCommAlgebraHom (A , f) (B , g) h commDiag = - makeCommAlgebraHom (fst h) (pres1 (snd h)) (pres+ (snd h)) (pres· (snd h)) pres⋆h + makeCommAlgebraHom (fst h) (pres1 (snd h)) (pres+ (snd h)) (pres· (snd h)) pres⋆h where open CommRingStr ⦃...⦄ instance _ = snd A _ = snd B pres⋆h : r x fst h (fst f r · x) fst g r · fst h x - pres⋆h r x = fst h (fst f r · x) ≡⟨ pres· (snd h) _ _ + pres⋆h r x = fst h (fst f r · x) ≡⟨ pres· (snd h) _ _ fst h (fst f r) · fst h x ≡⟨ cong φ fst φ r · fst h x) commDiag fst g r · fst h x - fromCommAlgebraHom : (A B : CommAlgebra R ℓ') CommAlgebraHom A B + fromCommAlgebraHom : (A B : CommAlgebra R ℓ') CommAlgebraHom A B CommRingWithHomHom (fromCommAlg A) (fromCommAlg B) fst (fst (fromCommAlgebraHom A B f)) = fst f - pres0 (snd (fst (fromCommAlgebraHom A B f))) = IsAlgebraHom.pres0 (snd f) - pres1 (snd (fst (fromCommAlgebraHom A B f))) = IsAlgebraHom.pres1 (snd f) - pres+ (snd (fst (fromCommAlgebraHom A B f))) = IsAlgebraHom.pres+ (snd f) - pres· (snd (fst (fromCommAlgebraHom A B f))) = IsAlgebraHom.pres· (snd f) - pres- (snd (fst (fromCommAlgebraHom A B f))) = IsAlgebraHom.pres- (snd f) + pres0 (snd (fst (fromCommAlgebraHom A B f))) = IsAlgebraHom.pres0 (snd f) + pres1 (snd (fst (fromCommAlgebraHom A B f))) = IsAlgebraHom.pres1 (snd f) + pres+ (snd (fst (fromCommAlgebraHom A B f))) = IsAlgebraHom.pres+ (snd f) + pres· (snd (fst (fromCommAlgebraHom A B f))) = IsAlgebraHom.pres· (snd f) + pres- (snd (fst (fromCommAlgebraHom A B f))) = IsAlgebraHom.pres- (snd f) snd (fromCommAlgebraHom A B f) = - RingHom≡ (funExt x IsAlgebraHom.pres⋆ (snd f) x 1a cong (x ⋆_) (IsAlgebraHom.pres1 (snd f)))) + RingHom≡ (funExt x IsAlgebraHom.pres⋆ (snd f) x 1a cong (x ⋆_) (IsAlgebraHom.pres1 (snd f)))) where open CommAlgebraStr (snd A) using (1a) open CommAlgebraStr (snd B) using (_⋆_) isCommRingWithHomEquiv : (A B : CommRingWithHom) CommRingEquiv (fst A) (fst B) Type (ℓ-max ℓ') - isCommRingWithHomEquiv A B e = isCommRingWithHomHom A B (RingEquiv→RingHom e) + isCommRingWithHomEquiv A B e = isCommRingWithHomHom A B (RingEquiv→RingHom e) CommRingWithHomEquiv : CommRingWithHom CommRingWithHom Type (ℓ-max ℓ') CommRingWithHomEquiv A B = Σ[ e CommRingEquiv (fst A) (fst B) ] isCommRingWithHomEquiv A B e toCommAlgebraEquiv : (A B : CommRingWithHom) (e : CommRingEquiv (fst A) (fst B)) isCommRingWithHomEquiv A B e - CommAlgebraEquiv (toCommAlg A) (toCommAlg B) + CommAlgebraEquiv (toCommAlg A) (toCommAlg B) fst (toCommAlgebraEquiv A B e eCommDiag) = e .fst snd (toCommAlgebraEquiv A B e eCommDiag) = toCommAlgebraHom A B _ eCommDiag .snd @@ -194,29 +194,29 @@ module CommAlgebraHoms {R : CommRing } where open AlgebraHoms - idCommAlgebraHom : (A : CommAlgebra R ℓ') CommAlgebraHom A A + idCommAlgebraHom : (A : CommAlgebra R ℓ') CommAlgebraHom A A idCommAlgebraHom A = idAlgebraHom (CommAlgebra→Algebra A) compCommAlgebraHom : (A : CommAlgebra R ℓ') (B : CommAlgebra R ℓ'') (C : CommAlgebra R ℓ''') - CommAlgebraHom A B CommAlgebraHom B C CommAlgebraHom A C + CommAlgebraHom A B CommAlgebraHom B C CommAlgebraHom A C compCommAlgebraHom A B C = compAlgebraHom {A = CommAlgebra→Algebra A} {B = CommAlgebra→Algebra B} {C = CommAlgebra→Algebra C} _∘ca_ : {A : CommAlgebra R ℓ'} {B : CommAlgebra R ℓ''} {C : CommAlgebra R ℓ'''} - CommAlgebraHom B C CommAlgebraHom A B CommAlgebraHom A C + CommAlgebraHom B C CommAlgebraHom A B CommAlgebraHom A C g ∘ca f = compCommAlgebraHom _ _ _ f g - compIdCommAlgebraHom : {A B : CommAlgebra R ℓ'} (f : CommAlgebraHom A B) + compIdCommAlgebraHom : {A B : CommAlgebra R ℓ'} (f : CommAlgebraHom A B) compCommAlgebraHom _ _ _ (idCommAlgebraHom A) f f compIdCommAlgebraHom = compIdAlgebraHom - idCompCommAlgebraHom : {A B : CommAlgebra R ℓ'} (f : CommAlgebraHom A B) + idCompCommAlgebraHom : {A B : CommAlgebra R ℓ'} (f : CommAlgebraHom A B) compCommAlgebraHom _ _ _ f (idCommAlgebraHom B) f idCompCommAlgebraHom = idCompAlgebraHom compAssocCommAlgebraHom : {A B C D : CommAlgebra R ℓ'} - (f : CommAlgebraHom A B) (g : CommAlgebraHom B C) (h : CommAlgebraHom C D) + (f : CommAlgebraHom A B) (g : CommAlgebraHom B C) (h : CommAlgebraHom C D) compCommAlgebraHom _ _ _ (compCommAlgebraHom _ _ _ f g) h compCommAlgebraHom _ _ _ f (compCommAlgebraHom _ _ _ g h) compAssocCommAlgebraHom = compAssocAlgebraHom @@ -225,7 +225,7 @@ open AlgebraEquivs compCommAlgebraEquiv : {A : CommAlgebra R ℓ'} {B : CommAlgebra R ℓ''} {C : CommAlgebra R ℓ'''} - CommAlgebraEquiv A B CommAlgebraEquiv B C CommAlgebraEquiv A C + CommAlgebraEquiv A B CommAlgebraEquiv B C CommAlgebraEquiv A C compCommAlgebraEquiv {A = A} {B = B} {C = C} = compAlgebraEquiv {A = CommAlgebra→Algebra A} {B = CommAlgebra→Algebra B} {C = CommAlgebra→Algebra C} @@ -268,47 +268,47 @@ helper : transport (sym (ua (CommAlgebra≡ A B))) p transport (sym (ua (CommAlgebra≡ A B))) q helper = Σ≡Prop _ isPropΣ - (isOfHLevelPathP' 1 (is-set (snd B)) _ _) - λ _ isPropΣ (isOfHLevelPathP' 1 (is-set (snd B)) _ _) - λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) - λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) - λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ λ _ is-set (snd B)) _ _) - λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) - λ _ isOfHLevelPathP 1 (isPropIsCommAlgebra _ _ _ _ _ _ _) _ _) + (isOfHLevelPathP' 1 (is-set (snd B)) _ _) + λ _ isPropΣ (isOfHLevelPathP' 1 (is-set (snd B)) _ _) + λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) + λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) + λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ λ _ is-set (snd B)) _ _) + λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) + λ _ isOfHLevelPathP 1 (isPropIsCommAlgebra _ _ _ _ _ _ _) _ _) (transportRefl (cong ⟨_⟩ p) P sym (transportRefl (cong ⟨_⟩ q))) - uaCompCommAlgebraEquiv : {A B C : CommAlgebra R ℓ'} (f : CommAlgebraEquiv A B) (g : CommAlgebraEquiv B C) - uaCommAlgebra (compCommAlgebraEquiv f g) uaCommAlgebra f uaCommAlgebra g + uaCompCommAlgebraEquiv : {A B C : CommAlgebra R ℓ'} (f : CommAlgebraEquiv A B) (g : CommAlgebraEquiv B C) + uaCommAlgebra (compCommAlgebraEquiv f g) uaCommAlgebra f uaCommAlgebra g uaCompCommAlgebraEquiv f g = caracCommAlgebra≡ _ _ ( - cong ⟨_⟩ (uaCommAlgebra (compCommAlgebraEquiv f g)) + cong ⟨_⟩ (uaCommAlgebra (compCommAlgebraEquiv f g)) ≡⟨ uaCompEquiv _ _ - cong ⟨_⟩ (uaCommAlgebra f) cong ⟨_⟩ (uaCommAlgebra g) - ≡⟨ sym (cong-∙ ⟨_⟩ (uaCommAlgebra f) (uaCommAlgebra g)) - cong ⟨_⟩ (uaCommAlgebra f uaCommAlgebra g) ) + cong ⟨_⟩ (uaCommAlgebra f) cong ⟨_⟩ (uaCommAlgebra g) + ≡⟨ sym (cong-∙ ⟨_⟩ (uaCommAlgebra f) (uaCommAlgebra g)) + cong ⟨_⟩ (uaCommAlgebra f uaCommAlgebra g) ) open CommAlgebraHoms open CommAlgebraEquivs open CommAlgebraUAFunctoriality recPT→CommAlgebra : {R : CommRing } {A : Type ℓ'} (𝓕 : A CommAlgebra R ℓ'') - (σ : x y CommAlgebraEquiv (𝓕 x) (𝓕 y)) + (σ : x y CommAlgebraEquiv (𝓕 x) (𝓕 y)) (∀ x y z σ x z compCommAlgebraEquiv (σ x y) (σ y z)) ------------------------------------------------------ A ∥₁ CommAlgebra R ℓ'' -recPT→CommAlgebra 𝓕 σ compCoh = GpdElim.rec→Gpd isGroupoidCommAlgebra 𝓕 - (3-ConstantCompChar 𝓕 x y uaCommAlgebra (σ x y)) - λ x y z sym ( cong uaCommAlgebra (compCoh x y z) +recPT→CommAlgebra 𝓕 σ compCoh = GpdElim.rec→Gpd isGroupoidCommAlgebra 𝓕 + (3-ConstantCompChar 𝓕 x y uaCommAlgebra (σ x y)) + λ x y z sym ( cong uaCommAlgebra (compCoh x y z) uaCompCommAlgebraEquiv (σ x y) (σ y z))) contrCommAlgebraHom→contrCommAlgebraEquiv : {R : CommRing } {A : Type ℓ'} (σ : A CommAlgebra R ℓ'') - (∀ x y isContr (CommAlgebraHom (σ x) (σ y))) + (∀ x y isContr (CommAlgebraHom (σ x) (σ y))) ---------------------------------------------------------------------------- - x y isContr (CommAlgebraEquiv (σ x) (σ y)) + x y isContr (CommAlgebraEquiv (σ x) (σ y)) contrCommAlgebraHom→contrCommAlgebraEquiv σ contrHom x y = σEquiv , - λ e Σ≡Prop _ isPropIsAlgebraHom _ _ _ _) - (Σ≡Prop isPropIsEquiv (cong fst (contrHom _ _ .snd (CommAlgebraEquiv→CommAlgebraHom e)))) + λ e Σ≡Prop _ isPropIsAlgebraHom _ _ _ _) + (Σ≡Prop isPropIsEquiv (cong fst (contrHom _ _ .snd (CommAlgebraEquiv→CommAlgebraHom e)))) where open Iso χ₁ = contrHom x y .fst @@ -325,7 +325,7 @@ rightInv σIso = funExt⁻ (cong fst χ₁∘χ₂≡id) leftInv σIso = funExt⁻ (cong fst χ₂∘χ₁≡id) - σEquiv : CommAlgebraEquiv (σ x) (σ y) + σEquiv : CommAlgebraEquiv (σ x) (σ y) fst σEquiv = isoToEquiv σIso snd σEquiv = snd χ₁ @@ -337,27 +337,27 @@ instance _ = snd A _ = snd B - open IsAlgebraHom + open IsAlgebraHom - CommAlgebraHom→RingHom : CommAlgebraHom A B RingHom (CommAlgebra→Ring A) (CommAlgebra→Ring B) + CommAlgebraHom→RingHom : CommAlgebraHom A B RingHom (CommAlgebra→Ring A) (CommAlgebra→Ring B) fst (CommAlgebraHom→RingHom ϕ) = fst ϕ - IsRingHom.pres0 (snd (CommAlgebraHom→RingHom ϕ)) = pres0 (snd ϕ) - IsRingHom.pres1 (snd (CommAlgebraHom→RingHom ϕ)) = pres1 (snd ϕ) - IsRingHom.pres+ (snd (CommAlgebraHom→RingHom ϕ)) = pres+ (snd ϕ) - IsRingHom.pres· (snd (CommAlgebraHom→RingHom ϕ)) = pres· (snd ϕ) - IsRingHom.pres- (snd (CommAlgebraHom→RingHom ϕ)) = pres- (snd ϕ) + IsRingHom.pres0 (snd (CommAlgebraHom→RingHom ϕ)) = pres0 (snd ϕ) + IsRingHom.pres1 (snd (CommAlgebraHom→RingHom ϕ)) = pres1 (snd ϕ) + IsRingHom.pres+ (snd (CommAlgebraHom→RingHom ϕ)) = pres+ (snd ϕ) + IsRingHom.pres· (snd (CommAlgebraHom→RingHom ϕ)) = pres· (snd ϕ) + IsRingHom.pres- (snd (CommAlgebraHom→RingHom ϕ)) = pres- (snd ϕ) CommAlgebraHomFromRingHom : - (ϕ : RingHom (CommAlgebra→Ring A) (CommAlgebra→Ring B)) + (ϕ : RingHom (CommAlgebra→Ring A) (CommAlgebra→Ring B)) ((r : fst R) (x : fst A) (fst ϕ) (r x) r (fst ϕ x)) - CommAlgebraHom A B + CommAlgebraHom A B fst (CommAlgebraHomFromRingHom ϕ pres*) = fst ϕ - pres0 (snd (CommAlgebraHomFromRingHom ϕ pres*)) = IsRingHom.pres0 (snd ϕ) - pres1 (snd (CommAlgebraHomFromRingHom ϕ pres*)) = IsRingHom.pres1 (snd ϕ) - pres+ (snd (CommAlgebraHomFromRingHom ϕ pres*)) = IsRingHom.pres+ (snd ϕ) - pres· (snd (CommAlgebraHomFromRingHom ϕ pres*)) = IsRingHom.pres· (snd ϕ) - pres- (snd (CommAlgebraHomFromRingHom ϕ pres*)) = IsRingHom.pres- (snd ϕ) - pres⋆ (snd (CommAlgebraHomFromRingHom ϕ pres*)) = pres* + pres0 (snd (CommAlgebraHomFromRingHom ϕ pres*)) = IsRingHom.pres0 (snd ϕ) + pres1 (snd (CommAlgebraHomFromRingHom ϕ pres*)) = IsRingHom.pres1 (snd ϕ) + pres+ (snd (CommAlgebraHomFromRingHom ϕ pres*)) = IsRingHom.pres+ (snd ϕ) + pres· (snd (CommAlgebraHomFromRingHom ϕ pres*)) = IsRingHom.pres· (snd ϕ) + pres- (snd (CommAlgebraHomFromRingHom ϕ pres*)) = IsRingHom.pres- (snd ϕ) + pres⋆ (snd (CommAlgebraHomFromRingHom ϕ pres*)) = pres* module _ {R S : CommRing } (f : CommRingHom S R) where @@ -368,7 +368,7 @@ asRingHom : CommAlgChar.CommRingWithHom R asRingHom = Iso.fun (CommAlgChar.CommAlgIso R) A - baseChangeHom : (A B : CommAlgebra R ℓ') CommAlgebraHom A B CommAlgebraHom (baseChange A) (baseChange B) + baseChangeHom : (A B : CommAlgebra R ℓ') CommAlgebraHom A B CommAlgebraHom (baseChange A) (baseChange B) baseChangeHom A B ϕ = CommAlgChar.toCommAlgebraHom S (fst homA , snd homA ∘r f) (fst homB , snd homB ∘r f) (fst pbSliceHom) (snd pbSliceHom) where open RingHoms @@ -380,5 +380,5 @@ pbSliceHom : Σ[ k CommRingHom (CommAlgebra→CommRing A) (CommAlgebra→CommRing B) ] k ∘r ((snd homA) ∘r f) ((snd homB) ∘r f) - pbSliceHom = fst asSliceHom , Σ≡Prop _ isPropIsRingHom _ _ _) λ i x fst ((snd asSliceHom) i) (fst f x) + pbSliceHom = fst asSliceHom , Σ≡Prop _ isPropIsRingHom _ _ _) λ i x fst ((snd asSliceHom) i) (fst f x) \ No newline at end of file diff --git a/Cubical.Algebra.CommAlgebra.QuotientAlgebra.html b/Cubical.Algebra.CommAlgebra.QuotientAlgebra.html index 357ce5d1f1..2d836f2de5 100644 --- a/Cubical.Algebra.CommAlgebra.QuotientAlgebra.html +++ b/Cubical.Algebra.CommAlgebra.QuotientAlgebra.html @@ -20,7 +20,7 @@ open import Cubical.Algebra.CommAlgebra.Ideal open import Cubical.Algebra.CommAlgebra.Kernel open import Cubical.Algebra.CommAlgebra.Instances.Unit -open import Cubical.Algebra.Algebra.Base using (IsAlgebraHom; isPropIsAlgebraHom) +open import Cubical.Algebra.Algebra.Base using (IsAlgebraHom; isPropIsAlgebraHom) open import Cubical.Algebra.Ring open import Cubical.Algebra.Ring.Ideal using (isIdeal) open import Cubical.Tactics.CommRingSolver.Reflection @@ -49,7 +49,7 @@ _ = snd A _/_ : CommAlgebra R - _/_ = commAlgebraFromCommRing + _/_ = commAlgebraFromCommRing A/IAsCommRing r elim _ squash/) x [ r x ]) (eq r)) r s elimProp _ squash/ _ _) @@ -84,14 +84,14 @@ r x - r y ) (isCommIdeal.·Closed (snd I) _ x-y∈I)) - quotientHom : CommAlgebraHom A (_/_) + quotientHom : CommAlgebraHom A (_/_) fst quotientHom x = [ x ] - IsAlgebraHom.pres0 (snd quotientHom) = refl - IsAlgebraHom.pres1 (snd quotientHom) = refl - IsAlgebraHom.pres+ (snd quotientHom) _ _ = refl - IsAlgebraHom.pres· (snd quotientHom) _ _ = refl - IsAlgebraHom.pres- (snd quotientHom) _ = refl - IsAlgebraHom.pres⋆ (snd quotientHom) _ _ = refl + IsAlgebraHom.pres0 (snd quotientHom) = refl + IsAlgebraHom.pres1 (snd quotientHom) = refl + IsAlgebraHom.pres+ (snd quotientHom) _ _ = refl + IsAlgebraHom.pres· (snd quotientHom) _ _ = refl + IsAlgebraHom.pres- (snd quotientHom) _ = refl + IsAlgebraHom.pres⋆ (snd quotientHom) _ _ = refl module _ {R : CommRing } (A : CommAlgebra R ) (I : IdealsIn A) where abstract open CommRingStr {{...}} hiding (_-_; -_; ·IdL; ·DistR+) renaming (_·_ to _·R_; _+_ to _+R_) @@ -110,7 +110,7 @@ RRing = (CommAlgebra→Ring A) Ring./ (CommIdeal→Ideal I) -- sanity check / maybe a helper function some day - CommForget/ : RingEquiv (CommAlgebra→Ring (A / I)) ((CommAlgebra→Ring A) Ring./ (CommIdeal→Ideal I)) + CommForget/ : RingEquiv (CommAlgebra→Ring (A / I)) ((CommAlgebra→Ring A) Ring./ (CommIdeal→Ideal I)) fst CommForget/ = isoToEquiv (iso @@ -118,16 +118,16 @@ (rec (isSetRing RRing) a [ a ]) a b a-b∈I eq/ a b a-b∈I)) (elimProp _ isSetRing LRing _ _) λ _ refl) (elimProp _ isSetRing RRing _ _) _ refl))) - IsRingHom.pres0 (snd CommForget/) = refl - IsRingHom.pres1 (snd CommForget/) = refl - IsRingHom.pres+ (snd CommForget/) = elimProp2 _ _ isSetRing RRing _ _) _ _ refl) - IsRingHom.pres· (snd CommForget/) = elimProp2 _ _ isSetRing RRing _ _) _ _ refl) - IsRingHom.pres- (snd CommForget/) = elimProp _ isSetRing RRing _ _) _ refl) - - open IsAlgebraHom - inducedHom : (B : CommAlgebra R ) (ϕ : CommAlgebraHom A B) + IsRingHom.pres0 (snd CommForget/) = refl + IsRingHom.pres1 (snd CommForget/) = refl + IsRingHom.pres+ (snd CommForget/) = elimProp2 _ _ isSetRing RRing _ _) _ _ refl) + IsRingHom.pres· (snd CommForget/) = elimProp2 _ _ isSetRing RRing _ _) _ _ refl) + IsRingHom.pres- (snd CommForget/) = elimProp _ isSetRing RRing _ _) _ refl) + + open IsAlgebraHom + inducedHom : (B : CommAlgebra R ) (ϕ : CommAlgebraHom A B) (fst I) (fst (kernel A B ϕ)) - CommAlgebraHom (A / I) B + CommAlgebraHom (A / I) B fst (inducedHom B ϕ I⊆kernel) = let open RingTheory (CommRing→Ring (CommAlgebra→CommRing B)) instance @@ -139,28 +139,28 @@ λ a b a-b∈I equalByDifference (fst ϕ a) (fst ϕ b) - ((fst ϕ a) - (fst ϕ b) ≡⟨ cong u (fst ϕ a) + u) (sym (IsAlgebraHom.pres- (snd ϕ) _)) - (fst ϕ a) + (fst ϕ (- b)) ≡⟨ sym (IsAlgebraHom.pres+ (snd ϕ) _ _) + ((fst ϕ a) - (fst ϕ b) ≡⟨ cong u (fst ϕ a) + u) (sym (IsAlgebraHom.pres- (snd ϕ) _)) + (fst ϕ a) + (fst ϕ (- b)) ≡⟨ sym (IsAlgebraHom.pres+ (snd ϕ) _ _) fst ϕ (a - b) ≡⟨ I⊆kernel (a - b) a-b∈I 0r ) - pres0 (snd (inducedHom B ϕ kernel⊆I)) = pres0 (snd ϕ) - pres1 (snd (inducedHom B ϕ kernel⊆I)) = pres1 (snd ϕ) - pres+ (snd (inducedHom B ϕ kernel⊆I)) = elimProp2 _ _ isSetCommAlgebra B _ _) (pres+ (snd ϕ)) - pres· (snd (inducedHom B ϕ kernel⊆I)) = elimProp2 _ _ isSetCommAlgebra B _ _) (pres· (snd ϕ)) - pres- (snd (inducedHom B ϕ kernel⊆I)) = elimProp _ isSetCommAlgebra B _ _) (pres- (snd ϕ)) - pres⋆ (snd (inducedHom B ϕ kernel⊆I)) = λ r elimProp _ isSetCommAlgebra B _ _) (pres⋆ (snd ϕ) r) - - inducedHom∘quotientHom : (B : CommAlgebra R ) (ϕ : CommAlgebraHom A B) + pres0 (snd (inducedHom B ϕ kernel⊆I)) = pres0 (snd ϕ) + pres1 (snd (inducedHom B ϕ kernel⊆I)) = pres1 (snd ϕ) + pres+ (snd (inducedHom B ϕ kernel⊆I)) = elimProp2 _ _ isSetCommAlgebra B _ _) (pres+ (snd ϕ)) + pres· (snd (inducedHom B ϕ kernel⊆I)) = elimProp2 _ _ isSetCommAlgebra B _ _) (pres· (snd ϕ)) + pres- (snd (inducedHom B ϕ kernel⊆I)) = elimProp _ isSetCommAlgebra B _ _) (pres- (snd ϕ)) + pres⋆ (snd (inducedHom B ϕ kernel⊆I)) = λ r elimProp _ isSetCommAlgebra B _ _) (pres⋆ (snd ϕ) r) + + inducedHom∘quotientHom : (B : CommAlgebra R ) (ϕ : CommAlgebraHom A B) (I⊆kerϕ : fst I fst (kernel A B ϕ)) inducedHom B ϕ I⊆kerϕ ∘a quotientHom A I ϕ - inducedHom∘quotientHom B ϕ I⊆kerϕ = Σ≡Prop (isPropIsCommAlgebraHom {M = A} {N = B}) (funExt a refl)) + inducedHom∘quotientHom B ϕ I⊆kerϕ = Σ≡Prop (isPropIsCommAlgebraHom {M = A} {N = B}) (funExt a refl)) - injectivePrecomp : (B : CommAlgebra R ) (f g : CommAlgebraHom (A / I) B) + injectivePrecomp : (B : CommAlgebra R ) (f g : CommAlgebraHom (A / I) B) f ∘a (quotientHom A I) g ∘a (quotientHom A I) f g injectivePrecomp B f g p = Σ≡Prop - h isPropIsAlgebraHom (CommRing→Ring R) (snd (CommAlgebra→Algebra (A / I))) h (snd (CommAlgebra→Algebra B))) + h isPropIsAlgebraHom (CommRing→Ring R) (snd (CommAlgebra→Algebra (A / I))) h (snd (CommAlgebra→Algebra B))) (descendMapPath (fst f) (fst g) (isSetCommAlgebra B) λ x λ i fst (p i) x) @@ -169,7 +169,7 @@ module _ {R : CommRing } (A : CommAlgebra R ) where abstract open CommAlgebraStr (snd A) - oneIdealQuotient : CommAlgebraEquiv (A / (1Ideal A)) (UnitCommAlgebra R {ℓ' = }) + oneIdealQuotient : CommAlgebraEquiv (A / (1Ideal A)) (UnitCommAlgebra R {ℓ' = }) fst oneIdealQuotient = isoToEquiv (iso (fst (terminalMap R (A / (1Ideal A)))) _ [ 0a ]) @@ -178,7 +178,7 @@ λ a eq/ 0a a tt*)) snd oneIdealQuotient = snd (terminalMap R (A / (1Ideal A))) - zeroIdealQuotient : CommAlgebraEquiv A (A / (0Ideal A)) + zeroIdealQuotient : CommAlgebraEquiv A (A / (0Ideal A)) fst zeroIdealQuotient = let open RingTheory (CommRing→Ring (CommAlgebra→CommRing A)) in isoToEquiv (iso (fst (quotientHom A (0Ideal A))) @@ -199,7 +199,7 @@ private module _ where -- non-abstract abbreviation - π : CommAlgebraHom A (A / I) + π : CommAlgebraHom A (A / I) π = quotientHom A I kernel≡I : kernel A (A / I) π I diff --git a/Cubical.Algebra.CommAlgebra.Subalgebra.html b/Cubical.Algebra.CommAlgebra.Subalgebra.html index eec489dbe4..3dade14973 100644 --- a/Cubical.Algebra.CommAlgebra.Subalgebra.html +++ b/Cubical.Algebra.CommAlgebra.Subalgebra.html @@ -26,21 +26,21 @@ , record { AlgebraStr (Subalgebra→Algebra S .snd) ; isCommAlgebra = iscommalgebra - (Subalgebra→Algebra S .snd .AlgebraStr.isAlgebra) + (Subalgebra→Algebra S .snd .AlgebraStr.isAlgebra) x y Subalgebra→CommAlgebra≡ (CommAlgebraStr.·Comm (snd A) (fst x) (fst y)))} - Subalgebra→CommAlgebraHom : CommAlgebraHom Subalgebra→CommAlgebra A + Subalgebra→CommAlgebraHom : CommAlgebraHom Subalgebra→CommAlgebra A Subalgebra→CommAlgebraHom = Subalgebra→AlgebraHom S - SubalgebraHom : (B : CommAlgebra R ℓ') (f : CommAlgebraHom B A) + SubalgebraHom : (B : CommAlgebra R ℓ') (f : CommAlgebraHom B A) ((b : B ) fst f b fst S) - CommAlgebraHom B Subalgebra→CommAlgebra - SubalgebraHom _ f fb∈S = let open IsAlgebraHom (f .snd) + CommAlgebraHom B Subalgebra→CommAlgebra + SubalgebraHom _ f fb∈S = let open IsAlgebraHom (f .snd) in b (f .fst b) , fb∈S b) - , makeIsAlgebraHom (Subalgebra→CommAlgebra≡ pres1) - x y Subalgebra→CommAlgebra≡ (pres+ x y)) - x y Subalgebra→CommAlgebra≡ (pres· x y)) - x y Subalgebra→CommAlgebra≡ (pres⋆ x y)) + , makeIsAlgebraHom (Subalgebra→CommAlgebra≡ pres1) + x y Subalgebra→CommAlgebra≡ (pres+ x y)) + x y Subalgebra→CommAlgebra≡ (pres· x y)) + x y Subalgebra→CommAlgebra≡ (pres⋆ x y)) \ No newline at end of file diff --git a/Cubical.Algebra.CommAlgebra.UnivariatePolyList.html b/Cubical.Algebra.CommAlgebra.UnivariatePolyList.html index c8156661fa..697175d6a3 100644 --- a/Cubical.Algebra.CommAlgebra.UnivariatePolyList.html +++ b/Cubical.Algebra.CommAlgebra.UnivariatePolyList.html @@ -46,11 +46,11 @@ generator = X {- Universal Property -} - module _ (A : Algebra (CommRing→Ring R) ℓ') where - open AlgebraStr ⦃...⦄ using (_⋆_; 0a; 1a; ⋆IdL; ⋆DistL+; ⋆DistR+; ⋆AssocL; ⋆AssocR; ⋆Assoc) + module _ (A : Algebra (CommRing→Ring R) ℓ') where + open AlgebraStr ⦃...⦄ using (_⋆_; 0a; 1a; ⋆IdL; ⋆DistL+; ⋆DistR+; ⋆AssocL; ⋆AssocR; ⋆Assoc) private instance _ = snd A - _ = snd (Algebra→Ring A) + _ = snd (Algebra→Ring A) _ = snd (CommAlgebra→Algebra ListPolyCommAlgebra) module _ (x : A ) where @@ -60,76 +60,76 @@ open PolyMod using (ElimProp; elimProp2; isSetPoly) inducedMap : ListPolyCommAlgebra A - inducedMap [] = 0a - inducedMap (a p) = a 1a + (x · inducedMap p) + inducedMap [] = 0a + inducedMap (a p) = a 1a + (x · inducedMap p) inducedMap (drop0 i) = eq i where - eq = 0r 1a + (x · 0a) ≡[ i ]⟨ ⋆AnnihilL (CommRing→Ring R) A 1a i + (x · 0a) - 0a + (x · 0a) ≡⟨ +IdL (x · 0a) - x · 0a ≡⟨ 0RightAnnihilates (Algebra→Ring A) x - 0a + eq = 0r 1a + (x · 0a) ≡[ i ]⟨ ⋆AnnihilL (CommRing→Ring R) A 1a i + (x · 0a) + 0a + (x · 0a) ≡⟨ +IdL (x · 0a) + x · 0a ≡⟨ 0RightAnnihilates (Algebra→Ring A) x + 0a private ϕ = inducedMap - inducedMap1 : ϕ (1r []) 1a + inducedMap1 : ϕ (1r []) 1a inducedMap1 = ϕ [ 1r ] ≡⟨⟩ - 1r 1a + (x · 0a) ≡[ i ]⟨ ⋆IdL 1a i + 0RightAnnihilates (Algebra→Ring A) x i - 1a + 0a ≡⟨ +IdR 1a - 1a + 1r 1a + (x · 0a) ≡[ i ]⟨ ⋆IdL 1a i + 0RightAnnihilates (Algebra→Ring A) x i + 1a + 0a ≡⟨ +IdR 1a + 1a - inducedMapPolyConst⋆ : (r : R ) (p : _) ϕ (r PolyConst* p) r ϕ p + inducedMapPolyConst⋆ : (r : R ) (p : _) ϕ (r PolyConst* p) r ϕ p inducedMapPolyConst⋆ r = ElimProp R - p ϕ (r PolyConst* p) r ϕ p) + p ϕ (r PolyConst* p) r ϕ p) (ϕ (r PolyConst* []) ≡⟨⟩ ϕ [] ≡⟨⟩ - 0a ≡⟨ sym (⋆AnnihilR (CommRing→Ring R) A r) - r 0a ) + 0a ≡⟨ sym (⋆AnnihilR (CommRing→Ring R) A r) + r 0a ) s p IH ϕ (r PolyConst* (s p)) ≡⟨⟩ ϕ ((r · s) (r PolyConst* p)) ≡⟨⟩ - (r · s) 1a + x · ϕ (r PolyConst* p) ≡[ i ]⟨ ⋆Assoc r s 1a i + x · IH i - r (s 1a) + x · (r ϕ p) ≡⟨ step s p - r (s 1a) + r (x · ϕ p) ≡⟨ sym (⋆DistR+ r (s 1a) (x · ϕ p)) - r (s 1a + x · ϕ p) ≡⟨⟩ - r ϕ (s p) ) + (r · s) 1a + x · ϕ (r PolyConst* p) ≡[ i ]⟨ ⋆Assoc r s 1a i + x · IH i + r (s 1a) + x · (r ϕ p) ≡⟨ step s p + r (s 1a) + r (x · ϕ p) ≡⟨ sym (⋆DistR+ r (s 1a) (x · ϕ p)) + r (s 1a + x · ϕ p) ≡⟨⟩ + r ϕ (s p) ) (is-set _ _) where step : (s : R ) (p : _) _ _ - step s p i = r (s 1a) + sym (⋆AssocR r x (ϕ p)) i + step s p i = r (s 1a) + sym (⋆AssocR r x (ϕ p)) i - inducedMap⋆ : (r : R ) (p : _) ϕ (r p) r ϕ p + inducedMap⋆ : (r : R ) (p : _) ϕ (r p) r ϕ p inducedMap⋆ r p = - ϕ (r p) ≡⟨ cong ϕ (sym (PolyConst*≡Poly* r p)) + ϕ (r p) ≡⟨ cong ϕ (sym (PolyConst*≡Poly* r p)) ϕ (r PolyConst* p) ≡⟨ inducedMapPolyConst⋆ r p - r ϕ p + r ϕ p inducedMap+ : (p q : _) ϕ (p + q) ϕ p + ϕ q inducedMap+ = elimProp2 R x y ϕ (x + y) ϕ x + ϕ y) - (0a ≡⟨ sym (+IdR _) 0a + 0a ) + (0a ≡⟨ sym (+IdR _) 0a + 0a ) r p _ ϕ ((r p) + []) ≡⟨⟩ ϕ (r p) ≡⟨ sym (+IdR _) - (ϕ (r p) + 0a) ) + (ϕ (r p) + 0a) ) s q _ ϕ ([] + (s q)) ≡⟨⟩ ϕ (s q) ≡⟨ sym (+IdL _) - 0a + ϕ (s q) ) + 0a + ϕ (s q) ) r s p q IH ϕ ((r p) + (s q)) ≡⟨⟩ ϕ (r + s p + q) ≡⟨⟩ - (r + s) 1a + x · ϕ (p + q) ≡[ i ]⟨ (r + s) 1a + x · IH i - (r + s) 1a + (x · (ϕ p + ϕ q)) ≡[ i ]⟨ step1 r s p q i - (r 1a + s 1a) + (x · ϕ p + x · ϕ q) ≡⟨ comm-4 (Algebra→AbGroup A) _ _ _ _ - (r 1a + x · ϕ p) + (s 1a + x · ϕ q) ≡⟨⟩ + (r + s) 1a + x · ϕ (p + q) ≡[ i ]⟨ (r + s) 1a + x · IH i + (r + s) 1a + (x · (ϕ p + ϕ q)) ≡[ i ]⟨ step1 r s p q i + (r 1a + s 1a) + (x · ϕ p + x · ϕ q) ≡⟨ comm-4 (Algebra→AbGroup A) _ _ _ _ + (r 1a + x · ϕ p) + (s 1a + x · ϕ q) ≡⟨⟩ ϕ (r p) + ϕ (s q) ) (is-set _ _) where step1 : (r s : R ) (p q : _) _ _ - step1 r s p q i = ⋆DistL+ r s 1a i + ·DistR+ x (ϕ p) (ϕ q) i - M = (AbGroup→CommMonoid (Algebra→AbGroup A)) + step1 r s p q i = ⋆DistL+ r s 1a i + ·DistR+ x (ϕ p) (ϕ q) i + M = (AbGroup→CommMonoid (Algebra→AbGroup A)) inducedMap· : (p q : _) ϕ (p · q) ϕ p · ϕ q inducedMap· p q = @@ -137,20 +137,20 @@ p ϕ (p · q) ϕ p · ϕ q) (ϕ ([] · q) ≡⟨⟩ ϕ [] ≡⟨⟩ - 0a ≡⟨ sym (0LeftAnnihilates (Algebra→Ring A) _) - 0a · ϕ q ) + 0a ≡⟨ sym (0LeftAnnihilates (Algebra→Ring A) _) + 0a · ϕ q ) r p IH ϕ ((r p) · q) ≡⟨⟩ ϕ ((r PolyConst* q) + (0r (p · q))) ≡⟨ step1 r p ϕ (r PolyConst* q) + ϕ (0r (p · q)) ≡⟨ step2 r p - ϕ (r q) + ϕ (0r (p · q)) ≡⟨ step3 r p - r ϕ q + ϕ (0r (p · q)) ≡⟨ step4 r p - r ϕ q + (0a + x · ϕ (p · q)) ≡⟨ step5 r p - r ϕ q + x · ϕ (p · q) ≡⟨ step6 r p IH - r ϕ q + x · (ϕ p · ϕ q) ≡⟨ step7 r p - r (1a · ϕ q) + (x · ϕ p) · ϕ q ≡⟨ step8 r p - (r 1a) · ϕ q + (x · ϕ p) · ϕ q ≡⟨ sym (·DistL+ _ _ _) - (r 1a + x · ϕ p) · ϕ q ≡⟨⟩ + ϕ (r q) + ϕ (0r (p · q)) ≡⟨ step3 r p + r ϕ q + ϕ (0r (p · q)) ≡⟨ step4 r p + r ϕ q + (0a + x · ϕ (p · q)) ≡⟨ step5 r p + r ϕ q + x · ϕ (p · q) ≡⟨ step6 r p IH + r ϕ q + x · (ϕ p · ϕ q) ≡⟨ step7 r p + r (1a · ϕ q) + (x · ϕ p) · ϕ q ≡⟨ step8 r p + (r 1a) · ϕ q + (x · ϕ p) · ϕ q ≡⟨ sym (·DistL+ _ _ _) + (r 1a + x · ϕ p) · ϕ q ≡⟨⟩ ϕ (r p) · ϕ q ) (is-set _ _) p where @@ -164,56 +164,56 @@ step3 r p i = inducedMap⋆ r q i + ϕ (0r (p Poly* q)) step4 : (r : R ) (p : _) _ _ - step4 r p i = r ϕ q + (⋆AnnihilL (CommRing→Ring R) A 1a i + x · ϕ (p · q)) + step4 r p i = r ϕ q + (⋆AnnihilL (CommRing→Ring R) A 1a i + x · ϕ (p · q)) step5 : (r : R ) (p : _) _ _ - step5 r p i = r ϕ q + +IdL (x · ϕ (p · q)) i + step5 r p i = r ϕ q + +IdL (x · ϕ (p · q)) i step6 : (r : R ) (p : _) _ _ _ - step6 r p IH i = r ϕ q + x · IH i + step6 r p IH i = r ϕ q + x · IH i step7 : (r : R ) (p : _) _ _ - step7 r p i = r (sym (·IdL (ϕ q)) i) + ·Assoc x (ϕ p) (ϕ q) i + step7 r p i = r (sym (·IdL (ϕ q)) i) + ·Assoc x (ϕ p) (ϕ q) i step8 : (r : R ) (p : _) _ _ - step8 r p i = sym (⋆AssocL r 1a (ϕ q)) i + (x · ϕ p) · ϕ q + step8 r p i = sym (⋆AssocL r 1a (ϕ q)) i + (x · ϕ p) · ϕ q - inducedHom : AlgebraHom (CommAlgebra→Algebra ListPolyCommAlgebra) A + inducedHom : AlgebraHom (CommAlgebra→Algebra ListPolyCommAlgebra) A fst inducedHom = inducedMap - snd inducedHom = makeIsAlgebraHom inducedMap1 inducedMap+ inducedMap· inducedMap⋆ + snd inducedHom = makeIsAlgebraHom inducedMap1 inducedMap+ inducedMap· inducedMap⋆ inducedMapGenerator : ϕ X x inducedMapGenerator = - 0r 1a + (x · ϕ (1r [])) ≡[ i ]⟨ ⋆AnnihilL - (CommRing→Ring R) A 1a i + (x · ϕ (1r [])) - 0a + (x · ϕ (1r [])) ≡⟨ +IdL _ + 0r 1a + (x · ϕ (1r [])) ≡[ i ]⟨ ⋆AnnihilL + (CommRing→Ring R) A 1a i + (x · ϕ (1r [])) + 0a + (x · ϕ (1r [])) ≡⟨ +IdL _ x · ϕ (1r []) ≡[ i ]⟨ x · inducedMap1 i - x · 1a ≡⟨ ·IdR _ + x · 1a ≡⟨ ·IdR _ x {- Uniqueness -} - inducedHomUnique : (f : AlgebraHom (CommAlgebra→Algebra ListPolyCommAlgebra) A) + inducedHomUnique : (f : AlgebraHom (CommAlgebra→Algebra ListPolyCommAlgebra) A) fst f X x f inducedHom inducedHomUnique f fX≡x = Σ≡Prop - _ isPropIsAlgebraHom _ _ _ _) + _ isPropIsAlgebraHom _ _ _ _) λ i p pwEq p i where - open IsAlgebraHom (snd f) + open IsAlgebraHom (snd f) pwEq : (p : ListPolyCommAlgebra ) fst f p fst inducedHom p pwEq = ElimProp R p fst f p fst inducedHom p) - pres0 + pres0 r p IH fst f (r p) ≡[ i ]⟨ fst f ((sym (+IdR r) i) sym (Poly+Lid p) i) fst f ([ r ] + (0r p)) ≡[ i ]⟨ fst f ([ useSolver r i ] + sym (X*Poly p) i) - fst f (r 1a + X · p) ≡⟨ pres+ (r 1a) (X · p) - fst f (r 1a) + fst f (X · p) ≡[ i ]⟨ pres⋆ r 1a i + pres· X p i - r fst f 1a + fst f X · fst f p ≡[ i ]⟨ r pres1 i + fX≡x i · fst f p - r 1a + x · fst f p ≡[ i ]⟨ r 1a + (x · IH i) - r 1a + x · inducedMap p ≡⟨⟩ + fst f (r 1a + X · p) ≡⟨ pres+ (r 1a) (X · p) + fst f (r 1a) + fst f (X · p) ≡[ i ]⟨ pres⋆ r 1a i + pres· X p i + r fst f 1a + fst f X · fst f p ≡[ i ]⟨ r pres1 i + fX≡x i · fst f p + r 1a + x · fst f p ≡[ i ]⟨ r 1a + (x · IH i) + r 1a + x · inducedMap p ≡⟨⟩ inducedMap (r p) ) (is-set _ _) where @@ -222,14 +222,14 @@ {- Reforumlation in terms of the R-AlgebraHom from R[X] to A -} - indcuedHomEquivalence : AlgebraHom (CommAlgebra→Algebra ListPolyCommAlgebra) A A + indcuedHomEquivalence : AlgebraHom (CommAlgebra→Algebra ListPolyCommAlgebra) A A fst indcuedHomEquivalence f = fst f X fst (fst (equiv-proof (snd indcuedHomEquivalence) x)) = inducedHom x snd (fst (equiv-proof (snd indcuedHomEquivalence) x)) = inducedMapGenerator x snd (equiv-proof (snd indcuedHomEquivalence) x) (g , gX≡x) = - Σ≡Prop _ isSetAlgebra A _ _) (sym (inducedHomUnique x g gX≡x)) + Σ≡Prop _ isSetAlgebra A _ _) (sym (inducedHomUnique x g gX≡x)) - equalByUMP : (f g : AlgebraHom (CommAlgebra→Algebra ListPolyCommAlgebra) A) + equalByUMP : (f g : AlgebraHom (CommAlgebra→Algebra ListPolyCommAlgebra) A) fst f X fst g X (x : ListPolyCommAlgebra ) fst f x fst g x equalByUMP f g fX≡gX x = @@ -240,7 +240,7 @@ {- A corollary, which is useful for constructing isomorphisms to algebras with the same universal property -} - isIdByUMP : (f : CommAlgebraHom ListPolyCommAlgebra ListPolyCommAlgebra) + isIdByUMP : (f : CommAlgebraHom ListPolyCommAlgebra ListPolyCommAlgebra) fst f X X (x : ListPolyCommAlgebra ) fst f x x isIdByUMP f = diff --git a/Cubical.Algebra.CommMonoid.Base.html b/Cubical.Algebra.CommMonoid.Base.html index a86297dfd9..9114c57a90 100644 --- a/Cubical.Algebra.CommMonoid.Base.html +++ b/Cubical.Algebra.CommMonoid.Base.html @@ -82,49 +82,41 @@ CommMonoid→Monoid : CommMonoid Monoid CommMonoid→Monoid (_ , commmonoidstr _ _ M) = _ , monoidstr _ _ (IsCommMonoid.isMonoid M) -isSetFromIsCommMonoid : - {M : Type } {ε : M} {_·_ : M M M} - (isCommMonoid : IsCommMonoid ε _·_) - isSet M -isSetFromIsCommMonoid isCommMonoid = - let open IsCommMonoid isCommMonoid - in is-set - -isSetCommMonoid : (M : CommMonoid ) isSet M -isSetCommMonoid M = - let open CommMonoidStr (snd M) - in isSetFromIsCommMonoid isCommMonoid - -CommMonoidHom : (L : CommMonoid ) (M : CommMonoid ℓ') Type (ℓ-max ℓ') -CommMonoidHom L M = MonoidHom (CommMonoid→Monoid L) (CommMonoid→Monoid M) - -IsCommMonoidEquiv : {A : Type } {B : Type ℓ'} - (M : CommMonoidStr A) (e : A B) (N : CommMonoidStr B) Type (ℓ-max ℓ') -IsCommMonoidEquiv M e N = IsMonoidHom (CommMonoidStr→MonoidStr M) (e .fst) (CommMonoidStr→MonoidStr N) - -CommMonoidEquiv : (M : CommMonoid ) (N : CommMonoid ℓ') Type (ℓ-max ℓ') -CommMonoidEquiv M N = Σ[ e (M .fst N .fst) ] IsCommMonoidEquiv (M .snd) e (N .snd) - -isPropIsCommMonoid : {M : Type } (ε : M) (_·_ : M M M) - isProp (IsCommMonoid ε _·_) -isPropIsCommMonoid ε _·_ = - isOfHLevelRetractFromIso 1 IsCommMonoidIsoΣ - (isPropΣ (isPropIsMonoid ε _·_) - λ mon isPropΠ2 _ _ mon .is-set _ _)) - where - open IsMonoid - -𝒮ᴰ-CommMonoid : DUARel (𝒮-Univ ) CommMonoidStr -𝒮ᴰ-CommMonoid = - 𝒮ᴰ-Record (𝒮-Univ _) IsCommMonoidEquiv - (fields: - data[ ε autoDUARel _ _ presε ] - data[ _·_ autoDUARel _ _ pres· ] - prop[ isCommMonoid _ _ isPropIsCommMonoid _ _) ]) - where - open CommMonoidStr - open IsMonoidHom - -CommMonoidPath : (M N : CommMonoid ) CommMonoidEquiv M N (M N) -CommMonoidPath = 𝒮ᴰ-CommMonoid .UARel.ua +isSetCommMonoid : (M : CommMonoid ) isSet M +isSetCommMonoid M = is-set + where + open CommMonoidStr (str M) + +CommMonoidHom : (L : CommMonoid ) (M : CommMonoid ℓ') Type (ℓ-max ℓ') +CommMonoidHom L M = MonoidHom (CommMonoid→Monoid L) (CommMonoid→Monoid M) + +IsCommMonoidEquiv : {A : Type } {B : Type ℓ'} + (M : CommMonoidStr A) (e : A B) (N : CommMonoidStr B) Type (ℓ-max ℓ') +IsCommMonoidEquiv M e N = IsMonoidHom (CommMonoidStr→MonoidStr M) (e .fst) (CommMonoidStr→MonoidStr N) + +CommMonoidEquiv : (M : CommMonoid ) (N : CommMonoid ℓ') Type (ℓ-max ℓ') +CommMonoidEquiv M N = Σ[ e (M .fst N .fst) ] IsCommMonoidEquiv (M .snd) e (N .snd) + +isPropIsCommMonoid : {M : Type } (ε : M) (_·_ : M M M) + isProp (IsCommMonoid ε _·_) +isPropIsCommMonoid ε _·_ = + isOfHLevelRetractFromIso 1 IsCommMonoidIsoΣ + (isPropΣ (isPropIsMonoid ε _·_) + λ mon isPropΠ2 _ _ mon .is-set _ _)) + where + open IsMonoid + +𝒮ᴰ-CommMonoid : DUARel (𝒮-Univ ) CommMonoidStr +𝒮ᴰ-CommMonoid = + 𝒮ᴰ-Record (𝒮-Univ _) IsCommMonoidEquiv + (fields: + data[ ε autoDUARel _ _ presε ] + data[ _·_ autoDUARel _ _ pres· ] + prop[ isCommMonoid _ _ isPropIsCommMonoid _ _) ]) + where + open CommMonoidStr + open IsMonoidHom + +CommMonoidPath : (M N : CommMonoid ) CommMonoidEquiv M N (M N) +CommMonoidPath = 𝒮ᴰ-CommMonoid .UARel.ua \ No newline at end of file diff --git a/Cubical.Algebra.CommMonoid.GrothendieckGroup.html b/Cubical.Algebra.CommMonoid.GrothendieckGroup.html index fa91783444..a76be0ff78 100644 --- a/Cubical.Algebra.CommMonoid.GrothendieckGroup.html +++ b/Cubical.Algebra.CommMonoid.GrothendieckGroup.html @@ -130,7 +130,7 @@ Groupification M -} - universalHom : CommMonoidHom M (AbGroup→CommMonoid (Groupification M)) + universalHom : CommMonoidHom M (AbGroup→CommMonoid (Groupification M)) fst universalHom = λ m [ m , ε ] pres· (snd universalHom) = λ _ _ eq/ _ _ (ε , cong (ε ·_) (·Comm _ _ cong₂ _·_ (·IdR ε) refl)) @@ -139,7 +139,7 @@ private i = fst universalHom - module _ {A : AbGroup } (φ : CommMonoidHom M (AbGroup→CommMonoid A)) where + module _ {A : AbGroup } (φ : CommMonoidHom M (AbGroup→CommMonoid A)) where open IsGroupHom open GroupTheory (AbGroup→Group A) @@ -155,7 +155,7 @@ module φ = IsMonoidHom (snd φ) f = fst φ - inducedHom : AbGroupHom (Groupification M) A + inducedHom : AbGroupHom (Groupification M) A fst inducedHom = elim x isSetAbGroup A) g proof where g = λ (a , b) f a - f b @@ -212,7 +212,7 @@ solution : (m : M ) (fst inducedHom) (i m) f m solution m = cong ((f m)+_) ((cong (-_) φ.presε) inv1g) ·IdR _ - unique : (ψ : AbGroupHom (Groupification M) A) + unique : (ψ : AbGroupHom (Groupification M) A) (ψIsSolution : (m : M ) ψ .fst (i m) f m) (u : M ) ψ .fst [ u ] inducedHom .fst [ u ] unique ψ ψIsSolution (a , b) = diff --git a/Cubical.Algebra.CommMonoid.Properties.html b/Cubical.Algebra.CommMonoid.Properties.html index dddadf2323..cd0533a0d6 100644 --- a/Cubical.Algebra.CommMonoid.Properties.html +++ b/Cubical.Algebra.CommMonoid.Properties.html @@ -34,28 +34,28 @@ (x · y) , ·Closed x y xContained yContained IsCommMonoid.isMonoid (CommMonoidStr.isCommMonoid (snd makeSubCommMonoid)) = makeIsMonoid - (isOfHLevelΣ 2 (isSetFromIsCommMonoid isCommMonoid) λ _ isProp→isSet (snd (P _))) - x y z Σ≡Prop _ snd (P _)) (·Assoc (fst x) (fst y) (fst z))) - x Σ≡Prop _ snd (P _)) (·IdR (fst x))) - λ x Σ≡Prop _ snd (P _)) (·IdL (fst x)) - IsCommMonoid.·Comm (CommMonoidStr.isCommMonoid (snd makeSubCommMonoid)) = - λ x y Σ≡Prop _ snd (P _)) (·Comm (fst x) (fst y)) + (isOfHLevelΣ 2 is-set λ _ isProp→isSet (snd (P _))) + x y z Σ≡Prop _ snd (P _)) (·Assoc (fst x) (fst y) (fst z))) + x Σ≡Prop _ snd (P _)) (·IdR (fst x))) + λ x Σ≡Prop _ snd (P _)) (·IdL (fst x)) + IsCommMonoid.·Comm (CommMonoidStr.isCommMonoid (snd makeSubCommMonoid)) = + λ x y Σ≡Prop _ snd (P _)) (·Comm (fst x) (fst y)) -module CommMonoidTheory (M' : CommMonoid ) where - open CommMonoidStr (snd M') - private M = M' +module CommMonoidTheory (M' : CommMonoid ) where + open CommMonoidStr (snd M') + private M = M' - commAssocl : (x y z : M) x · (y · z) y · (x · z) - commAssocl x y z = ·Assoc x y z ∙∙ cong ( z) (·Comm x y) ∙∙ sym (·Assoc y x z) + commAssocl : (x y z : M) x · (y · z) y · (x · z) + commAssocl x y z = ·Assoc x y z ∙∙ cong ( z) (·Comm x y) ∙∙ sym (·Assoc y x z) - commAssocr : (x y z : M) x · y · z x · z · y - commAssocr x y z = sym (·Assoc x y z) ∙∙ cong (x ·_) (·Comm y z) ∙∙ ·Assoc x z y + commAssocr : (x y z : M) x · y · z x · z · y + commAssocr x y z = sym (·Assoc x y z) ∙∙ cong (x ·_) (·Comm y z) ∙∙ ·Assoc x z y - commAssocr2 : (x y z : M) x · y · z z · y · x - commAssocr2 x y z = commAssocr _ _ _ ∙∙ cong ( y) (·Comm _ _) ∙∙ commAssocr _ _ _ + commAssocr2 : (x y z : M) x · y · z z · y · x + commAssocr2 x y z = commAssocr _ _ _ ∙∙ cong ( y) (·Comm _ _) ∙∙ commAssocr _ _ _ - commAssocSwap : (x y z w : M) (x · y) · (z · w) (x · z) · (y · w) - commAssocSwap x y z w = ·Assoc (x · y) z w ∙∙ cong ( w) (commAssocr x y z) - ∙∙ sym (·Assoc (x · z) y w) + commAssocSwap : (x y z w : M) (x · y) · (z · w) (x · z) · (y · w) + commAssocSwap x y z w = ·Assoc (x · y) z w ∙∙ cong ( w) (commAssocr x y z) + ∙∙ sym (·Assoc (x · z) y w) \ No newline at end of file diff --git a/Cubical.Algebra.CommRing.Base.html b/Cubical.Algebra.CommRing.Base.html index c16021319d..729ca0b671 100644 --- a/Cubical.Algebra.CommRing.Base.html +++ b/Cubical.Algebra.CommRing.Base.html @@ -73,7 +73,7 @@ (·Comm : (x y : R) x · y y · x) IsCommRing 0r 1r _+_ _·_ -_ makeIsCommRing {_+_ = _+_} is-setR +Assoc +IdR +InvR +Comm ·Assoc ·IdR ·DistR+ ·Comm = - iscommring (makeIsRing is-setR +Assoc +IdR +InvR +Comm ·Assoc ·IdR + iscommring (makeIsRing is-setR +Assoc +IdR +InvR +Comm ·Assoc ·IdR x ·Comm _ _ ·IdR x) ·DistR+ x y z ·Comm _ _ ∙∙ ·DistR+ z x y ∙∙ λ i (·Comm z x i) + (·Comm z y i))) ·Comm @@ -98,7 +98,7 @@ CommRing→Ring (_ , commringstr _ _ _ _ _ H) = _ , ringstr _ _ _ _ _ (IsCommRing.isRing H) CommRing→AbGroup : CommRing AbGroup -CommRing→AbGroup R = Ring→AbGroup (CommRing→Ring R) +CommRing→AbGroup R = Ring→AbGroup (CommRing→Ring R) Ring→CommRing : (R : Ring ) ((x y : (fst R)) (RingStr._·_ (snd R) x y RingStr._·_ (snd R) y x)) CommRing fst (Ring→CommRing R p) = fst R @@ -111,11 +111,11 @@ IsCommRing.·Comm (CommRingStr.isCommRing (snd (Ring→CommRing R p))) = p CommRingHom : (R : CommRing ) (S : CommRing ℓ') Type (ℓ-max ℓ') -CommRingHom R S = RingHom (CommRing→Ring R) (CommRing→Ring S) +CommRingHom R S = RingHom (CommRing→Ring R) (CommRing→Ring S) IsCommRingEquiv : {A : Type } {B : Type ℓ'} (R : CommRingStr A) (e : A B) (S : CommRingStr B) Type (ℓ-max ℓ') -IsCommRingEquiv R e S = IsRingHom (CommRingStr→RingStr R) (e .fst) (CommRingStr→RingStr S) +IsCommRingEquiv R e S = IsRingHom (CommRingStr→RingStr R) (e .fst) (CommRingStr→RingStr S) CommRingEquiv : (R : CommRing ) (S : CommRing ℓ') Type (ℓ-max ℓ') CommRingEquiv R S = Σ[ e (R .fst S .fst) ] IsCommRingEquiv (R .snd) e (S .snd) @@ -127,7 +127,7 @@ isProp (IsCommRing 0r 1r _+_ _·_ -_) isPropIsCommRing 0r 1r _+_ _·_ -_ = isOfHLevelRetractFromIso 1 IsCommRingIsoΣ - (isPropΣ (isPropIsRing 0r 1r _+_ _·_ (-_)) + (isPropΣ (isPropIsRing 0r 1r _+_ _·_ (-_)) ring isPropΠ2 _ _ is-set ring _ _))) where open IsRing @@ -136,15 +136,15 @@ 𝒮ᴰ-CommRing = 𝒮ᴰ-Record (𝒮-Univ _) IsCommRingEquiv (fields: - data[ 0r null pres0 ] - data[ 1r null pres1 ] - data[ _+_ bin pres+ ] - data[ _·_ bin pres· ] - data[ -_ autoDUARel _ _ pres- ] + data[ 0r null pres0 ] + data[ 1r null pres1 ] + data[ _+_ bin pres+ ] + data[ _·_ bin pres· ] + data[ -_ autoDUARel _ _ pres- ] prop[ isCommRing _ _ isPropIsCommRing _ _ _ _ _) ]) where open CommRingStr - open IsRingHom + open IsRingHom -- faster with some sharing null = autoDUARel (𝒮-Univ _) A A) @@ -157,82 +157,84 @@ uaCommRing {A = A} {B = B} = equivFun (CommRingPath A B) isSetCommRing : ((R , str) : CommRing ) isSet R -isSetCommRing (R , str) = str .CommRingStr.is-set - -CommRingIso : (R : CommRing ) (S : CommRing ℓ') Type (ℓ-max ℓ') -CommRingIso R S = Σ[ e Iso (R .fst) (S .fst) ] - IsRingHom (CommRingStr→RingStr (R .snd)) (e .fun) (CommRingStr→RingStr (S .snd)) - -CommRingEquivIsoCommRingIso : (R : CommRing ) (S : CommRing ℓ') Iso (CommRingEquiv R S) (CommRingIso R S) -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) = - Σ≡Prop e isPropIsRingHom (snd (CommRing→Ring R)) (e .fun) (snd (CommRing→Ring 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 = - Σ≡Prop e isPropIsRingHom (snd (CommRing→Ring R)) (e .fst) (snd (CommRing→Ring S))) - (equivEq refl) - -isGroupoidCommRing : isGroupoid (CommRing ) -isGroupoidCommRing _ _ = isOfHLevelRespectEquiv 2 (CommRingPath _ _) (isSetRingEquiv _ _) - -open CommRingStr -open IsRingHom - --- TODO: Induced structure results are temporarily inconvenient while we transition between algebra --- representations -module _ (R : CommRing ) {A : Type } - (0a 1a : A) - (add mul : A A A) - (inv : A A) - (e : R A) - (p0 : e .fst (R .snd .0r) 0a) - (p1 : e .fst (R .snd .1r) 1a) - (p+ : x y e .fst (R .snd ._+_ x y) add (e .fst x) (e .fst y)) - ( : x y e .fst (R .snd ._·_ x y) mul (e .fst x) (e .fst y)) - (pinv : x e .fst (R .snd .-_ x) inv (e .fst x)) - where - - private - module R = CommRingStr (R .snd) - - BaseΣ : Type (ℓ-suc ) - BaseΣ = Σ[ B Type ] B × B × (B B B) × (B B B) × (B B) - - FamilyΣ : BaseΣ Type - FamilyΣ (B , u0 , u1 , a , m , i) = IsCommRing u0 u1 a m i - - inducedΣ : FamilyΣ (A , 0a , 1a , add , mul , inv) - inducedΣ = - subst FamilyΣ - (UARel.≅→≡ (autoUARel BaseΣ) (e , p0 , p1 , p+ , , pinv)) - R.isCommRing - - InducedCommRing : CommRing - InducedCommRing .fst = A - 0r (InducedCommRing .snd) = 0a - 1r (InducedCommRing .snd) = 1a - _+_ (InducedCommRing .snd) = add - _·_ (InducedCommRing .snd) = mul - - InducedCommRing .snd = inv - isCommRing (InducedCommRing .snd) = inducedΣ - - InducedCommRingEquiv : CommRingEquiv R InducedCommRing - fst InducedCommRingEquiv = e - pres0 (snd InducedCommRingEquiv) = p0 - pres1 (snd InducedCommRingEquiv) = p1 - pres+ (snd InducedCommRingEquiv) = p+ - pres· (snd InducedCommRingEquiv) = - pres- (snd InducedCommRingEquiv) = pinv - - InducedCommRingPath : R InducedCommRing - InducedCommRingPath = CommRingPath _ _ .fst InducedCommRingEquiv +isSetCommRing R = is-set + where + open CommRingStr (str R) + +CommRingIso : (R : CommRing ) (S : CommRing ℓ') Type (ℓ-max ℓ') +CommRingIso R S = Σ[ e Iso (R .fst) (S .fst) ] + IsRingHom (CommRingStr→RingStr (R .snd)) (e .fun) (CommRingStr→RingStr (S .snd)) + +CommRingEquivIsoCommRingIso : (R : CommRing ) (S : CommRing ℓ') Iso (CommRingEquiv R S) (CommRingIso R S) +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) = + Σ≡Prop e isPropIsRingHom (snd (CommRing→Ring R)) (e .fun) (snd (CommRing→Ring 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 = + Σ≡Prop e isPropIsRingHom (snd (CommRing→Ring R)) (e .fst) (snd (CommRing→Ring S))) + (equivEq refl) + +isGroupoidCommRing : isGroupoid (CommRing ) +isGroupoidCommRing _ _ = isOfHLevelRespectEquiv 2 (CommRingPath _ _) (isSetRingEquiv _ _) + +open CommRingStr +open IsRingHom + +-- TODO: Induced structure results are temporarily inconvenient while we transition between algebra +-- representations +module _ (R : CommRing ) {A : Type } + (0a 1a : A) + (add mul : A A A) + (inv : A A) + (e : R A) + (p0 : e .fst (R .snd .0r) 0a) + (p1 : e .fst (R .snd .1r) 1a) + (p+ : x y e .fst (R .snd ._+_ x y) add (e .fst x) (e .fst y)) + ( : x y e .fst (R .snd ._·_ x y) mul (e .fst x) (e .fst y)) + (pinv : x e .fst (R .snd .-_ x) inv (e .fst x)) + where + + private + module R = CommRingStr (R .snd) + + BaseΣ : Type (ℓ-suc ) + BaseΣ = Σ[ B Type ] B × B × (B B B) × (B B B) × (B B) + + FamilyΣ : BaseΣ Type + FamilyΣ (B , u0 , u1 , a , m , i) = IsCommRing u0 u1 a m i + + inducedΣ : FamilyΣ (A , 0a , 1a , add , mul , inv) + inducedΣ = + subst FamilyΣ + (UARel.≅→≡ (autoUARel BaseΣ) (e , p0 , p1 , p+ , , pinv)) + R.isCommRing + + InducedCommRing : CommRing + InducedCommRing .fst = A + 0r (InducedCommRing .snd) = 0a + 1r (InducedCommRing .snd) = 1a + _+_ (InducedCommRing .snd) = add + _·_ (InducedCommRing .snd) = mul + - InducedCommRing .snd = inv + isCommRing (InducedCommRing .snd) = inducedΣ + + InducedCommRingEquiv : CommRingEquiv R InducedCommRing + fst InducedCommRingEquiv = e + pres0 (snd InducedCommRingEquiv) = p0 + pres1 (snd InducedCommRingEquiv) = p1 + pres+ (snd InducedCommRingEquiv) = p+ + pres· (snd InducedCommRingEquiv) = + pres- (snd InducedCommRingEquiv) = pinv + + InducedCommRingPath : R InducedCommRing + InducedCommRingPath = CommRingPath _ _ .fst InducedCommRingEquiv \ No newline at end of file diff --git a/Cubical.Algebra.CommRing.FGIdeal.html b/Cubical.Algebra.CommRing.FGIdeal.html index 9c3c6a9ee7..4f1a7156c8 100644 --- a/Cubical.Algebra.CommRing.FGIdeal.html +++ b/Cubical.Algebra.CommRing.FGIdeal.html @@ -105,7 +105,7 @@ module _ (A'@(A , Ar) : CommRing ) (B'@(B , Br) : Ring ℓ') - (f'@(f , fr) : RingHom (CommRing→Ring A') B') + (f'@(f , fr) : RingHom (CommRing→Ring A') B') where open CommRingStr Ar using () @@ -125,7 +125,7 @@ ; _·_ to _·B_ ) open CommRingStr - open IsRingHom + open IsRingHom open Sum open SumMap (CommRing→Ring A') B' @@ -137,7 +137,7 @@ cancelLinearCombination n a v fnull = f (∑A i a i ·A v i)) ≡⟨ ∑Map f' i a i ·A v i) ∑B i f (a i ·A v i)) - ≡⟨ ∑Ext B' i pres· fr (a i) (v i)) + ≡⟨ ∑Ext B' i pres· fr (a i) (v i)) ∑B i (f (a i)) ·B (f (v i))) ≡⟨ ∑Ext B' i cong X f (a i) ·B X) (fnull i)) ∑B i f (a i) ·B 0B) diff --git a/Cubical.Algebra.CommRing.FiberedProduct.html b/Cubical.Algebra.CommRing.FiberedProduct.html index 25f2517989..58b3bb2556 100644 --- a/Cubical.Algebra.CommRing.FiberedProduct.html +++ b/Cubical.Algebra.CommRing.FiberedProduct.html @@ -21,11 +21,11 @@ module A = CommRingStr (snd A) module B = CommRingStr (snd B) module C = CommRingStr (snd C) - module α = IsRingHom (snd α) - module β = IsRingHom (snd β) + module α = IsRingHom (snd α) + module β = IsRingHom (snd β) open CommRingStr - open IsRingHom + open IsRingHom fbT : Type fbT = Σ[ ab fst A × fst B ] (fst α (fst ab) fst β (snd ab)) @@ -34,21 +34,21 @@ fbT≡ h1 h2 = Σ≡Prop _ is-set (snd C) _ _) λ i (h1 i) , (h2 i) 0fbT : fbT - 0fbT = (A.0r , B.0r) , α.pres0 sym β.pres0 + 0fbT = (A.0r , B.0r) , α.pres0 sym β.pres0 1fbT : fbT - 1fbT = (A.1r , B.1r) , α.pres1 sym β.pres1 + 1fbT = (A.1r , B.1r) , α.pres1 sym β.pres1 _+fbT_ : fbT fbT fbT ((a1 , b1) , hab1) +fbT ((a2 , b2) , hab2) = - (a1 A.+ a2 , b1 B.+ b2) , α.pres+ a1 a2 ∙∙ i hab1 i C.+ hab2 i) ∙∙ sym (β.pres+ b1 b2) + (a1 A.+ a2 , b1 B.+ b2) , α.pres+ a1 a2 ∙∙ i hab1 i C.+ hab2 i) ∙∙ sym (β.pres+ b1 b2) _·fbT_ : fbT fbT fbT ((a1 , b1) , hab1) ·fbT ((a2 , b2) , hab2) = - (a1 A.· a2 , b1 B.· b2) , α.pres· a1 a2 ∙∙ i hab1 i C.· hab2 i) ∙∙ sym (β.pres· b1 b2) + (a1 A.· a2 , b1 B.· b2) , α.pres· a1 a2 ∙∙ i hab1 i C.· hab2 i) ∙∙ sym (β.pres· b1 b2) -fbT_ : fbT fbT - -fbT ((a , b) , hab) = (A.- a , B.- b) , α.pres- a ∙∙ cong C.-_ hab ∙∙ sym (β.pres- b) + -fbT ((a , b) , hab) = (A.- a , B.- b) , α.pres- a ∙∙ cong C.-_ hab ∙∙ sym (β.pres- b) fiberedProduct : CommRing fst fiberedProduct = fbT @@ -70,15 +70,15 @@ fiberedProductPr₁ : CommRingHom fiberedProduct A fst fiberedProductPr₁ = fst fst - snd fiberedProductPr₁ = makeIsRingHom refl _ _ refl) _ _ refl) + snd fiberedProductPr₁ = makeIsRingHom refl _ _ refl) _ _ refl) fiberedProductPr₂ : CommRingHom fiberedProduct B fst fiberedProductPr₂ = snd fst - snd fiberedProductPr₂ = makeIsRingHom refl _ _ refl) _ _ refl) + snd fiberedProductPr₂ = makeIsRingHom refl _ _ refl) _ _ refl) fiberedProductPr₁₂Commutes : compCommRingHom fiberedProduct A C fiberedProductPr₁ α compCommRingHom fiberedProduct B C fiberedProductPr₂ β - fiberedProductPr₁₂Commutes = RingHom≡ (funExt x x .snd)) + fiberedProductPr₁₂Commutes = RingHom≡ (funExt x x .snd)) fiberedProductUnivProp : (D : CommRing ) (h : CommRingHom D A) (k : CommRingHom D B) @@ -87,15 +87,15 @@ (h compCommRingHom D fiberedProduct A l fiberedProductPr₁) × (k compCommRingHom D fiberedProduct B l fiberedProductPr₂) fiberedProductUnivProp D (h , hh) (k , hk) H = - uniqueExists f (RingHom≡ refl , RingHom≡ refl) - _ isProp× (isSetRingHom _ _ _ _) (isSetRingHom _ _ _ _)) + uniqueExists f (RingHom≡ refl , RingHom≡ refl) + _ isProp× (isSetRingHom _ _ _ _) (isSetRingHom _ _ _ _)) { (g , _) (Hh , Hk) - RingHom≡ (funExt d fbT≡ (funExt⁻ (cong fst Hh) d) + RingHom≡ (funExt d fbT≡ (funExt⁻ (cong fst Hh) d) (funExt⁻ (cong fst Hk) d))) }) where f : CommRingHom D fiberedProduct fst f d = (h d , k d) , funExt⁻ (cong fst H) d - snd f = makeIsRingHom (fbT≡ (hh .pres1) (hk .pres1)) - _ _ fbT≡ (hh .pres+ _ _) (hk .pres+ _ _)) - _ _ fbT≡ (hh .pres· _ _) (hk .pres· _ _)) + snd f = makeIsRingHom (fbT≡ (hh .pres1) (hk .pres1)) + _ _ fbT≡ (hh .pres+ _ _) (hk .pres+ _ _)) + _ _ fbT≡ (hh .pres· _ _) (hk .pres· _ _)) \ No newline at end of file diff --git a/Cubical.Algebra.CommRing.Ideal.SurjectiveImage.html b/Cubical.Algebra.CommRing.Ideal.SurjectiveImage.html index 922512b28b..237f2e77e5 100644 --- a/Cubical.Algebra.CommRing.Ideal.SurjectiveImage.html +++ b/Cubical.Algebra.CommRing.Ideal.SurjectiveImage.html @@ -11,7 +11,7 @@ open import Cubical.Functions.Surjection -open import Cubical.Algebra.Ring.Base using (IsRingHom) +open import Cubical.Algebra.Ring.Base using (IsRingHom) import Cubical.Algebra.Ring.Ideal.SurjectiveImage as Ring open import Cubical.Algebra.CommRing.Base open import Cubical.Algebra.CommRing.Ideal.Base diff --git a/Cubical.Algebra.CommRing.Instances.Polynomials.MultivariatePoly.html b/Cubical.Algebra.CommRing.Instances.Polynomials.MultivariatePoly.html index 044d60df0d..93b1bd03c3 100644 --- a/Cubical.Algebra.CommRing.Instances.Polynomials.MultivariatePoly.html +++ b/Cubical.Algebra.CommRing.Instances.Polynomials.MultivariatePoly.html @@ -38,7 +38,7 @@ PolyCommRing = ⊕HITgradedRing-CommRing (NatVecMonoid n) _ A) - _ snd (Ring→AbGroup (CommRing→Ring ACommRing))) + _ snd (Ring→AbGroup (CommRing→Ring ACommRing))) 1r _·_ 0LeftAnnihilates 0RightAnnihilates a b c ΣPathP ((+n-vec-assoc _ _ _) , (·Assoc _ _ _))) a ΣPathP ((+n-vec-rid _) , (·IdR _))) diff --git a/Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyFun.html b/Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyFun.html index c4d49ea6e1..57dc36d0df 100644 --- a/Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyFun.html +++ b/Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyFun.html @@ -28,7 +28,7 @@ UnivariatePolyFun-CommRing = ⊕FunGradedRing-CommRing _+n_ (makeIsMonoid isSetℕ +-assoc +-zero λ _ refl) _ _ refl) _ A) - _ snd (Ring→AbGroup (CommRing→Ring ACommRing))) + _ snd (Ring→AbGroup (CommRing→Ring ACommRing))) 1r _·_ 0LeftAnnihilates 0RightAnnihilates a b c ΣPathP ((+-assoc _ _ _) , (·Assoc _ _ _))) a ΣPathP ((+-zero _) , (·IdR _))) diff --git a/Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyHIT.html b/Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyHIT.html index 1641b2ebb9..17e20a8fd8 100644 --- a/Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyHIT.html +++ b/Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyHIT.html @@ -33,7 +33,7 @@ UnivariatePolyHIT-CommRing = ⊕HITgradedRing-CommRing NatMonoid _ A) - _ snd (Ring→AbGroup (CommRing→Ring ACommRing))) + _ snd (Ring→AbGroup (CommRing→Ring ACommRing))) 1r _·_ 0LeftAnnihilates 0RightAnnihilates a b c ΣPathP ((+-assoc _ _ _) , (·Assoc _ _ _))) a ΣPathP ((+-zero _) , (·IdR _))) diff --git a/Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyList.html b/Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyList.html index 2cb2152bbb..db8960c2fa 100644 --- a/Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyList.html +++ b/Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyList.html @@ -36,7 +36,7 @@ constantPolynomialHom : CommRingHom R UnivariatePolyList constantPolynomialHom = [_] , - makeIsRingHom + makeIsRingHom refl r s refl) λ r s sym (MultHom[-] r s) diff --git a/Cubical.Algebra.CommRing.Localisation.InvertingElements.html b/Cubical.Algebra.CommRing.Localisation.InvertingElements.html index 0bc3abf718..8a006557ef 100644 --- a/Cubical.Algebra.CommRing.Localisation.InvertingElements.html +++ b/Cubical.Algebra.CommRing.Localisation.InvertingElements.html @@ -96,17 +96,17 @@ R[1/0]≡0 : R[1/ 0r ]AsCommRing UnitCommRing R[1/0]≡0 = uaCommRing (e , eIsRHom) where - open IsRingHom + open IsRingHom e : R[1/ 0r ]AsCommRing .fst UnitCommRing .fst e = isContr→Equiv isContrR[1/0] isContrUnit* eIsRHom : IsCommRingEquiv (R[1/ 0r ]AsCommRing .snd) e (UnitCommRing .snd) - pres0 eIsRHom = refl - pres1 eIsRHom = refl - pres+ eIsRHom _ _ = refl - pres· eIsRHom _ _ = refl - pres- eIsRHom _ = refl + pres0 eIsRHom = refl + pres1 eIsRHom = refl + pres+ eIsRHom _ _ = refl + pres· eIsRHom _ _ = refl + pres- eIsRHom _ = refl -- A useful lemma: (gⁿ/1)≡(g/1)ⁿ in R[1/f] ^-respects-/1 : {f g : R} (n : ) [ (g ^ n) , 1r , PT.∣ 0 , _ 1r) ∣₁ ] @@ -304,7 +304,7 @@ module RadicalLemma (R' : CommRing ) (f g : (fst R')) where - open IsRingHom + open IsRingHom open isMultClosedSubset open CommRingTheory R' open RingTheory (CommRing→Ring R') @@ -359,7 +359,7 @@ ; _+_ to _+ᶠ_ ; 0r to 0ᶠ ; ·IdL to ·ᶠ-lid ; ·IdR to ·ᶠ-rid ; ·Assoc to ·ᶠ-assoc ; ·Comm to ·ᶠ-comm) - open IsRingHom + open IsRingHom private R = fst R' @@ -379,7 +379,7 @@ /1/1AsCommRingHom : CommRingHom R' R[1/f][1/g]AsCommRing fst /1/1AsCommRingHom = _/1/1 - snd /1/1AsCommRingHom = makeIsRingHom refl lem+ lem· + snd /1/1AsCommRingHom = makeIsRingHom refl lem+ lem· where lem+ : _ lem+ r r' = diff --git a/Cubical.Algebra.CommRing.Localisation.Limit.html b/Cubical.Algebra.CommRing.Localisation.Limit.html index d50dcb6515..4f72b5d095 100644 --- a/Cubical.Algebra.CommRing.Localisation.Limit.html +++ b/Cubical.Algebra.CommRing.Localisation.Limit.html @@ -513,7 +513,7 @@ [z-y]/1≡0 i = (z - y) /1ˢ - ≡⟨ U./1AsCommRingHom i .snd .pres+ _ _ -- (-a)/1=-(a/1) by refl + ≡⟨ U./1AsCommRingHom i .snd .pres+ _ _ -- (-a)/1=-(a/1) by refl z /1ˢ - y /1ˢ @@ -526,7 +526,7 @@ 0at i where instance _ = L.S⁻¹RAsCommRing i .snd - open IsRingHom + open IsRingHom @@ -553,8 +553,8 @@ coneOut locCone (sing i) = U./1AsCommRingHom i coneOut locCone (pair i j _) = UP./1AsCommRingHom i j coneOutCommutes locCone idAr = ⋆IdR _ - coneOutCommutes locCone singPairL = RingHom≡ (χˡUnique _ _ .fst .snd) - coneOutCommutes locCone singPairR = RingHom≡ (χʳUnique _ _ .fst .snd) + coneOutCommutes locCone singPairL = RingHom≡ (χˡUnique _ _ .fst .snd) + coneOutCommutes locCone singPairR = RingHom≡ (χʳUnique _ _ .fst .snd) isLimConeLocCone : 1r ⟨f₀,⋯,fₙ⟩ isLimCone _ _ locCone isLimConeLocCone 1∈⟨f₀,⋯,fₙ⟩ A' cᴬ = (ψ , isConeMorψ) , ψUniqueness @@ -571,39 +571,39 @@ where χφSquare< : i j i < j χˡ i j .fst (φ i .fst a) χʳ i j .fst (φ j .fst a) χφSquare< i j i<j = - χˡ i j .fst (φ i .fst a) ≡⟨ cong (_$r a) (cᴬ .coneOutCommutes singPairL) - cᴬ .coneOut (pair i j i<j) .fst a ≡⟨ cong (_$r a) (sym (cᴬ .coneOutCommutes singPairR)) + χˡ i j .fst (φ i .fst a) ≡⟨ cong (_$r a) (cᴬ .coneOutCommutes singPairL) + cᴬ .coneOut (pair i j i<j) .fst a ≡⟨ cong (_$r a) (sym (cᴬ .coneOutCommutes singPairR)) χʳ i j .fst (φ j .fst a) ψ : CommRingHom A' R' fst ψ a = applyEqualizerLemma a .fst .fst - snd ψ = makeIsRingHom + snd ψ = makeIsRingHom (cong fst (applyEqualizerLemma 1r .snd (1r , 1Coh))) x y cong fst (applyEqualizerLemma (x + y) .snd (_ , +Coh x y))) λ x y cong fst (applyEqualizerLemma (x · y) .snd (_ , ·Coh x y)) where - open IsRingHom + open IsRingHom 1Coh : i (1r /1ˢ φ i .fst 1r) - 1Coh i = sym (φ i .snd .pres1) + 1Coh i = sym (φ i .snd .pres1) +Coh : x y i ((fst ψ x + fst ψ y) /1ˢ φ i .fst (x + y)) +Coh x y i = let instance _ = snd R[1/ f i ]AsCommRing in - U./1AsCommRingHom i .snd .pres+ _ _ + U./1AsCommRingHom i .snd .pres+ _ _ ∙∙ cong₂ _+_ (applyEqualizerLemma x .fst .snd i) (applyEqualizerLemma y .fst .snd i) - ∙∙ sym (φ i .snd .pres+ x y) + ∙∙ sym (φ i .snd .pres+ x y) ·Coh : x y i ((fst ψ x · fst ψ y) /1ˢ φ i .fst (x · y)) ·Coh x y i = let instance _ = snd R[1/ f i ]AsCommRing in - U./1AsCommRingHom i .snd .pres· _ _ + U./1AsCommRingHom i .snd .pres· _ _ ∙∙ cong₂ _·_ (applyEqualizerLemma x .fst .snd i) (applyEqualizerLemma y .fst .snd i) - ∙∙ sym (φ i .snd .pres· x y) + ∙∙ sym (φ i .snd .pres· x y) -- TODO: Can you use lemma from other PR to eliminate pair case isConeMorψ : isConeMor cᴬ locCone ψ - isConeMorψ (sing i) = RingHom≡ (funExt a applyEqualizerLemma a .fst .snd i)) + isConeMorψ (sing i) = RingHom≡ (funExt a applyEqualizerLemma a .fst .snd i)) isConeMorψ (pair i j i<j) = - ψ UP./1AsCommRingHom i j ≡⟨ cong (ψ ⋆_) (sym (RingHom≡ (χˡUnique _ _ .fst .snd))) + ψ UP./1AsCommRingHom i j ≡⟨ cong (ψ ⋆_) (sym (RingHom≡ (χˡUnique _ _ .fst .snd))) ψ U./1AsCommRingHom i χˡ i j ≡⟨ sym (⋆Assoc _ _ _) (ψ U./1AsCommRingHom i) χˡ i j ≡⟨ cong (_⋆ χˡ i j) (isConeMorψ (sing i)) φ i χˡ i j ≡⟨ coneOutCommutes cᴬ singPairL @@ -611,8 +611,8 @@ ψUniqueness : (y : Σ[ θ CommRingHom A' R' ] isConeMor cᴬ locCone θ) (ψ , isConeMorψ) y ψUniqueness (θ , isConeMorθ) = Σ≡Prop _ isPropIsConeMor _ _ _) - (RingHom≡ (funExt λ a cong fst (applyEqualizerLemma a .snd (θtriple a)))) + (RingHom≡ (funExt λ a cong fst (applyEqualizerLemma a .snd (θtriple a)))) where θtriple : (a : A) Σ[ x R ] i x /1ˢ φ i .fst a - θtriple a = fst θ a , λ i cong (_$r a) (isConeMorθ (sing i)) + θtriple a = fst θ a , λ i cong (_$r a) (isConeMorθ (sing i)) \ No newline at end of file diff --git a/Cubical.Algebra.CommRing.Localisation.PullbackSquare.html b/Cubical.Algebra.CommRing.Localisation.PullbackSquare.html index 00164a208f..385413567c 100644 --- a/Cubical.Algebra.CommRing.Localisation.PullbackSquare.html +++ b/Cubical.Algebra.CommRing.Localisation.PullbackSquare.html @@ -74,7 +74,7 @@ module _ (R' : CommRing ) (f g : (fst R')) where - open IsRingHom + open IsRingHom open isMultClosedSubset open CommRingTheory R' open RingTheory (CommRing→Ring R') @@ -463,7 +463,7 @@ [z-a]/1≡0overF : (z - a) /1ᶠ 0r [z-a]/1≡0overF = (z - a) /1ᶠ - ≡⟨ /1ᶠAsCommRingHom .snd .pres+ _ _ -- (-a)/1=-(a/1) by refl! + ≡⟨ /1ᶠAsCommRingHom .snd .pres+ _ _ -- (-a)/1=-(a/1) by refl! (z /1ᶠ) - (a /1ᶠ) @@ -478,7 +478,7 @@ [z-a]/1≡0overG : (z - a) /1ᵍ 0r [z-a]/1≡0overG = (z - a) /1ᵍ - ≡⟨ /1ᵍAsCommRingHom .snd .pres+ _ _ -- (-a)/1=-(a/1) by refl! + ≡⟨ /1ᵍAsCommRingHom .snd .pres+ _ _ -- (-a)/1=-(a/1) by refl! (z /1ᵍ) - (a /1ᵍ) @@ -521,7 +521,7 @@ /1χComm x = eq/ _ _ ((1r , powersFormMultClosedSubset (f · g) .containsOne) , refl) /1χHomComm : /1ᵍAsCommRingHom χ₂ /1ᶠAsCommRingHom χ₁ - /1χHomComm = RingHom≡ (funExt /1χComm) + /1χHomComm = RingHom≡ (funExt /1χComm) fgSquare : 1r ⟨f,g⟩ isPullback _ fgCospan /1ᵍAsCommRingHom /1ᶠAsCommRingHom /1χHomComm @@ -532,56 +532,56 @@ applyEqualizerLemma : a ∃![ χa R ] (χa /1ᶠ fst φ a) × (χa /1ᵍ fst ψ a) applyEqualizerLemma a = - equalizerLemma 1∈⟨f,g⟩ (fst φ a) (fst ψ a) (cong (_$r a) (sym ψχ₂≡φχ₁)) + equalizerLemma 1∈⟨f,g⟩ (fst φ a) (fst ψ a) (cong (_$r a) (sym ψχ₂≡φχ₁)) χ : CommRingHom A R' fst χ a = applyEqualizerLemma a .fst .fst - snd χ = makeIsRingHom + snd χ = makeIsRingHom (cong fst (applyEqualizerLemma 1r .snd (1r , 1Coh))) x y cong fst (applyEqualizerLemma (x + y) .snd (_ , +Coh x y))) x y cong fst (applyEqualizerLemma (x · y) .snd (_ , ·Coh x y))) where - open IsRingHom + open IsRingHom 1Coh : (1r /1ᶠ fst φ 1r) × (1r /1ᵍ fst ψ 1r) - 1Coh = (sym (φ .snd .pres1)) , sym (ψ .snd .pres1) + 1Coh = (sym (φ .snd .pres1)) , sym (ψ .snd .pres1) +Coh : x y ((fst χ x + fst χ y) /1ᶠ fst φ (x + y)) × ((fst χ x + fst χ y) /1ᵍ fst ψ (x + y)) - fst (+Coh x y) = /1ᶠAsCommRingHom .snd .pres+ _ _ + fst (+Coh x y) = /1ᶠAsCommRingHom .snd .pres+ _ _ ∙∙ cong₂ _+_ (applyEqualizerLemma x .fst .snd .fst) (applyEqualizerLemma y .fst .snd .fst) - ∙∙ sym (φ .snd .pres+ x y) - snd (+Coh x y) = /1ᵍAsCommRingHom .snd .pres+ _ _ + ∙∙ sym (φ .snd .pres+ x y) + snd (+Coh x y) = /1ᵍAsCommRingHom .snd .pres+ _ _ ∙∙ cong₂ _+_ (applyEqualizerLemma x .fst .snd .snd) (applyEqualizerLemma y .fst .snd .snd) - ∙∙ sym (ψ .snd .pres+ x y) + ∙∙ sym (ψ .snd .pres+ x y) ·Coh : x y ((fst χ x · fst χ y) /1ᶠ fst φ (x · y)) × ((fst χ x · fst χ y) /1ᵍ fst ψ (x · y)) - fst (·Coh x y) = /1ᶠAsCommRingHom .snd .pres· _ _ + fst (·Coh x y) = /1ᶠAsCommRingHom .snd .pres· _ _ ∙∙ cong₂ _·_ (applyEqualizerLemma x .fst .snd .fst) (applyEqualizerLemma y .fst .snd .fst) - ∙∙ sym (φ .snd .pres· x y) - snd (·Coh x y) = /1ᵍAsCommRingHom .snd .pres· _ _ + ∙∙ sym (φ .snd .pres· x y) + snd (·Coh x y) = /1ᵍAsCommRingHom .snd .pres· _ _ ∙∙ cong₂ _·_ (applyEqualizerLemma x .fst .snd .snd) (applyEqualizerLemma y .fst .snd .snd) - ∙∙ sym (ψ .snd .pres· x y) + ∙∙ sym (ψ .snd .pres· x y) χCoh : (ψ χ /1ᵍAsCommRingHom) × (φ χ /1ᶠAsCommRingHom) - fst χCoh = RingHom≡ (funExt a sym (applyEqualizerLemma a .fst .snd .snd))) - snd χCoh = RingHom≡ (funExt a sym (applyEqualizerLemma a .fst .snd .fst))) + fst χCoh = RingHom≡ (funExt a sym (applyEqualizerLemma a .fst .snd .snd))) + snd χCoh = RingHom≡ (funExt a sym (applyEqualizerLemma a .fst .snd .fst))) χUniqueness : (y : Σ[ θ CommRingHom A R' ] (ψ θ /1ᵍAsCommRingHom) × (φ θ /1ᶠAsCommRingHom)) (χ , χCoh) y - χUniqueness (θ , θCoh) = Σ≡Prop _ isProp× (isSetRingHom _ _ _ _) - (isSetRingHom _ _ _ _)) - (RingHom≡ (funExt a cong fst (applyEqualizerLemma a .snd (θtriple a))))) + χUniqueness (θ , θCoh) = Σ≡Prop _ isProp× (isSetRingHom _ _ _ _) + (isSetRingHom _ _ _ _)) + (RingHom≡ (funExt a cong fst (applyEqualizerLemma a .snd (θtriple a))))) where θtriple : a Σ[ x R ] (x /1ᶠ fst φ a) × (x /1ᵍ fst ψ a) - θtriple a = fst θ a , sym (cong (_$r a) (θCoh .snd)) - , sym (cong (_$r a) (θCoh .fst)) + θtriple a = fst θ a , sym (cong (_$r a) (θCoh .snd)) + , sym (cong (_$r a) (θCoh .fst)) -- packaging it all up diff --git a/Cubical.Algebra.CommRing.Localisation.UniversalProperty.html b/Cubical.Algebra.CommRing.Localisation.UniversalProperty.html index 70a2fa4379..02cf484fb3 100644 --- a/Cubical.Algebra.CommRing.Localisation.UniversalProperty.html +++ b/Cubical.Algebra.CommRing.Localisation.UniversalProperty.html @@ -52,7 +52,7 @@ private R = fst R' open CommRingStr (snd R') hiding (is-set) open RingTheory (CommRing→Ring R') - open IsRingHom + open IsRingHom @@ -77,7 +77,7 @@ /1AsCommRingHom : CommRingHom R' S⁻¹RAsCommRing fst /1AsCommRingHom = _/1 snd /1AsCommRingHom = - makeIsRingHom + makeIsRingHom refl r r' cong [_] (≡-× (cong₂ (_+_) (sym (·IdR r)) (sym (·IdR r'))) (Σ≡Prop x S' x .snd) (sym (·IdL 1r))))) @@ -104,7 +104,7 @@ open CommRingTheory B' renaming (·CommAssocl to ·B-commAssocl ; ·CommAssocSwap to ·B-commAssocSwap) ψ₀ = fst ψ - module ψ = IsRingHom (snd ψ) + module ψ = IsRingHom (snd ψ) χ : CommRingHom S⁻¹RAsCommRing B' fst χ = SQ.rec Bset fχcoh @@ -138,7 +138,7 @@ ψ₀ r ·B ψ₀ s ⁻¹ ·B ψ₀ (u · s · s') ·B ψ₀ (u · s · s') ⁻¹ - ≡⟨ cong x ψ₀ r ·B ψ₀ s ⁻¹ ·B x ·B ψ₀ (u · s · s') ⁻¹) (ψ.pres· _ _) + ≡⟨ cong x ψ₀ r ·B ψ₀ s ⁻¹ ·B x ·B ψ₀ (u · s · s') ⁻¹) (ψ.pres· _ _) ψ₀ r ·B ψ₀ s ⁻¹ ·B (ψ₀ (u · s) ·B ψ₀ s') ·B ψ₀ (u · s · s') ⁻¹ @@ -147,7 +147,7 @@ ψ₀ r ·B ψ₀ s ⁻¹ ·B ψ₀ (u · s) ·B ψ₀ s' ·B ψ₀ (u · s · s') ⁻¹ ≡⟨ cong x ψ₀ r ·B ψ₀ s ⁻¹ ·B x ·B ψ₀ s' ·B ψ₀ (u · s · s') ⁻¹) - (ψ.pres· _ _) + (ψ.pres· _ _) ψ₀ r ·B ψ₀ s ⁻¹ ·B (ψ₀ u ·B ψ₀ s) ·B ψ₀ s' ·B ψ₀ (u · s · s') ⁻¹ @@ -160,11 +160,11 @@ ψ₀ u ·B ψ₀ r ·B 1b ·B ψ₀ s' ·B ψ₀ (u · s · s') ⁻¹ - ≡⟨ i (·B-rid (sym (ψ.pres· u r) i) i) ·B ψ₀ s' ·B ψ₀ (u · s · s') ⁻¹) + ≡⟨ i (·B-rid (sym (ψ.pres· u r) i) i) ·B ψ₀ s' ·B ψ₀ (u · s · s') ⁻¹) ψ₀ (u · r) ·B ψ₀ s' ·B ψ₀ (u · s · s') ⁻¹ - ≡⟨ cong (_·B ψ₀ (u · s · s') ⁻¹) (sym (ψ.pres· _ _)) + ≡⟨ cong (_·B ψ₀ (u · s · s') ⁻¹) (sym (ψ.pres· _ _)) ψ₀ (u · r · s') ·B ψ₀ (u · s · s') ⁻¹ @@ -172,11 +172,11 @@ ψ₀ (u · r' · s) ·B ψ₀ (u · s · s') ⁻¹ - ≡⟨ cong (_·B ψ₀ (u · s · s') ⁻¹) (ψ.pres· _ _) + ≡⟨ cong (_·B ψ₀ (u · s · s') ⁻¹) (ψ.pres· _ _) ψ₀ (u · r') ·B ψ₀ s ·B ψ₀ (u · s · s') ⁻¹ - ≡⟨ cong x x ·B ψ₀ s ·B ψ₀ (u · s · s') ⁻¹) (ψ.pres· _ _) + ≡⟨ cong x x ·B ψ₀ s ·B ψ₀ (u · s · s') ⁻¹) (ψ.pres· _ _) ψ₀ u ·B ψ₀ r' ·B ψ₀ s ·B ψ₀ (u · s · s') ⁻¹ @@ -188,11 +188,11 @@ ψ₀ r' ·B (ψ₀ u ·B ψ₀ s) ·B ψ₀ (u · s · s') ⁻¹ - ≡⟨ cong x ψ₀ r' ·B x ·B ψ₀ (u · s · s') ⁻¹) (sym (ψ.pres· _ _)) + ≡⟨ cong x ψ₀ r' ·B x ·B ψ₀ (u · s · s') ⁻¹) (sym (ψ.pres· _ _)) ψ₀ r' ·B ψ₀ (u · s) ·B ψ₀ (u · s · s') ⁻¹ - ≡⟨ cong (ψ₀ r' ·B ψ₀ (u · s) ·B_) (unitCong (ψ.pres· _ _)) + ≡⟨ cong (ψ₀ r' ·B ψ₀ (u · s) ·B_) (unitCong (ψ.pres· _ _)) ψ₀ r' ·B ψ₀ (u · s) ·B (ψ₀ (u · s) ·B ψ₀ s') ⁻¹ @@ -213,14 +213,14 @@ ψ₀ r' ·B ψ₀ s' ⁻¹ snd χ = - makeIsRingHom + makeIsRingHom (instancepres1χ ψS⊆Bˣ 1r (SMultClosedSubset .containsOne) BˣContainsOne ⦄) (elimProp2 _ _ _ _ Bset _ _ _ _) pres+[]) (elimProp2 _ _ _ _ Bset _ _ _ _) pres·[]) where instancepres1χ : _ : ψ₀ 1r _ : 1b ψ₀ 1r ·B (ψ₀ 1r) ⁻¹ 1b - instancepres1χ = i (ψ.pres1 i) ·B (unitCong (ψ.pres1) i)) + instancepres1χ = i (ψ.pres1 i) ·B (unitCong (ψ.pres1) i)) i ·B-lid (1⁻¹≡1 i) i) pres+[] : (a b : R × S) fst χ ([ a ] +ₗ [ b ]) (fst χ [ a ]) +B (fst χ [ b ]) @@ -235,11 +235,11 @@ instancepath = ψ₀ (r · s' + r' · s) ·B ψ₀ (s · s') ⁻¹ - ≡⟨ i ψ.pres+ (r · s') (r' · s) i ·B unitCong (ψ.pres· s s') i) + ≡⟨ i ψ.pres+ (r · s') (r' · s) i ·B unitCong (ψ.pres· s s') i) (ψ₀ (r · s') +B ψ₀ (r' · s)) ·B (ψ₀ s ·B ψ₀ s') ⁻¹ - ≡⟨ i (ψ.pres· r s' i +B ψ.pres· r' s i) ·B ⁻¹-dist-· (ψ₀ s) (ψ₀ s') i) + ≡⟨ i (ψ.pres· r s' i +B ψ.pres· r' s i) ·B ⁻¹-dist-· (ψ₀ s) (ψ₀ s') i) (ψ₀ r ·B ψ₀ s' +B ψ₀ r' ·B ψ₀ s) ·B (ψ₀ s ⁻¹ ·B ψ₀ s' ⁻¹) @@ -272,7 +272,7 @@ ψ₀ (r · r') ·B ψ₀ (s · s') ⁻¹ (ψ₀ r ·B ψ₀ s ⁻¹) ·B (ψ₀ r' ·B ψ₀ s' ⁻¹) instancepath = ψ₀ (r · r') ·B ψ₀ (s · s') ⁻¹ - ≡⟨ i ψ.pres· r r' i ·B unitCong (ψ.pres· s s') i) + ≡⟨ i ψ.pres· r r' i ·B unitCong (ψ.pres· s s') i) ψ₀ r ·B ψ₀ r' ·B (ψ₀ s ·B ψ₀ s') ⁻¹ @@ -290,7 +290,7 @@ where instanceχcomp : _ : ψ₀ 1r _ : 1b (r : R) ψ₀ r ·B (ψ₀ 1r) ⁻¹ ψ₀ r - instanceχcomp r = ψ₀ r ·B (ψ₀ 1r) ⁻¹ ≡⟨ cong (ψ₀ r ·B_) (unitCong (ψ.pres1)) + instanceχcomp r = ψ₀ r ·B (ψ₀ 1r) ⁻¹ ≡⟨ cong (ψ₀ r ·B_) (unitCong (ψ.pres1)) ψ₀ r ·B 1b ⁻¹ ≡⟨ cong (ψ₀ r ·B_) 1⁻¹≡1 ψ₀ r ·B 1b ≡⟨ ·B-rid _ ψ₀ r @@ -298,12 +298,12 @@ χunique : (y : Σ[ χ' CommRingHom S⁻¹RAsCommRing B' ] fst χ' _/1 ψ₀) (χ , funExt χcomp) y - χunique (χ' , χ'/1≡ψ) = Σ≡Prop x isSetΠ _ Bset) _ _) (RingHom≡ fχ≡fχ') + χunique (χ' , χ'/1≡ψ) = Σ≡Prop x isSetΠ _ Bset) _ _) (RingHom≡ fχ≡fχ') where open CommRingHomTheory {A' = S⁻¹RAsCommRing} {B' = B'} χ' renaming (φ[x⁻¹]≡φ[x]⁻¹ to χ'[x⁻¹]≡χ'[x]⁻¹) - module χ' = IsRingHom (χ' .snd) + module χ' = IsRingHom (χ' .snd) []-path : (a : R × S) fst χ [ a ] fst χ' [ a ] []-path (r , s , s∈S') = instancepath ψS⊆Bˣ s s∈S' S/1⊆S⁻¹Rˣ s s∈S' @@ -343,7 +343,7 @@ fst χ' [ r , 1r , SMultClosedSubset .containsOne ] ·B fst χ' [ 1r , s , s∈S' ] - ≡⟨ sym (χ'.pres· _ _) + ≡⟨ sym (χ'.pres· _ _) fst χ' ([ r , 1r , SMultClosedSubset .containsOne ] ·ₗ [ 1r , s , s∈S' ]) diff --git a/Cubical.Algebra.CommRing.Properties.html b/Cubical.Algebra.CommRing.Properties.html index abccc902aa..839eb19554 100644 --- a/Cubical.Algebra.CommRing.Properties.html +++ b/Cubical.Algebra.CommRing.Properties.html @@ -180,7 +180,7 @@ open Iso - injCommRingIso : {R : CommRing } {S : CommRing ℓ'} (f : CommRingIso R S) + 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 @@ -199,7 +199,7 @@ idCommRingEquiv : (A : CommRing ) CommRingEquiv A A fst (idCommRingEquiv A) = idEquiv (fst A) - snd (idCommRingEquiv A) = makeIsRingHom refl _ _ refl) _ _ refl) + snd (idCommRingEquiv A) = makeIsRingHom refl _ _ refl) _ _ refl) module CommRingHomTheory {A' B' : CommRing } (φ : CommRingHom A' B') where open Units A' renaming ( to ; _⁻¹ to _⁻¹ᵃ ; ·-rinv to ·A-rinv ; ·-linv to ·A-linv) @@ -212,10 +212,10 @@ private f = fst φ - open IsRingHom (φ .snd) + open IsRingHom (φ .snd) RingHomRespInv : (r : A) r∈Aˣ : r f r - RingHomRespInv r = f (r ⁻¹ᵃ) , (sym (pres· r (r ⁻¹ᵃ)) ∙∙ cong (f) (·A-rinv r) ∙∙ pres1) + RingHomRespInv r = f (r ⁻¹ᵃ) , (sym (pres· r (r ⁻¹ᵃ)) ∙∙ cong (f) (·A-rinv r) ∙∙ pres1) φ[x⁻¹]≡φ[x]⁻¹ : (r : A) r∈Aˣ : r φr∈Bˣ : f r f (r ⁻¹ᵃ) (f r) ⁻¹ᵇ @@ -223,9 +223,9 @@ f (r ⁻¹ᵃ) ≡⟨ sym (·B-rid _) f (r ⁻¹ᵃ) ·B 1b ≡⟨ cong (f (r ⁻¹ᵃ) ·B_) (sym (·B-rinv _)) f (r ⁻¹ᵃ) ·B ((f r) ·B (f r) ⁻¹ᵇ) ≡⟨ ·B-assoc _ _ _ - f (r ⁻¹ᵃ) ·B (f r) ·B (f r) ⁻¹ᵇ ≡⟨ cong (_·B (f r) ⁻¹ᵇ) (sym (pres· _ _)) + f (r ⁻¹ᵃ) ·B (f r) ·B (f r) ⁻¹ᵇ ≡⟨ cong (_·B (f r) ⁻¹ᵇ) (sym (pres· _ _)) f (r ⁻¹ᵃ ·A r) ·B (f r) ⁻¹ᵇ ≡⟨ cong x f x ·B (f r) ⁻¹ᵇ) (·A-linv _) - f 1a ·B (f r) ⁻¹ᵇ ≡⟨ cong (_·B (f r) ⁻¹ᵇ) (pres1) + f 1a ·B (f r) ⁻¹ᵇ ≡⟨ cong (_·B (f r) ⁻¹ᵇ) (pres1) 1b ·B (f r) ⁻¹ᵇ ≡⟨ ·B-lid _ (f r) ⁻¹ᵇ @@ -357,7 +357,7 @@ (∀ x y z σ x z compCommRingEquiv (σ x y) (σ y z)) ------------------------------------------------------ A ∥₁ CommRing -recPT→CommRing 𝓕 σ compCoh = GpdElim.rec→Gpd isGroupoidCommRing 𝓕 +recPT→CommRing 𝓕 σ compCoh = GpdElim.rec→Gpd isGroupoidCommRing 𝓕 (3-ConstantCompChar 𝓕 x y uaCommRing (σ x y)) λ x y z sym ( cong uaCommRing (compCoh x y z) uaCompCommRingEquiv (σ x y) (σ y z))) diff --git a/Cubical.Algebra.CommRing.Quotient.Base.html b/Cubical.Algebra.CommRing.Quotient.Base.html index 7c61b81a29..946ca05e77 100644 --- a/Cubical.Algebra.CommRing.Quotient.Base.html +++ b/Cubical.Algebra.CommRing.Quotient.Base.html @@ -45,22 +45,22 @@ module Quotient-FGideal-CommRing-Ring (A : CommRing ) (B : Ring ℓ') - (g : RingHom (CommRing→Ring A) B) + (g : RingHom (CommRing→Ring A) B) {n : } (v : FinVec A n) - (gnull : (k : Fin n) g $r v k RingStr.0r (snd B)) + (gnull : (k : Fin n) g $r v k RingStr.0r (snd B)) where open RingStr (snd B) using (0r) - zeroOnGeneratedIdeal : (x : A ) x fst (generatedIdeal A v) g $r x 0r + zeroOnGeneratedIdeal : (x : A ) x fst (generatedIdeal A v) g $r x 0r zeroOnGeneratedIdeal x x∈FGIdeal = PT.elim - _ isSetRing B (g $r x) 0r) + _ isSetRing B (g $r x) 0r) {(α , isLC) subst _ (sym isLC) (cancelLinearCombination A B g _ α v gnull)}) x∈FGIdeal - inducedHom : RingHom (CommRing→Ring (A / (generatedIdeal _ v))) B + inducedHom : RingHom (CommRing→Ring (A / (generatedIdeal _ v))) B inducedHom = Ring.UniversalProperty.inducedHom (CommRing→Ring A) (CommIdeal→Ideal ideal) g zeroOnGeneratedIdeal where ideal = generatedIdeal A v @@ -70,7 +70,7 @@ (g : CommRingHom A B) {n : } (v : FinVec A n) - (gnull : (k : Fin n) g $r v k CommRingStr.0r (snd B)) + (gnull : (k : Fin n) g $r v k CommRingStr.0r (snd B)) where inducedHom : CommRingHom (A / (generatedIdeal _ v)) B diff --git a/Cubical.Algebra.CommRing.Quotient.IdealSum.html b/Cubical.Algebra.CommRing.Quotient.IdealSum.html index e773b237e1..f0d8a1cc2f 100644 --- a/Cubical.Algebra.CommRing.Quotient.IdealSum.html +++ b/Cubical.Algebra.CommRing.Quotient.IdealSum.html @@ -34,7 +34,7 @@ open IdealSum R open Cubical.Algebra.Ring.Properties.RingHoms open CommRingStr ⦃...⦄ - open IsRingHom ⦃...⦄ + open IsRingHom ⦃...⦄ {- We show ψ is an isomorphism, by showing it is @@ -73,12 +73,12 @@ let instance _ = snd π πa≡0 : fst π a 0r πa≡0 = fst π₂ (fst π₁ a) ≡⟨ cong (fst π₂) (zeroOnIdeal I a a∈I) - fst π₂ 0r ≡⟨ pres0 snd π₂ + fst π₂ 0r ≡⟨ pres0 snd π₂ 0r πb≡0 : fst π b 0r πb≡0 = zeroOnIdeal π₁J (fst π₁ b) b , (b∈J , refl) ∣₁ in fst π x ≡⟨ cong (fst π) x≡a+b - fst π (a + b) ≡⟨ pres+ a b + fst π (a + b) ≡⟨ pres+ a b fst π a + fst π b ≡[ i ]⟨ πa≡0 i + πb≡0 i 0r + 0r ≡⟨ +IdL _ 0r diff --git a/Cubical.Algebra.CommSemiring.Instances.UpperNat.html b/Cubical.Algebra.CommSemiring.Instances.UpperNat.html index a6d7bd17db..ebd3a21955 100644 --- a/Cubical.Algebra.CommSemiring.Instances.UpperNat.html +++ b/Cubical.Algebra.CommSemiring.Instances.UpperNat.html @@ -59,29 +59,29 @@ ℕ↑-+ = PropCompletion ℕ≤+ ℕ↑-· = PropCompletion ℕ≤· - open OrderedCommMonoidStr (snd ℕ↑-+) - hiding (_≤_; MonotoneL; MonotoneR) + open OrderedCommMonoidStr (snd ℕ↑-+) + hiding (_≤_; MonotoneL; MonotoneR) renaming (·Assoc to +Assoc; ·Comm to +Comm; ·IdR to +Rid; - _·_ to _+_; ε to 0↑) + _·_ to _+_; ε to 0↑) - open OrderedCommMonoidStr (snd ℕ≤·) - using (MonotoneL; MonotoneR) + open OrderedCommMonoidStr (snd ℕ≤·) + using (MonotoneL; MonotoneR) - open OrderedCommMonoidStr (snd ℕ≤+) - hiding (_≤_) - renaming (_·_ to _+ℕ_; - MonotoneL to +MonotoneL; MonotoneR to +MonotoneR; + open OrderedCommMonoidStr (snd ℕ≤+) + hiding (_≤_) + renaming (_·_ to _+ℕ_; + MonotoneL to +MonotoneL; MonotoneR to +MonotoneR; ·Comm to ℕ+Comm) - open OrderedCommMonoidStr ⦃...⦄ - using (_·_ ; ·Assoc ; ·Comm ) + open OrderedCommMonoidStr ⦃...⦄ + using (_·_ ; ·Assoc ; ·Comm ) renaming (·IdR to ·Rid) private instance - _ : OrderedCommMonoidStr _ _ + _ : OrderedCommMonoidStr _ _ _ = snd ℕ↑-· - _ : OrderedCommMonoidStr _ _ + _ : OrderedCommMonoidStr _ _ _ = snd ℕ≤· ℕ↑ : Type₁ @@ -93,24 +93,24 @@ open <-Reasoning using (_≤⟨_⟩_) +LDist· : (x y z : ℕ↑) - x · (y + z) (x · y) + (x · z) + x · (y + z) (x · y) + (x · z) +LDist· x y z = pathFromImplications - (x · (y + z)) ((x · y) + (x · z)) + (x · (y + z)) ((x · y) + (x · z)) () where - : (n : ) typeAt n (x · (y + z)) typeAt n ((x · y) + (x · z)) + : (n : ) typeAt n (x · (y + z)) typeAt n ((x · y) + (x · z)) n = PT.rec isPropPropTrunc λ {((a , b) , xa , (y+zb , a·b≤n)) PT.rec isPropPropTrunc {((a' , b') , ya' , (zb' , a'+b'≤b)) - ((a · a') , (a · b')) , + ((a · a') , (a · b')) , (a , a') , (xa , (ya' , ≤-refl)) ∣₁ , ( (a , b') , (xa , (zb' , ≤-refl)) ∣₁ , subst (_≤ n) (sym (·-distribˡ a a' b')) - (≤-trans (MonotoneL {z = a} a'+b'≤b) a·b≤n)) ∣₁ }) + (≤-trans (MonotoneL {z = a} a'+b'≤b) a·b≤n)) ∣₁ }) y+zb} : (n : ) _ @@ -129,23 +129,23 @@ (a' , (b' +ℕ b″)) , a'x , ( (b' , b″) , (b'y , (zb″ , ≤-refl)) ∣₁ , - (a' · (b' +ℕ b″) ≤⟨ subst - (_≤ (a' · b') +ℕ (a' · b″)) + (a' · (b' +ℕ b″) ≤⟨ subst + (_≤ (a' · b') +ℕ (a' · b″)) (·-distribˡ a' b' b″) ≤-refl - (a' · b') +ℕ (a' · b″) ≤⟨ +MonotoneR a'·b'≤a - a +ℕ (a' · b″) ≤⟨ +MonotoneL - (≤-trans (MonotoneR a'≤a″) a″·b″≤b) + (a' · b') +ℕ (a' · b″) ≤⟨ +MonotoneR a'·b'≤a + a +ℕ (a' · b″) ≤⟨ +MonotoneL + (≤-trans (MonotoneR a'≤a″) a″·b″≤b) a+b≤n )) ) a″≤a' (a″ , (b' +ℕ b″)) , (a″x , ( (b' , b″) , (b'y , (zb″ , ≤-refl)) ∣₁ , - ((a″ · (b' +ℕ b″)) ≤⟨ subst - (_≤ (a″ · b') +ℕ (a″ · b″)) + ((a″ · (b' +ℕ b″)) ≤⟨ subst + (_≤ (a″ · b') +ℕ (a″ · b″)) (·-distribˡ a″ b' b″) ≤-refl - (a″ · b') +ℕ (a″ · b″) ≤⟨ +MonotoneR - ((a″ · b') ≤⟨ MonotoneR a″≤a' a'·b'≤a) - a +ℕ (a″ · b″) ≤⟨ +MonotoneL a″·b″≤b + (a″ · b') +ℕ (a″ · b″) ≤⟨ +MonotoneR + ((a″ · b') ≤⟨ MonotoneR a″≤a' a'·b'≤a) + a +ℕ (a″ · b″) ≤⟨ +MonotoneL a″·b″≤b a+b≤n))) ) ∣₁}) @@ -157,13 +157,13 @@ ℕ↑-+b = BoundedPropCompletion ℕ≤+ ℕ↑-·b = BoundedPropCompletion ℕ≤· - open OrderedCommMonoidStr (snd ℕ≤+) - renaming (_·_ to _+ℕ_; ·IdR to +IdR; ·Comm to ℕ+Comm) - open OrderedCommMonoidStr (snd ℕ↑-+b) - renaming (_·_ to _+_; ε to 0↑) + open OrderedCommMonoidStr (snd ℕ≤+) + renaming (_·_ to _+ℕ_; ·IdR to +IdR; ·Comm to ℕ+Comm) + open OrderedCommMonoidStr (snd ℕ↑-+b) + renaming (_·_ to _+_; ε to 0↑) - open OrderedCommMonoidStr (snd ℕ↑-·b) - using (_·_) + open OrderedCommMonoidStr (snd ℕ↑-·b) + using (_·_) open PropCompletion ℓ-zero ℕ≤+ using (typeAt; pathFromImplications) @@ -171,14 +171,14 @@ ℕ↑b : Type₁ ℕ↑b = fst ℕ↑-+b - AnnihilL : (x : ℕ↑b) 0↑ · x 0↑ + AnnihilL : (x : ℕ↑b) 0↑ · x 0↑ AnnihilL x = Σ≡Prop s PropCompletion.isPropIsBounded ℓ-zero ℕ≤+ s) - (pathFromImplications (fst (0↑ · x)) (fst 0↑) () ) + (pathFromImplications (fst (0↑ · x)) (fst 0↑) () ) where - : (n : ) typeAt n (fst (0↑ · x)) typeAt n (fst 0↑) + : (n : ) typeAt n (fst (0↑ · x)) typeAt n (fst 0↑) n _ = n , ℕ+Comm n 0 - : (n : ) typeAt n (fst 0↑) typeAt n (fst (0↑ · x)) + : (n : ) typeAt n (fst 0↑) typeAt n (fst (0↑ · x)) n _ = PT.rec isPropPropTrunc @@ -189,13 +189,13 @@ asCommSemiring : CommSemiring (ℓ-suc ℓ-zero) fst asCommSemiring = ℕ↑b CommSemiringStr.0r (snd asCommSemiring) = 0↑ - CommSemiringStr.1r (snd asCommSemiring) = OrderedCommMonoidStr.ε (snd ℕ↑-·b) + CommSemiringStr.1r (snd asCommSemiring) = OrderedCommMonoidStr.ε (snd ℕ↑-·b) CommSemiringStr._+_ (snd asCommSemiring) = _+_ - CommSemiringStr._·_ (snd asCommSemiring) = _·_ + CommSemiringStr._·_ (snd asCommSemiring) = _·_ IsCommSemiring.+IsCommMonoid (CommSemiringStr.isCommSemiring (snd asCommSemiring)) = - OrderedCommMonoidStr.isCommMonoid (snd ℕ↑-+b) + OrderedCommMonoidStr.isCommMonoid (snd ℕ↑-+b) IsCommSemiring.·IsCommMonoid (CommSemiringStr.isCommSemiring (snd asCommSemiring)) = - OrderedCommMonoidStr.isCommMonoid (snd ℕ↑-·b) + OrderedCommMonoidStr.isCommMonoid (snd ℕ↑-·b) IsCommSemiring.·LDist+ (CommSemiringStr.isCommSemiring (snd asCommSemiring)) = λ x y z Σ≡Prop s PropCompletion.isPropIsBounded ℓ-zero ℕ≤+ s) (ConstructionUnbounded.+LDist· (fst x) (fst y) (fst z)) diff --git a/Cubical.Algebra.DirectSum.DirectSumHIT.UniversalProperty.html b/Cubical.Algebra.DirectSum.DirectSumHIT.UniversalProperty.html index 82d9bcc47f..c75c059100 100644 --- a/Cubical.Algebra.DirectSum.DirectSumHIT.UniversalProperty.html +++ b/Cubical.Algebra.DirectSum.DirectSumHIT.UniversalProperty.html @@ -28,7 +28,7 @@ (G : (k : Idx) Type ℓ') (Gstr : (k : Idx) AbGroupStr (G k)) (HAbGr@(H , Hstr) : AbGroup ℓ'') - (fHhom : (k : Idx) AbGroupHom ((G k) , (Gstr k)) HAbGr) + (fHhom : (k : Idx) AbGroupHom ((G k) , (Gstr k)) HAbGr) where private @@ -40,7 +40,7 @@ injₖ : (k : Idx) G k ⊕HIT Idx G Gstr injₖ k a = base k a - injₖ-hom : (k : Idx) AbGroupHom ((G k) , (Gstr k)) (⊕HIT-AbGr Idx G Gstr) + injₖ-hom : (k : Idx) AbGroupHom ((G k) , (Gstr k)) (⊕HIT-AbGr Idx G Gstr) injₖ-hom k = injₖ k , (makeIsGroupHom λ a b sym (base-add _ _ _) ) -- universalProperty : @@ -55,7 +55,7 @@ k pres1 (fHstr k)) λ k a b sym (pres· (fHstr k) _ _) - ⊕HIT→H-hom : AbGroupHom (⊕HIT-AbGr Idx G Gstr) HAbGr + ⊕HIT→H-hom : AbGroupHom (⊕HIT-AbGr Idx G Gstr) HAbGr ⊕HIT→H-hom = ⊕HIT→H , (makeIsGroupHom _ _ refl)) -- Universal Property @@ -65,7 +65,7 @@ , isPropIsGroupHom _ _ _ _) - upUnicity⊕HIT : (hhom : AbGroupHom (⊕HIT-AbGr Idx G Gstr) HAbGr) + upUnicity⊕HIT : (hhom : AbGroupHom (⊕HIT-AbGr Idx G Gstr) HAbGr) (eqInj : (k : Idx) fHhom k compGroupHom (injₖ-hom k) hhom) hhom ⊕HIT→H-hom upUnicity⊕HIT (h , hstr) eqInj = ΣPathTransport→PathΣ _ _ diff --git a/Cubical.Algebra.DirectSum.Equiv-DSHIT-DSFun.html b/Cubical.Algebra.DirectSum.Equiv-DSHIT-DSFun.html index c4db6d141e..92a151a58b 100644 --- a/Cubical.Algebra.DirectSum.Equiv-DSHIT-DSFun.html +++ b/Cubical.Algebra.DirectSum.Equiv-DSHIT-DSFun.html @@ -412,7 +412,7 @@ open Iso open Equiv-Properties G Gstr - Equiv-DirectSum : AbGroupEquiv (⊕HIT-AbGr G Gstr) (⊕Fun-AbGr G Gstr) + Equiv-DirectSum : AbGroupEquiv (⊕HIT-AbGr G Gstr) (⊕Fun-AbGr G Gstr) fst Equiv-DirectSum = isoToEquiv is where is : Iso (⊕HIT G Gstr) (⊕Fun G Gstr) diff --git a/Cubical.Algebra.DistLattice.Base.html b/Cubical.Algebra.DistLattice.Base.html index 50823a0296..4a60bcf1ec 100644 --- a/Cubical.Algebra.DistLattice.Base.html +++ b/Cubical.Algebra.DistLattice.Base.html @@ -76,203 +76,205 @@ DistLattice = TypeWithStr DistLatticeStr isSetDistLattice : (L : DistLattice ) isSet L -isSetDistLattice L = L .snd .DistLatticeStr.is-set - --- when proving the axioms for a distributive lattice --- we use the fact that from distributivity and absorption --- of ∧l over ∨l we can derive distributivity and absorption --- of ∨l over ∧l and vice versa. We give provide thus two --- ways of making a distributive lattice... -makeIsDistLattice∧lOver∨l : {L : Type } {0l 1l : L} {_∨l_ _∧l_ : L L L} - (is-setL : isSet L) - (∨l-assoc : (x y z : L) x ∨l (y ∨l z) (x ∨l y) ∨l z) - (∨l-rid : (x : L) x ∨l 0l x) - (∨l-comm : (x y : L) x ∨l y y ∨l x) - (∧l-assoc : (x y z : L) x ∧l (y ∧l z) (x ∧l y) ∧l z) - (∧l-rid : (x : L) x ∧l 1l x) - (∧l-comm : (x y : L) x ∧l y y ∧l x) - (∧l-absorb-∨l : (x y : L) x ∧l (x ∨l y) x) - (∧l-ldist-∨l : (x y z : L) x ∧l (y ∨l z) (x ∧l y) ∨l (x ∧l z)) - IsDistLattice 0l 1l _∨l_ _∧l_ -makeIsDistLattice∧lOver∨l {_∨l_ = _∨l_} {_∧l_ = _∧l_} is-setL - ∨l-assoc ∨l-rid ∨l-comm - ∧l-assoc ∧l-rid ∧l-comm - ∧l-absorb-∨l ∧l-ldist-∨l = - isdistlattice (makeIsLattice is-setL ∨l-assoc ∨l-rid ∨l-comm - ∧l-assoc ∧l-rid ∧l-comm - ∨l-absorb-∧l ∧l-absorb-∨l) - x y z ∨l-ldist-∧l _ _ _ , ∨l-rdist-∧l _ _ _) - x y z ∧l-ldist-∨l _ _ _ , ∧l-rdist-∨l _ _ _) - where - ∧l-idem : x x ∧l x x - ∧l-idem x = cong (x ∧l_) (sym (∨l-rid _)) ∧l-absorb-∨l _ _ - - ∨l-absorb-∧l : x y x ∨l (x ∧l y) x - ∨l-absorb-∧l x y = - cong (_∨l (x ∧l y)) (sym (∧l-idem _)) ∙∙ sym (∧l-ldist-∨l _ _ _) ∙∙ ∧l-absorb-∨l _ _ - - ∧l-rdist-∨l : x y z (y ∨l z) ∧l x (y ∧l x) ∨l (z ∧l x) - ∧l-rdist-∨l _ _ _ = ∧l-comm _ _ ∙∙ ∧l-ldist-∨l _ _ _ ∙∙ cong₂ (_∨l_) (∧l-comm _ _) (∧l-comm _ _) - - ∨l-ldist-∧l : x y z x ∨l (y ∧l z) (x ∨l y) ∧l (x ∨l z) - ∨l-ldist-∧l x y z = x ∨l (y ∧l z) - ≡⟨ cong (_∨l (y ∧l z)) (sym (∨l-absorb-∧l _ _)) - (x ∨l (x ∧l z)) ∨l (y ∧l z) - ≡⟨ sym (∨l-assoc _ _ _) - x ∨l ((x ∧l z) ∨l (y ∧l z)) - ≡⟨ cong (_∨l ((x ∧l z) ∨l (y ∧l z))) (sym (∧l-comm _ _ ∧l-absorb-∨l _ _)) - ((x ∨l y) ∧l x) ∨l ((x ∧l z) ∨l (y ∧l z)) - ≡⟨ cong (((x ∨l y) ∧l x) ∨l_) (sym (∧l-rdist-∨l _ _ _)) - ((x ∨l y) ∧l x) ∨l ((x ∨l y) ∧l z) - ≡⟨ sym (∧l-ldist-∨l _ _ _) - (x ∨l y) ∧l (x ∨l z) - - ∨l-rdist-∧l : x y z (y ∧l z) ∨l x (y ∨l x) ∧l (z ∨l x) - ∨l-rdist-∧l x y z = ∨l-comm _ x ∙∙ ∨l-ldist-∧l _ _ _ ∙∙ cong₂ (_∧l_) (∨l-comm _ _) (∨l-comm _ _) - -makeDistLattice∧lOver∨l : {L : Type } (0l 1l : L) (_∨l_ _∧l_ : L L L) - (is-setL : isSet L) - (∨l-assoc : (x y z : L) x ∨l (y ∨l z) (x ∨l y) ∨l z) - (∨l-rid : (x : L) x ∨l 0l x) - (∨l-comm : (x y : L) x ∨l y y ∨l x) - (∧l-assoc : (x y z : L) x ∧l (y ∧l z) (x ∧l y) ∧l z) - (∧l-rid : (x : L) x ∧l 1l x) - (∧l-comm : (x y : L) x ∧l y y ∧l x) - (∧l-absorb-∨l : (x y : L) x ∧l (x ∨l y) x) - (∧l-ldist-∨l : (x y z : L) x ∧l (y ∨l z) (x ∧l y) ∨l (x ∧l z)) - DistLattice -makeDistLattice∧lOver∨l 0l 1l _∨l_ _∧l_ is-setL ∨l-assoc ∨l-rid ∨l-comm - ∧l-assoc ∧l-rid ∧l-comm - ∧l-absorb-∨l ∧l-ldist-∨l = - _ , distlatticestr _ _ _ _ - (makeIsDistLattice∧lOver∨l is-setL ∨l-assoc ∨l-rid ∨l-comm - ∧l-assoc ∧l-rid ∧l-comm - ∧l-absorb-∨l ∧l-ldist-∨l) - -makeIsDistLattice∨lOver∧l : {L : Type } {0l 1l : L} {_∨l_ _∧l_ : L L L} - (is-setL : isSet L) - (∨l-assoc : (x y z : L) x ∨l (y ∨l z) (x ∨l y) ∨l z) - (∨l-rid : (x : L) x ∨l 0l x) - (∨l-comm : (x y : L) x ∨l y y ∨l x) - (∧l-assoc : (x y z : L) x ∧l (y ∧l z) (x ∧l y) ∧l z) - (∧l-rid : (x : L) x ∧l 1l x) - (∧l-comm : (x y : L) x ∧l y y ∧l x) - (∨l-absorb-∧l : (x y : L) x ∨l (x ∧l y) x) - (∨l-ldist-∧l : (x y z : L) x ∨l (y ∧l z) (x ∨l y) ∧l (x ∨l z)) - IsDistLattice 0l 1l _∨l_ _∧l_ -makeIsDistLattice∨lOver∧l {_∨l_ = _∨l_} {_∧l_ = _∧l_} is-setL - ∨l-assoc ∨l-rid ∨l-comm - ∧l-assoc ∧l-rid ∧l-comm - ∨l-absorb-∧l ∨l-ldist-∧l = - isdistlattice - (makeIsLattice is-setL ∨l-assoc ∨l-rid ∨l-comm - ∧l-assoc ∧l-rid ∧l-comm - ∨l-absorb-∧l ∧l-absorb-∨l) - x y z ∨l-ldist-∧l _ _ _ , ∨l-rdist-∧l _ _ _) - x y z ∧l-ldist-∨l _ _ _ , ∧l-rdist-∨l _ _ _) - where - ∨l-idem : x x ∨l x x - ∨l-idem x = cong (x ∨l_) (sym (∧l-rid _)) ∨l-absorb-∧l _ _ - - ∧l-absorb-∨l : x y x ∧l (x ∨l y) x - ∧l-absorb-∨l x y = - cong (_∧l (x ∨l y)) (sym (∨l-idem _)) ∙∙ sym (∨l-ldist-∧l _ _ _) ∙∙ ∨l-absorb-∧l _ _ - - ∨l-rdist-∧l : x y z (y ∧l z) ∨l x (y ∨l x) ∧l (z ∨l x) - ∨l-rdist-∧l _ _ _ = ∨l-comm _ _ ∙∙ ∨l-ldist-∧l _ _ _ ∙∙ cong₂ (_∧l_) (∨l-comm _ _) (∨l-comm _ _) - - ∧l-ldist-∨l : x y z x ∧l (y ∨l z) (x ∧l y) ∨l (x ∧l z) - ∧l-ldist-∨l x y z = x ∧l (y ∨l z) - ≡⟨ cong (_∧l (y ∨l z)) (sym (∧l-absorb-∨l _ _)) - (x ∧l (x ∨l z)) ∧l (y ∨l z) - ≡⟨ sym (∧l-assoc _ _ _) - x ∧l ((x ∨l z) ∧l (y ∨l z)) - ≡⟨ cong (_∧l ((x ∨l z) ∧l (y ∨l z))) (sym (∨l-comm _ _ ∨l-absorb-∧l _ _)) - ((x ∧l y) ∨l x) ∧l ((x ∨l z) ∧l (y ∨l z)) - ≡⟨ cong (((x ∧l y) ∨l x) ∧l_) (sym (∨l-rdist-∧l _ _ _)) - ((x ∧l y) ∨l x) ∧l ((x ∧l y) ∨l z) - ≡⟨ sym (∨l-ldist-∧l _ _ _) - (x ∧l y) ∨l (x ∧l z) - - ∧l-rdist-∨l : x y z (y ∨l z) ∧l x (y ∧l x) ∨l (z ∧l x) - ∧l-rdist-∨l x y z = ∧l-comm _ x ∙∙ ∧l-ldist-∨l _ _ _ ∙∙ cong₂ (_∨l_) (∧l-comm _ _) (∧l-comm _ _) - -makeDistLattice∨lOver∧l : {L : Type } (0l 1l : L) (_∨l_ _∧l_ : L L L) - (is-setL : isSet L) - (∨l-assoc : (x y z : L) x ∨l (y ∨l z) (x ∨l y) ∨l z) - (∨l-rid : (x : L) x ∨l 0l x) - (∨l-comm : (x y : L) x ∨l y y ∨l x) - (∧l-assoc : (x y z : L) x ∧l (y ∧l z) (x ∧l y) ∧l z) - (∧l-rid : (x : L) x ∧l 1l x) - (∧l-comm : (x y : L) x ∧l y y ∧l x) - (∨l-absorb-∧l : (x y : L) x ∨l (x ∧l y) x) - (∨l-ldist-∧l : (x y z : L) x ∨l (y ∧l z) (x ∨l y) ∧l (x ∨l z)) - DistLattice -makeDistLattice∨lOver∧l 0l 1l _∨l_ _∧l_ is-setL ∨l-assoc ∨l-rid ∨l-comm - ∧l-assoc ∧l-rid ∧l-comm - ∨l-absorb-∧l ∨l-ldist-∧l = - _ , distlatticestr _ _ _ _ - (makeIsDistLattice∨lOver∧l is-setL ∨l-assoc ∨l-rid ∨l-comm - ∧l-assoc ∧l-rid ∧l-comm ∨l-absorb-∧l ∨l-ldist-∧l) - - -DistLatticeStr→LatticeStr : {A : Type } DistLatticeStr A LatticeStr A -DistLatticeStr→LatticeStr (distlatticestr _ _ _ _ H) = - latticestr _ _ _ _ (IsDistLattice.isLattice H) - -DistLattice→Lattice : DistLattice Lattice -DistLattice→Lattice (_ , distlatticestr _ _ _ _ H) = - _ , latticestr _ _ _ _ (IsDistLattice.isLattice H) - -DistLatticeHom : (L : DistLattice ) (M : DistLattice ℓ') Type (ℓ-max ℓ') -DistLatticeHom L M = LatticeHom (DistLattice→Lattice L) (DistLattice→Lattice M) - -idDistLatticeHom : (L : DistLattice ) DistLatticeHom L L -idDistLatticeHom L = idLatticeHom (DistLattice→Lattice L) - -IsDistLatticeEquiv : {A : Type } {B : Type ℓ'} - (L : DistLatticeStr A) (e : A B) (M : DistLatticeStr B) Type (ℓ-max ℓ') -IsDistLatticeEquiv L e M = - IsLatticeHom (DistLatticeStr→LatticeStr L) (e .fst) (DistLatticeStr→LatticeStr M) - -DistLatticeEquiv : (L : DistLattice ) (M : DistLattice ℓ') Type (ℓ-max ℓ') -DistLatticeEquiv L M = Σ[ e (L .fst M .fst) ] IsDistLatticeEquiv (L .snd) e (M .snd) - -isPropIsDistLattice : {L : Type } (0l 1l : L) (_∨l_ _∧l_ : L L L) - isProp (IsDistLattice 0l 1l _∨l_ _∧l_) -isPropIsDistLattice 0l 1l _∨l_ _∧l_ (isdistlattice LL LD1 LD2) (isdistlattice ML MD1 MD2) = - λ i isdistlattice (isPropIsLattice _ _ _ _ LL ML i) (isPropDist1 LD1 MD1 i) - (isPropDist2 LD2 MD2 i) - where - isSetL : isSet _ - isSetL = LL .IsLattice.joinSemilattice .IsSemilattice.isCommMonoid .IsCommMonoid.isMonoid - .IsMonoid.isSemigroup .IsSemigroup.is-set - - isPropDist1 : isProp ((x y z : _) (x ∨l (y ∧l z) (x ∨l y) ∧l (x ∨l z)) - × ((y ∧l z) ∨l x (y ∨l x) ∧l (z ∨l x))) - isPropDist1 = isPropΠ3 _ _ _ isProp× (isSetL _ _) (isSetL _ _)) - - isPropDist2 : isProp ((x y z : _) (x ∧l (y ∨l z) (x ∧l y) ∨l (x ∧l z)) - × ((y ∨l z) ∧l x (y ∧l x) ∨l (z ∧l x))) - isPropDist2 = isPropΠ3 _ _ _ isProp× (isSetL _ _) (isSetL _ _)) - -𝒮ᴰ-DistLattice : DUARel (𝒮-Univ ) DistLatticeStr -𝒮ᴰ-DistLattice = - 𝒮ᴰ-Record (𝒮-Univ _) IsDistLatticeEquiv - (fields: - data[ 0l null pres0 ] - data[ 1l null pres1 ] - data[ _∨l_ bin pres∨l ] - data[ _∧l_ bin pres∧l ] - prop[ isDistLattice _ _ isPropIsDistLattice _ _ _ _) ]) - where - open DistLatticeStr - open IsLatticeHom - - -- faster with some sharing - null = autoDUARel (𝒮-Univ _) A A) - bin = autoDUARel (𝒮-Univ _) A A A A) - -DistLatticePath : (L M : DistLattice ) DistLatticeEquiv L M (L M) -DistLatticePath = 𝒮ᴰ-DistLattice .UARel.ua +isSetDistLattice L = is-set + where + open DistLatticeStr (str L) + +-- when proving the axioms for a distributive lattice +-- we use the fact that from distributivity and absorption +-- of ∧l over ∨l we can derive distributivity and absorption +-- of ∨l over ∧l and vice versa. We give provide thus two +-- ways of making a distributive lattice... +makeIsDistLattice∧lOver∨l : {L : Type } {0l 1l : L} {_∨l_ _∧l_ : L L L} + (is-setL : isSet L) + (∨l-assoc : (x y z : L) x ∨l (y ∨l z) (x ∨l y) ∨l z) + (∨l-rid : (x : L) x ∨l 0l x) + (∨l-comm : (x y : L) x ∨l y y ∨l x) + (∧l-assoc : (x y z : L) x ∧l (y ∧l z) (x ∧l y) ∧l z) + (∧l-rid : (x : L) x ∧l 1l x) + (∧l-comm : (x y : L) x ∧l y y ∧l x) + (∧l-absorb-∨l : (x y : L) x ∧l (x ∨l y) x) + (∧l-ldist-∨l : (x y z : L) x ∧l (y ∨l z) (x ∧l y) ∨l (x ∧l z)) + IsDistLattice 0l 1l _∨l_ _∧l_ +makeIsDistLattice∧lOver∨l {_∨l_ = _∨l_} {_∧l_ = _∧l_} is-setL + ∨l-assoc ∨l-rid ∨l-comm + ∧l-assoc ∧l-rid ∧l-comm + ∧l-absorb-∨l ∧l-ldist-∨l = + isdistlattice (makeIsLattice is-setL ∨l-assoc ∨l-rid ∨l-comm + ∧l-assoc ∧l-rid ∧l-comm + ∨l-absorb-∧l ∧l-absorb-∨l) + x y z ∨l-ldist-∧l _ _ _ , ∨l-rdist-∧l _ _ _) + x y z ∧l-ldist-∨l _ _ _ , ∧l-rdist-∨l _ _ _) + where + ∧l-idem : x x ∧l x x + ∧l-idem x = cong (x ∧l_) (sym (∨l-rid _)) ∧l-absorb-∨l _ _ + + ∨l-absorb-∧l : x y x ∨l (x ∧l y) x + ∨l-absorb-∧l x y = + cong (_∨l (x ∧l y)) (sym (∧l-idem _)) ∙∙ sym (∧l-ldist-∨l _ _ _) ∙∙ ∧l-absorb-∨l _ _ + + ∧l-rdist-∨l : x y z (y ∨l z) ∧l x (y ∧l x) ∨l (z ∧l x) + ∧l-rdist-∨l _ _ _ = ∧l-comm _ _ ∙∙ ∧l-ldist-∨l _ _ _ ∙∙ cong₂ (_∨l_) (∧l-comm _ _) (∧l-comm _ _) + + ∨l-ldist-∧l : x y z x ∨l (y ∧l z) (x ∨l y) ∧l (x ∨l z) + ∨l-ldist-∧l x y z = x ∨l (y ∧l z) + ≡⟨ cong (_∨l (y ∧l z)) (sym (∨l-absorb-∧l _ _)) + (x ∨l (x ∧l z)) ∨l (y ∧l z) + ≡⟨ sym (∨l-assoc _ _ _) + x ∨l ((x ∧l z) ∨l (y ∧l z)) + ≡⟨ cong (_∨l ((x ∧l z) ∨l (y ∧l z))) (sym (∧l-comm _ _ ∧l-absorb-∨l _ _)) + ((x ∨l y) ∧l x) ∨l ((x ∧l z) ∨l (y ∧l z)) + ≡⟨ cong (((x ∨l y) ∧l x) ∨l_) (sym (∧l-rdist-∨l _ _ _)) + ((x ∨l y) ∧l x) ∨l ((x ∨l y) ∧l z) + ≡⟨ sym (∧l-ldist-∨l _ _ _) + (x ∨l y) ∧l (x ∨l z) + + ∨l-rdist-∧l : x y z (y ∧l z) ∨l x (y ∨l x) ∧l (z ∨l x) + ∨l-rdist-∧l x y z = ∨l-comm _ x ∙∙ ∨l-ldist-∧l _ _ _ ∙∙ cong₂ (_∧l_) (∨l-comm _ _) (∨l-comm _ _) + +makeDistLattice∧lOver∨l : {L : Type } (0l 1l : L) (_∨l_ _∧l_ : L L L) + (is-setL : isSet L) + (∨l-assoc : (x y z : L) x ∨l (y ∨l z) (x ∨l y) ∨l z) + (∨l-rid : (x : L) x ∨l 0l x) + (∨l-comm : (x y : L) x ∨l y y ∨l x) + (∧l-assoc : (x y z : L) x ∧l (y ∧l z) (x ∧l y) ∧l z) + (∧l-rid : (x : L) x ∧l 1l x) + (∧l-comm : (x y : L) x ∧l y y ∧l x) + (∧l-absorb-∨l : (x y : L) x ∧l (x ∨l y) x) + (∧l-ldist-∨l : (x y z : L) x ∧l (y ∨l z) (x ∧l y) ∨l (x ∧l z)) + DistLattice +makeDistLattice∧lOver∨l 0l 1l _∨l_ _∧l_ is-setL ∨l-assoc ∨l-rid ∨l-comm + ∧l-assoc ∧l-rid ∧l-comm + ∧l-absorb-∨l ∧l-ldist-∨l = + _ , distlatticestr _ _ _ _ + (makeIsDistLattice∧lOver∨l is-setL ∨l-assoc ∨l-rid ∨l-comm + ∧l-assoc ∧l-rid ∧l-comm + ∧l-absorb-∨l ∧l-ldist-∨l) + +makeIsDistLattice∨lOver∧l : {L : Type } {0l 1l : L} {_∨l_ _∧l_ : L L L} + (is-setL : isSet L) + (∨l-assoc : (x y z : L) x ∨l (y ∨l z) (x ∨l y) ∨l z) + (∨l-rid : (x : L) x ∨l 0l x) + (∨l-comm : (x y : L) x ∨l y y ∨l x) + (∧l-assoc : (x y z : L) x ∧l (y ∧l z) (x ∧l y) ∧l z) + (∧l-rid : (x : L) x ∧l 1l x) + (∧l-comm : (x y : L) x ∧l y y ∧l x) + (∨l-absorb-∧l : (x y : L) x ∨l (x ∧l y) x) + (∨l-ldist-∧l : (x y z : L) x ∨l (y ∧l z) (x ∨l y) ∧l (x ∨l z)) + IsDistLattice 0l 1l _∨l_ _∧l_ +makeIsDistLattice∨lOver∧l {_∨l_ = _∨l_} {_∧l_ = _∧l_} is-setL + ∨l-assoc ∨l-rid ∨l-comm + ∧l-assoc ∧l-rid ∧l-comm + ∨l-absorb-∧l ∨l-ldist-∧l = + isdistlattice + (makeIsLattice is-setL ∨l-assoc ∨l-rid ∨l-comm + ∧l-assoc ∧l-rid ∧l-comm + ∨l-absorb-∧l ∧l-absorb-∨l) + x y z ∨l-ldist-∧l _ _ _ , ∨l-rdist-∧l _ _ _) + x y z ∧l-ldist-∨l _ _ _ , ∧l-rdist-∨l _ _ _) + where + ∨l-idem : x x ∨l x x + ∨l-idem x = cong (x ∨l_) (sym (∧l-rid _)) ∨l-absorb-∧l _ _ + + ∧l-absorb-∨l : x y x ∧l (x ∨l y) x + ∧l-absorb-∨l x y = + cong (_∧l (x ∨l y)) (sym (∨l-idem _)) ∙∙ sym (∨l-ldist-∧l _ _ _) ∙∙ ∨l-absorb-∧l _ _ + + ∨l-rdist-∧l : x y z (y ∧l z) ∨l x (y ∨l x) ∧l (z ∨l x) + ∨l-rdist-∧l _ _ _ = ∨l-comm _ _ ∙∙ ∨l-ldist-∧l _ _ _ ∙∙ cong₂ (_∧l_) (∨l-comm _ _) (∨l-comm _ _) + + ∧l-ldist-∨l : x y z x ∧l (y ∨l z) (x ∧l y) ∨l (x ∧l z) + ∧l-ldist-∨l x y z = x ∧l (y ∨l z) + ≡⟨ cong (_∧l (y ∨l z)) (sym (∧l-absorb-∨l _ _)) + (x ∧l (x ∨l z)) ∧l (y ∨l z) + ≡⟨ sym (∧l-assoc _ _ _) + x ∧l ((x ∨l z) ∧l (y ∨l z)) + ≡⟨ cong (_∧l ((x ∨l z) ∧l (y ∨l z))) (sym (∨l-comm _ _ ∨l-absorb-∧l _ _)) + ((x ∧l y) ∨l x) ∧l ((x ∨l z) ∧l (y ∨l z)) + ≡⟨ cong (((x ∧l y) ∨l x) ∧l_) (sym (∨l-rdist-∧l _ _ _)) + ((x ∧l y) ∨l x) ∧l ((x ∧l y) ∨l z) + ≡⟨ sym (∨l-ldist-∧l _ _ _) + (x ∧l y) ∨l (x ∧l z) + + ∧l-rdist-∨l : x y z (y ∨l z) ∧l x (y ∧l x) ∨l (z ∧l x) + ∧l-rdist-∨l x y z = ∧l-comm _ x ∙∙ ∧l-ldist-∨l _ _ _ ∙∙ cong₂ (_∨l_) (∧l-comm _ _) (∧l-comm _ _) + +makeDistLattice∨lOver∧l : {L : Type } (0l 1l : L) (_∨l_ _∧l_ : L L L) + (is-setL : isSet L) + (∨l-assoc : (x y z : L) x ∨l (y ∨l z) (x ∨l y) ∨l z) + (∨l-rid : (x : L) x ∨l 0l x) + (∨l-comm : (x y : L) x ∨l y y ∨l x) + (∧l-assoc : (x y z : L) x ∧l (y ∧l z) (x ∧l y) ∧l z) + (∧l-rid : (x : L) x ∧l 1l x) + (∧l-comm : (x y : L) x ∧l y y ∧l x) + (∨l-absorb-∧l : (x y : L) x ∨l (x ∧l y) x) + (∨l-ldist-∧l : (x y z : L) x ∨l (y ∧l z) (x ∨l y) ∧l (x ∨l z)) + DistLattice +makeDistLattice∨lOver∧l 0l 1l _∨l_ _∧l_ is-setL ∨l-assoc ∨l-rid ∨l-comm + ∧l-assoc ∧l-rid ∧l-comm + ∨l-absorb-∧l ∨l-ldist-∧l = + _ , distlatticestr _ _ _ _ + (makeIsDistLattice∨lOver∧l is-setL ∨l-assoc ∨l-rid ∨l-comm + ∧l-assoc ∧l-rid ∧l-comm ∨l-absorb-∧l ∨l-ldist-∧l) + + +DistLatticeStr→LatticeStr : {A : Type } DistLatticeStr A LatticeStr A +DistLatticeStr→LatticeStr (distlatticestr _ _ _ _ H) = + latticestr _ _ _ _ (IsDistLattice.isLattice H) + +DistLattice→Lattice : DistLattice Lattice +DistLattice→Lattice (_ , distlatticestr _ _ _ _ H) = + _ , latticestr _ _ _ _ (IsDistLattice.isLattice H) + +DistLatticeHom : (L : DistLattice ) (M : DistLattice ℓ') Type (ℓ-max ℓ') +DistLatticeHom L M = LatticeHom (DistLattice→Lattice L) (DistLattice→Lattice M) + +idDistLatticeHom : (L : DistLattice ) DistLatticeHom L L +idDistLatticeHom L = idLatticeHom (DistLattice→Lattice L) + +IsDistLatticeEquiv : {A : Type } {B : Type ℓ'} + (L : DistLatticeStr A) (e : A B) (M : DistLatticeStr B) Type (ℓ-max ℓ') +IsDistLatticeEquiv L e M = + IsLatticeHom (DistLatticeStr→LatticeStr L) (e .fst) (DistLatticeStr→LatticeStr M) + +DistLatticeEquiv : (L : DistLattice ) (M : DistLattice ℓ') Type (ℓ-max ℓ') +DistLatticeEquiv L M = Σ[ e (L .fst M .fst) ] IsDistLatticeEquiv (L .snd) e (M .snd) + +isPropIsDistLattice : {L : Type } (0l 1l : L) (_∨l_ _∧l_ : L L L) + isProp (IsDistLattice 0l 1l _∨l_ _∧l_) +isPropIsDistLattice 0l 1l _∨l_ _∧l_ (isdistlattice LL LD1 LD2) (isdistlattice ML MD1 MD2) = + λ i isdistlattice (isPropIsLattice _ _ _ _ LL ML i) (isPropDist1 LD1 MD1 i) + (isPropDist2 LD2 MD2 i) + where + isSetL : isSet _ + isSetL = LL .IsLattice.joinSemilattice .IsSemilattice.isCommMonoid .IsCommMonoid.isMonoid + .IsMonoid.isSemigroup .IsSemigroup.is-set + + isPropDist1 : isProp ((x y z : _) (x ∨l (y ∧l z) (x ∨l y) ∧l (x ∨l z)) + × ((y ∧l z) ∨l x (y ∨l x) ∧l (z ∨l x))) + isPropDist1 = isPropΠ3 _ _ _ isProp× (isSetL _ _) (isSetL _ _)) + + isPropDist2 : isProp ((x y z : _) (x ∧l (y ∨l z) (x ∧l y) ∨l (x ∧l z)) + × ((y ∨l z) ∧l x (y ∧l x) ∨l (z ∧l x))) + isPropDist2 = isPropΠ3 _ _ _ isProp× (isSetL _ _) (isSetL _ _)) + +𝒮ᴰ-DistLattice : DUARel (𝒮-Univ ) DistLatticeStr +𝒮ᴰ-DistLattice = + 𝒮ᴰ-Record (𝒮-Univ _) IsDistLatticeEquiv + (fields: + data[ 0l null pres0 ] + data[ 1l null pres1 ] + data[ _∨l_ bin pres∨l ] + data[ _∧l_ bin pres∧l ] + prop[ isDistLattice _ _ isPropIsDistLattice _ _ _ _) ]) + where + open DistLatticeStr + open IsLatticeHom + + -- faster with some sharing + null = autoDUARel (𝒮-Univ _) A A) + bin = autoDUARel (𝒮-Univ _) A A A A) + +DistLatticePath : (L M : DistLattice ) DistLatticeEquiv L M (L M) +DistLatticePath = 𝒮ᴰ-DistLattice .UARel.ua \ No newline at end of file diff --git a/Cubical.Algebra.DistLattice.BigOps.html b/Cubical.Algebra.DistLattice.BigOps.html index e4dba2c4d4..ccea6a12d5 100644 --- a/Cubical.Algebra.DistLattice.BigOps.html +++ b/Cubical.Algebra.DistLattice.BigOps.html @@ -51,8 +51,8 @@ private L = fst L' open DistLatticeStr (snd L') - open MonoidBigOp (Semilattice→Monoid (Lattice→JoinSemilattice (DistLattice→Lattice L'))) - open LatticeTheory (DistLattice→Lattice L') + open MonoidBigOp (Semilattice→Monoid (Lattice→JoinSemilattice (DistLattice→Lattice L'))) + open LatticeTheory (DistLattice→Lattice L') open KroneckerDelta L' = bigOp @@ -102,7 +102,7 @@ ∙∙ ∨lLid _ ∙∙ ⋁Meet1r n (V suc) j -- inequalities of big joins - open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L')) + open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L')) ind≤⋁ = ind≤bigOp ⋁IsMax = bigOpIsMax ≤-⋁Ext = ≤-bigOpExt @@ -112,9 +112,9 @@ private L = fst L' open DistLatticeStr (snd L') - open MonoidBigOp (Semilattice→Monoid (Lattice→MeetSemilattice (DistLattice→Lattice L'))) + open MonoidBigOp (Semilattice→Monoid (Lattice→MeetSemilattice (DistLattice→Lattice L'))) -- extra DistLattice→MeetMonoid? - open LatticeTheory (DistLattice→Lattice L') + open LatticeTheory (DistLattice→Lattice L') open KroneckerDelta L' = bigOp diff --git a/Cubical.Algebra.Field.Base.html b/Cubical.Algebra.Field.Base.html index a08ed8cf76..16ffe2db54 100644 --- a/Cubical.Algebra.Field.Base.html +++ b/Cubical.Algebra.Field.Base.html @@ -76,138 +76,140 @@ Field = TypeWithStr FieldStr isSetField : (R : Field ) isSet R -isSetField R = R .snd .FieldStr.isField .IsField.·IsMonoid .IsMonoid.isSemigroup .IsSemigroup.is-set +isSetField R = is-set + where + open FieldStr (str R) + + +makeIsField : {R : Type } {0r 1r : R} {_+_ _·_ : R R R} { -_ : R R} + {_[_]⁻¹ : (x : R) ¬ (x 0r) R} + (is-setR : isSet R) + (+-assoc : (x y z : R) x + (y + z) (x + y) + z) + (+-rid : (x : R) x + 0r x) + (+-rinv : (x : R) x + (- x) 0r) + (+-comm : (x y : R) x + y y + x) + (·-assoc : (x y z : R) x · (y · z) (x · y) · z) + (·-rid : (x : R) x · 1r x) + (·-rdist-+ : (x y z : R) x · (y + z) (x · y) + (x · z)) + (·-comm : (x y : R) x · y y · x) + (·⁻¹≡1 : (x : R) (≢0 : ¬ (x 0r)) x · (x [ ≢0 ]⁻¹) 1r) + (0≢1 : ¬ (0r 1r)) + IsField 0r 1r _+_ _·_ -_ +makeIsField {R = R} {0r = 0r} {1r = 1r} {_+_ = _+_} {_·_ = _·_} {_[_]⁻¹ = _[_]⁻¹} + is-setR +-assoc +-rid +-rinv +-comm ·-assoc ·-rid ·-rdist-+ ·-comm ·⁻¹≡1 0≢1 = + isfield (makeIsCommRing is-setR +-assoc +-rid +-rinv +-comm ·-assoc ·-rid ·-rdist-+ ·-comm) ·-inv 0≢1 + where + ·-inv : (x : R) ¬ x 0r Σ[ y R ] x · y 1r + ·-inv x ¬x≡0 = x [ ¬x≡0 ]⁻¹ , ·⁻¹≡1 x ¬x≡0 + +makeField : {R : Type } (0r 1r : R) (_+_ _·_ : R R R) (-_ : R R) (_[_]⁻¹ : (x : R) ¬ (x 0r) R) + (is-setR : isSet R) + (+-assoc : (x y z : R) x + (y + z) (x + y) + z) + (+-rid : (x : R) x + 0r x) + (+-rinv : (x : R) x + (- x) 0r) + (+-comm : (x y : R) x + y y + x) + (·-assoc : (x y z : R) x · (y · z) (x · y) · z) + (·-rid : (x : R) x · 1r x) + (·-rdist-+ : (x y z : R) x · (y + z) (x · y) + (x · z)) + (·-comm : (x y : R) x · y y · x) + (·⁻¹≡1 : (x : R) (≢0 : ¬ (x 0r)) x · (x [ ≢0 ]⁻¹) 1r) + (0≢1 : ¬ (0r 1r)) + Field +makeField 0r 1r _+_ _·_ -_ _[_]⁻¹ is-setR +-assoc +-rid +-rinv +-comm ·-assoc ·-rid ·-rdist-+ ·-comm ·⁻¹≡1 0≢1 = + _ , fieldstr _ _ _ _ _ (makeIsField is-setR +-assoc +-rid +-rinv +-comm ·-assoc ·-rid ·-rdist-+ ·-comm ·⁻¹≡1 0≢1) + + +module _ (R : CommRing ) where + + open CommRingStr (R .snd) + + makeFieldFromCommRing : + (hasInv : (x : R .fst) ¬ x 0r Σ[ y R .fst ] x · y 1r) + (0≢1 : ¬ 0r 1r) + Field + makeFieldFromCommRing hasInv 0≢1 .fst = R .fst + makeFieldFromCommRing hasInv 0≢1 .snd = fieldstr _ _ _ _ _ (isfield isCommRing hasInv 0≢1) + + +FieldStr→CommRingStr : {A : Type } FieldStr A CommRingStr A +FieldStr→CommRingStr (fieldstr _ _ _ _ _ H) = commringstr _ _ _ _ _ (IsField.isCommRing H) + +Field→CommRing : Field CommRing +Field→CommRing (_ , fieldstr _ _ _ _ _ H) = _ , commringstr _ _ _ _ _ (IsField.isCommRing H) + + +record IsFieldHom {A : Type } {B : Type ℓ'} (R : FieldStr A) (f : A B) (S : FieldStr B) + : Type (ℓ-max ℓ') + where + + -- Shorter qualified names + private + module R = FieldStr R + module S = FieldStr S + + field + pres0 : f R.0r S.0r + pres1 : f R.1r S.1r + pres+ : (x y : A) f (x R.+ y) f x S.+ f y + pres· : (x y : A) f (x R.· y) f x S.· f y + pres- : (x : A) f (R.- x) S.- (f x) + +unquoteDecl IsFieldHomIsoΣ = declareRecordIsoΣ IsFieldHomIsoΣ (quote IsFieldHom) + +FieldHom : (R : Field ) (S : Field ℓ') Type (ℓ-max ℓ') +FieldHom R S = Σ[ f ( R S ) ] IsFieldHom (R .snd) f (S .snd) + + +IsFieldEquiv : {A : Type } {B : Type ℓ'} + (R : FieldStr A) (e : A B) (S : FieldStr B) Type (ℓ-max ℓ') +IsFieldEquiv R e S = IsFieldHom R (e .fst) S + +FieldEquiv : (R : Field ) (S : Field ℓ') Type (ℓ-max ℓ') +FieldEquiv R S = Σ[ e (R .fst S .fst) ] IsFieldEquiv (R .snd) e (S .snd) + + +_$f_ : {R S : Field } (φ : FieldHom R S) (x : R ) S +φ $f x = φ .fst x + + +FieldEquiv→FieldHom : {A B : Field } FieldEquiv A B FieldHom A B +FieldEquiv→FieldHom (e , eIsHom) = e .fst , eIsHom + + +isPropIsField : {R : Type } (0r 1r : R) (_+_ _·_ : R R R) (-_ : R R) + isProp (IsField 0r 1r _+_ _·_ -_) +isPropIsField {R = R} 0r 1r _+_ _·_ -_ H@(isfield RR RC RD) (isfield SR SC SD) = + λ i isfield (isPropIsCommRing _ _ _ _ _ RR SR i) + (isPropInv RC SC i) (isProp¬ _ RD SD i) + where + isSetR : isSet _ + isSetR = RR .IsCommRing.·IsMonoid .IsMonoid.isSemigroup .IsSemigroup.is-set + + isPropInv : isProp ((x : _) ¬ x 0r Σ[ y R ] x · y 1r) + isPropInv = isPropΠ2 x _ Units.inverseUniqueness (Field→CommRing (_ , fieldstr _ _ _ _ _ H)) x) + + +𝒮ᴰ-Field : DUARel (𝒮-Univ ) FieldStr +𝒮ᴰ-Field = + 𝒮ᴰ-Record (𝒮-Univ _) IsFieldEquiv + (fields: + data[ 0r null pres0 ] + data[ 1r null pres1 ] + data[ _+_ bin pres+ ] + data[ _·_ bin pres· ] + data[ -_ autoDUARel _ _ pres- ] + prop[ isField _ _ isPropIsField _ _ _ _ _) ]) + where + open FieldStr + open IsFieldHom + -- faster with some sharing + null = autoDUARel (𝒮-Univ _) A A) + bin = autoDUARel (𝒮-Univ _) A A A A) -makeIsField : {R : Type } {0r 1r : R} {_+_ _·_ : R R R} { -_ : R R} - {_[_]⁻¹ : (x : R) ¬ (x 0r) R} - (is-setR : isSet R) - (+-assoc : (x y z : R) x + (y + z) (x + y) + z) - (+-rid : (x : R) x + 0r x) - (+-rinv : (x : R) x + (- x) 0r) - (+-comm : (x y : R) x + y y + x) - (·-assoc : (x y z : R) x · (y · z) (x · y) · z) - (·-rid : (x : R) x · 1r x) - (·-rdist-+ : (x y z : R) x · (y + z) (x · y) + (x · z)) - (·-comm : (x y : R) x · y y · x) - (·⁻¹≡1 : (x : R) (≢0 : ¬ (x 0r)) x · (x [ ≢0 ]⁻¹) 1r) - (0≢1 : ¬ (0r 1r)) - IsField 0r 1r _+_ _·_ -_ -makeIsField {R = R} {0r = 0r} {1r = 1r} {_+_ = _+_} {_·_ = _·_} {_[_]⁻¹ = _[_]⁻¹} - is-setR +-assoc +-rid +-rinv +-comm ·-assoc ·-rid ·-rdist-+ ·-comm ·⁻¹≡1 0≢1 = - isfield (makeIsCommRing is-setR +-assoc +-rid +-rinv +-comm ·-assoc ·-rid ·-rdist-+ ·-comm) ·-inv 0≢1 - where - ·-inv : (x : R) ¬ x 0r Σ[ y R ] x · y 1r - ·-inv x ¬x≡0 = x [ ¬x≡0 ]⁻¹ , ·⁻¹≡1 x ¬x≡0 - -makeField : {R : Type } (0r 1r : R) (_+_ _·_ : R R R) (-_ : R R) (_[_]⁻¹ : (x : R) ¬ (x 0r) R) - (is-setR : isSet R) - (+-assoc : (x y z : R) x + (y + z) (x + y) + z) - (+-rid : (x : R) x + 0r x) - (+-rinv : (x : R) x + (- x) 0r) - (+-comm : (x y : R) x + y y + x) - (·-assoc : (x y z : R) x · (y · z) (x · y) · z) - (·-rid : (x : R) x · 1r x) - (·-rdist-+ : (x y z : R) x · (y + z) (x · y) + (x · z)) - (·-comm : (x y : R) x · y y · x) - (·⁻¹≡1 : (x : R) (≢0 : ¬ (x 0r)) x · (x [ ≢0 ]⁻¹) 1r) - (0≢1 : ¬ (0r 1r)) - Field -makeField 0r 1r _+_ _·_ -_ _[_]⁻¹ is-setR +-assoc +-rid +-rinv +-comm ·-assoc ·-rid ·-rdist-+ ·-comm ·⁻¹≡1 0≢1 = - _ , fieldstr _ _ _ _ _ (makeIsField is-setR +-assoc +-rid +-rinv +-comm ·-assoc ·-rid ·-rdist-+ ·-comm ·⁻¹≡1 0≢1) - - -module _ (R : CommRing ) where - - open CommRingStr (R .snd) - - makeFieldFromCommRing : - (hasInv : (x : R .fst) ¬ x 0r Σ[ y R .fst ] x · y 1r) - (0≢1 : ¬ 0r 1r) - Field - makeFieldFromCommRing hasInv 0≢1 .fst = R .fst - makeFieldFromCommRing hasInv 0≢1 .snd = fieldstr _ _ _ _ _ (isfield isCommRing hasInv 0≢1) - - -FieldStr→CommRingStr : {A : Type } FieldStr A CommRingStr A -FieldStr→CommRingStr (fieldstr _ _ _ _ _ H) = commringstr _ _ _ _ _ (IsField.isCommRing H) - -Field→CommRing : Field CommRing -Field→CommRing (_ , fieldstr _ _ _ _ _ H) = _ , commringstr _ _ _ _ _ (IsField.isCommRing H) - - -record IsFieldHom {A : Type } {B : Type ℓ'} (R : FieldStr A) (f : A B) (S : FieldStr B) - : Type (ℓ-max ℓ') - where - - -- Shorter qualified names - private - module R = FieldStr R - module S = FieldStr S - - field - pres0 : f R.0r S.0r - pres1 : f R.1r S.1r - pres+ : (x y : A) f (x R.+ y) f x S.+ f y - pres· : (x y : A) f (x R.· y) f x S.· f y - pres- : (x : A) f (R.- x) S.- (f x) - -unquoteDecl IsFieldHomIsoΣ = declareRecordIsoΣ IsFieldHomIsoΣ (quote IsFieldHom) - -FieldHom : (R : Field ) (S : Field ℓ') Type (ℓ-max ℓ') -FieldHom R S = Σ[ f ( R S ) ] IsFieldHom (R .snd) f (S .snd) - - -IsFieldEquiv : {A : Type } {B : Type ℓ'} - (R : FieldStr A) (e : A B) (S : FieldStr B) Type (ℓ-max ℓ') -IsFieldEquiv R e S = IsFieldHom R (e .fst) S - -FieldEquiv : (R : Field ) (S : Field ℓ') Type (ℓ-max ℓ') -FieldEquiv R S = Σ[ e (R .fst S .fst) ] IsFieldEquiv (R .snd) e (S .snd) - - -_$f_ : {R S : Field } (φ : FieldHom R S) (x : R ) S -φ $f x = φ .fst x - - -FieldEquiv→FieldHom : {A B : Field } FieldEquiv A B FieldHom A B -FieldEquiv→FieldHom (e , eIsHom) = e .fst , eIsHom - - -isPropIsField : {R : Type } (0r 1r : R) (_+_ _·_ : R R R) (-_ : R R) - isProp (IsField 0r 1r _+_ _·_ -_) -isPropIsField {R = R} 0r 1r _+_ _·_ -_ H@(isfield RR RC RD) (isfield SR SC SD) = - λ i isfield (isPropIsCommRing _ _ _ _ _ RR SR i) - (isPropInv RC SC i) (isProp¬ _ RD SD i) - where - isSetR : isSet _ - isSetR = RR .IsCommRing.·IsMonoid .IsMonoid.isSemigroup .IsSemigroup.is-set - - isPropInv : isProp ((x : _) ¬ x 0r Σ[ y R ] x · y 1r) - isPropInv = isPropΠ2 x _ Units.inverseUniqueness (Field→CommRing (_ , fieldstr _ _ _ _ _ H)) x) - - -𝒮ᴰ-Field : DUARel (𝒮-Univ ) FieldStr -𝒮ᴰ-Field = - 𝒮ᴰ-Record (𝒮-Univ _) IsFieldEquiv - (fields: - data[ 0r null pres0 ] - data[ 1r null pres1 ] - data[ _+_ bin pres+ ] - data[ _·_ bin pres· ] - data[ -_ autoDUARel _ _ pres- ] - prop[ isField _ _ isPropIsField _ _ _ _ _) ]) - where - open FieldStr - open IsFieldHom +FieldPath : (R S : Field ) FieldEquiv R S (R S) +FieldPath = 𝒮ᴰ-Field .UARel.ua - -- faster with some sharing - null = autoDUARel (𝒮-Univ _) A A) - bin = autoDUARel (𝒮-Univ _) A A A A) - -FieldPath : (R S : Field ) FieldEquiv R S (R S) -FieldPath = 𝒮ᴰ-Field .UARel.ua - -uaField : {A B : Field } FieldEquiv A B A B -uaField {A = A} {B = B} = equivFun (FieldPath A B) +uaField : {A B : Field } FieldEquiv A B A B +uaField {A = A} {B = B} = equivFun (FieldPath A B) \ No newline at end of file diff --git a/Cubical.Algebra.Field.Instances.QuoQ.html b/Cubical.Algebra.Field.Instances.QuoQ.html index e93cf8d967..d695496abe 100644 --- a/Cubical.Algebra.Field.Instances.QuoQ.html +++ b/Cubical.Algebra.Field.Instances.QuoQ.html @@ -90,5 +90,5 @@ -- The instance ℚField : Field ℓ-zero -ℚField = makeFieldFromCommRing ℚCommRing hasInverseℚ 0≢1-ℚ +ℚField = makeFieldFromCommRing ℚCommRing hasInverseℚ 0≢1-ℚ \ No newline at end of file diff --git a/Cubical.Algebra.GradedRing.Base.html b/Cubical.Algebra.GradedRing.Base.html index f015e09964..d6b8cf45e5 100644 --- a/Cubical.Algebra.GradedRing.Base.html +++ b/Cubical.Algebra.GradedRing.Base.html @@ -49,7 +49,7 @@ a ((Gstr l) ._+_ b c) Gstr (k · l) ._+_ (a b) (a c) ⋆DistL+ : {k l : Idx} (a b : G k) (c : G l) ((Gstr k) ._+_ a b) c Gstr (k · l) ._+_ (a c) (b c) - equivRing : RingEquiv R (⊕HITgradedRing-Ring IdM G Gstr 1⋆ _⋆_ + equivRing : RingEquiv R (⊕HITgradedRing-Ring IdM G Gstr 1⋆ _⋆_ 0-⋆ ⋆-0 ⋆Assoc ⋆IdR ⋆IdL ⋆DistR+ ⋆DistL+) @@ -93,7 +93,7 @@ a ((Gstr l) ._+_ b c) Gstr (snd IdM ._·_ k l) ._+_ (a b) (a c)) (⋆DistL+ : {k l : fst IdM} (a b : G k) (c : G l) ((Gstr k) ._+_ a b) c Gstr (snd IdM ._·_ k l) ._+_ (a c) (b c)) - (equivRing : RingEquiv R (⊕HITgradedRing-Ring IdM G Gstr 1⋆ _⋆_ + (equivRing : RingEquiv R (⊕HITgradedRing-Ring IdM G Gstr 1⋆ _⋆_ 0-⋆ ⋆-0 ⋆Assoc ⋆IdR ⋆IdL ⋆DistR+ ⋆DistL+)) IsGradedRing R IdM G Gstr 1⋆ _⋆_ makeIsGradedRing 0-⋆ ⋆-0 ⋆Assoc ⋆IdR ⋆IdL ⋆DistR+ ⋆DistL+ equivRing = @@ -117,7 +117,7 @@ a ((Gstr l) ._+_ b c) Gstr (snd IdM ._·_ k l) ._+_ (a b) (a c)) (⋆DistL+ : {k l : fst IdM} (a b : G k) (c : G l) ((Gstr k) ._+_ a b) c Gstr (snd IdM ._·_ k l) ._+_ (a c) (b c)) - (equivRing : RingEquiv R (⊕HITgradedRing-Ring IdM G Gstr 1⋆ _⋆_ + (equivRing : RingEquiv R (⊕HITgradedRing-Ring IdM G Gstr 1⋆ _⋆_ 0-⋆ ⋆-0 ⋆Assoc ⋆IdR ⋆IdL ⋆DistR+ ⋆DistL+)) GradedRing ℓ' fst (makeGradedRing R IdM G Gstr 1⋆ _⋆_ 0-⋆ ⋆-0 ⋆Assoc ⋆IdR ⋆IdL ⋆DistR+ ⋆DistL+ equivRing) = R @@ -153,5 +153,5 @@ makeGradedRingSelf IdM G Gstr 1⋆ _⋆_ 0-⋆ ⋆-0 ⋆Assoc ⋆IdR ⋆IdL ⋆DistR+ ⋆DistL+ = makeGradedRing (⊕HITgradedRing-Ring IdM G Gstr 1⋆ _⋆_ 0-⋆ ⋆-0 ⋆Assoc ⋆IdR ⋆IdL ⋆DistR+ ⋆DistL+) IdM G Gstr 1⋆ _⋆_ 0-⋆ ⋆-0 ⋆Assoc ⋆IdR ⋆IdL ⋆DistR+ ⋆DistL+ - ((idEquiv _) , (makeIsRingHom refl _ _ refl) _ _ refl))) + ((idEquiv _) , (makeIsRingHom refl _ _ refl) _ _ refl))) \ No newline at end of file diff --git a/Cubical.Algebra.GradedRing.DirectSumFun.html b/Cubical.Algebra.GradedRing.DirectSumFun.html index e3d835d2b3..8134ae442f 100644 --- a/Cubical.Algebra.GradedRing.DirectSumFun.html +++ b/Cubical.Algebra.GradedRing.DirectSumFun.html @@ -367,7 +367,7 @@ open IsGroupHom ⊕FunGradedRing-Ring : Ring - ⊕FunGradedRing-Ring = InducedRing ⊕HITgradedRing-Ring + ⊕FunGradedRing-Ring = InducedRing ⊕HITgradedRing-Ring 0⊕Fun 1⊕Fun _+⊕Fun_ _prodF_ -⊕Fun_ (fst (Equiv-DirectSum G Gstr)) (pres1 (snd (Equiv-DirectSum G Gstr))) @@ -376,8 +376,8 @@ ⊕HIT→⊕Fun-pres-prodF (presinv (snd (Equiv-DirectSum G Gstr))) - RingEquiv-DirectSumGradedRing : RingEquiv ⊕HITgradedRing-Ring ⊕FunGradedRing-Ring - RingEquiv-DirectSumGradedRing = InducedRingEquiv ⊕HITgradedRing-Ring + RingEquiv-DirectSumGradedRing : RingEquiv ⊕HITgradedRing-Ring ⊕FunGradedRing-Ring + RingEquiv-DirectSumGradedRing = InducedRingEquiv ⊕HITgradedRing-Ring 0⊕Fun 1⊕Fun _+⊕Fun_ _prodF_ -⊕Fun_ (fst (Equiv-DirectSum G Gstr)) (pres1 (snd (Equiv-DirectSum G Gstr))) @@ -409,7 +409,7 @@ open ExtensionCommRing ⋆Comm ⊕FunGradedRing-CommRing : CommRing - ⊕FunGradedRing-CommRing = InducedCommRing ⊕HITgradedRing-CommRing + ⊕FunGradedRing-CommRing = InducedCommRing ⊕HITgradedRing-CommRing 0⊕Fun 1⊕Fun _+⊕Fun_ _prodF_ -⊕Fun_ (fst (Equiv-DirectSum G Gstr)) (pres1 (snd (Equiv-DirectSum G Gstr))) @@ -419,7 +419,7 @@ (presinv (snd (Equiv-DirectSum G Gstr))) CommRingEquiv-DirectSumGradedRing : CommRingEquiv ⊕HITgradedRing-CommRing ⊕FunGradedRing-CommRing - CommRingEquiv-DirectSumGradedRing = InducedCommRingEquiv ⊕HITgradedRing-CommRing + CommRingEquiv-DirectSumGradedRing = InducedCommRingEquiv ⊕HITgradedRing-CommRing 0⊕Fun 1⊕Fun _+⊕Fun_ _prodF_ -⊕Fun_ (fst (Equiv-DirectSum G Gstr)) (pres1 (snd (Equiv-DirectSum G Gstr))) diff --git a/Cubical.Algebra.GradedRing.DirectSumHIT.html b/Cubical.Algebra.GradedRing.DirectSumHIT.html index 37c3d3708e..12eb99b173 100644 --- a/Cubical.Algebra.GradedRing.DirectSumHIT.html +++ b/Cubical.Algebra.GradedRing.DirectSumHIT.html @@ -147,7 +147,7 @@ RingStr._+_ (snd ⊕HITgradedRing-Ring) = _+⊕_ RingStr._·_ (snd ⊕HITgradedRing-Ring) = _prod_ RingStr.- snd ⊕HITgradedRing-Ring = -⊕_ - RingStr.isRing (snd ⊕HITgradedRing-Ring) = makeIsRing isSet⊕G + RingStr.isRing (snd ⊕HITgradedRing-Ring) = makeIsRing isSet⊕G +⊕Assoc +⊕IdR +⊕InvR +⊕Comm prodAssoc prodIdR prodIdL prodDistR+ prodDistL+ diff --git a/Cubical.Algebra.GradedRing.Instances.Polynomials.html b/Cubical.Algebra.GradedRing.Instances.Polynomials.html index 89ddb3ae05..63d4e3a394 100644 --- a/Cubical.Algebra.GradedRing.Instances.Polynomials.html +++ b/Cubical.Algebra.GradedRing.Instances.Polynomials.html @@ -40,7 +40,7 @@ PolyGradedRing = makeGradedRingSelf (NatVecMonoid n) _ A) - _ snd (Ring→AbGroup ARing)) + _ snd (Ring→AbGroup ARing)) 1r _·_ 0LeftAnnihilates 0RightAnnihilates a b c ΣPathP ((+n-vec-assoc _ _ _) , (·Assoc _ _ _))) a ΣPathP ((+n-vec-rid _) , (·IdR _))) diff --git a/Cubical.Algebra.GradedRing.Instances.PolynomialsFun.html b/Cubical.Algebra.GradedRing.Instances.PolynomialsFun.html index 1da987a0a3..c8bc99ae33 100644 --- a/Cubical.Algebra.GradedRing.Instances.PolynomialsFun.html +++ b/Cubical.Algebra.GradedRing.Instances.PolynomialsFun.html @@ -29,7 +29,7 @@ PolyGradedRing = ⊕Fun-GradedRing _+n_ (makeIsMonoid isSetℕ +-assoc +-zero λ _ refl) _ _ refl) _ A) - _ snd (Ring→AbGroup ARing)) + _ snd (Ring→AbGroup ARing)) 1r _·_ 0LeftAnnihilates 0RightAnnihilates a b c ΣPathP ((+-assoc _ _ _) , (·Assoc _ _ _))) a ΣPathP ((+-zero _) , (·IdR _))) diff --git a/Cubical.Algebra.GradedRing.Instances.TrivialGradedRing.html b/Cubical.Algebra.GradedRing.Instances.TrivialGradedRing.html index f5425d41b0..44e3da3c44 100644 --- a/Cubical.Algebra.GradedRing.Instances.TrivialGradedRing.html +++ b/Cubical.Algebra.GradedRing.Instances.TrivialGradedRing.html @@ -40,7 +40,7 @@ G (suc k) = Unit* Gstr : (k : ) AbGroupStr (G k) - Gstr zero = snd (Ring→AbGroup ARing) + Gstr zero = snd (Ring→AbGroup ARing) Gstr (suc k) = snd UnitAbGroup : {k l : } G k G l G (k Cubical.Data.Nat.+ l) @@ -93,7 +93,7 @@ ⋆Assoc ⋆IdR ⋆IdL ⋆DistR+ ⋆DistL+ equivRing where - equivRing : RingEquiv ARing (⊕HITgradedRing-Ring + equivRing : RingEquiv ARing (⊕HITgradedRing-Ring NatMonoid G Gstr 1r 0-⋆ ⋆-0 ⋆Assoc ⋆IdR ⋆IdL ⋆DistR+ ⋆DistL+) fst equivRing = isoToEquiv is where @@ -107,7 +107,7 @@ { 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 - snd equivRing = makeIsRingHom + snd equivRing = makeIsRingHom -- issue agda have trouble infering the Idx, G, Gstr {R = ARing} {S = ⊕HITgradedRing-Ring NatMonoid G Gstr 1r 0-⋆ ⋆-0 ⋆Assoc ⋆IdR ⋆IdL ⋆DistR+ ⋆DistL+} diff --git a/Cubical.Algebra.Group.Abelianization.AbelianizationAsCoeq.html b/Cubical.Algebra.Group.Abelianization.AbelianizationAsCoeq.html index 4ee95166fd..200cdb723e 100644 --- a/Cubical.Algebra.Group.Abelianization.AbelianizationAsCoeq.html +++ b/Cubical.Algebra.Group.Abelianization.AbelianizationAsCoeq.html @@ -204,7 +204,7 @@ -} inducedHom : (H : AbGroup ) (f : GroupHom G (AbGroup→Group H)) - AbGroupHom asAbelianGroup H + AbGroupHom asAbelianGroup H inducedHom H f = g , gIsHom where open IsGroupHom instance @@ -249,7 +249,7 @@ uniqueness : (H : AbGroup ) (f : GroupHom G (AbGroup→Group H)) - (g : AbGroupHom asAbelianGroup H) + (g : AbGroupHom asAbelianGroup H) (p : compGroupHom incAbAsGroupHom g f) (g inducedHom H f) uniqueness H f g p = @@ -287,7 +287,7 @@ abelianization as HIT commuting diagram -} - isomorphism : AbGroupIso asAbelianGroup (HITasAbelianGroup G) + isomorphism : AbGroupIso asAbelianGroup (HITasAbelianGroup G) isomorphism = h , hIsHomo where f = inducedHom (HITasAbelianGroup G) (HITηAsGroupHom G) @@ -360,7 +360,7 @@ (HITηAsGroupHom G) isomorphismCommutativity = commutativity (HITasAbelianGroup G) (HITηAsGroupHom G) - isomorphismUniqueness : (h : AbGroupIso asAbelianGroup (HITasAbelianGroup G)) + isomorphismUniqueness : (h : AbGroupIso asAbelianGroup (HITasAbelianGroup G)) (hcomm : compGroupHom incAbAsGroupHom (GroupIso→GroupHom h) (HITηAsGroupHom G)) h isomorphism isomorphismUniqueness h hcomm = GroupIso≡ p @@ -436,6 +436,6 @@ isocomm))) AbelianizationComparisonIsomorphism : (G : Group ) - AbGroupIso (AbelianizationAbGroup G) (HITasAbelianGroup G) + AbGroupIso (AbelianizationAbGroup G) (HITasAbelianGroup G) AbelianizationComparisonIsomorphism G = IsoCoeqHIT.isomorphism G \ No newline at end of file diff --git a/Cubical.Algebra.Group.Abelianization.Properties.html b/Cubical.Algebra.Group.Abelianization.Properties.html index d0507e69a5..1ca7cdd15c 100644 --- a/Cubical.Algebra.Group.Abelianization.Properties.html +++ b/Cubical.Algebra.Group.Abelianization.Properties.html @@ -236,7 +236,7 @@ -} inducedHom : (H : AbGroup ) (f : GroupHom G (AbGroup→Group H)) - AbGroupHom asAbelianGroup H + AbGroupHom asAbelianGroup H inducedHom H f = g , gIsHom where open IsGroupHom instance @@ -284,7 +284,7 @@ uniqueness : (H : AbGroup ) (f : GroupHom G (AbGroup→Group H)) - (g : AbGroupHom asAbelianGroup H) + (g : AbGroupHom asAbelianGroup H) (p : compGroupHom ηAsGroupHom g f) (g inducedHom H f) uniqueness H f g p = diff --git a/Cubical.Algebra.Group.Base.html b/Cubical.Algebra.Group.Base.html index c07dc75de2..b08e6adc6a 100644 --- a/Cubical.Algebra.Group.Base.html +++ b/Cubical.Algebra.Group.Base.html @@ -57,126 +57,128 @@ group G 1g _·_ inv h = G , groupstr 1g _·_ inv h isSetGroup : (G : Group ) isSet G -isSetGroup G = GroupStr.isGroup (snd G) .IsGroup.isMonoid .IsMonoid.isSemigroup .IsSemigroup.is-set - -makeIsGroup : {G : Type } {e : G} {_·_ : G G G} { inv : G G} - (is-setG : isSet G) - (·Assoc : (x y z : G) x · (y · z) (x · y) · z) - (·IdR : (x : G) x · e x) - (·IdL : (x : G) e · x x) - (·InvR : (x : G) x · inv x e) - (·InvL : (x : G) inv x · x e) - IsGroup e _·_ inv -IsGroup.isMonoid (makeIsGroup is-setG ·Assoc ·IdR ·IdL ·InvR ·InvL) = makeIsMonoid is-setG ·Assoc ·IdR ·IdL -IsGroup.·InvR (makeIsGroup is-setG ·Assoc ·IdR ·IdL ·InvR ·InvL) = ·InvR -IsGroup.·InvL (makeIsGroup is-setG ·Assoc ·IdR ·IdL ·InvR ·InvL) = ·InvL - -makeGroup : {G : Type } (1g : G) (_·_ : G G G) (inv : G G) - (is-setG : isSet G) - (·Assoc : (x y z : G) x · (y · z) (x · y) · z) - (·IdR : (x : G) x · 1g x) - (·IdL : (x : G) 1g · x x) - (·InvR : (x : G) x · inv x 1g) - (·InvL : (x : G) inv x · x 1g) - Group -makeGroup 1g _·_ inv is-setG ·Assoc ·IdR ·IdL ·InvR ·InvL = _ , helper - where - helper : GroupStr _ - GroupStr.1g helper = 1g - GroupStr._·_ helper = _·_ - GroupStr.inv helper = inv - GroupStr.isGroup helper = makeIsGroup is-setG ·Assoc ·IdR ·IdL ·InvR ·InvL - -Group→Monoid : Group Monoid -Group→Monoid (A , groupstr _ _ _ G) = A , monoidstr _ _ (IsGroup.isMonoid G) - -makeGroup-right : {A : Type } - (1g : A) - (_·_ : A A A) - (inv : A A) - (set : isSet A) - (·Assoc : a b c a · (b · c) (a · b) · c) - (·IdR : a a · 1g a) - (·InvR : a a · inv a 1g) - Group -makeGroup-right 1g _·_ inv set ·Assoc ·IdR ·InvR = - makeGroup 1g _·_ inv set ·Assoc ·IdR ·IdL ·InvR ·InvL - where - abstract - ·InvL : a inv a · a 1g - ·InvL a = - inv a · a - ≡⟨ sym (·IdR _) - (inv a · a) · 1g - ≡⟨ cong (_·_ _) (sym (·InvR (inv a))) - (inv a · a) · (inv a · (inv (inv a))) - ≡⟨ ·Assoc _ _ _ - ((inv a · a) · (inv a)) · (inv (inv a)) - ≡⟨ cong · _) (sym (·Assoc _ _ _)) - (inv a · (a · inv a)) · (inv (inv a)) - ≡⟨ cong (inv a · ) · (inv (inv a))) (·InvR a) - (inv a · 1g) · (inv (inv a)) - ≡⟨ cong · (inv (inv a))) (·IdR (inv a)) - inv a · (inv (inv a)) - ≡⟨ ·InvR (inv a) - 1g - - - ·IdL : a 1g · a a - ·IdL a = - 1g · a - ≡⟨ cong b b · a) (sym (·InvR a)) - (a · inv a) · a - ≡⟨ sym (·Assoc _ _ _) - a · (inv a · a) - ≡⟨ cong (a ·_) (·InvL a) - a · 1g - ≡⟨ ·IdR a - a - - -makeGroup-left : {A : Type } - (1g : A) - (_·_ : A A A) - (inv : A A) - (set : isSet A) - (·Assoc : a b c a · (b · c) (a · b) · c) - (·IdL : a 1g · a a) - (·InvL : a (inv a) · a 1g) - Group -makeGroup-left 1g _·_ inv set ·Assoc ·IdL ·InvL = - makeGroup 1g _·_ inv set ·Assoc ·IdR ·IdL ·InvR ·InvL - where - abstract - ·InvR : a a · inv a 1g - ·InvR a = - a · inv a - ≡⟨ sym (·IdL _) - 1g · (a · inv a) - ≡⟨ cong b b · (a · inv a)) (sym (·InvL (inv a))) - (inv (inv a) · inv a) · (a · inv a) - ≡⟨ sym (·Assoc (inv (inv a)) (inv a) _) - inv (inv a) · (inv a · (a · inv a)) - ≡⟨ cong (inv (inv a) ·_) (·Assoc (inv a) a (inv a)) - (inv (inv a)) · ((inv a · a) · (inv a)) - ≡⟨ cong b (inv (inv a)) · (b · (inv a))) (·InvL a) - inv (inv a) · (1g · inv a) - ≡⟨ cong (inv (inv a) ·_) (·IdL (inv a)) - inv (inv a) · inv a - ≡⟨ ·InvL (inv a) - 1g - - - ·IdR : a a · 1g a - ·IdR a = - a · 1g - ≡⟨ cong (a ·_) (sym (·InvL a)) - a · (inv a · a) - ≡⟨ ·Assoc a (inv a) a - (a · inv a) · a - ≡⟨ cong b b · a) (·InvR a) - 1g · a - ≡⟨ ·IdL a - a - +isSetGroup G = is-set + where + open GroupStr (str G) + +makeIsGroup : {G : Type } {e : G} {_·_ : G G G} { inv : G G} + (is-setG : isSet G) + (·Assoc : (x y z : G) x · (y · z) (x · y) · z) + (·IdR : (x : G) x · e x) + (·IdL : (x : G) e · x x) + (·InvR : (x : G) x · inv x e) + (·InvL : (x : G) inv x · x e) + IsGroup e _·_ inv +IsGroup.isMonoid (makeIsGroup is-setG ·Assoc ·IdR ·IdL ·InvR ·InvL) = makeIsMonoid is-setG ·Assoc ·IdR ·IdL +IsGroup.·InvR (makeIsGroup is-setG ·Assoc ·IdR ·IdL ·InvR ·InvL) = ·InvR +IsGroup.·InvL (makeIsGroup is-setG ·Assoc ·IdR ·IdL ·InvR ·InvL) = ·InvL + +makeGroup : {G : Type } (1g : G) (_·_ : G G G) (inv : G G) + (is-setG : isSet G) + (·Assoc : (x y z : G) x · (y · z) (x · y) · z) + (·IdR : (x : G) x · 1g x) + (·IdL : (x : G) 1g · x x) + (·InvR : (x : G) x · inv x 1g) + (·InvL : (x : G) inv x · x 1g) + Group +makeGroup 1g _·_ inv is-setG ·Assoc ·IdR ·IdL ·InvR ·InvL = _ , helper + where + helper : GroupStr _ + GroupStr.1g helper = 1g + GroupStr._·_ helper = _·_ + GroupStr.inv helper = inv + GroupStr.isGroup helper = makeIsGroup is-setG ·Assoc ·IdR ·IdL ·InvR ·InvL + +Group→Monoid : Group Monoid +Group→Monoid (A , groupstr _ _ _ G) = A , monoidstr _ _ (IsGroup.isMonoid G) + +makeGroup-right : {A : Type } + (1g : A) + (_·_ : A A A) + (inv : A A) + (set : isSet A) + (·Assoc : a b c a · (b · c) (a · b) · c) + (·IdR : a a · 1g a) + (·InvR : a a · inv a 1g) + Group +makeGroup-right 1g _·_ inv set ·Assoc ·IdR ·InvR = + makeGroup 1g _·_ inv set ·Assoc ·IdR ·IdL ·InvR ·InvL + where + abstract + ·InvL : a inv a · a 1g + ·InvL a = + inv a · a + ≡⟨ sym (·IdR _) + (inv a · a) · 1g + ≡⟨ cong (_·_ _) (sym (·InvR (inv a))) + (inv a · a) · (inv a · (inv (inv a))) + ≡⟨ ·Assoc _ _ _ + ((inv a · a) · (inv a)) · (inv (inv a)) + ≡⟨ cong · _) (sym (·Assoc _ _ _)) + (inv a · (a · inv a)) · (inv (inv a)) + ≡⟨ cong (inv a · ) · (inv (inv a))) (·InvR a) + (inv a · 1g) · (inv (inv a)) + ≡⟨ cong · (inv (inv a))) (·IdR (inv a)) + inv a · (inv (inv a)) + ≡⟨ ·InvR (inv a) + 1g + + + ·IdL : a 1g · a a + ·IdL a = + 1g · a + ≡⟨ cong b b · a) (sym (·InvR a)) + (a · inv a) · a + ≡⟨ sym (·Assoc _ _ _) + a · (inv a · a) + ≡⟨ cong (a ·_) (·InvL a) + a · 1g + ≡⟨ ·IdR a + a + + +makeGroup-left : {A : Type } + (1g : A) + (_·_ : A A A) + (inv : A A) + (set : isSet A) + (·Assoc : a b c a · (b · c) (a · b) · c) + (·IdL : a 1g · a a) + (·InvL : a (inv a) · a 1g) + Group +makeGroup-left 1g _·_ inv set ·Assoc ·IdL ·InvL = + makeGroup 1g _·_ inv set ·Assoc ·IdR ·IdL ·InvR ·InvL + where + abstract + ·InvR : a a · inv a 1g + ·InvR a = + a · inv a + ≡⟨ sym (·IdL _) + 1g · (a · inv a) + ≡⟨ cong b b · (a · inv a)) (sym (·InvL (inv a))) + (inv (inv a) · inv a) · (a · inv a) + ≡⟨ sym (·Assoc (inv (inv a)) (inv a) _) + inv (inv a) · (inv a · (a · inv a)) + ≡⟨ cong (inv (inv a) ·_) (·Assoc (inv a) a (inv a)) + (inv (inv a)) · ((inv a · a) · (inv a)) + ≡⟨ cong b (inv (inv a)) · (b · (inv a))) (·InvL a) + inv (inv a) · (1g · inv a) + ≡⟨ cong (inv (inv a) ·_) (·IdL (inv a)) + inv (inv a) · inv a + ≡⟨ ·InvL (inv a) + 1g + + + ·IdR : a a · 1g a + ·IdR a = + a · 1g + ≡⟨ cong (a ·_) (sym (·InvL a)) + a · (inv a · a) + ≡⟨ ·Assoc a (inv a) a + (a · inv a) · a + ≡⟨ cong b b · a) (·InvR a) + 1g · a + ≡⟨ ·IdL a + a + \ No newline at end of file diff --git a/Cubical.Algebra.Group.DirProd.html b/Cubical.Algebra.Group.DirProd.html index 15de577c12..48bbe70499 100644 --- a/Cubical.Algebra.Group.DirProd.html +++ b/Cubical.Algebra.Group.DirProd.html @@ -19,7 +19,7 @@ 1g (snd (DirProd G H)) = (1g (snd G)) , (1g (snd H)) _·_ (snd (DirProd G H)) (g , h) (g' , h') = _·_ (snd G) g g' , _·_ (snd H) h h' inv (snd (DirProd G H)) (g , h) = (inv (snd G) g) , (inv (snd H) h) -isGroup (snd (DirProd G H)) = makeIsGroup +isGroup (snd (DirProd G H)) = makeIsGroup (isSet× (is-set (snd G)) (is-set (snd H))) x y z ≡-× (·Assoc (snd G) _ _ _) (·Assoc (snd H) _ _ _)) x ≡-× (·IdR (snd G) _) (·IdR (snd H) _)) diff --git a/Cubical.Algebra.Group.Instances.DiffInt.html b/Cubical.Algebra.Group.Instances.DiffInt.html index b7427e7d76..5818bc7a43 100644 --- a/Cubical.Algebra.Group.Instances.DiffInt.html +++ b/Cubical.Algebra.Group.Instances.DiffInt.html @@ -17,7 +17,7 @@ 1g (snd ℤGroup) = [ 0 , 0 ] _·_ (snd ℤGroup) = _+ℤ_ inv (snd ℤGroup) = -ℤ_ -isGroup (snd ℤGroup) = makeIsGroup +isGroup (snd ℤGroup) = makeIsGroup ℤ-isSet +ℤ-assoc x zero-identityʳ 0 x) diff --git a/Cubical.Algebra.Group.Instances.Int.html b/Cubical.Algebra.Group.Instances.Int.html index a9cb619621..0d97e073a6 100644 --- a/Cubical.Algebra.Group.Instances.Int.html +++ b/Cubical.Algebra.Group.Instances.Int.html @@ -25,7 +25,7 @@ where abstract isGroupℤ : IsGroup (pos 0) (_+ℤ_) (-ℤ_) - isGroupℤ = makeIsGroup isSetℤ + isGroupℤ = makeIsGroup isSetℤ +Assoc _ refl) (+Comm 0) -Cancel -Cancel' diff --git a/Cubical.Algebra.Group.Instances.IntMod.html b/Cubical.Algebra.Group.Instances.IntMod.html index fbcaf83539..5a78fdc0a5 100644 --- a/Cubical.Algebra.Group.Instances.IntMod.html +++ b/Cubical.Algebra.Group.Instances.IntMod.html @@ -38,7 +38,7 @@ 1g (snd (ℤGroup/ suc n)) = 0 GroupStr._·_ (snd (ℤGroup/ suc n)) = _+ₘ_ inv (snd (ℤGroup/ suc n)) = -ₘ_ -isGroup (snd (ℤGroup/ suc n)) = makeIsGroup +isGroup (snd (ℤGroup/ suc n)) = makeIsGroup isSetFin x y z sym (+ₘ-assoc x y z)) +ₘ-rUnit diff --git a/Cubical.Algebra.Group.Instances.NProd.html b/Cubical.Algebra.Group.Instances.NProd.html index fba47821d1..486fae103b 100644 --- a/Cubical.Algebra.Group.Instances.NProd.html +++ b/Cubical.Algebra.Group.Instances.NProd.html @@ -19,7 +19,7 @@ 1g (snd (NProd-Group G Gstr)) = λ n 1g (Gstr n) GroupStr._·_ (snd (NProd-Group G Gstr)) = λ f g n Gstr n ._·_ (f n) (g n) inv (snd (NProd-Group G Gstr)) = λ f n (Gstr n).inv (f n) -isGroup (snd (NProd-Group G Gstr)) = makeIsGroup (isSetΠ _ is-set (Gstr _))) +isGroup (snd (NProd-Group G Gstr)) = makeIsGroup (isSetΠ _ is-set (Gstr _))) f g h funExt λ n ·Assoc (Gstr n) _ _ _) f funExt λ n ·IdR (Gstr n) _) f funExt λ n ·IdL (Gstr n) _) diff --git a/Cubical.Algebra.Group.Instances.Unit.html b/Cubical.Algebra.Group.Instances.Unit.html index 2b78375b94..0ccd63d30d 100644 --- a/Cubical.Algebra.Group.Instances.Unit.html +++ b/Cubical.Algebra.Group.Instances.Unit.html @@ -29,7 +29,7 @@ _·_ (snd UnitGroup₀) = λ _ _ tt inv (snd UnitGroup₀) = λ _ tt isGroup (snd UnitGroup₀) = - makeIsGroup isSetUnit _ _ _ refl) _ refl) _ refl) + makeIsGroup isSetUnit _ _ _ refl) _ refl) _ refl) _ refl) _ refl) UnitGroup : Group @@ -38,7 +38,7 @@ _·_ (snd UnitGroup) = λ _ _ tt* inv (snd UnitGroup) = λ _ tt* isGroup (snd UnitGroup) = - makeIsGroup (isOfHLevelUnit* 2) + makeIsGroup (isOfHLevelUnit* 2) _ _ _ refl) _ refl) _ refl) _ refl) _ refl) diff --git a/Cubical.Algebra.Group.QuotientGroup.html b/Cubical.Algebra.Group.QuotientGroup.html index 80762611e7..d011388990 100644 --- a/Cubical.Algebra.Group.QuotientGroup.html +++ b/Cubical.Algebra.Group.QuotientGroup.html @@ -96,7 +96,7 @@ ·/H-invr = elimProp x squash/ _ _) λ x cong [_] (·InvR x) asGroup : Group - asGroup = makeGroup-right 1/H _·/H_ inv/H squash/ ·/H-assoc ·/H-rid ·/H-invr + asGroup = makeGroup-right 1/H _·/H_ inv/H squash/ ·/H-assoc ·/H-rid ·/H-invr _/_ : (G : Group ) (H : NormalSubgroup G) Group diff --git a/Cubical.Algebra.Group.Subgroup.html b/Cubical.Algebra.Group.Subgroup.html index e14b7be290..e8dd6890cc 100644 --- a/Cubical.Algebra.Group.Subgroup.html +++ b/Cubical.Algebra.Group.Subgroup.html @@ -57,7 +57,7 @@ isSetSubgroup = isSetΣ isSetℙ λ x isProp→isSet (isPropIsSubgroup x) Subgroup→Group : Subgroup Group - Subgroup→Group (H , Hh) = makeGroup-right 1HG _·HG_ invHG isSetHG assocHG ridHG invrHG + Subgroup→Group (H , Hh) = makeGroup-right 1HG _·HG_ invHG isSetHG assocHG ridHG invrHG where HG = Σ[ x G ] H x isSetHG = isSetΣ is-set x isProp→isSet (H x .snd)) diff --git a/Cubical.Algebra.Lattice.Base.html b/Cubical.Algebra.Lattice.Base.html index 81fbb927dd..88d5e33499 100644 --- a/Cubical.Algebra.Lattice.Base.html +++ b/Cubical.Algebra.Lattice.Base.html @@ -95,133 +95,135 @@ Lattice = TypeWithStr LatticeStr isSetLattice : (L : Lattice ) isSet L -isSetLattice L = L .snd .LatticeStr.is-set - -makeIsLattice : {L : Type } {0l 1l : L} {_∨l_ _∧l_ : L L L} - (is-setL : isSet L) - (∨l-assoc : (x y z : L) x ∨l (y ∨l z) (x ∨l y) ∨l z) - (∨l-rid : (x : L) x ∨l 0l x) - (∨l-comm : (x y : L) x ∨l y y ∨l x) - (∧l-assoc : (x y z : L) x ∧l (y ∧l z) (x ∧l y) ∧l z) - (∧l-rid : (x : L) x ∧l 1l x) - (∧l-comm : (x y : L) x ∧l y y ∧l x) - (∨l-absorb-∧l : (x y : L) x ∨l (x ∧l y) x) - (∧l-absorb-∨l : (x y : L) x ∧l (x ∨l y) x) - IsLattice 0l 1l _∨l_ _∧l_ -makeIsLattice {0l = 0l} {1l = 1l} {_∨l_ = _∨l_} {_∧l_ = _∧l_} - is-setL ∨l-assoc ∨l-rid ∨l-comm - ∧l-assoc ∧l-rid ∧l-comm ∨l-absorb-∧l ∧l-absorb-∨l = - islattice (makeIsSemilattice is-setL ∨l-assoc ∨l-rid ∨l-comm ∨l-idem) - (makeIsSemilattice is-setL ∧l-assoc ∧l-rid ∧l-comm ∧l-idem) - λ x y ∨l-absorb-∧l x y , ∧l-absorb-∨l x y - where - ∨l-idem : x x ∨l x x - ∨l-idem x = cong (x ∨l_) (sym (∧l-rid _)) ∨l-absorb-∧l _ _ - - ∧l-idem : x x ∧l x x - ∧l-idem x = cong (x ∧l_) (sym (∨l-rid _)) ∧l-absorb-∨l _ _ - -makeLattice : {L : Type } (0l 1l : L) (_∨l_ _∧l_ : L L L) - (is-setL : isSet L) - (∨l-assoc : (x y z : L) x ∨l (y ∨l z) (x ∨l y) ∨l z) - (∨l-rid : (x : L) x ∨l 0l x) - (∨l-comm : (x y : L) x ∨l y y ∨l x) - (∨l-idem : (x : L) x ∨l x x) - (∧l-assoc : (x y z : L) x ∧l (y ∧l z) (x ∧l y) ∧l z) - (∧l-rid : (x : L) x ∧l 1l x) - (∧l-comm : (x y : L) x ∧l y y ∧l x) - (∧l-idem : (x : L) x ∧l x x) - (∨l-absorb-∧l : (x y : L) x ∨l (x ∧l y) x) - (∧l-absorb-∨l : (x y : L) x ∧l (x ∨l y) x) - Lattice -makeLattice 0l 1l _∨l_ _∧l_ is-setL ∨l-assoc ∨l-rid ∨l-comm ∨l-idem - ∧l-assoc ∧l-rid ∧l-comm ∧l-idem ∨l-absorb-∧l ∧l-absorb-∨l = - _ , latticestr 0l 1l _∨l_ _∧l_ - (makeIsLattice is-setL ∨l-assoc ∨l-rid ∨l-comm - ∧l-assoc ∧l-rid ∧l-comm ∨l-absorb-∧l ∧l-absorb-∨l) - -record IsLatticeHom {A : Type } {B : Type ℓ'} (L : LatticeStr A) (f : A B) (M : LatticeStr B) - : Type (ℓ-max ℓ') - where - - -- Shorter qualified names - private - module L = LatticeStr L - module M = LatticeStr M - - field - pres0 : f L.0l M.0l - pres1 : f L.1l M.1l - pres∨l : (x y : A) f (x L.∨l y) f x M.∨l f y - pres∧l : (x y : A) f (x L.∧l y) f x M.∧l f y - - -unquoteDecl IsLatticeHomIsoΣ = declareRecordIsoΣ IsLatticeHomIsoΣ (quote IsLatticeHom) - -LatticeHom : (L : Lattice ) (M : Lattice ℓ') Type (ℓ-max ℓ') -LatticeHom L M = Σ[ f ( L M ) ] IsLatticeHom (L .snd) f (M .snd) - -idLatticeHom : (L : Lattice ) LatticeHom L L -fst (idLatticeHom L) x = x -IsLatticeHom.pres0 (snd (idLatticeHom L)) = refl -IsLatticeHom.pres1 (snd (idLatticeHom L)) = refl -IsLatticeHom.pres∨l (snd (idLatticeHom L)) x y = refl -IsLatticeHom.pres∧l (snd (idLatticeHom L)) x y = refl - -IsLatticeEquiv : {A : Type } {B : Type ℓ'} (M : LatticeStr A) (e : A B) (N : LatticeStr B) - Type (ℓ-max ℓ') -IsLatticeEquiv M e N = IsLatticeHom M (e .fst) N - -LatticeEquiv : (L : Lattice ) (M : Lattice ℓ') Type (ℓ-max ℓ') -LatticeEquiv L M = Σ[ e ( L M ) ] IsLatticeEquiv (L .snd) e (M .snd) - -isPropIsLattice : {L : Type } (0l 1l : L) (_∨l_ _∧l_ : L L L) - isProp (IsLattice 0l 1l _∨l_ _∧l_) -isPropIsLattice 0l 1l _∨l_ _∧l_ (islattice LJ LM LA) (islattice MJ MM MA) = - λ i islattice (isPropIsSemilattice _ _ LJ MJ i) - (isPropIsSemilattice _ _ LM MM i) - (isPropAbsorb LA MA i) - where - isSetL : isSet _ - isSetL = LJ .IsSemilattice.isCommMonoid .IsCommMonoid.isMonoid - .IsMonoid.isSemigroup .IsSemigroup.is-set - - isPropAbsorb : isProp ((x y : _) (x ∨l (x ∧l y) x) × (x ∧l (x ∨l y) x)) - isPropAbsorb = isPropΠ2 λ _ _ isProp× (isSetL _ _) (isSetL _ _) - -isPropIsLatticeHom : {A : Type } {B : Type ℓ'} (R : LatticeStr A) (f : A B) (S : LatticeStr B) - isProp (IsLatticeHom R f S) -isPropIsLatticeHom R f S = isOfHLevelRetractFromIso 1 IsLatticeHomIsoΣ - (isProp×3 (isSetLattice (_ , S) _ _) - (isSetLattice (_ , S) _ _) - (isPropΠ2 λ _ _ isSetLattice (_ , S) _ _) - (isPropΠ2 λ _ _ isSetLattice (_ , S) _ _)) - - -𝒮ᴰ-Lattice : DUARel (𝒮-Univ ) LatticeStr -𝒮ᴰ-Lattice = - 𝒮ᴰ-Record (𝒮-Univ _) IsLatticeEquiv - (fields: - data[ 0l null pres0 ] - data[ 1l null pres1 ] - data[ _∨l_ bin pres∨l ] - data[ _∧l_ bin pres∧l ] - prop[ isLattice _ _ isPropIsLattice _ _ _ _) ]) - where - open LatticeStr - open IsLatticeHom - - -- faster with some sharing - null = autoDUARel (𝒮-Univ _) A A) - bin = autoDUARel (𝒮-Univ _) A A A A) - -LatticePath : (L M : Lattice ) LatticeEquiv L M (L M) -LatticePath = 𝒮ᴰ-Lattice .UARel.ua - - -Lattice→JoinSemilattice : Lattice Semilattice -Lattice→JoinSemilattice (A , latticestr _ _ _ _ L) = semilattice _ _ _ (L .IsLattice.joinSemilattice ) - -Lattice→MeetSemilattice : Lattice Semilattice -Lattice→MeetSemilattice (A , latticestr _ _ _ _ L) = semilattice _ _ _ (L .IsLattice.meetSemilattice ) +isSetLattice L = is-set + where + open LatticeStr (str L) + +makeIsLattice : {L : Type } {0l 1l : L} {_∨l_ _∧l_ : L L L} + (is-setL : isSet L) + (∨l-assoc : (x y z : L) x ∨l (y ∨l z) (x ∨l y) ∨l z) + (∨l-rid : (x : L) x ∨l 0l x) + (∨l-comm : (x y : L) x ∨l y y ∨l x) + (∧l-assoc : (x y z : L) x ∧l (y ∧l z) (x ∧l y) ∧l z) + (∧l-rid : (x : L) x ∧l 1l x) + (∧l-comm : (x y : L) x ∧l y y ∧l x) + (∨l-absorb-∧l : (x y : L) x ∨l (x ∧l y) x) + (∧l-absorb-∨l : (x y : L) x ∧l (x ∨l y) x) + IsLattice 0l 1l _∨l_ _∧l_ +makeIsLattice {0l = 0l} {1l = 1l} {_∨l_ = _∨l_} {_∧l_ = _∧l_} + is-setL ∨l-assoc ∨l-rid ∨l-comm + ∧l-assoc ∧l-rid ∧l-comm ∨l-absorb-∧l ∧l-absorb-∨l = + islattice (makeIsSemilattice is-setL ∨l-assoc ∨l-rid ∨l-comm ∨l-idem) + (makeIsSemilattice is-setL ∧l-assoc ∧l-rid ∧l-comm ∧l-idem) + λ x y ∨l-absorb-∧l x y , ∧l-absorb-∨l x y + where + ∨l-idem : x x ∨l x x + ∨l-idem x = cong (x ∨l_) (sym (∧l-rid _)) ∨l-absorb-∧l _ _ + + ∧l-idem : x x ∧l x x + ∧l-idem x = cong (x ∧l_) (sym (∨l-rid _)) ∧l-absorb-∨l _ _ + +makeLattice : {L : Type } (0l 1l : L) (_∨l_ _∧l_ : L L L) + (is-setL : isSet L) + (∨l-assoc : (x y z : L) x ∨l (y ∨l z) (x ∨l y) ∨l z) + (∨l-rid : (x : L) x ∨l 0l x) + (∨l-comm : (x y : L) x ∨l y y ∨l x) + (∨l-idem : (x : L) x ∨l x x) + (∧l-assoc : (x y z : L) x ∧l (y ∧l z) (x ∧l y) ∧l z) + (∧l-rid : (x : L) x ∧l 1l x) + (∧l-comm : (x y : L) x ∧l y y ∧l x) + (∧l-idem : (x : L) x ∧l x x) + (∨l-absorb-∧l : (x y : L) x ∨l (x ∧l y) x) + (∧l-absorb-∨l : (x y : L) x ∧l (x ∨l y) x) + Lattice +makeLattice 0l 1l _∨l_ _∧l_ is-setL ∨l-assoc ∨l-rid ∨l-comm ∨l-idem + ∧l-assoc ∧l-rid ∧l-comm ∧l-idem ∨l-absorb-∧l ∧l-absorb-∨l = + _ , latticestr 0l 1l _∨l_ _∧l_ + (makeIsLattice is-setL ∨l-assoc ∨l-rid ∨l-comm + ∧l-assoc ∧l-rid ∧l-comm ∨l-absorb-∧l ∧l-absorb-∨l) + +record IsLatticeHom {A : Type } {B : Type ℓ'} (L : LatticeStr A) (f : A B) (M : LatticeStr B) + : Type (ℓ-max ℓ') + where + + -- Shorter qualified names + private + module L = LatticeStr L + module M = LatticeStr M + + field + pres0 : f L.0l M.0l + pres1 : f L.1l M.1l + pres∨l : (x y : A) f (x L.∨l y) f x M.∨l f y + pres∧l : (x y : A) f (x L.∧l y) f x M.∧l f y + + +unquoteDecl IsLatticeHomIsoΣ = declareRecordIsoΣ IsLatticeHomIsoΣ (quote IsLatticeHom) + +LatticeHom : (L : Lattice ) (M : Lattice ℓ') Type (ℓ-max ℓ') +LatticeHom L M = Σ[ f ( L M ) ] IsLatticeHom (L .snd) f (M .snd) + +idLatticeHom : (L : Lattice ) LatticeHom L L +fst (idLatticeHom L) x = x +IsLatticeHom.pres0 (snd (idLatticeHom L)) = refl +IsLatticeHom.pres1 (snd (idLatticeHom L)) = refl +IsLatticeHom.pres∨l (snd (idLatticeHom L)) x y = refl +IsLatticeHom.pres∧l (snd (idLatticeHom L)) x y = refl + +IsLatticeEquiv : {A : Type } {B : Type ℓ'} (M : LatticeStr A) (e : A B) (N : LatticeStr B) + Type (ℓ-max ℓ') +IsLatticeEquiv M e N = IsLatticeHom M (e .fst) N + +LatticeEquiv : (L : Lattice ) (M : Lattice ℓ') Type (ℓ-max ℓ') +LatticeEquiv L M = Σ[ e ( L M ) ] IsLatticeEquiv (L .snd) e (M .snd) + +isPropIsLattice : {L : Type } (0l 1l : L) (_∨l_ _∧l_ : L L L) + isProp (IsLattice 0l 1l _∨l_ _∧l_) +isPropIsLattice 0l 1l _∨l_ _∧l_ (islattice LJ LM LA) (islattice MJ MM MA) = + λ i islattice (isPropIsSemilattice _ _ LJ MJ i) + (isPropIsSemilattice _ _ LM MM i) + (isPropAbsorb LA MA i) + where + isSetL : isSet _ + isSetL = LJ .IsSemilattice.isCommMonoid .IsCommMonoid.isMonoid + .IsMonoid.isSemigroup .IsSemigroup.is-set + + isPropAbsorb : isProp ((x y : _) (x ∨l (x ∧l y) x) × (x ∧l (x ∨l y) x)) + isPropAbsorb = isPropΠ2 λ _ _ isProp× (isSetL _ _) (isSetL _ _) + +isPropIsLatticeHom : {A : Type } {B : Type ℓ'} (R : LatticeStr A) (f : A B) (S : LatticeStr B) + isProp (IsLatticeHom R f S) +isPropIsLatticeHom R f S = isOfHLevelRetractFromIso 1 IsLatticeHomIsoΣ + (isProp×3 (isSetLattice (_ , S) _ _) + (isSetLattice (_ , S) _ _) + (isPropΠ2 λ _ _ isSetLattice (_ , S) _ _) + (isPropΠ2 λ _ _ isSetLattice (_ , S) _ _)) + + +𝒮ᴰ-Lattice : DUARel (𝒮-Univ ) LatticeStr +𝒮ᴰ-Lattice = + 𝒮ᴰ-Record (𝒮-Univ _) IsLatticeEquiv + (fields: + data[ 0l null pres0 ] + data[ 1l null pres1 ] + data[ _∨l_ bin pres∨l ] + data[ _∧l_ bin pres∧l ] + prop[ isLattice _ _ isPropIsLattice _ _ _ _) ]) + where + open LatticeStr + open IsLatticeHom + + -- faster with some sharing + null = autoDUARel (𝒮-Univ _) A A) + bin = autoDUARel (𝒮-Univ _) A A A A) + +LatticePath : (L M : Lattice ) LatticeEquiv L M (L M) +LatticePath = 𝒮ᴰ-Lattice .UARel.ua + + +Lattice→JoinSemilattice : Lattice Semilattice +Lattice→JoinSemilattice (A , latticestr _ _ _ _ L) = semilattice _ _ _ (L .IsLattice.joinSemilattice ) + +Lattice→MeetSemilattice : Lattice Semilattice +Lattice→MeetSemilattice (A , latticestr _ _ _ _ L) = semilattice _ _ _ (L .IsLattice.meetSemilattice ) \ No newline at end of file diff --git a/Cubical.Algebra.Lattice.Properties.html b/Cubical.Algebra.Lattice.Properties.html index 14309997f0..4b6bc563f5 100644 --- a/Cubical.Algebra.Lattice.Properties.html +++ b/Cubical.Algebra.Lattice.Properties.html @@ -53,8 +53,8 @@ module Order (L' : Lattice ) where private L = fst L' open LatticeStr (snd L') - open JoinSemilattice (Lattice→JoinSemilattice L') renaming (_≤_ to _≤j_ ; IndPoset to JoinPoset) - open MeetSemilattice (Lattice→MeetSemilattice L') renaming (_≤_ to _≤m_ ; IndPoset to MeetPoset) + open JoinSemilattice (Lattice→JoinSemilattice L') renaming (_≤_ to _≤j_ ; IndPoset to JoinPoset) + open MeetSemilattice (Lattice→MeetSemilattice L') renaming (_≤_ to _≤m_ ; IndPoset to MeetPoset) ≤j→≤m : x y x ≤j y x ≤m y ≤j→≤m x y x∨ly≡y = x ∧l y ≡⟨ cong (x ∧l_) (sym x∨ly≡y) @@ -82,9 +82,9 @@ ∧≤LCancelJoin x y = ≤m→≤j _ _ (∧≤LCancel x y) -module _ {L M : Lattice } (φ ψ : LatticeHom L M) where +module _ {L M : Lattice } (φ ψ : LatticeHom L M) where open LatticeStr ⦃...⦄ - open IsLatticeHom + open IsLatticeHom private instance _ = L @@ -93,5 +93,5 @@ _ = snd M LatticeHom≡f : fst φ fst ψ φ ψ - LatticeHom≡f = Σ≡Prop λ f isPropIsLatticeHom _ f _ + LatticeHom≡f = Σ≡Prop λ f isPropIsLatticeHom _ f _ \ No newline at end of file diff --git a/Cubical.Algebra.LindenbaumTarski.html b/Cubical.Algebra.LindenbaumTarski.html index c75b8a6ea7..4b9eaec45a 100644 --- a/Cubical.Algebra.LindenbaumTarski.html +++ b/Cubical.Algebra.LindenbaumTarski.html @@ -333,7 +333,7 @@ -- LT distributive lattice LindenbaumTarski-DistLattice : DistLattice _ - LindenbaumTarski-DistLattice = makeDistLattice∧lOver∨l + LindenbaumTarski-DistLattice = makeDistLattice∧lOver∨l ⊥/ ⊤/ _∨/_ _∧/_ isSet-LT ∨/Assoc ∨/Id ∨/Comm diff --git a/Cubical.Algebra.Matrix.CommRingCoefficient.html b/Cubical.Algebra.Matrix.CommRingCoefficient.html index 422fe24275..53c946d62b 100644 --- a/Cubical.Algebra.Matrix.CommRingCoefficient.html +++ b/Cubical.Algebra.Matrix.CommRingCoefficient.html @@ -37,7 +37,7 @@ private R = 𝓡 .fst 𝑹 = CommRing→Ring 𝓡 - AbR = Ring→AbGroup 𝑹 + AbR = Ring→AbGroup 𝑹 open CommRingStr (𝓡 .snd) renaming ( is-set to isSetR ) diff --git a/Cubical.Algebra.Matrix.RowTransformation.html b/Cubical.Algebra.Matrix.RowTransformation.html index d170de8e09..fa86be6e3d 100644 --- a/Cubical.Algebra.Matrix.RowTransformation.html +++ b/Cubical.Algebra.Matrix.RowTransformation.html @@ -230,7 +230,7 @@ private R = 𝓡 .fst 𝑹 = CommRing→Ring 𝓡 - AbR = Ring→AbGroup 𝑹 + AbR = Ring→AbGroup 𝑹 open CommRingStr (𝓡 .snd) renaming ( is-set to isSetR ) open CommRingTheory 𝓡 diff --git a/Cubical.Algebra.Matrix.html b/Cubical.Algebra.Matrix.html index 45e4e0abf2..42a2413b3f 100644 --- a/Cubical.Algebra.Matrix.html +++ b/Cubical.Algebra.Matrix.html @@ -189,12 +189,12 @@ -- VecMatrix that is equal to the one on FinMatrix VecMatrixAbGroup : (m n : ) AbGroup VecMatrixAbGroup m n = - InducedAbGroup (FinMatrixAbGroup G' m n) addVecMatrix zeroVecMatrix negVecMatrix FinMatrix≃VecMatrix + InducedAbGroup (FinMatrixAbGroup G' m n) addVecMatrix zeroVecMatrix negVecMatrix FinMatrix≃VecMatrix (FinMatrix→VecMatrixPres+ m n) (FinMatrix→VecMatrixPres0 m n) (FinMatrix→VecMatrixPres- m n) FinMatrixAbGroup≡VecMatrixAbGroup : (m n : ) FinMatrixAbGroup G' m n VecMatrixAbGroup m n FinMatrixAbGroup≡VecMatrixAbGroup m n = - InducedAbGroupPath (FinMatrixAbGroup G' m n) addVecMatrix zeroVecMatrix negVecMatrix FinMatrix≃VecMatrix + InducedAbGroupPath (FinMatrixAbGroup G' m n) addVecMatrix zeroVecMatrix negVecMatrix FinMatrix≃VecMatrix (FinMatrix→VecMatrixPres+ m n) (FinMatrix→VecMatrixPres0 m n) (FinMatrix→VecMatrixPres- m n) -- Define identity matrix and matrix multiplication for FinMatrix and @@ -265,7 +265,7 @@ FinMatrixRing : (n : ) Ring FinMatrixRing n = - makeRing {R = FinMatrix R n n} zeroFinMatrix oneFinMatrix addFinMatrix + makeRing {R = FinMatrix R n n} zeroFinMatrix oneFinMatrix addFinMatrix mulFinMatrix negFinMatrix isSetFinMatrix addFinMatrixAssoc addFinMatrix0r addFinMatrixNegMatrixr addFinMatrixComm mulFinMatrixAssoc mulFinMatrixr1 mulFinMatrix1r diff --git a/Cubical.Algebra.Module.Base.html b/Cubical.Algebra.Module.Base.html index 51b6d0441f..4e1877bdc8 100644 --- a/Cubical.Algebra.Module.Base.html +++ b/Cubical.Algebra.Module.Base.html @@ -85,87 +85,89 @@ LeftModule→Group = AbGroup→Group LeftModule→AbGroup isSetLeftModule : (M : LeftModule R ℓ') isSet M - isSetLeftModule M = isSetAbGroup (LeftModule→AbGroup M) - - open RingStr (snd R) using (1r) renaming (_+_ to _+r_; _·_ to _·s_) - - module _ {M : Type ℓ'} {0m : M} - {_+_ : M M M} { -_ : M M} {_⋆_ : R M M} - (isSet-M : isSet M) - (+Assoc : (x y z : M) x + (y + z) (x + y) + z) - (+IdR : (x : M) x + 0m x) - (+InvR : (x : M) x + (- x) 0m) - (+Comm : (x y : M) x + y y + x) - (⋆Assoc : (r s : R ) (x : M) (r ·s s) x r (s x)) - (⋆DistR+ : (r : R ) (x y : M) r (x + y) (r x) + (r y)) - (⋆DistL+ : (r s : R ) (x : M) (r +r s) x (r x) + (s x)) - (⋆IdL : (x : M) 1r x x) - where - - makeIsLeftModule : IsLeftModule R 0m _+_ -_ _⋆_ - makeIsLeftModule .IsLeftModule.+IsAbGroup = makeIsAbGroup isSet-M +Assoc +IdR +InvR +Comm - makeIsLeftModule .IsLeftModule.⋆Assoc = ⋆Assoc - makeIsLeftModule .IsLeftModule.⋆DistR+ = ⋆DistR+ - makeIsLeftModule .IsLeftModule.⋆DistL+ = ⋆DistL+ - makeIsLeftModule .IsLeftModule.⋆IdL = ⋆IdL - -record IsLeftModuleHom {R : Ring } {A B : Type ℓ'} - (M : LeftModuleStr R A) (f : A B) (N : LeftModuleStr R B) - : Type (ℓ-max ℓ') - where - - -- Shorter qualified names - private - module M = LeftModuleStr M - module N = LeftModuleStr N - - field - pres0 : f M.0m N.0m - pres+ : (x y : A) f (x M.+ y) f x N.+ f y - pres- : (x : A) f (M.- x) N.- (f x) - pres⋆ : (r : R ) (y : A) f (r M.⋆ y) r N.⋆ f y - -LeftModuleHom : {R : Ring } (M N : LeftModule R ℓ') Type (ℓ-max ℓ') -LeftModuleHom M N = Σ[ f ( M N ) ] IsLeftModuleHom (M .snd) f (N .snd) - -IsLeftModuleEquiv : {R : Ring } {A B : Type ℓ'} - (M : LeftModuleStr R A) (e : A B) (N : LeftModuleStr R B) - Type (ℓ-max ℓ') -IsLeftModuleEquiv M e N = IsLeftModuleHom M (e .fst) N - -LeftModuleEquiv : {R : Ring } (M N : LeftModule R ℓ') Type (ℓ-max ℓ') -LeftModuleEquiv M N = Σ[ e M N ] IsLeftModuleEquiv (M .snd) e (N .snd) - -isPropIsLeftModule : (R : Ring ) {M : Type ℓ'} - (0m : M) - (_+_ : M M M) - (-_ : M M) - (_⋆_ : R M M) - isProp (IsLeftModule R 0m _+_ -_ _⋆_) -isPropIsLeftModule R _ _ _ _ = - isOfHLevelRetractFromIso 1 IsLeftModuleIsoΣ - (isPropΣ (isPropIsAbGroup _ _ _) - ab - isProp× (isPropΠ3 λ _ _ _ ab .is-set _ _) - (isProp× (isPropΠ3 λ _ _ _ ab .is-set _ _) - (isProp× (isPropΠ3 λ _ _ _ ab .is-set _ _) - (isPropΠ λ _ ab .is-set _ _))))) - where - open IsAbGroup - -𝒮ᴰ-LeftModule : (R : Ring ) DUARel (𝒮-Univ ℓ') (LeftModuleStr R) (ℓ-max ℓ') -𝒮ᴰ-LeftModule R = - 𝒮ᴰ-Record (𝒮-Univ _) (IsLeftModuleEquiv {R = R}) - (fields: - data[ 0m autoDUARel _ _ pres0 ] - data[ _+_ autoDUARel _ _ pres+ ] - data[ -_ autoDUARel _ _ pres- ] - data[ _⋆_ autoDUARel _ _ pres⋆ ] - prop[ isLeftModule _ _ isPropIsLeftModule _ _ _ _ _) ]) - where - open LeftModuleStr - open IsLeftModuleHom - -LeftModulePath : {R : Ring } (M N : LeftModule R ℓ') (LeftModuleEquiv M N) (M N) -LeftModulePath {R = R} = (𝒮ᴰ-LeftModule R) .UARel.ua + isSetLeftModule M = is-set + where + open LeftModuleStr (str M) + + open RingStr (snd R) using (1r) renaming (_+_ to _+r_; _·_ to _·s_) + + module _ {M : Type ℓ'} {0m : M} + {_+_ : M M M} { -_ : M M} {_⋆_ : R M M} + (isSet-M : isSet M) + (+Assoc : (x y z : M) x + (y + z) (x + y) + z) + (+IdR : (x : M) x + 0m x) + (+InvR : (x : M) x + (- x) 0m) + (+Comm : (x y : M) x + y y + x) + (⋆Assoc : (r s : R ) (x : M) (r ·s s) x r (s x)) + (⋆DistR+ : (r : R ) (x y : M) r (x + y) (r x) + (r y)) + (⋆DistL+ : (r s : R ) (x : M) (r +r s) x (r x) + (s x)) + (⋆IdL : (x : M) 1r x x) + where + + makeIsLeftModule : IsLeftModule R 0m _+_ -_ _⋆_ + makeIsLeftModule .IsLeftModule.+IsAbGroup = makeIsAbGroup isSet-M +Assoc +IdR +InvR +Comm + makeIsLeftModule .IsLeftModule.⋆Assoc = ⋆Assoc + makeIsLeftModule .IsLeftModule.⋆DistR+ = ⋆DistR+ + makeIsLeftModule .IsLeftModule.⋆DistL+ = ⋆DistL+ + makeIsLeftModule .IsLeftModule.⋆IdL = ⋆IdL + +record IsLeftModuleHom {R : Ring } {A B : Type ℓ'} + (M : LeftModuleStr R A) (f : A B) (N : LeftModuleStr R B) + : Type (ℓ-max ℓ') + where + + -- Shorter qualified names + private + module M = LeftModuleStr M + module N = LeftModuleStr N + + field + pres0 : f M.0m N.0m + pres+ : (x y : A) f (x M.+ y) f x N.+ f y + pres- : (x : A) f (M.- x) N.- (f x) + pres⋆ : (r : R ) (y : A) f (r M.⋆ y) r N.⋆ f y + +LeftModuleHom : {R : Ring } (M N : LeftModule R ℓ') Type (ℓ-max ℓ') +LeftModuleHom M N = Σ[ f ( M N ) ] IsLeftModuleHom (M .snd) f (N .snd) + +IsLeftModuleEquiv : {R : Ring } {A B : Type ℓ'} + (M : LeftModuleStr R A) (e : A B) (N : LeftModuleStr R B) + Type (ℓ-max ℓ') +IsLeftModuleEquiv M e N = IsLeftModuleHom M (e .fst) N + +LeftModuleEquiv : {R : Ring } (M N : LeftModule R ℓ') Type (ℓ-max ℓ') +LeftModuleEquiv M N = Σ[ e M N ] IsLeftModuleEquiv (M .snd) e (N .snd) + +isPropIsLeftModule : (R : Ring ) {M : Type ℓ'} + (0m : M) + (_+_ : M M M) + (-_ : M M) + (_⋆_ : R M M) + isProp (IsLeftModule R 0m _+_ -_ _⋆_) +isPropIsLeftModule R _ _ _ _ = + isOfHLevelRetractFromIso 1 IsLeftModuleIsoΣ + (isPropΣ (isPropIsAbGroup _ _ _) + ab + isProp× (isPropΠ3 λ _ _ _ ab .is-set _ _) + (isProp× (isPropΠ3 λ _ _ _ ab .is-set _ _) + (isProp× (isPropΠ3 λ _ _ _ ab .is-set _ _) + (isPropΠ λ _ ab .is-set _ _))))) + where + open IsAbGroup + +𝒮ᴰ-LeftModule : (R : Ring ) DUARel (𝒮-Univ ℓ') (LeftModuleStr R) (ℓ-max ℓ') +𝒮ᴰ-LeftModule R = + 𝒮ᴰ-Record (𝒮-Univ _) (IsLeftModuleEquiv {R = R}) + (fields: + data[ 0m autoDUARel _ _ pres0 ] + data[ _+_ autoDUARel _ _ pres+ ] + data[ -_ autoDUARel _ _ pres- ] + data[ _⋆_ autoDUARel _ _ pres⋆ ] + prop[ isLeftModule _ _ isPropIsLeftModule _ _ _ _ _) ]) + where + open LeftModuleStr + open IsLeftModuleHom + +LeftModulePath : {R : Ring } (M N : LeftModule R ℓ') (LeftModuleEquiv M N) (M N) +LeftModulePath {R = R} = (𝒮ᴰ-LeftModule R) .UARel.ua \ No newline at end of file diff --git a/Cubical.Algebra.Module.Instances.FinMatrix.html b/Cubical.Algebra.Module.Instances.FinMatrix.html index 5f16851dcc..259917c625 100644 --- a/Cubical.Algebra.Module.Instances.FinMatrix.html +++ b/Cubical.Algebra.Module.Instances.FinMatrix.html @@ -32,7 +32,7 @@ isLeftModule (snd FinMatrixLeftModule) = isRLeftModule where isRLeftModule : IsLeftModule R _ _ _ _ - isRLeftModule = makeIsLeftModule + isRLeftModule = makeIsLeftModule (isSetΠ λ _ FV.is-set) _ _ _ funExt₂ λ _ _ R'.+Assoc _ _ _) _ funExt₂ λ _ _ R'.+IdR _) diff --git a/Cubical.Algebra.Module.Instances.FinVec.html b/Cubical.Algebra.Module.Instances.FinVec.html index a54375737a..2b7867732f 100644 --- a/Cubical.Algebra.Module.Instances.FinVec.html +++ b/Cubical.Algebra.Module.Instances.FinVec.html @@ -26,7 +26,7 @@ isLeftModule (snd FinVecLeftModule) = isLeftModuleR where isLeftModuleR : IsLeftModule R _ _ _ _ - isLeftModuleR = makeIsLeftModule + isLeftModuleR = makeIsLeftModule (isSet→ R'.is-set) _ _ _ funExt λ _ R'.+Assoc _ _ _) _ funExt λ _ R'.+IdR _) diff --git a/Cubical.Algebra.OrderedCommMonoid.Base.html b/Cubical.Algebra.OrderedCommMonoid.Base.html index 77b0b77b02..f022bfea63 100644 --- a/Cubical.Algebra.OrderedCommMonoid.Base.html +++ b/Cubical.Algebra.OrderedCommMonoid.Base.html @@ -7,89 +7,93 @@ open import Cubical.Foundations.Prelude open import Cubical.Foundations.SIP using (TypeWithStr) -open import Cubical.Foundations.Structure using (⟨_⟩) - -open import Cubical.Algebra.CommMonoid.Base - -open import Cubical.Relation.Binary.Poset - -private - variable - ℓ' : Level - -record IsOrderedCommMonoid - {M : Type } - (_·_ : M M M) (1m : M) (_≤_ : M M Type ℓ') : Type (ℓ-max ℓ') - where - field - isPoset : IsPoset _≤_ - isCommMonoid : IsCommMonoid 1m _·_ - MonotoneR : {x y z : M} x y (x · z) (y · z) -- both versions, just for convenience - MonotoneL : {x y z : M} x y (z · x) (z · y) - -record OrderedCommMonoidStr (ℓ' : Level) (M : Type ) : Type (ℓ-suc (ℓ-max ℓ')) where - field - _≤_ : M M Type ℓ' - _·_ : M M M - ε : M - isOrderedCommMonoid : IsOrderedCommMonoid _·_ ε _≤_ - - open IsOrderedCommMonoid isOrderedCommMonoid public - open IsPoset isPoset public - open IsCommMonoid isCommMonoid public - - infixl 4 _≤_ - -OrderedCommMonoid : ( ℓ' : Level) Type (ℓ-suc (ℓ-max ℓ')) -OrderedCommMonoid ℓ' = TypeWithStr (OrderedCommMonoidStr ℓ') - -module _ - {M : Type } {1m : M} {_·_ : M M M} {_≤_ : M M Type ℓ'} - (is-setM : isSet M) - (assoc : (x y z : M) x · (y · z) (x · y) · z) - (rid : (x : M) x · 1m x) - (lid : (x : M) 1m · x x) - (comm : (x y : M) x · y y · x) - (isProp≤ : (x y : M) isProp (x y)) - (isRefl : (x : M) x x) - (isTrans : (x y z : M) x y y z x z) - (isAntisym : (x y : M) x y y x x y) - (rmonotone : (x y z : M) x y (x · z) (y · z)) - (lmonotone : (x y z : M) x y (z · x) (z · y)) - where - open IsOrderedCommMonoid - - makeIsOrderedCommMonoid : IsOrderedCommMonoid _·_ 1m _≤_ - isCommMonoid makeIsOrderedCommMonoid = makeIsCommMonoid is-setM assoc rid comm - isPoset makeIsOrderedCommMonoid = isposet is-setM isProp≤ isRefl isTrans isAntisym - MonotoneR makeIsOrderedCommMonoid = rmonotone _ _ _ - MonotoneL makeIsOrderedCommMonoid = lmonotone _ _ _ - -module _ - {M : Type } {1m : M} {_·_ : M M M} {_≤_ : M M Type ℓ'} - (isCommMonoid : IsCommMonoid 1m _·_) - (isProp≤ : (x y : M) isProp (x y)) - (isRefl : (x : M) x x) - (isTrans : (x y z : M) x y y z x z) - (isAntisym : (x y : M) x y y x x y) - (rmonotone : (x y z : M) x y (x · z) (y · z)) - (lmonotone : (x y z : M) x y (z · x) (z · y)) - where - module CM = IsOrderedCommMonoid - - IsOrderedCommMonoidFromIsCommMonoid : IsOrderedCommMonoid _·_ 1m _≤_ - CM.isPoset IsOrderedCommMonoidFromIsCommMonoid = - isposet (isSetFromIsCommMonoid isCommMonoid) isProp≤ isRefl isTrans isAntisym - CM.isCommMonoid IsOrderedCommMonoidFromIsCommMonoid = isCommMonoid - CM.MonotoneR IsOrderedCommMonoidFromIsCommMonoid = rmonotone _ _ _ - CM.MonotoneL IsOrderedCommMonoidFromIsCommMonoid = lmonotone _ _ _ - -OrderedCommMonoid→CommMonoid : OrderedCommMonoid ℓ' CommMonoid -OrderedCommMonoid→CommMonoid M .fst = M .fst -OrderedCommMonoid→CommMonoid M .snd = - let open OrderedCommMonoidStr (M .snd) - in commmonoidstr _ _ isCommMonoid - -isSetOrderedCommMonoid : (M : OrderedCommMonoid ℓ') isSet M -isSetOrderedCommMonoid M = isSetCommMonoid (OrderedCommMonoid→CommMonoid M) +open import Cubical.Foundations.Structure using (⟨_⟩; str) + +open import Cubical.Algebra.CommMonoid.Base + +open import Cubical.Relation.Binary.Poset + +private + variable + ℓ' : Level + +record IsOrderedCommMonoid + {M : Type } + (_·_ : M M M) (1m : M) (_≤_ : M M Type ℓ') : Type (ℓ-max ℓ') + where + field + isPoset : IsPoset _≤_ + isCommMonoid : IsCommMonoid 1m _·_ + MonotoneR : {x y z : M} x y (x · z) (y · z) -- both versions, just for convenience + MonotoneL : {x y z : M} x y (z · x) (z · y) + + open IsPoset isPoset public + open IsCommMonoid isCommMonoid public + hiding (is-set) + +record OrderedCommMonoidStr (ℓ' : Level) (M : Type ) : Type (ℓ-suc (ℓ-max ℓ')) where + field + _≤_ : M M Type ℓ' + _·_ : M M M + ε : M + isOrderedCommMonoid : IsOrderedCommMonoid _·_ ε _≤_ + + open IsOrderedCommMonoid isOrderedCommMonoid public + + infixl 4 _≤_ + +OrderedCommMonoid : ( ℓ' : Level) Type (ℓ-suc (ℓ-max ℓ')) +OrderedCommMonoid ℓ' = TypeWithStr (OrderedCommMonoidStr ℓ') + +module _ + {M : Type } {1m : M} {_·_ : M M M} {_≤_ : M M Type ℓ'} + (is-setM : isSet M) + (assoc : (x y z : M) x · (y · z) (x · y) · z) + (rid : (x : M) x · 1m x) + (lid : (x : M) 1m · x x) + (comm : (x y : M) x · y y · x) + (isProp≤ : (x y : M) isProp (x y)) + (isRefl : (x : M) x x) + (isTrans : (x y z : M) x y y z x z) + (isAntisym : (x y : M) x y y x x y) + (rmonotone : (x y z : M) x y (x · z) (y · z)) + (lmonotone : (x y z : M) x y (z · x) (z · y)) + where + open IsOrderedCommMonoid + + makeIsOrderedCommMonoid : IsOrderedCommMonoid _·_ 1m _≤_ + isCommMonoid makeIsOrderedCommMonoid = makeIsCommMonoid is-setM assoc rid comm + isPoset makeIsOrderedCommMonoid = isposet is-setM isProp≤ isRefl isTrans isAntisym + MonotoneR makeIsOrderedCommMonoid = rmonotone _ _ _ + MonotoneL makeIsOrderedCommMonoid = lmonotone _ _ _ + +module _ + {M : Type } {1m : M} {_·_ : M M M} {_≤_ : M M Type ℓ'} + (isCommMonoid : IsCommMonoid 1m _·_) + (isProp≤ : (x y : M) isProp (x y)) + (isRefl : (x : M) x x) + (isTrans : (x y z : M) x y y z x z) + (isAntisym : (x y : M) x y y x x y) + (rmonotone : (x y z : M) x y (x · z) (y · z)) + (lmonotone : (x y z : M) x y (z · x) (z · y)) + where + module CM = IsOrderedCommMonoid + + IsOrderedCommMonoidFromIsCommMonoid : IsOrderedCommMonoid _·_ 1m _≤_ + CM.isPoset IsOrderedCommMonoidFromIsCommMonoid = + isposet (IsCommMonoid.is-set isCommMonoid) isProp≤ isRefl isTrans isAntisym + CM.isCommMonoid IsOrderedCommMonoidFromIsCommMonoid = isCommMonoid + CM.MonotoneR IsOrderedCommMonoidFromIsCommMonoid = rmonotone _ _ _ + CM.MonotoneL IsOrderedCommMonoidFromIsCommMonoid = lmonotone _ _ _ + +OrderedCommMonoid→CommMonoid : OrderedCommMonoid ℓ' CommMonoid +OrderedCommMonoid→CommMonoid M .fst = M .fst +OrderedCommMonoid→CommMonoid M .snd = + let open OrderedCommMonoidStr (M .snd) + in commmonoidstr _ _ isCommMonoid + +isSetOrderedCommMonoid : (M : OrderedCommMonoid ℓ') isSet M +isSetOrderedCommMonoid M = is-set + where + open OrderedCommMonoidStr (str M) \ No newline at end of file diff --git a/Cubical.Algebra.OrderedCommMonoid.Instances.html b/Cubical.Algebra.OrderedCommMonoid.Instances.html index 8e02a4925a..f1afd54ab2 100644 --- a/Cubical.Algebra.OrderedCommMonoid.Instances.html +++ b/Cubical.Algebra.OrderedCommMonoid.Instances.html @@ -9,25 +9,25 @@ open import Cubical.Data.Nat open import Cubical.Data.Nat.Order -ℕ≤+ : OrderedCommMonoid ℓ-zero ℓ-zero +ℕ≤+ : OrderedCommMonoid ℓ-zero ℓ-zero ℕ≤+ .fst = -ℕ≤+ .snd .OrderedCommMonoidStr._≤_ = _≤_ -ℕ≤+ .snd .OrderedCommMonoidStr._·_ = _+_ -ℕ≤+ .snd .OrderedCommMonoidStr.ε = 0 -ℕ≤+ .snd .OrderedCommMonoidStr.isOrderedCommMonoid = - makeIsOrderedCommMonoid +ℕ≤+ .snd .OrderedCommMonoidStr._≤_ = _≤_ +ℕ≤+ .snd .OrderedCommMonoidStr._·_ = _+_ +ℕ≤+ .snd .OrderedCommMonoidStr.ε = 0 +ℕ≤+ .snd .OrderedCommMonoidStr.isOrderedCommMonoid = + makeIsOrderedCommMonoid isSetℕ +-assoc +-zero _ refl) +-comm _ _ isProp≤) _ ≤-refl) _ _ _ ≤-trans) _ _ ≤-antisym) _ _ _ ≤-+k) _ _ _ ≤-k+) -ℕ≤· : OrderedCommMonoid ℓ-zero ℓ-zero +ℕ≤· : OrderedCommMonoid ℓ-zero ℓ-zero ℕ≤· .fst = -ℕ≤· .snd .OrderedCommMonoidStr._≤_ = _≤_ -ℕ≤· .snd .OrderedCommMonoidStr._·_ = _·_ -ℕ≤· .snd .OrderedCommMonoidStr.ε = 1 -ℕ≤· .snd .OrderedCommMonoidStr.isOrderedCommMonoid = - makeIsOrderedCommMonoid +ℕ≤· .snd .OrderedCommMonoidStr._≤_ = _≤_ +ℕ≤· .snd .OrderedCommMonoidStr._·_ = _·_ +ℕ≤· .snd .OrderedCommMonoidStr.ε = 1 +ℕ≤· .snd .OrderedCommMonoidStr.isOrderedCommMonoid = + makeIsOrderedCommMonoid isSetℕ ·-assoc ·-identityʳ ·-identityˡ ·-comm _ _ isProp≤) _ ≤-refl) _ _ _ ≤-trans) _ _ ≤-antisym) diff --git a/Cubical.Algebra.OrderedCommMonoid.PropCompletion.html b/Cubical.Algebra.OrderedCommMonoid.PropCompletion.html index 2bd0be1776..d188e228e0 100644 --- a/Cubical.Algebra.OrderedCommMonoid.PropCompletion.html +++ b/Cubical.Algebra.OrderedCommMonoid.PropCompletion.html @@ -35,13 +35,13 @@ variable : Level -module PropCompletion ( : Level) (M : OrderedCommMonoid ) where - open OrderedCommMonoidStr (snd M) +module PropCompletion ( : Level) (M : OrderedCommMonoid ) where + open OrderedCommMonoidStr (snd M) _≤p_ : fst M fst M hProp - n ≤p m = (n m) , (is-prop-valued _ _) + n ≤p m = (n m) , (is-prop-valued _ _) isUpwardClosed : (s : fst M hProp ) Type _ - isUpwardClosed s = (n m : fst M) n m fst (s n) fst (s m) + isUpwardClosed s = (n m : fst M) n m fst (s n) fst (s m) isPropUpwardClosed : (N : fst M hProp ) isProp (isUpwardClosed N) isPropUpwardClosed N = @@ -75,13 +75,13 @@ isBounded^ m = (m , (is-refl m)) ∣₁ 1↑ : M↑ - 1↑ = ε ^↑ + 1↑ = ε ^↑ _·↑_ : M↑ M↑ M↑ s ·↑ l = seq , seqIsUpwardClosed where seq : fst M hProp - seq n = (∃[ (a , b) (fst M) × (fst M) ] fst ((fst s a) (fst l b) ((a · b) ≤p n) )) , + seq n = (∃[ (a , b) (fst M) × (fst M) ] fst ((fst s a) (fst l b) ((a · b) ≤p n) )) , isPropPropTrunc seqIsUpwardClosed : isUpwardClosed seq seqIsUpwardClosed n m n≤m = @@ -94,7 +94,7 @@ propTruncRec2 isPropPropTrunc λ {(m , s≤m) (k , l≤k) - (m · k) , (m , k) , (s≤m , (l≤k , (is-refl (m · k)))) ∣₁ ∣₁ + (m · k) , (m , k) , (s≤m , (l≤k , (is-refl (m · k)))) ∣₁ ∣₁ } {- convenience functions for the proof that ·↑ is the multiplication of a monoid -} @@ -122,19 +122,19 @@ ⇐∶ l→s n - ^↑Pres· : (x y : fst M) (x · y) ^↑ (x ^↑) ·↑ (y ^↑) - ^↑Pres· x y = pathFromImplications ((x · y) ^↑) ((x ^↑) ·↑ (y ^↑)) () + ^↑Pres· : (x y : fst M) (x · y) ^↑ (x ^↑) ·↑ (y ^↑) + ^↑Pres· x y = pathFromImplications ((x · y) ^↑) ((x ^↑) ·↑ (y ^↑)) () where - : (n : fst M) typeAt n ((x · y) ^↑) typeAt n ((x ^↑) ·↑ (y ^↑)) + : (n : fst M) typeAt n ((x · y) ^↑) typeAt n ((x ^↑) ·↑ (y ^↑)) n x·y≤n = (x , y) , ((is-refl _) , ((is-refl _) , x·y≤n)) ∣₁ - : (n : fst M) typeAt n ((x ^↑) ·↑ (y ^↑)) typeAt n ((x · y) ^↑) + : (n : fst M) typeAt n ((x ^↑) ·↑ (y ^↑)) typeAt n ((x · y) ^↑) n = propTruncRec - (snd (fst ((x · y) ^↑) n)) + (snd (fst ((x · y) ^↑) n)) λ {((m , l) , x≤m , (y≤l , m·l≤n)) is-trans _ _ _ - (is-trans _ _ _ (MonotoneR x≤m) - (MonotoneL y≤l)) + (is-trans _ _ _ (MonotoneR x≤m) + (MonotoneL y≤l)) m·l≤n } @@ -155,9 +155,9 @@ n = propTruncRec (snd (fst s n)) {((a , b) , sa , (1b , a·b≤n)) - (snd s) a n ( subst (_≤ n) (·IdR a) (is-trans _ _ _ (MonotoneL 1b) a·b≤n)) sa }) + (snd s) a n ( subst (_≤ n) (·IdR a) (is-trans _ _ _ (MonotoneL 1b) a·b≤n)) sa }) : (n : fst M) typeAt n s typeAt n (s ·↑ 1↑) - n = λ sn (n , ε) , (sn , (is-refl _ , subst (_≤ n) (sym (·IdR n)) (is-refl _))) ∣₁ + n = λ sn (n , ε) , (sn , (is-refl _ , subst (_≤ n) (sym (·IdR n)) (is-refl _))) ∣₁ ·↑Assoc : (s l k : M↑) s ·↑ (l ·↑ k) (s ·↑ l) ·↑ k ·↑Assoc s l k = pathFromImplications (s ·↑ (l ·↑ k)) ((s ·↑ l) ·↑ k) () @@ -168,9 +168,9 @@ propTruncRec isPropPropTrunc {((a' , b') , la' , (kb' , a'·b'≤b)) - ((a · a') , b') , (a , a') , (sa , (la' , is-refl _)) ∣₁ , kb' , - (let a·⟨a'·b'⟩≤n = (is-trans _ _ _ (MonotoneL a'·b'≤b) a·b≤n) - in subst (_≤ n) (·Assoc a a' b') a·⟨a'·b'⟩≤n) ∣₁ + ((a · a') , b') , (a , a') , (sa , (la' , is-refl _)) ∣₁ , kb' , + (let a·⟨a'·b'⟩≤n = (is-trans _ _ _ (MonotoneL a'·b'≤b) a·b≤n) + in subst (_≤ n) (·Assoc a a' b') a·⟨a'·b'⟩≤n) ∣₁ }) l·kb } : _ @@ -180,9 +180,9 @@ propTruncRec isPropPropTrunc {((a' , b') , s≤a' , (l≤b' , a'·b'≤a)) - (a' , b' · b) , s≤a' , ( (b' , b) , l≤b' , (k≤b , is-refl _) ∣₁ , - (let ⟨a'·b'⟩·b≤n = (is-trans _ _ _ (MonotoneR a'·b'≤a) a·b≤n) - in subst (_≤ n) (sym (·Assoc a' b' b)) ⟨a'·b'⟩·b≤n) ) ∣₁ + (a' , b' · b) , s≤a' , ( (b' , b) , l≤b' , (k≤b , is-refl _) ∣₁ , + (let ⟨a'·b'⟩·b≤n = (is-trans _ _ _ (MonotoneR a'·b'≤a) a·b≤n) + in subst (_≤ n) (sym (·Assoc a' b' b)) ⟨a'·b'⟩·b≤n) ) ∣₁ }) s·l≤a } @@ -230,38 +230,38 @@ isPropPropTrunc λ {((a , b) , s≤a , (l≤b , a·b≤x)) (a , b) , s≤a , p b l≤b , a·b≤x ∣₁} - asOrderedCommMonoid : OrderedCommMonoid (ℓ-suc ) + asOrderedCommMonoid : OrderedCommMonoid (ℓ-suc ) asOrderedCommMonoid .fst = _ - asOrderedCommMonoid .snd .OrderedCommMonoidStr._≤_ = _≤↑_ - asOrderedCommMonoid .snd .OrderedCommMonoidStr._·_ = _·↑_ - asOrderedCommMonoid .snd .OrderedCommMonoidStr.ε = 1↑ - asOrderedCommMonoid .snd .OrderedCommMonoidStr.isOrderedCommMonoid = - IsOrderedCommMonoidFromIsCommMonoid + asOrderedCommMonoid .snd .OrderedCommMonoidStr._≤_ = _≤↑_ + asOrderedCommMonoid .snd .OrderedCommMonoidStr._·_ = _·↑_ + asOrderedCommMonoid .snd .OrderedCommMonoidStr.ε = 1↑ + asOrderedCommMonoid .snd .OrderedCommMonoidStr.isOrderedCommMonoid = + IsOrderedCommMonoidFromIsCommMonoid (CommMonoidStr.isCommMonoid (snd asCommMonoid)) ≤↑IsProp ≤↑IsRefl ≤↑IsTrans ≤↑IsAntisym ·↑IsRMonotone ·↑IsLMonotone - boundedSubstructure : OrderedCommMonoid (ℓ-suc ) + boundedSubstructure : OrderedCommMonoid (ℓ-suc ) boundedSubstructure = makeOrderedSubmonoid asOrderedCommMonoid s (isBounded s , isPropIsBounded s)) ·presBounded - (isBounded^ ε) + (isBounded^ ε) PropCompletion : - OrderedCommMonoid - OrderedCommMonoid (ℓ-suc ) + OrderedCommMonoid + OrderedCommMonoid (ℓ-suc ) PropCompletion M = PropCompletion.asOrderedCommMonoid _ M BoundedPropCompletion : - OrderedCommMonoid - OrderedCommMonoid (ℓ-suc ) + OrderedCommMonoid + OrderedCommMonoid (ℓ-suc ) BoundedPropCompletion M = PropCompletion.boundedSubstructure _ M isSetBoundedPropCompletion : - (M : OrderedCommMonoid ) + (M : OrderedCommMonoid ) isSet ( BoundedPropCompletion M ) isSetBoundedPropCompletion M = - isSetΣSndProp (isSetOrderedCommMonoid (PropCompletion M)) + isSetΣSndProp (isSetOrderedCommMonoid (PropCompletion M)) λ x PropCompletion.isPropIsBounded _ M x \ No newline at end of file diff --git a/Cubical.Algebra.OrderedCommMonoid.Properties.html b/Cubical.Algebra.OrderedCommMonoid.Properties.html index fade075688..5138b09371 100644 --- a/Cubical.Algebra.OrderedCommMonoid.Properties.html +++ b/Cubical.Algebra.OrderedCommMonoid.Properties.html @@ -21,29 +21,29 @@ module _ - (M : OrderedCommMonoid ℓ') + (M : OrderedCommMonoid ℓ') (P : M hProp ℓ'') where - open OrderedCommMonoidStr (snd M) + open OrderedCommMonoidStr (snd M) module _ - (·Closed : (x y : M ) P x P y P (x · y) ) - (εContained : P ε ) + (·Closed : (x y : M ) P x P y P (x · y) ) + (εContained : P ε ) where private subtype = Σ[ x M ] P x - submonoid = makeSubCommMonoid (OrderedCommMonoid→CommMonoid M) P ·Closed εContained + submonoid = makeSubCommMonoid (OrderedCommMonoid→CommMonoid M) P ·Closed εContained _≤ₛ_ : (x y : submonoid ) Type ℓ' - x ≤ₛ y = (fst x) (fst y) - pres≤ : (x y : submonoid ) (x≤y : x ≤ₛ y) (fst x) (fst y) + x ≤ₛ y = (fst x) (fst y) + pres≤ : (x y : submonoid ) (x≤y : x ≤ₛ y) (fst x) (fst y) pres≤ x y x≤y = x≤y - makeOrderedSubmonoid : OrderedCommMonoid _ ℓ' + makeOrderedSubmonoid : OrderedCommMonoid _ ℓ' fst makeOrderedSubmonoid = subtype - OrderedCommMonoidStr._≤_ (snd makeOrderedSubmonoid) = _≤ₛ_ - OrderedCommMonoidStr._·_ (snd makeOrderedSubmonoid) = CommMonoidStr._·_ (snd submonoid) - OrderedCommMonoidStr.ε (snd makeOrderedSubmonoid) = CommMonoidStr.ε (snd submonoid) - OrderedCommMonoidStr.isOrderedCommMonoid (snd makeOrderedSubmonoid) = - IsOrderedCommMonoidFromIsCommMonoid + OrderedCommMonoidStr._≤_ (snd makeOrderedSubmonoid) = _≤ₛ_ + OrderedCommMonoidStr._·_ (snd makeOrderedSubmonoid) = CommMonoidStr._·_ (snd submonoid) + OrderedCommMonoidStr.ε (snd makeOrderedSubmonoid) = CommMonoidStr.ε (snd submonoid) + OrderedCommMonoidStr.isOrderedCommMonoid (snd makeOrderedSubmonoid) = + IsOrderedCommMonoidFromIsCommMonoid (CommMonoidStr.isCommMonoid (snd submonoid)) x y is-prop-valued (fst x) (fst y)) x is-refl (fst x)) @@ -51,6 +51,6 @@ x y x≤y y≤x Σ≡Prop x snd (P x)) (is-antisym (fst x) (fst y) (pres≤ x y x≤y) (pres≤ y x y≤x))) - x y z x≤y MonotoneR (pres≤ x y x≤y)) - λ x y z x≤y MonotoneL (pres≤ x y x≤y) + x y z x≤y MonotoneR (pres≤ x y x≤y)) + λ x y z x≤y MonotoneL (pres≤ x y x≤y) \ No newline at end of file diff --git a/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.A%5BX%5DX-A.html b/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.A%5BX%5DX-A.html index 7576ebaf61..c20203f025 100644 --- a/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.A%5BX%5DX-A.html +++ b/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.A%5BX%5DX-A.html @@ -167,7 +167,7 @@ A[X]→A : CommRingHom A[X] Ar fst A[X]→A = A[x]→A - snd A[X]→A = makeIsRingHom A[x]→A-pres1 A[x]→A-pres+ A[x]→A-pres· + snd A[X]→A = makeIsRingHom A[x]→A-pres1 A[x]→A-pres+ A[x]→A-pres· A[x]→A-cancel : (k : Fin 1) A[x]→A (<Xkʲ> Ar 1 0 1 k) 0A A[x]→A-cancel zero = refl @@ -246,6 +246,6 @@ leftInv 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) +Equiv-ℤ[X]/X-ℤ : RingEquiv (CommRing→Ring ℤ[X]/X) (CommRing→Ring ℤCR) Equiv-ℤ[X]/X-ℤ = Equiv-A[X]/X-A ℤCR \ No newline at end of file diff --git a/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.AB-An%5BX%5DBn%5BX%5D.html b/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.AB-An%5BX%5DBn%5BX%5D.html index 4937e90853..585f085d5e 100644 --- a/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.AB-An%5BX%5DBn%5BX%5D.html +++ b/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.AB-An%5BX%5DBn%5BX%5D.html @@ -24,7 +24,7 @@ ----------------------------------------------------------------------------- -- Lift -open IsRingHom +open IsRingHom open CommRingStr module _ @@ -45,16 +45,16 @@ (+Assoc (snd PB)) (+IdR (snd PB)) (+Comm (snd PB)) - v (cong (base v) (pres0 fstr)) (base-neutral v)) - v a b (base-add v (f a) (f b)) (cong (base v) (sym (pres+ fstr a b)))) - snd (makeCommRingHomPoly (f , fstr)) = makeIsRingHom - (cong (base (replicate zero)) (pres1 fstr)) + v (cong (base v) (pres0 fstr)) (base-neutral v)) + v a b (base-add v (f a) (f b)) (cong (base v) (sym (pres+ fstr a b)))) + snd (makeCommRingHomPoly (f , fstr)) = makeIsRingHom + (cong (base (replicate zero)) (pres1 fstr)) _ _ refl) (DS-Ind-Prop.f _ _ _ _ _ isPropΠ λ _ trunc _ _) _ refl) v a DS-Ind-Prop.f _ _ _ _ _ trunc _ _) refl - v' b cong (base (v +n-vec v')) (pres· fstr a b)) + v' b cong (base (v +n-vec v')) (pres· fstr a b)) {U V} ind-U ind-V cong₂ (_+_ (snd PB)) ind-U ind-V)) λ {U V} ind-U ind-V Q cong₂ (_+_ (snd PB)) (ind-U Q) (ind-V Q)) @@ -80,7 +80,7 @@ where f = fst e g = invEq e - gstr : IsRingHom (snd (CommRing→Ring B')) g (snd (CommRing→Ring A')) + gstr : IsRingHom (snd (CommRing→Ring B')) g (snd (CommRing→Ring A')) gstr = isRingHomInv (e , fstr) is : Iso (fst PA) (fst PB) diff --git a/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.An%5BAm%5BX%5D%5D-Anm%5BX%5D.html b/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.An%5BAm%5BX%5D%5D-Anm%5BX%5D.html index a285def5e3..21320a783e 100644 --- a/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.An%5BAm%5BX%5D%5D-Anm%5BX%5D.html +++ b/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.An%5BAm%5BX%5D%5D-Anm%5BX%5D.html @@ -144,5 +144,5 @@ Iso.rightInv is = e-sect Iso.leftInv is = e-retr - snd CRE-PolyN∘M-PolyN+M = makeIsRingHom PAmn→PAn+m-pres1 PAmn→PAn+m-pres+ PAmn→PAn+m-pres· + snd CRE-PolyN∘M-PolyN+M = makeIsRingHom PAmn→PAn+m-pres1 PAmn→PAn+m-pres+ PAmn→PAn+m-pres· \ No newline at end of file diff --git a/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.An%5BX%5DX-A.html b/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.An%5BX%5DX-A.html index 4dd6ceed01..9eb9ef1ee7 100644 --- a/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.An%5BX%5DX-A.html +++ b/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.An%5BX%5DX-A.html @@ -178,7 +178,7 @@ PAr→Ar : CommRingHom (A[X1,···,Xn] Ar n) Ar fst PAr→Ar = PA→A - snd PAr→Ar = makeIsRingHom PA→A-pres1 PA→A-pres+ PA→A-pres· + snd PAr→Ar = makeIsRingHom PA→A-pres1 PA→A-pres+ PA→A-pres· PAIr→Ar : CommRingHom (A[X1,···,Xn]/<X1,···,Xn> Ar n) Ar PAIr→Ar = Quotient-FGideal-CommRing-CommRing.inducedHom (A[X1,···,Xn] Ar n) Ar PAr→Ar (<X1,···,Xn> Ar n) PA→A-cancel diff --git a/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.Poly0-A.html b/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.Poly0-A.html index 0ec3775f5e..fd35454d92 100644 --- a/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.Poly0-A.html +++ b/Cubical.Algebra.Polynomials.Multivariate.EquivCarac.Poly0-A.html @@ -89,5 +89,5 @@ Iso.inv is = A→Poly0 Iso.rightInv is = e-sect Iso.leftInv is = e-retr - snd CRE-Poly0-A = makeIsRingHom Poly0→A-pres1 Poly0→A-pres+ Poly0→A-pres· + snd CRE-Poly0-A = makeIsRingHom Poly0→A-pres1 Poly0→A-pres+ Poly0→A-pres· \ No newline at end of file diff --git a/Cubical.Algebra.Polynomials.TypevariateHIT.EquivUnivariateListPoly.html b/Cubical.Algebra.Polynomials.TypevariateHIT.EquivUnivariateListPoly.html index 11634fda24..7cc55d08c5 100644 --- a/Cubical.Algebra.Polynomials.TypevariateHIT.EquivUnivariateListPoly.html +++ b/Cubical.Algebra.Polynomials.TypevariateHIT.EquivUnivariateListPoly.html @@ -40,10 +40,10 @@ private open AlgebraHoms open Iso - to : CommAlgebraHom (R [ Unit ]) (ListPolyCommAlgebra R) + to : CommAlgebraHom (R [ Unit ]) (ListPolyCommAlgebra R) to = inducedHomHIT (ListPolyCommAlgebra R) _ X-List) - from : CommAlgebraHom (ListPolyCommAlgebra R) (R [ Unit ]) + from : CommAlgebraHom (ListPolyCommAlgebra R) (R [ Unit ]) from = inducedHomList R (CommAlgebra→Algebra (R [ Unit ])) X-HIT toPresX : fst to X-HIT X-List @@ -67,7 +67,7 @@ rightInv typevariateListPolyIso = toFrom leftInv typevariateListPolyIso = fromTo - typevariateListPolyEquiv : CommAlgebraEquiv (R [ Unit ]) (ListPolyCommAlgebra R) + typevariateListPolyEquiv : CommAlgebraEquiv (R [ Unit ]) (ListPolyCommAlgebra R) fst typevariateListPolyEquiv = isoToEquiv typevariateListPolyIso snd typevariateListPolyEquiv = snd to diff --git a/Cubical.Algebra.Polynomials.UnivariateHIT.Polyn-nPoly.html b/Cubical.Algebra.Polynomials.UnivariateHIT.Polyn-nPoly.html index f32e375723..1d494edc65 100644 --- a/Cubical.Algebra.Polynomials.UnivariateHIT.Polyn-nPoly.html +++ b/Cubical.Algebra.Polynomials.UnivariateHIT.Polyn-nPoly.html @@ -99,7 +99,7 @@ inv is = convSense rightInv is = sect leftInv is = retr - snd equivR = makeIsRingHom refl _ _ refl) converseSense-pres· + snd equivR = makeIsRingHom refl _ _ refl) converseSense-pres· open equiv1 diff --git a/Cubical.Algebra.Polynomials.UnivariateList.Poly1-1Poly.html b/Cubical.Algebra.Polynomials.UnivariateList.Poly1-1Poly.html index dda3e5c013..9b171576f1 100644 --- a/Cubical.Algebra.Polynomials.UnivariateList.Poly1-1Poly.html +++ b/Cubical.Algebra.Polynomials.UnivariateList.Poly1-1Poly.html @@ -175,7 +175,7 @@ Iso.inv is = Poly:→Poly1 Iso.rightInv is = e-sect Iso.leftInv is = e-retr - snd CRE-Poly1-Poly: = makeIsRingHom + snd CRE-Poly1-Poly: = makeIsRingHom Poly1→Poly:-pres1 Poly1→Poly:-pres+ Poly1→Poly:-pres· diff --git a/Cubical.Algebra.Polynomials.UnivariateList.Properties.html b/Cubical.Algebra.Polynomials.UnivariateList.Properties.html index 8a1bd191ae..a0876281fa 100644 --- a/Cubical.Algebra.Polynomials.UnivariateList.Properties.html +++ b/Cubical.Algebra.Polynomials.UnivariateList.Properties.html @@ -29,7 +29,7 @@ open PolyMod R' open CommRingTheory R' open RingTheory (CommRing→Ring R') - open GroupTheory (Ring→Group (CommRing→Ring R')) + open GroupTheory (Ring→Group (CommRing→Ring R')) pattern [_] x = x [] diff --git a/Cubical.Algebra.Ring.Base.html b/Cubical.Algebra.Ring.Base.html index ec9460c049..ea520ced25 100644 --- a/Cubical.Algebra.Ring.Base.html +++ b/Cubical.Algebra.Ring.Base.html @@ -83,252 +83,254 @@ Ring = TypeWithStr RingStr isSetRing : (R : Ring ) isSet R -isSetRing R = R .snd .RingStr.isRing .IsRing.·IsMonoid .IsMonoid.isSemigroup .IsSemigroup.is-set - -module _ {R : Type } {0r 1r : R} {_+_ _·_ : R R R} { -_ : R R} - (is-setR : isSet R) - (+Assoc : (x y z : R) x + (y + z) (x + y) + z) - (+IdR : (x : R) x + 0r x) - (+InvR : (x : R) x + (- x) 0r) - (+Comm : (x y : R) x + y y + x) - (·Assoc : (x y z : R) x · (y · z) (x · y) · z) - (·IdR : (x : R) x · 1r x) - (·IdL : (x : R) 1r · x x) - (·DistR+ : (x y z : R) x · (y + z) (x · y) + (x · z)) - (·DistL+ : (x y z : R) (x + y) · z (x · z) + (y · z)) - where - - makeIsRing : IsRing 0r 1r _+_ _·_ -_ - makeIsRing .IsRing.+IsAbGroup = makeIsAbGroup is-setR +Assoc +IdR +InvR +Comm - makeIsRing .IsRing.·IsMonoid = makeIsMonoid is-setR ·Assoc ·IdR ·IdL - makeIsRing .IsRing.·DistR+ = ·DistR+ - makeIsRing .IsRing.·DistL+ = ·DistL+ - -module _ {R : Type } (0r 1r : R) (_+_ _·_ : R R R) (-_ : R R) - (is-setR : isSet R) - (+Assoc : (x y z : R) x + (y + z) (x + y) + z) - (+IdR : (x : R) x + 0r x) - (+InvR : (x : R) x + (- x) 0r) - (+Comm : (x y : R) x + y y + x) - (·Assoc : (x y z : R) x · (y · z) (x · y) · z) - (·IdR : (x : R) x · 1r x) - (·IdL : (x : R) 1r · x x) - (·DistR+ : (x y z : R) x · (y + z) (x · y) + (x · z)) - (·DistL+ : (x y z : R) (x + y) · z (x · z) + (y · z)) - where - - makeRing : Ring - makeRing .fst = R - makeRing .snd .RingStr.0r = 0r - makeRing .snd .RingStr.1r = 1r - makeRing .snd .RingStr._+_ = _+_ - makeRing .snd .RingStr._·_ = _·_ - makeRing .snd .RingStr.-_ = -_ - makeRing .snd .RingStr.isRing = - makeIsRing is-setR +Assoc +IdR +InvR +Comm - ·Assoc ·IdR ·IdL ·DistR+ ·DistL+ - -record IsRingHom {A : Type } {B : Type ℓ'} (R : RingStr A) (f : A B) (S : RingStr B) - : Type (ℓ-max ℓ') - where - - -- Shorter qualified names - private - module R = RingStr R - module S = RingStr S - - field - pres0 : f R.0r S.0r - pres1 : f R.1r S.1r - pres+ : (x y : A) f (x R.+ y) f x S.+ f y - pres· : (x y : A) f (x R.· y) f x S.· f y - pres- : (x : A) f (R.- x) S.- (f x) - -unquoteDecl IsRingHomIsoΣ = declareRecordIsoΣ IsRingHomIsoΣ (quote IsRingHom) - -RingHom : (R : Ring ) (S : Ring ℓ') Type (ℓ-max ℓ') -RingHom R S = Σ[ f ( R S ) ] IsRingHom (R .snd) f (S .snd) - -IsRingEquiv : {A : Type } {B : Type ℓ'} (M : RingStr A) (e : A B) (N : RingStr B) - Type (ℓ-max ℓ') -IsRingEquiv M e N = IsRingHom M (e .fst) N - -RingEquiv : (R : Ring ) (S : Ring ℓ') Type (ℓ-max ℓ') -RingEquiv R S = Σ[ e ( R S ) ] IsRingEquiv (R .snd) e (S .snd) - -_$r_ : {R : Ring } {S : Ring ℓ'} (φ : RingHom R S) (x : R ) S -φ $r x = φ .fst x - -RingEquiv→RingHom : {A B : Ring } RingEquiv A B RingHom A B -RingEquiv→RingHom (e , eIsHom) = e .fst , eIsHom - -RingHomIsEquiv→RingEquiv : {A B : Ring } (f : RingHom A B) - isEquiv (fst f) RingEquiv A B -fst (fst (RingHomIsEquiv→RingEquiv f fIsEquiv)) = fst f -snd (fst (RingHomIsEquiv→RingEquiv f fIsEquiv)) = fIsEquiv -snd (RingHomIsEquiv→RingEquiv f fIsEquiv) = snd f - -isPropIsRing : {R : Type } (0r 1r : R) (_+_ _·_ : R R R) (-_ : R R) - isProp (IsRing 0r 1r _+_ _·_ -_) -isPropIsRing 0r 1r _+_ _·_ -_ = - isOfHLevelRetractFromIso 1 IsRingIsoΣ - (isPropΣ (isPropIsAbGroup 0r _+_ (-_)) λ abgrp - isProp× (isPropIsMonoid 1r _·_) - (isProp× (isPropΠ3 λ _ _ _ abgrp .is-set _ _) - (isPropΠ3 λ _ _ _ abgrp .is-set _ _))) - where - open IsAbGroup - -isPropIsRingHom : {A : Type } {B : Type ℓ'} (R : RingStr A) (f : A B) (S : RingStr B) - isProp (IsRingHom R f S) -isPropIsRingHom R f S = isOfHLevelRetractFromIso 1 IsRingHomIsoΣ - (isProp×4 (isSetRing (_ , S) _ _) - (isSetRing (_ , S) _ _) - (isPropΠ2 λ _ _ isSetRing (_ , S) _ _) - (isPropΠ2 λ _ _ isSetRing (_ , S) _ _) - (isPropΠ λ _ isSetRing (_ , S) _ _)) - -isSetRingHom : (R : Ring ) (S : Ring ℓ') isSet (RingHom R S) -isSetRingHom R S = isSetΣSndProp (isSetΠ _ isSetRing S)) f isPropIsRingHom (snd R) f (snd S)) - -isSetRingEquiv : (A : Ring ) (B : Ring ℓ') isSet (RingEquiv A B) -isSetRingEquiv A B = isSetΣSndProp (isOfHLevel≃ 2 (isSetRing A) (isSetRing B)) - e isPropIsRingHom (snd A) (fst e) (snd B)) - -RingHomPathP : (R : Ring ) (S T : Ring ℓ') (p : S T) (φ : RingHom R S) (ψ : RingHom R T) - PathP i R .fst p i .fst) (φ .fst) (ψ .fst) - PathP i RingHom R (p i)) φ ψ -RingHomPathP R S T p φ ψ q = ΣPathP (q , isProp→PathP _ isPropIsRingHom _ _ _) _ _) - -RingHom≡ : {R : Ring } {S : Ring ℓ'} {φ ψ : RingHom R S} fst φ fst ψ φ ψ -RingHom≡ = Σ≡Prop λ f isPropIsRingHom _ f _ - -𝒮ᴰ-Ring : DUARel (𝒮-Univ ) RingStr -𝒮ᴰ-Ring = - 𝒮ᴰ-Record (𝒮-Univ _) IsRingEquiv - (fields: - data[ 0r null pres0 ] - data[ 1r null pres1 ] - data[ _+_ bin pres+ ] - data[ _·_ bin pres· ] - data[ -_ un pres- ] - prop[ isRing _ _ isPropIsRing _ _ _ _ _) ]) - where - open RingStr - open IsRingHom - - -- faster with some sharing - null = autoDUARel (𝒮-Univ _) A A) - un = autoDUARel (𝒮-Univ _) A A A) - bin = autoDUARel (𝒮-Univ _) A A A A) - -RingPath : (R S : Ring ) RingEquiv R S (R S) -RingPath = 𝒮ᴰ-Ring .UARel.ua - -uaRing : {A B : Ring } RingEquiv A B A B -uaRing {A = A} {B = B} = equivFun (RingPath A B) - -isGroupoidRing : isGroupoid (Ring ) -isGroupoidRing _ _ = isOfHLevelRespectEquiv 2 (RingPath _ _) (isSetRingEquiv _ _) - -open RingStr -open IsRingHom - --- TODO: Induced structure results are temporarily inconvenient while we transition between algebra --- representations -module _ (R : Ring ) {A : Type } - (0a 1a : A) - (add mul : A A A) - (inv : A A) - (e : R A) - (p0 : e .fst (R .snd .0r) 0a) - (p1 : e .fst (R .snd .1r) 1a) - (p+ : x y e .fst (R .snd ._+_ x y) add (e .fst x) (e .fst y)) - ( : x y e .fst (R .snd ._·_ x y) mul (e .fst x) (e .fst y)) - (pinv : x e .fst (R .snd .-_ x) inv (e .fst x)) - where - - private - module R = RingStr (R .snd) - - BaseΣ : Type (ℓ-suc ) - BaseΣ = Σ[ B Type ] B × B × (B B B) × (B B B) × (B B) - - FamilyΣ : BaseΣ Type - FamilyΣ (B , u0 , u1 , a , m , i) = IsRing u0 u1 a m i - - inducedΣ : FamilyΣ (A , 0a , 1a , add , mul , inv) - inducedΣ = - subst FamilyΣ - (UARel.≅→≡ (autoUARel BaseΣ) (e , p0 , p1 , p+ , , pinv)) - R.isRing - - InducedRing : Ring - InducedRing .fst = A - 0r (InducedRing .snd) = 0a - 1r (InducedRing .snd) = 1a - _+_ (InducedRing .snd) = add - _·_ (InducedRing .snd) = mul - - InducedRing .snd = inv - isRing (InducedRing .snd) = inducedΣ - - InducedRingEquiv : RingEquiv R InducedRing - fst InducedRingEquiv = e - pres0 (snd InducedRingEquiv) = p0 - pres1 (snd InducedRingEquiv) = p1 - pres+ (snd InducedRingEquiv) = p+ - pres· (snd InducedRingEquiv) = - pres- (snd InducedRingEquiv) = pinv - - InducedRingPath : R InducedRing - InducedRingPath = RingPath _ _ .fst InducedRingEquiv - - - - --- Rings have an abelian group and a monoid - -module _ ((A , (ringstr 0r 1r _+_ _·_ -_ R)) : Ring ) where - Ring→AbGroup : AbGroup - Ring→AbGroup .fst = A - Ring→AbGroup .snd .AbGroupStr.0g = 0r - Ring→AbGroup .snd .AbGroupStr._+_ = _+_ - Ring→AbGroup .snd .AbGroupStr.-_ = -_ - Ring→AbGroup .snd .AbGroupStr.isAbGroup = IsRing.+IsAbGroup R - - Ring→MultMonoid : Monoid - Ring→MultMonoid = monoid A 1r _·_ (IsRing.·IsMonoid R) - -Ring→Group : Ring Group -Ring→Group = AbGroup→Group Ring→AbGroup - -Ring→AddMonoid : Ring Monoid -Ring→AddMonoid = Group→Monoid Ring→Group - --- Smart constructor for ring homomorphisms --- that infers the other equations from pres1, pres+, and pres· - -module _ {R : Ring } {S : Ring ℓ'} {f : R S } where - - private - module R = RingStr (R .snd) - module S = RingStr (S .snd) - - module _ - (p1 : f R.1r S.1r) - (p+ : (x y : R ) f (x R.+ y) f x S.+ f y) - ( : (x y : R ) f (x R.· y) f x S.· f y) - where - - open IsRingHom - private - isGHom : IsGroupHom (Ring→Group R .snd) f (Ring→Group S .snd) - isGHom = makeIsGroupHom p+ - - makeIsRingHom : IsRingHom (R .snd) f (S .snd) - makeIsRingHom .pres0 = isGHom .IsGroupHom.pres1 - makeIsRingHom .pres1 = p1 - makeIsRingHom .pres+ = p+ - makeIsRingHom .pres· = - makeIsRingHom .pres- = isGHom .IsGroupHom.presinv +isSetRing R = is-set + where + open RingStr (str R) + +module _ {R : Type } {0r 1r : R} {_+_ _·_ : R R R} { -_ : R R} + (is-setR : isSet R) + (+Assoc : (x y z : R) x + (y + z) (x + y) + z) + (+IdR : (x : R) x + 0r x) + (+InvR : (x : R) x + (- x) 0r) + (+Comm : (x y : R) x + y y + x) + (·Assoc : (x y z : R) x · (y · z) (x · y) · z) + (·IdR : (x : R) x · 1r x) + (·IdL : (x : R) 1r · x x) + (·DistR+ : (x y z : R) x · (y + z) (x · y) + (x · z)) + (·DistL+ : (x y z : R) (x + y) · z (x · z) + (y · z)) + where + + makeIsRing : IsRing 0r 1r _+_ _·_ -_ + makeIsRing .IsRing.+IsAbGroup = makeIsAbGroup is-setR +Assoc +IdR +InvR +Comm + makeIsRing .IsRing.·IsMonoid = makeIsMonoid is-setR ·Assoc ·IdR ·IdL + makeIsRing .IsRing.·DistR+ = ·DistR+ + makeIsRing .IsRing.·DistL+ = ·DistL+ + +module _ {R : Type } (0r 1r : R) (_+_ _·_ : R R R) (-_ : R R) + (is-setR : isSet R) + (+Assoc : (x y z : R) x + (y + z) (x + y) + z) + (+IdR : (x : R) x + 0r x) + (+InvR : (x : R) x + (- x) 0r) + (+Comm : (x y : R) x + y y + x) + (·Assoc : (x y z : R) x · (y · z) (x · y) · z) + (·IdR : (x : R) x · 1r x) + (·IdL : (x : R) 1r · x x) + (·DistR+ : (x y z : R) x · (y + z) (x · y) + (x · z)) + (·DistL+ : (x y z : R) (x + y) · z (x · z) + (y · z)) + where + + makeRing : Ring + makeRing .fst = R + makeRing .snd .RingStr.0r = 0r + makeRing .snd .RingStr.1r = 1r + makeRing .snd .RingStr._+_ = _+_ + makeRing .snd .RingStr._·_ = _·_ + makeRing .snd .RingStr.-_ = -_ + makeRing .snd .RingStr.isRing = + makeIsRing is-setR +Assoc +IdR +InvR +Comm + ·Assoc ·IdR ·IdL ·DistR+ ·DistL+ + +record IsRingHom {A : Type } {B : Type ℓ'} (R : RingStr A) (f : A B) (S : RingStr B) + : Type (ℓ-max ℓ') + where + + -- Shorter qualified names + private + module R = RingStr R + module S = RingStr S + + field + pres0 : f R.0r S.0r + pres1 : f R.1r S.1r + pres+ : (x y : A) f (x R.+ y) f x S.+ f y + pres· : (x y : A) f (x R.· y) f x S.· f y + pres- : (x : A) f (R.- x) S.- (f x) + +unquoteDecl IsRingHomIsoΣ = declareRecordIsoΣ IsRingHomIsoΣ (quote IsRingHom) + +RingHom : (R : Ring ) (S : Ring ℓ') Type (ℓ-max ℓ') +RingHom R S = Σ[ f ( R S ) ] IsRingHom (R .snd) f (S .snd) + +IsRingEquiv : {A : Type } {B : Type ℓ'} (M : RingStr A) (e : A B) (N : RingStr B) + Type (ℓ-max ℓ') +IsRingEquiv M e N = IsRingHom M (e .fst) N + +RingEquiv : (R : Ring ) (S : Ring ℓ') Type (ℓ-max ℓ') +RingEquiv R S = Σ[ e ( R S ) ] IsRingEquiv (R .snd) e (S .snd) + +_$r_ : {R : Ring } {S : Ring ℓ'} (φ : RingHom R S) (x : R ) S +φ $r x = φ .fst x + +RingEquiv→RingHom : {A B : Ring } RingEquiv A B RingHom A B +RingEquiv→RingHom (e , eIsHom) = e .fst , eIsHom + +RingHomIsEquiv→RingEquiv : {A B : Ring } (f : RingHom A B) + isEquiv (fst f) RingEquiv A B +fst (fst (RingHomIsEquiv→RingEquiv f fIsEquiv)) = fst f +snd (fst (RingHomIsEquiv→RingEquiv f fIsEquiv)) = fIsEquiv +snd (RingHomIsEquiv→RingEquiv f fIsEquiv) = snd f + +isPropIsRing : {R : Type } (0r 1r : R) (_+_ _·_ : R R R) (-_ : R R) + isProp (IsRing 0r 1r _+_ _·_ -_) +isPropIsRing 0r 1r _+_ _·_ -_ = + isOfHLevelRetractFromIso 1 IsRingIsoΣ + (isPropΣ (isPropIsAbGroup 0r _+_ (-_)) λ abgrp + isProp× (isPropIsMonoid 1r _·_) + (isProp× (isPropΠ3 λ _ _ _ abgrp .is-set _ _) + (isPropΠ3 λ _ _ _ abgrp .is-set _ _))) + where + open IsAbGroup + +isPropIsRingHom : {A : Type } {B : Type ℓ'} (R : RingStr A) (f : A B) (S : RingStr B) + isProp (IsRingHom R f S) +isPropIsRingHom R f S = isOfHLevelRetractFromIso 1 IsRingHomIsoΣ + (isProp×4 (isSetRing (_ , S) _ _) + (isSetRing (_ , S) _ _) + (isPropΠ2 λ _ _ isSetRing (_ , S) _ _) + (isPropΠ2 λ _ _ isSetRing (_ , S) _ _) + (isPropΠ λ _ isSetRing (_ , S) _ _)) + +isSetRingHom : (R : Ring ) (S : Ring ℓ') isSet (RingHom R S) +isSetRingHom R S = isSetΣSndProp (isSetΠ _ isSetRing S)) f isPropIsRingHom (snd R) f (snd S)) + +isSetRingEquiv : (A : Ring ) (B : Ring ℓ') isSet (RingEquiv A B) +isSetRingEquiv A B = isSetΣSndProp (isOfHLevel≃ 2 (isSetRing A) (isSetRing B)) + e isPropIsRingHom (snd A) (fst e) (snd B)) + +RingHomPathP : (R : Ring ) (S T : Ring ℓ') (p : S T) (φ : RingHom R S) (ψ : RingHom R T) + PathP i R .fst p i .fst) (φ .fst) (ψ .fst) + PathP i RingHom R (p i)) φ ψ +RingHomPathP R S T p φ ψ q = ΣPathP (q , isProp→PathP _ isPropIsRingHom _ _ _) _ _) + +RingHom≡ : {R : Ring } {S : Ring ℓ'} {φ ψ : RingHom R S} fst φ fst ψ φ ψ +RingHom≡ = Σ≡Prop λ f isPropIsRingHom _ f _ + +𝒮ᴰ-Ring : DUARel (𝒮-Univ ) RingStr +𝒮ᴰ-Ring = + 𝒮ᴰ-Record (𝒮-Univ _) IsRingEquiv + (fields: + data[ 0r null pres0 ] + data[ 1r null pres1 ] + data[ _+_ bin pres+ ] + data[ _·_ bin pres· ] + data[ -_ un pres- ] + prop[ isRing _ _ isPropIsRing _ _ _ _ _) ]) + where + open RingStr + open IsRingHom + + -- faster with some sharing + null = autoDUARel (𝒮-Univ _) A A) + un = autoDUARel (𝒮-Univ _) A A A) + bin = autoDUARel (𝒮-Univ _) A A A A) + +RingPath : (R S : Ring ) RingEquiv R S (R S) +RingPath = 𝒮ᴰ-Ring .UARel.ua + +uaRing : {A B : Ring } RingEquiv A B A B +uaRing {A = A} {B = B} = equivFun (RingPath A B) + +isGroupoidRing : isGroupoid (Ring ) +isGroupoidRing _ _ = isOfHLevelRespectEquiv 2 (RingPath _ _) (isSetRingEquiv _ _) + +open RingStr +open IsRingHom + +-- TODO: Induced structure results are temporarily inconvenient while we transition between algebra +-- representations +module _ (R : Ring ) {A : Type } + (0a 1a : A) + (add mul : A A A) + (inv : A A) + (e : R A) + (p0 : e .fst (R .snd .0r) 0a) + (p1 : e .fst (R .snd .1r) 1a) + (p+ : x y e .fst (R .snd ._+_ x y) add (e .fst x) (e .fst y)) + ( : x y e .fst (R .snd ._·_ x y) mul (e .fst x) (e .fst y)) + (pinv : x e .fst (R .snd .-_ x) inv (e .fst x)) + where + + private + module R = RingStr (R .snd) + + BaseΣ : Type (ℓ-suc ) + BaseΣ = Σ[ B Type ] B × B × (B B B) × (B B B) × (B B) + + FamilyΣ : BaseΣ Type + FamilyΣ (B , u0 , u1 , a , m , i) = IsRing u0 u1 a m i + + inducedΣ : FamilyΣ (A , 0a , 1a , add , mul , inv) + inducedΣ = + subst FamilyΣ + (UARel.≅→≡ (autoUARel BaseΣ) (e , p0 , p1 , p+ , , pinv)) + R.isRing + + InducedRing : Ring + InducedRing .fst = A + 0r (InducedRing .snd) = 0a + 1r (InducedRing .snd) = 1a + _+_ (InducedRing .snd) = add + _·_ (InducedRing .snd) = mul + - InducedRing .snd = inv + isRing (InducedRing .snd) = inducedΣ + + InducedRingEquiv : RingEquiv R InducedRing + fst InducedRingEquiv = e + pres0 (snd InducedRingEquiv) = p0 + pres1 (snd InducedRingEquiv) = p1 + pres+ (snd InducedRingEquiv) = p+ + pres· (snd InducedRingEquiv) = + pres- (snd InducedRingEquiv) = pinv + + InducedRingPath : R InducedRing + InducedRingPath = RingPath _ _ .fst InducedRingEquiv + + + + +-- Rings have an abelian group and a monoid + +module _ ((A , (ringstr 0r 1r _+_ _·_ -_ R)) : Ring ) where + Ring→AbGroup : AbGroup + Ring→AbGroup .fst = A + Ring→AbGroup .snd .AbGroupStr.0g = 0r + Ring→AbGroup .snd .AbGroupStr._+_ = _+_ + Ring→AbGroup .snd .AbGroupStr.-_ = -_ + Ring→AbGroup .snd .AbGroupStr.isAbGroup = IsRing.+IsAbGroup R + + Ring→MultMonoid : Monoid + Ring→MultMonoid = monoid A 1r _·_ (IsRing.·IsMonoid R) + +Ring→Group : Ring Group +Ring→Group = AbGroup→Group Ring→AbGroup + +Ring→AddMonoid : Ring Monoid +Ring→AddMonoid = Group→Monoid Ring→Group + +-- Smart constructor for ring homomorphisms +-- that infers the other equations from pres1, pres+, and pres· + +module _ {R : Ring } {S : Ring ℓ'} {f : R S } where + + private + module R = RingStr (R .snd) + module S = RingStr (S .snd) + + module _ + (p1 : f R.1r S.1r) + (p+ : (x y : R ) f (x R.+ y) f x S.+ f y) + ( : (x y : R ) f (x R.· y) f x S.· f y) + where + + open IsRingHom + private + isGHom : IsGroupHom (Ring→Group R .snd) f (Ring→Group S .snd) + isGHom = makeIsGroupHom p+ + + makeIsRingHom : IsRingHom (R .snd) f (S .snd) + makeIsRingHom .pres0 = isGHom .IsGroupHom.pres1 + makeIsRingHom .pres1 = p1 + makeIsRingHom .pres+ = p+ + makeIsRingHom .pres· = + makeIsRingHom .pres- = isGHom .IsGroupHom.presinv \ No newline at end of file diff --git a/Cubical.Algebra.Ring.BigOps.html b/Cubical.Algebra.Ring.BigOps.html index 3405fabfd3..f4655721ae 100644 --- a/Cubical.Algebra.Ring.BigOps.html +++ b/Cubical.Algebra.Ring.BigOps.html @@ -35,7 +35,7 @@ private R = fst R' open RingStr (snd R') - open MonoidBigOp (Ring→AddMonoid R') + open MonoidBigOp (Ring→AddMonoid R') open RingTheory R' open KroneckerDelta R' @@ -91,10 +91,10 @@ module SumMap (Ar@(A , Astr) : Ring ) (Br@(B , Bstr) : Ring ℓ') - (f'@(f , fstr) : RingHom Ar Br) + (f'@(f , fstr) : RingHom Ar Br) where - open IsRingHom fstr + open IsRingHom fstr open RingStr Astr using () renaming @@ -105,9 +105,9 @@ ( _+_ to _+B_ ) ∑Map : {n : } (V : FinVec A n) f (Sum.∑ Ar V) Sum.∑ Br k f (V k)) - ∑Map {n = zero} V = pres0 + ∑Map {n = zero} V = pres0 ∑Map {n = suc n} V = - f ((V zero) +A helper) ≡⟨ pres+ (V zero) helper + f ((V zero) +A helper) ≡⟨ pres+ (V zero) helper ((f (V zero)) +B (f helper)) ≡⟨ cong X f (V zero) +B X) (∑Map k (V suc) k)) Sum.∑ Br k f (V k)) where @@ -120,7 +120,7 @@ R = fst R' open RingStr (snd R') open RingTheory R' - open MonoidBigOp (Ring→MultMonoid R') + open MonoidBigOp (Ring→MultMonoid R') = bigOp ∏Ext = bigOpExt diff --git a/Cubical.Algebra.Ring.DirectProd.html b/Cubical.Algebra.Ring.DirectProd.html index 381b242e33..16cce51f1d 100644 --- a/Cubical.Algebra.Ring.DirectProd.html +++ b/Cubical.Algebra.Ring.DirectProd.html @@ -66,7 +66,7 @@ (snd DirectProd-Ring RingStr.· (a , b)) (a' , b') = (a ·A a') , (b ·B b') (RingStr.- snd DirectProd-Ring) (a , b) = (-A a) , (-B b) RingStr.isRing (snd DirectProd-Ring) = - makeIsRing (isSet× isSetA isSetB) + makeIsRing (isSet× isSetA isSetB) x y z i +AAssoc (fst x) (fst y) (fst z) i , +BAssoc (snd x) (snd y) (snd z) i) x i (+AIdR (fst x) i) , (+BIdR (snd x) i)) x i (+AInvR (fst x) i) , +BInvR (snd x) i) @@ -85,7 +85,7 @@ where open Iso - open IsRingHom + open IsRingHom open RingStr _+X×X'_ : X × X' X × X' X × X' @@ -100,20 +100,20 @@ _·Y×Y'_ : Y × Y' Y × Y' Y × Y' _·Y×Y'_ = _·_ (snd (DirectProd-Ring Yr Y'r)) - re×re' : (re : RingEquiv Xr Yr) (re' : RingEquiv X'r Y'r) (X × X') (Y × Y') + re×re' : (re : RingEquiv Xr Yr) (re' : RingEquiv X'r Y'r) (X × X') (Y × Y') re×re' re re' = ≃-× (fst re) (fst re') - Coproduct-Equiv-12 : (re : RingEquiv Xr Yr) (re' : RingEquiv X'r Y'r) - RingEquiv (DirectProd-Ring Xr X'r) (DirectProd-Ring Yr Y'r) + Coproduct-Equiv-12 : (re : RingEquiv Xr Yr) (re' : RingEquiv X'r Y'r) + RingEquiv (DirectProd-Ring Xr X'r) (DirectProd-Ring Yr Y'r) fst (Coproduct-Equiv-12 re re') = re×re' re re' - snd (Coproduct-Equiv-12 re re') = makeIsRingHom fun-pres1 fun-pres+ fun-pres· + snd (Coproduct-Equiv-12 re re') = makeIsRingHom fun-pres1 fun-pres+ fun-pres· where fun-pres1 : (fst (re×re' re re')) (1r Xstr , 1r X'str) (1r (Yr .snd) , 1r (Y'r .snd)) - fun-pres1 = ≡-× (pres1 (snd re)) (pres1 (snd re')) + fun-pres1 = ≡-× (pres1 (snd re)) (pres1 (snd re')) fun-pres+ : (x1 x2 : X × X') (fst (re×re' re re')) (x1 +X×X' x2) (( (fst (re×re' re re')) x1) +Y×Y' ( (fst (re×re' re re')) x2)) - fun-pres+ (x1 , x'1) (x2 , x'2) = ≡-× (pres+ (snd re) x1 x2) (pres+ (snd re') x'1 x'2) + fun-pres+ (x1 , x'1) (x2 , x'2) = ≡-× (pres+ (snd re) x1 x2) (pres+ (snd re') x'1 x'2) fun-pres· : (x1 x2 : X × X') (fst (re×re' re re')) (x1 ·X×X' x2) (( (fst (re×re' re re')) x1) ·Y×Y' ( (fst (re×re' re re')) x2)) - fun-pres· (x1 , x'1) (x2 , x'2) = ≡-× (pres· (snd re) x1 x2) (pres· (snd re') x'1 x'2) + fun-pres· (x1 , x'1) (x2 , x'2) = ≡-× (pres· (snd re) x1 x2) (pres· (snd re') x'1 x'2) \ No newline at end of file diff --git a/Cubical.Algebra.Ring.Ideal.SurjectiveImage.html b/Cubical.Algebra.Ring.Ideal.SurjectiveImage.html index 6b814d8d75..9969f8b505 100644 --- a/Cubical.Algebra.Ring.Ideal.SurjectiveImage.html +++ b/Cubical.Algebra.Ring.Ideal.SurjectiveImage.html @@ -26,21 +26,21 @@ variable : Level -module _ {R S : Ring } (f : RingHom R S) (f-epi : isSurjection (fst f)) (I : IdealsIn R) where +module _ {R S : Ring } (f : RingHom R S) (f-epi : isSurjection (fst f)) (I : IdealsIn R) where open isIdeal - open IsRingHom (snd f) + open IsRingHom (snd f) open RingStr ⦃...⦄ private instance _ = snd R _ = snd S imageIdeal : IdealsIn S fst imageIdeal = SubsetImage (fst f) (fst I) - (snd imageIdeal) .0r-closed = 0r , 0r-closed (snd I) , pres0 ∣₁ + (snd imageIdeal) .0r-closed = 0r , 0r-closed (snd I) , pres0 ∣₁ (snd imageIdeal) .+-closed = rec2 isPropPropTrunc λ (x , (x∈I , fx≡-)) (y , (y∈I , fy≡-)) (x + y) , (+-closed (snd I) x∈I y∈I , - (fst f (x + y) ≡⟨ pres+ _ _ + (fst f (x + y) ≡⟨ pres+ _ _ fst f x + fst f y ≡[ i ]⟨ fx≡- i + fy≡- i _ + _ )) ∣₁ @@ -48,7 +48,7 @@ rec isPropPropTrunc λ (x , (x∈I , fx≡-)) (- x) , (-closed (snd I) x∈I , - (fst f (- x) ≡⟨ pres- _ + (fst f (- x) ≡⟨ pres- _ - fst f x ≡[ i ]⟨ - fx≡- i (- _) )) ∣₁ @@ -58,7 +58,7 @@ rec isPropPropTrunc λ (x , (x∈I , fx≡-)) (s · x) , (·-closedLeft (snd I) s x∈I) , - (fst f (s · x) ≡⟨ pres· s x + (fst f (s · x) ≡⟨ pres· s x fst f s · fst f x ≡[ i ]⟨ fs≡r i · fx≡- i (r · _) ) ∣₁) (f-epi r) @@ -69,7 +69,7 @@ rec isPropPropTrunc λ (x , (x∈I , fx≡-)) (x · s) , (·-closedRight (snd I) s x∈I) , - (fst f (x · s) ≡⟨ pres· x s + (fst f (x · s) ≡⟨ pres· x s fst f x · fst f s ≡[ i ]⟨ fx≡- i · fs≡r i (_ · r) ) ∣₁) (f-epi r) diff --git a/Cubical.Algebra.Ring.Kernel.html b/Cubical.Algebra.Ring.Kernel.html index 2e990b42de..3415ff24ed 100644 --- a/Cubical.Algebra.Ring.Kernel.html +++ b/Cubical.Algebra.Ring.Kernel.html @@ -16,8 +16,8 @@ variable : Level -module _ {R S : Ring } (f′ : RingHom R S) where - open IsRingHom (f′ .snd) +module _ {R S : Ring } (f′ : RingHom R S) where + open IsRingHom (f′ .snd) open RingStr ⦃...⦄ open isIdeal open RingTheory @@ -34,24 +34,24 @@ kernelIsIdeal : isIdeal R kernel +-closed kernelIsIdeal = - λ fx≡0 fy≡0 f (_ + _) ≡⟨ pres+ _ _ + λ fx≡0 fy≡0 f (_ + _) ≡⟨ pres+ _ _ f _ + f _ ≡⟨ cong u u + f _) fx≡0 0r + f _ ≡⟨ cong u 0r + u) fy≡0 0r + 0r ≡⟨ 0Idempotent S 0r -closed kernelIsIdeal = - λ fx≡0 f (- _) ≡⟨ pres- _ + λ fx≡0 f (- _) ≡⟨ pres- _ - f _ ≡⟨ cong -_ fx≡0 - 0r ≡⟨ 0Selfinverse S 0r - 0r-closed kernelIsIdeal = f 0r ≡⟨ pres0 0r + 0r-closed kernelIsIdeal = f 0r ≡⟨ pres0 0r ·-closedLeft kernelIsIdeal = λ r fx≡0 - f (r · _) ≡⟨ pres· _ _ + f (r · _) ≡⟨ pres· _ _ f r · f (_) ≡⟨ cong u f r · u) fx≡0 f r · 0r ≡⟨ 0RightAnnihilates S _ 0r ·-closedRight kernelIsIdeal = λ r fx≡0 - f (_ · r) ≡⟨ pres· _ _ + f (_ · r) ≡⟨ pres· _ _ f _ · f r ≡⟨ cong u u · f r) fx≡0 0r · f r ≡⟨ 0LeftAnnihilates S _ 0r @@ -62,8 +62,8 @@ kernelFiber : (x y : R ) f x f y x - y kernel - kernelFiber x y fx≡fy = f (x - y) ≡⟨ pres+ x (- y) - f x + f (- y) ≡[ i ]⟨ fx≡fy i + pres- y i + kernelFiber x y fx≡fy = f (x - y) ≡⟨ pres+ x (- y) + f x + f (- y) ≡[ i ]⟨ fx≡fy i + pres- y i f y - f y ≡⟨ +InvR (f y) 0r \ No newline at end of file diff --git a/Cubical.Algebra.Ring.Properties.html b/Cubical.Algebra.Ring.Properties.html index 454de04f58..fd3488a5b7 100644 --- a/Cubical.Algebra.Ring.Properties.html +++ b/Cubical.Algebra.Ring.Properties.html @@ -64,7 +64,7 @@ 0Idempotent = +IdL 0r +Idempotency→0 : (x : R) x x + x x 0r - +Idempotency→0 = let open GroupTheory (AbGroup→Group (Ring→AbGroup R')) + +Idempotency→0 = let open GroupTheory (AbGroup→Group (Ring→AbGroup R')) in idFromIdempotency -Idempotent : (x : R) -(- x) x @@ -161,67 +161,67 @@ module RingHoms where - open IsRingHom + open IsRingHom - idRingHom : (R : Ring ) RingHom R R + idRingHom : (R : Ring ) RingHom R R fst (idRingHom R) = idfun (fst R) - snd (idRingHom R) = makeIsRingHom refl _ _ refl) _ _ refl) + snd (idRingHom R) = makeIsRingHom refl _ _ refl) _ _ refl) compIsRingHom : {A : Ring } {B : Ring ℓ'} {C : Ring ℓ''} {g : B C } {f : A B } - IsRingHom (B .snd) g (C .snd) - IsRingHom (A .snd) f (B .snd) - IsRingHom (A .snd) (g f) (C .snd) - compIsRingHom {g = g} {f} gh fh .pres0 = cong g (fh .pres0) gh .pres0 - compIsRingHom {g = g} {f} gh fh .pres1 = cong g (fh .pres1) gh .pres1 - compIsRingHom {g = g} {f} gh fh .pres+ x y = cong g (fh .pres+ x y) gh .pres+ (f x) (f y) - compIsRingHom {g = g} {f} gh fh .pres· x y = cong g (fh .pres· x y) gh .pres· (f x) (f y) - compIsRingHom {g = g} {f} gh fh .pres- x = cong g (fh .pres- x) gh .pres- (f x) + IsRingHom (B .snd) g (C .snd) + IsRingHom (A .snd) f (B .snd) + IsRingHom (A .snd) (g f) (C .snd) + compIsRingHom {g = g} {f} gh fh .pres0 = cong g (fh .pres0) gh .pres0 + compIsRingHom {g = g} {f} gh fh .pres1 = cong g (fh .pres1) gh .pres1 + compIsRingHom {g = g} {f} gh fh .pres+ x y = cong g (fh .pres+ x y) gh .pres+ (f x) (f y) + compIsRingHom {g = g} {f} gh fh .pres· x y = cong g (fh .pres· x y) gh .pres· (f x) (f y) + compIsRingHom {g = g} {f} gh fh .pres- x = cong g (fh .pres- x) gh .pres- (f x) compRingHom : {R : Ring } {S : Ring ℓ'} {T : Ring ℓ''} - RingHom R S RingHom S T RingHom R T + RingHom R S RingHom S T RingHom R T fst (compRingHom f g) x = g .fst (f .fst x) snd (compRingHom f g) = compIsRingHom (g .snd) (f .snd) syntax compRingHom f g = g ∘r f - compIdRingHom : {R : Ring } {S : Ring ℓ'} (φ : RingHom R S) compRingHom (idRingHom R) φ φ - compIdRingHom φ = RingHom≡ refl + compIdRingHom : {R : Ring } {S : Ring ℓ'} (φ : RingHom R S) compRingHom (idRingHom R) φ φ + compIdRingHom φ = RingHom≡ refl - idCompRingHom : {R : Ring } {S : Ring ℓ'} (φ : RingHom R S) compRingHom φ (idRingHom S) φ - idCompRingHom φ = RingHom≡ refl + idCompRingHom : {R : Ring } {S : Ring ℓ'} (φ : RingHom R S) compRingHom φ (idRingHom S) φ + idCompRingHom φ = RingHom≡ refl compAssocRingHom : {R : Ring } {S : Ring ℓ'} {T : Ring ℓ''} {U : Ring ℓ'''} - (φ : RingHom R S) (ψ : RingHom S T) (χ : RingHom T U) + (φ : RingHom R S) (ψ : RingHom S T) (χ : RingHom T U) compRingHom (compRingHom φ ψ) χ compRingHom φ (compRingHom ψ χ) - compAssocRingHom _ _ _ = RingHom≡ refl + compAssocRingHom _ _ _ = RingHom≡ refl module RingEquivs where open RingStr - open IsRingHom + open IsRingHom open RingHoms compIsRingEquiv : {A : Ring } {B : Ring ℓ'} {C : Ring ℓ''} {g : B C } {f : A B } - IsRingEquiv (B .snd) g (C .snd) - IsRingEquiv (A .snd) f (B .snd) - IsRingEquiv (A .snd) (compEquiv f g) (C .snd) + IsRingEquiv (B .snd) g (C .snd) + IsRingEquiv (A .snd) f (B .snd) + IsRingEquiv (A .snd) (compEquiv f g) (C .snd) compIsRingEquiv {g = g} {f} gh fh = compIsRingHom {g = g .fst} {f .fst} gh fh compRingEquiv : {A : Ring } {B : Ring ℓ'} {C : Ring ℓ''} - RingEquiv A B RingEquiv B C RingEquiv A C + RingEquiv A B RingEquiv B C RingEquiv A C fst (compRingEquiv f g) = compEquiv (f .fst) (g .fst) snd (compRingEquiv f g) = compIsRingEquiv {g = g .fst} {f = f .fst} (g .snd) (f .snd) - isRingHomInv : {A : Ring } {B : Ring ℓ'} (e : RingEquiv A B) IsRingHom (snd B) (invEq (fst e)) (snd A) - isRingHomInv {A = A} {B = B} e = makeIsRingHom - ((cong g (sym (pres1 fcrh))) retEq et (1r (snd A))) + isRingHomInv : {A : Ring } {B : Ring ℓ'} (e : RingEquiv A B) IsRingHom (snd B) (invEq (fst e)) (snd A) + isRingHomInv {A = A} {B = B} e = makeIsRingHom + ((cong g (sym (pres1 fcrh))) retEq et (1r (snd A))) x y g (snd B ._+_ x y) ≡⟨ cong g (sym (cong₂ (snd B ._+_) (secEq et x) (secEq et y))) - g (snd B ._+_ (f (g x)) (f (g y))) ≡⟨ cong g (sym (pres+ fcrh (g x) (g y))) + g (snd B ._+_ (f (g x)) (f (g y))) ≡⟨ cong g (sym (pres+ fcrh (g x) (g y))) g (f (snd A ._+_ (g x) (g y))) ≡⟨ retEq et (snd A ._+_ (g x) (g y)) snd A ._+_ (g x) (g y) ) x y g (snd B ._·_ x y) ≡⟨ cong g (sym (cong₂ (snd B ._·_) (secEq et x) (secEq et y))) - g (snd B ._·_ (f (g x)) (f (g y))) ≡⟨ cong g (sym (pres· fcrh (g x) (g y))) + g (snd B ._·_ (f (g x)) (f (g y))) ≡⟨ cong g (sym (pres· fcrh (g x) (g y))) g (f (snd A ._·_ (g x) (g y))) ≡⟨ retEq et (snd A ._·_ (g x) (g y)) snd A ._·_ (g x) (g y) ) where @@ -230,18 +230,18 @@ fcrh = snd e g = invEq et - invRingEquiv : {A : Ring } {B : Ring ℓ'} RingEquiv A B RingEquiv B A + invRingEquiv : {A : Ring } {B : Ring ℓ'} RingEquiv A B RingEquiv B A fst (invRingEquiv e) = invEquiv (fst e) snd (invRingEquiv e) = isRingHomInv e - idRingEquiv : (A : Ring ) RingEquiv A A + idRingEquiv : (A : Ring ) RingEquiv A A fst (idRingEquiv A) = idEquiv (fst A) - snd (idRingEquiv A) = makeIsRingHom refl _ _ refl) _ _ refl) + snd (idRingEquiv A) = makeIsRingHom refl _ _ refl) _ _ refl) -module RingHomTheory {R : Ring } {S : Ring ℓ'} (φ : RingHom R S) where +module RingHomTheory {R : Ring } {S : Ring ℓ'} (φ : RingHom R S) where open RingTheory ⦃...⦄ open RingStr ⦃...⦄ - open IsRingHom (φ .snd) + open IsRingHom (φ .snd) private instance _ = snd R @@ -253,8 +253,8 @@ ker≡0→inj ker≡0 {x} {y} p = equalByDifference _ _ (ker≡0 path) where path : f (x - y) 0r - path = f (x - y) ≡⟨ pres+ _ _ - f x + f (- y) ≡⟨ cong (f x +_) (pres- _) + path = f (x - y) ≡⟨ pres+ _ _ + f x + f (- y) ≡⟨ cong (f x +_) (pres- _) f x - f y ≡⟨ cong (_- f y) p f y - f y ≡⟨ +InvR _ 0r @@ -299,29 +299,29 @@ λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ2 λ _ _ is-set (snd B)) _ _) λ _ isPropΣ (isOfHLevelPathP' 1 (isSetΠ λ _ is-set (snd B)) _ _) - λ _ isOfHLevelPathP 1 (isPropIsRing _ _ _ _ _) _ _) + λ _ isOfHLevelPathP 1 (isPropIsRing _ _ _ _ _) _ _) (transportRefl (cong ⟨_⟩ p) P sym (transportRefl (cong ⟨_⟩ q))) - uaCompRingEquiv : {A B C : Ring } (f : RingEquiv A B) (g : RingEquiv B C) - uaRing (compRingEquiv f g) uaRing f uaRing g + uaCompRingEquiv : {A B C : Ring } (f : RingEquiv A B) (g : RingEquiv B C) + uaRing (compRingEquiv f g) uaRing f uaRing g uaCompRingEquiv f g = caracRing≡ _ _ ( - cong ⟨_⟩ (uaRing (compRingEquiv f g)) + cong ⟨_⟩ (uaRing (compRingEquiv f g)) ≡⟨ uaCompEquiv _ _ - cong ⟨_⟩ (uaRing f) cong ⟨_⟩ (uaRing g) - ≡⟨ sym (cong-∙ ⟨_⟩ (uaRing f) (uaRing g)) - cong ⟨_⟩ (uaRing f uaRing g) ) + cong ⟨_⟩ (uaRing f) cong ⟨_⟩ (uaRing g) + ≡⟨ sym (cong-∙ ⟨_⟩ (uaRing f) (uaRing g)) + cong ⟨_⟩ (uaRing f uaRing g) ) open RingEquivs open RingUAFunctoriality recPT→Ring : {A : Type ℓ'} (𝓕 : A Ring ) - (σ : x y RingEquiv (𝓕 x) (𝓕 y)) + (σ : x y RingEquiv (𝓕 x) (𝓕 y)) (∀ x y z σ x z compRingEquiv (σ x y) (σ y z)) ------------------------------------------------------ A ∥₁ Ring -recPT→Ring 𝓕 σ compCoh = rec→Gpd isGroupoidRing 𝓕 - (3-ConstantCompChar 𝓕 x y uaRing (σ x y)) - λ x y z sym ( cong uaRing (compCoh x y z) +recPT→Ring 𝓕 σ compCoh = rec→Gpd isGroupoidRing 𝓕 + (3-ConstantCompChar 𝓕 x y uaRing (σ x y)) + λ x y z sym ( cong uaRing (compCoh x y z) uaCompRingEquiv (σ x y) (σ y z))) \ No newline at end of file diff --git a/Cubical.Algebra.Ring.Quotient.html b/Cubical.Algebra.Ring.Quotient.html index 952042af9d..ca9b544450 100644 --- a/Cubical.Algebra.Ring.Quotient.html +++ b/Cubical.Algebra.Ring.Quotient.html @@ -187,7 +187,7 @@ eq x y z i = [ ·DistR+ x y z i ] asRing : Ring - asRing = makeRing 0/I 1/I _+/I_ _·/I_ -/I isSetR/I + asRing = makeRing 0/I 1/I _+/I_ _·/I_ -/I isSetR/I +/I-assoc +/I-rid +/I-rinv +/I-comm ·/I-assoc ·/I-rid ·/I-lid /I-rdist /I-ldist @@ -197,13 +197,13 @@ [_]/I : {R : Ring } {I : IdealsIn R} (a : R ) R / I [ a ]/I = [ a ] -quotientHom : (R : Ring ) (I : IdealsIn R) RingHom R (R / I) +quotientHom : (R : Ring ) (I : IdealsIn R) RingHom R (R / I) fst (quotientHom R I) = [_] -IsRingHom.pres0 (snd (quotientHom R I)) = refl -IsRingHom.pres1 (snd (quotientHom R I)) = refl -IsRingHom.pres+ (snd (quotientHom R I)) _ _ = refl -IsRingHom.pres· (snd (quotientHom R I)) _ _ = refl -IsRingHom.pres- (snd (quotientHom R I)) _ = refl +IsRingHom.pres0 (snd (quotientHom R I)) = refl +IsRingHom.pres1 (snd (quotientHom R I)) = refl +IsRingHom.pres+ (snd (quotientHom R I)) _ _ = refl +IsRingHom.pres· (snd (quotientHom R I)) _ _ = refl +IsRingHom.pres- (snd (quotientHom R I)) _ = refl quotientHomSurjective : (R : Ring ) (I : IdealsIn R) isSurjection (fst (quotientHom R I)) @@ -218,46 +218,46 @@ instance _ = snd R - module _ {S : Ring ℓ'} (φ : RingHom R S) where - open IsRingHom + module _ {S : Ring ℓ'} (φ : RingHom R S) where + open IsRingHom open RingHomTheory φ private instance _ = snd S f = fst φ - module φ = IsRingHom (snd φ) + module φ = IsRingHom (snd φ) {- We do not use the kernel ideal, since it is *not* an ideal in R, if S is from a different universe. Instead, the condition, that Iₛ is contained in the kernel of φ is rephrased explicitly. -} - inducedHom : ((x : R ) x Iₛ φ $r x 0r) RingHom (R / I) S + inducedHom : ((x : R ) x Iₛ φ $r x 0r) RingHom (R / I) S fst (inducedHom Iₛ⊆kernel) = elim _ isSetRing S) f λ r₁ r₂ r₁-r₂∈I equalByDifference (f r₁) (f r₂) - (f r₁ - f r₂ ≡⟨ cong u f r₁ + u) (sym (φ.pres- _)) - f r₁ + f (- r₂) ≡⟨ sym (φ.pres+ _ _) + (f r₁ - f r₂ ≡⟨ cong u f r₁ + u) (sym (φ.pres- _)) + f r₁ + f (- r₂) ≡⟨ sym (φ.pres+ _ _) f (r₁ - r₂) ≡⟨ Iₛ⊆kernel (r₁ - r₂) r₁-r₂∈I 0r ) - pres0 (snd (inducedHom Iₛ⊆kernel)) = φ.pres0 - pres1 (snd (inducedHom Iₛ⊆kernel)) = φ.pres1 - pres+ (snd (inducedHom Iₛ⊆kernel)) = - elimProp2 _ _ isSetRing S _ _) φ.pres+ - pres· (snd (inducedHom Iₛ⊆kernel)) = - elimProp2 _ _ isSetRing S _ _) φ.pres· - pres- (snd (inducedHom Iₛ⊆kernel)) = - elimProp _ isSetRing S _ _) φ.pres- - - solution : (p : ((x : R ) x Iₛ φ $r x 0r)) - (x : R ) inducedHom p $r [ x ] φ $r x + pres0 (snd (inducedHom Iₛ⊆kernel)) = φ.pres0 + pres1 (snd (inducedHom Iₛ⊆kernel)) = φ.pres1 + pres+ (snd (inducedHom Iₛ⊆kernel)) = + elimProp2 _ _ isSetRing S _ _) φ.pres+ + pres· (snd (inducedHom Iₛ⊆kernel)) = + elimProp2 _ _ isSetRing S _ _) φ.pres· + pres- (snd (inducedHom Iₛ⊆kernel)) = + elimProp _ isSetRing S _ _) φ.pres- + + solution : (p : ((x : R ) x Iₛ φ $r x 0r)) + (x : R ) inducedHom p $r [ x ] φ $r x solution p x = refl - unique : (p : ((x : R ) x Iₛ φ $r x 0r)) - (ψ : RingHom (R / I) S) (ψIsSolution : (x : R ) ψ $r [ x ] φ $r x) - (x : R ) ψ $r [ x ] inducedHom p $r [ x ] + unique : (p : ((x : R ) x Iₛ φ $r x 0r)) + (ψ : RingHom (R / I) S) (ψIsSolution : (x : R ) ψ $r [ x ] φ $r x) + (x : R ) ψ $r [ x ] inducedHom p $r [ x ] unique p ψ ψIsSolution x = ψIsSolution x {- diff --git a/Cubical.Algebra.Semilattice.Base.html b/Cubical.Algebra.Semilattice.Base.html index 7c2ad98946..8a7867a69c 100644 --- a/Cubical.Algebra.Semilattice.Base.html +++ b/Cubical.Algebra.Semilattice.Base.html @@ -123,7 +123,7 @@ isPropIsSemilattice : {L : Type } (ε : L) (_·_ : L L L) isProp (IsSemilattice ε _·_) isPropIsSemilattice ε _·_ (issemilattice LL LC) (issemilattice SL SC) = - λ i issemilattice (isPropIsCommMonoid _ _ LL SL i) (isPropIdem LC SC i) + λ i issemilattice (isPropIsCommMonoid _ _ LL SL i) (isPropIdem LC SC i) where isSetL : isSet _ isSetL = LL .IsCommMonoid.isMonoid .IsMonoid.isSemigroup .IsSemigroup.is-set @@ -150,7 +150,7 @@ module JoinSemilattice (L' : Semilattice ) where private L = fst L' open SemilatticeStr (snd L') renaming (_·_ to _∨l_ ; ε to 0l) - open CommMonoidTheory (Semilattice→CommMonoid L') + open CommMonoidTheory (Semilattice→CommMonoid L') open MonoidBigOp (Semilattice→Monoid L') _≤_ : L L Type @@ -176,18 +176,18 @@ λ _ _ a∨b≡b b∨a≡a sym b∨a≡a ∙∙ ·Comm _ _ ∙∙ a∨b≡b ∨lIsMax : x y z x z y z x ∨l y z - ∨lIsMax x y z x≤z y≤z = cong ((x ∨l y) ∨l_) (sym (idem z)) commAssocSwap x y z z + ∨lIsMax x y z x≤z y≤z = cong ((x ∨l y) ∨l_) (sym (idem z)) commAssocSwap x y z z cong₂ (_∨l_) x≤z y≤z idem z ∨≤LCancel : x y y x ∨l y - ∨≤LCancel x y = commAssocl y x y cong (x ∨l_) (idem y) + ∨≤LCancel x y = commAssocl y x y cong (x ∨l_) (idem y) ∨≤RCancel : x y x x ∨l y ∨≤RCancel x y = ·Assoc _ _ _ cong (_∨l y) (idem x) ≤-∨Pres : x y u w x y u w x ∨l u y ∨l w - ≤-∨Pres x y u w x≤y u≤w = commAssocSwap x u y w cong₂ (_∨l_) x≤y u≤w + ≤-∨Pres x y u w x≤y u≤w = commAssocSwap x u y w cong₂ (_∨l_) x≤y u≤w ≤-∨LPres : x y z x y z ∨l x z ∨l y ≤-∨LPres x y z x≤y = ≤-∨Pres _ _ _ _ (idem z) x≤y @@ -220,7 +220,7 @@ module MeetSemilattice (L' : Semilattice ) where private L = fst L' open SemilatticeStr (snd L') renaming (_·_ to _∧l_ ; ε to 1l) - open CommMonoidTheory (Semilattice→CommMonoid L') + open CommMonoidTheory (Semilattice→CommMonoid L') _≤_ : L L Type x y = x ∧l y x @@ -245,22 +245,22 @@ λ _ _ a∧b≡a b∧a≡b sym a∧b≡a ∙∙ ·Comm _ _ ∙∙ b∧a≡b ≤-∧LPres : x y z x y z ∧l x z ∧l y - ≤-∧LPres x y z x≤y = commAssocSwap z x z y ∙∙ cong (_∧l (x ∧l y)) (idem z) ∙∙ cong (z ∧l_) x≤y + ≤-∧LPres x y z x≤y = commAssocSwap z x z y ∙∙ cong (_∧l (x ∧l y)) (idem z) ∙∙ cong (z ∧l_) x≤y ≤-∧RPres : x y z x y x ∧l z y ∧l z - ≤-∧RPres x y z x≤y = commAssocSwap x z y z ∙∙ cong (x ∧l y ∧l_) (idem z) ∙∙ cong (_∧l z) x≤y + ≤-∧RPres x y z x≤y = commAssocSwap x z y z ∙∙ cong (x ∧l y ∧l_) (idem z) ∙∙ cong (_∧l z) x≤y ≤-∧Pres : x y z w x y z w x ∧l z y ∧l w - ≤-∧Pres x y z w x≤y z≤w = commAssocSwap x z y w cong₂ _∧l_ x≤y z≤w + ≤-∧Pres x y z w x≤y z≤w = commAssocSwap x z y w cong₂ _∧l_ x≤y z≤w ∧≤LCancel : x y x ∧l y y ∧≤LCancel x y = sym (·Assoc _ _ _) cong (x ∧l_) (idem y) ∧≤RCancel : x y x ∧l y x - ∧≤RCancel x y = commAssocr x y x cong (_∧l y) (idem x) + ∧≤RCancel x y = commAssocr x y x cong (_∧l y) (idem x) ∧lIsMin : x y z z x z y z x ∧l y - ∧lIsMin x y z z≤x z≤y = cong (_∧l (x ∧l y)) (sym (idem z)) commAssocSwap z z x y + ∧lIsMin x y z z≤x z≤y = cong (_∧l (x ∧l y)) (sym (idem z)) commAssocSwap z z x y cong₂ (_∧l_) z≤x z≤y idem z \ No newline at end of file diff --git a/Cubical.Algebra.SymmetricGroup.html b/Cubical.Algebra.SymmetricGroup.html index 60059e92f3..de694c1653 100644 --- a/Cubical.Algebra.SymmetricGroup.html +++ b/Cubical.Algebra.SymmetricGroup.html @@ -18,7 +18,7 @@ : Level Symmetric-Group : (X : Type ) isSet X Group -Symmetric-Group X isSetX = makeGroup (idEquiv X) compEquiv invEquiv (isOfHLevel≃ 2 isSetX isSetX) +Symmetric-Group X isSetX = makeGroup (idEquiv X) compEquiv invEquiv (isOfHLevel≃ 2 isSetX isSetX) compEquiv-assoc compEquivEquivId compEquivIdEquiv invEquiv-is-rinv invEquiv-is-linv -- Finite symmetrics groups diff --git a/Cubical.Algebra.ZariskiLattice.Base.html b/Cubical.Algebra.ZariskiLattice.Base.html index f639c21040..5d43884f66 100644 --- a/Cubical.Algebra.ZariskiLattice.Base.html +++ b/Cubical.Algebra.ZariskiLattice.Base.html @@ -217,6 +217,6 @@ DistLatticeStr._∨l_ (snd ZariskiLattice) = _∨z_ DistLatticeStr._∧l_ (snd ZariskiLattice) = _∧z_ DistLatticeStr.isDistLattice (snd ZariskiLattice) = - makeIsDistLattice∧lOver∨l squash/ ∨zAssoc ∨zRid ∨zComm + makeIsDistLattice∧lOver∨l squash/ ∨zAssoc ∨zRid ∨zComm ∧zAssoc ∧zRid ∧zComm ∧zAbsorb∨z ∧zLDist∨z \ No newline at end of file diff --git a/Cubical.Algebra.ZariskiLattice.StructureSheaf.html b/Cubical.Algebra.ZariskiLattice.StructureSheaf.html index 671c6844a5..6fd316b1e7 100644 --- a/Cubical.Algebra.ZariskiLattice.StructureSheaf.html +++ b/Cubical.Algebra.ZariskiLattice.StructureSheaf.html @@ -95,7 +95,7 @@ open IsZarMap open Join ZariskiLattice - open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice ZariskiLattice)) + open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice ZariskiLattice)) open IsBasis private @@ -127,7 +127,7 @@ contrHoms : (f g : R) D f D g - isContr (CommAlgebraHom R[1/ g ]AsCommAlgebra R[1/ f ]AsCommAlgebra) + isContr (CommAlgebraHom R[1/ g ]AsCommAlgebra R[1/ f ]AsCommAlgebra) contrHoms f g Df≤Dg = R[1/g]HasAlgUniversalProp R[1/ f ]AsCommAlgebra λ s s∈[gⁿ|n≥0] subst-∈ₚ (R[1/ f ]AsCommRing ˣ) (sym (·IdR (s /1))) --can't apply the lemma directly as we get mult with 1 somewhere @@ -159,7 +159,7 @@ 𝓕 : Σ ZL P CommAlgebra R' _ 𝓕 (_ , f , _) = R[1/ f ]AsCommAlgebra -- D(f) ↦ R[1/f] - uniqueHom : (x y : Σ ZL P) (fst x) (fst y) isContr (CommAlgebraHom (𝓕 y) (𝓕 x)) + uniqueHom : (x y : Σ ZL P) (fst x) (fst y) isContr (CommAlgebraHom (𝓕 y) (𝓕 x)) uniqueHom (𝔞 , f , p) (𝔟 , g , q) 𝔞≤𝔟 = contrHoms f g Df≤Dg where Df≤Dg : D f D g @@ -300,7 +300,7 @@ where open Units R[1/ h ]AsCommRing open Sum (CommRing→Ring R[1/ h ]AsCommRing) - open IsRingHom (snd /1AsCommRingHom) + open IsRingHom (snd /1AsCommRingHom) open SumMap _ _ /1AsCommRingHom instance h⁻ᵐ : (h ^ m) /1 ∈ₚ (R[1/ h ]AsCommRing ˣ) @@ -319,7 +319,7 @@ (linearCombination R' α f) /1 ≡⟨ ∑Map i α i · f i) i (α i · f i) /1) - ≡⟨ ∑Ext i pres· (α i) (f i)) + ≡⟨ ∑Ext i pres· (α i) (f i)) i α i /1 · f i /1) path : 1r i β i · f/1 i) @@ -349,7 +349,7 @@ -- R[1/h][(fᵢfⱼ)/1/1] =/= R[1/h][(fᵢ/1 · fⱼ/1)/1] -- definitionally open Cone - open IsRingHom + open IsRingHom module D i = DoubleLoc R' h (f i) @@ -357,9 +357,9 @@ coneOut /1/1Cone (sing i) = D./1/1AsCommRingHom i fst (coneOut /1/1Cone (pair i j i<j)) r = [ [ r , 1r , 0 , refl ∣₁ ] , 1r , 0 , refl ∣₁ ] - pres0 (snd (coneOut /1/1Cone (pair i j i<j))) = refl - pres1 (snd (coneOut /1/1Cone (pair i j i<j))) = refl - pres+ (snd (coneOut /1/1Cone (pair i j i<j))) x y = + pres0 (snd (coneOut /1/1Cone (pair i j i<j))) = refl + pres1 (snd (coneOut /1/1Cone (pair i j i<j))) = refl + pres+ (snd (coneOut /1/1Cone (pair i j i<j))) x y = cong [_] (≡-× (cong [_] (≡-× (cong₂ _+_ (useSolver x) (useSolver y)) (Σ≡Prop _ isPropPropTrunc) (useSolver 1r)))) @@ -367,17 +367,17 @@ where useSolver : a a a · 1r · (1r · 1r) useSolver = solve R' - pres· (snd (coneOut /1/1Cone (pair i j i<j))) x y = + pres· (snd (coneOut /1/1Cone (pair i j i<j))) x y = cong [_] (≡-× (cong [_] (≡-× refl (Σ≡Prop _ isPropPropTrunc) (sym (·IdR 1r))))) (Σ≡Prop _ isPropPropTrunc) (sym (·IdR 1r)))) - pres- (snd (coneOut /1/1Cone (pair i j i<j))) _ = refl + pres- (snd (coneOut /1/1Cone (pair i j i<j))) _ = refl coneOutCommutes /1/1Cone idAr = idCompCommRingHom _ - coneOutCommutes /1/1Cone singPairL = RingHom≡ (funExt + coneOutCommutes /1/1Cone singPairL = RingHom≡ (funExt x cong [_] (≡-× (cong [_] (≡-× (cong (x ·_) (transportRefl 1r) ·IdR x) (Σ≡Prop _ isPropPropTrunc) (cong (1r ·_) (transportRefl 1r) ·IdR 1r)))) (Σ≡Prop _ isPropPropTrunc) (cong (1r ·_) (transportRefl 1r) ·IdR 1r))))) - coneOutCommutes /1/1Cone singPairR = RingHom≡ (funExt + coneOutCommutes /1/1Cone singPairR = RingHom≡ (funExt x cong [_] (≡-× (cong [_] (≡-× (cong (x ·_) (transportRefl 1r) ·IdR x) (Σ≡Prop _ isPropPropTrunc) (cong (1r ·_) (transportRefl 1r) ·IdR 1r)))) (Σ≡Prop _ isPropPropTrunc) (cong (1r ·_) (transportRefl 1r) ·IdR 1r))))) @@ -388,7 +388,7 @@ -- get the desired cone in algebras: isConeMor/1 : isConeMor /1/1Cone doubleLocCone /1AsCommRingHom isConeMor/1 = isConeMorSingLemma /1/1Cone doubleLocCone - _ RingHom≡ (funExt _ refl))) + _ RingHom≡ (funExt _ refl))) doubleLocAlgCone = algCone /1AsCommRingHom isConeMor/1 isLimConeDoubleLocAlgCone : isLimCone _ _ doubleLocAlgCone @@ -417,14 +417,14 @@ path = cong toCommAlg (ΣPathP (p , q)) where eqInR[1/h] : (f i /1) · (f j /1) (f i · f j) /1 - eqInR[1/h] = sym (/1AsCommRingHom .snd .pres· (f i) (f j)) + eqInR[1/h] = sym (/1AsCommRingHom .snd .pres· (f i) (f j)) p : F-ob doubleLocDiag (pair i j i<j) R[1/h][1/fᵢfⱼ]AsCommRingReg p i = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing (eqInR[1/h] i) q : PathP i CommRingHom R' (p i)) (coneOut /1/1Cone (pair i j i<j)) (/1/1AsCommRingHom (f i · f j)) - q = toPathP (RingHom≡ (funExt ( + q = toPathP (RingHom≡ (funExt ( λ r cong [_] (≡-× (cong [_] (≡-× (transportRefl _ transportRefl r) (Σ≡Prop _ isPropPropTrunc) (transportRefl 1r)))) (Σ≡Prop _ isPropPropTrunc) (transportRefl 1r)))))) diff --git a/Cubical.Algebra.ZariskiLattice.StructureSheafPullback.html b/Cubical.Algebra.ZariskiLattice.StructureSheafPullback.html index 184fd07133..13a1400a4c 100644 --- a/Cubical.Algebra.ZariskiLattice.StructureSheafPullback.html +++ b/Cubical.Algebra.ZariskiLattice.StructureSheafPullback.html @@ -96,7 +96,7 @@ open IsZarMap open Join ZariskiLattice - open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice ZariskiLattice)) + open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice ZariskiLattice)) open IsBasis private @@ -142,13 +142,13 @@ 𝓕 : Σ ZL P CommAlgebra R' _ 𝓕 (_ , f , _) = R[1/ f ]AsCommAlgebra -- D(f) ↦ R[1/f] - uniqueHom : (x y : Σ ZL P) (fst x) (fst y) isContr (CommAlgebraHom (𝓕 y) (𝓕 x)) + uniqueHom : (x y : Σ ZL P) (fst x) (fst y) isContr (CommAlgebraHom (𝓕 y) (𝓕 x)) uniqueHom (𝔞 , f , p) (𝔟 , g , q) = contrHoms 𝔞 𝔟 f g p q where open InvertingElementsBase R' contrHoms : (𝔞 𝔟 : ZL) (f g : R) (p : D f 𝔞) (q : D g 𝔟) - 𝔞 𝔟 isContr (CommAlgebraHom R[1/ g ]AsCommAlgebra R[1/ f ]AsCommAlgebra) + 𝔞 𝔟 isContr (CommAlgebraHom R[1/ g ]AsCommAlgebra R[1/ f ]AsCommAlgebra) contrHoms 𝔞 𝔟 f g p q 𝔞≤𝔟 = R[1/g]HasAlgUniversalProp R[1/ f ]AsCommAlgebra λ s s∈[gⁿ|n≥0] subst-∈ₚ (R[1/ f ]AsCommRing ˣ) (sym (·IdR (s /1))) --can't apply the lemma directly as we get mult with 1 somewhere @@ -196,21 +196,21 @@ canonical0∈BO≡0∈BO = BasicOpens 0z .snd _ _ R[1/0]≡0 : R[1/ 0r ]AsCommAlgebra UnitCommAlgebra R' - R[1/0]≡0 = uaCommAlgebra (e , eIsRHom) + R[1/0]≡0 = uaCommAlgebra (e , eIsRHom) where open InvertingElementsBase R' using (isContrR[1/0]) - open IsAlgebraHom + open IsAlgebraHom e : R[1/ 0r ]AsCommAlgebra .fst UnitCommAlgebra R' .fst e = isContr→Equiv isContrR[1/0] isContrUnit* - eIsRHom : IsCommAlgebraEquiv (R[1/ 0r ]AsCommAlgebra .snd) e (UnitCommAlgebra R' .snd) - pres0 eIsRHom = refl - pres1 eIsRHom = refl - pres+ eIsRHom _ _ = refl - pres· eIsRHom _ _ = refl - pres- eIsRHom _ = refl - pres⋆ eIsRHom _ _ = refl + eIsRHom : IsCommAlgebraEquiv (R[1/ 0r ]AsCommAlgebra .snd) e (UnitCommAlgebra R' .snd) + pres0 eIsRHom = refl + pres1 eIsRHom = refl + pres+ eIsRHom _ _ = refl + pres· eIsRHom _ _ = refl + pres- eIsRHom _ = refl + pres⋆ eIsRHom _ _ = refl snd isSheafBasisStructurePShf (𝔞 , 𝔞∈BO) (𝔟 , 𝔟∈BO) 𝔞∨𝔟∈BO = curriedHelper 𝔞 𝔟 𝔞∈BO 𝔟∈BO 𝔞∨𝔟∈BO where @@ -366,40 +366,40 @@ R[1/h][1/fg]AsCommRing = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing ((f /1) · (g /1)) - open IsRingHom + open IsRingHom /1/1AsCommRingHomFG : CommRingHom R' R[1/h][1/fg]AsCommRing fst /1/1AsCommRingHomFG r = [ [ r , 1r , 0 , refl ∣₁ ] , 1r , 0 , refl ∣₁ ] - pres0 (snd /1/1AsCommRingHomFG) = refl - pres1 (snd /1/1AsCommRingHomFG) = refl - pres+ (snd /1/1AsCommRingHomFG) x y = cong [_] (≡-× (cong [_] (≡-× + pres0 (snd /1/1AsCommRingHomFG) = refl + pres1 (snd /1/1AsCommRingHomFG) = refl + pres+ (snd /1/1AsCommRingHomFG) x y = cong [_] (≡-× (cong [_] (≡-× (cong₂ _+_ (useSolver x) (useSolver y)) (Σ≡Prop _ isPropPropTrunc) (useSolver 1r)))) (Σ≡Prop _ isPropPropTrunc) (sym (·IdR 1r)))) where useSolver : a a a · 1r · (1r · 1r) useSolver = solve R' - pres· (snd /1/1AsCommRingHomFG) x y = cong [_] (≡-× (cong [_] (≡-× refl + pres· (snd /1/1AsCommRingHomFG) x y = cong [_] (≡-× (cong [_] (≡-× refl (Σ≡Prop _ isPropPropTrunc) (sym (·IdR 1r))))) (Σ≡Prop _ isPropPropTrunc) (sym (·IdR 1r)))) - pres- (snd /1/1AsCommRingHomFG) x = refl + pres- (snd /1/1AsCommRingHomFG) x = refl open Cospan open Pullback open RingHoms isRHomR[1/h]→R[1/h][1/f] : theRingPullback .pbPr₂ ∘r /1AsCommRingHom /1/1AsCommRingHom f - isRHomR[1/h]→R[1/h][1/f] = RingHom≡ (funExt x refl)) + isRHomR[1/h]→R[1/h][1/f] = RingHom≡ (funExt x refl)) isRHomR[1/h]→R[1/h][1/g] : theRingPullback .pbPr₁ ∘r /1AsCommRingHom /1/1AsCommRingHom g - isRHomR[1/h]→R[1/h][1/g] = RingHom≡ (funExt x refl)) + isRHomR[1/h]→R[1/h][1/g] = RingHom≡ (funExt x refl)) isRHomR[1/h][1/f]→R[1/h][1/fg] : theRingCospan .s₂ ∘r /1/1AsCommRingHom f /1/1AsCommRingHomFG - isRHomR[1/h][1/f]→R[1/h][1/fg] = RingHom≡ (funExt + isRHomR[1/h][1/f]→R[1/h][1/fg] = RingHom≡ (funExt x cong [_] (≡-× (cong [_] (≡-× (cong (x ·_) (transportRefl 1r) ·IdR x) (Σ≡Prop _ isPropPropTrunc) (cong (1r ·_) (transportRefl 1r) ·IdR 1r)))) (Σ≡Prop _ isPropPropTrunc) (cong (1r ·_) (transportRefl 1r) ·IdR 1r))))) isRHomR[1/h][1/g]→R[1/h][1/fg] : theRingCospan .s₁ ∘r /1/1AsCommRingHom g /1/1AsCommRingHomFG - isRHomR[1/h][1/g]→R[1/h][1/fg] = RingHom≡ (funExt + isRHomR[1/h][1/g]→R[1/h][1/fg] = RingHom≡ (funExt x cong [_] (≡-× (cong [_] (≡-× (cong (x ·_) (transportRefl 1r) ·IdR x) (Σ≡Prop _ isPropPropTrunc) (cong (1r ·_) (transportRefl 1r) ·IdR 1r)))) (Σ≡Prop _ isPropPropTrunc) (cong (1r ·_) (transportRefl 1r) ·IdR 1r))))) @@ -440,13 +440,13 @@ path = cong toCommAlg (ΣPathP (p , q)) where eqInR[1/h] : (f /1) · (g /1) (f · g) /1 - eqInR[1/h] = sym (/1AsCommRingHom .snd .pres· f g) + eqInR[1/h] = sym (/1AsCommRingHom .snd .pres· f g) p : R[1/h][1/fg]AsCommRing R[1/h][1/fg]AsCommRing' p i = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing (eqInR[1/h] i) q : PathP i CommRingHom R' (p i)) /1/1AsCommRingHomFG (/1/1AsCommRingHom (f · g)) - q = toPathP (RingHom≡ (funExt ( + q = toPathP (RingHom≡ (funExt ( λ x cong [_] (≡-× (cong [_] (≡-× (transportRefl _ transportRefl x) (Σ≡Prop _ isPropPropTrunc) (transportRefl 1r)))) (Σ≡Prop _ isPropPropTrunc) (transportRefl 1r)))))) diff --git a/Cubical.Algebra.ZariskiLattice.UniversalProperty.html b/Cubical.Algebra.ZariskiLattice.UniversalProperty.html index 830b5464df..db1ef0c183 100644 --- a/Cubical.Algebra.ZariskiLattice.UniversalProperty.html +++ b/Cubical.Algebra.ZariskiLattice.UniversalProperty.html @@ -62,9 +62,9 @@ open DistLatticeStr (L' .snd) renaming (is-set to isSetL) open Join L' - open LatticeTheory (DistLattice→Lattice L') - open Order (DistLattice→Lattice L') - open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L')) + open LatticeTheory (DistLattice→Lattice L') + open Order (DistLattice→Lattice L') + open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L')) open PosetReasoning IndPoset open PosetStr (IndPoset .snd) hiding (_≤_) private @@ -175,7 +175,7 @@ Type _ hasZarLatUniversalProp {ℓ' = ℓ'} L D _ = (L' : DistLattice ℓ') (d : R fst L') IsZarMap R' L' d - ∃![ χ DistLatticeHom L L' ] (fst χ) D d + ∃![ χ DistLatticeHom L L' ] (fst χ) D d isPropZarLatUniversalProp : (L : DistLattice ℓ') (D : R fst L) (isZarMapD : IsZarMap R' L D) isProp (hasZarLatUniversalProp L D isZarMapD) @@ -185,12 +185,12 @@ ZLHasUniversalProp L' d isZarMapd = (χ , funExt χcomp) , χunique where open DistLatticeStr (snd L') renaming (is-set to isSetL) - open LatticeTheory (DistLattice→Lattice L') + open LatticeTheory (DistLattice→Lattice L') open Join L' - open IsLatticeHom + open IsLatticeHom L = fst L' - χ : DistLatticeHom ZariskiLattice L' + χ : DistLatticeHom ZariskiLattice L' fst χ = SQ.rec isSetL (_ , α) (d α)) λ (_ , α) (_ , β) curriedHelper α β where @@ -198,8 +198,8 @@ (n , α) (m , β) (d α) (d β) curriedHelper α β α∼β = is-antisym _ _ ineq1 ineq2 where - open Order (DistLattice→Lattice L') - open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L')) + open Order (DistLattice→Lattice L') + open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L')) open PosetReasoning IndPoset open PosetStr (IndPoset .snd) hiding (_≤_) @@ -218,9 +218,9 @@ λ i ZarMapRadicalIneq isZarMapd α (β i) (√FGIdealCharLImpl β α incl2 i) - pres0 (snd χ) = refl - pres1 (snd χ) = ∨lRid _ isZarMapd .pres1 - pres∨l (snd χ) = elimProp2 _ _ isSetL _ _) (uncurry n α uncurry (curriedHelper n α))) + pres0 (snd χ) = refl + pres1 (snd χ) = ∨lRid _ isZarMapd .pres1 + pres∨l (snd χ) = elimProp2 _ _ isSetL _ _) (uncurry n α uncurry (curriedHelper n α))) where curriedHelper : (n : ) (α : FinVec R n) (m : ) (β : FinVec R m) (d (α ++Fin β)) (d α) ∨l (d β) @@ -236,7 +236,7 @@ (d α) ∨l (d β) - pres∧l (snd χ) = elimProp2 _ _ isSetL _ _) (uncurry n α uncurry (curriedHelper n α))) + pres∧l (snd χ) = elimProp2 _ _ isSetL _ _) (uncurry n α uncurry (curriedHelper n α))) where -- have to repeat this one here so the termination checker won't complain oldHelper : (n : ) (α : FinVec R n) (m : ) (β : FinVec R m) @@ -275,13 +275,13 @@ χcomp : (f : R) χ .fst (D f) d f χcomp f = ∨lRid (d f) - χunique : (y : Σ[ χ' DistLatticeHom ZariskiLattice L' ] fst χ' D d) + χunique : (y : Σ[ χ' DistLatticeHom ZariskiLattice L' ] fst χ' D d) (χ , funExt χcomp) y χunique (χ' , χ'∘D≡d) = Σ≡Prop _ isSetΠ _ isSetL) _ _) (LatticeHom≡f _ _ (funExt (elimProp _ isSetL _ _) (uncurry uniqHelper)))) where uniqHelper : (n : ) (α : FinVec R n) fst χ [ n , α ] fst χ' [ n , α ] - uniqHelper zero _ = sym (cong α fst χ' [ 0 , α ]) (funExt ())) χ' .snd .pres0) + uniqHelper zero _ = sym (cong α fst χ' [ 0 , α ]) (funExt ())) χ' .snd .pres0) uniqHelper (suc n) α = (d α) ≡⟨ refl d (α zero) ∨l (d α suc) @@ -294,7 +294,7 @@ fst χ' (D (α zero)) ∨l fst χ' [ n , α suc ] - ≡⟨ sym (χ' .snd .pres∨l _ _) + ≡⟨ sym (χ' .snd .pres∨l _ _) fst χ' (D (α zero) ∨z [ n , α suc ]) @@ -306,10 +306,10 @@ -- the map induced by applying the universal property to the Zariski lattice -- itself is the identity hom ZLUniversalPropCorollary : ZLHasUniversalProp ZariskiLattice D isZarMapD .fst .fst - idDistLatticeHom ZariskiLattice + idDistLatticeHom ZariskiLattice ZLUniversalPropCorollary = cong fst (ZLHasUniversalProp ZariskiLattice D isZarMapD .snd - (idDistLatticeHom ZariskiLattice , refl)) + (idDistLatticeHom ZariskiLattice , refl)) -- and another corollary module _ where diff --git a/Cubical.Categories.DistLatticeSheaf.Base.html b/Cubical.Categories.DistLatticeSheaf.Base.html index a92622f51a..539d2c5f95 100644 --- a/Cubical.Categories.DistLatticeSheaf.Base.html +++ b/Cubical.Categories.DistLatticeSheaf.Base.html @@ -41,10 +41,10 @@ module _ (L : DistLattice ) (C : Category ℓ' ℓ'') where open Category hiding (_⋆_ ; _∘_) open Functor - open Order (DistLattice→Lattice L) + open Order (DistLattice→Lattice L) open DistLatticeStr (snd L) - open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L)) - open MeetSemilattice (Lattice→MeetSemilattice (DistLattice→Lattice L)) + open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L)) + open MeetSemilattice (Lattice→MeetSemilattice (DistLattice→Lattice L)) using (∧≤RCancel ; ∧≤LCancel ; ≤-∧Pres) open PosetStr (IndPoset .snd) hiding (_≤_) @@ -554,11 +554,11 @@ -- the correct defintion open Join L module condCone {n : } (α : FinVec (ob BasisCat) n) where - open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L)) + open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L)) open PosetStr (IndPoset .snd) hiding (_≤_) - open MeetSemilattice (Lattice→MeetSemilattice (DistLattice→Lattice L)) + open MeetSemilattice (Lattice→MeetSemilattice (DistLattice→Lattice L)) using (∧≤RCancel ; ∧≤LCancel) - open Order (DistLattice→Lattice L) + open Order (DistLattice→Lattice L) open Cone BDiag : Functor (DLShfDiag n ) (BasisCat ^op) diff --git a/Cubical.Categories.DistLatticeSheaf.ComparisonLemma.html b/Cubical.Categories.DistLatticeSheaf.ComparisonLemma.html index 9c45fb2099..1065934dc5 100644 --- a/Cubical.Categories.DistLatticeSheaf.ComparisonLemma.html +++ b/Cubical.Categories.DistLatticeSheaf.ComparisonLemma.html @@ -74,11 +74,11 @@ open PreSheafExtension L C limitC B open DistLatticeStr ⦃...⦄ - open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L)) + open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L)) open PosetStr (IndPoset .snd) hiding (_≤_) open Join L - open Order (DistLattice→Lattice L) - open MeetSemilattice (Lattice→MeetSemilattice (DistLattice→Lattice L)) + open Order (DistLattice→Lattice L) + open MeetSemilattice (Lattice→MeetSemilattice (DistLattice→Lattice L)) using (∧≤RCancel ; ∧≤LCancel) private instance diff --git a/Cubical.Categories.DistLatticeSheaf.Diagram.html b/Cubical.Categories.DistLatticeSheaf.Diagram.html index 7339d144c9..5df2fe556c 100644 --- a/Cubical.Categories.DistLatticeSheaf.Diagram.html +++ b/Cubical.Categories.DistLatticeSheaf.Diagram.html @@ -159,11 +159,11 @@ open DistLatticeStr ⦃...⦄ open Join L' - open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L')) + open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L')) open PosetStr (IndPoset .snd) hiding (_≤_) - open MeetSemilattice (Lattice→MeetSemilattice (DistLattice→Lattice L')) + open MeetSemilattice (Lattice→MeetSemilattice (DistLattice→Lattice L')) using (∧≤RCancel ; ∧≤LCancel) - open Order (DistLattice→Lattice L') + open Order (DistLattice→Lattice L') open Category LCat open Functor diff --git a/Cubical.Categories.DistLatticeSheaf.Extension.html b/Cubical.Categories.DistLatticeSheaf.Extension.html index af25da9852..ec58e92a96 100644 --- a/Cubical.Categories.DistLatticeSheaf.Extension.html +++ b/Cubical.Categories.DistLatticeSheaf.Extension.html @@ -89,11 +89,11 @@ module _ (isBasisL' : IsBasis L L') (F : DLSubPreSheaf) (isSheafF : SheafOnBasis.isDLBasisSheaf L C L' isBasisL' F) where open SheafOnBasis L C L' isBasisL' - open Order (DistLattice→Lattice L) + open Order (DistLattice→Lattice L) open DistLatticeStr (snd L) open Join L - open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L)) - open MeetSemilattice (Lattice→MeetSemilattice (DistLattice→Lattice L)) + open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L)) + open MeetSemilattice (Lattice→MeetSemilattice (DistLattice→Lattice L)) using (∧≤RCancel ; ∧≤LCancel ; ≤-∧Pres ; ≤-∧RPres ; ≤-∧LPres) open PosetStr (IndPoset .snd) hiding (_≤_) open IsBasis ⦃...⦄ diff --git a/Cubical.Categories.Instances.AbGroups.html b/Cubical.Categories.Instances.AbGroups.html index 3145d74bfe..15e4edcbfc 100644 --- a/Cubical.Categories.Instances.AbGroups.html +++ b/Cubical.Categories.Instances.AbGroups.html @@ -15,7 +15,7 @@ AbGroupCategory : Category (ℓ-suc ) AbGroupCategory .ob = AbGroup - AbGroupCategory .Hom[_,_] = AbGroupHom + AbGroupCategory .Hom[_,_] = AbGroupHom AbGroupCategory .id = idGroupHom AbGroupCategory ._⋆_ = compGroupHom AbGroupCategory .⋆IdL f = GroupHom≡ refl diff --git a/Cubical.Categories.Instances.CommAlgebras.html b/Cubical.Categories.Instances.CommAlgebras.html index 491bae439a..520015189e 100644 --- a/Cubical.Categories.Instances.CommAlgebras.html +++ b/Cubical.Categories.Instances.CommAlgebras.html @@ -40,31 +40,31 @@ module _ (R : CommRing ) where CommAlgebrasCategory : Category (ℓ-max (ℓ-suc ℓ')) (ℓ-max ℓ') ob (CommAlgebrasCategory {ℓ' = ℓ'}) = CommAlgebra R ℓ' - Hom[_,_] CommAlgebrasCategory = CommAlgebraHom + Hom[_,_] CommAlgebrasCategory = CommAlgebraHom id CommAlgebrasCategory {A} = idCommAlgebraHom A _⋆c_ CommAlgebrasCategory {A} {B} {C} = compCommAlgebraHom A B C ⋆IdL CommAlgebrasCategory {A} {B} = compIdCommAlgebraHom {A = A} {B} ⋆IdR CommAlgebrasCategory {A} {B} = idCompCommAlgebraHom {A = A} {B} ⋆Assoc CommAlgebrasCategory {A} {B} {C} {D} = compAssocCommAlgebraHom {A = A} {B} {C} {D} - isSetHom CommAlgebrasCategory = isSetAlgebraHom _ _ + isSetHom CommAlgebrasCategory = isSetAlgebraHom _ _ TerminalCommAlgebra : Terminal (CommAlgebrasCategory {ℓ' = ℓ'}) fst TerminalCommAlgebra = UnitCommAlgebra R fst (fst (snd TerminalCommAlgebra A)) = λ _ tt* - snd (fst (snd TerminalCommAlgebra A)) = makeIsAlgebraHom + snd (fst (snd TerminalCommAlgebra A)) = makeIsAlgebraHom refl _ _ refl) _ _ refl) _ _ refl) - snd (snd TerminalCommAlgebra A) f = AlgebraHom≡ (funExt _ refl)) + snd (snd TerminalCommAlgebra A) f = AlgebraHom≡ (funExt _ refl)) -- the forgetful functor into CommRings and SET open Functor ForgetfulCommAlgebra→CommRing : Functor (CommAlgebrasCategory {ℓ' = ℓ'}) CommRingsCategory F-ob ForgetfulCommAlgebra→CommRing = CommAlgebra→CommRing {R = R} - F-hom ForgetfulCommAlgebra→CommRing = CommAlgebraHom→CommRingHom _ _ - F-id ForgetfulCommAlgebra→CommRing = RingHom≡ refl - F-seq ForgetfulCommAlgebra→CommRing _ _ = RingHom≡ refl + F-hom ForgetfulCommAlgebra→CommRing = CommAlgebraHom→CommRingHom _ _ + F-id ForgetfulCommAlgebra→CommRing = RingHom≡ refl + F-seq ForgetfulCommAlgebra→CommRing _ _ = RingHom≡ refl ForgetfulCommAlgebra→Set : Functor (CommAlgebrasCategory {ℓ' = ℓ'}) (SET ℓ') - F-ob ForgetfulCommAlgebra→Set A = A .fst , A .snd .CommAlgebraStr.is-set + F-ob ForgetfulCommAlgebra→Set A = A .fst , A .snd .CommAlgebraStr.is-set F-hom ForgetfulCommAlgebra→Set = fst F-id ForgetfulCommAlgebra→Set = refl F-seq ForgetfulCommAlgebra→Set _ _ = refl @@ -84,34 +84,34 @@ module _ where open CommAlgebraStr - open IsAlgebraHom + open IsAlgebraHom LimitsCommAlgebrasCategory : Limits {ℓ-max ℓJ} {ℓJ'} (CommAlgebrasCategory {ℓ' = theℓ}) fst (lim (LimitsCommAlgebrasCategory J D)) = lim (completeSET J (ffA→SET ∘F D)) .fst 0a (snd (lim (LimitsCommAlgebrasCategory J D))) = cone v _ 0a (snd (F-ob D v))) - e funExt _ F-hom D e .snd .pres0)) + e funExt _ F-hom D e .snd .pres0)) 1a (snd (lim (LimitsCommAlgebrasCategory J D))) = cone v _ 1a (snd (F-ob D v))) - e funExt _ F-hom D e .snd .pres1)) + e funExt _ F-hom D e .snd .pres1)) _+_ (snd (lim (LimitsCommAlgebrasCategory J D))) x y = cone v _ _+_ (snd (F-ob D v)) _ _) - ( λ e funExt _ F-hom D e .snd .pres+ _ _ + ( λ e funExt _ F-hom D e .snd .pres+ _ _ λ i _+_ (snd (F-ob D _)) (coneOutCommutes x e i tt*) (coneOutCommutes y e i tt*))) _·_ (snd (lim (LimitsCommAlgebrasCategory J D))) x y = cone v _ _·_ (snd (F-ob D v)) _ _) - ( λ e funExt _ F-hom D e .snd .pres· _ _ + ( λ e funExt _ F-hom D e .snd .pres· _ _ λ i _·_ (snd (F-ob D _)) (coneOutCommutes x e i tt*) (coneOutCommutes y e i tt*))) (- snd (lim (LimitsCommAlgebrasCategory J D))) x = cone v _ -_ (snd (F-ob D v)) _) - ( λ e funExt z F-hom D e .snd .pres- _ + ( λ e funExt z F-hom D e .snd .pres- _ λ i -_ (snd (F-ob D _)) (coneOutCommutes x e i tt*))) _⋆_ (snd (lim (LimitsCommAlgebrasCategory J D))) = λ r x -- why can't Agda parse with r x on the lhs? cone v _ _⋆_ (snd (F-ob D v)) r (coneOut x v tt*)) - ( λ e funExt z F-hom D e .snd .pres⋆ _ _ + ( λ e funExt z F-hom D e .snd .pres⋆ _ _ λ i _⋆_ (snd (F-ob D _)) r (coneOutCommutes x e i tt*))) - isCommAlgebra (snd (lim (LimitsCommAlgebrasCategory J D))) = makeIsCommAlgebra + isCommAlgebra (snd (lim (LimitsCommAlgebrasCategory J D))) = makeIsCommAlgebra (isSetCone (ffA→SET ∘F D) (Unit* , _)) _ _ _ cone≡ v funExt _ snd (F-ob D v) .+Assoc _ _ _))) _ cone≡ v funExt _ +IdR (snd (F-ob D v)) _))) @@ -128,27 +128,27 @@ λ _ _ _ cone≡ λ v funExt λ _ ⋆AssocL (snd (F-ob D v)) _ _ _ fst (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v) = coneOut (limCone (completeSET J (funcComp ffA→SET D))) v - pres0 (snd (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v)) = refl - pres1 (snd (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v)) = refl - pres+ (snd (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v)) = λ _ _ refl - pres· (snd (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v)) = λ _ _ refl - pres- (snd (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v)) = λ _ refl - pres⋆ (snd (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v)) = λ _ _ refl + pres0 (snd (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v)) = refl + pres1 (snd (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v)) = refl + pres+ (snd (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v)) = λ _ _ refl + pres· (snd (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v)) = λ _ _ refl + pres- (snd (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v)) = λ _ refl + pres⋆ (snd (coneOut (limCone (LimitsCommAlgebrasCategory J D)) v)) = λ _ _ refl coneOutCommutes (limCone (LimitsCommAlgebrasCategory J D)) e = - AlgebraHom≡ (coneOutCommutes (limCone (completeSET J (funcComp ffA→SET D))) e) + AlgebraHom≡ (coneOutCommutes (limCone (completeSET J (funcComp ffA→SET D))) e) univProp (LimitsCommAlgebrasCategory J D) c cc = uniqueExists ( ( λ x limArrow (completeSET J (funcComp ffA→SET D)) - (fst c , snd c .is-set) + (fst c , snd c .is-set) (cone v _ coneOut cc v .fst x) e funExt _ funExt⁻ (cong fst (coneOutCommutes cc e)) x))) x) - , makeIsAlgebraHom - (cone≡ v funExt _ coneOut cc v .snd .pres1))) - x y cone≡ v funExt _ coneOut cc v .snd .pres+ _ _))) - x y cone≡ v funExt _ coneOut cc v .snd .pres· _ _))) - x y cone≡ v funExt _ coneOut cc v .snd .pres⋆ _ _)))) - _ AlgebraHom≡ refl) + , makeIsAlgebraHom + (cone≡ v funExt _ coneOut cc v .snd .pres1))) + x y cone≡ v funExt _ coneOut cc v .snd .pres+ _ _))) + x y cone≡ v funExt _ coneOut cc v .snd .pres· _ _))) + x y cone≡ v funExt _ coneOut cc v .snd .pres⋆ _ _)))) + _ AlgebraHom≡ refl) (isPropIsConeMor cc (limCone (LimitsCommAlgebrasCategory J D))) - a' x Σ≡Prop _ isPropIsAlgebraHom _ _ _ _) + a' x Σ≡Prop _ isPropIsAlgebraHom _ _ _ _) (funExt y cone≡ λ v funExt _ sym (funExt⁻ (cong fst (x v)) y))))) -- forgetful functor preserves limits @@ -168,17 +168,17 @@ (ffA→R {ℓ' = theℓ} .F-ob (LimitsCommAlgebrasCategory J D .lim)) coneOut (fst (fst (canonicalIso J D)) cc) = coneOut cc coneOutCommutes (fst (fst (canonicalIso J D)) cc) = coneOutCommutes cc - snd (fst (canonicalIso J D)) = makeIsRingHom refl _ _ refl) λ _ _ refl + snd (fst (canonicalIso J D)) = makeIsRingHom refl _ _ refl) λ _ _ refl coneOut (fst (inv (snd (canonicalIso J D))) cc) = coneOut cc coneOutCommutes (fst (inv (snd (canonicalIso J D))) cc) = coneOutCommutes cc - snd (inv (snd (canonicalIso J D))) = makeIsRingHom refl _ _ refl) λ _ _ refl - sec (snd (canonicalIso J D)) = RingHom≡ refl - ret (snd (canonicalIso J D)) = RingHom≡ refl + snd (inv (snd (canonicalIso J D))) = makeIsRingHom refl _ _ refl) λ _ _ refl + sec (snd (canonicalIso J D)) = RingHom≡ refl + ret (snd (canonicalIso J D)) = RingHom≡ refl isConeMorCanonicalIso : J D isConeMor (LimitsCommRingsCategory J (funcComp ffA→R D) .limCone) (F-cone ffA→R (LimitsCommAlgebrasCategory J D .limCone)) (canonicalIso J D .fst) - isConeMorCanonicalIso J D v = RingHom≡ refl + isConeMorCanonicalIso J D v = RingHom≡ refl module PullbackFromCommRing (R : CommRing ) @@ -231,8 +231,8 @@ univPropCommRingWithHomHom isRHom₁ isRHom₂ isRHom₃ isRHom₄ (E , f₅) (h₂ , comm₂) (h₁ , comm₁) squareComm = ((h₃ , h₃∘f₅≡f₁) , h₂≡g₂∘h₃ , h₁≡g₁∘h₃) - , λ h₃' Σ≡Prop _ isProp× (isSetRingHom _ _ _ _) (isSetRingHom _ _ _ _)) - (Σ≡Prop _ isSetRingHom _ _ _ _) + , λ h₃' Σ≡Prop _ isProp× (isSetRingHom _ _ _ _) (isSetRingHom _ _ _ _)) + (Σ≡Prop _ isSetRingHom _ _ _ _) (cong fst (commRingPB .univProp h₂ h₁ squareComm .snd (h₃' .fst .fst , h₃' .snd .fst , h₃' .snd .snd)))) where @@ -281,7 +281,7 @@ pbPr₁ (algPullback isRHom₁ isRHom₂ isRHom₃ isRHom₄) = toCommAlgebraHom _ _ g₂ isRHom₂ pbPr₂ (algPullback isRHom₁ isRHom₂ isRHom₃ isRHom₄) = toCommAlgebraHom _ _ g₁ isRHom₁ pbCommutes (algPullback isRHom₁ isRHom₂ isRHom₃ isRHom₄) = - AlgebraHom≡ (cong fst (pbCommutes commRingPB)) + AlgebraHom≡ (cong fst (pbCommutes commRingPB)) univProp (algPullback isRHom₁ isRHom₂ isRHom₃ isRHom₄) {d = F} h₂' h₁' g₄∘h₂'≡g₃∘h₁' = (k , kComm₂ , kComm₁) , uniqueness where @@ -290,15 +290,15 @@ h₁ : CommRingHom E B fst h₁ = fst h₁' - IsRingHom.pres0 (snd h₁) = IsAlgebraHom.pres0 (snd h₁') - IsRingHom.pres1 (snd h₁) = IsAlgebraHom.pres1 (snd h₁') - IsRingHom.pres+ (snd h₁) = IsAlgebraHom.pres+ (snd h₁') - IsRingHom.pres· (snd h₁) = IsAlgebraHom.pres· (snd h₁') - IsRingHom.pres- (snd h₁) = IsAlgebraHom.pres- (snd h₁') + IsRingHom.pres0 (snd h₁) = IsAlgebraHom.pres0 (snd h₁') + IsRingHom.pres1 (snd h₁) = IsAlgebraHom.pres1 (snd h₁') + IsRingHom.pres+ (snd h₁) = IsAlgebraHom.pres+ (snd h₁') + IsRingHom.pres· (snd h₁) = IsAlgebraHom.pres· (snd h₁') + IsRingHom.pres- (snd h₁) = IsAlgebraHom.pres- (snd h₁') h₁comm : h₁ ∘r f₅ f₂ - h₁comm = RingHom≡ (funExt x IsAlgebraHom.pres⋆ (snd h₁') x 1a - ∙∙ cong (fst f₂ x ·_) (IsAlgebraHom.pres1 (snd h₁')) + h₁comm = RingHom≡ (funExt x IsAlgebraHom.pres⋆ (snd h₁') x 1a + ∙∙ cong (fst f₂ x ·_) (IsAlgebraHom.pres1 (snd h₁')) ∙∙ ·IdR _)) where instance @@ -307,15 +307,15 @@ h₂ : CommRingHom E C fst h₂ = fst h₂' - IsRingHom.pres0 (snd h₂) = IsAlgebraHom.pres0 (snd h₂') - IsRingHom.pres1 (snd h₂) = IsAlgebraHom.pres1 (snd h₂') - IsRingHom.pres+ (snd h₂) = IsAlgebraHom.pres+ (snd h₂') - IsRingHom.pres· (snd h₂) = IsAlgebraHom.pres· (snd h₂') - IsRingHom.pres- (snd h₂) = IsAlgebraHom.pres- (snd h₂') + IsRingHom.pres0 (snd h₂) = IsAlgebraHom.pres0 (snd h₂') + IsRingHom.pres1 (snd h₂) = IsAlgebraHom.pres1 (snd h₂') + IsRingHom.pres+ (snd h₂) = IsAlgebraHom.pres+ (snd h₂') + IsRingHom.pres· (snd h₂) = IsAlgebraHom.pres· (snd h₂') + IsRingHom.pres- (snd h₂) = IsAlgebraHom.pres- (snd h₂') h₂comm : h₂ ∘r f₅ f₃ - h₂comm = RingHom≡ (funExt x IsAlgebraHom.pres⋆ (snd h₂') x 1a - ∙∙ cong (fst f₃ x ·_) (IsAlgebraHom.pres1 (snd h₂')) + h₂comm = RingHom≡ (funExt x IsAlgebraHom.pres⋆ (snd h₂') x 1a + ∙∙ cong (fst f₃ x ·_) (IsAlgebraHom.pres1 (snd h₂')) ∙∙ ·IdR _)) where instance @@ -323,7 +323,7 @@ _ = snd (toCommAlg (C , f₃)) commRingSquare : g₄ ∘r h₂ g₃ ∘r h₁ - commRingSquare = RingHom≡ (funExt x funExt⁻ (cong fst g₄∘h₂'≡g₃∘h₁') x)) + commRingSquare = RingHom≡ (funExt x funExt⁻ (cong fst g₄∘h₂'≡g₃∘h₁') x)) uniqueH₃ : ∃![ h₃ CommRingWithHomHom (E , f₅) (A , f₁) ] (h₂ g₂ ∘r fst h₃) × (h₁ g₁ ∘r fst h₃) uniqueH₃ = univPropCommRingWithHomHom isRHom₁ isRHom₂ isRHom₃ isRHom₄ @@ -334,16 +334,16 @@ h₃comm = uniqueH₃ .fst .fst .snd - k : CommAlgebraHom F (toCommAlg (A , f₁)) + k : CommAlgebraHom F (toCommAlg (A , f₁)) fst k = fst h₃ - IsAlgebraHom.pres0 (snd k) = IsRingHom.pres0 (snd h₃) - IsAlgebraHom.pres1 (snd k) = IsRingHom.pres1 (snd h₃) - IsAlgebraHom.pres+ (snd k) = IsRingHom.pres+ (snd h₃) - IsAlgebraHom.pres· (snd k) = IsRingHom.pres· (snd h₃) - IsAlgebraHom.pres- (snd k) = IsRingHom.pres- (snd h₃) - IsAlgebraHom.pres⋆ (snd k) = + IsAlgebraHom.pres0 (snd k) = IsRingHom.pres0 (snd h₃) + IsAlgebraHom.pres1 (snd k) = IsRingHom.pres1 (snd h₃) + IsAlgebraHom.pres+ (snd k) = IsRingHom.pres+ (snd h₃) + IsAlgebraHom.pres· (snd k) = IsRingHom.pres· (snd h₃) + IsAlgebraHom.pres- (snd k) = IsRingHom.pres- (snd h₃) + IsAlgebraHom.pres⋆ (snd k) = λ r y sym (fst f₁ r · fst h₃ y ≡⟨ cong ( fst h₃ y) (sym (funExt⁻ (cong fst h₃comm) r)) - fst h₃ (fst f₅ r) · fst h₃ y ≡⟨ sym (IsRingHom.pres· (snd h₃) _ _) + fst h₃ (fst f₅ r) · fst h₃ y ≡⟨ sym (IsRingHom.pres· (snd h₃) _ _) fst h₃ (fst f₅ r · y) ≡⟨ refl fst h₃ ((r 1a) · y) ≡⟨ cong (fst h₃) (⋆AssocL _ _ _) fst h₃ (r (1a · y)) ≡⟨ cong x fst h₃ (r x)) (·IdL y) @@ -354,30 +354,30 @@ _ = (toCommAlg (A , f₁) .snd) kComm₂ : h₂' toCommAlgebraHom _ _ g₂ isRHom₂ ∘a k - kComm₂ = AlgebraHom≡ (cong fst (uniqueH₃ .fst .snd .fst)) + kComm₂ = AlgebraHom≡ (cong fst (uniqueH₃ .fst .snd .fst)) kComm₁ : h₁' toCommAlgebraHom _ _ g₁ isRHom₁ ∘a k - kComm₁ = AlgebraHom≡ (cong fst (uniqueH₃ .fst .snd .snd)) + kComm₁ = AlgebraHom≡ (cong fst (uniqueH₃ .fst .snd .snd)) - uniqueness : (y : Σ[ k' CommAlgebraHom F (toCommAlg (A , f₁)) ] + uniqueness : (y : Σ[ k' CommAlgebraHom F (toCommAlg (A , f₁)) ] (h₂' toCommAlgebraHom _ _ g₂ isRHom₂ ∘a k') × (h₁' toCommAlgebraHom _ _ g₁ isRHom₁ ∘a k')) (k , kComm₂ , kComm₁) y - uniqueness (k' , k'Comm₂ , k'Comm₁) = Σ≡Prop _ isProp× (isSetAlgebraHom _ _ _ _) - (isSetAlgebraHom _ _ _ _)) - (AlgebraHom≡ (cong (fst fst fst) uniqHelper)) + uniqueness (k' , k'Comm₂ , k'Comm₁) = Σ≡Prop _ isProp× (isSetAlgebraHom _ _ _ _) + (isSetAlgebraHom _ _ _ _)) + (AlgebraHom≡ (cong (fst fst fst) uniqHelper)) where h₃' : CommRingHom E A fst h₃' = fst k' - IsRingHom.pres0 (snd h₃') = IsAlgebraHom.pres0 (snd k') - IsRingHom.pres1 (snd h₃') = IsAlgebraHom.pres1 (snd k') - IsRingHom.pres+ (snd h₃') = IsAlgebraHom.pres+ (snd k') - IsRingHom.pres· (snd h₃') = IsAlgebraHom.pres· (snd k') - IsRingHom.pres- (snd h₃') = IsAlgebraHom.pres- (snd k') + IsRingHom.pres0 (snd h₃') = IsAlgebraHom.pres0 (snd k') + IsRingHom.pres1 (snd h₃') = IsAlgebraHom.pres1 (snd k') + IsRingHom.pres+ (snd h₃') = IsAlgebraHom.pres+ (snd k') + IsRingHom.pres· (snd h₃') = IsAlgebraHom.pres· (snd k') + IsRingHom.pres- (snd h₃') = IsAlgebraHom.pres- (snd k') h₃'IsRHom : h₃' ∘r f₅ f₁ - h₃'IsRHom = RingHom≡ (funExt x IsAlgebraHom.pres⋆ (snd k') x 1a - cong (fst f₁ x ·_) (IsAlgebraHom.pres1 (snd k')) + h₃'IsRHom = RingHom≡ (funExt x IsAlgebraHom.pres⋆ (snd k') x 1a + cong (fst f₁ x ·_) (IsAlgebraHom.pres1 (snd k')) ·IdR (fst f₁ x))) where instance @@ -385,10 +385,10 @@ _ = (toCommAlg (A , f₁) .snd) h₃'Comm₂ : h₂ g₂ ∘r h₃' - h₃'Comm₂ = RingHom≡ (cong fst k'Comm₂) + h₃'Comm₂ = RingHom≡ (cong fst k'Comm₂) h₃'Comm₁ : h₁ g₁ ∘r h₃' - h₃'Comm₁ = RingHom≡ (cong fst k'Comm₁) + h₃'Comm₁ = RingHom≡ (cong fst k'Comm₁) -- basically saying that h₃≡h₃' but we have to give all the commuting triangles uniqHelper : uniqueH₃ .fst ((h₃' , h₃'IsRHom) , h₃'Comm₂ , h₃'Comm₁) @@ -413,8 +413,8 @@ algDiag : Functor J (CommAlgebrasCategory R {ℓ' = }) F-ob algDiag v = toCommAlg (F-ob crDiag v , coneOut toAlgCone v) F-hom algDiag f = toCommAlgebraHom _ _ (F-hom crDiag f) (coneOutCommutes toAlgCone f) - F-id algDiag = AlgebraHom≡ (cong fst (F-id crDiag)) - F-seq algDiag f g = AlgebraHom≡ (cong fst (F-seq crDiag f g)) + F-id algDiag = AlgebraHom≡ (cong fst (F-id crDiag)) + F-seq algDiag f g = AlgebraHom≡ (cong fst (F-seq crDiag f g)) module _ (φ : CommRingHom R A) (isConeMorφ : isConeMor toAlgCone crCone φ) where @@ -423,7 +423,7 @@ algCone : Cone algDiag B coneOut algCone v = toCommAlgebraHom _ _ (coneOut crCone v) (isConeMorφ v) - coneOutCommutes algCone f = AlgebraHom≡ (cong fst (coneOutCommutes crCone f)) + coneOutCommutes algCone f = AlgebraHom≡ (cong fst (coneOutCommutes crCone f)) module _ (univProp : isLimCone _ _ crCone) where @@ -435,7 +435,7 @@ (χ , triangle) (univProp C cc .fst .snd) _ isPropIsConeMor _ _ _) - λ _ x Σ≡Prop _ isSetRingHom _ _ _ _) + λ _ x Σ≡Prop _ isSetRingHom _ _ _ _) (cong fst (univProp C cc .snd (_ , x))) where χ = univProp C cc .fst .fst @@ -458,17 +458,17 @@ cc : Cone crDiag C fst (coneOut cc v) = fst (coneOut cd v) - IsRingHom.pres0 (snd (coneOut cc v)) = IsAlgebraHom.pres0 (snd (coneOut cd v)) - IsRingHom.pres1 (snd (coneOut cc v)) = IsAlgebraHom.pres1 (snd (coneOut cd v)) - IsRingHom.pres+ (snd (coneOut cc v)) = IsAlgebraHom.pres+ (snd (coneOut cd v)) - IsRingHom.pres· (snd (coneOut cc v)) = IsAlgebraHom.pres· (snd (coneOut cd v)) - IsRingHom.pres- (snd (coneOut cc v)) = IsAlgebraHom.pres- (snd (coneOut cd v)) - coneOutCommutes cc f = RingHom≡ (cong fst (coneOutCommutes cd f)) + IsRingHom.pres0 (snd (coneOut cc v)) = IsAlgebraHom.pres0 (snd (coneOut cd v)) + IsRingHom.pres1 (snd (coneOut cc v)) = IsAlgebraHom.pres1 (snd (coneOut cd v)) + IsRingHom.pres+ (snd (coneOut cc v)) = IsAlgebraHom.pres+ (snd (coneOut cd v)) + IsRingHom.pres· (snd (coneOut cc v)) = IsAlgebraHom.pres· (snd (coneOut cd v)) + IsRingHom.pres- (snd (coneOut cc v)) = IsAlgebraHom.pres- (snd (coneOut cd v)) + coneOutCommutes cc f = RingHom≡ (cong fst (coneOutCommutes cd f)) isConeMorψ : isConeMor toAlgCone cc ψ - isConeMorψ v = RingHom≡ (funExt x - IsAlgebraHom.pres⋆ (snd (coneOut cd v)) x 1a - ∙∙ cong (fst (coneOut toAlgCone v) x ·_) (IsAlgebraHom.pres1 (snd (coneOut cd v))) + isConeMorψ v = RingHom≡ (funExt x + IsAlgebraHom.pres⋆ (snd (coneOut cd v)) x 1a + ∙∙ cong (fst (coneOut toAlgCone v) x ·_) (IsAlgebraHom.pres1 (snd (coneOut cd v))) ∙∙ ·IdR _)) where instance @@ -481,16 +481,16 @@ χ = uniqueχ .fst .fst .fst χComm = uniqueχ .fst .fst .snd - ξ : CommAlgebraHom D B + ξ : CommAlgebraHom D B fst ξ = fst χ - IsAlgebraHom.pres0 (snd ξ) = IsRingHom.pres0 (snd χ) - IsAlgebraHom.pres1 (snd ξ) = IsRingHom.pres1 (snd χ) - IsAlgebraHom.pres+ (snd ξ) = IsRingHom.pres+ (snd χ) - IsAlgebraHom.pres· (snd ξ) = IsRingHom.pres· (snd χ) - IsAlgebraHom.pres- (snd ξ) = IsRingHom.pres- (snd χ) - IsAlgebraHom.pres⋆ (snd ξ) = λ r y sym ( + IsAlgebraHom.pres0 (snd ξ) = IsRingHom.pres0 (snd χ) + IsAlgebraHom.pres1 (snd ξ) = IsRingHom.pres1 (snd χ) + IsAlgebraHom.pres+ (snd ξ) = IsRingHom.pres+ (snd χ) + IsAlgebraHom.pres· (snd ξ) = IsRingHom.pres· (snd χ) + IsAlgebraHom.pres- (snd ξ) = IsRingHom.pres- (snd χ) + IsAlgebraHom.pres⋆ (snd ξ) = λ r y sym ( fst φ r · fst χ y ≡⟨ cong ( fst χ y) (sym (funExt⁻ (cong fst χComm) r)) - fst χ (fst ψ r) · fst χ y ≡⟨ sym (IsRingHom.pres· (snd χ) _ _) + fst χ (fst ψ r) · fst χ y ≡⟨ sym (IsRingHom.pres· (snd χ) _ _) fst χ (fst ψ r · y) ≡⟨ refl fst χ ((r 1a) · y) ≡⟨ cong (fst χ) (⋆AssocL _ _ _) fst χ (r (1a · y)) ≡⟨ cong x fst χ (r x)) (·IdL y) @@ -501,24 +501,24 @@ _ = snd B isConeMorξ : isConeMor cd algCone ξ - isConeMorξ v = AlgebraHom≡ (cong fst (uniqueχ .fst .snd v)) + isConeMorξ v = AlgebraHom≡ (cong fst (uniqueχ .fst .snd v)) - uniqueξ : (ζ : CommAlgebraHom D B) isConeMor cd algCone ζ ξ ζ - uniqueξ ζ isConeMorζ = AlgebraHom≡ (cong (fst fst fst) + uniqueξ : (ζ : CommAlgebraHom D B) isConeMor cd algCone ζ ξ ζ + uniqueξ ζ isConeMorζ = AlgebraHom≡ (cong (fst fst fst) (uniqueχ .snd ((ϑ , triangleϑ) , isConeMorϑ))) where ϑ : CommRingHom C A fst ϑ = fst ζ - IsRingHom.pres0 (snd ϑ) = IsAlgebraHom.pres0 (snd ζ) - IsRingHom.pres1 (snd ϑ) = IsAlgebraHom.pres1 (snd ζ) - IsRingHom.pres+ (snd ϑ) = IsAlgebraHom.pres+ (snd ζ) - IsRingHom.pres· (snd ϑ) = IsAlgebraHom.pres· (snd ζ) - IsRingHom.pres- (snd ϑ) = IsAlgebraHom.pres- (snd ζ) + IsRingHom.pres0 (snd ϑ) = IsAlgebraHom.pres0 (snd ζ) + IsRingHom.pres1 (snd ϑ) = IsAlgebraHom.pres1 (snd ζ) + IsRingHom.pres+ (snd ϑ) = IsAlgebraHom.pres+ (snd ζ) + IsRingHom.pres· (snd ϑ) = IsAlgebraHom.pres· (snd ζ) + IsRingHom.pres- (snd ϑ) = IsAlgebraHom.pres- (snd ζ) triangleϑ : ϑ ∘cr ψ φ - triangleϑ = RingHom≡ (funExt x - IsAlgebraHom.pres⋆ (snd ζ) x 1a - ∙∙ cong (fst φ x ·_) (IsAlgebraHom.pres1 (snd ζ)) + triangleϑ = RingHom≡ (funExt x + IsAlgebraHom.pres⋆ (snd ζ) x 1a + ∙∙ cong (fst φ x ·_) (IsAlgebraHom.pres1 (snd ζ)) ∙∙ ·IdR (fst φ x))) where instance @@ -526,13 +526,13 @@ _ = snd B isConeMorϑ : isConeMor cc crCone ϑ - isConeMorϑ v = RingHom≡ (cong fst (isConeMorζ v)) + isConeMorϑ v = RingHom≡ (cong fst (isConeMorζ v)) module PreSheafFromUniversalProp (C : Category ℓ') (P : ob C Type ) {R : CommRing ℓ''} (𝓕 : Σ (ob C) P CommAlgebra R ℓ'') - (uniqueHom : x y C [ fst x , fst y ] isContr (CommAlgebraHom (𝓕 y) (𝓕 x))) + (uniqueHom : x y C [ fst x , fst y ] isContr (CommAlgebraHom (𝓕 y) (𝓕 x))) where private @@ -541,7 +541,7 @@ ΣC∥P∥Cat = ΣPropCat C ∥P∥ CommAlgCat = CommAlgebrasCategory { = ℓ''} R {ℓ' = ℓ''} - 𝓕UniqueEquiv : (x : ob C) (p q : P x) isContr (CommAlgebraEquiv (𝓕 (x , p)) (𝓕 (x , q))) + 𝓕UniqueEquiv : (x : ob C) (p q : P x) isContr (CommAlgebraEquiv (𝓕 (x , p)) (𝓕 (x , q))) 𝓕UniqueEquiv x = contrCommAlgebraHom→contrCommAlgebraEquiv (curry 𝓕 x) λ p q uniqueHom _ _ (id C) theMap : (x : ob C) P x ∥₁ CommAlgebra R ℓ'' @@ -549,7 +549,7 @@ λ p q r 𝓕UniqueEquiv x p r .snd _ theAction : (x y : ob C) C [ x , y ] - (p : P x ∥₁) (q : P y ∥₁) isContr (CommAlgebraHom (theMap y q) (theMap x p)) + (p : P x ∥₁) (q : P y ∥₁) isContr (CommAlgebraHom (theMap y q) (theMap x p)) theAction _ _ f = elim2 _ _ isPropIsContr) λ _ _ uniqueHom _ _ f open Functor @@ -641,7 +641,7 @@ open Cone private diagHomPathPs : {u v : ob J} (f : J [ u , v ]) - PathP i CommAlgebraHom (p u i) (p v i)) + PathP i CommAlgebraHom (p u i) (p v i)) (F-hom algDiag f) (F-hom universalPShf (F-hom D f)) diagHomPathPs f = toPathP (sym (theAction _ _ (F-hom D f) _ _ .snd _)) @@ -650,7 +650,7 @@ diagPathAlg = Functor≡ p diagHomPathPs coneHomPathPs : (v : ob J) - PathP i CommAlgebraHom (universalPShf .F-ob c) (diagPathAlg i .F-ob v)) + PathP i CommAlgebraHom (universalPShf .F-ob c) (diagPathAlg i .F-ob v)) (algCone .coneOut v) (F-cone universalPShf cc .coneOut v) coneHomPathPs v = toPathP (sym (theAction _ _ (cc .coneOut v) _ _ .snd _)) diff --git a/Cubical.Categories.Instances.CommRings.html b/Cubical.Categories.Instances.CommRings.html index 548b0fbafe..3ab0e14ad3 100644 --- a/Cubical.Categories.Instances.CommRings.html +++ b/Cubical.Categories.Instances.CommRings.html @@ -34,7 +34,7 @@ open Functor open CommRingStr open RingHoms -open IsRingHom +open IsRingHom private variable @@ -48,7 +48,7 @@ ⋆IdL CommRingsCategory {R} {S} = compIdCommRingHom {R = R} {S} ⋆IdR CommRingsCategory {R} {S} = idCompCommRingHom {R = R} {S} ⋆Assoc CommRingsCategory {R} {S} {T} {U} = compAssocCommRingHom {R = R} {S} {T} {U} -isSetHom CommRingsCategory = isSetRingHom _ _ +isSetHom CommRingsCategory = isSetRingHom _ _ ForgetfulCommRing→Set : Functor CommRingsCategory (SET ) F-ob ForgetfulCommRing→Set R = R .fst , CommRingStr.is-set (snd R) @@ -58,29 +58,29 @@ open Iso -CommRingIsoIsoCatIso : {R S : CommRing } Iso (CommRingIso R S) (CatIso CommRingsCategory R S) +CommRingIsoIsoCatIso : {R S : CommRing } Iso (CommRingIso R S) (CatIso CommRingsCategory R S) (fun CommRingIsoIsoCatIso e) .fst = (e .fst .fun) , (e .snd) (fun (CommRingIsoIsoCatIso {R = R} {S}) e) .snd .inv = e .fst .inv - , makeIsRingHom (sym (cong (e .fst .inv) (pres1 (e .snd))) e .fst .leftInv _) + , makeIsRingHom (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))) - ∙∙ sym (pres+ (e .snd) _ _) + ∙∙ 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))) - ∙∙ sym (pres· (e .snd) _ _) + ∙∙ sym (pres· (e .snd) _ _) in injCommRingIso {R = R} {S} e _ _ rem) -(fun CommRingIsoIsoCatIso e) .snd .sec = RingHom≡ (funExt (e .fst .rightInv)) -(fun CommRingIsoIsoCatIso e) .snd .ret = RingHom≡ (funExt (e .fst .leftInv)) +(fun CommRingIsoIsoCatIso e) .snd .sec = RingHom≡ (funExt (e .fst .rightInv)) +(fun CommRingIsoIsoCatIso e) .snd .ret = RingHom≡ (funExt (e .fst .leftInv)) 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 snd (inv CommRingIsoIsoCatIso e) = e .fst .snd -rightInv CommRingIsoIsoCatIso x = CatIso≡ _ _ (RingHom≡ refl) +rightInv CommRingIsoIsoCatIso x = CatIso≡ _ _ (RingHom≡ refl) leftInv (CommRingIsoIsoCatIso {R = R} {S}) x = - Σ≡Prop x isPropIsRingHom (CommRingStr→RingStr (R .snd)) + Σ≡Prop x isPropIsRingHom (CommRingStr→RingStr (R .snd)) (x .fun) (CommRingStr→RingStr (S .snd))) (Iso≡Set (is-set (snd R)) (is-set (snd S)) _ _ _ refl) _ refl)) @@ -93,18 +93,18 @@ ≡≃CatIso : (R S) (CatIso CommRingsCategory R S) ≡≃CatIso = isoToEquiv (compIso (invIso CommRingEquivIso≡) - (compIso (CommRingEquivIsoCommRingIso R S) CommRingIsoIsoCatIso)) + (compIso (CommRingEquivIsoCommRingIso R S) CommRingIsoIsoCatIso)) rem : p ≡≃CatIso .fst p pathToIso p rem p = CatIso≡ _ _ - (RingHom≡ (funExt λ x cong (transport (cong fst p)) (sym (transportRefl x)))) + (RingHom≡ (funExt λ x cong (transport (cong fst p)) (sym (transportRefl x)))) module _ { : Level} where TerminalCommRing : Terminal CommRingsCategory fst TerminalCommRing = UnitCommRing { = } fst (fst (snd TerminalCommRing y)) _ = tt* - snd (fst (snd TerminalCommRing y)) = makeIsRingHom refl _ _ refl) _ _ refl) - snd (snd TerminalCommRing y) f = RingHom≡ (funExt _ refl)) + snd (fst (snd TerminalCommRing y)) = makeIsRingHom refl _ _ refl) _ _ refl) + snd (snd TerminalCommRing y) f = RingHom≡ (funExt _ refl)) open Pullback @@ -136,21 +136,21 @@ lim {J = J} (completeSET J (funcComp ForgetfulCommRing→Set D)) .fst 0r (snd (lim (LimitsCommRingsCategory J D))) = cone v _ 0r (snd (F-ob D v))) - e funExt _ F-hom D e .snd .pres0)) + e funExt _ F-hom D e .snd .pres0)) 1r (snd (lim (LimitsCommRingsCategory J D))) = cone v _ 1r (snd (F-ob D v))) - e funExt _ F-hom D e .snd .pres1)) + e funExt _ F-hom D e .snd .pres1)) _+_ (snd (lim (LimitsCommRingsCategory J D))) x y = cone v _ _+_ (snd (F-ob D v)) _ _) - ( λ e funExt _ F-hom D e .snd .pres+ _ _ + ( λ e funExt _ F-hom D e .snd .pres+ _ _ λ i _+_ (snd (F-ob D _)) (coneOutCommutes x e i tt*) (coneOutCommutes y e i tt*))) _·_ (snd (lim (LimitsCommRingsCategory J D))) x y = cone v _ _·_ (snd (F-ob D v)) _ _) - ( λ e funExt _ F-hom D e .snd .pres· _ _ + ( λ e funExt _ F-hom D e .snd .pres· _ _ λ i _·_ (snd (F-ob D _)) (coneOutCommutes x e i tt*) (coneOutCommutes y e i tt*))) (- snd (lim (LimitsCommRingsCategory J D))) x = cone v _ -_ (snd (F-ob D v)) _) - ( λ e funExt z F-hom D e .snd .pres- _ + ( λ e funExt z F-hom D e .snd .pres- _ λ i -_ (snd (F-ob D _)) (coneOutCommutes x e i tt*))) isCommRing (snd (lim (LimitsCommRingsCategory J D))) = makeIsCommRing @@ -165,25 +165,25 @@ _ _ cone≡ v funExt _ snd (F-ob D v) .·Comm _ _))) fst (coneOut (limCone (LimitsCommRingsCategory J D)) v) = coneOut (limCone (completeSET J (funcComp ForgetfulCommRing→Set D))) v - pres0 (snd (coneOut (limCone (LimitsCommRingsCategory J D)) v)) = refl - pres1 (snd (coneOut (limCone (LimitsCommRingsCategory J D)) v)) = refl - pres+ (snd (coneOut (limCone (LimitsCommRingsCategory J D)) v)) = λ _ _ refl - pres· (snd (coneOut (limCone (LimitsCommRingsCategory J D)) v)) = λ _ _ refl - pres- (snd (coneOut (limCone (LimitsCommRingsCategory J D)) v)) = λ _ refl + pres0 (snd (coneOut (limCone (LimitsCommRingsCategory J D)) v)) = refl + pres1 (snd (coneOut (limCone (LimitsCommRingsCategory J D)) v)) = refl + pres+ (snd (coneOut (limCone (LimitsCommRingsCategory J D)) v)) = λ _ _ refl + pres· (snd (coneOut (limCone (LimitsCommRingsCategory J D)) v)) = λ _ _ refl + pres- (snd (coneOut (limCone (LimitsCommRingsCategory J D)) v)) = λ _ refl coneOutCommutes (limCone (LimitsCommRingsCategory J D)) e = - RingHom≡ (coneOutCommutes (limCone (completeSET J (funcComp ForgetfulCommRing→Set D))) e) + RingHom≡ (coneOutCommutes (limCone (completeSET J (funcComp ForgetfulCommRing→Set D))) e) univProp (LimitsCommRingsCategory J D) c cc = uniqueExists ( x limArrow (completeSET J (funcComp ForgetfulCommRing→Set D)) (fst c , snd c .is-set) (cone v _ coneOut cc v .fst x) e funExt _ funExt⁻ (cong fst (coneOutCommutes cc e)) x))) x) - , makeIsRingHom - (cone≡ v funExt _ coneOut cc v .snd .pres1))) - x y cone≡ v funExt _ coneOut cc v .snd .pres+ _ _))) - x y cone≡ v funExt _ coneOut cc v .snd .pres· _ _)))) - _ RingHom≡ refl) + , makeIsRingHom + (cone≡ v funExt _ coneOut cc v .snd .pres1))) + x y cone≡ v funExt _ coneOut cc v .snd .pres+ _ _))) + x y cone≡ v funExt _ coneOut cc v .snd .pres· _ _)))) + _ RingHom≡ refl) (isPropIsConeMor cc (limCone (LimitsCommRingsCategory J D))) - a' x Σ≡Prop _ isPropIsRingHom _ _ _) + a' x Σ≡Prop _ isPropIsRingHom _ _ _) (funExt y cone≡ λ v funExt _ sym (funExt⁻ (cong fst (x v)) y))))) \ No newline at end of file diff --git a/Cubical.Categories.Instances.DistLattice.html b/Cubical.Categories.Instances.DistLattice.html index fd07e5b60a..5cdd203ada 100644 --- a/Cubical.Categories.Instances.DistLattice.html +++ b/Cubical.Categories.Instances.DistLattice.html @@ -12,5 +12,5 @@ open Category DistLatticeCategory : {} (L : DistLattice ) Category -DistLatticeCategory L = LatticeCategory (DistLattice→Lattice L) +DistLatticeCategory L = LatticeCategory (DistLattice→Lattice L) \ No newline at end of file diff --git a/Cubical.Categories.Instances.Lattice.html b/Cubical.Categories.Instances.Lattice.html index b430202aec..d5c3f998bd 100644 --- a/Cubical.Categories.Instances.Lattice.html +++ b/Cubical.Categories.Instances.Lattice.html @@ -13,5 +13,5 @@ LatticeCategory : {} (L : Lattice ) Category -LatticeCategory L = JoinSemilatticeCategory (Lattice→JoinSemilattice L) +LatticeCategory L = JoinSemilatticeCategory (Lattice→JoinSemilattice L) \ No newline at end of file diff --git a/Cubical.Categories.Instances.RingAlgebras.html b/Cubical.Categories.Instances.RingAlgebras.html index 2c8a3dc806..5100aad67f 100644 --- a/Cubical.Categories.Instances.RingAlgebras.html +++ b/Cubical.Categories.Instances.RingAlgebras.html @@ -19,12 +19,12 @@ module _ (R : Ring ) where AlgebrasCategory : Category (ℓ-suc (ℓ-max ℓ')) (ℓ-max ℓ') - ob AlgebrasCategory = Algebra R _ - Hom[_,_] AlgebrasCategory = AlgebraHom + ob AlgebrasCategory = Algebra R _ + Hom[_,_] AlgebrasCategory = AlgebraHom id AlgebrasCategory {A} = idAlgebraHom A _⋆_ AlgebrasCategory = compAlgebraHom ⋆IdL AlgebrasCategory = compIdAlgebraHom ⋆IdR AlgebrasCategory = idCompAlgebraHom ⋆Assoc AlgebrasCategory = compAssocAlgebraHom - isSetHom AlgebrasCategory = isSetAlgebraHom _ _ + isSetHom AlgebrasCategory = isSetAlgebraHom _ _ \ No newline at end of file diff --git a/Cubical.Categories.Instances.Rings.html b/Cubical.Categories.Instances.Rings.html index 229b7644c0..485c0856a0 100644 --- a/Cubical.Categories.Instances.Rings.html +++ b/Cubical.Categories.Instances.Rings.html @@ -14,11 +14,11 @@ RingsCategory : {} Category (ℓ-suc ) ob RingsCategory = Ring _ -Hom[_,_] RingsCategory = RingHom +Hom[_,_] RingsCategory = RingHom id RingsCategory {R} = idRingHom R _⋆_ RingsCategory = compRingHom ⋆IdL RingsCategory = compIdRingHom ⋆IdR RingsCategory = idCompRingHom ⋆Assoc RingsCategory = compAssocRingHom -isSetHom RingsCategory = isSetRingHom _ _ +isSetHom RingsCategory = isSetRingHom _ _ \ No newline at end of file diff --git a/Cubical.Cohomology.Base.html b/Cubical.Cohomology.Base.html index a8e946c7be..c7aa0d56be 100644 --- a/Cubical.Cohomology.Base.html +++ b/Cubical.Cohomology.Base.html @@ -116,8 +116,8 @@ CohomPath : Cohom' Cohom CohomPath = ΣPathTransport→PathΣ Cohom' Cohom (shiftΩTwicePath , refl) - CohomEquiv : AbGroupEquiv Cohom' Cohom - CohomEquiv = fst (invEquiv (AbGroupPath Cohom' Cohom)) CohomPath + CohomEquiv : AbGroupEquiv Cohom' Cohom + CohomEquiv = fst (invEquiv (AbGroupPath Cohom' Cohom)) CohomPath {- Functoriality in the type argument @@ -131,14 +131,14 @@ fA y = A (f y) - cohomMap' : (k : ) AbGroupHom (Cohom' X A k) (Cohom' Y fA k) + cohomMap' : (k : ) AbGroupHom (Cohom' X A k) (Cohom' Y fA k) cohomMap' k = πHom 1 mapOnClasses -- apply π₂ to a map on cohomology classes where mapOnClasses : CohomClasses X A (k + 2) →∙ CohomClasses Y fA (k + 2) mapOnClasses = l y l (f y))) , refl - cohomMap : (k : ) AbGroupHom (Cohom X A k) (Cohom Y fA k) + cohomMap : (k : ) AbGroupHom (Cohom X A k) (Cohom Y fA k) cohomMap k = compGroupHom (compGroupHom (GroupEquiv→GroupHom (invGroupEquiv (CohomEquiv X A k))) (cohomMap' k)) diff --git a/Cubical.Cohomology.EilenbergMacLane.CupProduct.html b/Cubical.Cohomology.EilenbergMacLane.CupProduct.html index baa98e5ce0..492440c6be 100644 --- a/Cubical.Cohomology.EilenbergMacLane.CupProduct.html +++ b/Cubical.Cohomology.EilenbergMacLane.CupProduct.html @@ -44,7 +44,7 @@ module _ {G'' : Ring } {A : Type ℓ'} where private - G' = Ring→AbGroup G'' + G' = Ring→AbGroup G'' G = fst G' _+G_ = _+Gr_ (snd G') @@ -142,9 +142,9 @@ -- some syntax ⌣[]-syntax : {A : Type } {n m : } (R : Ring ℓ') - coHom n (Ring→AbGroup R) A - coHom m (Ring→AbGroup R) A - coHom (n +' m) (Ring→AbGroup R) A + coHom n (Ring→AbGroup R) A + coHom m (Ring→AbGroup R) A + coHom (n +' m) (Ring→AbGroup R) A ⌣[]-syntax R x y = x y ⌣[]C-syntax : {A : Type } {n m : } (R : CommRing ℓ') @@ -154,9 +154,9 @@ ⌣[]C-syntax R x y = x y ⌣[,,]-syntax : {A : Type } (n m : ) (R : Ring ℓ') - coHom n (Ring→AbGroup R) A - coHom m (Ring→AbGroup R) A - coHom (n +' m) (Ring→AbGroup R) A + coHom n (Ring→AbGroup R) A + coHom m (Ring→AbGroup R) A + coHom (n +' m) (Ring→AbGroup R) A ⌣[,,]-syntax n m R x y = x y ⌣[,,]C-syntax : {A : Type } (n m : ) (R : CommRing ℓ') @@ -188,7 +188,7 @@ module _ {G'' : Ring } {A : Type ℓ'} where private - G' = Ring→AbGroup G'' + G' = Ring→AbGroup G'' ⌣-1ₕDep : (n : ) (x : coHom n G' A) PathP i coHom (+'-comm zero n (~ i)) G' A) (x 1ₕ) x diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.Connected.html b/Cubical.Cohomology.EilenbergMacLane.Groups.Connected.html index f24f527f09..283bc5c9fa 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.Connected.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.Connected.html @@ -61,7 +61,7 @@ a* private - H⁰conn' : AbGroupEquiv G (coHomGr zero G A) + H⁰conn' : AbGroupEquiv G (coHomGr zero G A) fst H⁰conn' = isoToEquiv is where is : Iso _ _ @@ -71,6 +71,6 @@ Iso.leftInv is = G→H⁰→G snd H⁰conn' = makeIsGroupHom λ _ _ refl - H⁰conn : AbGroupEquiv (coHomGr zero G A) G + H⁰conn : AbGroupEquiv (coHomGr zero G A) G H⁰conn = invGroupEquiv H⁰conn' \ No newline at end of file diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.KleinBottle.html b/Cubical.Cohomology.EilenbergMacLane.Groups.KleinBottle.html index 0ab6a2032f..5569105eb2 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.KleinBottle.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.KleinBottle.html @@ -122,7 +122,7 @@ (Iso.fun (PathIdTruncIso 2) (isContr→isProp conB b f point )) ------ H⁰(K²,ℤ/2) ------ -H⁰[K²,ℤ/2]≅ℤ/2 : AbGroupEquiv (coHomGr 0 ℤ/2 KleinBottle) ℤ/2 +H⁰[K²,ℤ/2]≅ℤ/2 : AbGroupEquiv (coHomGr 0 ℤ/2 KleinBottle) ℤ/2 H⁰[K²,ℤ/2]≅ℤ/2 = H⁰conn ( point , (TR.elim _ isOfHLevelPath 2 (isOfHLevelTrunc 2) _ _) @@ -131,12 +131,12 @@ ℤ/2 ------ H¹(K²,ℤ/2) ------ -H¹K²→ℤ/2×ℤ/2 : coHom 1 ℤ/2 KleinBottle fst (dirProdAb ℤ/2 ℤ/2) -H¹K²→ℤ/2×ℤ/2 = ST.rec (is-set (snd (dirProdAb ℤ/2 ℤ/2))) +H¹K²→ℤ/2×ℤ/2 : coHom 1 ℤ/2 KleinBottle fst (dirProdAb ℤ/2 ℤ/2) +H¹K²→ℤ/2×ℤ/2 = ST.rec (is-set (snd (dirProdAb ℤ/2 ℤ/2))) λ f ΩEM+1→EM-gen _ _ (cong f line1) , ΩEM+1→EM-gen _ _ (cong f line2) -ℤ/2×ℤ/2→H¹K² : fst (dirProdAb ℤ/2 ℤ/2) coHom 1 ℤ/2 KleinBottle +ℤ/2×ℤ/2→H¹K² : fst (dirProdAb ℤ/2 ℤ/2) coHom 1 ℤ/2 KleinBottle ℤ/2×ℤ/2→H¹K² (g₁ , g₂) = { point 0ₖ _ ; (line1 i) emloop g₁ i @@ -165,7 +165,7 @@ main = (sym (emloop-inv (ℤGroup/ 2) g₁) cong emloop (-Const-ℤ/2 g₁)) lem g₁ g₂ -ℤ/2×ℤ/2→H¹K²→ℤ/2×ℤ/2 : (x : fst (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₁) @@ -181,7 +181,7 @@ (flipSquare (Iso.rightInv (Iso-EM-ΩEM+1 0) l2))))) ℤ/2×ℤ/2≅H¹[K²,ℤ/2] : - AbGroupEquiv (dirProdAb ℤ/2 ℤ/2) (coHomGr 1 ℤ/2 KleinBottle) + AbGroupEquiv (dirProdAb ℤ/2 ℤ/2) (coHomGr 1 ℤ/2 KleinBottle) fst ℤ/2×ℤ/2≅H¹[K²,ℤ/2] = isoToEquiv is where is : Iso _ _ @@ -198,7 +198,7 @@ sym (cong₂+₁ (emloop (snd x)) (emloop (snd y)))))))) H¹[K²,ℤ/2]≅ℤ/2×ℤ/2 : - AbGroupEquiv (coHomGr 1 ℤ/2 KleinBottle) (dirProdAb ℤ/2 ℤ/2) + AbGroupEquiv (coHomGr 1 ℤ/2 KleinBottle) (dirProdAb ℤ/2 ℤ/2) H¹[K²,ℤ/2]≅ℤ/2×ℤ/2 = invGroupEquiv ℤ/2×ℤ/2≅H¹[K²,ℤ/2] ------ H²(K²,ℤ/2) ------ @@ -322,7 +322,7 @@ (ℤ/2-elim (IsAbGroup.+IdR e 1) (IsAbGroup.+InvR e 1)))) -H²[K²,ℤ/2]≅ℤ/2 : AbGroupEquiv (coHomGr 2 ℤ/2 KleinBottle) ℤ/2 +H²[K²,ℤ/2]≅ℤ/2 : AbGroupEquiv (coHomGr 2 ℤ/2 KleinBottle) ℤ/2 fst H²[K²,ℤ/2]≅ℤ/2 = isoToEquiv is where is : Iso _ _ @@ -357,7 +357,7 @@ refl p .fst)) H³⁺ⁿK²≅0 : (n : ) (G : AbGroup ) - AbGroupEquiv (coHomGr (3 +ℕ n) G KleinBottle) (trivialAbGroup {}) + AbGroupEquiv (coHomGr (3 +ℕ n) G KleinBottle) (trivialAbGroup {}) fst (H³⁺ⁿK²≅0 n G) = isContr→Equiv (isContr-HⁿKleinBottle n G) isContrUnit* snd (H³⁺ⁿK²≅0 n G) = makeIsGroupHom λ _ _ refl \ No newline at end of file diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.RP2.html b/Cubical.Cohomology.EilenbergMacLane.Groups.RP2.html index 4ea3ee99c0..f6bf15028d 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.RP2.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.RP2.html @@ -119,7 +119,7 @@ refl (flipSquare (Iso.rightInv (Iso-EM-ΩEM+1 0) l))))) -H¹[RP²,ℤ/2]≅ℤ/2 : AbGroupEquiv (coHomGr 1 ℤ/2 RP²) ℤ/2 +H¹[RP²,ℤ/2]≅ℤ/2 : AbGroupEquiv (coHomGr 1 ℤ/2 RP²) ℤ/2 fst H¹[RP²,ℤ/2]≅ℤ/2 = isoToEquiv is where is : Iso _ _ @@ -176,7 +176,7 @@ cong ∣_∣₂ (cong (RP²Fun (snd (EM∙ ℤ/2 2)) refl) (Iso.leftInv Iso-Ω²K₂-ℤ/2 sq))) -H²[RP²,ℤ/2]≅ℤ/2 : AbGroupEquiv (coHomGr 2 ℤ/2 RP²) ℤ/2 +H²[RP²,ℤ/2]≅ℤ/2 : AbGroupEquiv (coHomGr 2 ℤ/2 RP²) ℤ/2 fst H²[RP²,ℤ/2]≅ℤ/2 = isoToEquiv is where is : Iso _ _ @@ -196,7 +196,7 @@ ----- Hⁿ(RP²,G), n ≥ 3 ----- H³⁺ⁿ[RP²,G]≅G : (n : ) (G : AbGroup ) - AbGroupEquiv (coHomGr (3 +ℕ n) G RP²) (trivialAbGroup {}) + AbGroupEquiv (coHomGr (3 +ℕ n) G RP²) (trivialAbGroup {}) fst (H³⁺ⁿ[RP²,G]≅G n G) = isoToEquiv (isContr→Iso ( RP²Fun (0ₖ (3 +ℕ n)) refl refl ∣₂ diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.RP2wedgeS1.html b/Cubical.Cohomology.EilenbergMacLane.Groups.RP2wedgeS1.html index 073ba8c5a1..98468aa9ab 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.RP2wedgeS1.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.RP2wedgeS1.html @@ -44,7 +44,7 @@ {- Todo: fix type-checking (very slow right now) -} H⁰[RP²∨S¹,ℤ/2]≅ℤ/2 : - AbGroupEquiv (coHomGr zero ℤ/2 ((RP² , point) S₊∙ 1)) + AbGroupEquiv (coHomGr zero ℤ/2 ((RP² , point) S₊∙ 1)) ℤ/2 H⁰[RP²∨S¹,ℤ/2]≅ℤ/2 = H⁰conn ( inl point @@ -55,8 +55,8 @@ ℤ/2 H¹[RP²∨S¹,ℤ/2]≅ℤ/2×ℤ/2 : - AbGroupEquiv (coHomGr 1 ℤ/2 ((RP² , point) S₊∙ 1)) - (dirProdAb ℤ/2 ℤ/2) + AbGroupEquiv (coHomGr 1 ℤ/2 ((RP² , point) S₊∙ 1)) + (dirProdAb ℤ/2 ℤ/2) H¹[RP²∨S¹,ℤ/2]≅ℤ/2×ℤ/2 = compGroupEquiv (Hⁿ-⋁≅Hⁿ×Hⁿ ℤ/2 0) (GroupEquivDirProd @@ -64,7 +64,7 @@ (H¹[S¹,G]≅G ℤ/2)) H²[RP²∨S¹,ℤ/2]≅ℤ/2 : - AbGroupEquiv (coHomGr 2 ℤ/2 ((RP² , point) S₊∙ 1)) + AbGroupEquiv (coHomGr 2 ℤ/2 ((RP² , point) S₊∙ 1)) ℤ/2 H²[RP²∨S¹,ℤ/2]≅ℤ/2 = compGroupEquiv (Hⁿ-⋁≅Hⁿ×Hⁿ ℤ/2 1) @@ -73,11 +73,11 @@ H²[RP²,ℤ/2]≅ℤ/2 (compGroupEquiv (Hᵐ⁺ⁿ[Sⁿ,G]≅0 ℤ/2 0 0) (contrGroupEquivUnit - {G = AbGroup→Group (trivialAbGroup {ℓ-zero})} isContrUnit*))) + {G = AbGroup→Group (trivialAbGroup {ℓ-zero})} isContrUnit*))) (GroupIso→GroupEquiv (rUnitGroupIso {G = AbGroup→Group ℤ/2}))) H³⁺ⁿ[RP²∨S¹,ℤ/2]≅Unit : (n : ) - AbGroupEquiv (coHomGr (3 +ℕ n) ℤ/2 ((RP² , point) S₊∙ 1)) + AbGroupEquiv (coHomGr (3 +ℕ n) ℤ/2 ((RP² , point) S₊∙ 1)) (UnitAbGroup { = ℓ-zero}) H³⁺ⁿ[RP²∨S¹,ℤ/2]≅Unit n = compGroupEquiv (Hⁿ-⋁≅Hⁿ×Hⁿ ℤ/2 (2 +ℕ n)) diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.Sn.html b/Cubical.Cohomology.EilenbergMacLane.Groups.Sn.html index b69142ab26..613b78c43e 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.Sn.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.Sn.html @@ -92,7 +92,7 @@ G→H¹S¹ : fst G coHom 1 G G→H¹S¹ g = S¹fun (0ₖ 1) (emloop g) ∣₂ - H¹[S¹,G]≅G : AbGroupEquiv (coHomGr 1 G ) G + H¹[S¹,G]≅G : AbGroupEquiv (coHomGr 1 G ) G fst H¹[S¹,G]≅G = isoToEquiv is where is : Iso _ _ @@ -125,7 +125,7 @@ HⁿSⁿ↑ n = ST.map (liftMap n) Hⁿ[Sⁿ,G]≅Hⁿ⁺¹[Sⁿ⁺¹,G] : (n : ) - AbGroupEquiv (coHomGr (suc n) G (S₊ (suc n))) + AbGroupEquiv (coHomGr (suc n) G (S₊ (suc n))) (coHomGr (suc (suc n)) G (S₊ (suc (suc n)))) fst (Hⁿ[Sⁿ,G]≅Hⁿ⁺¹[Sⁿ⁺¹,G] n) = isoToEquiv is where @@ -177,7 +177,7 @@ sym (cong₂+₂ _ (EM→ΩEM+1 (suc n) (f a)) (EM→ΩEM+1 (suc n) (g a)))) j i})) - Hⁿ[Sⁿ,G]≅G : (n : ) AbGroupEquiv (coHomGr (suc n) G (S₊ (suc n))) G + Hⁿ[Sⁿ,G]≅G : (n : ) AbGroupEquiv (coHomGr (suc n) G (S₊ (suc n))) G Hⁿ[Sⁿ,G]≅G zero = H¹[S¹,G]≅G Hⁿ[Sⁿ,G]≅G (suc n) = compGroupEquiv (invGroupEquiv (Hⁿ[Sⁿ,G]≅Hⁿ⁺¹[Sⁿ⁺¹,G] n)) @@ -224,8 +224,8 @@ _ _))) Hᵐ⁺ⁿ[Sⁿ,G]≅0 : (n m : ) - AbGroupEquiv (coHomGr ((suc m) +ℕ suc n) G (S₊ (suc n))) - (trivialAbGroup {ℓ-zero}) + AbGroupEquiv (coHomGr ((suc m) +ℕ suc n) G (S₊ (suc n))) + (trivialAbGroup {ℓ-zero}) fst (Hᵐ⁺ⁿ[Sⁿ,G]≅0 zero m) = isoToEquiv (isContr→Iso (isContr-Hᵐ⁺ⁿ[Sⁿ,G] 0 m) isContrUnit*) snd (Hᵐ⁺ⁿ[Sⁿ,G]≅0 zero m) = @@ -236,8 +236,8 @@ snd (Hᵐ⁺ⁿ[Sⁿ,G]≅0 (suc n) m) = makeIsGroupHom λ _ _ refl Hⁿ[Sᵐ⁺ⁿ,G]≅0 : (n m : ) - AbGroupEquiv (coHomGr (suc n) G (S₊ ((suc m) +ℕ suc n))) - (trivialAbGroup {ℓ-zero}) + AbGroupEquiv (coHomGr (suc n) G (S₊ ((suc m) +ℕ suc n))) + (trivialAbGroup {ℓ-zero}) fst (Hⁿ[Sᵐ⁺ⁿ,G]≅0 zero m) = isoToEquiv (isContr→Iso diff --git a/Cubical.Cohomology.EilenbergMacLane.Groups.Wedge.html b/Cubical.Cohomology.EilenbergMacLane.Groups.Wedge.html index 39c38f1bd5..81879beca6 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Groups.Wedge.html +++ b/Cubical.Cohomology.EilenbergMacLane.Groups.Wedge.html @@ -40,7 +40,7 @@ private ×H : (n : ) AbGroup _ - ×H n = dirProdAb (coHomGr (suc n) G (fst A)) + ×H n = dirProdAb (coHomGr (suc n) G (fst A)) (coHomGr (suc n) G (fst B)) Hⁿ×→Hⁿ-⋁ : (n : ) (A B EM G (suc n)) @@ -127,9 +127,9 @@ (pgen (inl (pt A)) i)) Hⁿ-⋁≅Hⁿ×Hⁿ : (n : ) - AbGroupEquiv + AbGroupEquiv (coHomGr (suc n) G (A B)) - (dirProdAb (coHomGr (suc n) G (fst A)) (coHomGr (suc n) G (fst B))) + (dirProdAb (coHomGr (suc n) G (fst A)) (coHomGr (suc n) G (fst B))) fst (Hⁿ-⋁≅Hⁿ×Hⁿ n) = isoToEquiv (Hⁿ⋁-Iso n) snd (Hⁿ-⋁≅Hⁿ×Hⁿ n) = makeIsGroupHom diff --git a/Cubical.Cohomology.EilenbergMacLane.RingStructure.html b/Cubical.Cohomology.EilenbergMacLane.RingStructure.html index 3f7e47fd31..1682b8f6fe 100644 --- a/Cubical.Cohomology.EilenbergMacLane.RingStructure.html +++ b/Cubical.Cohomology.EilenbergMacLane.RingStructure.html @@ -43,7 +43,7 @@ module _ (R : Ring ℓ') (A : Type ) where private - R-ab = Ring→AbGroup R + R-ab = Ring→AbGroup R H*R : Ring _ H*R = ⊕HITgradedRing-Ring @@ -72,7 +72,7 @@ (e : Iso X Y) where private - R-ab = Ring→AbGroup R + R-ab = Ring→AbGroup R open IsGroupHom @@ -103,7 +103,7 @@ ; is-set to isSetH*Y ) - coHomGr-Iso : {n : } AbGroupIso (coHomGr n R-ab X) (coHomGr n R-ab Y) + coHomGr-Iso : {n : } AbGroupIso (coHomGr n R-ab X) (coHomGr n R-ab Y) fst (coHomGr-Iso {n}) = is where is : Iso (coHom n R-ab X) (coHom n R-ab Y) @@ -176,7 +176,7 @@ where open CohomologyRing-Equiv {R = R} e - CohomologyRing-Equiv : RingEquiv (H*R R X) (H*R R Y) + CohomologyRing-Equiv : RingEquiv (H*R R X) (H*R R Y) fst CohomologyRing-Equiv = isoToEquiv is where is : Iso (H* R X) (H* R Y) @@ -185,5 +185,5 @@ rightInv is = e-sect leftInv is = e-retr snd CohomologyRing-Equiv = - makeIsRingHom H*-X→H*-Y-pres1 H*-X→H*-Y-pres+ H*-X→H*-Y-pres· + makeIsRingHom H*-X→H*-Y-pres1 H*-X→H*-Y-pres+ H*-X→H*-Y-pres· \ No newline at end of file diff --git a/Cubical.Cohomology.EilenbergMacLane.Rings.KleinBottle.html b/Cubical.Cohomology.EilenbergMacLane.Rings.KleinBottle.html index 5f7b1552ea..4bfb3caf30 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Rings.KleinBottle.html +++ b/Cubical.Cohomology.EilenbergMacLane.Rings.KleinBottle.html @@ -584,7 +584,7 @@ -- Some abstract stuff for faster type checking abstract - H²[K²,ℤ/2]≅ℤ/2* : AbGroupEquiv (coHomGr 2 ℤ/2 KleinBottle) ℤ/2 + H²[K²,ℤ/2]≅ℤ/2* : AbGroupEquiv (coHomGr 2 ℤ/2 KleinBottle) ℤ/2 H²[K²,ℤ/2]≅ℤ/2* = H²[K²,ℤ/2]≅ℤ/2 H²[K²,ℤ/2]≅ℤ/2*≡ : H²[K²,ℤ/2]≅ℤ/2* H²[K²,ℤ/2]≅ℤ/2 @@ -605,7 +605,7 @@ _ is-set (snd ℤ/2[X,Y]R) _ _) refl r a cong (base r) (-Const-ℤ/2 _)) - λ {x} {y} p q GroupTheory.invDistr (Ring→Group ℤ/2[X,Y]R) x y + λ {x} {y} p q GroupTheory.invDistr (Ring→Group ℤ/2[X,Y]R) x y addComm _ _ cong₂ _add_ p q @@ -640,15 +640,15 @@ _·Z/_ = _·r_ (snd (CommRing→Ring ℤ/2[X,Y]/<X³,Y²,XY+X²>)) makeHomℤ[X,Y] : {ℓ'} {R : Ring ℓ'} (f : fst ℤ/2[X,Y] fst R) - IsRingHom (snd (CommRing→Ring ℤ/2[X,Y])) f (snd R) + IsRingHom (snd (CommRing→Ring ℤ/2[X,Y])) f (snd R) f (base (3 (0 [])) 1) 0r (snd R) f (base (0 (2 [])) 1) 0r (snd R) f ((base (1 (1 [])) 1) add (base (2 (0 [])) 1)) 0r (snd R) - RingHom (CommRing→Ring ℤ/2[X,Y]/<X³,Y²,XY+X²>) R + RingHom (CommRing→Ring ℤ/2[X,Y]/<X³,Y²,XY+X²>) R makeHomℤ[X,Y] {R = R} f ishom id1 id2 id3 = x fst k x) - , makeIsRingHom (IsRingHom.pres1 (snd k)) - x y IsRingHom.pres+ (snd k) x y) - λ x y IsRingHom.pres· (snd k) x y + , makeIsRingHom (IsRingHom.pres1 (snd k)) + x y IsRingHom.pres+ (snd k) x y) + λ x y IsRingHom.pres· (snd k) x y where -- verbose definition (speeds up type checking a bit) k = Quotient-FGideal-CommRing-Ring.inducedHom @@ -714,10 +714,10 @@ -- Homomorphism proof isHomℤ/2[X,Y]→H*Klein : - IsRingHom (snd ℤ/2[X,Y]R) + IsRingHom (snd ℤ/2[X,Y]R) ℤ/2[X,Y]→H*Klein-fun (snd (H*R ℤ/2Ring KleinBottle)) -isHomℤ/2[X,Y]→H*Klein = makeIsRingHom refl _ _ refl) +isHomℤ/2[X,Y]→H*Klein = makeIsRingHom refl _ _ refl) (DS-Ind-Prop.f _ _ _ _ _ isPropΠ λ _ trunc _ _) y cong ℤ/2[X,Y]→H*Klein-fun @@ -830,14 +830,14 @@ -- Induced map ℤ/2[X,Y]/I → H*(K²,ℤ/2) ℤ/2[X,Y]/I→H*Klein : - RingHom (CommRing→Ring ℤ/2[X,Y]/<X³,Y²,XY+X²>) + RingHom (CommRing→Ring ℤ/2[X,Y]/<X³,Y²,XY+X²>) (H*R ℤ/2Ring KleinBottle) ℤ/2[X,Y]/I→H*Klein = makeHomℤ[X,Y] ℤ/2[X,Y]→H*Klein-fun isHomℤ/2[X,Y]→H*Klein (base-neutral _) (base-neutral _) - (IsRingHom.pres+ isHomℤ/2[X,Y]→H*Klein + (IsRingHom.pres+ isHomℤ/2[X,Y]→H*Klein (base (1 (1 [])) 1) (base (2 (0 [])) 1) base-add 2 _ _ cong (base 2) @@ -870,7 +870,7 @@ ; (suc (suc (suc r))) refl}) λ { zero a b cong [_] (base-add _ _ _ cong (base (0 0 [])) (sym (IsGroupHom.pres· (snd (H⁰[K²,ℤ/2]≅ℤ/2)) a b))) - ; one a b cong [_] (move4 _ _ _ _ _add_ addAssoc addComm + ; one a b cong [_] (move4 _ _ _ _ _add_ addAssoc addComm cong₂ _add_ (base-add _ _ _ cong (base (1 0 [])) (cong fst (sym (IsGroupHom.pres· (snd (H¹[K²,ℤ/2]≅ℤ/2×ℤ/2)) a b)))) @@ -883,7 +883,7 @@ -- The equivalence ℤ/2[X,Y]/<X³,Y²,XY+X²>≅H*KleinBottle : - RingEquiv (CommRing→Ring ℤ/2[X,Y]/<X³,Y²,XY+X²>) + RingEquiv (CommRing→Ring ℤ/2[X,Y]/<X³,Y²,XY+X²>) (H*R ℤ/2Ring KleinBottle) fst ℤ/2[X,Y]/<X³,Y²,XY+X²>≅H*KleinBottle = isoToEquiv is where @@ -902,7 +902,7 @@ (isContr→isProp (isContr-HⁿKleinBottle r ℤ/2) (0ₕ (3 + r)) a)}) λ {x} {y} ind1 ind2 - IsRingHom.pres+ (ℤ/2[X,Y]/I→H*Klein .snd) + IsRingHom.pres+ (ℤ/2[X,Y]/I→H*Klein .snd) (H*Klein→ℤ/2[X,Y]/I x) (H*Klein→ℤ/2[X,Y]/I y) cong₂ _add_ ind1 ind2 where @@ -968,7 +968,7 @@ (cong₂ _add_ (cong (base (1 0 [])) (cong fst id)) (cong (base (0 1 [])) (cong snd id))) - IsRingHom.pres+ (snd ℤ/2[X,Y]/I→H*Klein) + IsRingHom.pres+ (snd ℤ/2[X,Y]/I→H*Klein) [ base (1 0 []) 1 ] [ base (0 1 []) 1 ] cong₂ _add_ (cong (base one) (⌣-1ₕ 1 (incL 1) transportRefl K²gen.α)) @@ -1157,7 +1157,7 @@ snd ℤ/2[X,Y]/<X³,Y²,XY+X²>≅H*KleinBottle = ℤ/2[X,Y]/I→H*Klein .snd H*KleinBottle≅ℤ/2[X,Y]/<X³,Y²,XY+X²> : - RingEquiv (H*R ℤ/2Ring KleinBottle) + RingEquiv (H*R ℤ/2Ring KleinBottle) (CommRing→Ring ℤ/2[X,Y]/<X³,Y²,XY+X²>) H*KleinBottle≅ℤ/2[X,Y]/<X³,Y²,XY+X²> = RingEquivs.invRingEquiv ℤ/2[X,Y]/<X³,Y²,XY+X²>≅H*KleinBottle diff --git a/Cubical.Cohomology.EilenbergMacLane.Rings.RP2wedgeS1.html b/Cubical.Cohomology.EilenbergMacLane.Rings.RP2wedgeS1.html index d2a7272b94..ec033ffd1c 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Rings.RP2wedgeS1.html +++ b/Cubical.Cohomology.EilenbergMacLane.Rings.RP2wedgeS1.html @@ -270,10 +270,10 @@ ℤ/2[x,y]/<y³,xy,x²> = fst ℤ/2[X,Y]/<Y³,XY,X²> module Equiv-RP²∨S¹-Properties - (e₀ : AbGroupIso ℤ/2 (coHomGr 0 ℤ/2 RP²∨S¹)) - (e₁ : AbGroupIso (dirProdAb ℤ/2 ℤ/2) (coHomGr 1 ℤ/2 RP²∨S¹)) - (e₂ : AbGroupIso ℤ/2 (coHomGr 2 ℤ/2 RP²∨S¹)) - (eₙ₊₃ : (n : ) (3 n) AbGroupIso (coHomGr n ℤ/2 RP²∨S¹) (UnitAbGroup { = ℓ-zero})) + (e₀ : AbGroupIso ℤ/2 (coHomGr 0 ℤ/2 RP²∨S¹)) + (e₁ : AbGroupIso (dirProdAb ℤ/2 ℤ/2) (coHomGr 1 ℤ/2 RP²∨S¹)) + (e₂ : AbGroupIso ℤ/2 (coHomGr 2 ℤ/2 RP²∨S¹)) + (eₙ₊₃ : (n : ) (3 n) AbGroupIso (coHomGr n ℤ/2 RP²∨S¹) (UnitAbGroup { = ℓ-zero})) where @@ -603,14 +603,14 @@ ℤ/2[x,y]→H*-RP²∨S¹-cancel one = refl ℤ/2[x,y]→H*-RP²∨S¹-cancel two = refl - ℤ/2[X,Y]→H*-RP²∨S¹ : RingHom (CommRing→Ring ℤ/2[X,Y]) (H*Rℤ/2 RP²∨S¹) + ℤ/2[X,Y]→H*-RP²∨S¹ : RingHom (CommRing→Ring ℤ/2[X,Y]) (H*Rℤ/2 RP²∨S¹) fst ℤ/2[X,Y]→H*-RP²∨S¹ = ℤ/2[x,y]→H*-RP²∨S¹ - snd ℤ/2[X,Y]→H*-RP²∨S¹ = makeIsRingHom ℤ/2[x,y]→H*-RP²∨S¹-pres1 + snd ℤ/2[X,Y]→H*-RP²∨S¹ = makeIsRingHom ℤ/2[x,y]→H*-RP²∨S¹-pres1 ℤ/2[x,y]→H*-RP²∨S¹-pres+ ℤ/2[x,y]→H*-RP²∨S¹-pres· -- hence not a trivial pres+, yet pres0 still is - ℤ/2[X,Y]/<Y³,XY,X²>→H*R-RP²∨S¹ : RingHom (CommRing→Ring ℤ/2[X,Y]/<Y³,XY,X²>) (H*Rℤ/2 RP²∨S¹) + ℤ/2[X,Y]/<Y³,XY,X²>→H*R-RP²∨S¹ : RingHom (CommRing→Ring ℤ/2[X,Y]/<Y³,XY,X²>) (H*Rℤ/2 RP²∨S¹) ℤ/2[X,Y]/<Y³,XY,X²>→H*R-RP²∨S¹ = Quotient-FGideal-CommRing-Ring.inducedHom ℤ/2[X,Y] (H*Rℤ/2 RP²∨S¹) ℤ/2[X,Y]→H*-RP²∨S¹ <Y³,XY,X²> ℤ/2[x,y]→H*-RP²∨S¹-cancel @@ -624,7 +624,7 @@ ℤ/2[x,y]/<y³,xy,x²>→H*-RP²∨S¹-pres+ : (x y : ℤ/2[x,y]/<y³,xy,x²>) ℤ/2[x,y]/<y³,xy,x²>→H*-RP²∨S¹ ( x +Pℤ/2I y) ℤ/2[x,y]/<y³,xy,x²>→H*-RP²∨S¹ x +H* ℤ/2[x,y]/<y³,xy,x²>→H*-RP²∨S¹ y - ℤ/2[x,y]/<y³,xy,x²>→H*-RP²∨S¹-pres+ x y = IsRingHom.pres+ (snd ℤ/2[X,Y]/<Y³,XY,X²>→H*R-RP²∨S¹) x y + ℤ/2[x,y]/<y³,xy,x²>→H*-RP²∨S¹-pres+ x y = IsRingHom.pres+ (snd ℤ/2[X,Y]/<Y³,XY,X²>→H*R-RP²∨S¹) x y ----------------------------------------------------------------------------- @@ -755,8 +755,8 @@ (invGroupIso (GroupEquiv→GroupIso H⁰[RP²∨S¹,ℤ/2]≅ℤ/2)) (invGroupIso (GroupEquiv→GroupIso H¹[RP²∨S¹,ℤ/2]≅ℤ/2×ℤ/2)) (invGroupIso (GroupEquiv→GroupIso H²[RP²∨S¹,ℤ/2]≅ℤ/2)) - n uncurry λ x J n _ AbGroupIso (coHomGr n ℤ/2 RP²∨S¹) UnitAbGroup) - (subst m AbGroupIso (coHomGr m ℤ/2 RP²∨S¹) UnitAbGroup) (+-comm 3 x) + n uncurry λ x J n _ AbGroupIso (coHomGr n ℤ/2 RP²∨S¹) UnitAbGroup) + (subst m AbGroupIso (coHomGr m ℤ/2 RP²∨S¹) UnitAbGroup) (+-comm 3 x) (GroupEquiv→GroupIso (H³⁺ⁿ[RP²∨S¹,ℤ/2]≅Unit x)))) ϕ₁Idα : ϕ₁ (1 , 0) α @@ -787,7 +787,7 @@ open CompPoperties refl ϕ₁≡₄ ϕ₁≡₃ ϕ₁≡₁ ϕ₁≡₂ - RP²∨S¹-CohomologyRing : RingEquiv (CommRing→Ring ℤ/2[X,Y]/<Y³,XY,X²>) (H*R ℤ/2Ring RP²∨S¹) + RP²∨S¹-CohomologyRing : RingEquiv (CommRing→Ring ℤ/2[X,Y]/<Y³,XY,X²>) (H*R ℤ/2Ring RP²∨S¹) fst RP²∨S¹-CohomologyRing = isoToEquiv is where is : Iso _ _ diff --git a/Cubical.Cohomology.EilenbergMacLane.Rings.Z2-properties.html b/Cubical.Cohomology.EilenbergMacLane.Rings.Z2-properties.html index 73819cf58e..8509103056 100644 --- a/Cubical.Cohomology.EilenbergMacLane.Rings.Z2-properties.html +++ b/Cubical.Cohomology.EilenbergMacLane.Rings.Z2-properties.html @@ -68,7 +68,7 @@ _⌣ℤ/2_ : {n m : } coHom n ℤ/2 X coHom m ℤ/2 X coHom (n +' m) ℤ/2 X _⌣ℤ/2_ x y = _⌣_ {G'' = ℤ/2Ring} x y - unitGroupEq : {n : } (e : AbGroupIso (coHomGr n ℤ/2 X) (UnitAbGroup { = ℓ-zero})) + unitGroupEq : {n : } (e : AbGroupIso (coHomGr n ℤ/2 X) (UnitAbGroup { = ℓ-zero})) (x y : coHom n ℤ/2 X) x y unitGroupEq {n} e x y = isOfHLevelRetractFromIso {ℓ' = ℓ-zero} 1 (fst e) isPropUnit* _ _ diff --git a/Cubical.Experiments.ZCohomologyOld.Properties.html b/Cubical.Experiments.ZCohomologyOld.Properties.html index a543c3a3cd..5a2c598126 100644 --- a/Cubical.Experiments.ZCohomologyOld.Properties.html +++ b/Cubical.Experiments.ZCohomologyOld.Properties.html @@ -460,7 +460,7 @@ where abstract helper : IsGroup {G = coHom n A} (0ₕ n) x y x +[ n ]ₕ y) x -[ n ]ₕ x) - helper = makeIsGroup § x y z sym (assocₕ n x y z)) (rUnitₕ n) (lUnitₕ n) (rCancelₕ n) (lCancelₕ n) + helper = makeIsGroup § x y z sym (assocₕ n x y z)) (rUnitₕ n) (lUnitₕ n) (rCancelₕ n) (lCancelₕ n) ×coHomGr : (n : ) (A : Type ) (B : Type ℓ') Group _ ×coHomGr n A B = DirProd (coHomGr n A) (coHomGr n B) diff --git a/Cubical.Homotopy.EilenbergMacLane.CupProduct.html b/Cubical.Homotopy.EilenbergMacLane.CupProduct.html index b9cb5d431f..1c47381f5e 100644 --- a/Cubical.Homotopy.EilenbergMacLane.CupProduct.html +++ b/Cubical.Homotopy.EilenbergMacLane.CupProduct.html @@ -44,11 +44,11 @@ module _ {G'' : Ring } where private - G' = Ring→AbGroup G'' + G' = Ring→AbGroup G'' G = fst G' _+G_ = _+Gr_ (snd G') - TensorMult3Homₗ : AbGroupHom ((G' G') G') G' + TensorMult3Homₗ : AbGroupHom ((G' G') G') G' TensorMult3Homₗ = compGroupHom (inducedHom⨂ TensorMultHom (idGroupHom {G = (AbGroup→Group G')})) @@ -176,27 +176,27 @@ λ p q r s cong₂ _+G_ r s)) ⌣[]ₖ-syntax : {} {n m : } (R : Ring ) - EM (Ring→AbGroup R) n - EM (Ring→AbGroup R) m - EM (Ring→AbGroup R) (n +' m) + EM (Ring→AbGroup R) n + EM (Ring→AbGroup R) m + EM (Ring→AbGroup R) (n +' m) ⌣[]ₖ-syntax R x y = x ⌣ₖ y ⌣[]Cₖ-syntax : {} {n m : } (R : CommRing ) - EM (Ring→AbGroup (CommRing→Ring R)) n - EM (Ring→AbGroup (CommRing→Ring R)) m - EM (Ring→AbGroup (CommRing→Ring R)) (n +' m) + EM (Ring→AbGroup (CommRing→Ring R)) n + EM (Ring→AbGroup (CommRing→Ring R)) m + EM (Ring→AbGroup (CommRing→Ring R)) (n +' m) ⌣[]Cₖ-syntax R x y = x ⌣ₖ y ⌣[,,]ₖ-syntax : {} (n m : ) (R : Ring ) - EM (Ring→AbGroup R) n - EM (Ring→AbGroup R) m - EM (Ring→AbGroup R) (n +' m) + EM (Ring→AbGroup R) n + EM (Ring→AbGroup R) m + EM (Ring→AbGroup R) (n +' m) ⌣[,,]ₖ-syntax n m R x y = x ⌣ₖ y ⌣[,,]Cₖ-syntax : {} (n m : ) (R : CommRing ) - EM (Ring→AbGroup (CommRing→Ring R)) n - EM (Ring→AbGroup (CommRing→Ring R)) m - EM (Ring→AbGroup (CommRing→Ring R)) (n +' m) + EM (Ring→AbGroup (CommRing→Ring R)) n + EM (Ring→AbGroup (CommRing→Ring R)) m + EM (Ring→AbGroup (CommRing→Ring R)) (n +' m) ⌣[,,]Cₖ-syntax n m R x y = x ⌣ₖ y syntax ⌣[]ₖ-syntax R x y = x ⌣[ R ]ₖ y diff --git a/Cubical.Homotopy.EilenbergMacLane.CupProductTensor.html b/Cubical.Homotopy.EilenbergMacLane.CupProductTensor.html index a01e41cc11..fadfb5bee3 100644 --- a/Cubical.Homotopy.EilenbergMacLane.CupProductTensor.html +++ b/Cubical.Homotopy.EilenbergMacLane.CupProductTensor.html @@ -269,8 +269,8 @@ module Neutral {G'' : Ring } {H'' : Ring ℓ'} where private open RingStr renaming (_+_ to _+R_) - G' = Ring→AbGroup G'' - H' = Ring→AbGroup H'' + G' = Ring→AbGroup G'' + H' = Ring→AbGroup H'' G = fst G'' H = fst H'' @@ -544,7 +544,7 @@ x y isOfHLevelPath ((2 + n) + (2 + n)) (transport i isOfHLevel (((λ i (+-comm n 2 (~ i) + (2 + n))) sym (+-assoc n 2 (2 + n))) (~ i)) - (EM∙ H' (suc m) →∙ EM∙ ((fst (AbGroupPath (G' H') (H' G'))) ⨂-comm (~ i)) + (EM∙ H' (suc m) →∙ EM∙ ((fst (AbGroupPath (G' H') (H' G'))) ⨂-comm (~ i)) ((+'-comm (suc m) (suc (suc n))) i))) (isOfHLevelPlus n (LeftDistributivity.hLevLem m (suc (suc n))))) _ _) @@ -1511,7 +1511,7 @@ -- Miscellaneous lemmas ⌣ₖ-AbGroupHom-Distr : { ℓ' ℓ'' ℓ'''} {G : AbGroup } {H : AbGroup ℓ'} {G' : AbGroup ℓ''} {H' : AbGroup ℓ'''} - (ϕ : AbGroupHom G G') (ψ : AbGroupHom H H') + (ϕ : AbGroupHom G G') (ψ : AbGroupHom H H') (n m : ) (x : EM G n) (y : EM H m) (inducedFun-EM ϕ n x) ⌣ₖ (inducedFun-EM ψ m y) diff --git a/Cubical.Homotopy.EilenbergMacLane.GradedCommTensor.html b/Cubical.Homotopy.EilenbergMacLane.GradedCommTensor.html index 84914d1a3e..1122467a37 100644 --- a/Cubical.Homotopy.EilenbergMacLane.GradedCommTensor.html +++ b/Cubical.Homotopy.EilenbergMacLane.GradedCommTensor.html @@ -374,7 +374,7 @@ -- induced by homs G → H -ₖ^<_·_>-Induced : { ℓ'} {G : AbGroup } {H : AbGroup ℓ'} (n m k : ) (p : isEvenT n isOddT n) (q : isEvenT m isOddT m) - (ϕ : AbGroupHom G H) (x : EM G k) + (ϕ : AbGroupHom G H) (x : EM G k) inducedFun-EM ϕ k (-ₖ^< n · m > k p q x) -ₖ^< n · m > k p q (inducedFun-EM ϕ k x) -ₖ^< n · m >-Induced k (inl x₁) q ϕ x = @@ -458,7 +458,7 @@ comm⨂-EM≡comm⨂-EM' n = funExt⁻ (cong F inducedFun-EM F n) h) where - h : Path (AbGroupHom (H' G') (G' H')) + h : Path (AbGroupHom (H' G') (G' H')) (GroupEquiv→GroupHom ⨂-comm) (GroupEquiv→GroupHom (invGroupEquiv ⨂-comm)) h = Σ≡Prop _ isPropIsGroupHom _ _) refl diff --git a/Cubical.Homotopy.EilenbergMacLane.Properties.html b/Cubical.Homotopy.EilenbergMacLane.Properties.html index c1a68c5b50..ca9cdeca97 100644 --- a/Cubical.Homotopy.EilenbergMacLane.Properties.html +++ b/Cubical.Homotopy.EilenbergMacLane.Properties.html @@ -725,7 +725,7 @@ -- A homomorphism φ : G → H of AbGroups induces a homomorphism -- φ' : K(G,n) → K(H,n) inducedFun-EM-raw : {G' : AbGroup } {H' : AbGroup ℓ'} - AbGroupHom G' H' + AbGroupHom G' H' n EM-raw G' n EM-raw H' n inducedFun-EM-raw f = @@ -754,7 +754,7 @@ inducedFun-EM-raw-id (suc (suc n)) (merid a i) j = merid (inducedFun-EM-raw-id (suc n) a j) i inducedFun-EM-raw-comp : {G' : AbGroup } {H' : AbGroup ℓ'} {L' : AbGroup ℓ''} - (ϕ : AbGroupHom G' H') (ψ : AbGroupHom H' L') (n : ) + (ϕ : AbGroupHom G' H') (ψ : AbGroupHom H' L') (n : ) (x : EM-raw G' n) inducedFun-EM-raw (compGroupHom ϕ ψ) n x inducedFun-EM-raw ψ n (inducedFun-EM-raw ϕ n x) inducedFun-EM-raw-comp ϕ ψ zero x = refl @@ -767,7 +767,7 @@ merid (inducedFun-EM-raw-comp ϕ ψ (suc n) a j) i inducedFun-EM : {G' : AbGroup } {H' : AbGroup ℓ'} - AbGroupHom G' H' + AbGroupHom G' H' n EM G' n EM H' n inducedFun-EM f zero = inducedFun-EM-raw f zero @@ -775,7 +775,7 @@ inducedFun-EM f (suc (suc n)) = Trunc.map (inducedFun-EM-raw f (2 + n)) EM-raw→EM-funct : {G : AbGroup } {H : AbGroup ℓ'} - (n : ) (ψ : AbGroupHom G H) (y : EM-raw G n) + (n : ) (ψ : AbGroupHom G H) (y : EM-raw G n) EM-raw→EM _ _ (inducedFun-EM-raw ψ n y) inducedFun-EM ψ n (EM-raw→EM _ _ y) EM-raw→EM-funct zero ψ y = refl @@ -791,7 +791,7 @@ λ x cong ∣_∣ₕ (inducedFun-EM-raw-id _ x) inducedFun-EM-comp : {G' : AbGroup } {H' : AbGroup ℓ'} {L' : AbGroup ℓ''} - (ϕ : AbGroupHom G' H') (ψ : AbGroupHom H' L') (n : ) + (ϕ : AbGroupHom G' H') (ψ : AbGroupHom H' L') (n : ) (x : EM G' n) inducedFun-EM (compGroupHom ϕ ψ) n x inducedFun-EM ψ n (inducedFun-EM ϕ n x) inducedFun-EM-comp ϕ ψ zero x = refl @@ -800,14 +800,14 @@ Trunc.elim _ isOfHLevelPath (4 + n) (hLevelEM _ (suc (suc n))) _ _) λ x cong ∣_∣ₕ (inducedFun-EM-raw-comp ϕ ψ (suc (suc n)) x) -inducedFun-EM0ₖ : {G' : AbGroup } {H' : AbGroup ℓ'} {ϕ : AbGroupHom G' H'} (n : ) +inducedFun-EM0ₖ : {G' : AbGroup } {H' : AbGroup ℓ'} {ϕ : AbGroupHom G' H'} (n : ) inducedFun-EM ϕ n (0ₖ n) 0ₖ n inducedFun-EM0ₖ {ϕ = ϕ} zero = IsGroupHom.pres1 (snd ϕ) inducedFun-EM0ₖ (suc zero) = refl inducedFun-EM0ₖ (suc (suc n)) = refl inducedFun-EM-pres+ₖ : {G' : AbGroup } {H' : AbGroup ℓ'} - (ϕ : AbGroupHom G' H') (n : ) (x y : EM G' n) + (ϕ : AbGroupHom G' H') (n : ) (x y : EM G' n) inducedFun-EM ϕ n (x +ₖ y) inducedFun-EM ϕ n x +ₖ inducedFun-EM ϕ n y inducedFun-EM-pres+ₖ ϕ zero x y = IsGroupHom.pres· (snd ϕ) x y inducedFun-EM-pres+ₖ {G' = G'} {H' = H'} ϕ (suc n) = @@ -858,7 +858,7 @@ l≡r (suc n) = refl inducedFun-EM-pres-ₖ : {G' : AbGroup } {H' : AbGroup ℓ'} - (ϕ : AbGroupHom G' H') (n : ) (x : EM G' n) + (ϕ : AbGroupHom G' H') (n : ) (x : EM G' n) inducedFun-EM ϕ n (-ₖ x) -ₖ (inducedFun-EM ϕ n x) inducedFun-EM-pres-ₖ ϕ n = morphLemmas.distrMinus _+ₖ_ _+ₖ_ @@ -868,7 +868,7 @@ (assocₖ n) (inducedFun-EM0ₖ n) EMFun-EM→ΩEM+1 : {G : AbGroup } {H : AbGroup ℓ'} - {ϕ : AbGroupHom G H} (n : ) (x : EM G n) + {ϕ : AbGroupHom G H} (n : ) (x : EM G n) PathP i inducedFun-EM0ₖ {ϕ = ϕ} (suc n) (~ i) inducedFun-EM0ₖ {ϕ = ϕ} (suc n) (~ i)) (EM→ΩEM+1 n (inducedFun-EM ϕ n x)) @@ -893,7 +893,7 @@ inducedFun-EM-rawIso : {G' : AbGroup } {H' : AbGroup ℓ'} - AbGroupEquiv G' H' + AbGroupEquiv G' H' 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 @@ -925,7 +925,7 @@ ; south refl ; (merid a i) k merid (p a k) i} -module _ {G : AbGroup } {H : AbGroup ℓ'} (e : AbGroupEquiv G H) where +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 @@ -951,7 +951,7 @@ Iso→EMIso⁻∙ (suc zero) = refl Iso→EMIso⁻∙ (suc (suc n)) = refl -Iso→EMIsoInv : {G : AbGroup } {H : AbGroup ℓ'} (e : AbGroupEquiv G H) +Iso→EMIsoInv : {G : AbGroup } {H : AbGroup ℓ'} (e : AbGroupEquiv G H) n Iso.inv (Iso→EMIso e n) Iso.fun (Iso→EMIso (invGroupEquiv e) n) Iso→EMIsoInv e zero = refl Iso→EMIsoInv e (suc zero) = refl diff --git a/Cubical.Homotopy.EilenbergSteenrod.html b/Cubical.Homotopy.EilenbergSteenrod.html index 14ea683ca2..c75de36743 100644 --- a/Cubical.Homotopy.EilenbergSteenrod.html +++ b/Cubical.Homotopy.EilenbergSteenrod.html @@ -38,8 +38,8 @@ Boolℓ : Pointed Boolℓ = Lift Bool , lift true field - Hmap : (n : ) {A B : Pointed } (f : A →∙ B) AbGroupHom (H n B) (H n A) - Suspension : Σ[ F ((n : ) {A : Pointed } AbGroupEquiv (H (sucℤ n) (Susp (typ A) , north)) (H n A)) ] + Hmap : (n : ) {A B : Pointed } (f : A →∙ B) AbGroupHom (H n B) (H n A) + Suspension : Σ[ F ((n : ) {A : Pointed } AbGroupEquiv (H (sucℤ n) (Susp (typ A) , north)) (H n A)) ] ({A B : Pointed } (f : A →∙ B) (n : ) fst (Hmap (sucℤ n) (suspFun (fst f) , refl)) invEq (fst (F n {A = B})) invEq (fst (F n {A = A})) fst (Hmap n f)) @@ -47,5 +47,5 @@ Ker (Hmap n f) Im (Hmap n {B = _ , inr (pt B)} (cfcod (fst f) , refl)) Dimension : (n : ) ¬ n 0 isContr (fst (H n Boolℓ)) - BinaryWedge : (n : ) {A B : Pointed } AbGroupEquiv (H n (A B , (inl (pt A)))) (dirProdAb (H n A) (H n B)) + BinaryWedge : (n : ) {A B : Pointed } AbGroupEquiv (H n (A B , (inl (pt A)))) (dirProdAb (H n A) (H n B)) \ No newline at end of file diff --git a/Cubical.Homotopy.Group.Base.html b/Cubical.Homotopy.Group.Base.html index 64949bc98d..687da61c17 100644 --- a/Cubical.Homotopy.Group.Base.html +++ b/Cubical.Homotopy.Group.Base.html @@ -635,7 +635,7 @@ 1g (snd (π'Gr n A)) = 1π' (suc n) GroupStr._·_ (snd (π'Gr n A)) = ·π' n inv (snd (π'Gr n A)) = -π' n -isGroup (snd (π'Gr n A)) = makeIsGroup squash₂ +isGroup (snd (π'Gr n A)) = makeIsGroup squash₂ (π'-assoc n) (π'-rUnit n) (π'-lUnit n) (π'-rCancel n) (π'-lCancel n) diff --git a/Cubical.Papers.AffineSchemes.html b/Cubical.Papers.AffineSchemes.html index 01a936f568..8256d39d1b 100644 --- a/Cubical.Papers.AffineSchemes.html +++ b/Cubical.Papers.AffineSchemes.html @@ -85,7 +85,7 @@ -- univalence and the cubical SIP open Univalence using (ua) import Cubical.Foundations.SIP -open R-Algs renaming (uaCommAlgebra to sip) +open R-Algs renaming (uaCommAlgebra to sip) -- the first three h-levels open Prelude using (isContr ; isProp ; isSet) diff --git a/Cubical.Papers.CohomologyRings.html b/Cubical.Papers.CohomologyRings.html index d3baf5c2bb..f6388fe6a0 100644 --- a/Cubical.Papers.CohomologyRings.html +++ b/Cubical.Papers.CohomologyRings.html @@ -142,7 +142,7 @@ -- AbGroup induced by a raw group preserving equivalence and the path -- to the other group -open AbGroup using (InducedAbGroup ; InducedAbGroupPath) +open AbGroup using (InducedAbGroup ; InducedAbGroupPath) -- 2.3 Cohomology theory in Cubical Agda @@ -184,7 +184,7 @@ -- 3.2.1 Transporting the ring structure using the SIP -- Ring induced by a raw ring preserving equivalence -open Ring using (InducedRing ; InducedRingPath) +open Ring using (InducedRing ; InducedRingPath) -- The induced CommRing structure on ⊕Fun open GradedRingFun using (⊕HIT→⊕Fun-pres-prodF ; ⊕FunGradedRing-CommRing) diff --git a/Cubical.Tactics.MonoidSolver.CommSolver.html b/Cubical.Tactics.MonoidSolver.CommSolver.html index 35c002dc16..6227995999 100644 --- a/Cubical.Tactics.MonoidSolver.CommSolver.html +++ b/Cubical.Tactics.MonoidSolver.CommSolver.html @@ -20,7 +20,7 @@ module Eval (M : CommMonoid ) where open CommMonoidStr (snd M) - open CommMonoidTheory M + open CommMonoidTheory M Env : Type Env n = Vec M n @@ -79,7 +79,7 @@ lemma : x y {a b c}(p : a b · c) iter (x + y) (v ·_) a iter x (v ·_) b · iter y (v ·_) c lemma 0 0 p = p - lemma 0 (ℕ.suc y) p = (cong₂ _·_ refl (lemma 0 y p)) commAssocl _ _ _ + lemma 0 (ℕ.suc y) p = (cong₂ _·_ refl (lemma 0 y p)) commAssocl _ _ _ lemma (ℕ.suc x) y p = (cong₂ _·_ refl (lemma x y p)) ·Assoc _ _ _ module EqualityToNormalform (M : CommMonoid ) where diff --git a/Cubical.ZCohomology.CohomologyRings.CP2.html b/Cubical.ZCohomology.CohomologyRings.CP2.html index 217ffff623..02f31df80e 100644 --- a/Cubical.ZCohomology.CohomologyRings.CP2.html +++ b/Cubical.ZCohomology.CohomologyRings.CP2.html @@ -302,11 +302,11 @@ ℤ[x]→H*-CP²-cancelX : (k : Fin 1) ℤ[x]→H*-CP² (<X³> k) 0H* ℤ[x]→H*-CP²-cancelX zero = refl - ℤ[X]→H*-CP² : RingHom (CommRing→Ring ℤ[X]) (H*R CP²) + ℤ[X]→H*-CP² : RingHom (CommRing→Ring ℤ[X]) (H*R CP²) fst ℤ[X]→H*-CP² = ℤ[x]→H*-CP² - snd ℤ[X]→H*-CP² = makeIsRingHom ℤ[x]→H*-CP²-pres1 ℤ[x]→H*-CP²-map+ presCup + snd ℤ[X]→H*-CP² = makeIsRingHom ℤ[x]→H*-CP²-pres1 ℤ[x]→H*-CP²-map+ presCup - ℤ[X]/X³→H*R-CP² : RingHom (CommRing→Ring ℤ[X]/X³) (H*R CP²) + ℤ[X]/X³→H*R-CP² : RingHom (CommRing→Ring ℤ[X]/X³) (H*R CP²) ℤ[X]/X³→H*R-CP² = Quotient-FGideal-CommRing-Ring.inducedHom ℤ[X] (H*R CP²) ℤ[X]→H*-CP² <X³> ℤ[x]→H*-CP²-cancelX ℤ[x]/x³→H*-CP² : ℤ[x]/x³ H* CP² @@ -443,7 +443,7 @@ open ComputeCP²Function ϕ₀-pres1 ϕ₀-gen ϕ₂⌣ϕ₂≡ϕ₄ -CP²-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X]/X³) (H*R CP²) +CP²-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X]/X³) (H*R CP²) fst CP²-CohomologyRing = isoToEquiv is where is : Iso ℤ[x]/x³ (H* CP²) @@ -453,6 +453,6 @@ leftInv is = e-retr snd CP²-CohomologyRing = snd ℤ[X]/X³→H*R-CP² -CohomologyRing-CP² : RingEquiv (H*R CP²) (CommRing→Ring ℤ[X]/X³) +CohomologyRing-CP² : RingEquiv (H*R CP²) (CommRing→Ring ℤ[X]/X³) CohomologyRing-CP² = RingEquivs.invRingEquiv CP²-CohomologyRing \ No newline at end of file diff --git a/Cubical.ZCohomology.CohomologyRings.Coproduct.html b/Cubical.ZCohomology.CohomologyRings.Coproduct.html index 90d1d61458..78fbd73a88 100644 --- a/Cubical.ZCohomology.CohomologyRings.Coproduct.html +++ b/Cubical.ZCohomology.CohomologyRings.Coproduct.html @@ -299,7 +299,7 @@ open Iso open RingEquivs - CohomologyRing-Coproduct : RingEquiv (H*R(X Y)) (DirectProd-Ring (H*R X) (H*R Y)) + CohomologyRing-Coproduct : RingEquiv (H*R(X Y)) (DirectProd-Ring (H*R X) (H*R Y)) fst (CohomologyRing-Coproduct) = isoToEquiv is where is : Iso (H* (X Y)) (H* X × H* Y) @@ -307,7 +307,7 @@ inv is = H*-X×H*-Y→H*-X⊎Y rightInv is = e-sect leftInv is = e-retr - snd (CohomologyRing-Coproduct) = makeIsRingHom + snd (CohomologyRing-Coproduct) = makeIsRingHom H*-X⊎Y→H*-X×H*-Y-pres1 H*-X⊎Y→H*-X×H*-Y-pres+ H*-X⊎Y→H*-X×H*-Y-pres· diff --git a/Cubical.ZCohomology.CohomologyRings.KleinBottle.html b/Cubical.ZCohomology.CohomologyRings.KleinBottle.html index 6860355a97..9c67b0020d 100644 --- a/Cubical.ZCohomology.CohomologyRings.KleinBottle.html +++ b/Cubical.ZCohomology.CohomologyRings.KleinBottle.html @@ -73,7 +73,7 @@ -- Definition private - ℤAG = Ring→AbGroup (CommRing→Ring ℤCR) + ℤAG = Ring→AbGroup (CommRing→Ring ℤCR) <2Y,Y²,XY,X²> : FinVec ℤ[x,y] 4 <2Y,Y²,XY,X²> zero = base (0 1 []) 2 @@ -357,14 +357,14 @@ ℤ[x,y]→H*-𝕂²-cancel three = refl - ℤ[X,Y]→H*-𝕂² : RingHom (CommRing→Ring ℤ[X,Y]) (H*R KleinBottle) + ℤ[X,Y]→H*-𝕂² : RingHom (CommRing→Ring ℤ[X,Y]) (H*R KleinBottle) fst ℤ[X,Y]→H*-𝕂² = ℤ[x,y]→H*-𝕂² - snd ℤ[X,Y]→H*-𝕂² = makeIsRingHom ℤ[x,y]→H*-𝕂²-pres1 + snd ℤ[X,Y]→H*-𝕂² = makeIsRingHom ℤ[x,y]→H*-𝕂²-pres1 ℤ[x,y]→H*-𝕂²-pres+ ℤ[x,y]→H*-𝕂²-pres· -- hence not a trivial pres+, yet pres0 still is - ℤ[X,Y]/<2Y,Y²,XY,X²>→H*R-𝕂² : RingHom (CommRing→Ring ℤ[X,Y]/<2Y,Y²,XY,X²>) (H*R KleinBottle) + ℤ[X,Y]/<2Y,Y²,XY,X²>→H*R-𝕂² : RingHom (CommRing→Ring ℤ[X,Y]/<2Y,Y²,XY,X²>) (H*R KleinBottle) ℤ[X,Y]/<2Y,Y²,XY,X²>→H*R-𝕂² = Quotient-FGideal-CommRing-Ring.inducedHom ℤ[X,Y] (H*R KleinBottle) ℤ[X,Y]→H*-𝕂² <2Y,Y²,XY,X²> ℤ[x,y]→H*-𝕂²-cancel @@ -378,7 +378,7 @@ ℤ[x,y]/<2y,y²,xy,x²>→H*-𝕂²-pres+ : (x y : ℤ[x,y]/<2y,y²,xy,x²>) ℤ[x,y]/<2y,y²,xy,x²>→H*-𝕂² ( x +PℤI y) ℤ[x,y]/<2y,y²,xy,x²>→H*-𝕂² x +H* ℤ[x,y]/<2y,y²,xy,x²>→H*-𝕂² y - ℤ[x,y]/<2y,y²,xy,x²>→H*-𝕂²-pres+ x y = IsRingHom.pres+ (snd ℤ[X,Y]/<2Y,Y²,XY,X²>→H*R-𝕂²) x y + ℤ[x,y]/<2y,y²,xy,x²>→H*-𝕂²-pres+ x y = IsRingHom.pres+ (snd ℤ[X,Y]/<2Y,Y²,XY,X²>→H*R-𝕂²) x y ----------------------------------------------------------------------------- @@ -559,7 +559,7 @@ open pres⌣trivial open PblComp a b sym (ϕₙ⌣ϕₘ-0 ϕ₁ ϕ₁str ϕ₁ ϕ₁str trivial-cup a b)) - 𝕂²-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X,Y]/<2Y,Y²,XY,X²>) (H*R KleinBottle) + 𝕂²-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X,Y]/<2Y,Y²,XY,X²>) (H*R KleinBottle) fst 𝕂²-CohomologyRing = isoToEquiv is where is : Iso ℤ[x,y]/<2y,y²,xy,x²> (H* KleinBottle) @@ -569,6 +569,6 @@ leftInv 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²>) + CohomologyRing-𝕂² : RingEquiv (H*R KleinBottle) (CommRing→Ring ℤ[X,Y]/<2Y,Y²,XY,X²>) CohomologyRing-𝕂² = RingEquivs.invRingEquiv 𝕂²-CohomologyRing \ No newline at end of file diff --git a/Cubical.ZCohomology.CohomologyRings.RP2.html b/Cubical.ZCohomology.CohomologyRings.RP2.html index 373ce76299..a711292a78 100644 --- a/Cubical.ZCohomology.CohomologyRings.RP2.html +++ b/Cubical.ZCohomology.CohomologyRings.RP2.html @@ -63,7 +63,7 @@ -- Definitions and import private - ℤAG = Ring→AbGroup (CommRing→Ring ℤCR) + ℤAG = Ring→AbGroup (CommRing→Ring ℤCR) <2X,X²> : FinVec ℤ[x] 2 <2X,X²> zero = base (1 []) 2 @@ -310,12 +310,12 @@ ℤ[x]→H*-RP²-cancelX zero = cong (base 2) (pres1 ϕ₂str) base-neutral _ ℤ[x]→H*-RP²-cancelX one = refl - ℤ[X]→H*-RP² : RingHom (CommRing→Ring ℤ[X]) (H*R RP²) + ℤ[X]→H*-RP² : RingHom (CommRing→Ring ℤ[X]) (H*R RP²) fst ℤ[X]→H*-RP² = ℤ[x]→H*-RP² - snd ℤ[X]→H*-RP² = makeIsRingHom ℤ[x]→H*-RP²-pres1Pℤ ℤ[x]→H*-RP²-pres+ ℤ[x]→H*-RP²-pres· + snd ℤ[X]→H*-RP² = makeIsRingHom ℤ[x]→H*-RP²-pres1Pℤ ℤ[x]→H*-RP²-pres+ ℤ[x]→H*-RP²-pres· -- hence not a trivial pres+, yet pres0 still is - ℤ[X]/<2X,X²>→H*R-RP² : RingHom (CommRing→Ring ℤ[X]/<2X,X²>) (H*R RP²) + ℤ[X]/<2X,X²>→H*R-RP² : RingHom (CommRing→Ring ℤ[X]/<2X,X²>) (H*R RP²) ℤ[X]/<2X,X²>→H*R-RP² = Quotient-FGideal-CommRing-Ring.inducedHom ℤ[X] (H*R RP²) ℤ[X]→H*-RP² <2X,X²> ℤ[x]→H*-RP²-cancelX @@ -327,7 +327,7 @@ ℤ[x]/<2x,x²>→H*-RP²-pres+ : (x y : ℤ[x]/<2x,x²>) ℤ[x]/<2x,x²>→H*-RP² ( x +PℤI y) ℤ[x]/<2x,x²>→H*-RP² x +H* ℤ[x]/<2x,x²>→H*-RP² y - ℤ[x]/<2x,x²>→H*-RP²-pres+ x y = IsRingHom.pres+ (snd ℤ[X]/<2X,X²>→H*R-RP²) x y + ℤ[x]/<2x,x²>→H*-RP²-pres+ x y = IsRingHom.pres+ (snd ℤ[X]/<2X,X²>→H*R-RP²) x y ----------------------------------------------------------------------------- @@ -501,7 +501,7 @@ open Equiv-RP2-Properties - RP²-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X]/<2X,X²>) (H*R RP²) + RP²-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X]/<2X,X²>) (H*R RP²) fst RP²-CohomologyRing = isoToEquiv is where is : Iso ℤ[x]/<2x,x²> (H* RP²) @@ -511,6 +511,6 @@ leftInv is = e-retr snd RP²-CohomologyRing = snd ℤ[X]/<2X,X²>→H*R-RP² - CohomologyRing-RP² : RingEquiv (H*R RP²) (CommRing→Ring ℤ[X]/<2X,X²>) + CohomologyRing-RP² : RingEquiv (H*R RP²) (CommRing→Ring ℤ[X]/<2X,X²>) CohomologyRing-RP² = RingEquivs.invRingEquiv RP²-CohomologyRing \ No newline at end of file diff --git a/Cubical.ZCohomology.CohomologyRings.RP2wedgeS1.html b/Cubical.ZCohomology.CohomologyRings.RP2wedgeS1.html index 218ebc85ff..972ddbbb1a 100644 --- a/Cubical.ZCohomology.CohomologyRings.RP2wedgeS1.html +++ b/Cubical.ZCohomology.CohomologyRings.RP2wedgeS1.html @@ -74,7 +74,7 @@ -- Definition private - ℤAG = Ring→AbGroup (CommRing→Ring ℤCR) + ℤAG = Ring→AbGroup (CommRing→Ring ℤCR) <2Y,Y²,XY,X²> : FinVec ℤ[x,y] 4 <2Y,Y²,XY,X²> zero = base (0 1 []) 2 @@ -358,14 +358,14 @@ ℤ[x,y]→H*-RP²⋁S¹-cancel three = refl - ℤ[X,Y]→H*-RP²⋁S¹ : RingHom (CommRing→Ring ℤ[X,Y]) (H*R RP²⋁S¹) + ℤ[X,Y]→H*-RP²⋁S¹ : RingHom (CommRing→Ring ℤ[X,Y]) (H*R RP²⋁S¹) fst ℤ[X,Y]→H*-RP²⋁S¹ = ℤ[x,y]→H*-RP²⋁S¹ - snd ℤ[X,Y]→H*-RP²⋁S¹ = makeIsRingHom ℤ[x,y]→H*-RP²⋁S¹-pres1 + snd ℤ[X,Y]→H*-RP²⋁S¹ = makeIsRingHom ℤ[x,y]→H*-RP²⋁S¹-pres1 ℤ[x,y]→H*-RP²⋁S¹-pres+ ℤ[x,y]→H*-RP²⋁S¹-pres· -- hence not a trivial pres+, yet pres0 still is - ℤ[X,Y]/<2Y,Y²,XY,X²>→H*R-RP²⋁S¹ : RingHom (CommRing→Ring ℤ[X,Y]/<2Y,Y²,XY,X²>) (H*R RP²⋁S¹) + ℤ[X,Y]/<2Y,Y²,XY,X²>→H*R-RP²⋁S¹ : RingHom (CommRing→Ring ℤ[X,Y]/<2Y,Y²,XY,X²>) (H*R RP²⋁S¹) ℤ[X,Y]/<2Y,Y²,XY,X²>→H*R-RP²⋁S¹ = Quotient-FGideal-CommRing-Ring.inducedHom ℤ[X,Y] (H*R RP²⋁S¹) ℤ[X,Y]→H*-RP²⋁S¹ <2Y,Y²,XY,X²> ℤ[x,y]→H*-RP²⋁S¹-cancel @@ -379,7 +379,7 @@ ℤ[x,y]/<2y,y²,xy,x²>→H*-RP²⋁S¹-pres+ : (x y : ℤ[x,y]/<2y,y²,xy,x²>) ℤ[x,y]/<2y,y²,xy,x²>→H*-RP²⋁S¹ ( x +PℤI y) ℤ[x,y]/<2y,y²,xy,x²>→H*-RP²⋁S¹ x +H* ℤ[x,y]/<2y,y²,xy,x²>→H*-RP²⋁S¹ y - ℤ[x,y]/<2y,y²,xy,x²>→H*-RP²⋁S¹-pres+ x y = IsRingHom.pres+ (snd ℤ[X,Y]/<2Y,Y²,XY,X²>→H*R-RP²⋁S¹) x y + ℤ[x,y]/<2y,y²,xy,x²>→H*-RP²⋁S¹-pres+ x y = IsRingHom.pres+ (snd ℤ[X,Y]/<2Y,Y²,XY,X²>→H*R-RP²⋁S¹) x y ----------------------------------------------------------------------------- @@ -560,7 +560,7 @@ open pres⌣trivial open PblComp a b sym (ϕₙ⌣ϕₘ-0 ϕ₁ ϕ₁str ϕ₁ ϕ₁str trivial-cup a b)) - RP²⋁S¹-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X,Y]/<2Y,Y²,XY,X²>) (H*R RP²⋁S¹) + RP²⋁S¹-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X,Y]/<2Y,Y²,XY,X²>) (H*R RP²⋁S¹) fst RP²⋁S¹-CohomologyRing = isoToEquiv is where is : Iso ℤ[x,y]/<2y,y²,xy,x²> (H* RP²⋁S¹) @@ -570,6 +570,6 @@ leftInv 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²>) + CohomologyRing-RP²⋁S¹ : RingEquiv (H*R RP²⋁S¹) (CommRing→Ring ℤ[X,Y]/<2Y,Y²,XY,X²>) CohomologyRing-RP²⋁S¹ = RingEquivs.invRingEquiv RP²⋁S¹-CohomologyRing \ No newline at end of file diff --git a/Cubical.ZCohomology.CohomologyRings.S0.html b/Cubical.ZCohomology.CohomologyRings.S0.html index 25a4e1fbc9..719939fc7d 100644 --- a/Cubical.ZCohomology.CohomologyRings.S0.html +++ b/Cubical.ZCohomology.CohomologyRings.S0.html @@ -36,12 +36,12 @@ open RingEquivs -Cohomology-Ring-S⁰P : RingEquiv (H*R (S₊ 0)) (DirectProd-Ring (CommRing→Ring ℤ[X]/X) (CommRing→Ring ℤ[X]/X)) +Cohomology-Ring-S⁰P : RingEquiv (H*R (S₊ 0)) (DirectProd-Ring (CommRing→Ring ℤ[X]/X) (CommRing→Ring ℤ[X]/X)) Cohomology-Ring-S⁰P = compRingEquiv (CohomologyRing-Equiv (invIso Iso-⊤⊎⊤-Bool)) (compRingEquiv (CohomologyRing-Coproduct Unit Unit) (Coproduct-Equiv.Coproduct-Equiv-12 CohomologyRing-UnitP CohomologyRing-UnitP)) -Cohomology-Ring-S⁰ℤ : RingEquiv (H*R (S₊ 0)) (DirectProd-Ring (CommRing→Ring ℤCR) (CommRing→Ring ℤCR)) +Cohomology-Ring-S⁰ℤ : RingEquiv (H*R (S₊ 0)) (DirectProd-Ring (CommRing→Ring ℤCR) (CommRing→Ring ℤCR)) Cohomology-Ring-S⁰ℤ = compRingEquiv (CohomologyRing-Equiv (invIso Iso-⊤⊎⊤-Bool)) (compRingEquiv (CohomologyRing-Coproduct Unit Unit) (Coproduct-Equiv.Coproduct-Equiv-12 CohomologyRing-Unitℤ CohomologyRing-Unitℤ)) diff --git a/Cubical.ZCohomology.CohomologyRings.S1.html b/Cubical.ZCohomology.CohomologyRings.S1.html index dff52c9b22..fc18d8cf87 100644 --- a/Cubical.ZCohomology.CohomologyRings.S1.html +++ b/Cubical.ZCohomology.CohomologyRings.S1.html @@ -230,11 +230,11 @@ ℤ[x]→H*-S¹-cancelX : (k : Fin 1) ℤ[x]→H*-S¹ (<X²> k) 0H* ℤ[x]→H*-S¹-cancelX zero = refl - ℤ[X]→H*-S¹ : RingHom (CommRing→Ring ℤ[X]) (H*R (S₊ 1)) + ℤ[X]→H*-S¹ : RingHom (CommRing→Ring ℤ[X]) (H*R (S₊ 1)) fst ℤ[X]→H*-S¹ = ℤ[x]→H*-S¹ - snd ℤ[X]→H*-S¹ = makeIsRingHom ℤ[x]→H*-S¹-pres1Pℤ ℤ[x]→H*-S¹-pres+ ℤ[x]→H*-S¹-pres· + snd ℤ[X]→H*-S¹ = makeIsRingHom ℤ[x]→H*-S¹-pres1Pℤ ℤ[x]→H*-S¹-pres+ ℤ[x]→H*-S¹-pres· - ℤ[X]/X²→H*R-S¹ : RingHom (CommRing→Ring ℤ[X]/X²) (H*R (S₊ 1)) + ℤ[X]/X²→H*R-S¹ : RingHom (CommRing→Ring ℤ[X]/X²) (H*R (S₊ 1)) ℤ[X]/X²→H*R-S¹ = Quotient-FGideal-CommRing-Ring.inducedHom ℤ[X] (H*R (S₊ 1)) ℤ[X]→H*-S¹ <X²> ℤ[x]→H*-S¹-cancelX @@ -326,7 +326,7 @@ open Equiv-S1-Properties - S¹-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X]/X²) (H*R (S₊ 1)) + S¹-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X]/X²) (H*R (S₊ 1)) fst S¹-CohomologyRing = isoToEquiv is where is : Iso ℤ[x]/x² (H* (S₊ 1)) @@ -336,6 +336,6 @@ leftInv is = e-retr snd S¹-CohomologyRing = snd ℤ[X]/X²→H*R-S¹ - CohomologyRing-S¹ : RingEquiv (H*R (S₊ 1)) (CommRing→Ring ℤ[X]/X²) + CohomologyRing-S¹ : RingEquiv (H*R (S₊ 1)) (CommRing→Ring ℤ[X]/X²) CohomologyRing-S¹ = RingEquivs.invRingEquiv S¹-CohomologyRing \ No newline at end of file diff --git a/Cubical.ZCohomology.CohomologyRings.S2wedgeS4.html b/Cubical.ZCohomology.CohomologyRings.S2wedgeS4.html index 4e198ddcee..af8627ad60 100644 --- a/Cubical.ZCohomology.CohomologyRings.S2wedgeS4.html +++ b/Cubical.ZCohomology.CohomologyRings.S2wedgeS4.html @@ -63,7 +63,7 @@ -- Definition private - ℤAG = Ring→AbGroup (CommRing→Ring ℤCR) + ℤAG = Ring→AbGroup (CommRing→Ring ℤCR) <XY,X²,Y²> : FinVec ℤ[x,y] 3 <XY,X²,Y²> zero = base (1 1 []) 1 @@ -363,14 +363,14 @@ ℤ[x,y]→H*-S²⋁S⁴-cancel one = refl ℤ[x,y]→H*-S²⋁S⁴-cancel two = refl - ℤ[X,Y]→H*-S²⋁S⁴ : RingHom (CommRing→Ring ℤ[X,Y]) (H*R S²⋁S⁴) + ℤ[X,Y]→H*-S²⋁S⁴ : RingHom (CommRing→Ring ℤ[X,Y]) (H*R S²⋁S⁴) fst ℤ[X,Y]→H*-S²⋁S⁴ = ℤ[x,y]→H*-S²⋁S⁴ - snd ℤ[X,Y]→H*-S²⋁S⁴ = makeIsRingHom ℤ[x,y]→H*-S²⋁S⁴-pres1Pℤ + snd ℤ[X,Y]→H*-S²⋁S⁴ = makeIsRingHom ℤ[x,y]→H*-S²⋁S⁴-pres1Pℤ ℤ[x,y]→H*-S²⋁S⁴-pres+ ℤ[x,y]→H*-S²⋁S⁴-pres· -- hence not a trivial pres+, yet pres0 still is - ℤ[X,Y]/<XY,X²,Y²>→H*R-S²⋁S⁴ : RingHom (CommRing→Ring ℤ[X,Y]/<XY,X²,Y²>) (H*R S²⋁S⁴) + ℤ[X,Y]/<XY,X²,Y²>→H*R-S²⋁S⁴ : RingHom (CommRing→Ring ℤ[X,Y]/<XY,X²,Y²>) (H*R S²⋁S⁴) ℤ[X,Y]/<XY,X²,Y²>→H*R-S²⋁S⁴ = Quotient-FGideal-CommRing-Ring.inducedHom ℤ[X,Y] (H*R S²⋁S⁴) ℤ[X,Y]→H*-S²⋁S⁴ <XY,X²,Y²> ℤ[x,y]→H*-S²⋁S⁴-cancel @@ -384,7 +384,7 @@ ℤ[x,y]/<xy,x²,y²>→H*-S²⋁S⁴-pres+ : (x y : ℤ[x,y]/<xy,x²,y²>) ℤ[x,y]/<xy,x²,y²>→H*-S²⋁S⁴ ( x +PℤI y) ℤ[x,y]/<xy,x²,y²>→H*-S²⋁S⁴ x +H* ℤ[x,y]/<xy,x²,y²>→H*-S²⋁S⁴ y - ℤ[x,y]/<xy,x²,y²>→H*-S²⋁S⁴-pres+ x y = IsRingHom.pres+ (snd ℤ[X,Y]/<XY,X²,Y²>→H*R-S²⋁S⁴) x y + ℤ[x,y]/<xy,x²,y²>→H*-S²⋁S⁴-pres+ x y = IsRingHom.pres+ (snd ℤ[X,Y]/<XY,X²,Y²>→H*R-S²⋁S⁴) x y ----------------------------------------------------------------------------- @@ -511,7 +511,7 @@ open Equiv-RP2-Properties open IssueComputation (invGroupIso H⁴-S²⋁S⁴≅ℤ) - S²⋁S⁴-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X,Y]/<XY,X²,Y²>) (H*R S²⋁S⁴) + S²⋁S⁴-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X,Y]/<XY,X²,Y²>) (H*R S²⋁S⁴) fst S²⋁S⁴-CohomologyRing = isoToEquiv is where is : Iso ℤ[x,y]/<xy,x²,y²> (H* S²⋁S⁴) @@ -521,6 +521,6 @@ leftInv is = e-retr snd S²⋁S⁴-CohomologyRing = snd ℤ[X,Y]/<XY,X²,Y²>→H*R-S²⋁S⁴ - CohomologyRing-S²⋁S⁴ : RingEquiv (H*R S²⋁S⁴) (CommRing→Ring ℤ[X,Y]/<XY,X²,Y²>) + CohomologyRing-S²⋁S⁴ : RingEquiv (H*R S²⋁S⁴) (CommRing→Ring ℤ[X,Y]/<XY,X²,Y²>) CohomologyRing-S²⋁S⁴ = RingEquivs.invRingEquiv S²⋁S⁴-CohomologyRing \ No newline at end of file diff --git a/Cubical.ZCohomology.CohomologyRings.Sn.html b/Cubical.ZCohomology.CohomologyRings.Sn.html index ec90f36ef5..6059cb36ff 100644 --- a/Cubical.ZCohomology.CohomologyRings.Sn.html +++ b/Cubical.ZCohomology.CohomologyRings.Sn.html @@ -275,11 +275,11 @@ ℤ[x]→H*-Sⁿ-cancelX : (k : Fin 1) ℤ[x]→H*-Sⁿ (<X²> k) 0H* ℤ[x]→H*-Sⁿ-cancelX zero = refl - ℤ[X]→H*-Sⁿ : RingHom (CommRing→Ring ℤ[X]) (H*R (S₊ (suc n))) + ℤ[X]→H*-Sⁿ : RingHom (CommRing→Ring ℤ[X]) (H*R (S₊ (suc n))) fst ℤ[X]→H*-Sⁿ = ℤ[x]→H*-Sⁿ - snd ℤ[X]→H*-Sⁿ = makeIsRingHom ℤ[x]→H*-Sⁿ-pres1 ℤ[x]→H*-Sⁿ-pres+ ℤ[x]→H*-Sⁿ-pres· + snd ℤ[X]→H*-Sⁿ = makeIsRingHom ℤ[x]→H*-Sⁿ-pres1 ℤ[x]→H*-Sⁿ-pres+ ℤ[x]→H*-Sⁿ-pres· - ℤ[X]/X²→H*R-Sⁿ : RingHom (CommRing→Ring ℤ[X]/X²) (H*R (S₊ (suc n))) + ℤ[X]/X²→H*R-Sⁿ : RingHom (CommRing→Ring ℤ[X]/X²) (H*R (S₊ (suc n))) ℤ[X]/X²→H*R-Sⁿ = Quotient-FGideal-CommRing-Ring.inducedHom ℤ[X] (H*R (S₊ (suc n))) ℤ[X]→H*-Sⁿ <X²> ℤ[x]→H*-Sⁿ-cancelX @@ -399,7 +399,7 @@ open Equiv-Sn-Properties n - Sⁿ-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X]/X²) (H*R (S₊ (suc n))) + Sⁿ-CohomologyRing : RingEquiv (CommRing→Ring ℤ[X]/X²) (H*R (S₊ (suc n))) fst Sⁿ-CohomologyRing = isoToEquiv is where is : Iso ℤ[x]/x² (H* (S₊ (suc n))) @@ -409,6 +409,6 @@ leftInv is = e-retr snd Sⁿ-CohomologyRing = snd ℤ[X]/X²→H*R-Sⁿ - CohomologyRing-Sⁿ : RingEquiv (H*R (S₊ (suc n))) (CommRing→Ring ℤ[X]/X²) + CohomologyRing-Sⁿ : RingEquiv (H*R (S₊ (suc n))) (CommRing→Ring ℤ[X]/X²) CohomologyRing-Sⁿ = RingEquivs.invRingEquiv Sⁿ-CohomologyRing \ No newline at end of file diff --git a/Cubical.ZCohomology.CohomologyRings.Unit.html b/Cubical.ZCohomology.CohomologyRings.Unit.html index 25e3d5fbdf..8e6c49cce9 100644 --- a/Cubical.ZCohomology.CohomologyRings.Unit.html +++ b/Cubical.ZCohomology.CohomologyRings.Unit.html @@ -197,11 +197,11 @@ ℤ[x]→H*-Unit-cancelX : (k : Fin 1) ℤ[x]→H*-Unit (<X> k) 0H* ℤ[x]→H*-Unit-cancelX zero = refl - ℤ[X]→H*-Unit : RingHom (CommRing→Ring ℤ[X]) (H*R Unit) + ℤ[X]→H*-Unit : RingHom (CommRing→Ring ℤ[X]) (H*R Unit) fst ℤ[X]→H*-Unit = ℤ[x]→H*-Unit - snd ℤ[X]→H*-Unit = makeIsRingHom ℤ[x]→H*-Unit-pres1Pℤ ℤ[x]→H*-Unit-pres+ ℤ[x]→H*-Unit-pres· + snd ℤ[X]→H*-Unit = makeIsRingHom ℤ[x]→H*-Unit-pres1Pℤ ℤ[x]→H*-Unit-pres+ ℤ[x]→H*-Unit-pres· - ℤ[X]/X→H*R-Unit : RingHom (CommRing→Ring ℤ[X]/X) (H*R Unit) + ℤ[X]/X→H*R-Unit : RingHom (CommRing→Ring ℤ[X]/X) (H*R Unit) ℤ[X]/X→H*R-Unit = Quotient-FGideal-CommRing-Ring.inducedHom ℤ[X] (H*R Unit) ℤ[X]→H*-Unit <X> ℤ[x]→H*-Unit-cancelX ℤ[x]/x→H*-Unit : ℤ[x]/x H* Unit @@ -256,7 +256,7 @@ refl base-case λ {U V} ind-U ind-V cong ℤ[x]/x→H*-Unit (H*-Unit→ℤ[x]/x-pres+ U V) - IsRingHom.pres+ (snd ℤ[X]/X→H*R-Unit) (H*-Unit→ℤ[x]/x U) (H*-Unit→ℤ[x]/x V) + IsRingHom.pres+ (snd ℤ[X]/X→H*R-Unit) (H*-Unit→ℤ[x]/x U) (H*-Unit→ℤ[x]/x V) cong₂ _+H*_ ind-U ind-V where base-case : _ @@ -297,7 +297,7 @@ open Equiv-Unit-Properties open RingEquivs - Unit-CohomologyRingP : RingEquiv (CommRing→Ring ℤ[X]/X) (H*R Unit) + Unit-CohomologyRingP : RingEquiv (CommRing→Ring ℤ[X]/X) (H*R Unit) fst Unit-CohomologyRingP = isoToEquiv is where is : Iso ℤ[x]/x (H* Unit) @@ -307,12 +307,12 @@ leftInv is = e-retr snd Unit-CohomologyRingP = snd ℤ[X]/X→H*R-Unit - CohomologyRing-UnitP : RingEquiv (H*R Unit) (CommRing→Ring ℤ[X]/X) + CohomologyRing-UnitP : RingEquiv (H*R Unit) (CommRing→Ring ℤ[X]/X) CohomologyRing-UnitP = invRingEquiv Unit-CohomologyRingP - Unit-CohomologyRingℤ : RingEquiv (CommRing→Ring ℤCR) (H*R Unit) + Unit-CohomologyRingℤ : RingEquiv (CommRing→Ring ℤCR) (H*R Unit) Unit-CohomologyRingℤ = compRingEquiv (invRingEquiv Equiv-ℤ[X]/X-ℤ) Unit-CohomologyRingP - CohomologyRing-Unitℤ : RingEquiv (H*R Unit) (CommRing→Ring ℤCR) + CohomologyRing-Unitℤ : RingEquiv (H*R Unit) (CommRing→Ring ℤCR) CohomologyRing-Unitℤ = compRingEquiv CohomologyRing-UnitP Equiv-ℤ[X]/X-ℤ \ No newline at end of file diff --git a/Cubical.ZCohomology.EilenbergSteenrodZ.html b/Cubical.ZCohomology.EilenbergSteenrodZ.html index 30e1f14bb8..49a6cd62dd 100644 --- a/Cubical.ZCohomology.EilenbergSteenrodZ.html +++ b/Cubical.ZCohomology.EilenbergSteenrodZ.html @@ -206,7 +206,7 @@ private -- First, we need to that coHomFunctor' is contravariant theMorph : {} (n : ) {A B : Pointed } (f : A →∙ B) - AbGroupHom (coHomFunctor' n B) (coHomFunctor' n A) + AbGroupHom (coHomFunctor' n B) (coHomFunctor' n A) fst (theMorph (pos zero) f) = ST.map λ g x fst g (fst f x)) , cong (fst g) (snd f) snd g snd (theMorph (pos zero) f) = makeIsGroupHom diff --git a/Cubical.ZCohomology.GroupStructure.html b/Cubical.ZCohomology.GroupStructure.html index ce5c574873..597130e1fb 100644 --- a/Cubical.ZCohomology.GroupStructure.html +++ b/Cubical.ZCohomology.GroupStructure.html @@ -639,7 +639,7 @@ where abstract helper : IsGroup {G = coHom n A} (0ₕ n) x y x +[ n ]ₕ y) x -[ n ]ₕ x) - helper = makeIsGroup § (assocₕ n) (rUnitₕ n) (lUnitₕ n) (rCancelₕ n) (lCancelₕ n) + helper = makeIsGroup § (assocₕ n) (rUnitₕ n) (lUnitₕ n) (rCancelₕ n) (lCancelₕ n) ×coHomGr : (n : ) (A : Type ) (B : Type ℓ') Group _ ×coHomGr n A B = DirProd (coHomGr n A) (coHomGr n B) @@ -663,7 +663,7 @@ where abstract helper : IsGroup {G = coHomRed n A} (0ₕ∙ n) (_+ₕ∙_ {n = n}) (-ₕ∙_ {n = n}) - helper = makeIsGroup § (assocₕ∙ n) (rUnitₕ∙ n) (lUnitₕ∙ n) (rCancelₕ∙ n) (lCancelₕ∙ n) + helper = makeIsGroup § (assocₕ∙ n) (rUnitₕ∙ n) (lUnitₕ∙ n) (rCancelₕ∙ n) (lCancelₕ∙ n) IsAbGroup.+Comm (AbGroupStr.isAbGroup (snd (coHomRedGroupDir n A))) = commₕ∙ n coHomRedGrDir : (n : ) (A : Pointed ) Group @@ -712,7 +712,7 @@ helper : IsGroup {G = (A typ (Ω (coHomK-ptd (suc n)))) ∥₂} ( _ refl) ∣₂) (ST.rec2 § λ p q x p x q x) ∣₂) (ST.map λ f x sym (f x)) - helper = makeIsGroup § (ST.elim3 _ _ _ isOfHLevelPath 2 § _ _) + helper = makeIsGroup § (ST.elim3 _ _ _ isOfHLevelPath 2 § _ _) p q r cong ∣_∣₂ (funExt λ x assoc∙ (p x) (q x) (r x)))) (ST.elim _ isOfHLevelPath 2 § _ _) λ p cong ∣_∣₂ (funExt λ x sym (rUnit (p x)))) (ST.elim _ isOfHLevelPath 2 § _ _) λ p cong ∣_∣₂ (funExt λ x sym (lUnit (p x)))) diff --git a/Cubical.ZCohomology.Gysin.html b/Cubical.ZCohomology.Gysin.html index db5e4a2e2e..57ccff9258 100644 --- a/Cubical.ZCohomology.Gysin.html +++ b/Cubical.ZCohomology.Gysin.html @@ -120,7 +120,7 @@ GroupStr._·_ (snd (πS n)) f g = x fst f x +ₖ fst g x) , cong₂ _+ₖ_ (snd f) (snd g) rUnitₖ n (0ₖ n) inv (snd (πS n)) f = x -ₖ fst f x) , cong -ₖ_ (snd f) -0ₖ {n = n} - isGroup (snd (πS n)) = makeIsGroup + isGroup (snd (πS n)) = makeIsGroup (helper n) x y z →∙Homogeneous≡ (isHomogeneousKn n) diff --git a/Cubical.ZCohomology.Properties.html b/Cubical.ZCohomology.Properties.html index 6e3d9e9de9..25e2e2ef54 100644 --- a/Cubical.ZCohomology.Properties.html +++ b/Cubical.ZCohomology.Properties.html @@ -245,7 +245,7 @@ coHomRedGroup : {} (n : ) (A : Pointed ) AbGroup coHomRedGroup zero A = coHomRedGroupDir zero A coHomRedGroup (suc n) A = - InducedAbGroupFromPres· + InducedAbGroupFromPres· (coHomGroup (suc n) (typ A)) _+ₕ∙_ (isoToEquiv (invIso (Iso-coHom-coHomRed n))) @@ -255,7 +255,7 @@ coHomGroup≡coHomRedGroup : {} (n : ) (A : Pointed ) coHomGroup (suc n) (typ A) coHomRedGroup (suc n) A coHomGroup≡coHomRedGroup n A = - InducedAbGroupPathFromPres· + InducedAbGroupPathFromPres· (coHomGroup (suc n) (typ A)) _+ₕ∙_ (isoToEquiv (invIso (Iso-coHom-coHomRed n))) diff --git a/Cubical.ZCohomology.RingStructure.CohomologyRing.html b/Cubical.ZCohomology.RingStructure.CohomologyRing.html index 79ad9a9057..c25ab6944e 100644 --- a/Cubical.ZCohomology.RingStructure.CohomologyRing.html +++ b/Cubical.ZCohomology.RingStructure.CohomologyRing.html @@ -211,7 +211,7 @@ open CohomologyRing-Equiv e - CohomologyRing-Equiv : RingEquiv (H*R X) (H*R Y) + CohomologyRing-Equiv : RingEquiv (H*R X) (H*R Y) fst CohomologyRing-Equiv = isoToEquiv is where is : Iso (H* X) (H* Y) @@ -219,5 +219,5 @@ inv is = H*-Y→H*-X rightInv is = e-sect leftInv is = e-retr - snd CohomologyRing-Equiv = makeIsRingHom H*-X→H*-Y-pres1 H*-X→H*-Y-pres+ H*-X→H*-Y-pres· + snd CohomologyRing-Equiv = makeIsRingHom H*-X→H*-Y-pres1 H*-X→H*-Y-pres+ H*-X→H*-Y-pres· \ No newline at end of file