Skip to content

Commit 6f1dee6

Browse files
committed
test for step 0 of CoREACT
1 parent 0fd71cf commit 6f1dee6

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

_CoqProject.test-suite

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ tests/hnf.v
8080
tests/fun_instance.v
8181
tests/issue284.v
8282
tests/issue287.v
83+
tests/monoid_law_structure.v
8384

8485
-R tests HB.tests
8586
-R examples HB.examples

tests/monoid_law_structure.v

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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 }.

0 commit comments

Comments
 (0)