import OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Residue.Scalar /-! # Residue Scalar -/ namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Localized.ResidueScalar noncomputable section /-! A field quotient of a localization is generated by fractions of the original coefficient ring. The property transports through a field isomorphism. -/ open _root_.CategoryTheory universe u theorem fractionGenerated_localization_surjection {R A K : Type u} [CommRing R] [CommRing A] [Field K] [Algebra R A] (T : Submonoid R) [IsLocalization T A] (g : A →+* K) (hg : Function.Surjective g) : ∀ t : K, ∃ a b : R, g (algebraMap R A b) ≠ 0 ∧ t * g (algebraMap R A b) = g (algebraMap R A a) := by intro t obtain ⟨z, rfl⟩ := hg t obtain ⟨⟨a, b⟩, hab⟩ := IsLocalization.surj T z refine ⟨a, b.val, ((IsLocalization.map_units A b).map g).ne_zero, ?_⟩ exact (map_mul g z (algebraMap R A b.val)).symm.trans (congrArg g hab) theorem fractionGenerated_postcomp_equiv {R K L : Type u} [CommRing R] [Field K] [Field L] (f : R →+* K) (hf : ∀ t : K, ∃ a b : R, f b ≠ 0 ∧ t * f b = f a) (e : K ≃+* L) : ∀ t : L, ∃ a b : R, e (f b) ≠ 0 ∧ t * e (f b) = e (f a) := by intro t obtain ⟨a, b, hb, ht⟩ := hf (e.symm t) refine ⟨a, b, fun h => hb (e.injective (h.trans (map_zero e).symm)), ?_⟩ simpa only [map_mul, RingEquiv.apply_symm_apply] using congrArg e ht end end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Localized.ResidueScalar