Riemann hypothesis: the Lean proof, cleaned up together
The 2026 Lean proof of the Riemann hypothesis and GRH, machine-checked by others, not refereed, no word from Clay; cleaned up together: more readable, faster to build, the theorems unchanged

| 1 | module |
| 2 | |
| 3 | import TauCeti.LinearAlgebra.Matrix.GeneralLinearGroup.NonzeroVectors |
| 4 | import TauCeti.LinearAlgebra.TensorProduct.Separation |
| 5 | import Mathlib.Algebra.Module.StablyFree.Basic |
| 6 | import Mathlib.LinearAlgebra.Matrix.Swap |
| 7 | public import Lib.Speed |
| 8 | |
| 9 | /-! |
| 10 | # Chains of linear maps, tensor products of their data, and separation by forms |
| 11 | |
| 12 | The file composes initial segments of a chain of linear maps and computes the index of the |
| 13 | stabiliser of a nonzero vector in a finite general linear group. It extends a chain of bilinear |
| 14 | steps from pure data to arbitrary tensors of the data. |
| 15 | |
| 16 | ## Main definitions and results |
| 17 | |
| 18 | * `New.index_stabilizer_GL_vector`: over a field `F`, the stabiliser in `GL n F` of a nonzero |
| 19 | vector has index `|F| ^ |n| - 1`, by orbit-stabiliser. |
| 20 | * `New.TensorChain`: the tensor product `S (j-1) ⊗ (⋯ ⊗ (S 0 ⊗ ℂ))`, which is `ℂ` for `j = 0`. |
| 21 | * `New.TensorChain.lift`, `New.TensorChain.lift_pure`: for `x` in `M 0`, the linear map to `M j` |
| 22 | that sends a pure tensor to the composite (`New.compUpTo`) of the maps `b i (f i)`, `i < j`, |
| 23 | applied to `x`. |
| 24 | * `New.TensorChain.ofPairs`, `New.TensorChain.lift_ofPairs`: data of double steps regrouped into |
| 25 | single factors. |
| 26 | * `New.tensor_eq_zero_of_separating`: over a principal ideal domain, if the forms `f i` on `U` have |
| 27 | no common zero but `0` and `V` is torsion-free, then the maps `U ⊗ V → V`, |
| 28 | `u ⊗ v ↦ f i u • v`, have no common zero but `0`. |
| 29 | -/ |
| 30 | |
| 31 | @[expose] public section |
| 32 | |
| 33 | noncomputable section |
| 34 | |
| 35 | /-! |
| 36 | ## Composites of chains and the stabiliser of a vector in a finite GL |
| 37 | |
| 38 | * `New.exists_GL_smul_single`: a vector with a unit entry is a column of an invertible matrix. |
| 39 | -/ |
| 40 | |
| 41 | section CompositionChain |
| 42 | |
| 43 | variable {R n : Type _} [CommRing R] [Fintype n] [DecidableEq n] |
| 44 | |
| 45 | /-- For linear maps `L i : M i → M (i + 1)`, the composite `L (j-1) ∘ ⋯ ∘ L 0 : M 0 → M j`; the |
| 46 | identity for `j = 0`. -/ |
| 47 | def New.compUpTo {M : ℕ → Type _} [∀ j : ℕ, AddCommGroup (M j)] [∀ j : ℕ, Module R (M j)] |
| 48 | (L : ∀ j : ℕ, M j →ₗ[R] M (j + 1)) : ∀ j : ℕ, M 0 →ₗ[R] M j |
| 49 | | 0 => LinearMap.id |
| 50 | | j + 1 => L j ∘ₗ compUpTo L j |
| 51 | |
| 52 | section |
| 53 | |
| 54 | variable {M : ℕ → Type*} [∀ j : ℕ, AddCommGroup (M j)] [∀ j : ℕ, Module R (M j)] |
| 55 | (L : ∀ j : ℕ, M j →ₗ[R] M (j + 1)) |
| 56 | |
| 57 | lemma New.compUpTo_zero_apply (x : M 0) : compUpTo L 0 x = x := |
| 58 | rfl |
| 59 | |
| 60 | lemma New.compUpTo_succ_apply (j : ℕ) (x : M 0) : compUpTo L (j + 1) x = L j (compUpTo L j x) := |
| 61 | rfl |
| 62 | |
| 63 | end |
| 64 | |
| 65 | open Matrix MulAction |
| 66 | |
| 67 | /-- Over a commutative ring, a vector with a unit entry is, for any `i`, the `i`-th column |
| 68 | `g • Pi.single i 1` of an invertible matrix `g`. -/ |
| 69 | lemma New.exists_GL_smul_single {v : n → R} (hv : ∃ j : n, IsUnit (v j)) (i : n) : |
| 70 | ∃ g : GL n R, g • Pi.single i 1 = v := by |
| 71 | -- Put `v` in the `j`-th column of the identity (determinant `v j`), then swap columns `i` and |
| 72 | -- `j`. |
| 73 | obtain ⟨j, hj⟩ := hv |
| 74 | have h_det : IsUnit (updateCol 1 j v).det := by simpa [← cramer_apply] using hj |
| 75 | exact ⟨.mk'' _ h_det * .swap R j i, funext fun _ ↦ by simp [Units.smul_def]⟩ |
| 76 | |
| 77 | /-- Over a field `F`, the stabiliser in `GL n F` of a nonzero vector has index |
| 78 | `Nat.card F ^ Fintype.card n - 1`. For finite `F`, this counts the nonzero vectors. -/ |
| 79 | lemma New.index_stabilizer_GL_vector {F : Type*} [Field F] {u : n → F} (hu : u ≠ 0) : |
| 80 | (stabilizer (GL n F) u).index = Nat.card F ^ Fintype.card n - 1 := by |
| 81 | rw [← SubMulAction.stabilizer_of_subMul |
| 82 | (⟨u, TauCeti.mem_nonzeroVectors.2 hu⟩ : TauCeti.nonzeroVectors n F), |
| 83 | index_stabilizer_of_transitive, TauCeti.natCard_nonzeroVectors, |
| 84 | Nat.card_eq_fintype_card (α := n)] |
| 85 | |
| 86 | end CompositionChain |
| 87 | |
| 88 | /-! |
| 89 | ## Iterated tensor products of data and the multilinear chain of maps |
| 90 | |
| 91 | A chain of bilinear steps `b j : S j → M j → M (j + 1)` is multilinear in its data, so it factors |
| 92 | through the tensor product of the spaces `S j`, and so extends from pure data to arbitrary tensors. |
| 93 | -/ |
| 94 | |
| 95 | section LiftInPairs |
| 96 | |
| 97 | open TensorProduct LinearMap |
| 98 | |
| 99 | namespace New.TensorChain |
| 100 | |
| 101 | variable {R : Type*} [CommRing R] {S M : ℕ → Type*} |
| 102 | [∀ j : ℕ, AddCommGroup (S j)] [∀ j : ℕ, Module R (S j)] |
| 103 | [∀ j : ℕ, AddCommGroup (M j)] [∀ j : ℕ, Module R (M j)] |
| 104 | (b : ∀ j : ℕ, S j →ₗ[R] M j →ₗ[R] M (j + 1)) |
| 105 | |
| 106 | /-- Two steps at once: the linear map from `S (2 * i) ⊗ S (2 * i + 1)` to |
| 107 | `Hom (M (2 * i), M (2 * i + 2))` sending `s ⊗ s'` to `b (2 * i + 1) s' ∘ b (2 * i) s`. -/ |
| 108 | def liftInPairs (i : ℕ) : |
| 109 | S (2 * i) ⊗[R] S (2 * i + 1) →ₗ[R] M (2 * i) →ₗ[R] M (2 * (i + 1)) := |
| 110 | TensorProduct.lift ((llcomp R (M (2 * i)) (M (2 * i + 1)) (M (2 * i + 1 + 1))).compl₁₂ |
| 111 | (b (2 * i + 1)) (b (2 * i))).flip |
| 112 | |
| 113 | /-- The double step with datum `s ⊗ s'` is the step `b (2 * i) s` followed by |
| 114 | `b (2 * i + 1) s'`. -/ |
| 115 | lemma liftInPairs_tmul (i : ℕ) (s : S (2 * i)) (s' : S (2 * i + 1)) (y : M (2 * i)) : |
| 116 | liftInPairs b i (s ⊗ₜ s') y = b (2 * i + 1) s' (b (2 * i) s y) := |
| 117 | rfl |
| 118 | |
| 119 | /-- Let `b j : S j →ₗ M j →ₗ M (j + 1)` be bilinear steps and `f j : S j`. Composing the double |
| 120 | steps `liftInPairs b i (f (2 * i) ⊗ₜ f (2 * i + 1))` for `i < p` gives the same value at `x` as |
| 121 | composing the single steps `b j (f j)` for `j < 2 * p`. -/ |
| 122 | lemma compUpTo_liftInPairs_tmul (f : ∀ j : ℕ, S j) (p : ℕ) (x : M 0) : |
| 123 | compUpTo (M := fun i : ℕ ↦ M (2 * i)) |
| 124 | (fun i : ℕ ↦ liftInPairs b i (f (2 * i) ⊗ₜ[R] f (2 * i + 1))) p x = |
| 125 | compUpTo (fun j : ℕ ↦ b j (f j)) (2 * p) x := by |
| 126 | induction p with |
| 127 | | zero => rfl |
| 128 | | succ p ih => |
| 129 | -- The right side has `2 * (p + 1) = 2 * p + 1 + 1` steps. |
| 130 | rw [compUpTo_succ_apply, ih, liftInPairs_tmul] |
| 131 | rfl |
| 132 | |
| 133 | end New.TensorChain |
| 134 | |
| 135 | end LiftInPairs |
| 136 | |
| 137 | section TensorChain |
| 138 | |
| 139 | open TensorProduct LinearMap Finset |
| 140 | |
| 141 | variable (S : ℕ → Type) |
| 142 | {M : ℕ → Type*} [∀ j : ℕ, AddCommGroup (S j)] [∀ j : ℕ, Module ℂ (S j)] |
| 143 | [∀ j : ℕ, AddCommGroup (M j)] [∀ j : ℕ, Module ℂ (M j)] |
| 144 | (b : ∀ j : ℕ, S j →ₗ[ℂ] M j →ₗ[ℂ] M (j + 1)) (t : ∀ j : ℕ, S j →ₗ[ℂ] S j) (f : ∀ j : ℕ, S j) |
| 145 | |
| 146 | /-- The complex tensor product `S (j-1) ⊗ (⋯ ⊗ (S 0 ⊗ ℂ))`, equal to `ℂ` for `j = 0`. Below it is |
| 147 | written `S (j-1) ⊗ ⋯ ⊗ S 0`, the last factor `ℂ` (and `1` in pure tensors) being left out. -/ |
| 148 | def New.TensorChain : ℕ → ModuleCat ℂ |
| 149 | | 0 => ModuleCat.of ℂ ℂ |
| 150 | | j + 1 => ModuleCat.of ℂ (S j ⊗[ℂ] TensorChain j) |
| 151 | |
| 152 | namespace New.TensorChain |
| 153 | |
| 154 | variable {S} |
| 155 | |
| 156 | /-- For a family of vectors `f i` in `S i`, the pure tensor `f (j-1) ⊗ ⋯ ⊗ f 0` in |
| 157 | `S (j-1) ⊗ ⋯ ⊗ S 0`; it is `1 : ℂ` for `j = 0`. -/ |
| 158 | def pure (j : ℕ) : TensorChain S j := |
| 159 | compUpTo (M := fun i : ℕ ↦ TensorChain S i) |
| 160 | (fun i : ℕ ↦ TensorProduct.mk ℂ (S i) (TensorChain S i) (f i)) j (1 : ℂ) |
| 161 | |
| 162 | lemma pure_zero : pure f 0 = (1 : ℂ) := |
| 163 | rfl |
| 164 | |
| 165 | lemma pure_succ (j : ℕ) : pure f (j + 1) = f j ⊗ₜ[ℂ] pure f j := |
| 166 | rfl |
| 167 | |
| 168 | /-- For bilinear maps `b i : S i → M i → M (i + 1)` and `x` in `M 0`, the linear map from |
| 169 | `S (j-1) ⊗ ⋯ ⊗ S 0` to `M j` that sends `f (j-1) ⊗ ⋯ ⊗ f 0` to |
| 170 | `(b (j-1) (f (j-1)) ∘ ⋯ ∘ b 0 (f 0)) x`. -/ |
| 171 | def lift (x : M 0) : ∀ j : ℕ, TensorChain S j →ₗ[ℂ] M j |
| 172 | | 0 => toSpanSingleton ℂ (M 0) x |
| 173 | | j + 1 => TensorProduct.lift ((b j).compl₂ (lift x j)) |
| 174 | |
| 175 | lemma lift_zero_apply (x : M 0) (c : ℂ) : lift b x 0 c = c • x := |
| 176 | rfl |
| 177 | |
| 178 | /-- On `s ⊗ z`, the lift of length `j + 1` applies the step `b j s` to the lift of `z`. -/ |
| 179 | lemma lift_succ_tmul (x : M 0) (j : ℕ) (s : S j) (z : TensorChain S j) : |
| 180 | lift b x (j + 1) (s ⊗ₜ[ℂ] z) = b j s (lift b x j z) := |
| 181 | rfl |
| 182 | |
| 183 | /-- On the pure tensor `f (j-1) ⊗ ⋯ ⊗ f 0`, the map `lift b x j` takes the value |
| 184 | `(b (j-1) (f (j-1)) ∘ ⋯ ∘ b 0 (f 0)) x`, the composite `compUpTo` of the steps applied to `x`. -/ |
| 185 | @[simp] lemma lift_pure (x : M 0) (j : ℕ) : |
| 186 | lift b x j (pure f j) = compUpTo (fun i : ℕ ↦ b i (f i)) j x := by |
| 187 | induction j with |
| 188 | | zero => rw [pure_zero, lift_zero_apply, one_smul, compUpTo_zero_apply] |
| 189 | | succ j ih => rw [pure_succ, lift_succ_tmul, ih, compUpTo_succ_apply] |
| 190 | |
| 191 | /-- The lift is additive in the starting vector: at `x - y` it is the difference of the lifts at `x` |
| 192 | and at `y`. -/ |
| 193 | lemma lift_sub (x y : M 0) (m : ℕ) (s : TensorChain S m) : |
| 194 | lift b (x - y) m s = lift b x m s - lift b y m s := by |
| 195 | induction m with |
| 196 | | zero => exact smul_sub (show ℂ from s) x y |
| 197 | | succ m ih => |
| 198 | -- Both sides are linear in `s`, so it is enough to compare them on `u ⊗ r`. |
| 199 | refine LinearMap.congr_fun (g := lift b x (m + 1) - lift b y (m + 1)) |
| 200 | (TensorProduct.ext' (M := S m) (N := TensorChain S m) fun u r ↦ ?_) s |
| 201 | change b m u (lift b (x - y) m r) = b m u (lift b x m r) - b m u (lift b y m r) |
| 202 | rw [ih r, map_sub] |
| 203 | |
| 204 | /-- For endomorphisms `t i` of `S i`, the endomorphism `t (j-1) ⊗ ⋯ ⊗ t 0` of |
| 205 | `S (j-1) ⊗ ⋯ ⊗ S 0`; the identity of `ℂ` for `j = 0`. -/ |
| 206 | def map : (j : ℕ) → TensorChain S j →ₗ[ℂ] TensorChain S j := |
| 207 | lift (M := fun i : ℕ ↦ TensorChain S i) |
| 208 | (fun i : ℕ ↦ TensorProduct.mk ℂ (S i) (TensorChain S i) ∘ₗ t i) (1 : ℂ) |
| 209 | |
| 210 | /-- The map `t (j-1) ⊗ ⋯ ⊗ t 0` sends the pure tensor `f (j-1) ⊗ ⋯ ⊗ f 0` to the pure tensor |
| 211 | with factors `t i (f i)`. -/ |
| 212 | @[simp] lemma map_pure (j : ℕ) : map t j (pure f j) = pure (fun i : ℕ ↦ t i (f i)) j := |
| 213 | lift_pure (M := fun i : ℕ ↦ TensorChain S i) |
| 214 | (fun i : ℕ ↦ TensorProduct.mk ℂ (S i) (TensorChain S i) ∘ₗ t i) f (1 : ℂ) j |
| 215 | |
| 216 | /-- Scaling the factor `f j` by `c j` for each `j < m` scales the pure tensor |
| 217 | `f (m-1) ⊗ ⋯ ⊗ f 0` by the product of the `c j`. -/ |
| 218 | lemma pure_smul {g : ∀ j : ℕ, S j} (c : ℕ → ℂ) (m : ℕ) (hg : ∀ j : ℕ, j < m → g j = c j • f j) : |
| 219 | pure g m = (∏ j ∈ range m, c j) • pure f m := by |
| 220 | induction m with |
| 221 | | zero => rw [prod_range_zero, one_smul, pure_zero, pure_zero] |
| 222 | | succ m ih => |
| 223 | simp only [pure_succ, hg m m.lt_succ_self, ih fun j hj ↦ hg j (hj.trans m.lt_succ_self), |
| 224 | prod_range_succ_comm] |
| 225 | exact smul_tmul_smul (c m) (∏ j ∈ range m, c j) (f m) (pure f m) |
| 226 | |
| 227 | /-- The pure tensor `g (m-1) ⊗ ⋯ ⊗ g 0` depends only on the factors of index less than `m`. -/ |
| 228 | @[congr] lemma pure_congr {g h : ∀ j : ℕ, S j} {m : ℕ} (hgh : ∀ j : ℕ, j < m → g j = h j) : |
| 229 | pure g m = pure h m := by |
| 230 | simpa using pure_smul h (g := g) 1 m (by simpa using hgh) |
| 231 | |
| 232 | /-- Multilinearity: the pure tensor of the finite sums `∑ a, g j a`, `j < n`, is the sum over the |
| 233 | tuples of indices `y` of the pure tensors of the terms `g j (y j)`. Here `F y` is any family with |
| 234 | `F y j = g j (y j)` for `j < n`. -/ |
| 235 | lemma pure_sum {Y : ℕ → Type*} [∀ j : ℕ, Fintype (Y j)] (g : ∀ j : ℕ, Y j → S j) {n : ℕ} |
| 236 | (F : (∀ i : Fin n, Y i) → ∀ j : ℕ, S j) |
| 237 | (hF : ∀ (y : ∀ i : Fin n, Y i) (i : Fin n), F y i = g i (y i)) : |
| 238 | pure (fun j : ℕ ↦ ∑ a : Y j, g j a) n = ∑ y : (∀ i : Fin n, Y i), pure (F y) n := by |
| 239 | induction n with |
| 240 | | zero => rw [Fintype.sum_unique, pure_zero, pure_zero] |
| 241 | | succ n ih => |
| 242 | -- A tuple of length `n + 1` is a last index `a` and a tuple `z` of length `n`. |
| 243 | let e : Y n × (∀ i : Fin n, Y i) ≃ ∀ i : Fin (n + 1), Y i := Fin.snocEquiv fun i ↦ Y i |
| 244 | have h_last (a : Y n) (z : ∀ i : Fin n, Y i) : F (e (a, z)) n = g n a := by |
| 245 | simpa [e, Fin.snocEquiv] using hF (e (a, z)) (Fin.last n) |
| 246 | have h_init (a : Y n) : |
| 247 | pure (fun j : ℕ ↦ ∑ a' : Y j, g j a') n = ∑ z : (∀ i : Fin n, Y i), pure (F (e (a, z))) n := |
| 248 | ih _ fun z i ↦ by simpa [e, Fin.snocEquiv] using hF (e (a, z)) i.castSucc |
| 249 | rw [← e.sum_comp, Fintype.sum_prod_type, pure_succ, sum_tmul] |
| 250 | refine sum_congr rfl fun a _ ↦ ?_ |
| 251 | rw [h_init a, tmul_sum] |
| 252 | exact sum_congr rfl fun z _ ↦ by rw [pure_succ, h_last] |
| 253 | |
| 254 | /-- For data `τ i` in `S (2 * i) ⊗ S (2 * i + 1)` of `p` double steps, the tensor |
| 255 | `τ (p-1) ⊗ ⋯ ⊗ τ 0` regrouped into `2 * p` single factors. -/ |
| 256 | def ofPairs (τ : ∀ i : ℕ, S (2 * i) ⊗[ℂ] S (2 * i + 1)) (p : ℕ) : TensorChain S (2 * p) := |
| 257 | compUpTo (M := fun i : ℕ ↦ TensorChain S (2 * i)) |
| 258 | (fun i : ℕ ↦ liftInPairs (M := fun j : ℕ ↦ TensorChain S j) |
| 259 | (fun j : ℕ ↦ TensorProduct.mk ℂ (S j) (TensorChain S j)) i (τ i)) p (1 : ℂ) |
| 260 | |
| 261 | /-- The chain of `2 * p` steps with the regrouped tensor `ofPairs τ p` as data is the composite of |
| 262 | the `p` double steps with data `τ i`. -/ |
| 263 | lemma lift_ofPairs (τ : ∀ i : ℕ, S (2 * i) ⊗[ℂ] S (2 * i + 1)) (p : ℕ) (x : M 0) : |
| 264 | lift b x (2 * p) (ofPairs τ p) = |
| 265 | compUpTo (M := fun i : ℕ ↦ M (2 * i)) (fun i : ℕ ↦ liftInPairs b i (τ i)) p x := by |
| 266 | induction p with |
| 267 | | zero => exact one_smul ℂ x |
| 268 | | succ p ih => |
| 269 | have h_step (s : S (2 * p) ⊗[ℂ] S (2 * p + 1)) (r : TensorChain S (2 * p)) : |
| 270 | lift b x (2 * (p + 1)) (liftInPairs (M := fun j : ℕ ↦ TensorChain S j) |
| 271 | (fun j : ℕ ↦ TensorProduct.mk ℂ (S j) (TensorChain S j)) p s r) = |
| 272 | liftInPairs b p s (lift b x (2 * p) r) := by |
| 273 | induction s with |
| 274 | | tmul s s' => rfl |
| 275 | | add s s' hs hs' => simp [hs, hs'] |
| 276 | rw [compUpTo_succ_apply, ← ih] |
| 277 | exact h_step (τ p) (ofPairs τ p) |
| 278 | |
| 279 | /-- Acting by `t j` on each factor of the regrouped tensor `ofPairs τ p` is acting by |
| 280 | `t (2 * i) ⊗ t (2 * i + 1)` on each `τ i`. -/ |
| 281 | lemma map_ofPairs (τ : ∀ i : ℕ, S (2 * i) ⊗[ℂ] S (2 * i + 1)) (p : ℕ) : |
| 282 | map t (2 * p) (ofPairs τ p) = |
| 283 | ofPairs (fun i : ℕ ↦ TensorProduct.map (t (2 * i)) (t (2 * i + 1)) (τ i)) p := by |
| 284 | let mkChain (j : ℕ) : S j →ₗ[ℂ] TensorChain S j →ₗ[ℂ] TensorChain S (j + 1) := |
| 285 | TensorProduct.mk ℂ (S j) (TensorChain S j) |
| 286 | have h_pair (i : ℕ) : liftInPairs (fun j : ℕ ↦ mkChain j ∘ₗ t j) i = |
| 287 | liftInPairs mkChain i ∘ₗ TensorProduct.map (t (2 * i)) (t (2 * i + 1)) := |
| 288 | TensorProduct.ext' fun s s' ↦ rfl |
| 289 | refine (lift_ofPairs (fun j : ℕ ↦ mkChain j ∘ₗ t j) τ p (1 : ℂ)).trans ?_ |
| 290 | simp only [h_pair, comp_apply, ofPairs, mkChain] |
| 291 | |
| 292 | end New.TensorChain |
| 293 | |
| 294 | end TensorChain |
| 295 | |
| 296 | /-! ## Linear forms separating the points of a tensor product -/ |
| 297 | |
| 298 | section TensorSeparation |
| 299 | |
| 300 | open LinearMap TensorProduct Module |
| 301 | |
| 302 | variable {k U V W : Type*} [AddCommGroup U] [AddCommGroup V] |
| 303 | |
| 304 | /-- Let `R` be a principal ideal domain, `V` a torsion-free `R`-module and `f i` linear forms on |
| 305 | `U` whose only common zero is `0`. An element of `U ⊗ V` killed by all the maps |
| 306 | `u ⊗ v ↦ f i u • v` is `0`. -/ |
| 307 | lemma New.tensor_eq_zero_of_separating {R : Type*} {ι : Sort*} [CommRing R] [IsDomain R] |
| 308 | [IsPrincipalIdealRing R] [Module R U] [Module R V] [IsTorsionFree R V] {f : ι → Dual R U} |
| 309 | (hf : ∀ {a : U}, (∀ i : ι, f i a = 0) → a = 0) (Z : U ⊗[R] V) |
| 310 | (hZ : ∀ i : ι, lift (lsmul R V ∘ₗ f i) Z = 0) : |
| 311 | Z = 0 := by |
| 312 | -- `Z` comes from `U ⊗ S` for a finitely generated `S ≤ V`, which is free (hence projective). |
| 313 | obtain ⟨S, _, Z', rfl⟩ : |
| 314 | ∃ S : Submodule R V, Module.Finite R S ∧ ∃ Z' : U ⊗[R] S, lTensor U S.subtype Z' = Z := by |
| 315 | simpa using exists_finite_submodule_right_of_setFinite {Z} |
| 316 | rw [TauCeti.tensor_eq_zero_of_forall_rTensor_eq_zero (fun i : PLift ι ↦ f i.down) |
| 317 | (fun _ h ↦ hf fun i ↦ h ⟨i⟩) Z' fun ⟨i⟩ ↦ (TensorProduct.lid R S).injective <| |
| 318 | S.subtype_injective ?_, map_zero] |
| 319 | have h : S.subtype ∘ₗ (TensorProduct.lid R S).toLinearMap ∘ₗ (f i).rTensor S = |
| 320 | lift (lsmul R V ∘ₗ f i) ∘ₗ lTensor U S.subtype := TensorProduct.ext' fun _ _ ↦ rfl |
| 321 | rw [map_zero, map_zero] |
| 322 | exact (LinearMap.congr_fun h Z').trans (hZ i) |
| 323 | |
| 324 | end TensorSeparation |
| 325 | |
| 326 | end |