{-# OPTIONS --safe #-} open import Algebra open import Prelude module Data.Weighted.Condition {â} {đ : Type â} (sgp : Semigroup đ) where open import Data.Weighted.Definition sgp open import Data.Weighted.Eliminators sgp open import Data.Weighted.Functor open import Data.Weighted.CommutativeMonoid sgp open Semigroup sgp module _ {A : Type a} (f : đ â đ) (f-hom : â p q â f p â f q ⥠f (p â q)) where cond-alg : A âśW A cond-alg = record { act-w = Îť w x â f w âš x ⡠â â ; coh-w = Îť p q x â dup (f p) (f q) x â â Íž cong (_âš x ⡠â â) (f-hom p q) } cond : Weighted A â Weighted A cond = [ cond-alg ]Wâ