AFTD Auto-Formalizing Theoretical Domains

finite_bias_sign_polynomial_degree_lower_bound

theoremverified

If a real polynomial vanishes at zero and takes value one at m distinct real numbers, then its degree is at least m.

Statement

theorem finite_bias_sign_polynomial_degree_lower_bound (m : ℕ) (p : Polynomial ℝ)
    (c : Fin m → ℝ) (hc : Function.Injective c)
    (hzero : p.eval 0 = 0) (hlevels : ∀ i, p.eval (c i) = 1) :
    m ≤ p.natDegree
Source
Elementary polynomial interpolation, used to assess the finite-error-spectrum route toward OP-1638.
Verified
17 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

The proof, explained

The proof proceeds by contradiction: assuming the degree of p is strictly less than m, p and the constant polynomial 1 agree at m distinct points while both having degree strictly less than m. By polynomial uniqueness, p must be identically equal to the constant polynomial 1. Evaluating both sides at 0 then yields 0 = 1, contradicting the hypothesis that p vanishes at 0.

  1. Assume for contradiction that the degree of p is strictly less than m.

    We proceed by contradiction (by_contra hn). Assuming ¬(m ≤ deg(p)), Nat.lt_of_not_ge yields deg(p) < m.

    lines 6–7

    uses Nat.lt_of_not_ge

      by_contra hn
      have hn' : p.natDegree < m := Nat.lt_of_not_ge hn
  2. The polynomial p must be identically equal to the constant polynomial 1.

    By Polynomial.eq_of_natDegree_lt_card_of_eval_eq, two polynomials over an integral domain are identical if they agree on an injective family of points whose cardinality strictly exceeds the maximum of their degrees. Here, p and the constant polynomial 1 agree on the m distinct points c(i) since p(c(i)) = 1, and max(deg(p), deg(1)) < m because deg(p) < m and the degree of the constant 1 is 0.

    lines 8–12

    uses Polynomial.eq_of_natDegree_lt_card_of_eval_eq

      have hpoly : p = Polynomial.C (1 : ℝ) := by
        apply Polynomial.eq_of_natDegree_lt_card_of_eval_eq p (Polynomial.C (1 : ℝ)) hc
        · intro i
          simpa using hlevels i
        · simpa using hn'
  3. Evaluating both sides at 0 produces a contradiction.

    Applying evaluation at 0 to both sides of p = 1 via congrArg gives p(0) = 1. Simplifying with the hypothesis p(0) = 0 yields 0 = 1, which is impossible and completes the proof.

    lines 13–14

    uses congrArg

      have := congrArg (Polynomial.eval (0 : ℝ)) hpoly
      simp [hzero] at this
Nat.lt_of_not_ge
If a natural number b is not greater than or equal to a, then b is strictly less than a.
Polynomial.eq_of_natDegree_lt_card_of_eval_eq
Two polynomials over an integral domain that agree on an injective family of inputs are equal, provided the maximum of their degrees is strictly less than the cardinality of the index set.
congrArg
If two arguments are equal, applying any function to both produces equal values.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- An odd signal polynomial that equalizes m distinct nonzero biases has degree at least m. -/theorem finite_bias_sign_polynomial_degree_lower_bound (m : ℕ) (p : Polynomial ℝ)    (c : Fin m → ℝ) (hc : Function.Injective c)    (hzero : p.eval 0 = 0) (hlevels : ∀ i, p.eval (c i) = 1) :    m ≤ p.natDegree := by  by_contra hn  have hn' : p.natDegree < m := Nat.lt_of_not_ge hn  have hpoly : p = Polynomial.C (1 : ℝ) := by    apply Polynomial.eq_of_natDegree_lt_card_of_eval_eq p (Polynomial.C (1 : ℝ)) hc    · intro i      simpa using hlevels i    · simpa using hn'  have := congrArg (Polynomial.eval (0 : ℝ)) hpoly  simp [hzero] at this
See it in the graphDiscuss this resultChallenge it