@@ -111,9 +111,24 @@ def ring_hom.holds_for_localization_away : Prop :=
111111∀ ⦃R : Type u⦄ (S : Type u) [comm_ring R] [comm_ring S] [by exactI algebra R S] (r : R)
112112 [by exactI is_localization.away r S], by exactI P (algebra_map R S)
113113
114- /-- A property `P` of ring homs satisfies `ring_hom.of_localization_span_target `
114+ /-- A property `P` of ring homs satisfies `ring_hom.of_localization_finite_span_target `
115115if `P` holds for `R →+* S` whenever there exists a finite set `{ r }` that spans `S` such that
116- `P` holds for `R →+* Sᵣ`. -/
116+ `P` holds for `R →+* Sᵣ`.
117+
118+ Note that this is equivalent to `ring_hom.of_localization_span_target` via
119+ `ring_hom.of_localization_span_target_iff_finite`, but this is easier to prove. -/
120+ def ring_hom.of_localization_finite_span_target : Prop :=
121+ ∀ ⦃R S : Type u⦄ [comm_ring R] [comm_ring S] (f : by exactI R →+* S)
122+ (s : finset S) (hs : by exactI ideal.span (s : set S) = ⊤)
123+ (H : by exactI (∀ (r : s), P ((algebra_map S (localization.away (r : S))).comp f))),
124+ by exactI P f
125+
126+ /-- A property `P` of ring homs satisfies `ring_hom.of_localization_span_target`
127+ if `P` holds for `R →+* S` whenever there exists a set `{ r }` that spans `S` such that
128+ `P` holds for `R →+* Sᵣ`.
129+
130+ Note that this is equivalent to `ring_hom.of_localization_finite_span_target` via
131+ `ring_hom.of_localization_span_target_iff_finite`, but this has less restrictions when applying. -/
117132def ring_hom.of_localization_span_target : Prop :=
118133∀ ⦃R S : Type u⦄ [comm_ring R] [comm_ring S] (f : by exactI R →+* S)
119134 (s : set S) (hs : by exactI ideal.span s = ⊤)
@@ -148,6 +163,19 @@ begin
148163 exact h s' h₂ (λ x, hs' ⟨_, h₁ x.prop⟩) }
149164end
150165
166+ lemma ring_hom.of_localization_span_target_iff_finite :
167+ ring_hom.of_localization_span_target @P ↔ ring_hom.of_localization_finite_span_target @P :=
168+ begin
169+ delta ring_hom.of_localization_span_target ring_hom.of_localization_finite_span_target,
170+ apply forall₅_congr, -- TODO: Using `refine` here breaks `resetI`.
171+ introsI,
172+ split,
173+ { intros h s, exact h s },
174+ { intros h s hs hs',
175+ obtain ⟨s', h₁, h₂⟩ := (ideal.span_eq_top_iff_finite s).mp hs,
176+ exact h s' h₂ (λ x, hs' ⟨_, h₁ x.prop⟩) }
177+ end
178+
151179variables {P f R' S'}
152180
153181lemma _root_.ring_hom.property_is_local.respects_iso (hP : ring_hom.property_is_local @P) :
@@ -543,6 +571,37 @@ lemma localization_away_map_finite_type (r : R) [is_localization.away r R']
543571 (is_localization.away.map R' S' f r).finite_type :=
544572localization_finite_type.away r hf
545573
574+ variable {S'}
575+
576+ /--
577+ Let `S` be an `R`-algebra, `M` a submonoid of `S`, `S' = M⁻¹S`.
578+ Suppose the image of some `x : S` falls in the adjoin of some finite `s ⊆ S'` over `R`,
579+ and `A` is an `R`-subalgebra of `S` containing both `M` and the numerators of `s`.
580+ Then, there exists some `m : M` such that `m • x` falls in `A`.
581+ -/
582+ lemma is_localization.exists_smul_mem_of_mem_adjoin [algebra R S]
583+ [algebra R S'] [is_scalar_tower R S S'] (M : submonoid S)
584+ [is_localization M S'] (x : S) (s : finset S') (A : subalgebra R S)
585+ (hA₁ : (is_localization.finset_integer_multiple M s : set S) ⊆ A)
586+ (hA₂ : M ≤ A.to_submonoid)
587+ (hx : algebra_map S S' x ∈ algebra.adjoin R (s : set S')) :
588+ ∃ m : M, m • x ∈ A :=
589+ begin
590+ let g : S →ₐ[R] S' := is_scalar_tower.to_alg_hom R S S',
591+ let y := is_localization.common_denom_of_finset M s,
592+ have hx₁ : (y : S) • ↑s = g '' _ := (is_localization.finset_integer_multiple_image _ s).symm,
593+ obtain ⟨n, hn⟩ := algebra.pow_smul_mem_of_smul_subset_of_mem_adjoin (y : S) (s : set S')
594+ (A.map g) (by { rw hx₁, exact set.image_subset _ hA₁ }) hx (set.mem_image_of_mem _ (hA₂ y.2 )),
595+ obtain ⟨x', hx', hx''⟩ := hn n (le_of_eq rfl),
596+ rw [algebra.smul_def, ← _root_.map_mul] at hx'',
597+ obtain ⟨a, ha₂⟩ := (is_localization.eq_iff_exists M S').mp hx'',
598+ use a * y ^ n,
599+ convert A.mul_mem hx' (hA₂ a.2 ),
600+ convert ha₂.symm,
601+ simp only [submonoid.smul_def, submonoid.coe_pow, smul_eq_mul, submonoid.coe_mul],
602+ ring,
603+ end
604+
546605/--
547606Let `S` be an `R`-algebra, `M` an submonoid of `R`, and `S' = M⁻¹S`.
548607If the image of some `x : S` falls in the adjoin of some finite `s ⊆ S'` over `R`,
@@ -556,30 +615,10 @@ lemma is_localization.lift_mem_adjoin_finset_integer_multiple [algebra R S]
556615 ∃ m : M, m • x ∈ algebra.adjoin R
557616 (is_localization.finset_integer_multiple (M.map (algebra_map R S : R →* S)) s : set S) :=
558617begin
559- -- mirrors the proof of `is_localization.smul_mem_finset_integer_multiple_span`
560- let g : S →ₐ[R] S' := alg_hom.mk' (algebra_map S S')
561- (λ c x, by simp [algebra.algebra_map_eq_smul_one]),
562-
563- let y := is_localization.common_denom_of_finset (M.map (algebra_map R S : R →* S)) s,
564- have hx₁ : (y : S) • ↑s = g '' _ := (is_localization.finset_integer_multiple_image _ s).symm,
565- obtain ⟨y', hy', e : algebra_map R S y' = y⟩ := y.prop,
566- have : algebra_map R S y' • (s : set S') = y' • s :=
567- by simp_rw [algebra.algebra_map_eq_smul_one, smul_assoc, one_smul],
568- rw [← e, this ] at hx₁,
569- replace hx₁ := congr_arg (algebra.adjoin R) hx₁,
570- obtain ⟨n, hn⟩ := algebra.pow_smul_mem_adjoin_smul _ y' (s : set S') hx,
571- specialize hn n (le_of_eq rfl),
572- erw [hx₁, ← g.map_smul, ← g.map_adjoin] at hn,
573- obtain ⟨x', hx', hx''⟩ := hn,
574- obtain ⟨⟨_, a, ha₁, rfl⟩, ha₂⟩ := (is_localization.eq_iff_exists
575- (M.map (algebra_map R S : R →* S)) S').mp hx'',
576- use (⟨a, ha₁⟩ : M) * (⟨y', hy'⟩ : M) ^ n,
577- convert (algebra.adjoin R (is_localization.finset_integer_multiple
578- (submonoid.map (algebra_map R S : R →* S) M) s : set S)).smul_mem hx' a using 1 ,
579- convert ha₂.symm,
580- { rw [mul_comm (y' ^ n • x), subtype.coe_mk, submonoid.smul_def, submonoid.coe_mul, ← smul_smul,
581- algebra.smul_def, submonoid_class.coe_pow], refl },
582- { rw mul_comm, exact algebra.smul_def _ _ }
618+ obtain ⟨⟨_, a, ha, rfl⟩, e⟩ := is_localization.exists_smul_mem_of_mem_adjoin
619+ (M.map (algebra_map R S : R →* S)) x s (algebra.adjoin R _) algebra.subset_adjoin _ hx,
620+ { exact ⟨⟨a, ha⟩, by simpa [submonoid.smul_def] using e⟩ },
621+ { rintros _ ⟨a, ha, rfl⟩, exact subalgebra.algebra_map_mem _ a }
583622end
584623
585624lemma finite_type_of_localization_span : ring_hom.of_localization_span @ring_hom.finite_type :=
@@ -613,7 +652,7 @@ begin
613652 rw [submonoid.smul_def, algebra.smul_def, is_scalar_tower.algebra_map_apply R S,
614653 subtype.coe_mk, ← map_mul] at hn₁,
615654 obtain ⟨⟨_, n₂, rfl⟩, hn₂⟩ := is_localization.lift_mem_adjoin_finset_integer_multiple
616- (submonoid.powers (r : R)) (localization.away (f r)) _ (s₁ r) hn₁,
655+ (submonoid.powers (r : R)) _ (s₁ r) hn₁,
617656 rw [submonoid.smul_def, ← algebra.smul_def, smul_smul, subtype.coe_mk, ← pow_add] at hn₂,
618657 use n₂ + n₁,
619658 refine le_supr (λ (x : s), algebra.adjoin R (sf x : set S)) r _,
0 commit comments