Skip to content

Commit 63868fe

Browse files
committed
chore: modulize tests (5/N) (leanprover-community#37654)
Co-authored-by: Komyyy <pol_tta@outlook.jp>
1 parent e5dfb6b commit 63868fe

29 files changed

Lines changed: 38 additions & 14 deletions

MathlibTest/CategoryTheory/PrettyPrinting.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright (c) 2024 Markus Himmel. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Markus Himmel
55
-/
6+
module
67
import Mathlib.CategoryTheory.Functor.Basic
78

89
/-!

MathlibTest/DefEqAbuse.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
module
12
import Mathlib.Algebra.Group.Subgroup.Defs
23
import Mathlib.Order.CompleteLattice.Basic
34
import Mathlib.Tactic.DefEqAbuse

MathlibTest/DefEqTransformations.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
module
12
import Mathlib.Tactic.DefEqTransformations
23

34
set_option autoImplicit true

MathlibTest/FBinop.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
module
12
import Mathlib.Tactic.FBinop
23
import Mathlib.Data.Set.Prod
34
import Mathlib.Data.Finset.Prod
@@ -15,7 +16,7 @@ class SProd' (α : Type u) (β : Type v) (γ : outParam (Type w)) where
1516
sprod : α → β → γ
1617

1718
-- This notation binds more strongly than (pre)images, unions and intersections.
18-
@[inherit_doc SProd'.sprod] infixr:82 " ×ˢ' " => SProd'.sprod
19+
@[inherit_doc SProd'.sprod] local infixr:82 " ×ˢ' " => SProd'.sprod
1920
macro_rules | `($x ×ˢ' $y) => `(fbinop% SProd'.sprod $x $y)
2021

2122
@[default_instance]

MathlibTest/FunLike.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
module
12
import Mathlib.Data.FunLike.Basic
23

34
variable {F α β : Sort*} [i : FunLike F α β] (f : F) (a : α)

MathlibTest/InstanceTransparency.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
module
12
import Mathlib.Data.Real.Basic
23

34
/-! # Test transparency level of `Div` field in `DivInvMonoid`

MathlibTest/Linarith/Basic.lean

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
module
12
import Mathlib.Tactic.Linarith
23
import Mathlib.Tactic.Linarith.Oracle.FourierMotzkin
34
import Mathlib.Algebra.BigOperators.Group.Finset.Pi
@@ -9,7 +10,7 @@ set_option linter.unusedVariables false
910
set_option autoImplicit false
1011

1112
open Lean.Elab.Tactic in
12-
def testSorryTac : TacticM Unit := do
13+
meta def testSorryTac : TacticM Unit := do
1314
let e ← getMainTarget
1415
let t ← `(test_sorry)
1516
closeMainGoalUsing `sorry fun _ _ => elabTerm t e
@@ -720,11 +721,11 @@ example {x1 x2 x3 x4 x5 x6 x7 x8 : ℚ} :
720721

721722
section findSquares
722723

723-
private abbrev wrapped (z : ℤ) : ℤ := z
724+
abbrev wrapped (z : ℤ) : ℤ := z
724725
/-- the `findSquares` preprocessor can look through reducible defeq -/
725726
example (x : ℤ) : 0 ≤ x * wrapped x := by nlinarith
726727

727-
private def tightlyWrapped (z : ℤ) : ℤ := z
728+
def tightlyWrapped (z : ℤ) : ℤ := z
728729
/--
729730
error: linarith failed to find a contradiction
730731
case h

MathlibTest/Linarith/NNReal.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
module
12
import Mathlib.Tactic.Linarith.NNRealPreprocessor
23
import Mathlib.Data.ENNReal.Operations
34
import Mathlib.Data.ENNReal.Inv

MathlibTest/Monotonicity.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright (c) 2019 Simon Hudon. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Simon Hudon
55
-/
6+
module
67
import Mathlib.Algebra.Order.Ring.Defs
78
import Mathlib.Data.List.Defs
89
import Mathlib.Tactic.Monotonicity

MathlibTest/Replace.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright (c) 2022 Arthur Paulino. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Arthur Paulino
55
-/
6+
module
67
import Mathlib.Tactic.Replace
78

89
set_option linter.unusedVariables false

0 commit comments

Comments
 (0)