Skip to content

Commit 59150e2

Browse files
committed
chore: Delete Algebra.GroupPower.Ring (#12957)
Move the few remaining lemmas to earlier files.
1 parent 4d5bca9 commit 59150e2

File tree

16 files changed

+45
-63
lines changed

16 files changed

+45
-63
lines changed

Mathlib.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ import Mathlib.Algebra.Group.WithOne.Basic
252252
import Mathlib.Algebra.Group.WithOne.Defs
253253
import Mathlib.Algebra.GroupPower.IterateHom
254254
import Mathlib.Algebra.GroupPower.Order
255-
import Mathlib.Algebra.GroupPower.Ring
256255
import Mathlib.Algebra.GroupWithZero.Basic
257256
import Mathlib.Algebra.GroupWithZero.Commute
258257
import Mathlib.Algebra.GroupWithZero.Conj

Mathlib/Algebra/GroupPower/Ring.lean

Lines changed: 0 additions & 53 deletions
This file was deleted.

Mathlib/Algebra/GroupWithZero/Divisibility.lean

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ end MonoidWithZero
140140

141141
section CancelCommMonoidWithZero
142142

143-
variable [CancelCommMonoidWithZero α] [Subsingleton αˣ] {a b : α}
143+
variable [CancelCommMonoidWithZero α] [Subsingleton αˣ] {a b : α} {m n : ℕ}
144144

145145
theorem dvd_antisymm : a ∣ b → b ∣ a → a = b := by
146146
rintro ⟨c, rfl⟩ ⟨d, hcd⟩
@@ -169,4 +169,18 @@ theorem eq_of_forall_dvd' (h : ∀ c, c ∣ a ↔ c ∣ b) : a = b :=
169169
((h _).1 dvd_rfl).antisymm <| (h _).2 dvd_rfl
170170
#align eq_of_forall_dvd' eq_of_forall_dvd'
171171

172+
lemma pow_dvd_pow_iff (ha₀ : a ≠ 0) (ha : ¬IsUnit a) : a ^ n ∣ a ^ m ↔ n ≤ m := by
173+
constructor
174+
· intro h
175+
rw [← not_lt]
176+
intro hmn
177+
apply ha
178+
have : a ^ m * a ∣ a ^ m * 1 := by
179+
rw [← pow_succ, mul_one]
180+
exact (pow_dvd_pow _ (Nat.succ_le_of_lt hmn)).trans h
181+
rwa [mul_dvd_mul_iff_left, ← isUnit_iff_dvd_one] at this
182+
apply pow_ne_zero m ha₀
183+
· apply pow_dvd_pow
184+
#align pow_dvd_pow_iff pow_dvd_pow_iff
185+
172186
end CancelCommMonoidWithZero

Mathlib/Algebra/GroupWithZero/Hom.lean

Lines changed: 19 additions & 3 deletions
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 Wieser
55
-/
66
import Mathlib.Algebra.Group.Equiv.Basic
7-
import Mathlib.Algebra.GroupWithZero.Defs
7+
import Mathlib.Algebra.GroupWithZero.Basic
88
import Mathlib.Algebra.NeZero
99

1010
#align_import algebra.hom.group from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64"
@@ -39,7 +39,7 @@ assert_not_exists DenselyOrdered
3939
open Function
4040

4141
namespace NeZero
42-
variable {F α β : Type*} [Zero α] [Zero β] [FunLike F α β] [ZeroHomClass F α β] {a : α}
42+
variable {F α β : Type*} [Zero α] [Zero β] [FunLike F α β] [ZeroHomClass F α β] {a : α}
4343

4444
lemma of_map (f : F) [neZero : NeZero (f a)] : NeZero a :=
4545
fun h ↦ ne (f a) <| by rw [h]; exact ZeroHomClass.map_zero f⟩
@@ -51,7 +51,7 @@ lemma of_injective {f : F} (hf : Injective f) [NeZero a] : NeZero (f a) :=
5151

5252
end NeZero
5353

54-
variable {F α β γ δ : Type*} [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ]
54+
variable {F α β γ δ M₀ : Type*} [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ]
5555
[MulZeroOneClass δ]
5656

5757
/-- `MonoidWithZeroHomClass F α β` states that `F` is a type of
@@ -260,6 +260,22 @@ instance {β} [CommMonoidWithZero β] : Mul (α →*₀ β) where
260260

261261
end MonoidWithZeroHom
262262

263+
section CommMonoidWithZero
264+
variable [CommMonoidWithZero M₀] {n : ℕ} (hn : n ≠ 0)
265+
266+
/-- We define `x ↦ x^n` (for positive `n : ℕ`) as a `MonoidWithZeroHom` -/
267+
def powMonoidWithZeroHom : M₀ →*₀ M₀ :=
268+
{ powMonoidHom n with map_zero' := zero_pow hn }
269+
#align pow_monoid_with_zero_hom powMonoidWithZeroHom
270+
271+
@[simp] lemma coe_powMonoidWithZeroHom : (powMonoidWithZeroHom hn : M₀ → M₀) = fun x ↦ x ^ n := rfl
272+
#align coe_pow_monoid_with_zero_hom coe_powMonoidWithZeroHom
273+
274+
@[simp] lemma powMonoidWithZeroHom_apply (a : M₀) : powMonoidWithZeroHom hn a = a ^ n := rfl
275+
#align pow_monoid_with_zero_hom_apply powMonoidWithZeroHom_apply
276+
277+
end CommMonoidWithZero
278+
263279
/-! ### Equivalences -/
264280

265281
namespace MulEquivClass

Mathlib/Algebra/MvPolynomial/Basic.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: Johannes Hölzl, Johan Commelin, Mario Carneiro
55
-/
66
import Mathlib.Algebra.Algebra.Tower
7+
import Mathlib.Algebra.GroupWithZero.Divisibility
78
import Mathlib.Algebra.Regular.Pow
89
import Mathlib.Algebra.MonoidAlgebra.Support
910
import Mathlib.Data.Finsupp.Antidiagonal

Mathlib/Algebra/Order/Field/Defs.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: Robert Lewis, Leonardo de Moura, Mario Carneiro, Floris van Doorn
55
-/
66
import Mathlib.Algebra.Field.Defs
7-
import Mathlib.Algebra.GroupWithZero.Units.Basic
7+
import Mathlib.Algebra.GroupWithZero.Basic
88
import Mathlib.Algebra.Order.Ring.Defs
99

1010
#align_import algebra.order.field.defs from "leanprover-community/mathlib"@"655994e298904d7e5bbd1e18c95defd7b543eb94"

Mathlib/Algebra/Polynomial/Basic.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker
55
-/
6+
import Mathlib.Algebra.GroupWithZero.Divisibility
67
import Mathlib.Algebra.MonoidAlgebra.Basic
78
import Mathlib.Data.Finset.Sort
89

Mathlib/Algebra/Ring/Divisibility/Lemmas.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright (c) 2023 Oliver Nash. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Oliver Nash
55
-/
6+
import Mathlib.Algebra.GroupWithZero.Divisibility
67
import Mathlib.Algebra.Ring.Divisibility.Basic
78
import Mathlib.Data.Nat.Choose.Sum
89
import Mathlib.GroupTheory.GroupAction.Ring

Mathlib/Data/Complex/Basic.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: Kevin Buzzard, Mario Carneiro
55
-/
66
import Mathlib.Algebra.CharZero.Lemmas
7+
import Mathlib.Algebra.GroupWithZero.Divisibility
78
import Mathlib.Data.Real.Basic
89
import Mathlib.Data.Set.Image
910

Mathlib/Data/ENNReal/Operations.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: Johannes Hölzl, Yury Kudryashov
55
-/
66
import Mathlib.Algebra.BigOperators.WithTop
7+
import Mathlib.Algebra.GroupWithZero.Divisibility
78
import Mathlib.Data.ENNReal.Basic
89

910
#align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"

0 commit comments

Comments
 (0)