|
| 1 | +/- |
| 2 | +Copyright (c) 2026 Christian Merten. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Christian Merten |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.RingTheory.FinitePresentation |
| 9 | +public import Mathlib.RingTheory.FiniteStability |
| 10 | +public import Mathlib.RingTheory.RingHom.FinitePresentation |
| 11 | +public import Mathlib.RingTheory.RingHom.FaithfullyFlat |
| 12 | + |
| 13 | +/-! |
| 14 | +# Descent of finiteness conditions under faithfully flat maps |
| 15 | +
|
| 16 | +In this file we show that |
| 17 | +
|
| 18 | +- `Algebra.FiniteType`: |
| 19 | +- `Algebra.FinitePresentation`: |
| 20 | +- `Module.Finite`: |
| 21 | +
|
| 22 | +descend along faithfully flat base change. |
| 23 | +-/ |
| 24 | + |
| 25 | +@[expose] public section |
| 26 | + |
| 27 | +universe u v w |
| 28 | + |
| 29 | +open TensorProduct |
| 30 | + |
| 31 | +variable {R S : Type*} [CommRing R] [CommRing S] [Algebra R S] |
| 32 | + (T : Type*) [CommRing T] [Algebra R T] |
| 33 | + |
| 34 | +lemma Module.Finite.of_finite_tensorProduct_of_faithfullyFlat {M : Type*} [AddCommGroup M] |
| 35 | + [Module R M] [Module.FaithfullyFlat R T] [Module.Finite T (T ⊗[R] M)] : |
| 36 | + Module.Finite R M := by |
| 37 | + classical |
| 38 | + obtain ⟨n, s, hs⟩ := Module.Finite.exists_fin (R := T) (M := T ⊗[R] M) |
| 39 | + choose k t m h using fun i : Fin n ↦ TensorProduct.exists_sum_tmul_eq (s i) |
| 40 | + let f₀ : ((Σ i, Fin (k i)) → R) →ₗ[R] M := (Pi.basisFun R _).constr R fun ⟨i, j⟩ ↦ m i j |
| 41 | + apply of_surjective f₀ |
| 42 | + have : Function.Surjective (AlgebraTensorModule.lTensor T T f₀) := by |
| 43 | + rw [← LinearMap.range_eq_top, eq_top_iff, ← hs, Submodule.span_le, Set.range_subset_iff] |
| 44 | + intro i |
| 45 | + use ∑ (j : Fin (k i)), t i j ⊗ₜ Pi.basisFun R _ ⟨i, j⟩ |
| 46 | + simp [f₀, -Pi.basisFun_equivFun, -Pi.basisFun_apply, h i] |
| 47 | + rwa [← Module.FaithfullyFlat.lTensor_surjective_iff_surjective _ T] |
| 48 | + |
| 49 | +lemma Ideal.FG.of_FG_map_of_faithfullyFlat [Module.FaithfullyFlat R S] {I : Ideal R} |
| 50 | + (hI : (I.map (algebraMap R S)).FG) : I.FG := by |
| 51 | + change Submodule.FG I |
| 52 | + rw [← Module.Finite.iff_fg] |
| 53 | + let f : S ⊗[R] I →ₗ[S] S := |
| 54 | + (AlgebraTensorModule.rid _ _ _).toLinearMap ∘ₗ AlgebraTensorModule.lTensor S S I.subtype |
| 55 | + have hf : Function.Injective f := by simp [f] |
| 56 | + have : I.map (algebraMap R S) = LinearMap.range f := by |
| 57 | + refine le_antisymm ?_ ?_ |
| 58 | + · rw [Ideal.map_le_iff_le_comap] |
| 59 | + intro x hx |
| 60 | + use 1 ⊗ₜ ⟨x, hx⟩ |
| 61 | + simp [f, Algebra.smul_def] |
| 62 | + · rintro - ⟨x, rfl⟩ |
| 63 | + induction x with |
| 64 | + | zero => simp |
| 65 | + | add _ _ _ _ => simp_all [Ideal.add_mem] |
| 66 | + | tmul s x => |
| 67 | + have : f (s ⊗ₜ[R] x) = s • f (1 ⊗ₜ x) := by simp [f] |
| 68 | + rw [this] |
| 69 | + apply Ideal.mul_mem_left |
| 70 | + simpa [f, Algebra.smul_def] using Ideal.mem_map_of_mem _ x.2 |
| 71 | + let e : S ⊗[R] I ≃ₗ[S] I.map (algebraMap R S) := .ofInjective _ hf ≪≫ₗ .ofEq _ _ this.symm |
| 72 | + have : Module.Finite S (S ⊗[R] ↥I) := by |
| 73 | + rwa [Module.Finite.equiv_iff e, Module.Finite.iff_fg] |
| 74 | + apply Module.Finite.of_finite_tensorProduct_of_faithfullyFlat S |
| 75 | + |
| 76 | +namespace Algebra |
| 77 | + |
| 78 | +/-- If `T ⊗[R] S` is of finite type over `T` and `T` is `R`-faithfully flat, |
| 79 | +then `S` is of finite type over `R` -/ |
| 80 | +lemma FiniteType.of_finiteType_tensorProduct_of_faithfullyFlat |
| 81 | + [Module.FaithfullyFlat R T] [Algebra.FiniteType T (T ⊗[R] S)] : |
| 82 | + Algebra.FiniteType R S := by |
| 83 | + obtain ⟨s, hs⟩ := Algebra.FiniteType.out (R := T) (A := T ⊗[R] S) |
| 84 | + have (x : s) := TensorProduct.exists_sum_tmul_eq x.1 |
| 85 | + choose k t m h using this |
| 86 | + let f : MvPolynomial (Σ x : s, Fin (k x)) R →ₐ[R] S := MvPolynomial.aeval (fun ⟨x, i⟩ ↦ m x i) |
| 87 | + apply Algebra.FiniteType.of_surjective f |
| 88 | + have hf : Function.Surjective (Algebra.TensorProduct.map (.id T T) f) := by |
| 89 | + rw [← AlgHom.range_eq_top, _root_.eq_top_iff, ← hs, adjoin_le_iff] |
| 90 | + intro x hx |
| 91 | + let i : s := ⟨x, hx⟩ |
| 92 | + use ∑ (j : Fin (k i)), t i j ⊗ₜ MvPolynomial.X ⟨i, j⟩ |
| 93 | + simp [f, ← h, i] |
| 94 | + exact (Module.FaithfullyFlat.lTensor_surjective_iff_surjective _ T _).mp hf |
| 95 | + |
| 96 | +attribute [local instance] Algebra.TensorProduct.rightAlgebra in |
| 97 | +/-- If `T ⊗[R] S` is of finite presentation over `T` and `T` is `R`-faithfully flat, |
| 98 | +then `S` is of finite presentation over `R` -/ |
| 99 | +lemma FinitePresentation.of_finitePresentation_tensorProduct_of_faithfullyFlat |
| 100 | + [Module.FaithfullyFlat R T] [Algebra.FinitePresentation T (T ⊗[R] S)] : |
| 101 | + Algebra.FinitePresentation R S := by |
| 102 | + have : Algebra.FiniteType R S := .of_finiteType_tensorProduct_of_faithfullyFlat T |
| 103 | + rw [Algebra.FiniteType.iff_quotient_mvPolynomial''] at this |
| 104 | + obtain ⟨n, f, hf⟩ := this |
| 105 | + have : Module.FaithfullyFlat (MvPolynomial (Fin n) R) (T ⊗[R] MvPolynomial (Fin n) R) := |
| 106 | + .of_linearEquiv _ _ (Algebra.TensorProduct.commRight _ _ _).symm.toLinearEquiv |
| 107 | + let fT := Algebra.TensorProduct.map (.id T T) f |
| 108 | + refine .of_surjective hf (.of_FG_map_of_faithfullyFlat (S := T ⊗[R] MvPolynomial (Fin n) R) ?_) |
| 109 | + have : (RingHom.ker f.toRingHom).map |
| 110 | + (algebraMap (MvPolynomial (Fin n) R) (T ⊗[R] MvPolynomial (Fin n) R)) = RingHom.ker fT := |
| 111 | + (Algebra.TensorProduct.lTensor_ker f hf).symm |
| 112 | + rw [this] |
| 113 | + apply ker_fG_of_surjective |
| 114 | + exact FiniteType.baseChangeAux_surj T hf |
| 115 | + |
| 116 | +end Algebra |
| 117 | + |
| 118 | +namespace RingHom |
| 119 | + |
| 120 | +lemma FiniteType.codescendsAlong_faithfullyFlat : |
| 121 | + CodescendsAlong FiniteType FaithfullyFlat := by |
| 122 | + refine .mk _ finiteType_respectsIso fun R S T _ _ _ _ _ h h' ↦ ?_ |
| 123 | + rw [finiteType_algebraMap] at h' ⊢ |
| 124 | + rw [faithfullyFlat_algebraMap_iff] at h |
| 125 | + exact .of_finiteType_tensorProduct_of_faithfullyFlat S |
| 126 | + |
| 127 | +lemma FinitePresentation.codescendsAlong_faithfullyFlat : |
| 128 | + CodescendsAlong FinitePresentation FaithfullyFlat := by |
| 129 | + refine .mk _ finitePresentation_respectsIso fun R S T _ _ _ _ _ h h' ↦ ?_ |
| 130 | + rw [finitePresentation_algebraMap] at h' ⊢ |
| 131 | + rw [faithfullyFlat_algebraMap_iff] at h |
| 132 | + exact .of_finitePresentation_tensorProduct_of_faithfullyFlat S |
| 133 | + |
| 134 | +lemma Finite.codescendsAlong_faithfullyFlat : |
| 135 | + CodescendsAlong Finite FaithfullyFlat := by |
| 136 | + refine .mk _ finite_respectsIso fun R S T _ _ _ _ _ h h' ↦ ?_ |
| 137 | + rw [finite_algebraMap] at h' ⊢ |
| 138 | + rw [faithfullyFlat_algebraMap_iff] at h |
| 139 | + exact .of_finite_tensorProduct_of_faithfullyFlat S |
| 140 | + |
| 141 | +end RingHom |
0 commit comments