File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ tests/hnf.v
8080tests/fun_instance.v
8181tests/issue284.v
8282tests/issue287.v
83+ tests/monoid_law_structure.v
8384
8485-R tests HB.tests
8586-R examples HB.examples
Original file line number Diff line number Diff line change 1+ From HB Require Import structures.
2+
3+ HB.mixin Record isMonLaw T (e : T) (op : T -> T -> T) := {
4+ opmA : forall a b c, op (op a b) c = op a (op b c);
5+ op1m : forall x, op e x = x;
6+ opm1 : forall x, op x e = x;
7+ }.
8+
9+ HB.structure Definition MonLaw T e := { op of isMonLaw T e op }.
10+
11+ HB.mixin Record isPreMonoid T := {
12+ zero : T;
13+ add : T -> T -> T;
14+ }.
15+ HB.structure Definition PreMonoid := { T of isPreMonoid T }.
16+
17+ HB.structure Definition Monoid :=
18+ { T of isPreMonoid T & isMonLaw T zero add }.
You can’t perform that action at this time.
0 commit comments