@@ -36,27 +36,19 @@ def monoid.perfection (M : Type u₁) [comm_monoid M] (p : ℕ) : submonoid (ℕ
36
36
one_mem' := λ n, one_pow _,
37
37
mul_mem' := λ f g hf hg n, (mul_pow _ _ _).trans $ congr_arg2 _ (hf n) (hg n) }
38
38
39
- /-- The perfection of a semiring `R` with characteristic `p`,
39
+ /-- The perfection of a ring `R` with characteristic `p`,
40
40
defined to be the projective limit of `R` using the Frobenius maps `R → R`
41
41
indexed by the natural numbers, implemented as `{ f : ℕ → R | ∀ n, f (n + 1) ^ p = f n }`. -/
42
- def semiring .perfection (R : Type u₁) [comm_semiring R]
42
+ def ring .perfection (R : Type u₁) [comm_semiring R]
43
43
(p : ℕ) [hp : fact p.prime] [char_p R p] :
44
44
subsemiring (ℕ → R) :=
45
45
{ zero_mem' := λ n, zero_pow $ hp.pos,
46
46
add_mem' := λ f g hf hg n, (frobenius_add R p _ _).trans $ congr_arg2 _ (hf n) (hg n),
47
47
.. monoid.perfection R p }
48
48
49
- /-- The perfection of a ring `R` with characteristic `p`,
50
- defined to be the projective limit of `R` using the Frobenius maps `R → R`
51
- indexed by the natural numbers, implemented as `{ f : ℕ → R | ∀ n, f (n + 1) ^ p = f n }`. -/
52
- def ring.perfection (R : Type u₁) [comm_ring R] (p : ℕ) [hp : fact p.prime] [char_p R p] :
53
- subring (ℕ → R) :=
54
- { neg_mem' := λ f hf n, (frobenius_neg R p _).trans $ congr_arg _ (hf n),
55
- .. semiring.perfection R p }
56
-
57
- namespace ring.perfection
49
+ namespace perfection
58
50
59
- variables (R : Type u₁) [comm_ring R] (p : ℕ) [hp : fact p.prime] [char_p R p]
51
+ variables (R : Type u₁) [comm_semiring R] (p : ℕ) [hp : fact p.prime] [char_p R p]
60
52
include hp
61
53
62
54
/-- The `n`-th coefficient of an element of the perfection. -/
@@ -84,6 +76,8 @@ def pth_root : ring.perfection R p →+* ring.perfection R p :=
84
76
85
77
variables {R p}
86
78
79
+ @[simp] lemma coeff_mk (f : ℕ → R) (hf) (n : ℕ) : coeff R p n ⟨f, hf⟩ = f n := rfl
80
+
87
81
lemma coeff_pth_root (f : ring.perfection R p) (n : ℕ) :
88
82
coeff R p n (pth_root R p f) = coeff R p (n + 1 ) f :=
89
83
rfl
@@ -96,6 +90,14 @@ lemma coeff_frobenius (f : ring.perfection R p) (n : ℕ) :
96
90
coeff R p (n + 1 ) (frobenius _ p f) = coeff R p n f :=
97
91
by convert coeff_pow_p f n
98
92
93
+ lemma coeff_iterate_frobenius (f : ring.perfection R p) (n m : ℕ) :
94
+ coeff R p (n + m) (frobenius _ p ^[m] f) = coeff R p n f :=
95
+ nat.rec_on m rfl $ λ m ih, by erw [function.iterate_succ_apply', coeff_frobenius, ih]
96
+
97
+ lemma coeff_iterate_frobenius' (f : ring.perfection R p) (n m : ℕ) (hmn : m ≤ n) :
98
+ coeff R p n (frobenius _ p ^[m] f) = coeff R p (n - m) f :=
99
+ eq.symm $ (coeff_iterate_frobenius _ _ m).symm.trans $ (nat.sub_add_cancel hmn).symm ▸ rfl
100
+
99
101
lemma pth_root_frobenius : (pth_root R p).comp (frobenius _ p) = ring_hom.id _ :=
100
102
ring_hom.ext $ λ x, ext $ λ n,
101
103
by rw [ring_hom.comp_apply, ring_hom.id_apply, coeff_pth_root, coeff_frobenius]
@@ -113,7 +115,106 @@ lemma coeff_ne_zero_of_le {f : ring.perfection R p} {m n : ℕ} (hfm : coeff R p
113
115
(hmn : m ≤ n) : coeff R p n f ≠ 0 :=
114
116
let ⟨k, hk⟩ := nat.exists_eq_add_of_le hmn in hk.symm ▸ coeff_add_ne_zero hfm k
115
117
116
- end ring.perfection
118
+ variables (R p)
119
+
120
+ instance perfect_ring : perfect_ring (ring.perfection R p) p :=
121
+ { pth_root' := pth_root R p,
122
+ frobenius_pth_root' := congr_fun $ congr_arg ring_hom.to_fun $ @frobenius_pth_root R _ p _ _,
123
+ pth_root_frobenius' := congr_fun $ congr_arg ring_hom.to_fun $ @pth_root_frobenius R _ p _ _ }
124
+
125
+ instance ring (R : Type u₁) [comm_ring R] [char_p R p] : ring (ring.perfection R p) :=
126
+ ((ring.perfection R p).to_subring $ λ n, by simp_rw [← frobenius_def, pi.neg_apply,
127
+ pi.one_apply, ring_hom.map_neg, ring_hom.map_one]).to_ring
128
+
129
+ instance comm_ring (R : Type u₁) [comm_ring R] [char_p R p] : comm_ring (ring.perfection R p) :=
130
+ ((ring.perfection R p).to_subring $ λ n, by simp_rw [← frobenius_def, pi.neg_apply,
131
+ pi.one_apply, ring_hom.map_neg, ring_hom.map_one]).to_comm_ring
132
+
133
+ /-- Given rings `R` and `S` of characteristic `p`, with `R` being perfect,
134
+ any homomorphism `R →+* S` can be lifted to a homomorphism `R →+* perfection S p`. -/
135
+ @[simps] def lift (R : Type u₁) [comm_semiring R] [char_p R p] [perfect_ring R p]
136
+ (S : Type u₂) [comm_semiring S] [char_p S p] :
137
+ (R →+* S) ≃ (R →+* ring.perfection S p) :=
138
+ { to_fun := λ f,
139
+ { to_fun := λ r, ⟨λ n, f $ _root_.pth_root R p ^[n] r,
140
+ λ n, by rw [← f.map_pow, function.iterate_succ_apply', pth_root_pow_p]⟩,
141
+ map_one' := ext $ λ n, (congr_arg f $ ring_hom.iterate_map_one _ _).trans f.map_one,
142
+ map_mul' := λ x y, ext $ λ n, (congr_arg f $ ring_hom.iterate_map_mul _ _ _ _).trans $
143
+ f.map_mul _ _,
144
+ map_zero' := ext $ λ n, (congr_arg f $ ring_hom.iterate_map_zero _ _).trans f.map_zero,
145
+ map_add' := λ x y, ext $ λ n, (congr_arg f $ ring_hom.iterate_map_add _ _ _ _).trans $
146
+ f.map_add _ _ },
147
+ inv_fun := ring_hom.comp $ coeff S p 0 ,
148
+ left_inv := λ f, ring_hom.ext $ λ r, rfl,
149
+ right_inv := λ f, ring_hom.ext $ λ r, ext $ λ n,
150
+ show coeff S p 0 (f (_root_.pth_root R p ^[n] r)) = coeff S p n (f r),
151
+ by rw [← coeff_iterate_frobenius _ 0 n, zero_add, ← ring_hom.map_iterate_frobenius,
152
+ right_inverse_pth_root_frobenius.iterate] }
153
+
154
+ end perfection
155
+
156
+ /-- A perfection map to a ring of characteristic `p` is a map that is isomorphic
157
+ to its perfection. -/
158
+ @[nolint has_inhabited_instance] structure perfection_map (p : ℕ) [fact p.prime]
159
+ {R : Type u₁} [comm_semiring R] [char_p R p]
160
+ {P : Type u₂} [comm_semiring P] [char_p P p] [perfect_ring P p] (π : P →+* R) : Prop :=
161
+ (injective : ∀ ⦃x y : P⦄, (∀ n, π (pth_root P p ^[n] x) = π (pth_root P p ^[n] y)) → x = y)
162
+ (surjective : ∀ f : ℕ → R, (∀ n, f (n + 1 ) ^ p = f n) →
163
+ ∃ x : P, ∀ n, π (pth_root P p ^[n] x) = f n)
164
+
165
+ namespace perfection_map
166
+
167
+ variables {p : ℕ} [fact p.prime]
168
+ variables {R : Type u₁} [comm_semiring R] [char_p R p]
169
+ variables {P : Type u₂} [comm_semiring P] [char_p P p] [perfect_ring P p]
170
+
171
+ /-- Create a `perfection_map` from an isomorphism to the perfection. -/
172
+ @[simps] lemma mk' {f : P →+* R} (g : P ≃+* ring.perfection R p)
173
+ (hfg : perfection.lift p P R f = g) :
174
+ perfection_map p f :=
175
+ { injective := λ x y hxy, g.injective $ (ring_hom.ext_iff.1 hfg x).symm.trans $
176
+ eq.symm $ (ring_hom.ext_iff.1 hfg y).symm.trans $ perfection.ext $ λ n, (hxy n).symm,
177
+ surjective := λ y hy, let ⟨x, hx⟩ := g.surjective ⟨y, hy⟩ in
178
+ ⟨x, λ n, show perfection.coeff R p n (perfection.lift p P R f x) =
179
+ perfection.coeff R p n ⟨y, hy⟩,
180
+ by rw [hfg, ← coe_fn_coe_base, hx]⟩ }
181
+
182
+ variables (p R P)
183
+
184
+ /-- The canonical perfection map from the perfection of a ring. -/
185
+ lemma of : perfection_map p (perfection.coeff R p 0 ) :=
186
+ mk' (ring_equiv.refl _) $ (equiv.apply_eq_iff_eq_symm_apply _).2 rfl
187
+
188
+ /-- For a perfect ring, it itself is the perfection. -/
189
+ lemma id [perfect_ring R p] : perfection_map p (ring_hom.id R) :=
190
+ { injective := λ x y hxy, hxy 0 ,
191
+ surjective := λ f hf, ⟨f 0 , λ n, show pth_root R p ^[n] (f 0 ) = f n,
192
+ from nat.rec_on n rfl $ λ n ih, injective_pow_p p $
193
+ by rw [function.iterate_succ_apply', pth_root_pow_p _, ih, hf]⟩ }
194
+
195
+ variables {p R P}
196
+ /-- A perfection map induces an isomorphism to the prefection. -/
197
+ noncomputable def equiv {π : P →+* R} (m : perfection_map p π) : P ≃+* ring.perfection R p :=
198
+ ring_equiv.of_bijective (perfection.lift p P R π)
199
+ ⟨λ x y hxy, m.injective $ λ n, (congr_arg (perfection.coeff R p n) hxy : _),
200
+ λ f, let ⟨x, hx⟩ := m.surjective f.1 f.2 in ⟨x, perfection.ext $ hx⟩⟩
201
+
202
+ variables (p R P)
203
+ /-- Given rings `R` and `S` of characteristic `p`, with `R` being perfect,
204
+ any homomorphism `R →+* S` can be lifted to a homomorphism `R →+* P`,
205
+ where `P` is any perfection of `S`. -/
206
+ @[simps] noncomputable def lift [perfect_ring R p] (S : Type u₂) [comm_semiring S] [char_p S p]
207
+ (P : Type u₃) [comm_semiring P] [char_p P p] [perfect_ring P p]
208
+ (π : P →+* S) (m : perfection_map p π) :
209
+ (R →+* S) ≃ (R →+* P) :=
210
+ { to_fun := λ f, ring_hom.comp ↑m.equiv.symm $ perfection.lift p R S f,
211
+ inv_fun := λ f, (perfection.lift p R S).symm (ring_hom.comp ↑m.equiv f),
212
+ left_inv := λ f, (equiv.symm_apply_eq _).2 $ ring_hom.ext $ λ x,
213
+ by simp_rw [ring_hom.comp_apply, ring_equiv.coe_ring_hom, ring_equiv.apply_symm_apply],
214
+ right_inv := λ f, ring_hom.ext $ λ x, by simp_rw [equiv.apply_symm_apply,
215
+ ring_hom.comp_apply, ring_equiv.coe_ring_hom, ring_equiv.symm_apply_apply] }
216
+
217
+ end perfection_map
117
218
118
219
section perfectoid
119
220
@@ -239,10 +340,13 @@ ring.perfection (mod_p K v O hv p) p
239
340
240
341
namespace pre_tilt
241
342
343
+ instance : comm_ring (pre_tilt K v O hv p) :=
344
+ perfection.comm_ring p _
345
+
242
346
section classical
243
347
local attribute [instance] classical.dec
244
348
245
- open ring. perfection
349
+ open perfection
246
350
247
351
/-- The valuation `Perfection(O/(p)) → ℝ≥0` as a function.
248
352
Given `f ∈ Perfection(O/(p))`, if `f = 0` then output `0`;
@@ -287,8 +391,8 @@ lemma val_aux_mul (f g : pre_tilt K v O hv p) :
287
391
begin
288
392
by_cases hf : f = 0 , { rw [hf, zero_mul, val_aux_zero, zero_mul] },
289
393
by_cases hg : g = 0 , { rw [hg, mul_zero, val_aux_zero, mul_zero] },
290
- replace hf : ∃ n, coeff _ _ n f ≠ 0 := not_forall.1 (λ h, hf $ ring. perfection.ext h),
291
- replace hg : ∃ n, coeff _ _ n g ≠ 0 := not_forall.1 (λ h, hg $ ring. perfection.ext h),
394
+ replace hf : ∃ n, coeff _ _ n f ≠ 0 := not_forall.1 (λ h, hf $ perfection.ext h),
395
+ replace hg : ∃ n, coeff _ _ n g ≠ 0 := not_forall.1 (λ h, hg $ perfection.ext h),
292
396
obtain ⟨m, hm⟩ := hf, obtain ⟨n, hn⟩ := hg,
293
397
replace hm := coeff_ne_zero_of_le hm (le_max_left m n),
294
398
replace hn := coeff_ne_zero_of_le hn (le_max_right m n),
@@ -305,9 +409,9 @@ begin
305
409
by_cases hf : f = 0 , { rw [hf, zero_add, val_aux_zero, max_eq_right], exact zero_le _ },
306
410
by_cases hg : g = 0 , { rw [hg, add_zero, val_aux_zero, max_eq_left], exact zero_le _ },
307
411
by_cases hfg : f + g = 0 , { rw [hfg, val_aux_zero], exact zero_le _ },
308
- replace hf : ∃ n, coeff _ _ n f ≠ 0 := not_forall.1 (λ h, hf $ ring. perfection.ext h),
309
- replace hg : ∃ n, coeff _ _ n g ≠ 0 := not_forall.1 (λ h, hg $ ring. perfection.ext h),
310
- replace hfg : ∃ n, coeff _ _ n (f + g) ≠ 0 := not_forall.1 (λ h, hfg $ ring. perfection.ext h),
412
+ replace hf : ∃ n, coeff _ _ n f ≠ 0 := not_forall.1 (λ h, hf $ perfection.ext h),
413
+ replace hg : ∃ n, coeff _ _ n g ≠ 0 := not_forall.1 (λ h, hg $ perfection.ext h),
414
+ replace hfg : ∃ n, coeff _ _ n (f + g) ≠ 0 := not_forall.1 (λ h, hfg $ perfection.ext h),
311
415
obtain ⟨m, hm⟩ := hf, obtain ⟨n, hn⟩ := hg, obtain ⟨k, hk⟩ := hfg,
312
416
replace hm := coeff_ne_zero_of_le hm (le_trans (le_max_left m n) (le_max_left _ k)),
313
417
replace hn := coeff_ne_zero_of_le hn (le_trans (le_max_right m n) (le_max_left _ k)),
@@ -334,7 +438,7 @@ variables {K v O hv p}
334
438
lemma map_eq_zero {f : pre_tilt K v O hv p} : val K v O hv p f = 0 ↔ f = 0 :=
335
439
begin
336
440
by_cases hf0 : f = 0 , { rw hf0, exact iff_of_true (valuation.map_zero _) rfl },
337
- obtain ⟨n, hn⟩ : ∃ n, coeff _ _ n f ≠ 0 := not_forall.1 (λ h, hf0 $ ring. perfection.ext h),
441
+ obtain ⟨n, hn⟩ : ∃ n, coeff _ _ n f ≠ 0 := not_forall.1 (λ h, hf0 $ perfection.ext h),
338
442
show val_aux K v O hv p f = 0 ↔ f = 0 , refine iff_of_false (λ hvf, hn _) hf0,
339
443
rw val_aux_eq hn at hvf, replace hvf := nnreal.pow_eq_zero hvf, rwa mod_p.pre_val_eq_zero at hvf
340
444
end
0 commit comments