Skip to content

Commit

Permalink
chore: remove last use of classical! (#12257)
Browse files Browse the repository at this point in the history
The `classical!` tactic is always replaceable by the `classical` tactic. This removes the last use of it, which required adding in Std the plumbing-level implementation of `classical`.

- [x] Depends on: #12256 

Co-authored-by: Scott Morrison <[email protected]>
  • Loading branch information
kim-em and kim-em committed Apr 19, 2024
1 parent 11f79c5 commit 6096b4a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Mathlib/Tactic/Tauto.lean
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The `tauto` tactic.

namespace Mathlib.Tactic.Tauto

open Lean Elab.Tactic Parser.Tactic Lean.Meta MVarId
open Lean Elab.Tactic Parser.Tactic Lean.Meta MVarId Std.Tactic
open Qq

initialize registerTraceClass `tauto
Expand Down Expand Up @@ -186,12 +186,12 @@ def finishingConstructorMatcher (e : Q(Prop)) : MetaM Bool :=

/-- Implementation of the `tauto` tactic. -/
def tautology : TacticM Unit := focusAndDoneWithScope "tauto" do
evalTactic (← `(tactic| classical!))
tautoCore
allGoals (iterateUntilFailure
(evalTactic (← `(tactic| rfl)) <|>
evalTactic (← `(tactic| solve_by_elim)) <|>
liftMetaTactic (constructorMatching · finishingConstructorMatcher)))
classical do
tautoCore
allGoals (iterateUntilFailure
(evalTactic (← `(tactic| rfl)) <|>
evalTactic (← `(tactic| solve_by_elim)) <|>
liftMetaTactic (constructorMatching · finishingConstructorMatcher)))

/--
`tauto` breaks down assumptions of the form `_ ∧ _`, `_ ∨ _`, `_ ↔ _` and `∃ _, _`
Expand Down

0 comments on commit 6096b4a

Please sign in to comment.