summaryrefslogtreecommitdiff
path: root/src/Soat/FirstOrder/Algebra.idr
diff options
context:
space:
mode:
Diffstat (limited to 'src/Soat/FirstOrder/Algebra.idr')
-rw-r--r--src/Soat/FirstOrder/Algebra.idr8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Soat/FirstOrder/Algebra.idr b/src/Soat/FirstOrder/Algebra.idr
index 6f9389b..b9c02c5 100644
--- a/src/Soat/FirstOrder/Algebra.idr
+++ b/src/Soat/FirstOrder/Algebra.idr
@@ -8,6 +8,8 @@ import Soat.FirstOrder.Signature
%default total
%hide Control.Relation.Equivalence
+infix 5 ~>
+
public export 0
algebraOver : (sig : Signature) -> (U : sig.T -> Type) -> Type
algebraOver sig x = {t : sig.T} -> (op : Op sig t) -> x ^ op.arity -> x t
@@ -62,7 +64,7 @@ record IsHomomorphism
-> b.relation t (f t (a.raw.sem op tms)) (b.raw.sem op (map f tms))
public export
-record Homomorphism {0 sig : Signature} (a, b : Algebra sig)
+record (~>) {0 sig : Signature} (a, b : Algebra sig)
where
constructor MkHomomorphism
func : IFunc a.raw.U b.raw.U
@@ -79,7 +81,7 @@ idIsHomo = MkIsHomomorphism
mapId tms)
public export
-idHomo : {a : Algebra sig} -> Homomorphism a a
+idHomo : {a : Algebra sig} -> a ~> a
idHomo = MkHomomorphism _ idIsHomo
public export
@@ -98,5 +100,5 @@ compIsHomo fHomo gHomo = MkIsHomomorphism
mapComp tms)
public export
-compHomo : {a, b, c : Algebra sig} -> Homomorphism b c -> Homomorphism a b -> Homomorphism a c
+compHomo : {a, b, c : Algebra sig} -> b ~> c -> a ~> b -> a ~> c
compHomo f g = MkHomomorphism _ $ compIsHomo f.homo g.homo