/-Copyright (c) 2026 Carles MarΓn. All rights reserved.Released under Apache 2.0 license as described in the file LICENSE.Authors: Carles MarΓn, Claude (AI assistant)-/module -- encaje: cota inferior del Teorema 2 (qp(P^{m-1} Γ P^3) β₯ β4m/3β) de la nota qp_bsr, en coordenadas.public import Mathlib.LinearAlgebra.Matrix.Rankpublic import Mathlib.LinearAlgebra.FiniteDimensional.Lemmaspublic import Mathlib.LinearAlgebra.Dimension.RankNullitypublic import Mathlib.Basic.Real.Basicpublic import Mathlib.Tactic.FinCasespublic import Mathlib.Tactic.Ring /-!# The PlΓΌcker quadric behind `qp(β^{m-1} Γ βΒ³) β₯ β4m/3β` This file formalizes the lower bound in Theorem 2 ofC. MarΓn, *Quadratic persistence of Segre varieties and a linear gap between biquadratic SOS rankand Zarankiewicz bounds* (2026), for points in general position, in coordinates. Let `A = β^m` (`Fin m β β`), `B = ββ΄` (`Fin 4 β β`), and let `a i β A`, `b i β B`, `i : Fin k`.Tensors in `A β B` are matrices `Matrix (Fin m) (Fin 4) β`, the simple tensor `a β b` being`Matrix.vecMulVec a b`. Linear maps `A β B` are matrices `Matrix (Fin 4) (Fin m) β`.Vectors of `βΒ²B` are written by their `2 Γ 2` minors `U p q` (`wedge u v p q = u p v q - u q v p`),and `pl` is the PlΓΌcker form on `βΒ²ββ΄`. ## Main results * `SegrePersistence.PluckerLower.exists_M`: if `3k < 4m` and all `b i β 0`, there is `M β 0` with `M a_i β β¨b_iβ©` for all `i` (dimension count, rank-nullity).* `SegrePersistence.PluckerLower.M_rank_eq_four`: if any `β€ m` of the `a i` and any `β€ 4` of the `b i` are linearly independent and `m < k`, every such `M β 0` has rank `4`. `M_rank_eq_four'` is the same with "any `m`" / "any `4`" (exactly) and `4 β€ k`.* `SegrePersistence.PluckerLower.Qform`: the bilinear form `Q(z, z') = pl(L z, L z')` with `L(a β b) = M a β§ b`; `Q_symm`, `Q_simple` (it vanishes on simple tensors), `Q_radical` (each `a_i β b_i` is in its radical) and `Q_ne_zero` (it is nonzero when `rank M = 4`).* `SegrePersistence.PluckerLower.lower_bound`: for `m < k`, `3k < 4m` and points in general position, there is a nonzero symmetric bilinear form on `A β B`, vanishing on all simple tensors, with every `a_i β b_i` in its radical. ## What is not covered That general points compute `qp` (BSSV, Lemma 3.3), the passage from general points to all pointsby closure, and the identification of the space of such forms with `π β βΒ²A* β βΒ²B*`(hence the statement `qp β₯ β4m/3β` itself) are not formalized here. Nor is the existence ofpoints in general position, nor the cases `m = 2, 3`.-/ @[expose] public section open Module Finset Matrix namespace SegrePersistence namespace PluckerLower variable {m k : β} /-! ### Step 1: existence of `M` by a dimension count -/ /-- The linear map `M β¦ (M a_i mod β¨b_iβ©)_i`; its kernel is the space of admissible `M`. -/noncomputable def condMap (a : Fin k β Fin m β β) (b : Fin k β Fin 4 β β) : Matrix (Fin 4) (Fin m) β ββ[β] ((i : Fin k) β (Fin 4 β β) β§Έ (β β b i)) := LinearMap.pi fun i => (β β b i).mkQ ββ { toFun := fun M => M *α΅₯ a i map_add' := fun M N => Matrix.add_mulVec M N (a i) map_smul' := fun c M => by simp [Matrix.smul_mulVec] } lemma mem_ker_condMap {a : Fin k β Fin m β β} {b : Fin k β Fin 4 β β} {M : Matrix (Fin 4) (Fin m) β} : M β LinearMap.ker (condMap a b) β β i, M *α΅₯ a i β β β b i := by simp [condMap, funext_iff] lemma finrank_condMap_target {b : Fin k β Fin 4 β β} (hb : β i, b i β 0) : finrank β ((i : Fin k) β (Fin 4 β β) β§Έ (β β b i)) = 3 * k := by rw [Module.finrank_pi_fintype] have h : β i, finrank β ((Fin 4 β β) β§Έ (β β b i)) = 3 := by intro i have := (β β b i).finrank_quotient_add_finrank rw [finrank_span_singleton (hb i), Module.finrank_fin_fun] at this omega simp [h, mul_comm] /-- **Step 1.** If `3k < 4m` (and the `b i` are nonzero), there is a nonzero `M : A β B` with`M a_i β β¨b_iβ©` for every `i`. -/theorem exists_M (a : Fin k β Fin m β β) (b : Fin k β Fin 4 β β) (hb : β i, b i β 0) (hk : 3 * k < 4 * m) : β M : Matrix (Fin 4) (Fin m) β, M β 0 β§ β i, M *α΅₯ a i β β β b i := by have h1 := LinearMap.finrank_range_add_finrank_ker (condMap a b) have h2 : finrank β (LinearMap.range (condMap a b)) β€ 3 * k := (Submodule.finrank_le _).trans (finrank_condMap_target hb).le rw [Module.finrank_matrix] at h1 simp only [Fintype.card_fin, Module.finrank_self, mul_one] at h1 have hne : LinearMap.ker (condMap a b) β β₯ := by intro h rw [h, finrank_bot] at h1 omega obtain β¨M, hM, hM0β© := Submodule.exists_mem_ne_zero_of_ne_bot hne exact β¨M, hM0, mem_ker_condMap.1 hMβ© /-! ### Step 2: `M` has rank four -/ /-- An independent family indexed by `t`, lying in `W`, has at most `finrank W` members. -/lemma card_le_finrank_of_linearIndepOn {V ΞΉ : Type*} [AddCommGroup V] [Module β V] [FiniteDimensional β V] (v : ΞΉ β V) (t : Finset ΞΉ) (ht : LinearIndepOn β v (t : Set ΞΉ)) (W : Submodule β V) (hW : β i β t, v i β W) : t.card β€ finrank β W := by have h := finrank_span_eq_card ht have hle : Submodule.span β (Set.range fun x : (t : Set ΞΉ) => v x) β€ W := by rw [Submodule.span_le] rintro _ β¨x, rflβ© exact hW x x.2 have := Submodule.finrank_mono hle have hc : Fintype.card (t : Set ΞΉ) = t.card := by simp omega /-- **Step 2.** If any `β€ m` of the `a i` and any `β€ 4` of the `b i` are linearly independent and`m < k`, then every nonzero `M` with `M a_i β β¨b_iβ©` for all `i` has rank `4`. -/theorem M_rank_eq_four (a : Fin k β Fin m β β) (b : Fin k β Fin 4 β β) (ha : β s : Finset (Fin k), s.card β€ m β LinearIndepOn β a (s : Set (Fin k))) (hb : β s : Finset (Fin k), s.card β€ 4 β LinearIndepOn β b (s : Set (Fin k))) (hmk : m < k) (M : Matrix (Fin 4) (Fin m) β) (hM0 : M β 0) (hM : β i, M *α΅₯ a i β β β b i) : M.rank = 4 := by set f := M.mulVecLin with hf have hrk : M.rank = finrank β (LinearMap.range f) := rfl have hnull := LinearMap.finrank_range_add_finrank_ker f rw [Module.finrank_fin_fun] at hnull have hr4 : M.rank β€ 4 := by rw [hrk] exact (Submodule.finrank_le _).trans (by rw [Module.finrank_fin_fun]) have hr1 : 1 β€ M.rank := by rw [hrk, Nat.one_le_iff_ne_zero] intro h0 rw [Submodule.finrank_eq_zero, LinearMap.range_eq_bot] at h0 apply hM0 ext p j have := congrArg (fun g => g (Pi.single j 1) p) h0 simpa [hf, Matrix.mulVec_single_one] using this by_contra hne have hr : M.rank < 4 := lt_of_le_of_ne hr4 hne set K := (univ : Finset (Fin k)).filter (fun i => M *α΅₯ a i = 0) with hK set J := (univ : Finset (Fin k)).filter (fun i => Β¬ M *α΅₯ a i = 0) with hJ have hKJ : K.card + J.card = k := by rw [hK, hJ, Finset.card_filter_add_card_filter_not, Finset.card_univ, Fintype.card_fin] -- at most `m - r` of the `a i` lie in `ker M` have hKc : K.card β€ m - M.rank := by by_contra hc obtain β¨t, htK, htcβ© := Finset.exists_subset_card_eq (s := K) (n := m - M.rank + 1) (by omega) have := card_le_finrank_of_linearIndepOn a t (ha t (by omega)) (LinearMap.ker f) (fun i hi => by have := (Finset.mem_filter.1 (htK hi)).2 simpa [hf] using this) omega -- the other `b i` lie in `im M`, which holds at most `r` of them have hJc : J.card β€ M.rank := by by_contra hc obtain β¨t, htJ, htcβ© := Finset.exists_subset_card_eq (s := J) (n := M.rank + 1) (by omega) have := card_le_finrank_of_linearIndepOn b t (hb t (by omega)) (LinearMap.range f) (fun i hi => by have hi0 := (Finset.mem_filter.1 (htJ hi)).2 obtain β¨c, hcβ© := Submodule.mem_span_singleton.1 (hM i) have hc0 : c β 0 := by rintro rfl simp at hc exact hi0 hc.symm refine β¨cβ»ΒΉ β’ a i, ?_β© simp [hf, β hc, smul_smul, inv_mul_cancelβ hc0]) omega omega /-- **Step 2**, with "any `m`" and "any `4`" (exactly) as general-position hypotheses. -/theorem M_rank_eq_four' (a : Fin k β Fin m β β) (b : Fin k β Fin 4 β β) (ha : β s : Finset (Fin k), s.card = m β LinearIndepOn β a (s : Set (Fin k))) (hb : β s : Finset (Fin k), s.card = 4 β LinearIndepOn β b (s : Set (Fin k))) (hmk : m < k) (h4k : 4 β€ k) (M : Matrix (Fin 4) (Fin m) β) (hM0 : M β 0) (hM : β i, M *α΅₯ a i β β β b i) : M.rank = 4 := by refine M_rank_eq_four a b (fun s hs => ?_) (fun s hs => ?_) hmk M hM0 hM Β· obtain β¨t, hst, htu, htcβ© := Finset.exists_subsuperset_card_eq (Finset.subset_univ s) hs (by rw [Finset.card_univ, Fintype.card_fin]; omega) exact (ha t htc).mono (by exact_mod_cast hst) Β· obtain β¨t, hst, htu, htcβ© := Finset.exists_subsuperset_card_eq (Finset.subset_univ s) hs (by rw [Finset.card_univ, Fintype.card_fin]; omega) exact (hb t htc).mono (by exact_mod_cast hst) /-! ### Step 3: the pulled-back PlΓΌcker quadric -/ /-- The `2 Γ 2` minors of the columns `u, v`: coordinates of `u β§ v β βΒ²ββ΄`. -/def wedge (u v : Fin 4 β β) : Fin 4 β Fin 4 β β := fun p q => u p * v q - u q * v p /-- The PlΓΌcker form on `βΒ²ββ΄` in minor coordinates. -/def pl (U V : Fin 4 β Fin 4 β β) : β := U 0 1 * V 2 3 - U 0 2 * V 1 3 + U 0 3 * V 1 2 + U 1 2 * V 0 3 - U 1 3 * V 0 2 + U 2 3 * V 0 1 /-- The linear map `L : A β B β βΒ²B`, `L(a β b) = M a β§ b`, in coordinates. -/def L (M : Matrix (Fin 4) (Fin m) β) (z : Matrix (Fin m) (Fin 4) β) : Fin 4 β Fin 4 β β := fun p q => β i, (M p i * z i q - M q i * z i p) /-- `Q(z, z') = pl(L z, L z')`. -/def Q (M : Matrix (Fin 4) (Fin m) β) (z z' : Matrix (Fin m) (Fin 4) β) : β := pl (L M z) (L M z') lemma pl_symm (U V : Fin 4 β Fin 4 β β) : pl U V = pl V U := by unfold pl; ring lemma L_add (M : Matrix (Fin 4) (Fin m) β) (z z' : Matrix (Fin m) (Fin 4) β) : L M (z + z') = L M z + L M z' := by funext p q simp only [L, Matrix.add_apply, Pi.add_apply, β Finset.sum_add_distrib] exact Finset.sum_congr rfl fun i _ => by ring lemma L_smul (M : Matrix (Fin 4) (Fin m) β) (c : β) (z : Matrix (Fin m) (Fin 4) β) : L M (c β’ z) = c β’ L M z := by funext p q simp only [L, Matrix.smul_apply, Pi.smul_apply, smul_eq_mul, Finset.mul_sum] exact Finset.sum_congr rfl fun i _ => by ring /-- `Q` as a bilinear form on `A β B`. -/noncomputable def Qform (M : Matrix (Fin 4) (Fin m) β) : LinearMap.BilinForm β (Matrix (Fin m) (Fin 4) β) := LinearMap.mkβ β (Q M) (fun z z' w => by simp only [Q, L_add, pl, Pi.add_apply]; ring) (fun c z w => by simp only [Q, L_smul, pl, Pi.smul_apply, smul_eq_mul]; ring) (fun z w w' => by simp only [Q, L_add, pl, Pi.add_apply]; ring) (fun c z w => by simp only [Q, L_smul, pl, Pi.smul_apply, smul_eq_mul]; ring) @[simp] lemma Qform_apply (M : Matrix (Fin 4) (Fin m) β) (z z' : Matrix (Fin m) (Fin 4) β) : Qform M z z' = Q M z z' := rfl /-- `Q` is symmetric. -/theorem Q_symm (M : Matrix (Fin 4) (Fin m) β) (z z' : Matrix (Fin m) (Fin 4) β) : Q M z z' = Q M z' z := pl_symm _ _ /-- `L(a β b) = M a β§ b`. -/lemma L_vecMulVec (M : Matrix (Fin 4) (Fin m) β) (x : Fin m β β) (y : Fin 4 β β) : L M (vecMulVec x y) = wedge (M *α΅₯ x) y := by funext p q simp only [L, wedge, vecMulVec_apply, mulVec, dotProduct, Finset.sum_mul, β Finset.sum_sub_distrib] exact Finset.sum_congr rfl fun i _ => by ring /-- `pl(w, w) = 0` for decomposable `w = u β§ v`. -/lemma pl_wedge_self (u v : Fin 4 β β) : pl (wedge u v) (wedge u v) = 0 := by unfold pl wedge; ring /-- `Q` vanishes on simple tensors. -/theorem Q_simple (M : Matrix (Fin 4) (Fin m) β) (x : Fin m β β) (y : Fin 4 β β) : Q M (vecMulVec x y) (vecMulVec x y) = 0 := by rw [Q, L_vecMulVec, pl_wedge_self] /-- If `M a β β¨bβ©` then `L(a β b) = 0`. -/lemma L_point_eq_zero (M : Matrix (Fin 4) (Fin m) β) (x : Fin m β β) (y : Fin 4 β β) (h : M *α΅₯ x β β β y) : L M (vecMulVec x y) = 0 := by obtain β¨c, hcβ© := Submodule.mem_span_singleton.1 h rw [L_vecMulVec, β hc] funext p q simp only [wedge, Pi.smul_apply, smul_eq_mul, Pi.zero_apply] ring /-- Each point `a β b` with `M a β β¨bβ©` lies in the radical of `Q`. -/theorem Q_radical (M : Matrix (Fin 4) (Fin m) β) (x : Fin m β β) (y : Fin 4 β β) (h : M *α΅₯ x β β β y) (z : Matrix (Fin m) (Fin 4) β) : Q M (vecMulVec x y) z = 0 := by rw [Q, L_point_eq_zero M x y h] simp [pl] /-- If `M` has rank `4` (is onto), `Q` is nonzero. -/theorem Q_ne_zero (M : Matrix (Fin 4) (Fin m) β) (hM : M.rank = 4) : β z z' : Matrix (Fin m) (Fin 4) β, Q M z z' β 0 := by have htop : LinearMap.range M.mulVecLin = β€ := Submodule.eq_top_of_finrank_eq (by rw [Module.finrank_fin_fun]; exact hM) have hx : β p : Fin 4, β x, M *α΅₯ x = Pi.single p 1 := by intro p obtain β¨x, hxβ© := LinearMap.range_eq_top.1 htop (Pi.single p 1) exact β¨x, by simpa using hxβ© obtain β¨x0, h0β© := hx 0 obtain β¨x2, h2β© := hx 2 refine β¨vecMulVec x0 (Pi.single 1 1), vecMulVec x2 (Pi.single 3 1), ?_β© rw [Q, L_vecMulVec, L_vecMulVec, h0, h2] simp [pl, wedge] /-! ### The lower bound for points in general position -/ /-- **Lower bound of Theorem 2, for points in general position.** If `m < k`, `3k < 4m`, any `β€ m`of the `a i` and any `β€ 4` of the `b i` are linearly independent, then there is a nonzerosymmetric bilinear form on `A β B`, vanishing on every simple tensor, with every `a_i β b_i` inits radical. -/theorem lower_bound (a : Fin k β Fin m β β) (b : Fin k β Fin 4 β β) (ha : β s : Finset (Fin k), s.card β€ m β LinearIndepOn β a (s : Set (Fin k))) (hb : β s : Finset (Fin k), s.card β€ 4 β LinearIndepOn β b (s : Set (Fin k))) (hmk : m < k) (hk : 3 * k < 4 * m) : β D : LinearMap.BilinForm β (Matrix (Fin m) (Fin 4) β), D β 0 β§ (β z z', D z z' = D z' z) β§ (β (x : Fin m β β) (y : Fin 4 β β), D (vecMulVec x y) (vecMulVec x y) = 0) β§ β i z, D (vecMulVec (a i) (b i)) z = 0 := by have hb0 : β i, b i β 0 := fun i => by exact (hb {i} (by simp)).ne_zero (by simp) obtain β¨M, hM0, hMβ© := exists_M a b hb0 hk have hr := M_rank_eq_four a b ha hb hmk M hM0 hM refine β¨Qform M, ?_, fun z z' => Q_symm M z z', fun x y => Q_simple M x y, fun i z => Q_radical M (a i) (b i) (hM i) zβ© intro h0 obtain β¨z, z', hzβ© := Q_ne_zero M hr exact hz (by simpa using congrArg (fun D => D z z') h0) end PluckerLower end SegrePersistence