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
import Aesop
example (n : Nat) : n > 0 → ¬ (n = n - 1) := by
aesop
This makes simp loop because it repeatedly rewrites n ==> n - 1. We could detect equations of this form and by default exclude them from the norm simp call.
The text was updated successfully, but these errors were encountered:
Hi @JLimperg, related to this issue, I'm wondering why aesop doesn't just check whether the goal has changed after a normalization tactic and throw an error?
Whether the goal has changed is not so easy to detect. You can check for identity of metavariables, which is fast but unreliable. You can check for structural equality of the goal metavariables (contexts and types), which is O(n) in the size of the goal, but then you should also ignore things like changed FVarIds and MVarIds (as long as their types/values are still the same). Lean does not provide a suitable method, but I've now implemented one, so it might indeed be a good idea to use that. Alternatively, I could expose it as a combinator for normalization rules to use if they can't detect goal changes more efficiently (which most rules can).
The example above would not be affected either way because the rewrite rule n ==> n - 1 actually changes the goal in each iteration.
Example:
This makes
simp
loop because it repeatedly rewritesn ==> n - 1
. We could detect equations of this form and by default exclude them from the normsimp
call.The text was updated successfully, but these errors were encountered: