|
| 1 | +/- |
| 2 | +Copyright (c) 2021 Andrew Yang. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Andrew Yang |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.RingTheory.FiniteType |
| 9 | +public import Mathlib.RingTheory.Localization.Finiteness |
| 10 | +public import Mathlib.RingTheory.Localization.BaseChange |
| 11 | + |
| 12 | +/-! |
| 13 | +
|
| 14 | +# Locality of `Algebra.FiniteType` |
| 15 | +
|
| 16 | +In this file we show that finite-type is local on the source and the target. |
| 17 | +
|
| 18 | +## Main results |
| 19 | +
|
| 20 | +- `Algebra.FiniteType.of_span_eq_top_source`: finite-type is local on the (algebraic) source |
| 21 | +- `Algebra.FiniteType.of_span_eq_top_target`: finite-type is local on the (algebraic) target |
| 22 | +
|
| 23 | +-/ |
| 24 | + |
| 25 | +public section |
| 26 | + |
| 27 | +section Algebra |
| 28 | + |
| 29 | +open scoped Pointwise TensorProduct |
| 30 | + |
| 31 | +variable {R S : Type*} [CommRing R] [CommRing S] [Algebra R S] (M : Submonoid R) |
| 32 | +variable (R' S' : Type*) [CommRing R'] [CommRing S'] |
| 33 | +variable [Algebra R R'] [Algebra S S'] |
| 34 | + |
| 35 | +variable {S'} in |
| 36 | +open scoped Classical in |
| 37 | +/-- Let `S` be an `R`-algebra, `M` a submonoid of `S`, `S' = M⁻¹S`. |
| 38 | +Suppose the image of some `x : S` falls in the adjoin of some finite `s ⊆ S'` over `R`, |
| 39 | +and `A` is an `R`-subalgebra of `S` containing both `M` and the numerators of `s`. |
| 40 | +Then, there exists some `m : M` such that `m • x` falls in `A`. |
| 41 | +-/ |
| 42 | +theorem IsLocalization.exists_smul_mem_of_mem_adjoin [Algebra R S'] |
| 43 | + [IsScalarTower R S S'] (M : Submonoid S) [IsLocalization M S'] (x : S) (s : Finset S') |
| 44 | + (A : Subalgebra R S) (hA₁ : (IsLocalization.finsetIntegerMultiple M s : Set S) ⊆ A) |
| 45 | + (hA₂ : M ≤ A.toSubmonoid) (hx : algebraMap S S' x ∈ Algebra.adjoin R (s : Set S')) : |
| 46 | + ∃ m : M, m • x ∈ A := by |
| 47 | + let g : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S' |
| 48 | + let y := IsLocalization.commonDenomOfFinset M s |
| 49 | + have hx₁ : (y : S) • (s : Set S') = g '' _ := |
| 50 | + (IsLocalization.finsetIntegerMultiple_image _ s).symm |
| 51 | + obtain ⟨n, hn⟩ := |
| 52 | + Algebra.pow_smul_mem_of_smul_subset_of_mem_adjoin (y : S) (s : Set S') (A.map g) |
| 53 | + (by rw [hx₁]; exact Set.image_mono hA₁) hx (Set.mem_image_of_mem _ (hA₂ y.2)) |
| 54 | + obtain ⟨x', hx', hx''⟩ := hn n (le_of_eq rfl) |
| 55 | + rw [Algebra.smul_def, ← map_mul] at hx'' |
| 56 | + obtain ⟨a, ha₂⟩ := (IsLocalization.eq_iff_exists M S').mp hx'' |
| 57 | + use a * y ^ n |
| 58 | + convert A.mul_mem hx' (hA₂ a.prop) using 1 |
| 59 | + rw [Submonoid.smul_def, smul_eq_mul, Submonoid.coe_mul, SubmonoidClass.coe_pow, mul_assoc, ← ha₂, |
| 60 | + mul_comm] |
| 61 | + |
| 62 | +variable {S'} in |
| 63 | +open scoped Classical in |
| 64 | +/-- Let `S` be an `R`-algebra, `M` a submonoid of `R`, and `S' = M⁻¹S`. |
| 65 | +If the image of some `x : S` falls in the adjoin of some finite `s ⊆ S'` over `R`, |
| 66 | +then there exists some `m : M` such that `m • x` falls in the |
| 67 | +adjoin of `IsLocalization.finsetIntegerMultiple _ s` over `R`. |
| 68 | +-/ |
| 69 | +theorem IsLocalization.lift_mem_adjoin_finsetIntegerMultiple [Algebra R S'] |
| 70 | + [IsScalarTower R S S'] [IsLocalization (M.map (algebraMap R S)) S'] (x : S) (s : Finset S') |
| 71 | + (hx : algebraMap S S' x ∈ Algebra.adjoin R (s : Set S')) : |
| 72 | + ∃ m : M, m • x ∈ |
| 73 | + Algebra.adjoin R |
| 74 | + (IsLocalization.finsetIntegerMultiple (M.map (algebraMap R S)) s : Set S) := by |
| 75 | + obtain ⟨⟨_, a, ha, rfl⟩, e⟩ := |
| 76 | + IsLocalization.exists_smul_mem_of_mem_adjoin (M.map (algebraMap R S)) x s (Algebra.adjoin R _) |
| 77 | + Algebra.subset_adjoin (by rintro _ ⟨a, _, rfl⟩; exact Subalgebra.algebraMap_mem _ a) hx |
| 78 | + refine ⟨⟨a, ha⟩, ?_⟩ |
| 79 | + simpa only [Submonoid.smul_def, algebraMap_smul] using e |
| 80 | + |
| 81 | +/-- Finite-type can be checked on a standard covering of the target. -/ |
| 82 | +lemma Algebra.FiniteType.of_span_eq_top_target (s : Set S) (hs : Ideal.span (s : Set S) = ⊤) |
| 83 | + (h : ∀ x ∈ s, Algebra.FiniteType R (Localization.Away x)) : |
| 84 | + Algebra.FiniteType R S := by |
| 85 | + obtain ⟨s, h₁, hs⟩ := (Ideal.span_eq_top_iff_finite s).mp hs |
| 86 | + replace h (i : s) : Algebra.FiniteType R (Localization.Away i.val) := h i (h₁ i.property) |
| 87 | + classical |
| 88 | + -- Suppose `s : Finset S` spans `S`, and each `Sᵣ` is finitely generated as an `R`-algebra. |
| 89 | + -- Say `t r : Finset Sᵣ` generates `Sᵣ`. By assumption, we may find `lᵢ` such that |
| 90 | + -- `∑ lᵢ * sᵢ = 1`. I claim that all `s` and `l` and the numerators of `t` and generates `S`. |
| 91 | + replace h := fun r => (h r).1 |
| 92 | + choose t ht using h |
| 93 | + obtain ⟨l, hl⟩ := |
| 94 | + (Finsupp.mem_span_iff_linearCombination S (s : Set S) 1).mp |
| 95 | + (show (1 : S) ∈ Ideal.span (s : Set S) by rw [hs]; trivial) |
| 96 | + let sf := fun x : s => IsLocalization.finsetIntegerMultiple (Submonoid.powers (x : S)) (t x) |
| 97 | + use s.attach.biUnion sf ∪ s ∪ l.support.image l |
| 98 | + rw [_root_.eq_top_iff] |
| 99 | + -- We need to show that every `x` falls in the subalgebra generated by those elements. |
| 100 | + -- Since all `s` and `l` are in the subalgebra, it suffices to check that `sᵢ ^ nᵢ • x` falls in |
| 101 | + -- the algebra for each `sᵢ` and some `nᵢ`. |
| 102 | + rintro x - |
| 103 | + apply Subalgebra.mem_of_span_eq_top_of_smul_pow_mem _ (s : Set S) l hl _ _ x _ |
| 104 | + · intro x hx |
| 105 | + apply Algebra.subset_adjoin |
| 106 | + rw [Finset.coe_union, Finset.coe_union] |
| 107 | + exact Or.inl (Or.inr hx) |
| 108 | + · intro i |
| 109 | + by_cases h : l i = 0; · rw [h]; exact zero_mem _ |
| 110 | + apply Algebra.subset_adjoin |
| 111 | + rw [Finset.coe_union, Finset.coe_image] |
| 112 | + exact Or.inr (Set.mem_image_of_mem _ (Finsupp.mem_support_iff.mpr h)) |
| 113 | + · intro r |
| 114 | + rw [Finset.coe_union, Finset.coe_union, Finset.coe_biUnion] |
| 115 | + -- Since all `sᵢ` and numerators of `t r` are in the algebra, it suffices to show that the |
| 116 | + -- image of `x` in `Sᵣ` falls in the `R`-adjoin of `t r`, which is of course true. |
| 117 | + -- Porting note: The following `obtain` fails because Lean wants to know right away what the |
| 118 | + -- placeholders are, so we need to provide a little more guidance |
| 119 | + -- obtain ⟨⟨_, n₂, rfl⟩, hn₂⟩ := IsLocalization.exists_smul_mem_of_mem_adjoin |
| 120 | + -- (Submonoid.powers (r : S)) x (t r) (Algebra.adjoin R _) _ _ _ |
| 121 | + rw [show ∀ A : Set S, (∃ n, (r : S) ^ n • x ∈ Algebra.adjoin R A) ↔ |
| 122 | + (∃ m : (Submonoid.powers (r : S)), (m : S) • x ∈ Algebra.adjoin R A) by |
| 123 | + { exact fun _ => by simp [Submonoid.mem_powers_iff] }] |
| 124 | + refine IsLocalization.exists_smul_mem_of_mem_adjoin |
| 125 | + (Submonoid.powers (r : S)) x (t r) (Algebra.adjoin R _) ?_ ?_ ?_ |
| 126 | + · intro x hx |
| 127 | + apply Algebra.subset_adjoin |
| 128 | + exact Or.inl (Or.inl ⟨_, ⟨r, rfl⟩, _, ⟨s.mem_attach r, rfl⟩, hx⟩) |
| 129 | + · rw [Submonoid.powers_eq_closure, Submonoid.closure_le, Set.singleton_subset_iff] |
| 130 | + apply Algebra.subset_adjoin |
| 131 | + exact Or.inl (Or.inr r.2) |
| 132 | + · rw [ht]; trivial |
| 133 | + |
| 134 | +attribute [local instance] Algebra.TensorProduct.rightAlgebra in |
| 135 | +lemma Algebra.FiniteType.of_span_eq_top_source (s : Set R) (hs : Ideal.span (s : Set R) = ⊤) |
| 136 | + (h : ∀ i ∈ s, Algebra.FiniteType (Localization.Away i) (Localization.Away i ⊗[R] S)) : |
| 137 | + Algebra.FiniteType R S := by |
| 138 | + obtain ⟨s, h₁, hs⟩ := (Ideal.span_eq_top_iff_finite s).mp hs |
| 139 | + replace h (i : s) := h i.val (h₁ i.property) |
| 140 | + classical |
| 141 | + letI := fun r : s => (Localization.awayMap (algebraMap R S) r).toAlgebra |
| 142 | + set f := algebraMap R S |
| 143 | + constructor |
| 144 | + replace H := fun r => (h r).1 |
| 145 | + choose s₁ s₂ using H |
| 146 | + let sf := fun x : s => IsLocalization.finsetIntegerMultiple (Submonoid.powers (f x)) (s₁ x) |
| 147 | + use s.attach.biUnion sf |
| 148 | + convert (Algebra.adjoin_attach_biUnion (R := R) sf).trans _ |
| 149 | + rw [eq_top_iff] |
| 150 | + rintro x - |
| 151 | + apply (⨆ x : s, Algebra.adjoin R (sf x : Set S)).toSubmodule.mem_of_span_eq_top_of_smul_pow_mem |
| 152 | + _ hs _ _ |
| 153 | + intro r |
| 154 | + obtain ⟨⟨_, n₁, rfl⟩, hn₁⟩ := |
| 155 | + multiple_mem_adjoin_of_mem_localization_adjoin (Submonoid.powers (r : R)) |
| 156 | + (Localization.Away (r : R)) (s₁ r : Set (Localization.Away r.val ⊗[R] S)) |
| 157 | + (algebraMap S _ x) (by rw [s₂ r]; trivial) |
| 158 | + rw [Submonoid.smul_def, Algebra.smul_def, IsScalarTower.algebraMap_apply R S, ← map_mul] at hn₁ |
| 159 | + obtain ⟨⟨_, n₂, rfl⟩, hn₂⟩ := |
| 160 | + IsLocalization.lift_mem_adjoin_finsetIntegerMultiple (Submonoid.powers (r : R)) _ (s₁ r) hn₁ |
| 161 | + rw [Submonoid.smul_def, ← Algebra.smul_def, smul_smul, ← pow_add] at hn₂ |
| 162 | + simp_rw [Submonoid.map_powers] at hn₂ |
| 163 | + use n₂ + n₁ |
| 164 | + exact le_iSup (fun x : s => Algebra.adjoin R (sf x : Set S)) r hn₂ |
| 165 | + |
| 166 | +end Algebra |
0 commit comments