File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ tests/fun_instance.v
8181tests/issue284.v
8282tests/issue287.v
8383tests/monoid_law_structure.v
84+ tests/monoid_law_structure_clone.v
8485
8586-R tests HB.tests
8687-R examples HB.examples
Original file line number Diff line number Diff line change @@ -15,6 +15,4 @@ HB.mixin Record isPreMonoid T := {
1515HB.structure Definition PreMonoid := { T of isPreMonoid T }.
1616
1717HB.structure Definition Monoid :=
18- { T of isPreMonoid T &
19- isMonLaw T zero add }.
20- (* isMonLaw T (@zero (PreMonoid.clone T _)) (@add (PreMonoid.clone T _)) *)
18+ { T of isPreMonoid T & isMonLaw T zero add }.
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 &
19+ isMonLaw T (@zero (PreMonoid.clone T _)) (@add (PreMonoid.clone T _)) }.
You can’t perform that action at this time.
0 commit comments