summaryrefslogtreecommitdiff
path: root/src/Soat
diff options
context:
space:
mode:
authorGreg Brown <greg.brown01@ed.ac.uk>2022-11-25 15:24:17 +0000
committerGreg Brown <greg.brown01@ed.ac.uk>2022-11-25 15:24:17 +0000
commit02f72834f36dbb3ff362f3876ebf87a2cebec0a8 (patch)
tree3ee8bd27d3eecfd497a9a8429ef5d64d1a4f90d0 /src/Soat
parent1f867019430517435433ec55ad42dbf6770fd4fd (diff)
refactor: rename Homomorphism.f -> func.
Diffstat (limited to 'src/Soat')
-rw-r--r--src/Soat/FirstOrder/Algebra.idr4
-rw-r--r--src/Soat/FirstOrder/Term.idr16
-rw-r--r--src/Soat/SecondOrder/Algebra.idr4
3 files changed, 12 insertions, 12 deletions
diff --git a/src/Soat/FirstOrder/Algebra.idr b/src/Soat/FirstOrder/Algebra.idr
index bbc0430..5428ca3 100644
--- a/src/Soat/FirstOrder/Algebra.idr
+++ b/src/Soat/FirstOrder/Algebra.idr
@@ -60,5 +60,5 @@ public export
record Homomorphism {0 sig : Signature} (a, b : Algebra sig)
where
constructor MkHomomorphism
- f : (t : sig.T) -> a.raw.U t -> b.raw.U t
- homo : IsHomomorphism a b f
+ func : IFunc a.raw.U b.raw.U
+ homo : IsHomomorphism a b func
diff --git a/src/Soat/FirstOrder/Term.idr b/src/Soat/FirstOrder/Term.idr
index 92f35cc..e39e7ac 100644
--- a/src/Soat/FirstOrder/Term.idr
+++ b/src/Soat/FirstOrder/Term.idr
@@ -157,16 +157,16 @@ bindHomo env = MkHomomorphism _ (bindIsHomo _ env)
public export
bindUnique' : {v : ISetoid sig.T} -> {a : Algebra sig}
-> (f, g : Homomorphism (FreeAlgebra v) a)
- -> ({t : sig.T} -> (i : v.U t) -> a.relation t (f.f t (Done i)) (g.f t (Done i)))
+ -> ({t : sig.T} -> (i : v.U t) -> a.relation t (f.func t (Done i)) (g.func t (Done i)))
-> {t : sig.T} -> (tm : Term sig v.U t)
- -> a.relation t (f.f t tm) (g.f t tm)
+ -> a.relation t (f.func t tm) (g.func t tm)
public export
bindsUnique' : {v : ISetoid sig.T} -> {a : Algebra sig}
-> (f, g : Homomorphism (FreeAlgebra v) a)
- -> ({t : sig.T} -> (i : v.U t) -> a.relation t (f.f t (Done i)) (g.f t (Done i)))
+ -> ({t : sig.T} -> (i : v.U t) -> a.relation t (f.func t (Done i)) (g.func t (Done i)))
-> {ts : List sig.T} -> (tms : Term sig v.U ^ ts)
- -> Pointwise a.relation (map f.f tms) (map g.f tms)
+ -> Pointwise a.relation (map f.func tms) (map g.func tms)
bindUnique' f g cong (Done i) = cong i
bindUnique' f g cong (Call op ts) =
@@ -183,17 +183,17 @@ bindsUnique' f g cong (t :: ts) = bindUnique' f g cong t :: bindsUnique' f g con
public export
bindUnique : {v : ISetoid sig.T} -> {a : Algebra sig} -> (env : IFunction v a.setoid)
-> (f : Homomorphism (FreeAlgebra v) a)
- -> ({t : sig.T} -> (i : v.U t) -> a.relation t (f.f t (Done i)) (env.func t i))
+ -> ({t : sig.T} -> (i : v.U t) -> a.relation t (f.func t (Done i)) (env.func t i))
-> {t : sig.T} -> (tm : Term sig v.U t)
- -> a.relation t (f.f t tm) (bindTerm {a = a.raw} env.func tm)
+ -> a.relation t (f.func t tm) (bindTerm {a = a.raw} env.func tm)
bindUnique env f = bindUnique' f (bindHomo env)
public export
bindsUnique : {v : ISetoid sig.T} -> {a : Algebra sig} -> (env : IFunction v a.setoid)
-> (f : Homomorphism (FreeAlgebra v) a)
- -> ({t : sig.T} -> (i : v.U t) -> a.relation t (f.f t (Done i)) (env.func t i))
+ -> ({t : sig.T} -> (i : v.U t) -> a.relation t (f.func t (Done i)) (env.func t i))
-> {ts : List sig.T} -> (tms : Term sig v.U ^ ts)
- -> Pointwise a.relation (map f.f tms) (bindTerms {a = a.raw} env.func tms)
+ -> Pointwise a.relation (map f.func tms) (bindTerms {a = a.raw} env.func tms)
bindsUnique env f cong ts =
pwTrans (\i => (a.algebra.equivalence i).trans)
(bindsUnique' f (bindHomo env) cong ts) $
diff --git a/src/Soat/SecondOrder/Algebra.idr b/src/Soat/SecondOrder/Algebra.idr
index 57b8a51..5457385 100644
--- a/src/Soat/SecondOrder/Algebra.idr
+++ b/src/Soat/SecondOrder/Algebra.idr
@@ -138,5 +138,5 @@ public export
record Homomorphism {0 sig : Signature} (a, b : Algebra sig)
where
constructor MkHomomorphism
- f : (t : sig.T) -> (ctx : List sig.T) -> a.raw.U t ctx -> b.raw.U t ctx
- homo : IsHomomorphism a b f
+ func : (t : sig.T) -> (ctx : List sig.T) -> a.raw.U t ctx -> b.raw.U t ctx
+ homo : IsHomomorphism a b func