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
The logic for checking if a term is an offset seems to do a syntactic check that prevents simp rules from firing.
This appears to be a regression introduced by #3614. Prior to that, the example below succeeds, but after #3614 lean returns error: simp made no progress.
classAddCommMagma (G : Type u) extends Add G where
/-- Addition is commutative in an commutative additive magma. -/protected add_comm : ∀ a b : G, a + b = b + a
instance : AddCommMagma Nat where
add_comm := Nat.add_comm
example (n : Nat) (p : n = 3) : 1 + n = 1 + 3 := by
rw [AddCommMagma.add_comm 1, AddCommMagma.add_comm 1]
simp only [Nat.succ.injEq]
exact p
The text was updated successfully, but these errors were encountered:
This changes how Nat typeclass checks in offset terms from syntactic
equality to definitional equality with "instances" transparency.
This may have a negative performance penalty in `isOffset?`, but it
should be small in common cases since the relevant instances are small
terms.
This closes#3836
The logic for checking if a term is an offset seems to do a syntactic check that prevents simp rules from firing.
This appears to be a regression introduced by #3614. Prior to that, the example below succeeds, but after #3614 lean returns
error: simp made no progress
.The text was updated successfully, but these errors were encountered: