Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 4f785b6

Browse files
committed
feat(algebraic_geometry/Spec): (f∗ 𝒪ₛ)ₚ is just the localization Sₚ for affine f : Spec S ⟶ Spec R (#17471)
1 parent b5aecf0 commit 4f785b6

File tree

2 files changed

+125
-0
lines changed

2 files changed

+125
-0
lines changed

src/algebra/module/localized_module.lean

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,31 @@ begin
964964
exact ⟨⟨m, s⟩, mk'_eq_iff.mpr e.symm⟩
965965
end
966966

967+
section algebra
968+
969+
lemma mk_of_algebra {R S S' : Type*} [comm_ring R] [comm_ring S] [comm_ring S']
970+
[algebra R S] [algebra R S'] (M : submonoid R) (f : S →ₐ[R] S')
971+
(h₁ : ∀ x ∈ M, is_unit (algebra_map R S' x))
972+
(h₂ : ∀ y, ∃ (x : S × M), x.2 • y = f x.1)
973+
(h₃ : ∀ x, f x = 0 → ∃ m : M, m • x = 0) :
974+
is_localized_module M f.to_linear_map :=
975+
begin
976+
replace h₃ := λ x, iff.intro (h₃ x) (λ ⟨⟨m, hm⟩, e⟩, (h₁ m hm).mul_left_cancel $
977+
by { rw ← algebra.smul_def, simpa [submonoid.smul_def] using f.congr_arg e }),
978+
constructor,
979+
{ intro x,
980+
rw module.End_is_unit_iff,
981+
split,
982+
{ rintros a b (e : x • a = x • b), simp_rw [submonoid.smul_def, algebra.smul_def] at e,
983+
exact (h₁ x x.2).mul_left_cancel e },
984+
{ intro a, refine ⟨((h₁ x x.2).unit⁻¹ : _) * a, _⟩, change (x : R) • (_ * a) = _,
985+
rw [algebra.smul_def, ← mul_assoc, is_unit.mul_coe_inv, one_mul] } },
986+
{ exact h₂ },
987+
{ intros, dsimp, rw [eq_comm, ← sub_eq_zero, ← map_sub, h₃], simp_rw [smul_sub, sub_eq_zero] },
988+
end
989+
990+
end algebra
991+
967992
end is_localized_module
968993

969994
end is_localized_module

src/algebraic_geometry/Spec.lean

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import logic.equiv.transfer_instance
99
import ring_theory.localization.localization_localization
1010
import topology.sheaves.sheaf_condition.sites
1111
import topology.sheaves.functors
12+
import algebra.module.localized_module
1213

1314
/-!
1415
# $Spec$ as a functor to locally ringed spaces.
@@ -257,5 +258,104 @@ begin
257258
apply_instance
258259
end
259260

261+
namespace structure_sheaf
262+
263+
variables {R S : CommRing.{u}} (f : R ⟶ S) (p : prime_spectrum R)
264+
265+
/--
266+
For an algebra `f : R →+* S`, this is the ring homomorphism `S →+* (f∗ 𝒪ₛ)ₚ` for a `p : Spec R`.
267+
This is shown to be the localization at `p` in `is_localized_module_to_pushforward_stalk_alg_hom`.
268+
-/
269+
def to_pushforward_stalk :
270+
S ⟶ (Spec.Top_map f _* (structure_sheaf S).1).stalk p :=
271+
structure_sheaf.to_open S ⊤ ≫
272+
@Top.presheaf.germ _ _ _ _ (Spec.Top_map f _* (structure_sheaf S).1) ⊤ ⟨p, trivial⟩
273+
274+
@[reassoc]
275+
lemma to_pushforward_stalk_comp :
276+
f ≫ structure_sheaf.to_pushforward_stalk f p =
277+
structure_sheaf.to_stalk R p ≫
278+
(Top.presheaf.stalk_functor _ _).map (Spec.SheafedSpace_map f).c :=
279+
begin
280+
rw structure_sheaf.to_stalk,
281+
erw category.assoc,
282+
rw Top.presheaf.stalk_functor_map_germ,
283+
exact Spec_Γ_naturality_assoc f _,
284+
end
285+
286+
instance : algebra R ((Spec.Top_map f _* (structure_sheaf S).1).stalk p) :=
287+
(f ≫ structure_sheaf.to_pushforward_stalk f p).to_algebra
288+
289+
lemma algebra_map_pushforward_stalk :
290+
algebra_map R ((Spec.Top_map f _* (structure_sheaf S).1).stalk p) =
291+
f ≫ structure_sheaf.to_pushforward_stalk f p := rfl
292+
293+
variables (R S) [algebra R S]
294+
295+
/--
296+
This is the `alg_hom` version of `to_pushforward_stalk`, which is the map `S ⟶ (f∗ 𝒪ₛ)ₚ` for some
297+
algebra `R ⟶ S` and some `p : Spec R`.
298+
-/
299+
@[simps]
300+
def to_pushforward_stalk_alg_hom :
301+
S →ₐ[R] (Spec.Top_map (algebra_map R S) _* (structure_sheaf S).1).stalk p :=
302+
{ commutes' := λ _, rfl, ..(structure_sheaf.to_pushforward_stalk (algebra_map R S) p) }
303+
304+
.
305+
lemma is_localized_module_to_pushforward_stalk_alg_hom_aux (y) :
306+
∃ (x : S × p.as_ideal.prime_compl), x.2 • y = to_pushforward_stalk_alg_hom R S p x.1 :=
307+
begin
308+
obtain ⟨U, hp, s, e⟩ := Top.presheaf.germ_exist _ _ y,
309+
obtain ⟨_, ⟨r, rfl⟩, hpr, hrU⟩ := prime_spectrum.is_topological_basis_basic_opens
310+
.exists_subset_of_mem_open (show p ∈ U.1, from hp) U.2,
311+
change prime_spectrum.basic_open r ≤ U at hrU,
312+
replace e := ((Spec.Top_map (algebra_map R S) _* (structure_sheaf S).1)
313+
.germ_res_apply (hom_of_le hrU) ⟨p, hpr⟩ _).trans e,
314+
set s' := (Spec.Top_map (algebra_map R S) _* (structure_sheaf S).1).map (hom_of_le hrU).op s
315+
with h,
316+
rw ← h at e,
317+
clear_value s', clear_dependent U,
318+
obtain ⟨⟨s, ⟨_, n, rfl⟩⟩, hsn⟩ := @is_localization.surj _ _ _
319+
_ _ _ (structure_sheaf.is_localization.to_basic_open S $ algebra_map R S r) s',
320+
refine ⟨⟨s, ⟨r, hpr⟩ ^ n⟩, _⟩,
321+
rw [submonoid.smul_def, algebra.smul_def, algebra_map_pushforward_stalk, to_pushforward_stalk,
322+
comp_apply, comp_apply],
323+
iterate 2 { erw ← (Spec.Top_map (algebra_map R S) _* (structure_sheaf S).1).germ_res_apply
324+
(hom_of_le le_top) ⟨p, hpr⟩ },
325+
rw [← e, ← map_mul, mul_comm],
326+
dsimp only [subtype.coe_mk] at hsn,
327+
rw ← map_pow (algebra_map R S) at hsn,
328+
congr' 1
329+
end
330+
331+
instance is_localized_module_to_pushforward_stalk_alg_hom :
332+
is_localized_module p.as_ideal.prime_compl (to_pushforward_stalk_alg_hom R S p).to_linear_map :=
333+
begin
334+
apply is_localized_module.mk_of_algebra,
335+
{ intros x hx, rw [algebra_map_pushforward_stalk, to_pushforward_stalk_comp, comp_apply],
336+
exact (is_localization.map_units ((structure_sheaf R).presheaf.stalk p) ⟨x, hx⟩).map _ },
337+
{ apply is_localized_module_to_pushforward_stalk_alg_hom_aux },
338+
{ intros x hx,
339+
rw [to_pushforward_stalk_alg_hom_apply, ring_hom.to_fun_eq_coe,
340+
← (to_pushforward_stalk (algebra_map R S) p).map_zero, to_pushforward_stalk, comp_apply,
341+
comp_apply, map_zero] at hx,
342+
obtain ⟨U, hpU, i₁, i₂, e⟩ := Top.presheaf.germ_eq _ _ _ _ _ _ hx,
343+
obtain ⟨_, ⟨r, rfl⟩, hpr, hrU⟩ := prime_spectrum.is_topological_basis_basic_opens
344+
.exists_subset_of_mem_open (show p ∈ U.1, from hpU) U.2,
345+
change prime_spectrum.basic_open r ≤ U at hrU,
346+
apply_fun (Spec.Top_map (algebra_map R S) _* (structure_sheaf S).1).map (hom_of_le hrU).op at e,
347+
simp only [Top.presheaf.pushforward_obj_map, functor.op_map, map_zero, ← comp_apply,
348+
to_open_res] at e,
349+
have : to_open S (prime_spectrum.basic_open $ algebra_map R S r) x = 0,
350+
{ refine eq.trans _ e, refl },
351+
have := (@is_localization.mk'_one _ _ _
352+
_ _ _ (structure_sheaf.is_localization.to_basic_open S $ algebra_map R S r) x).trans this,
353+
obtain ⟨⟨_, n, rfl⟩, e⟩ := (is_localization.mk'_eq_zero_iff _ _).mp this,
354+
refine ⟨⟨r, hpr⟩ ^ n, _⟩,
355+
rw [submonoid.smul_def, algebra.smul_def, submonoid.coe_pow, subtype.coe_mk, mul_comm, map_pow],
356+
exact e },
357+
end
358+
359+
end structure_sheaf
260360

261361
end algebraic_geometry

0 commit comments

Comments
 (0)