Skip to content

Commit 806f257

Browse files
committed
chore: move Algebra/Group/ZeroOne/ to Data/ (#20622)
Minor cleanup on the path to reducing dependencies from Data/ on other top-level directories.
1 parent 0c82aa8 commit 806f257

File tree

16 files changed

+72
-54
lines changed

16 files changed

+72
-54
lines changed

Mathlib.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ import Mathlib.Algebra.Group.Units.Hom
373373
import Mathlib.Algebra.Group.Units.Opposite
374374
import Mathlib.Algebra.Group.WithOne.Basic
375375
import Mathlib.Algebra.Group.WithOne.Defs
376-
import Mathlib.Algebra.Group.ZeroOne
377376
import Mathlib.Algebra.GroupPower.IterateHom
378377
import Mathlib.Algebra.GroupWithZero.Action.Basic
379378
import Mathlib.Algebra.GroupWithZero.Action.Defs
@@ -979,6 +978,7 @@ import Mathlib.Algebra.Tropical.BigOperators
979978
import Mathlib.Algebra.Tropical.Lattice
980979
import Mathlib.Algebra.Vertex.HVertexOperator
981980
import Mathlib.Algebra.Vertex.VertexOperator
981+
import Mathlib.Algebra.ZeroOne.Lemmas
982982
import Mathlib.AlgebraicGeometry.AffineScheme
983983
import Mathlib.AlgebraicGeometry.AffineSpace
984984
import Mathlib.AlgebraicGeometry.Cover.MorphismProperty
@@ -2846,6 +2846,7 @@ import Mathlib.Data.Num.Basic
28462846
import Mathlib.Data.Num.Bitwise
28472847
import Mathlib.Data.Num.Lemmas
28482848
import Mathlib.Data.Num.Prime
2849+
import Mathlib.Data.One.Defs
28492850
import Mathlib.Data.Opposite
28502851
import Mathlib.Data.Option.Basic
28512852
import Mathlib.Data.Option.Defs

Mathlib/Algebra/Expr.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2022 Eric Wieser. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Eric Wieser
55
-/
6-
import Mathlib.Algebra.Group.ZeroOne
6+
import Mathlib.Data.One.Defs
77
import Qq
88

99
/-! # Helpers to invoke functions involving algebra at tactic time

Mathlib/Algebra/Group/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Authors: Jeremy Avigad, Leonardo de Moura, Simon Hudon, Mario Carneiro
55
-/
66
import Mathlib.Data.Int.Notation
77
import Mathlib.Data.Nat.BinaryRec
8-
import Mathlib.Algebra.Group.ZeroOne
8+
import Mathlib.Data.One.Defs
99
import Mathlib.Algebra.Group.Operations
1010
import Mathlib.Logic.Function.Defs
1111
import Mathlib.Tactic.Simps.Basic

Mathlib/Algebra/NeZero.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Eric Rodriguez
55
-/
66
import Mathlib.Logic.Basic
7-
import Mathlib.Algebra.Group.ZeroOne
7+
import Mathlib.Data.One.Defs
88
import Mathlib.Order.Defs.PartialOrder
99

1010
/-!

Mathlib/Algebra/Order/Pi.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright (c) 2018 Simon Hudon. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Simon Hudon, Patrick Massot
55
-/
6+
import Mathlib.Algebra.ZeroOne.Lemmas
67
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
78
import Mathlib.Algebra.Order.Ring.Defs
89
import Mathlib.Algebra.Ring.Pi

Mathlib/Algebra/Order/ZeroLEOne.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl
55
-/
66
import Mathlib.Order.Basic
7+
import Mathlib.Data.One.Defs
78

89
/-!
910
# Typeclass expressing `0 ≤ 1`.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/-
2+
Copyright (c) 2023 Yael Dillies. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Yael Dillies
5+
-/
6+
import Batteries.Tactic.Init
7+
import Mathlib.Data.One.Defs
8+
import Mathlib.Tactic.ToAdditive
9+
import Mathlib.Tactic.Lemma
10+
11+
/-! # Lemmas about inequalities with `1`. -/
12+
13+
variable {α : Type _}
14+
15+
section dite
16+
variable [One α] {p : Prop} [Decidable p] {a : p → α} {b : ¬ p → α}
17+
18+
@[to_additive dite_nonneg]
19+
lemma one_le_dite [LE α] (ha : ∀ h, 1 ≤ a h) (hb : ∀ h, 1 ≤ b h) : 1 ≤ dite p a b := by
20+
split; exacts [ha ‹_›, hb ‹_›]
21+
22+
@[to_additive]
23+
lemma dite_le_one [LE α] (ha : ∀ h, a h ≤ 1) (hb : ∀ h, b h ≤ 1) : dite p a b ≤ 1 := by
24+
split; exacts [ha ‹_›, hb ‹_›]
25+
26+
@[to_additive dite_pos]
27+
lemma one_lt_dite [LT α] (ha : ∀ h, 1 < a h) (hb : ∀ h, 1 < b h) : 1 < dite p a b := by
28+
split; exacts [ha ‹_›, hb ‹_›]
29+
30+
@[to_additive]
31+
lemma dite_lt_one [LT α] (ha : ∀ h, a h < 1) (hb : ∀ h, b h < 1) : dite p a b < 1 := by
32+
split; exacts [ha ‹_›, hb ‹_›]
33+
34+
end dite
35+
36+
section
37+
variable [One α] {p : Prop} [Decidable p] {a b : α}
38+
39+
@[to_additive ite_nonneg]
40+
lemma one_le_ite [LE α] (ha : 1 ≤ a) (hb : 1 ≤ b) : 1 ≤ ite p a b := by split <;> assumption
41+
42+
@[to_additive]
43+
lemma ite_le_one [LE α] (ha : a ≤ 1) (hb : b ≤ 1) : ite p a b ≤ 1 := by split <;> assumption
44+
45+
@[to_additive ite_pos]
46+
lemma one_lt_ite [LT α] (ha : 1 < a) (hb : 1 < b) : 1 < ite p a b := by split <;> assumption
47+
48+
@[to_additive]
49+
lemma ite_lt_one [LT α] (ha : a < 1) (hb : b < 1) : ite p a b < 1 := by split <;> assumption
50+
51+
end

Mathlib/Data/Num/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Leonardo de Moura, Mario Carneiro
55
-/
66
import Lean.Linter.Deprecated
7-
import Mathlib.Algebra.Group.ZeroOne
7+
import Mathlib.Data.One.Defs
88
import Mathlib.Data.Int.Notation
99
import Mathlib.Data.Nat.BinaryRec
1010
import Mathlib.Tactic.TypeStar
File renamed without changes.

Mathlib/Data/PNat/Defs.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Authors: Mario Carneiro, Neil Strickland
55
-/
66
import Mathlib.Data.Nat.Defs
77
import Mathlib.Data.PNat.Notation
8+
import Mathlib.Data.One.Defs
89
import Mathlib.Order.Basic
910
import Mathlib.Tactic.Coe
1011
import Mathlib.Tactic.Lift

0 commit comments

Comments
 (0)