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
Reduced the issue to a self-contained, reproducible test case.
Description
This is an example where calc fails to figure out a type in an example also featuring a default instance, but there is enough information that I hope it would be able to.
Steps to Reproduce
instance [LE α] [LT α] : @Trans α α α LE.le LT.lt LT.lt := sorryclassMonoid (M : Type) extends OfNat M (nat_lit 1), Mul M where
npow : Nat → M → M := sorry@[default_instance high]instanceMonoid.Pow {M : Type} [Monoid M] : Pow M Nat :=
⟨fun x n ↦ Monoid.npow n x⟩
instance : Monoid Int where
npow n x := x ^ n
example {n : Int} : n ^ 2 < 1 :=
calc
n ^ 2 ≤ 1 ^ 2 := sorry
_ < 1 := sorry
Expected behavior: [What you expect to happen]
Expected to be error-free. The following, with a type annotation, does work:
Prerequisites
Description
This is an example where
calc
fails to figure out a type in an example also featuring a default instance, but there is enough information that I hope it would be able to.Steps to Reproduce
Expected behavior: [What you expect to happen]
Expected to be error-free. The following, with a type annotation, does work:
Actual behavior: [What actually happens]
Reproduces how often: [What percentage of the time does it reproduce?]
Always
Versions
nightly-2023-02-01
Additional Information
Zulip discussion
The text was updated successfully, but these errors were encountered: