Open eric-wieser opened 7 months ago
The revert tactic ignores the order of its arguments
revert
[Broader context that the issue occured in. If there was any prior discussion on the Lean Zulip, link it here as well.]
example (a b c : Nat) : a * b * c = 1 := by revert c a b sorry
Expected behavior: Goal is ∀ (c a b : Nat), a * b * c = 1 like it was in Lean 3
∀ (c a b : Nat), a * b * c = 1
Actual behavior: Goal is ∀ (a b c : Nat), a * b * c = 1, ignoring the argument order
∀ (a b c : Nat), a * b * c = 1
4.4.0-rc1
Add :+1: to issues you consider important. If others are impacted by this issue, please ask them to add :+1: to it.
It looks like this is trivially fixed by adding (preserveOrder := true) to:
(preserveOrder := true)
https://github.com/leanprover/lean4/blob/d4f10bc07e575de14edd08ccbcda55e6dd3fa823/src/Lean/Elab/Tactic/BuiltinTactic.lean#L296
Is the choice to not preserve order deliberate?
I suspect this is just an oversight. Could you make the PR?
Prerequisites
Description
The
revert
tactic ignores the order of its argumentsContext
[Broader context that the issue occured in. If there was any prior discussion on the Lean Zulip, link it here as well.]
Steps to Reproduce
Expected behavior: Goal is
∀ (c a b : Nat), a * b * c = 1
like it was in Lean 3Actual behavior: Goal is
∀ (a b c : Nat), a * b * c = 1
, ignoring the argument orderVersions
4.4.0-rc1
Impact
Add :+1: to issues you consider important. If others are impacted by this issue, please ask them to add :+1: to it.