This PR adds configuration options for `decide`/`decide!`/`native_decide` and refactors the tactics to be frontends to the same backend. Adds a `+revert` option that cleans up the local context and reverts all local variables the goal depends on, along with indirect propositional hypotheses. Makes `native_decide` fail at elaboration time on failure without sacrificing performance (the decision procedure is still evaluated just once). Now `native_decide` supports universe polymorphism. Closes #2072
21 lines
495 B
Text
21 lines
495 B
Text
/--
|
|
info: 12776324570088369205
|
|
-/
|
|
#guard_msgs in
|
|
#eval (123456789012345678901).toUInt64
|
|
|
|
/--
|
|
info: 12776324570088369205
|
|
-/
|
|
#guard_msgs in
|
|
#eval (123456789012345678901).toUInt64.toNat
|
|
|
|
/--
|
|
error: tactic 'native_decide' evaluated that the proposition
|
|
(Nat.toUInt64 123456789012345678901).toNat = 123456789012345678901
|
|
is false
|
|
-/
|
|
#guard_msgs in
|
|
theorem false : False := by
|
|
have : (123456789012345678901).toUInt64.toNat = 123456789012345678901 := by native_decide
|
|
simp [Nat.toUInt64] at this
|