Skip to content

Commit 3f442ab

Browse files
committed
TC: tcalgebra/TcPolySmokeTest.ec — exercise [*] at parametric carrier
With the post-inline subsumption filter (commit c47657a), [p * q] at carrier [int poly] resolves uniquely without needing the [polyM] disambiguation. Replace the [polyM]-based test with the natural class-form, and add [test_mulrA_at_int_poly] to cover associativity. The mulmonoid [*] abbrev that previously caused the [MultipleOpMatch] ambiguity is now dropped post-inline, because its body head [(+)] [tc_reduce]s to [polyM] which is already represented (concretely) by the section-local [Top.TcPoly.*] abbrev's body.
1 parent c47657a commit 3f442ab

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

examples/tcalgebra/TcPolySmokeTest.ec

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ lemma test_addrA_at_int_poly (p q r : int poly) :
9191
p + (q + r) = (p + q) + r.
9292
proof. by apply (addrA<:int poly>). qed.
9393

94-
(* [polyM] is the section-local abbrev; the comring's [( * )] is the
95-
class op. With both in scope at carrier [int poly], `p * q' is
96-
ambiguous at parse — use the structural lemma instead. *)
97-
lemma test_mulrC_at_int_poly (p q : int poly) : polyM p q = polyM q p.
98-
proof. by apply polyM_mulrC. qed.
94+
lemma test_mulrC_at_int_poly (p q : int poly) : p * q = q * p.
95+
proof. by apply (mulrC<:int poly>). qed.
96+
97+
lemma test_mulrA_at_int_poly (p q r : int poly) :
98+
p * (q * r) = (p * q) * r.
99+
proof. by apply (mulrA<:int poly>). qed.

0 commit comments

Comments
 (0)