AFTD Auto-Formalizing Theoretical Domains

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.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
Used by 1

Lean source view module on GitHub

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
See it in the graphDiscuss this resultChallenge it