Cslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.natDegree_sharingPolynomial_le
theoremverifiedformalizationimported Lean
If the tail polynomial has degree < n, then the sharing polynomial has natural degree at most n.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in variable {F : Type*} [Field F] in theorem Cslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.natDegree_sharingPolynomial_le (secretValue : F) (tail : _root_.Polynomial F) {n : ℕ} (hdeg : tail.degree < n) : (sharingPolynomial secretValue tail).natDegree ≤ n
- Formalizes
- CSLib, `Cslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.natDegree_sharingPolynomial_le`
- Lean proof
- By Samuel Schlesinger, from github.com/leanprover/cslib at
3951377e5a3f(Copyright (c) 2026 Samuel Schlesinger. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.Cslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.natDegree_sharingPolynomial_le← Cslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.natDegree_sharingPolynomial_le (Cslib/Crypto/Protocols/SecretSharing/Shamir/Polynomial.lean:70): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- Cslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.sharingPolynomialThe standard Shamir sharing polynomial
s + X * q(X). - Cslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.sharingPolynomial_evalCslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.sharingPolynomial_eval
- Cslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.sharingPolynomialThe standard Shamir sharing polynomial
- Used by 1
- Cslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.degree_sharingPolynomial_lt_succIf the tail polynomial has degree
< n, then the sharing polynomial has degree< n + 1.
- Cslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.degree_sharingPolynomial_lt_succIf the tail polynomial has degree
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true invariable {F : Type*} [Field F] in/-- If the tail polynomial has degree `< n`, then the sharing polynomial has natural degree at most `n`. -/theorem Cslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.natDegree_sharingPolynomial_le (secretValue : F) (tail : _root_.Polynomial F) {n : ℕ} (hdeg : tail.degree < n) : (sharingPolynomial secretValue tail).natDegree ≤ n := by rw [sharingPolynomial] refine (_root_.Polynomial.natDegree_add_le _ _).trans ?_ rw [max_le_iff] constructor · rw [_root_.Polynomial.natDegree_C] exact Nat.zero_le n · by_cases htail : tail = 0 · simp [htail] · rw [_root_.Polynomial.natDegree_X_mul htail] have htailDegree : tail.natDegree < n := by have := hdeg rw [_root_.Polynomial.degree_eq_natDegree htail] at this exact_mod_cast this exact Nat.succ_le_of_lt htailDegree