Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test for step 0 of CoREACT #357

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more
  • Loading branch information
gares committed Jun 2, 2023
commit f6c1970f4748fcff2fe4b1234ef3fb158d72e173
1 change: 1 addition & 0 deletions _CoqProject.test-suite
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ tests/fun_instance.v
tests/issue284.v
tests/issue287.v
tests/monoid_law_structure.v
tests/monoid_law_structure_clone.v

-R tests HB.tests
-R examples HB.examples
Expand Down
4 changes: 1 addition & 3 deletions tests/monoid_law_structure.v
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@ HB.mixin Record isPreMonoid T := {
HB.structure Definition PreMonoid := { T of isPreMonoid T }.

HB.structure Definition Monoid :=
{ T of isPreMonoid T &
isMonLaw T zero add }.
(* isMonLaw T (@zero (PreMonoid.clone T _)) (@add (PreMonoid.clone T _))*)
{ T of isPreMonoid T & isMonLaw T zero add }.
19 changes: 19 additions & 0 deletions tests/monoid_law_structure_clone.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
From HB Require Import structures.

HB.mixin Record isMonLaw T (e : T) (op : T -> T -> T) := {
opmA : forall a b c, op (op a b) c = op a (op b c);
op1m : forall x, op e x = x;
opm1 : forall x, op x e = x;
}.

HB.structure Definition MonLaw T e := { op of isMonLaw T e op }.

HB.mixin Record isPreMonoid T := {
zero : T;
add : T -> T -> T;
}.
HB.structure Definition PreMonoid := { T of isPreMonoid T }.

HB.structure Definition Monoid :=

Check failure on line 17 in tests/monoid_law_structure_clone.v

View workflow job for this annotation

GitHub Actions / plan-B

HB: all mixins must have the same key
{ T of isPreMonoid T &
isMonLaw T (@zero (PreMonoid.clone T _)) (@add (PreMonoid.clone T _)) }.
Loading