@@ -366,7 +366,20 @@ end AtUnits
366366
367367section Prod
368368
369- lemma away_of_isIdempotentElem_of_mul {R S} [CommSemiring R] [CommSemiring S] [Algebra R S]
369+ lemma Away.algebraMap_surjective_of_isIdempotentElem
370+ (e : R) (he : IsIdempotentElem e) [IsLocalization.Away e S] :
371+ Function.Surjective (algebraMap R S) := by
372+ intro x
373+ obtain ⟨x, ⟨_, n, rfl⟩, rfl⟩ := IsLocalization.exists_mk'_eq (.powers e) x
374+ suffices ∃ a k, e ^ k * (a * e ^ n) = e ^ k * x by
375+ simpa [IsLocalization.eq_mk'_iff_mul_eq, ← map_pow, ← map_mul,
376+ IsLocalization.eq_iff_exists (.powers e), Submonoid.mem_powers_iff]
377+ refine ⟨x, 1 , ?_⟩
378+ trans e ^ (n + 1 ) * x
379+ · ring
380+ · rw [he.pow_succ_eq]; ring
381+
382+ lemma away_of_isIdempotentElem_of_mul
370383 {e : R} (he : IsIdempotentElem e)
371384 (H : ∀ x y, algebraMap R S x = algebraMap R S y ↔ e * x = e * y)
372385 (H' : Function.Surjective (algebraMap R S)) :
@@ -502,6 +515,22 @@ lemma awayMap_bijective_of_dvd {R : Type*} [CommRing R] (f : R →+* S)
502515 Function.Bijective (awayMap f b) :=
503516 ⟨awayMap_injective_of_dvd f h H.1 , awayMap_surjective_of_dvd f h H.2 ⟩
504517
518+ omit [Algebra R S] in
519+ lemma awayMap_awayMap_surjective (f : R →+* S) (a b : R)
520+ (H : Function.Surjective (awayMap f (a * b))) :
521+ Function.Surjective (awayMap (awayMap f a) (algebraMap _ _ b)) := by
522+ rw [awayMap_surjective_iff] at H ⊢
523+ suffices ∀ (s : S) (n : ℕ), ∃ c l m k, f (a ^ (k + n) * c) =
524+ f (a ^ (k + l) * b ^ m) * s by
525+ simpa [Function.Surjective, (IsLocalization.mk'_surjective (.powers (f a))).forall, ← map_pow,
526+ (IsLocalization.mk'_surjective (.powers a)).exists, Submonoid.mem_powers_iff, pow_add,
527+ Localization.awayMap, IsLocalization.Away.map, IsLocalization.map_mk', ← mul_assoc,
528+ IsLocalization.mk'_eq_iff_eq, ← map_mul, IsLocalization.eq_iff_exists (.powers (f a)),
529+ IsLocalization.mul_mk'_eq_mk'_of_mul]
530+ intro s n
531+ obtain ⟨c, m, e⟩ := H s
532+ exact ⟨c, n + m, m, 0 , by simp [e, pow_add]; ring⟩
533+
505534variable {A : Type *} [CommSemiring A] [Algebra R A]
506535variable {B : Type *} [CommSemiring B] [Algebra R B]
507536
0 commit comments