Skip to content

Commit

Permalink
refactor: do not import old-style have/suffices/replace within …
Browse files Browse the repository at this point in the history
…mathlib (#10534)

This syntax remains available downstream with `import Mathlib.Tactic`, but is no longer available in mathlib itself.

This follows on from #10640, which remove all current uses of this syntax.

By removing these imports, we prevent further regressions in mathlib,
and save reviewers from having to look out for this in review.

In future we could delete this syntax entirely, but this would harm downstream code, especially mathport output.



Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
  • Loading branch information
eric-wieser and sgouezel committed Feb 20, 2024
1 parent bcc8209 commit c08fc63
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
1 change: 0 additions & 1 deletion Mathlib/Data/Rat/Lemmas.lean
Expand Up @@ -7,7 +7,6 @@ import Mathlib.Data.Rat.Defs
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.Data.Int.Div
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Tactic.Replace
import Mathlib.Data.PNat.Defs

#align_import data.rat.lemmas from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
Expand Down
2 changes: 0 additions & 2 deletions Mathlib/Tactic/Common.lean
Expand Up @@ -48,7 +48,6 @@ import Mathlib.Tactic.Find
import Mathlib.Tactic.GeneralizeProofs
import Mathlib.Tactic.GuardGoalNums
import Mathlib.Tactic.GuardHypNums
import Mathlib.Tactic.Have
import Mathlib.Tactic.HelpCmd
import Mathlib.Tactic.HigherOrder
import Mathlib.Tactic.Hint
Expand All @@ -68,7 +67,6 @@ import Mathlib.Tactic.Observe
import Mathlib.Tactic.ProjectionNotation
import Mathlib.Tactic.Propose
import Mathlib.Tactic.PushNeg
import Mathlib.Tactic.Replace
import Mathlib.Tactic.RSuffices
import Mathlib.Tactic.Recover
import Mathlib.Tactic.Relation.Symm
Expand Down
3 changes: 3 additions & 0 deletions Mathlib/Tactic/Have.lean
Expand Up @@ -12,6 +12,9 @@ import Lean.Meta.Tactic.Assert
This file extends the `have`, `let` and `suffices` tactics to allow the addition of hypotheses to
the context without requiring their proofs to be provided immediately.
As a style choice, this should not be used in mathlib; but is provided for downstream users who
preferred the old style.
-/

namespace Mathlib.Tactic
Expand Down
10 changes: 10 additions & 0 deletions Mathlib/Tactic/Replace.lean
Expand Up @@ -6,6 +6,16 @@ Authors: Arthur Paulino, Mario Carneiro
import Std.Tactic.Replace
import Mathlib.Tactic.Have

/-!
# Extending `replace`
This file extends the `replace` tactic from `Std` to allow the addition of hypotheses to
the context without requiring their proofs to be provided immediately.
As a style choice, this should not be used in mathlib; but is provided for downstream users who
preferred the old style.
-/

namespace Mathlib.Tactic

open Lean Elab.Tactic
Expand Down
1 change: 1 addition & 0 deletions test/slim_check.lean
Expand Up @@ -2,6 +2,7 @@ import Mathlib.Tactic.SlimCheck
import Mathlib.Tactic.SuccessIfFailWithMsg
import Mathlib.Data.Finsupp.Notation
import Mathlib.Testing.SlimCheck.Functions
import Mathlib.Tactic.Have

private axiom test_sorry : ∀ {α}, α

Expand Down

0 comments on commit c08fc63

Please sign in to comment.