open import Algebra
open import Prelude
module Algebra.IndexedMonoid {โโ โโ} {๐ : Type โโ} (mon : Monoid ๐) (U : ๐ โ Type โโ) where
open Monoid mon
private
variable x y z : ๐
record MonoidCongruent : Type (โโ โโ โโ) where
field
โ : U ฮต
_โ_ : U x โ U y โ U (x โ y)
โโ : (xs : U x) โ โ โ xs โก[ i โ U (ฮตโ x i) ]โก xs
โโ : (xs : U x) โ xs โ โ โก[ i โ U (โฮต x i) ]โก xs
โ-assoc : (xs : U x) (ys : U y) (zs : U z) โ (xs โ ys) โ zs โก[ i โ U (assoc x y z i) ]โก xs โ (ys โ zs)
open import Data.Sigma.Properties
record ComonoidCongruent : Type (โโ โโ โโ) where
field
โแต : U (x โ y) โ U x ร U y
โหก : U (x โ y) โ U x
โหก = fst โ โแต
โสณ : U (x โ y) โ U y
โสณ = snd โ โแต
field
โโสณ : (xs : U (ฮต โ x)) โ xs โก[ i โ U (ฮตโ x i) ]โก โสณ xs
โโหก : (xs : U (x โ ฮต)) โ xs โก[ i โ U (โฮต x i) ]โก โหก xs
โแต-assoc : reassoc .fun โ mapโ โแต โ โแต โก[ i โ (U (assoc x y z i) โ U x ร U y ร U z) ]โก mapโ โแต โ โแต