Skip to content

Commit a240321

Browse files
committed
feat(RingTheory): isomorphism between perfection of R and perfection of R/I (leanprover-community#36161)
We construct the following isomorphism: ```lean def Perfection.quotientMulEquiv (p : ℕ) [Fact (Nat.Prime p)] {R : Type*} [CommRing R] (I : Ideal R) [CharP (R ⧸ I) p] [IsAdicComplete I R] : Perfection R p ≃* Perfection (R ⧸ I) p ``` I also removed simp lemmas which expose the raw definition and instead prioritised lemmas which talk about the intended constructors, i.e. for `x : Perfection R p` we don't want `x.1 n` and instead want `x.coeff R p n`, and when `M` is perfect then maps `M -> Perfection N p` is determined by the zeroth coefficients.
1 parent 237efa9 commit a240321

File tree

4 files changed

+57
-8
lines changed

4 files changed

+57
-8
lines changed

Mathlib/LinearAlgebra/SModEq/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ lemma of_toAddSubgroup_le {U : Submodule R M} {V : Submodule S M}
6060
simp only [SModEq, Submodule.Quotient.eq] at hxy ⊢
6161
exact h hxy
6262

63-
@[refl]
63+
@[refl, simp]
6464
protected theorem refl (x : M) : x ≡ x [SMOD U] :=
6565
@rfl _ _
6666

Mathlib/RingTheory/AdicCompletion/Algebra.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ lemma evalOneₐ_surjective : Function.Surjective (evalOneₐ I) := by
190190
/-- `AdicCauchySequence I R` is an `R`-subalgebra of `ℕ → R`. -/
191191
def AdicCauchySequence.subalgebra : Subalgebra R (ℕ → R) :=
192192
Submodule.toSubalgebra (AdicCauchySequence.submodule I R)
193-
(fun {m n} _ ↦ by simp; rfl)
193+
(fun {m n} _ ↦ by simp)
194194
(fun x y hx hy {m n} hmn ↦ by
195195
simp only [Pi.mul_apply]
196196
exact SModEq.mul (hx hmn) (hy hmn))

Mathlib/RingTheory/Perfection.lean

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,16 @@ theorem coeffMonoidHom_pow_p_pow (f : Perfection M p) (m n : ℕ) :
126126
coeffMonoidHom M p (m + n) (f ^ p ^ n) = coeffMonoidHom M p m f :=
127127
n.recOn (by simp) fun n ih ↦ by rw [pow_succ, pow_mul, Nat.add_succ, coeffMonoidHom_pow_p, ih]
128128

129+
@[simp]
130+
theorem coeffMonoidHom_pow_p_pow' (f : Perfection M p) (m n : ℕ) :
131+
coeffMonoidHom M p (m + n) f ^ p ^ n = coeffMonoidHom M p m f := by
132+
rw [← map_pow, coeffMonoidHom_pow_p_pow]
133+
134+
@[simp]
135+
theorem coeffMonoidHom_pow_p_pow_self (f : Perfection M p) (n : ℕ) :
136+
coeffMonoidHom M p n f ^ p ^ n = coeffMonoidHom M p 0 f := by
137+
rw [← coeffMonoidHom_pow_p_pow' _ 0 n, zero_add]
138+
129139
theorem coeffMonoidHom_powMonoidHom (f : Perfection M p) (n : ℕ) :
130140
coeffMonoidHom M p (n + 1) (powMonoidHom p f) = coeffMonoidHom M p n f :=
131141
coeffMonoidHom_pow_p f n
@@ -141,7 +151,7 @@ theorem coeffMonoidHom_iterate_powMonoidHom' (f : Perfection M p) (n m : ℕ) (h
141151

142152
/-- Given monoids `M` and `N`, with `M` being perfect,
143153
any homomorphism `M →+* N` can be lifted uniquely to a homomorphism `M →* Perfection N p`. -/
144-
@[simps]
154+
@[simps! symm_apply]
145155
noncomputable def liftMonoidHom (p : ℕ) (M : Type*) [CommMonoid M] [PerfectRing M p]
146156
(N : Type*) [CommMonoid N] : (M →* N) ≃* (M →* Perfection N p) where
147157
toFun f :=
@@ -159,8 +169,11 @@ noncomputable def liftMonoidHom (p : ℕ) (M : Type*) [CommMonoid M] [PerfectRin
159169
rw [← coeffMonoidHom_pow_p_pow _ 0 n, ← map_pow, powMulEquiv_symm_pow_p, zero_add]
160170
map_mul' _ _ := by ext; simp
161171

172+
@[simp] lemma coeffMonoidHom_zero_liftMonoidHom
173+
(p : ℕ) {M N : Type*} [CommMonoid M] [PerfectRing M p] [CommMonoid N] (e : M →* N) (x : M) :
174+
coeffMonoidHom N p 0 (liftMonoidHom p M N e x) = e x := by simp [liftMonoidHom]
175+
162176
/-- A monoid homomorphism `M →* N` induces `Perfection M p →* Perfection N p`. -/
163-
@[simps!]
164177
def mapMonoidHom (p : ℕ) {M N : Type*} [CommMonoid M] [CommMonoid N] (φ : M →* N) :
165178
Perfection M p →* Perfection N p where
166179
toFun f := ⟨fun n ↦ φ (f.coeffMonoidHom M p n), fun n ↦ by rw [← map_pow, coeffMonoidHom_pow_p']⟩
@@ -339,13 +352,12 @@ theorem hom_ext {R : Type u₁} [CommSemiring R] [CharP R p] [PerfectRing R p] {
339352
variable {R} {S : Type u₂} [CommSemiring S] [CharP S p]
340353

341354
/-- A ring homomorphism `R →+* S` induces `Perfection R p →+* Perfection S p`. -/
342-
@[simps!]
343355
def map (φ : R →+* S) : Perfection R p →+* Perfection S p where
344356
__ := mapMonoidHom p (φ : R →* S)
345357
map_zero' := Subtype.ext <| funext fun _ => φ.map_zero
346358
map_add' _ _ := Subtype.ext <| funext fun _ => φ.map_add _ _
347359

348-
theorem coeff_map (φ : R →+* S) (f : Perfection R p) (n : ℕ) :
360+
@[simp] theorem coeff_map (φ : R →+* S) (f : Perfection R p) (n : ℕ) :
349361
coeff S p n (map p φ f) = φ (coeff R p n f) := rfl
350362

351363
end CommSemiring
@@ -371,6 +383,14 @@ instance : CommRing (Perfection R p) :=
371383

372384
end CommRing
373385

386+
section CommMonoid_CommRing
387+
388+
@[simp] theorem coeff_mapMonoidHom {p : ℕ} [Fact p.Prime] {M N : Type*} [CommMonoid M] [CommRing N]
389+
[CharP N p] (e : M →* N) (n : ℕ) (x : Perfection M p) :
390+
coeff N p n (mapMonoidHom p e x) = e (coeffMonoidHom M p n x) := rfl
391+
392+
end CommMonoid_CommRing
393+
374394
end Perfection
375395

376396
/-- A perfection map to a ring of characteristic `p` is a map that is isomorphic

Mathlib/RingTheory/Teichmuller.lean

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ limit of `p^n`-th powers of arbitrary lifts in `R` of the `n`-th component from
100100
The simp NF is `teichmuller₀`. -/
101101
noncomputable def teichmuller : Perfection (R ⧸ I) p →* R where
102102
toFun := teichmullerFun
103-
map_one' := teichmullerFun_spec fun _ ↦ ⟨1, by simp; rfl
103+
map_one' := teichmullerFun_spec fun _ ↦ ⟨1, by simp⟩
104104
map_mul' x y := by
105105
refine teichmullerFun_spec fun n ↦ ?_
106106
refine ⟨(coeff _ p n x).out * (coeff _ p n y).out, by simp, ?_⟩
@@ -125,7 +125,7 @@ theorem teichmuller_spec {x : Perfection (R ⧸ I) p} {y : R}
125125

126126
theorem teichmuller_zero : teichmuller p I 0 = 0 :=
127127
have : p ≠ 0 := Nat.Prime.ne_zero Fact.out
128-
teichmuller_spec fun n ↦ ⟨0, by simp [zero_pow (pow_ne_zero n this)]; rfl
128+
teichmuller_spec fun n ↦ ⟨0, by simp [zero_pow (pow_ne_zero n this)]⟩
129129

130130
variable (p I) in
131131
/-- `teichmuller` as a `MonoidWithZeroHom`. This is the simp NF. -/
@@ -158,12 +158,19 @@ theorem teichmuller₀_spec {x : Perfection (R ⧸ I) p} {y : R}
158158
teichmuller₀ p I x = y :=
159159
teichmullerFun_spec h
160160

161+
@[simp] theorem teichmuller₀_mapMonoidHom_idealQuotientMk {x : Perfection R p} :
162+
teichmuller₀ p I (mapMonoidHom p (Ideal.Quotient.mk I) x) = coeffMonoidHom R p 0 x :=
163+
teichmuller₀_spec fun n ↦ ⟨coeffMonoidHom R p n x, by simp⟩
164+
161165
theorem mk_teichmuller (x : Perfection (R ⧸ I) p) :
162166
Ideal.Quotient.mk I (teichmuller p I x) = coeff _ p 0 x := by
163167
have := teichmuller_sModEq <| Ideal.Quotient.mk_out <| coeff _ p 0 x
164168
simp_rw [zero_add, pow_one] at this
165169
simpa [SModEq.idealQuotientMk] using this
166170

171+
@[simp] theorem mk_teichmuller₀ (x : Perfection (R ⧸ I) p) :
172+
Ideal.Quotient.mk I (teichmuller₀ p I x) = coeff _ p 0 x := mk_teichmuller _
173+
167174
variable (p I) in
168175
theorem mk_comp_teichmuller :
169176
(Ideal.Quotient.mk I : _ →* _).comp (teichmuller p I) =
@@ -181,4 +188,26 @@ theorem mk_comp_teichmuller' :
181188
Ideal.Quotient.mk I ∘ (teichmuller p I) = coeff (R ⧸ I) p 0 :=
182189
funext mk_teichmuller
183190

191+
set_option backward.isDefEq.respectTransparency false in
192+
/-- If `R` is `I`-adically complete and `R ⧸ I` has characteristic `p`, then
193+
`Perfection R p` and `Perfection (R ⧸ I) p` are isomorphic as monoids.
194+
195+
Note that `Perfection R p` is generally not a ring, and the forward map is induced by
196+
the quotient map, and the backwards map is constructed using the Teichmüller map. -/
197+
noncomputable def quotientMulEquiv (p : ℕ) [Fact p.Prime]
198+
{R : Type*} [CommRing R] (I : Ideal R) [CharP (R ⧸ I) p] [IsAdicComplete I R] :
199+
Perfection R p ≃* Perfection (R ⧸ I) p := MonoidHom.toMulEquiv
200+
(mapMonoidHom _ <| Ideal.Quotient.mk I)
201+
(liftMonoidHom p _ _ <| teichmuller p I)
202+
((liftMonoidHom p _ _).symm.injective <| by ext; simp)
203+
((liftMonoidHom p _ _).symm.injective <| by ext; simp)
204+
205+
@[simp] theorem coeff_quotientMulEquiv (x : Perfection R p) (n : ℕ) :
206+
coeff (R ⧸ I) p n (quotientMulEquiv p I x) = Ideal.Quotient.mk I (coeffMonoidHom R p n x) := rfl
207+
208+
set_option backward.isDefEq.respectTransparency false in
209+
@[simp] theorem coeff_zero_symm_quotientMulEquiv (x : Perfection (R ⧸ I) p) :
210+
coeffMonoidHom R p 0 (quotientMulEquiv p I |>.symm x) = teichmuller₀ p I x := by
211+
simp [quotientMulEquiv]
212+
184213
end Perfection

0 commit comments

Comments
 (0)