diff options
author | Greg Brown <greg.brown01@ed.ac.uk> | 2022-12-06 15:33:27 +0000 |
---|---|---|
committer | Greg Brown <greg.brown01@ed.ac.uk> | 2022-12-06 15:33:27 +0000 |
commit | 83c85bf396949287365a694a89e0f49a58cab5a2 (patch) | |
tree | 772592d59b3d0f907e0b69179a96d08ed4ad2ecc /src/Soat/FirstOrder | |
parent | 121965c3e550f285d3a428cbb6da10c97bfa9846 (diff) |
Cast algebraic structure as setoid homomorphisms.
Diffstat (limited to 'src/Soat/FirstOrder')
-rw-r--r-- | src/Soat/FirstOrder/Algebra.idr | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Soat/FirstOrder/Algebra.idr b/src/Soat/FirstOrder/Algebra.idr index 97b6adc..982e54e 100644 --- a/src/Soat/FirstOrder/Algebra.idr +++ b/src/Soat/FirstOrder/Algebra.idr @@ -55,6 +55,11 @@ public export (.rawSetoid) a = MkRawSetoidAlgebra a.raw a.relation public export +(.semFunc) : (a : Algebra sig) -> {t : sig.T} -> (op : Op sig t) + -> index (Product a.setoid) op.arity ~> index a.setoid t +a .semFunc op = MkSetoidHomomorphism (a.raw.sem op) (\_, _ => a.algebra.semCong op) + +public export record (~>) {0 sig : Signature} (a, b : Algebra sig) where constructor MkHomomorphism |