Lean source
Lib.Cohomology.ProperBaseChange.KummerLine
Its 4 declarations
eventually_mem_span_closurelemma, lines 20–24eventually_zpow_mul_mem_rangelemma, lines 26–28exists_noetherian_fg_filtrationlemma, lines 35–62line_mayer_vietorislemma, lines 64–161
import Lib.PadicComparison.Descent.ReductionModP/-! Part of: Proper base change; invariance under extension of algebraically closed fields (knownresult; see Lib.Cohomology.ProperBaseChange.ProperBaseChange).This file: Mayer-Vietoris for locally constant functions on two rings with a common localisation. -/attribute [-simp] map_eq_zero IsIdempotentElem.iff_eq_zero_or_oneopen PrimeSpectrum Polynomial CommRingCat Ideal.Quotient IsLocalization IsLocalRing IsAIC Submodule Algebra AlgebraMonoidAlgebra Pointwise IsScalarTower Subring Set Filter algebraMapvariable {ι A B C D : Type} [CommRing A] [CommRing B] [CommRing C] [CommRing D] [Algebra A B] [Algebra A C] [Algebra A D] [Algebra B D] [Algebra C D] [IsScalarTower A B D] (I : Ideal A) [IsScalarTower A C D] (t : B) (s : C) [Away t D] [Away s D] (hts : (t * s : D) = 1) (hD : ∀ x : D, IsIntegral A[(t : D), ↑s] x)/-- If z lies in the A-span of the f(i), then for all large finite T ⊆ ι and all large finite S⊆ A, z lies in the span of f(T) over the subring generated by S. -/lemma eventually_mem_span_closure (f : ι → D) z (h : z ∈ span A (range f)) : ∀ᶠ (T : Finset ι) (S : Finset A) in atTop, z ∈ span (@closure A _ S) (f '' T) := (Finsupp.mem_span_range_iff_exists_finsupp.1 h).elim fun a e ↦ .mono (mem_atTop _) fun _ l ↦ .mono (mem_atTop _) fun _ k ↦ e ▸ sum_mem fun i h ↦ smul_mem _ (Subtype.mk _ (subset_closure (k (Finset.mem_image_of_mem a h)))) (subset_span ⟨i, l h, rfl⟩)private lemma eventually_zpow_mul_mem_range (τ : Dˣ) (h : (t : D) = τ) x : ∀ᶠ j : ℤ in atTop, IsInteger B ((τ ^ j).1 * x) := (Away.surj t x).elim fun n ⟨a, H⟩ ↦ .mono (mem_atTop ↑n) fun _ l ↦ (Int.le.dest l).imp' (a * t ^ ·) (by rintro _ ⟨⟩; simp [zpow_add]; grind)include hts hD/-- Let D = B[1/t] = C[1/s], ts = 1, be a ring integral over A[t,s]. For finite G ⊂ D there are asubring R ⊂ A and a Noetherian R-submodule Y ⊃ G ∪ {1} such that each n has R-submodules P ⊂ im B,Q ⊂ im C and finitely generated M with Yⁿ, PQ ⊂ M ⊂ P+Q+Y. -/lemma exists_noetherian_fg_filtration (G : Set D) [Finite G] : ∃ (R : Subring A) (Y : Submodule R D), insert 1 G ⊆ Y ∧ IsNoetherian R Y ∧ ∀ n, ∃ P ≤ (toAlgHom _ B D).toLinearMap.range, ∃ Q ≤ (toAlgHom _ C D).toLinearMap.range, ∃ M ∈ Icc (Y ^ n) (P ⊔ Q ⊔ Y), M.FG ∧ P * Q ≤ M := by let τ := Units.mkOfMulEqOne _ _ hts let F := (Units.coeHom D).comp (zpowersHom _ τ); let T : ℤ → D := F have hT a b : T '' a * T '' b ⊆ T '' (a + b) := (image_mul F).ge obtain ⟨S, hS⟩ := fg_adjoin_of_finite ‹_› fun g _ ↦ hD g choose r hr using fun x : ↥(insert 1 G ∪ S * S) ↦ mem_span_finset'.1 (mem_of_mem_of_subset x.2 (by grw [hS, span_le.1 hS.le]; simp [insert_subset])) have ⟨k, l, H⟩ := ((eventually_forall_ge_atTop.2 (S.eventually_all.2 fun x _ ↦ (eventually_zpow_mul_mem_range t τ rfl x).and (eventually_zpow_mul_mem_range s τ⁻¹ rfl x))).and (Finset.tendsto_Icc_neg_atTop_atTop (eventually_all.2 fun p ↦ eventually_mem_span_closure T _ (span_mono ((MonoidHom.mrange F).closure_le.2 (pair_subset ⟨.ofAdd 1, pow_one _⟩ ⟨.ofAdd (-1), pow_one _⟩)) ((adjoin_eq_span ..).le (↿r p).2))))).exists have ⟨U, H⟩ := (eventually_all.2 H).exists let M a b := span (@closure A _ U) (T '' Icc a b * S :) have ⟨o, hk⟩ := union_subset_iff.1 (Subtype.forall'.2 fun x ↦ hr x ▸ (span_mul_span ..).le (sum_mem fun g _ ↦ mul_mem_mul (Finset.coe_Icc _ k ▸ H (x, g)) (subset_span g.2))) have m a b c d : M a b * M c d ≤ M _ _ grw [span_mul_span, mul_mul_mul_comm, ← span_mul_span, hk, span_eq, span_mul_span, ← mul_assoc, hT, hT, Icc_add_Icc_subset, Icc_add_Icc_subset] have := is_noetherian_subring_closure _ U.finite_toSet refine ⟨_, _, o, isNoetherian_span_of_finite _ (toFinite _), fun n ↦ (n.rec ⟨_, _, one_le.2 (o (by simp))⟩ fun _ ⟨i, j, h⟩ ↦ ⟨_, _, by grw [pow_succ, h, m]⟩ : ∃ i j, _ ^ n ≤ M i j).elim fun i ⟨j, h⟩ ↦ ⟨M k j, span_le.2 (mul_subset_iff.2 (forall_mem_image.2 (l · ·.1 · · |>.1))), M i (-k), by simpa [M, span_le, mul_subset_iff, ↓forall_mem_image] using! fun _ _ h ↦ (l _ (le_neg.1 h) · · |>.2), _, ⟨h, ?_⟩, fg_span (toFinite _), by grw [m]; simp⟩⟩ simp [M, ← span_union, ← union_mul, ← image_union]; gcongr; simp [subset_def]; omegalemma line_mayer_vietoris [IsDomain A] [IsDomain D] {ℓ} [ThePrime ℓ] (u : IsUnit (ℓ : A)) [IsAIC A] [IsAIC B] [IsAIC C] (hA : ∀ (x : B) (y : C), (x : D) = y → (x, y) ∈ range (algebraMap A _)) (i : (∃ a, algebraMap A B a * (1 - t) = 1 ∧ (algebraMap A C a - 1) * (s - 1) = 1 ∧ Away a B ∧ (a * (a - 1) ∈ I ∨ ∀ r ∈ I, ∃ ε, ε + r * ε ^ 2 = 1)) ∨ IsAICLocal A) (hI : ∀ {E} [CommRing.{0} E] (ψ : A →+* E), ∀ x ∈ I.map ψ, ∃ i ∈ I, ψ i ∣ x) {J L K h₁ h₂} (e : (I.map (algebraMap A B), I.map (algebraMap A C), I.map (algebraMap A D)) = (J, L, K)) : let r := J.quotientMap K (algebraMap ..) h₁; let q := L.quotientMap K (algebraMap ..) h₂; (∀{x y}, IsClopen x → IsClopen y → PrimeSpectrum.comap r ⁻¹' x = PrimeSpectrum.comap q ⁻¹' y →∃ k : A, x = basicOpen (k : B ⧸ J) ∧ y = basicOpen (k : C ⧸ L)) ∧∀ u, ∃ a b, u = (locConstSpec ⟨ZMod ℓ⟩).map (ofHom r) a - (locConstSpec _).map (ofHom q) b := by intro r q let f := toAlgHom A B D; let g := toAlgHom A C D have Z {E} [CommRing.{0} E] {ψ : A →+* E} {i} := eq_zero_iff_mem.2 ∘ I.mem_map_of_mem ψ (x := i) use ?_, fun v ↦ (by have H : ∀ w, w ^ ℓ = 1 → ∃ a b W, W ^ ℓ = f a * g b ∧ mk J a = 1 ∧ mk L b = 1 ∧ w = mk K W := mk_surjective.forall.2 fun w h ↦ dite _ id fun n ↦ ?_ obtain ⟨⟨ζ, h⟩, φ, hφ⟩ := exists_root _ (cyclotomic.monic ℓ A) (by simp [NeZero.pos, natDegree_cyclotomic]), exists_ringHom_of_locallyConstant A (D ⧸ K) have P {S} [CommRing S] [IsDomain S] [Algebra A S] := (@isRoot_cyclotomic_iff S _ ℓ _ ⟨mod_cast (u.map (algebraMap A S)).ne_zero⟩ _).1 (map_cyclotomic ℓ (algebraMap A S) ▸ h.map) have a {S} [CommRing S] [Algebra A S] {y : S} (k : y ^ ℓ = 1) : ∃ a : LocallyConstant .., ∀ p, y - ζ ^ a p ∈ asIdeal p · choose a l ha using fun p ↦ P.eq_pow_of_pow_eq_one (ξ := mk (asIdeal p) y) congr($k) use ⟨a, fun s ↦ ?_⟩, (Ideal.Quotient.eq.1 <| ha · |>.symm) convert (Iio ℓ \ s).toFinite.isOpen_biInter fun i _ ↦ (basicOpen (y - ζ ^ i)).2 ext; simp [← mk_eq_mk_iff_sub_mem]; grind [IsPrimitiveRoot.pow_inj] let ⟨x, y, W, E, k₁, k₂, k₃⟩ := H (φ (v.map (ζ ^ ·.val))) (by rw [← map_pow, ← φ.map_one]; congr with _ apply ((powMonoidHom ℓ).eqLocusM 1).pow_mem P.1) obtain ⟨⟨x, rfl⟩, y, rfl⟩ := exists_pow_eq ℓ x, exists_pow_eq ℓ y simp [← mul_pow, ← mem_nthRoots, NeZero.pos, P.nthRoots_eq rfl] at E k₁ k₂ obtain ⟨⟨i, -, rfl⟩, ⟨a, ha⟩, b, hb⟩ := E, a k₁, a k₂ use a.map (i + ↑·), -b.map (↑), LocallyConstant.ext fun p ↦ ?_ obtain _ := ha (p.comap r), hb (p.comap q) apply_fun algebraMap _ p.1.ResidueField at k₃ simp_all +zetaDelta [← p.1.algebraMap_residueField_eq_zero, ← pow_add, ← algebraMap_apply] erw [congr(residue _ $(hφ ..)), map_pow, (P.isOfFinOrder NeZero.out).pow_inj_mod] at k₃ simpa [← add_assoc, ← ZMod.natCast_eq_natCast_iff', ← sub_neg_eq_add, ← P.eq_orderOf] using! k₃ cases e have n {i} (m : i ∈ I) (k : IsUnit (i : D)) := n ⟨1, 1, 1, by simp [← (k.map (algebraMap ..)).mul_right_inj, Z m]⟩ obtain ⟨⟨a, k, q, _, i⟩ | i, ⟨u, hu⟩, ϖ, m, G, hw⟩ := i, u.neg.invertible, hI _ _ (Ideal.Quotient.eq.1 h) · have : Away _ D := .mul_of_associated a (a - 1) t ⟨⟨_, _, by ac_nf, k⟩, by simp [sub_mul, k]⟩ have ⟨d, j, e⟩ := this.surj _ G have ⟨u, v, c⟩ := @IsCoprime.pow _ _ a _ d d (.sub_one_right_of_dvd dvd_rfl) have ⟨ε, o⟩ := i.resolve_left (n · this.algebraMap_isUnit) _ (I.smul_mem (u * v * j) m) use 1 + ε • ϖ • j • v • (1 - t) ^ d, 1 + ε • ϖ • j • u • (s - 1) ^ d, w have := congr((f $k ^ d, g $q ^ d, $c • G, $o • G)) simp [mul_pow, smul_def', Z m] at this e ⊢; grind have ⟨U, N, hG, _, H⟩ := exists_noetherian_fg_filtration t s hts hD {G} obtain ⟨P, hP, Q, hQ, _, ⟨hN, h'⟩, ⟨e, ⟨⟩⟩, hPQ⟩ := H _ rw [← map_comap_eq_self hP, ← map_comap_eq_self hQ] at h' choose a ha b hb y hy he using fun k : e ↦ by simpa [Submodule.mem_sup] using h' (subset_span k.2) let κ := toAlgHom U D (MvPolynomial e D); let T N := span (MvPolynomial e A) (κ '' N) have hL {N} {v : e → D} (h : ∀ k, _) := (T N).sum_smul_mem (t := .univ) .X fun k _ ↦ subset_span ⟨v k, h k, rfl⟩ obtain ⟨o, z⟩ := by simpa using (span_le.1 (refl (T N)) ⟨·, hG ·, rfl⟩) let c : T N := u • ⟨_, add_mem z (hL hy)⟩ have ⟨Φ, r, K⟩ : ∃ Φ ∈ T N ^ (ℓ + 1), (1 + ϖ • c.1) ^ ℓ * (1 + ϖ • κ G) = 1 + ϖ • (κ G + ℓ • c.1 + ϖ • Φ) := ℓ.rec ⟨0, by simp⟩ fun m ⟨Φ, r, ih⟩ ↦ ⟨_, add_mem (mul_mem_mul r (add_mem o (ϖ • c).2)) (mul_mem_mul (mul_mem_mul (pow_mem_pow _ o m) c.2) (add_mem z (m • c).2)), by simp [pow_succ', mul_assoc, ih]; algebra⟩ obtain ⟨p, hF⟩ := (mem_span_image_finset_iff_exists_fun _).1 (mem_of_le_of_mem (by grw [span_pow, span_mul_span, ← image_mul, ← image_pow, N.pow_subset_pow, P.mul_subset_mul, hN, hPQ, sup_idem, ← κ.coe_toLinearMap, image_span_subset_span, span_span_of_tower]) (sub_mem_sup r (mul_mem_mul (hL ha) (hL hb)))) have ⟨x, H⟩ := i.multivariate_hensel (p := ϖ • p) fun k _ u ↦ n (I.mul_mem_right _ m) (u.map _) let ev := MvPolynomial.eval (algebraMap A D ∘ x) use 1 + ϖ • ∑ k, x k • a k, 1 + ϖ • ∑ k, x k • b k, w * (1 + ϖ • ev c) have := congr((ev $K, ev $hF, ofId A D $hu)) simp +zetaDelta [↓mul_pow, ← he, H, smul_def', mul_assoc, mul_add, ← Finset.mul_sum, ← algebraMap_apply, ← (p _).eval₂_comp, Z m] at this ⊢; grind) simp_rw [PrimeSpectrum.isClopen_iff, mk_surjective.exists]; rintro _ _ ⟨x, a, rfl⟩ ⟨y, b, rfl⟩ h obtain ⟨⟨⟩, _, h⟩ := e, b.map q, basicOpen_injOn_isIdempotentElem (a.map _) (b.map _) (SetLike.ext' h) have ⟨ϖ, m, ⟨α, β⟩, p⟩ := hI (.prod (ofId A D) (ofId A D)) ((f x, g y) * (1 - (g y, f x))) ?_ have ⟨S, F, hE, _, hN⟩ := exists_noetherian_fg_filtration t s hts hD {f x, g y, α, β} let φ := f.toLinearMap.coprod (-g.toLinearMap); let N := φ.range.restrictScalars S have ⟨E, i, hN⟩ : ∃ E, _ ∈ Icc F (N ⊔ F) := ⟨_, (iSup_eq_toSubmodule_range (F ^ ·)).subst ⟨le_iSup_of_le 1 (by simp), iSup_le (hN · |>.elim fun _ ⟨c, _, d, _, ⟨a, b⟩, _⟩ ↦ by simp [N, φ, LinearMap.range_coprod]; grw [a, b, c, d]; rfl)⟩⟩ obtain ⟨⟨k, h⟩, u, v, c, d⟩ := @WellFounded.not_rel_apply_succ _ GT.gt _ (N.comap <| ϖ ^ · • F.subtype), by simpa [subset_def] using hE.trans i let n := k.succ obtain ⟨⟨j, l⟩, e⟩ := mul_dvd_mul (one_sub_dvd_one_sub_pow (1 - ((⟨_, u⟩, ⟨_, v⟩) : E × E) ^ n) n) (pow_dvd_pow_of_dvd (one_sub_dvd_one_sub_pow (⟨_, v⟩, ⟨_, u⟩) n) n) obtain ⟨⟨_, w, rfl⟩, z, o⟩ := mem_sup'.1 (hN (j * ⟨_, c⟩ ^ n - l * ⟨_, d⟩ ^ n).2) have r : φ (1 - (1 - (x, y) ^ n) ^ n - ϖ ^ n • w) = ϖ ^ n • z · have := congr($p ^ n) simp [φ, mul_pow, Prod.ext_iff, Subtype.ext_iff, smul_def'] at e o this ⊢; grind exact (not_lt_iff_le_imp_ge.1 h (fun _ ↦ .imp' (ϖ • ·) (by simp_all [pow_succ', mul_smul])) ⟨_, r⟩).elim fun v j ↦ (hA _ _ (eq_of_add_neg_eq_zero (φ.sub_mem_ker_iff (y := ϖ • v).2 (r.trans (by simp [n, pow_succ', mul_smul, j]))))).imp (by simp +contextual [← mk_algebraMap, *, n, IsIdempotentElem.pow_succ_eq, smul_def']) exact (Ideal.ideal_prod_eq _).ge (by simp_all +zetaDelta [I.map_map, ← eq_zero_iff_mem, ↓Ideal.mem_prod])