Skip to content

Commit 18100d9

Browse files
committed
feat(RingTheory): generalise perfection to monoids (#31007)
1. We generalise `PerfectRing` to monoids (without changing the name). 2. We move `Submonoid.perfection` and `Ring.Perfection` to the already existing `Perfection` namespace, which solves the problem that `Ring.Perfection` and its lemmas `Perfection.xxx` are in different namespaces. Also, the monoid perfection and ring perfection have the same underlying set, so this unify the two approaches. 3. `Perfection.lift` is now generalised to monoids: `liftMonoidHom : (M →* N) ≃ (M →* Perfection N p)` where `M` is a perfect monoid.
1 parent 3426e8e commit 18100d9

File tree

3 files changed

+294
-124
lines changed

3 files changed

+294
-124
lines changed

Mathlib/FieldTheory/Perfect.lean

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,51 @@ open Function Polynomial
4343
4444
NB: This is not related to the concept with the same name introduced by Bass (related to projective
4545
covers of modules). -/
46-
class PerfectRing (R : Type*) (p : ℕ) [CommSemiring R] [ExpChar R p] : Prop where
46+
class PerfectRing (R : Type*) (p : ℕ) [Pow R ℕ] : Prop where
4747
/-- A ring is perfect if the Frobenius map is bijective. -/
48-
bijective_frobenius : Bijective <| frobenius R p
48+
bijective_frobenius : Bijective fun x : R ↦ x ^ p
4949

5050
section PerfectRing
5151

52+
section Monoid
53+
variable (M : Type*) (p q : ℕ) [CommMonoid M] [PerfectRing M p] [PerfectRing M q]
54+
55+
instance one : PerfectRing M 1 :=
56+
by simpa using bijective_id⟩
57+
58+
instance mul : PerfectRing M (p * q) :=
59+
by simp_rw [pow_mul]; exact PerfectRing.bijective_frobenius.comp PerfectRing.bijective_frobenius⟩
60+
61+
instance pow (n : ℕ) : PerfectRing M (p ^ n) :=
62+
n.recOn (inferInstanceAs (PerfectRing M 1)) fun n _ ↦ inferInstanceAs (PerfectRing M (p ^ n * p))
63+
64+
/-- The `p`-th power automorphism for a perfect monoid. -/
65+
@[simps! apply]
66+
noncomputable def powMulEquiv : M ≃* M :=
67+
.ofBijective (powMonoidHom p) PerfectRing.bijective_frobenius
68+
69+
@[simp]
70+
theorem powMulEquiv_symm_pow_p (x : M) : ((powMulEquiv M p).symm x) ^ p = x :=
71+
(powMulEquiv M p).apply_symm_apply x
72+
73+
@[simp] theorem powMulEquiv_one : powMulEquiv M 1 = .refl M :=
74+
MulEquiv.ext pow_one
75+
76+
theorem powMulEquiv_mul : powMulEquiv M (p * q) = (powMulEquiv M p).trans (powMulEquiv M q) :=
77+
MulEquiv.ext fun x ↦ pow_mul x p q
78+
79+
theorem powMulEquiv_mul' : powMulEquiv M (p * q) = (powMulEquiv M q).trans (powMulEquiv M p) :=
80+
MulEquiv.ext fun x ↦ pow_mul' x p q
81+
82+
theorem powMulEquiv_pow (n : ℕ) : powMulEquiv M (p ^ n) = powMulEquiv M p ^ n :=
83+
n.recOn (powMulEquiv_one M) fun n ih ↦ by
84+
rw [pow_succ (powMulEquiv M p), ← ih, MulAut.mul_def, ← powMulEquiv_mul]
85+
congr
86+
rw [pow_succ']
87+
88+
end Monoid
89+
90+
section CommSemiring
5291
variable (R : Type*) (p m n : ℕ) [CommSemiring R] [ExpChar R p]
5392

5493
/-- For a reduced ring, surjectivity of the Frobenius map is a sufficient condition for perfection.
@@ -67,7 +106,7 @@ variable [PerfectRing R p]
67106
theorem bijective_frobenius : Bijective (frobenius R p) := PerfectRing.bijective_frobenius
68107

69108
theorem bijective_iterateFrobenius : Bijective (iterateFrobenius R p n) :=
70-
coe_iterateFrobenius R p n ▸ (bijective_frobenius R p).iterate n
109+
PerfectRing.bijective_frobenius
71110

72111
@[simp]
73112
theorem injective_frobenius : Injective (frobenius R p) := (bijective_frobenius R p).1
@@ -80,6 +119,9 @@ theorem surjective_frobenius : Surjective (frobenius R p) := (bijective_frobeniu
80119
noncomputable def frobeniusEquiv : R ≃+* R :=
81120
RingEquiv.ofBijective (frobenius R p) PerfectRing.bijective_frobenius
82121

122+
@[simp] theorem powMulEquiv_eq_toMulEquiv_frobeniusEquiv :
123+
powMulEquiv R p = (frobeniusEquiv R p).toMulEquiv := rfl
124+
83125
@[simp]
84126
theorem coe_frobeniusEquiv : ⇑(frobeniusEquiv R p) = frobenius R p := rfl
85127

@@ -235,6 +277,8 @@ instance instPerfectRingProd (S : Type*) [CommSemiring S] [ExpChar S p] [Perfect
235277
PerfectRing (R × S) p where
236278
bijective_frobenius := (bijective_frobenius R p).prodMap (bijective_frobenius S p)
237279

280+
end CommSemiring
281+
238282
end PerfectRing
239283

240284
/-- A perfect field.

Mathlib/FieldTheory/PerfectClosure.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ instance instReduced : IsReduced (PerfectClosure K p) where
406406

407407
instance instPerfectRing : PerfectRing (PerfectClosure K p) p where
408408
bijective_frobenius := by
409+
simp_rw [← frobenius_def]
409410
let f : PerfectClosure K p → PerfectClosure K p := fun e ↦
410411
liftOn e (fun x => mk K p (x.1 + 1, x.2)) fun x y H =>
411412
match x, y, H with

0 commit comments

Comments
 (0)