Skip to content

Commit 7ca047f

Browse files
committed
chore: move Init.Logic and its remaining dependencies to Deprecated (#17771)
The results in this file have been deprecated for a while and none seem to be used in Mathlib except for other deprecated results that aren't used either. So let's move everything to the `Deprecated` folder in order to empty out the `Init` folder.
1 parent f44f468 commit 7ca047f

File tree

5 files changed

+34
-21
lines changed

5 files changed

+34
-21
lines changed

Mathlib.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2657,6 +2657,8 @@ import Mathlib.Deprecated.Combinator
26572657
import Mathlib.Deprecated.Equiv
26582658
import Mathlib.Deprecated.Group
26592659
import Mathlib.Deprecated.HashMap
2660+
import Mathlib.Deprecated.Logic
2661+
import Mathlib.Deprecated.MinMax
26602662
import Mathlib.Deprecated.NatLemmas
26612663
import Mathlib.Deprecated.RelClasses
26622664
import Mathlib.Deprecated.Ring
@@ -2927,7 +2929,6 @@ import Mathlib.GroupTheory.Torsion
29272929
import Mathlib.GroupTheory.Transfer
29282930
import Mathlib.InformationTheory.Hamming
29292931
import Mathlib.Init
2930-
import Mathlib.Init.Logic
29312932
import Mathlib.Lean.CoreM
29322933
import Mathlib.Lean.Elab.Tactic.Basic
29332934
import Mathlib.Lean.Elab.Term

Mathlib/Init/Logic.lean renamed to Mathlib/Deprecated/Logic.lean

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ Authors: Leonardo de Moura, Jeremy Avigad, Floris van Doorn
66
import Batteries.Tactic.Alias
77

88
/-!
9-
# Note about `Mathlib/Init/`
10-
The files in `Mathlib/Init` are leftovers from the port from Mathlib3.
11-
(They contain content moved from lean3 itself that Mathlib needed but was not moved to lean4.)
9+
# Note about deprecated files
1210
13-
We intend to move all the content of these files out into the main `Mathlib` directory structure.
14-
Contributions assisting with this are appreciated.
11+
This file is deprecated, and is no longer imported by anything in mathlib other than other
12+
deprecated files, and test files. You should not need to import it.
1513
-/
1614

1715
set_option linter.deprecated false

Mathlib/Deprecated/MinMax.lean

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/-
2+
Copyright (c) 2017 Mario Carneiro. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Mario Carneiro
5+
-/
6+
import Mathlib.Deprecated.Logic
7+
import Mathlib.Order.MinMax
8+
/-!
9+
# Note about deprecated files
10+
11+
This file is deprecated, and is no longer imported by anything in mathlib other than other
12+
deprecated files, and test files. You should not need to import it.
13+
-/
14+
15+
universe u
16+
17+
variable {α : Type u} [LinearOrder α]
18+
19+
set_option linter.deprecated false
20+
21+
@[deprecated instCommutativeMax (since := "2024-09-12")]
22+
theorem max_commutative : Commutative (α := α) max := max_comm
23+
@[deprecated instAssociativeMax (since := "2024-09-12")]
24+
theorem max_associative : Associative (α := α) max := max_assoc
25+
@[deprecated instCommutativeMin (since := "2024-09-12")]
26+
theorem min_commutative : Commutative (α := α) min := min_comm
27+
@[deprecated instAssociativeMin (since := "2024-09-12")]
28+
theorem min_associative : Associative (α := α) min := min_assoc

Mathlib/Order/MinMax.lean

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Copyright (c) 2017 Mario Carneiro. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Mario Carneiro
55
-/
6-
import Mathlib.Init.Logic
76
import Mathlib.Logic.OpClass
87
import Mathlib.Order.Lattice
98

@@ -244,18 +243,4 @@ instance instAssociativeMin : Std.Associative (α := α) min where assoc := min_
244243
theorem max_left_commutative : LeftCommutative (max : α → α → α) := ⟨max_left_comm⟩
245244
theorem min_left_commutative : LeftCommutative (min : α → α → α) := ⟨min_left_comm⟩
246245

247-
section deprecated
248-
set_option linter.deprecated false
249-
250-
@[deprecated instCommutativeMax (since := "2024-09-12")]
251-
theorem max_commutative : Commutative (α := α) max := max_comm
252-
@[deprecated instAssociativeMax (since := "2024-09-12")]
253-
theorem max_associative : Associative (α := α) max := max_assoc
254-
@[deprecated instCommutativeMin (since := "2024-09-12")]
255-
theorem min_commutative : Commutative (α := α) min := min_comm
256-
@[deprecated instAssociativeMin (since := "2024-09-12")]
257-
theorem min_associative : Associative (α := α) min := min_assoc
258-
259-
end deprecated
260-
261246
end

scripts/noshake.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@
351351
"Mathlib.Geometry.Manifold.PoincareConjecture":
352352
["Mathlib.AlgebraicTopology.FundamentalGroupoid.SimplyConnected",
353353
"Mathlib.Util.Superscript"],
354+
"Mathlib.Deprecated.MinMax": ["Mathlib.Order.MinMax"],
354355
"Mathlib.Data.Vector.Basic": ["Mathlib.Control.Applicative"],
355356
"Mathlib.Data.Set.Image": ["Batteries.Tactic.Congr"],
356357
"Mathlib.Data.Seq.Parallel": ["Mathlib.Init.Data.Prod"],

0 commit comments

Comments
 (0)