Folding polynomial deg x
Polynomial.FoldingPolynomial.folding_polynomial_deg_x
Plain-language statement
The degree of the foldingPolynomial q f is precisely f.natDegree / q.natDegree in the first variable.
Exact Lean statement
@[simp]
theorem folding_polynomial_deg_x {q f : F[X]} :
degreeX (foldingPolynomial q f) = f.natDegree / q.natDegreeFormal artifact
Lean source
@[simp]theorem folding_polynomial_deg_x {q f : F[X]} : degreeX (foldingPolynomial q f) = f.natDegree / q.natDegree := by by_cases h: q.degree ≤ 0 · rw [Polynomial.degree_le_zero_iff] at h rw [h, folding_polynomial_deg_x_C_q] simp only [natDegree_C, Nat.div_zero] · simp only [not_le] at h induction n : f.natDegree using Nat.strong_induction_on generalizing f q with | h n ih => by_cases h₁ : f.degree < q.degree ∨ f.degree ≤ 0 ∨ q.degree ≤ 0 · have h_deg_zero : degreeX (foldingPolynomial q f) = 0 := folding_polynomial_deg_x_base h₁ have h_deg_zero : f.natDegree < q.natDegree := by by_cases hf : f = 0 <;> by_cases hq : q = 0 <;> simp_all +decide [Polynomial.degree_eq_natDegree] aesop rw [Nat.div_eq_of_lt] <;> aesop · have h_deg : degreeX (foldingPolynomial q f) = 1 + degreeX (foldingPolynomial q (f / q)) := by apply folding_polynomial_deg_x_ind · exact le_of_not_gt fun h₂ ↦ h₁ <| Or.inl h₂ · exact h have h_deg_f_div_q : (f / q).natDegree = f.natDegree - q.natDegree := by rw [Polynomial.div_def] rw [Polynomial.natDegree_C_mul, Polynomial.natDegree_divByMonic] · rw [Polynomial.natDegree_mul'] <;> aesop · exact Polynomial.monic_mul_leadingCoeff_inv (Polynomial.ne_zero_of_degree_gt h) · aesop rw [h_deg, ih _ _ h h_deg_f_div_q] · rw [←n, Nat.add_comm] rw [ ←Nat.sub_add_cancel (show q.natDegree ≤ f.natDegree from ?_), Nat.add_div] <;> norm_num [Polynomial.natDegree_pos_iff_degree_pos.mpr h] · exact Nat.mod_lt _ (Polynomial.natDegree_pos_iff_degree_pos.mpr h) · exact Polynomial.natDegree_le_natDegree (le_of_not_gt fun h' ↦ h₁ <| Or.inl <| by rw [ Polynomial.degree_eq_natDegree, Polynomial.degree_eq_natDegree] at * <;> aesop) · rw [←n] exact Nat.sub_lt (Polynomial.natDegree_pos_iff_degree_pos.mpr (lt_of_not_ge fun h ↦ h₁ <| Or.inr <| Or.inl h)) (Polynomial.natDegree_pos_iff_degree_pos.mpr h)- Project
- ArkLib
- License
- Apache-2.0
- Commit
- fad5cbf80877
- Source
- ArkLib/Data/Polynomial/FoldingPolynomial.lean:530-579
Reuse this declaration
Bring the exact result into your workflow
The import identifies the source module. Your project still needs the pinned package dependency shown on this page.
What this badge means
This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.
Continue in this project
Related declarations
Affine gaps lifted to interleaved codes
affine_gaps_lifted_to_interleaved_codes
Project documentation
This lemma proves the final algebraic step in the DG25 Theorem 3.1 proof. It shows that if R > e + 1, then e * (R / (R - 1)) < e + 1. The intuition is that the fraction R / (R - 1) is always greater than 1, but as R gets larger, it gets closer to 1. The hypothesis R > e + 1 provides a strong enough bound to ensure the product e * (fraction) do...
Source project: ArkLib
Person-level attribution pending.
Gadget Decompose coeff
ArkLib.Lattices.Ajtai.gadgetDecompose_coeff
Plain-language statement
The k-th coefficient (k < deg φ) of a gadget-decomposition block is exactly the corresponding digit of the corresponding input coefficient.
Source project: ArkLib
Person-level attribution pending.
Gadget Decompose lawful
ArkLib.Lattices.Ajtai.gadgetDecompose_lawful
Plain-language statement
The base-b gadget decomposition is a lawful gadget decomposition.
Source project: ArkLib
Person-level attribution pending.