@@ -9,6 +9,7 @@ import logic.equiv.transfer_instance
99import ring_theory.localization.localization_localization
1010import topology.sheaves.sheaf_condition.sites
1111import 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
258259end
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
261361end algebraic_geometry
0 commit comments