Lean / 0xOsprey/shub-smale-tau9 / TauWitnesses.lean
Lean reader

Research/PvsNP/Tau/TauWitnesses.lean

115 lines13 declarationsno sorry
  1. module
  2. public import Research.PvsNP.Tau.TauConjecture
  3. @[expose] public section
  4. namespace Research.PvsNP.Tau
  5. /-!
  6. # Machine-Verified Record Witness Ladder for the Shub–Smale $\tau$-Conjecture
  7. This module extends the witness ladder of `Research.PvsNP.Tau.TauConjecture` with
  8. machine-verified constant-free straight-line program (`SLP`) witnesses matching the
  9. exact record ladder up to $\tau = 13$ (`zMaxGe 6 5`, `zMaxGe 10 7` via both the
  10. symmetric difference-of-squares and pronic families, `zMaxGe 11 8`, and `zMaxGe 13 9`),
  11. together with the unconditional degree-4 / root-count-4 bound for SLPs with at most
  12. two multiplication gates.
  13. -/
  14. /-! ## 1. Unconditional Bound for SLPs with at Most Two Multiplications -/
  15. /-- SLPs with at most `2` multiplication gates compute polynomials of degree at most `4`. -/
  16. theorem tau_two_mul_natDegree_le_four {τ : ℕ} (P : SLP τ) (hm : P.mulCount ≤ 2) :
  17. P.evalPoly.natDegree ≤ 4 := by
  18. have h := slp_natDegree_le_two_pow_mulCount P ⟨τ + 1, Nat.lt_succ_self _⟩
  19. have hpow : 2 ^ P.mulCount ≤ 4 := by
  20. calc
  21. 2 ^ P.mulCount ≤ 2 ^ 2 := Nat.pow_le_pow_right (by omega) hm
  22. _ = 4 := by decide
  23. exact h.trans hpow
  24. /-- Nonzero polynomials computed by SLPs with at most `2` multiplication gates
  25. have at most `4` distinct integer roots. -/
  26. theorem tau_two_mul_intRootCount_le_four {τ : ℕ} (P : SLP τ) (hm : P.mulCount ≤ 2)
  27. (hne : P.evalPoly ≠ 0) :
  28. intRootCount P.evalPoly ≤ 4 :=
  29. (intRootCount_le_natDegree hne).trans (tau_two_mul_natDegree_le_four P hm)
  30. /-! ## 2. Concrete Record Witness SLPs (`τ = 6, 10, 11, 13`) -/
  31. /-- Length-6 witness: `X * (X^2 - (2 - X^2)^2) = -X(X^2 - 1)(X^2 - 4)`,
  32. with `5` distinct integer roots `{-2, -1, 0, 1, 2}` (matching `z_max(6) = 5`). -/
  33. def slpWitness6 : SLP 6 :=
  34. let p1 : SLP 1 := .snoc .nil .add ⟨0, by omega⟩ ⟨0, by omega⟩ -- w2 = 2
  35. let p2 : SLP 2 := .snoc p1 .mul ⟨1, by omega⟩ ⟨1, by omega⟩ -- w3 = X^2
  36. let p3 : SLP 3 := .snoc p2 .sub ⟨2, by omega⟩ ⟨3, by omega⟩ -- w4 = 2 - X^2
  37. let p4 : SLP 4 := .snoc p3 .mul ⟨4, by omega⟩ ⟨4, by omega⟩ -- w5 = (2 - X^2)^2
  38. let p5 : SLP 5 := .snoc p4 .sub ⟨3, by omega⟩ ⟨5, by omega⟩ -- w6 = X^2 - (2 - X^2)^2
  39. .snoc p5 .mul ⟨1, by omega⟩ ⟨6, by omega⟩ -- w7 = X * (X^2 - (2 - X^2)^2)
  40. /-- Length-10 symmetric difference-of-squares witness:
  41. `-X(X^2 - 1)(X^2 - 4)(X^2 - 9)`, with `7` distinct integer roots `{-3, -2, -1, 0, 1, 2, 3}`. -/
  42. def slpWitness10 : SLP 10 :=
  43. let p7 : SLP 7 := .snoc slpWitness6 .add ⟨0, by omega⟩ ⟨2, by omega⟩ -- w8 = 1 + 2 = 3
  44. let p8 : SLP 8 := .snoc p7 .mul ⟨8, by omega⟩ ⟨8, by omega⟩ -- w9 = 9
  45. let p9 : SLP 9 := .snoc p8 .sub ⟨3, by omega⟩ ⟨9, by omega⟩ -- w10 = X^2 - 9
  46. .snoc p9 .mul ⟨7, by omega⟩ ⟨10, by omega⟩ -- w11 = w7 * (X^2 - 9)
  47. /-- Shared length-8 pronic prefix: `q * (2 - q) * (6 - q)` where `q = X * (1 + X)`,
  48. with wires `w2 = 2`, `w4 = 4`, `w7 = 6 - q`, `w9 = q * (2 - q) * (6 - q)`. -/
  49. def slpPronic8 : SLP 8 :=
  50. let p1 : SLP 1 := .snoc .nil .add ⟨0, by omega⟩ ⟨0, by omega⟩ -- w2 = 2
  51. let p2 : SLP 2 := .snoc p1 .add ⟨0, by omega⟩ ⟨1, by omega⟩ -- w3 = 1 + X
  52. let p3 : SLP 3 := .snoc p2 .add ⟨2, by omega⟩ ⟨2, by omega⟩ -- w4 = 4
  53. let p4 : SLP 4 := .snoc p3 .mul ⟨1, by omega⟩ ⟨3, by omega⟩ -- w5 = q = X * (1 + X)
  54. let p5 : SLP 5 := .snoc p4 .sub ⟨2, by omega⟩ ⟨5, by omega⟩ -- w6 = 2 - q
  55. let p6 : SLP 6 := .snoc p5 .add ⟨4, by omega⟩ ⟨6, by omega⟩ -- w7 = 6 - q
  56. let p7 : SLP 7 := .snoc p6 .mul ⟨5, by omega⟩ ⟨6, by omega⟩ -- w8 = q * (2 - q)
  57. .snoc p7 .mul ⟨7, by omega⟩ ⟨8, by omega⟩ -- w9 = (6 - q) * q * (2 - q)
  58. /-- Length-10 pronic witness: `q * (2 - q) * (6 - q) * (X + 4)` where `q = X * (1 + X)`,
  59. with `7` distinct integer roots `{-4, -3, -2, -1, 0, 1, 2}`. -/
  60. def slpWitness10Pronic : SLP 10 :=
  61. let p9 : SLP 9 := .snoc slpPronic8 .add ⟨1, by omega⟩ ⟨4, by omega⟩ -- w10 = X + 4
  62. .snoc p9 .mul ⟨9, by omega⟩ ⟨10, by omega⟩ -- w11 = w9 * (X + 4)
  63. /-- Length-11 pronic witness: `q * (2 - q) * (6 - q) * (12 - q)` where `q = X * (1 + X)`,
  64. with `8` distinct integer roots `{-4, -3, -2, -1, 0, 1, 2, 3}`. -/
  65. def slpWitness11 : SLP 11 :=
  66. let p9 : SLP 9 := .snoc slpPronic8 .add ⟨2, by omega⟩ ⟨4, by omega⟩ -- w10 = 2 + 4 = 6
  67. let p10 : SLP 10 := .snoc p9 .add ⟨7, by omega⟩ ⟨10, by omega⟩ -- w11 = (6 - q) + 6 = 12 - q
  68. .snoc p10 .mul ⟨9, by omega⟩ ⟨11, by omega⟩ -- w12 = w9 * (12 - q)
  69. /-- Length-13 pronic witness: `q * (2 - q) * (6 - q) * (12 - q) * (X - 4)` where `q = X * (1 + X)`,
  70. with `9` distinct integer roots `{-4, -3, -2, -1, 0, 1, 2, 3, 4}`. -/
  71. def slpWitness13 : SLP 13 :=
  72. let p12 : SLP 12 := .snoc slpWitness11 .sub ⟨1, by omega⟩ ⟨4, by omega⟩ -- w13 = X - 4
  73. .snoc p12 .mul ⟨12, by omega⟩ ⟨13, by omega⟩ -- w14 = w12 * (X - 4)
  74. /-! ## 3. Machine-Verified Record Lower Bounds (`zMaxGe`) -/
  75. theorem tau_witness_6_five : zMaxGe 6 5 :=
  76. zMaxGe_of_evalInt slpWitness6 {-2, -1, 0, 1, 2} 3
  77. (by decide) (by decide) (by decide)
  78. theorem tau_witness_10_seven : zMaxGe 10 7 :=
  79. zMaxGe_of_evalInt slpWitness10 {-3, -2, -1, 0, 1, 2, 3} 4
  80. (by decide) (by decide) (by decide)
  81. theorem tau_witness_10_seven_pronic : zMaxGe 10 7 :=
  82. zMaxGe_of_evalInt slpWitness10Pronic {-4, -3, -2, -1, 0, 1, 2} 3
  83. (by decide) (by decide) (by decide)
  84. theorem tau_witness_11_eight : zMaxGe 11 8 :=
  85. zMaxGe_of_evalInt slpWitness11 {-4, -3, -2, -1, 0, 1, 2, 3} 4
  86. (by decide) (by decide) (by decide)
  87. theorem tau_witness_13_nine : zMaxGe 13 9 :=
  88. zMaxGe_of_evalInt slpWitness13 {-4, -3, -2, -1, 0, 1, 2, 3, 4} 5
  89. (by decide) (by decide) (by decide)
  90. end Research.PvsNP.Tau
  91. end