Skip to content

Commit

Permalink
still allow definitional commutativity with projecting to the carrier
Browse files Browse the repository at this point in the history
  • Loading branch information
felixwellen committed Jul 24, 2024
1 parent efc76c4 commit 815d8c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
22 changes: 13 additions & 9 deletions Cubical/Algebra/CommAlgebra/FreeCommAlgebra/Base.agda
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,24 @@ module Construction (R : CommRing ℓ) where
⋆-assoc ⋆-rdist-+ ⋆-ldist-+ ·-lid ⋆-assoc-·


opaque
_[_] : (R : CommRing ℓ) (I : Type ℓ') CommAlgebra R (ℓ-max ℓ ℓ')
fst (R [ I ]) = Construction.R[_] R I
snd (R [ I ]) = makeCommAlgebraStr _ _ _ _ _ _ _ isCommAlgebra
where open Construction R

opaque
unfolding _[_]
module _ (R : CommRing ℓ) (I : Type ℓ') where
open Construction R
opaque
freeCAlgStr : CommAlgebraStr R (R[ I ])
freeCAlgStr = makeCommAlgebraStr _ _ _ _ _ _ _ isCommAlgebra

_[_] : (R : CommRing ℓ) (I : Type ℓ') CommAlgebra R (ℓ-max ℓ ℓ')
fst (R [ I ]) = Construction.R[_] R I
snd (R [ I ]) = freeCAlgStr R I

_[_]ᵣ : (R : CommRing ℓ) (I : Type ℓ') CommRing (ℓ-max ℓ ℓ')
(R [ I ]ᵣ) = CommAlgebra→CommRing (R [ I ])

opaque
const : {R : CommRing ℓ} {I : Type ℓ'} ⟨ R ⟩ ⟨ R [ I ] ⟩
const = Construction.const

opaque
unfolding _[_]

var : {R : CommRing ℓ} {I : Type ℓ'} I ⟨ R [ I ] ⟩
var = Construction.var
8 changes: 4 additions & 4 deletions Cubical/Algebra/CommAlgebra/FreeCommAlgebra/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ module Theory {R : CommRing ℓ} {I : Type ℓ'} where

private
opaque
unfolding const
unfolding const freeCAlgStr

on- : {x : ⟨ R [ I ] ⟩} P x P (- x)
on- {x} Px = subst P (minusByMult x) (on· onConst Px)
Expand All @@ -86,7 +86,7 @@ module Theory {R : CommRing ℓ} {I : Type ℓ'} where
mkPathP _ = isProp→PathP λ i isPropP

opaque
unfolding _[_] var const
unfolding var const freeCAlgStr

elimProp : ((x : _) P x)

Expand Down Expand Up @@ -175,7 +175,7 @@ module Theory {R : CommRing ℓ} {I : Type ℓ'} where
-- imageOf1Works = ⋆IdL 1a

opaque
unfolding _[_] const
unfolding const

inducedMap : ⟨ R [ I ] ⟩ ⟨ A ⟩
inducedMap (C.var x) = φ x
Expand Down Expand Up @@ -224,7 +224,7 @@ module Theory {R : CommRing ℓ} {I : Type ℓ'} where
open IsAlgebraHom

opaque
unfolding inducedMap
unfolding inducedMap freeCAlgStr

inducedHom : CommAlgebraHom (R [ I ]) A
inducedHom .fst = inducedMap
Expand Down

0 comments on commit 815d8c2

Please sign in to comment.