You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/test_primproj_ty.v
+18-2Lines changed: 18 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,26 @@ HB.mixin Record AddMonoid_of_TYPE S := {
12
12
13
13
HB.structure Definition AddMonoid := { A of AddMonoid_of_TYPE A }.
14
14
15
-
SetPrintingAll.
16
-
17
15
Goallet x := @addrA in True.
18
16
match goal with
19
17
| |- let x : forall s : AddMonoid.type, @associative (AddMonoid.sort s) (@add s) := @addrA in True => idtac "OK"
20
18
end.
21
19
Abort.
20
+
21
+
#[primitive]
22
+
HB.mixin Record Scale_of_AddMonoid (P : Type) S of AddMonoid_of_TYPE S := {
23
+
scale : P -> S -> S;
24
+
scaleBad : forall p (x y : S), (* HUMMM, if I don't put S here, it infers the eta expansion of S *)
25
+
scale p (add x y) = add (scale p x) (scale p y);
26
+
}.
27
+
28
+
About Scale_of_AddMonoid.scale.
29
+
30
+
HB.structure Definition ScaleMonoid P := { A of Scale_of_AddMonoid P A }.
31
+
32
+
Goallet a := @scaleBad in True.
33
+
match goal with
34
+
| |- let a : forall P (s : ScaleMonoid.type P), forall p : P, forall x y : ScaleMonoid.sort P s, scale p (add x y) = add (scale p x) (scale p y) := @scaleBad in True => idtac "OK"
0 commit comments