11{-# OPTIONS --safe #-}
2- module Cubical.Algebra.CommAlgebra.Instances.Unit where
2+ {-
3+ Define terminal R-algebra as a commutative algebra and prove the universal property.
4+ The universe level of the terminal R-algebra is fixed to be the universe level of R.
5+ -}
6+ module Cubical.Algebra.CommAlgebra.Instances.Terminal where
37
48open import Cubical.Foundations.Prelude
59open import Cubical.Foundations.Function
@@ -12,7 +16,7 @@ open import Cubical.Data.Sigma.Properties using (Σ≡Prop)
1216open import Cubical.Algebra.CommRing
1317open import Cubical.Algebra.CommAlgebra.Base
1418open import Cubical.Algebra.CommRing.Instances.Unit
15- import Cubical.Algebra.CommAlgebra.Notation as CAlgNotation
19+ open import Cubical.Algebra.CommAlgebra.Notation
1620
1721open import Cubical.Tactics.CommRingSolver
1822
@@ -21,44 +25,29 @@ private
2125 ℓ ℓ' ℓ'' : Level
2226
2327module _ (R : CommRing ℓ) where
24- terminalCAlg : CommAlgebra R ℓ'
28+ terminalCAlg : CommAlgebra R ℓ
2529 terminalCAlg = UnitCommRing , mapToUnitCommRing R
2630
2731 module _ (A : CommAlgebra R ℓ'') where
28- terminalMap : CommAlgebraHom A ( terminalCAlg {ℓ' = ℓ})
32+ terminalMap : CommAlgebraHom A terminalCAlg
2933 terminalMap = CommRingHom→CommAlgebraHom (mapToUnitCommRing (A .fst)) $ isPropMapToUnitCommRing _ _ _
3034
3135 module _ (A : CommAlgebra R ℓ'') where
32- terminalityContr : isContr (CommAlgebraHom A ( terminalCAlg {ℓ' = ℓ}) )
36+ terminalityContr : isContr (CommAlgebraHom A terminalCAlg)
3337 terminalityContr = (terminalMap A) , λ f → CommAlgebraHom≡ (funExt (λ _ → refl))
3438
35- {-
39+ isContr→EquivTerminal : isContr ⟨ A ⟩ₐ → CommAlgebraEquiv A terminalCAlg
40+ isContr→EquivTerminal isContrA =
41+ (isContr→≃Unit* isContrA) ,
42+ record { isCommRingHom = mapToUnitCommRing (A .fst) .snd ;
43+ commutes = CommRingHom≡ (funExt (λ _ → refl)) }
3644
37- open CAlgNotation A
38- equivFrom1≡0 : (1≡0 : 1r ≡ 0r )
45+ open InstancesForCAlg A
46+ equivFrom1≡0 : 1r ≡ (0r :> ⟨ A ⟩ₐ )
3947 → CommAlgebraEquiv A terminalCAlg
40- equivFrom1≡0 = ?
41-
42- module _ (A : CommAlgebra R ℓ) where
43-
44- terminalityContr : isContr (CommAlgebraHom A UnitCommAlgebra)
45- terminalityContr = terminalMap , path
46- where path : (ϕ : CommAlgebraHom A UnitCommAlgebra) → terminalMap ≡ ϕ
47- path ϕ = Σ≡Prop (isPropIsCommAlgebraHom {M = A} {N = UnitCommAlgebra})
48- λ i _ → isPropUnit* _ _ i
49-
50- open CommAlgebraStr (snd A)
51- module _ (1≡0 : 1a ≡ 0a) where
52-
53- 1≡0→isContr : isContr ⟨ A ⟩
54- 1≡0→isContr = 0a , λ a →
55- 0a ≡⟨ solve! S ⟩
56- a · 0a ≡⟨ cong (λ b → a · b) (sym 1≡0) ⟩
57- a · 1a ≡⟨ solve! S ⟩
58- a ∎
59- where S = CommAlgebra→CommRing A
60-
61- equivFrom1≡0 : CommAlgebraEquiv A UnitCommAlgebra
62- equivFrom1≡0 = isContr→Equiv 1≡0→isContr isContrUnit* ,
63- snd terminalMap
64- -}
48+ equivFrom1≡0 1≡0 = isContr→EquivTerminal (0r , λ x →
49+ 0r ≡⟨ solve! A' ⟩
50+ 0r · x ≡⟨ cong (λ u → u · x) (sym 1≡0) ⟩
51+ 1r · x ≡⟨ solve! A' ⟩
52+ x ∎)
53+ where A' = CommAlgebra→CommRing A
0 commit comments