Skip to content

feat: proofs for rational function lemmas - #497

Open
alexanderlhicks wants to merge 38 commits into
mainfrom
rational-functions-positive-degree
Open

feat: proofs for rational function lemmas#497
alexanderlhicks wants to merge 38 commits into
mainfrom
rational-functions-positive-degree

Conversation

@alexanderlhicks

Copy link
Copy Markdown
Collaborator

replaces #387, addresses some issues in the RationalFunctions file.

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Summary

sorry delta: -3 (5 removed, 2 added) — net proof progress

feat: proofs for rational function lemmas

This PR refactors and extends the rational functions formalization following Appendix A of [BCIKS20]. It modularizes the monolithic RationalFunctions.lean into seven specialized files (FunctionField, Weight, RationalRootVanishing, Lifts, HenselNumerators.Setup, HenselNumerators.Hensel, HenselNumerators.Weight), updates downstream code in the coding theory proximity gap, and adds new theorems and definitions.

Mathematical Formalization

  • FunctionField.lean defines the function field 𝕃 H and the ring of regular functions 𝒪 H for a bivariate polynomial H. It introduces monicized polynomials H_tilde and H_tilde', proves irreducibility conditions, constructs field and ring structures, and provides an embedding embeddingOf𝒪Into𝕃 along with rational substitution maps π_z and canonical representatives.
  • HenselNumerators/Hensel.lean formalizes the Hensel-lifting construction: defines IsHenselNumeratorSequence, formalHenselAlphaSequence, and exists_hensel_alpha_sequence which constructs a sequence αseq in 𝕃 H satisfying the power series identity evalRAtPowerSeries x₀ H R γ = 0. The file also defines AllCoeffRegular with closure properties and proves the combinatorial clearing denominator theorem henselCoeffResidual_regular_after_clearing (no sorry).
  • HenselNumerators/Sequence.lean provides regular_numerator_shape_succ, exists_regular_numerator_shape, and exists_hensel_numerator_sequence for constructing regular numerator sequences βseq, along with packaged definitions βSeq, β, α, α', γ, γ' (no sorry).
  • HenselNumerators/Setup.lean formalizes the Hypotheses x₀ R H structure (divisibility and separability conditions), defines ζ, ξ in 𝕃 H, proves regularity lemmas, constructs ξ in 𝒪 H with its representative ξ_pre, and establishes the key identity embeddingOf𝒪Into𝕃_ξ and weight bound ξ_weight_le.
  • HenselNumerators/Weight.lean introduces RegularWeightLe and the sharp arithmetic bound numeratorShapeSharp. Proves numerator_shape_weight_sharp by strong induction. Contains two sorry gaps: one in henselClearedTerm_weight for the boundary summand (p.1 = 0, j = d >= 2, p.2 = t+1), and one in numerator_shape_weight_sharp for the degenerate case natDegreeY R = 1.
  • Lifts.lean defines liftToFunctionField, liftBivariate, functionFieldT, fieldTo𝕃, and polyToPowerSeries𝕃. Proves regularity conditions for lifts (including liftToFunctionField_ne_zero, regularElementsSet_liftToFunctionField_div_of_dvd, W_pow_mul_eval₂_div_eq_sum, and regularity of evaluations at T/W).
  • RationalRootVanishing.lean adds theorems for Lemma A.1: H_tilde_prime_coeff_natDegree_le_of_totalDegree, canonicalRep_coeff_natDegree_le_of_weight_bound, embedding_eq_zero_of_resultant_zero, natDegree_det_le_of_perm_products_le, natDegree_resultant_le_weight_bound, poly_eq_zero_of_ncard_gt_bound_of_subset_roots, resultant_eval_eq_resultant_map_eval_fixed_degrees, resultant_fixed_degree_eq_zero_of_common_root_of_monic_right, Sbeta_subset_resultant_roots, weight_bot_embedding_zero, and the key lemmaA1_embedding_eq_zero_of_many_rational_roots.
  • Weight.lean introduces weight_Λ and weight_Λ_over_𝒪, proving algebraic properties (invariance, sub-additivity, monomial bounds). Proves weight_Λ_H_tilde'_le, weight_Λ_sub_leadingCoeff_mul_H_tilde'_le, and weight_Λ_modByMonic_H_tilde'_le. Also defines S_β from Lemma A.1 (no sorry).

Proof Completion (Partial)

  • The original RationalFunctions.lean has been stripped to a compatibility umbrella, with all definitions and proofs moved to subfiles.
  • Note: Agreement.lean still contains two sorry placeholders in approximate_solution_is_exact_solution_coeffs and approximate_solution_is_exact_solution_coeffs' (marked explicitly).

Protocols / Soundness

  • Extraction.lean adds pg_natDegree_pos_of_mem_normalizedFactors_of_separable and pg_candidatePairs_snd_natDegree_pos. Refactors pg_card_normalizedFactors_toFinset_le_natDegree to use the new lemma.

Infrastructure / CI

  • ArkLib.lean adds seven new imports (FunctionField, Hensel, Sequence, Setup, Weight, Lifts, RationalRootVanishing) to the top-level re-export.

Documentation

  • docs/kb/audits/bciks20-appendix-a-rational-functions.md: Summary unavailable due to parsing error.

Refactoring

  • RationalFunctions.lean: Complete restructuring — original content removed, now serves as umbrella re-exporting subfiles.
  • Agreement.lean: Updates namespace from BCIKS20AppendixA to RationalFunctions.HenselNumerators, accesses types from new location. Adds natDegree_H_pos and evalX_R_separable lemmas; claimA2_hypotheses bundles properties. All affected lemmas receive new explicit arguments.

Critical sorry / admit note: The file HenselNumerators/Weight.lean contains two sorry placeholders as described above. These must be resolved before merging.


Statistics

Metric Count
📝 Files Changed 17
Lines Added 7345
Lines Removed 1083

Lean Declarations

✏️ Removed: 64 declaration(s)

ArkLib/Data/Polynomial/RationalFunctions.lean (64)

  • abbrev 𝒪 (H : F[X][Y]) : Type
  • abbrev 𝕃 (H : F[X][Y]) : Type
  • def rationalRoot (H : F[X][Y]) (z : F) : Type
  • def regularElms (H : F[X][Y]) : Type
  • def regularElms_set (H : F[X][Y]) : Set (𝕃 H)
  • def α (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [φ : Fact (Irreducible H)] (t : ℕ) : 𝕃 H
  • def α' (x₀ : F) (R : F[X][X][Y]) (H_irreducible : Irreducible H) (t : ℕ) : 𝕃 H
  • def β (R : F[X][X][Y]) (t : ℕ) : 𝒪 H
  • def γ (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [φ : Fact (Irreducible H)] : PowerSeries (𝕃 H)
  • def γ' (x₀ : F) (R : F[X][X][Y]) (H_irreducible : Irreducible H) : PowerSeries (𝕃 H)
  • def ζ (R : F[X][X][Y]) (x₀ : F) (H : F[X][Y]) [H_irreducible : Fact (Irreducible H)] : 𝕃 H
  • def ξ (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [φ : Fact (Irreducible H)] : 𝒪 H
  • lemma H_tilde'_monic (H : F[X][Y]) (hH : 0 < H.natDegree) :
  • lemma H_tilde_equiv_H_tilde' (H : F[X][Y]) : (H_tilde' H).map univPolyHom = H_tilde H
  • lemma Lemma_A_1 {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) (D : ℕ)
  • lemma canonicalRepOf𝒪_degree_lt {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) :
  • lemma canonicalRepOf𝒪_mk {H : F[X][Y]} (hH : 0 < H.natDegree) (p : F[X][Y]) :
  • lemma canonicalRepOf𝒪_mk_eq_self_of_degree_lt {H : F[X][Y]} (hH : 0 < H.natDegree)
  • lemma canonicalRepOf𝒪_natDegree_le {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) :
  • lemma canonicalRepOf𝒪_zero {H : F[X][Y]} (hH : 0 < H.natDegree) :
  • lemma embeddingOf𝒪Into𝕃_mk (H : F[X][Y]) (p : F[X][Y]) :
  • lemma irreducibleHTildeOfIrreducible {H : Polynomial (Polynomial F)} :
  • lemma isField_of_irreducible {H : F[X][Y]} : Irreducible H → IsField (𝕃 H)
  • lemma liftBivariate_C {H : F[X][Y]} (p : F[X]) :
  • lemma liftBivariate_X {H : F[X][Y]} :
  • lemma mk_canonicalRepOf𝒪 {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) :
  • lemma regularElms_set_add {H : F[X][Y]} {a b : 𝕃 H}
  • lemma regularElms_set_functionFieldT (H : F[X][Y]) :
  • lemma regularElms_set_liftBivariate (H : F[X][Y]) (p : F[X][Y]) :
  • lemma regularElms_set_liftToFunctionField (H : F[X][Y]) (p : F[X]) :
  • lemma regularElms_set_mul {H : F[X][Y]} {a b : 𝕃 H}
  • lemma regularElms_set_neg {H : F[X][Y]} {a : 𝕃 H}
  • lemma regularElms_set_one (H : F[X][Y]) : (1 : 𝕃 H) ∈ regularElms_set H
  • lemma regularElms_set_pow {H : F[X][Y]} {a : 𝕃 H}
  • lemma regularElms_set_sub {H : F[X][Y]} {a b : 𝕃 H}
  • lemma regularElms_set_zero (H : F[X][Y]) : (0 : 𝕃 H) ∈ regularElms_set H
  • lemma regular_liftBivariate (H : F[X][Y]) (p : F[X][Y]) :
  • lemma regular_liftToFunctionField (H : F[X][Y]) (p : F[X]) :
  • lemma weight_Λ_over_𝒪_mk {H : F[X][Y]} (hH : 0 < H.natDegree) (p : F[X][Y])
  • lemma weight_Λ_over_𝒪_mk_eq_self_of_degree_lt {H : F[X][Y]} (hH : 0 < H.natDegree)
  • lemma weight_Λ_over_𝒪_zero {H : F[X][Y]} (hH : 0 < H.natDegree) (D : ℕ) :
  • lemma weight_Λ_zero (H : F[X][Y]) (D : ℕ) :
  • lemma weight_ξ_bound (x₀ : F) (hH : 0 < H.natDegree) {D : ℕ}
  • lemma β_regular (R : F[X][X][Y])
  • lemma ζ_regular_of_derivative_evalX_eq_C (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma ξ_regular (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [H_irreducible : Fact (Irreducible H)] :
  • lemma ξ_regular_of_derivative_evalX_eq_C_of_natDegree_le_one
  • noncomputable def H_tilde (H : F[X][Y]) : Polynomial (RatFunc F)
  • noncomputable def H_tilde' (H : F[X][Y]) : F[X][Y]
  • noncomputable def S_β {H : F[X][Y]} (β : 𝒪 H) : Set F
  • noncomputable def canonicalRepOf𝒪 {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) : F[X][Y]
  • noncomputable def coeffAsRatFunc : F[X] →+* Polynomial (RatFunc F)
  • noncomputable def embeddingOf𝒪Into𝕃 (H : F[X][Y]) : 𝒪 H →+* 𝕃 H
  • noncomputable def fieldTo𝕃 {H : F[X][Y]} : F →+* 𝕃 H
  • noncomputable def functionFieldT {H : F[X][Y]} : 𝕃 H
  • noncomputable def liftBivariate {H : F[X][Y]} : F[X][Y] →+* 𝕃 H
  • noncomputable def liftToFunctionField {H : F[X][Y]} : F[X] →+* 𝕃 H
  • noncomputable def polyToPowerSeries𝕃 (H : F[X][Y]) (P : F[X][Y]) : PowerSeries (𝕃 H)
  • noncomputable def weight_Λ (f H : F[X][Y]) (D : ℕ) : WithBot ℕ
  • noncomputable def weight_Λ_over_𝒪 {H : F[X][Y]} (hH : 0 < H.natDegree) (f : 𝒪 H) (D : ℕ) :
  • noncomputable def π_z {H : F[X][Y]} (z : F) (root : rationalRoot (H_tilde' H) z) : 𝒪 H →+* F
  • noncomputable def π_z_lift {H : F[X][Y]} (z : F) (root : rationalRoot (H_tilde' H) z) :
  • private lemma monicize_leading_term {K : Type} [Field K] (a : K) (d : ℕ)
  • private lemma monicize_term {K : Type} [Field K] (a b : K) (i d : ℕ)
✏️ Added: 234 declaration(s)

ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean (4)

  • lemma H_dvd_evalX_R (h_gs : ModifiedGuruswami m n k ωs Q u₀ u₁) :
  • lemma claimA2_hypotheses (h_gs : ModifiedGuruswami m n k ωs Q u₀ u₁) :
  • lemma evalX_R_separable (h_gs : ModifiedGuruswami m n k ωs Q u₀ u₁) :
  • lemma natDegree_H_pos (h_gs : ModifiedGuruswami m n k ωs Q u₀ u₁) :

ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Extraction.lean (2)

  • theorem pg_candidatePairs_snd_natDegree_pos (x₀ : F)
  • theorem pg_natDegree_pos_of_mem_normalizedFactors_of_separable (p : F[Z][X])

ArkLib/Data/Polynomial/RationalFunctions/FunctionField.lean (41)

  • abbrev 𝒪 (H : F[X][Y]) : Type
  • abbrev 𝕃 (H : F[X][Y]) : Type
  • def rationalRoot (H : F[X][Y]) (z : F) : Type
  • def regularElements (H : F[X][Y]) : Type
  • def regularElementsSet (H : F[X][Y]) : Set (𝕃 H)
  • lemma H_tilde'_dvd_of_map_dvd_H_tilde {H p : F[X][Y]} (hHdeg : 0 < H.natDegree)
  • lemma H_tilde'_monic (H : F[X][Y]) (hH : 0 < H.natDegree) :
  • lemma canonicalRepOf𝒪_degree_lt {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) :
  • lemma canonicalRepOf𝒪_mk {H : F[X][Y]} (hH : 0 < H.natDegree) (p : F[X][Y]) :
  • lemma canonicalRepOf𝒪_mk_eq_self_of_degree_lt {H : F[X][Y]} (hH : 0 < H.natDegree)
  • lemma canonicalRepOf𝒪_natDegree_le {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) :
  • lemma canonicalRepOf𝒪_zero {H : F[X][Y]} (hH : 0 < H.natDegree) :
  • lemma embeddingOf𝒪Into𝕃_injective {H : F[X][Y]} (hHdeg : 0 < H.natDegree) :
  • lemma irreducibleHTilde'OfIrreducible {H : F[X][Y]} (hHdeg : 0 < H.natDegree)
  • lemma irreducibleHTildeOfIrreducible {F : Type} [Field F] {H : Polynomial (Polynomial F)}
  • lemma irreducibleHTildeOfIrreducible_of_natDegree_pos
  • lemma isField_of_irreducible {F : Type} [Field F] {H : F[X][Y]} (hHdeg : 0 < H.natDegree) :
  • lemma isField_of_irreducible_of_natDegree_pos {F : Type} [Field F] {H : F[X][Y]}
  • lemma map_H_tilde'_eq_H_tilde (H : F[X][Y]) : (H_tilde' H).map univPolyHom = H_tilde H
  • lemma mk_canonicalRepOf𝒪 {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) :
  • lemma regularElementsSet_add {H : F[X][Y]} {a b : 𝕃 H}
  • lemma regularElementsSet_mul {H : F[X][Y]} {a b : 𝕃 H}
  • lemma regularElementsSet_neg {H : F[X][Y]} {a : 𝕃 H}
  • lemma regularElementsSet_one (H : F[X][Y]) : (1 : 𝕃 H) ∈ regularElementsSet H
  • lemma regularElementsSet_pow {H : F[X][Y]} {a : 𝕃 H}
  • lemma regularElementsSet_prod {ι : Type} {H : F[X][Y]} (s : Finset ι) {f : ι → 𝕃 H}
  • lemma regularElementsSet_sub {H : F[X][Y]} {a b : 𝕃 H}
  • lemma regularElementsSet_sum {ι : Type} {H : F[X][Y]} (s : Finset ι) {f : ι → 𝕃 H}
  • lemma regularElementsSet_zero (H : F[X][Y]) : (0 : 𝕃 H) ∈ regularElementsSet H
  • lemma univPolyHom_injective :
  • noncomputable def H_tilde (H : F[X][Y]) : Polynomial (RatFunc F)
  • noncomputable def H_tilde' (H : F[X][Y]) : F[X][Y]
  • noncomputable def canonicalRepOf𝒪 {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) : F[X][Y]
  • noncomputable def embeddingOf𝒪Into𝕃 (H : F[X][Y]) : 𝒪 H →+* 𝕃 H
  • noncomputable def π_z {H : F[X][Y]} (z : F) (root : rationalRoot (H_tilde' H) z) :
  • noncomputable def π_z_lift {H : F[X][Y]} (z : F) (root : rationalRoot (H_tilde' H) z) :
  • private lemma irreducible_comp_C_mul_X_iff {K : Type} [Field K] (a : K) (ha : a ≠ 0)
  • private lemma irreducible_map_univPolyHom_of_irreducible
  • private lemma mem_span_H_tilde'_of_bivPolyHom_mem_span_H_tilde {H p : F[X][Y]}
  • private lemma monicize_leading_term {K : Type} [Field K] (a : K) (d : ℕ)
  • private lemma monicize_term {K : Type} [Field K] (a b : K) (i d : ℕ)

ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Hensel.lean (57)

  • def AllCoeffRegular (H : F[X][Y]) (φ : PowerSeries (𝕃 H)) : Prop
  • def HasNumeratorShape (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • def IsHenselNumeratorSequence (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • def defaultDegreeBound (R : F[X][X][Y]) (H : F[X][Y]) : ℕ
  • def henselDenominatorExponent (t : ℕ) : ℕ
  • def trivariateTotalDegree (R : F[X][X][Y]) : ℕ
  • lemma coeff_totalDegree_add_index_le_trivariateTotalDegree (R : F[X][X][Y]) {i : ℕ}
  • lemma defaultDegreeBound_ge_H (R : F[X][X][Y]) (H : F[X][Y]) :
  • lemma defaultDegreeBound_ge_R_coeff (R : F[X][X][Y]) (H : F[X][Y]) {i : ℕ}
  • lemma henselDenominatorExponent_succ (t : ℕ) :
  • lemma henselDenominatorExponent_zero : henselDenominatorExponent 0 = 0
  • noncomputable def alphaOfNumerators (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def alphaSeq (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def bSeq (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def evalRAtPowerSeries (x₀ : F) (H : F[X][Y]) (R : F[X][X][Y])
  • noncomputable def gammaFromAlpha (H : F[X][Y]) (αseq : ℕ → 𝕃 H) :
  • noncomputable def gammaOfNumerators (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def henselCoeffResidual (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def liftCoeffToPowerSeries (x₀ : F) (H : F[X][Y]) :
  • theorem AllCoeffRegular.X {H : F[X][Y]} : AllCoeffRegular H (PowerSeries.X)
  • theorem AllCoeffRegular.add {H : F[X][Y]} {φ ψ : PowerSeries (𝕃 H)}
  • theorem AllCoeffRegular.const {H : F[X][Y]} {c : 𝕃 H} (hc : c ∈ regularElementsSet H) :
  • theorem AllCoeffRegular.mul {H : F[X][Y]} {φ ψ : PowerSeries (𝕃 H)}
  • theorem AllCoeffRegular.pow {H : F[X][Y]} {φ : PowerSeries (𝕃 H)}
  • theorem AllCoeffRegular.zero {H : F[X][Y]} :
  • theorem H_eval2_T_div_W_eq_zero (H : F[X][Y])
  • theorem bSeq_eq_zero_of_gt (x₀ : F) (R : F[X][X][Y]) (N j : ℕ) (hj : N < j) :
  • theorem bSeq_stable (x₀ : F) (R : F[X][X][Y]) (N i : ℕ) (hi : i ≤ N) :
  • theorem bSeq_succ_def (x₀ : F) (R : F[X][X][Y]) (N : ℕ) :
  • theorem bSeq_succ_eq_below (x₀ : F) (R : F[X][X][Y]) (N i : ℕ) (hi : i < N + 1) :
  • theorem bSeq_zero (x₀ : F) (R : F[X][X][Y]) (N : ℕ) :
  • theorem beta_zero_eq_X_of_shape (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem coeff_delta_below (x₀ : F) (R : F[X][X][Y]) (N i : ℕ) (hi : i < N + 1) :
  • theorem coeff_evalR_split (x₀ : F) (R : F[X][X][Y]) (n : ℕ) (hn : 1 ≤ n)
  • theorem coeff_evalR_stable (x₀ : F) (R : F[X][X][Y]) (n m : ℕ) (hm : m < n)
  • theorem coeff_liftCoeff_regular (x₀ : F) (H : F[X][Y]) (p : F[X][X]) :
  • theorem coeff_mul_eq_zero_of_orders {A : Type} [CommRing A] {m : ℕ}
  • theorem coeff_mul_of_low_order {A : Type} [CommRing A] (n : ℕ) (P δ : PowerSeries A)
  • theorem coeff_zero_evalR (x₀ : F) (R : F[X][X][Y]) (Γ : PowerSeries (𝕃 H)) :
  • theorem constantCoeff_eval₂_derivative_eq_zeta (x₀ : F) (R : F[X][X][Y])
  • theorem constantCoeff_eval₂_liftCoeff (x₀ : F) (q : F[X][X][Y]) (Γ : PowerSeries (𝕃 H)) :
  • theorem constantCoeff_liftCoeffToPowerSeries (x₀ : F) (p : F[X][X]) :
  • theorem evalX_totalDegree_le_of_coeff_bound (x₀ : F) (R : F[X][X][Y]) {D : ℕ}
  • theorem exists_hensel_alpha_sequence (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem fieldTo𝕃_regular (x₀ : F) (H : F[X][Y]) :
  • theorem formalHenselAlphaSequence (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem gammaOfNumerators_eq_gammaFromAlpha (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem henselClearedTerm_regular (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem henselCoeffResidual_eq_trunc (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem henselCoeffResidual_regular_after_clearing (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem hensel_numerator_sequence_of_alpha_shape (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem initial_root_at_x0 (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem mk_H_tilde_eq_W_pow_mul_eval2 (H : F[X][Y])
  • theorem mk_bSeq_coeff_eq (x₀ : F) (R : F[X][X][Y]) (N i : ℕ) (hi : i ≤ N) :
  • theorem remainder_low_order {A B : Type} [CommRing A] [CommRing B] (n : ℕ)
  • theorem root_bSeq (x₀ : F) (R : F[X][X][Y])
  • theorem zeta_ne_zero_of_Hypotheses (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])

ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Sequence.lean (10)

  • def α (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [φ : Fact (Irreducible H)]
  • def α' (x₀ : F) (R : F[X][X][Y]) (H_irreducible : Irreducible H)
  • def γ (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [φ : Fact (Irreducible H)]
  • def γ' (x₀ : F) (R : F[X][X][Y]) (H_irreducible : Irreducible H)
  • lemma exists_hensel_numerator_sequence (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma βSeq_spec (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def β (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def βSeq (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem exists_regular_numerator_shape (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem regular_numerator_shape_succ (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])

ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Setup.lean (35)

  • def ζ (R : F[X][X][Y]) (x₀ : F) (H : F[X][Y]) [H_irreducible : Fact (Irreducible H)]
  • lemma H_natDegree_le_R_natDegree_of_Hypotheses {x₀ : F} {R : F[X][X][Y]} {H : F[X][Y]}
  • lemma derivative_evalX_coeff (x₀ : F) (R : F[X][X][Y]) (i : ℕ) :
  • lemma derivative_evalX_eq_C_of_natDegree_le_one
  • lemma embeddingOf𝒪Into𝕃_mk_ξ_pre (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma embeddingOf𝒪Into𝕃_ξ (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma evalX_ne_zero_of_Hypotheses {x₀ : F} {R : F[X][X][Y]} {H : F[X][Y]}
  • lemma leadingCoeff_dvd_evalX_coeff_natDegree {x₀ : F} {R : F[X][X][Y]} {H : F[X][Y]}
  • lemma leadingCoeff_dvd_evalX_derivative_coeff_pred {x₀ : F} {R : F[X][X][Y]} {H : F[X][Y]}
  • lemma leadingCoeff_dvd_evalX_leadingCoeff {x₀ : F} {R : F[X][X][Y]} {H : F[X][Y]}
  • lemma natDegree_derivative_evalX_coeff_le (x₀ : F) (R : F[X][X][Y]) {D i : ℕ}
  • lemma ζ_regular_of_derivative_evalX_eq_C (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma ξ_regular (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [H_irreducible : Fact (Irreducible H)]
  • lemma ξ_regular_of_derivative_evalX_eq_C_of_natDegree_le_one
  • lemma ξ_regular_of_natDegree_eq_two
  • lemma ξ_regular_of_natDegree_le_one
  • lemma ξ_weight_le (x₀ : F) (hH : 0 < H.natDegree) (hHyp : Hypotheses x₀ R H)
  • noncomputable def xiPreLower (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) : F[X][Y]
  • noncomputable def xiPreTop (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) : F[X][Y]
  • noncomputable def ξ (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [_φ : Fact (Irreducible H)]
  • noncomputable def ξ_pre (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) : F[X][Y]
  • private lemma evalX_natDegree_le {K : Type} [CommSemiring K] (x : K) (P : K[X][Y]) :
  • theorem cofactor_top_reduction_weight_le {H : F[X][Y]} (hH : 0 < H.natDegree) {Q : F[X][Y]} {d D : ℕ}
  • theorem leadingCoeff_natDegree_le_of_totalDegree_le {D : ℕ} (hD_H : Bivariate.totalDegree H ≤ D) :
  • theorem weight_Λ_over_𝒪_add_le {H : F[X][Y]} {D : ℕ} (hD_H : Bivariate.totalDegree H ≤ D)
  • theorem xiPreLower_coeff_natDegree_le (x₀ : F) {D i : ℕ}
  • theorem xiPreLower_term_weight_le (x₀ : F) (hHyp : Hypotheses x₀ R H) (hRdeg : 2 ≤ R.natDegree)
  • theorem xiPreLower_weight_le (x₀ : F) (hHyp : Hypotheses x₀ R H) (hRdeg : 2 ≤ R.natDegree)
  • theorem xiPreTop_coeff_natDegree_zero_of_H_natDegree_eq_R_natDegree (x₀ : F) (hH : 0 < H.natDegree) (hHyp : Hypotheses x₀ R H)
  • theorem xiPreTop_modByMonic_coeff_natDegree_le (x₀ : F) (hH : 0 < H.natDegree) (hHyp : Hypotheses x₀ R H)
  • theorem xiPreTop_modByMonic_weight_le (x₀ : F) (hH : 0 < H.natDegree) (hHyp : Hypotheses x₀ R H)
  • theorem xiPreTop_topCoeff_mul_natDegree_le (x₀ : F) (hH : 0 < H.natDegree) (hHyp : Hypotheses x₀ R H)
  • theorem xiPreTop_weight_over_𝒪_le (x₀ : F) (hH : 0 < H.natDegree) (hHyp : Hypotheses x₀ R H)
  • theorem xiPreTop_weight_over_𝒪_le_of_H_natDegree_lt_R_natDegree (x₀ : F) (hH : 0 < H.natDegree) (hHyp : Hypotheses x₀ R H)
  • theorem xiPre_eq_lower_add_top (x₀ : F) (hRdeg : 2 ≤ R.natDegree) :

ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Weight.lean (26)

  • def RegularWeightLe {H : F[X][Y]} (hH : 0 < H.natDegree) (a : 𝕃 H) (D B : ℕ) : Prop

…and 84 more not listed.


sorry Tracking

Removed: 5 `sorry`(s)

ArkLib/Data/Polynomial/RationalFunctions.lean (5)

  • lemma Lemma_A_1 {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) (D : ℕ) (L471)
  • lemma irreducibleHTildeOfIrreducible {H : Polynomial (Polynomial F)} : (L52)
  • lemma weight_ξ_bound (x₀ : F) (hH : 0 < H.natDegree) {D : ℕ} (L603)
  • lemma β_regular (R : F[X][X][Y]) (L613)
  • lemma ξ_regular (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [H_irreducible : Fact (Irreducible H)] : (L591)
Added: 2 `sorry`(s)

ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Weight.lean (2)

  • lemma henselClearedTerm_weight (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) (L570)
  • theorem numerator_shape_weight_sharp (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) (L779)

Coverage Notes

  • Additional-instructions analysis was skipped because the full diff exceeded the analysis size budget, and partial results would be misleading.

📄 **Per-File Summaries**
  • ArkLib.lean: Added seven new imports to ArkLib.lean from ArkLib.Data.Polynomial.RationalFunctions, specifically FunctionField, HenselNumerators (including Hensel, Sequence, Setup, Weight), Lifts, RationalRootVanishing, and Weight. This extends the top-level re‑export for the polynomial rational‑functions module, making those theorems, definitions, and structures available to any code that imports ArkLib.

  • ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean: This diff updates Agreement.lean to align it with a refactored framework: the previous BCIKS20AppendixA namespace has been replaced by RationalFunctions.HenselNumerators, and the 𝕃 type, polyToPowerSeries𝕃, γ', and the Hypotheses structure are now accessed from the new location. The lemma exists_factors_with_large_common_root_set gains two new conjuncts in its existential conclusion: the irreducible factor H has 0 < H.natDegree and R(x₀, Y, Z) is separable. Two new lemmas, natDegree_H_pos and evalX_R_separable, extract these properties, and a new lemma claimA2_hypotheses bundles H_dvd_evalX_R and evalX_R_separable into the Hypotheses record for Claim A.2. Consequently, approximate_solution_is_exact_solution_coeffs, approximate_solution_is_exact_solution_coeffs', solution_gamma_is_linear_in_Z, and gamma_eq_P all receive additional explicit arguments (the natDegree positivity and the claimA2_hypotheses proof), and approximate_solution_is_exact_solution_coeffs and approximate_solution_is_exact_solution_coeffs' are still marked sorry.

  • ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Extraction.lean: This diff extracts the proof that any normalized factor of a separable polynomial has positive degree into a separate lemma, pg_natDegree_pos_of_mem_normalizedFactors_of_separable (new), and then adds a new theorem pg_candidatePairs_snd_natDegree_pos which uses that lemma to show that for any pair (R, H) in pg_candidatePairs, the second component H has positive natDegree. The existing theorem pg_card_normalizedFactors_toFinset_le_natDegree is refactored to replace its inlined proof of positivity with a call to the new pg_natDegree_pos_of_mem_normalizedFactors_of_separable.

  • ArkLib/Data/Polynomial/RationalFunctions.lean: This file has been completely restructured: it now serves as an umbrella module that re-exports the content of seven new sub-files (FunctionField, Weight, RationalRootVanishing, Lifts, HenselNumerators.Setup, HenselNumerators.Hensel, HenselNumerators.Weight). All of the original definitions, lemmas, and instances (including H_tilde, H_tilde', 𝕃, 𝒪, embeddingOf𝒪Into𝕃, regularElms_set, π_z, canonicalRepOf𝒪, weight_Λ, weight_Λ_over_𝒪, S_β, Lemma_A_1, liftToFunctionField, liftBivariate, functionFieldT, ζ, ξ, β, α, γ, and the ClaimA2 namespace) have been removed from this file, as have the dependencies on Mathlib and ArkLib imports that were previously here. The only remaining content is a module header and a comment indicating that this file now acts as a 'Compatibility umbrella' for the modularized development.

  • ArkLib/Data/Polynomial/RationalFunctions/FunctionField.lean: This new file defines the function field 𝕃 and the ring of regular functions 𝒪 for a bivariate polynomial H over a field, following Appendix A of [BCIKS20]. It introduces the monicized polynomial H_tilde and its integral version H_tilde', proves irreducibility conditions under positive Y-degree (irreducibleHTildeOfIrreducible, irreducibleHTilde'OfIrreducible), and constructs field and ring structures (isField_of_irreducible, Field instance). The file also provides an embedding of 𝒪 into 𝕃 (embeddingOf𝒪Into𝕃) and proves its injectivity, defines the set of regular elements (regularElementsSet) with closure properties, defines rational substitution maps π_z, and develops canonical representatives (canonicalRepOf𝒪) with associated lemmas.

  • ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Hensel.lean: This file, Hensel.lean, adds the definitions and main theorems implementing the Hensel-lifting construction of Appendix A of [BCIKS20] for trivariate polynomials over a field, formalising the notions of Hensel coefficients, residuals, and a Hensel numerator sequence for a trivariate polynomial R(X,Y,Z) ∈ F[Z][X][Y] with respect to an irreducible bivariate polynomial H ∈ F[X][Y] and a root x₀ of the resultant. The file defines henselDenominatorExponent, trivariateTotalDegree, defaultDegreeBound, the power-series lifting homomorphism liftCoeffToPowerSeries, the evaluation map evalRAtPowerSeries, the function-field element alphaOfNumerators, the power series gammaOfNumerators, the predicate IsHenselNumeratorSequence, and a construction gammaFromAlpha. The central result formalHenselAlphaSequence (line ~520) constructs, under the assumptions hinit (initial root condition) and hzeta (non‑zero derivative ζ), an αseq : ℕ → 𝕃 H such that αseq 0 = T/W and the power series γ = ∑ αᵗ Sᵗ (where S = X - x₀) satisfies evalRAtPowerSeries x₀ H R γ = 0 — this formalises the formal‑Hensel/Newton iteration over the residue field. The file further proves exists_hensel_alpha_sequence (line ~620) that, given Hypotheses x₀ R H, provides the same α‑sequence using initial_root_at_x0 and zeta_ne_zero_of_Hypotheses. The second major block defines AllCoeffRegular (a predicate that all coefficients of a power series are in the regular‑elements set) and proves closure properties (add, mul, pow, const, X, zero, and coeff_liftCoeff_regular). The key combinatorial lemmas henselCoeffResidual_eq_trunc (line ~660) and henselClearedTerm_regular (line ~720) and the final theorem henselCoeffResidual_regular_after_clearing (line ~830) establish that, after multiplying the Hensel residual at step t by a global clearing denominator Ddiv = W^{t+2} · η^{E-1} · W^{d-2} (where W = lifting of the leading coefficient, η = ξ), the result is a regular element — this is the combinatorial heart of clearing denominators (paper A.4, pp. 52–53). No sorry or admit appear in the diff.

  • ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Sequence.lean: This new file adds the theory of Hensel numerator sequences for rational functions over a field, following Appendix A of [BCIKS20]. It defines the theorem regular_numerator_shape_succ giving an inductive step for constructing numerators, and exists_regular_numerator_shape which produces a sequence of regular numerators βseq from an alpha sequence. The lemma exists_hensel_numerator_sequence then provides a sequence βseq satisfying the IsHenselNumeratorSequence property and a weight bound. Finally, noncomputable definitions βSeq, β, α, α', γ, γ' package the chosen sequences and their induced power series, with βSeq_spec stating the specification. No sorry or admit are present.

  • ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Setup.lean: This file adds a new module RationalFunctions.HenselNumerators.Setup that formalises the algebraic setup for Claim A.2 of [BCIKS20]. It introduces:

  • The structure Hypotheses x₀ R H, which states that H divides R(x₀,Y,Z) and that the specialization R(x₀,Y,Z) is separable; it comes with supporting lemmas such as evalX_ne_zero_of_Hypotheses, H_natDegree_le_R_natDegree_of_Hypotheses, leadingCoeff_dvd_evalX_leadingCoeff, leadingCoeff_dvd_evalX_coeff_natDegree, and leadingCoeff_dvd_evalX_derivative_coeff_pred.

  • The definition ζ R x₀ H : 𝕃 H as the evaluation of the derivative specialization R'(x₀, Y, Z) in the function field, together with regularity lemmas ζ_regular_of_derivative_evalX_eq_C, derivative_evalX_eq_C_of_natDegree_le_one, ξ_regular_of_derivative_evalX_eq_C_of_natDegree_le_one, ξ_regular_of_natDegree_le_one, and ξ_regular_of_natDegree_eq_two that produce a preimage in the integral closure 𝒪 H for low-degree cases.

  • The regular element ξ x₀ R H hHyp : 𝒪 H and its explicit polynomial representative ξ_pre (constructed via xiPreLower and xiPreTop), and the key identity embeddingOf𝒪Into𝕃_ξ which shows embedding(ξ) = W^(d-2)·ζ (the algebraic identity of Claim A.2).

  • The bound ξ_weight_le which states that, under a Hypotheses assumption and 2 ≤ natDegreeY R, the weight weight_Λ_over_𝒪 of ξ is ≤ (deg_Y R - 1) * (D - deg_Y H + 1). This is derived from weight_Λ_over_𝒪_add_le, xiPreLower_weight_le, xiPreTop_weight_over_𝒪_le, and a suite of supporting lemmas (xiPreLower_coeff_natDegree_le, xiPreLower_term_weight_le, xiPreTop_modByMonic_weight_le, xiPreTop_modByMonic_coeff_natDegree_le, xiPreTop_coeff_natDegree_zero_of_H_natDegree_eq_R_natDegree, xiPreTop_topCoeff_mul_natDegree_le).

  • ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Weight.lean: This file introduces the concept of RegularWeightLe (a Prop bundling regularity in the image of 𝒪 H with a Λ-weight certificate) and proves sharp per-step Λ-weight bounds for Hensel numerators, following Appendix A of [BCIKS20]. Key definitions include RegularWeightLe, numeratorShapeSharp (a sharp arithmetic bound 1 + (t+1)*(D-dH) + eₜ*((dY-1)*(D-dH+1))), and numeratorShapeSharp_le_loose (showing it weakens to (2t+1)*dY*D). The central theorem is numerator_shape_weight_sharp, which proves by strong induction that Λ(βₜ) ≤ numeratorShapeSharp R H D t, with its successor step relying on the weight-tracking lemma henselClearedResidual_weight (itself using henselClearedTerm_weight). Auxiliary lemmas provide RegularWeightLe instances for common 𝕃 H elements (e.g., RWL_lift, RWL_W, RWL_X, RWL_fieldTo, RWL_binom_coeff, RWL_coeff_liftCoeff, RWL_W_sharp) and algebraic identities (betaSucc_eq_neg_clearedResidual). The proof contains two sorry gaps: one in henselClearedTerm_weight for the boundary summand (where p.1 = 0, j = d = R.natDegree >= 2, p.2 = t+1), and one in numerator_shape_weight_sharp for the degenerate case natDegreeY R = 1.

  • ArkLib/Data/Polynomial/RationalFunctions/Lifts.lean: This new file introduces the notions of regular lifts into function fields from Appendix A of [BCIKS20]. It defines liftToFunctionField and liftBivariate as ring homomorphisms from coefficient polynomials and bivariate polynomials, respectively, into the function field 𝕃 H; functionFieldT as the image of the polynomial variable; fieldTo𝕃 as the scalar embedding; and polyToPowerSeries𝕃 as a power series via lifted coefficients. Key lemmas establish that images of these lifts are regular elements of the function field under various conditions: liftToFunctionField_ne_zero shows nonzero coefficient polynomials remain nonzero assuming H is irreducible of positive Y-degree; regularElementsSet_liftToFunctionField_div_of_dvd and regularElementsSet_liftToFunctionField_div_leadingCoeff_of_dvd handle divisibility by the leading coefficient; W_pow_mul_eval₂_div_eq_sum gives a sum decomposition for clearing denominators; and regularElementsSet_eval₂_linear_of_coeff_one_dvd and regularElementsSet_mul_pow_eval₂_div_of_natDegree_le_succ_of_coeff_succ_dvd provide sufficient conditions for regularity of evaluations at T / W.

  • ArkLib/Data/Polynomial/RationalFunctions/RationalRootVanishing.lean: This new file adds definitions and theorems for Appendix A of the BCIKS20 paper on rational-root vanishing. It defines H_tilde_prime_coeff_natDegree_le_of_totalDegree bounding coefficients of H_tilde' H, canonicalRep_coeff_natDegree_le_of_weight_bound bounding coefficients of the canonical representation via weight, embedding_eq_zero_of_resultant_zero showing the embedding vanishes when the resultant of the canonical representation and H_tilde' H is zero, natDegree_det_le_of_perm_products_le bounding the determinant's degree by the product degrees, natDegree_resultant_le_weight_bound bounding the resultant's degree, poly_eq_zero_of_ncard_gt_bound_of_subset_roots that a polynomial is zero if it has too many roots, resultant_eval_eq_resultant_map_eval_fixed_degrees relating evaluation of resultant to resultant of maps, resultant_fixed_degree_eq_zero_of_common_root_of_monic_right giving a condition for zero resultant, Sbeta_subset_resultant_roots embedding the set S_β β into roots of the resultant, weight_bot_embedding_zero that embedding is zero when the weight is , and the key lemma lemmaA1_embedding_eq_zero_of_many_rational_roots (Lemma A.1) establishing that the embedding is zero when the set S_β β has cardinality exceeding the weight times H.natDegree. The file also imports several Mathlib modules for polynomials, resultants, and principal ideal domains, and opens Polynomial, Polynomial.Bivariate, ToRatFunc, and Ideal.

  • ArkLib/Data/Polynomial/RationalFunctions/Weight.lean: This file introduces the Λ-weight function weight_Λ on bivariate polynomials F[X][Y] over a domain F, along with its extension weight_Λ_over_𝒪 to the quotient ring 𝒪 H = F[X][Y]/(H_tilde' H). It proves basic algebraic properties of weight_Λ (invariance under negation, sub-additivity for sum/subtraction/finite sums, bounds for monomials/C c/C c*X^k, and a sub-additivity lemma weight_Λ_C_mul_X_pow_mul_le for multiplication by C c * X^k). It also proves key lemmas about the monic associate H_tilde' H: that weight_Λ of H_tilde' H is bounded by H.natDegree * (D+1-natDegreeY H) (Lemma weight_Λ_H_tilde'_le), that subtracting a suitable multiple of H_tilde' H from a polynomial does not increase its Λ-weight (weight_Λ_sub_leadingCoeff_mul_H_tilde'_le), and that reduction modulo H_tilde' H (p %ₘ H_tilde' H) is Λ-weight non-increasing (weight_Λ_modByMonic_H_tilde'_le). The file then defines the set S_β from Lemma A.1 of [BCIKS20] and provides auxiliary lemmas natDegree_H_tilde', canonicalRepOf𝒪_natDegree_lt_H, and π_z_eq_eval_canonicalRepOf𝒪. No sorry or admit are present.

  • docs/kb/audits/bciks20-appendix-a-rational-functions.md: Summary unavailable — error: 1 validation error for _ProseSummary
    Invalid JSON: expected value at line 1 column 1 [type=json_invalid, input_value='The documentation was up...e of the formalization.', input_type=str]
    For further information visit https://errors.pydantic.dev/2.13/v/json_invalid

  • 4 file(s) filtered as noise (lockfiles, generated, or trivial): docs/kb/_generated/declarations.json, docs/kb/_generated/dedup-report.md, docs/kb/_generated/lean-citations.json, docs/kb/log.md


Last updated: 2026-07-14 13:35 UTC.

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

🤖 AI Review

Overall Summary:
TL;DR: The PR successfully introduces the positive Y-degree requirement for the extracted polynomial H across the function field construction, but it requires changes due to unresolved sorrys and a critical underspecification of the Hensel lift numerator β.

Mechanical Pre-Check Results: Mechanical pre-checks reveal numerous sorry escape hatches remaining in RationalFunctions.lean, Extraction.lean, and Agreement.lean, which violate the strict kernel verification policy.

Checklist Coverage: No explicit checklist was provided for this PR.

Cross-File Issues: The degree constraint on H is excellently threaded across the PR via typeclasses ([Fact (0 < H.natDegree)]). However, cross-file analysis reveals that the existential witness for β_regular was trivialized to 0, decoupling the extracted β from its true mathematical definition and breaking downstream algebraic composition.

Critical Misformalizations:

  • Underspecification of β due to a trivialized existential witness. β_regular only asserts the existence of an element satisfying a weight bound, and the PR replaces the sorry here with a trivial proof (fun _ => ⟨0, by simp⟩). Consequently, β R t (defined via .choose) evaluates to an arbitrary value instead of the required Hensel lift numerator, breaking theorems like approximate_solution_is_exact_solution_coeffs. (ArkLib/Data/Polynomial/RationalFunctions.lean:783-799)

Key Lean 4 / Mathlib Issues:

  • The PR contains unresolved sorry escape hatches, which bypass the Lean kernel and leave the formal verification incomplete. All proofs must be completed. (ArkLib/Data/Polynomial/RationalFunctions.lean, ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Extraction.lean, ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean)

Overall Verdict: Changes Requested


🔍 **Mechanical Pre-Check Results**

Pre-existing escape hatches in touched files (context only, does not affect verdict):

  • sorry in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean line 35: (Bivariate.evalX z.1 H).eval (Pz.eval x₀) = 0} sorry)
  • sorry in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean line 38: 2 * D_Y Q ^ 2 * (D_X ((k + 1 : ℚ) / n) n m) * D_YZ Q := by sorry
  • sorry in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean line 68: := by sorry
  • sorry in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean line 87: sorry
  • sorry in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean line 101: ) := by sorry
  • sorry in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean line 130: (Pz (matching_set_is_a_sub_of_coeffs_of_close_proximity k h_gs h)).eval (ωs x)} sorry
  • sorry in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean line 148: := by sorry
  • sorry in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean line 167: * D := by sorry
  • sorry in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Extraction.lean line 38: := sorry
  • sorry in ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Extraction.lean line 45: Bivariate.evalX x₀ (Bivariate.discr_y R) ≠ 0 := by sorry
  • sorry in ArkLib/Data/Polynomial/RationalFunctions.lean line 136: sorry
  • sorry in ArkLib/Data/Polynomial/RationalFunctions.lean line 567: embeddingOf𝒪Into𝕃 _ β = 0 := by sorry
  • sorry in ArkLib/Data/Polynomial/RationalFunctions.lean line 687: sorry
  • sorry in ArkLib/Data/Polynomial/RationalFunctions.lean line 699: sorry
🔗 **Cross-File Analysis**

Cross-File Analysis:

  1. Composition Chains: The PR successfully fixes a mathematical gap in the function field construction by requiring the extracted polynomial H to have a strictly positive Y-degree. This constraint is correctly threaded across files: Extraction.lean provides the foundational lemma pg_candidatePairs_snd_natDegree_pos showing valid factors have positive degree. RationalFunctions.lean updates the Field instance for 𝕃 H to demand [Fact (0 < H.natDegree)], propagating this down to Hensel lifting primitives like α and γ. Finally, Agreement.lean stitches these together by extracting natDegree_H_pos and correctly passing it into the evaluations of α' and γ'. The interface composition here is structurally excellent.

  2. Type-Flow: Typeclass instances flow properly. The explicit parameter hHdeg passed to α' and γ' is correctly repackaged into the [Fact (0 < H.natDegree)] instance required by the section variables in ClaimA2.

  3. Axiom Impact & Issues: The PR admirably removes critical sorrys in the RationalFunctions.lean algebraic proofs. However, it replaces the sorry for β_regular with a trivial dummy proof (fun _ => ⟨0, by simp⟩). Because β is defined as the Classical.choose of β_regular, and β_regular only constrains the weight (which 0 trivially satisfies), β becomes completely decoupled from its true mathematical definition (the Hensel lift numerators). This underspecification breaks downstream proofs that rely on β behaving like the actual algorithm.

  4. External Dependencies: Usage of Mathlib.RingTheory and FieldTheory (e.g., algEquivCMulXAddC, Polynomial.IsPrimitive) is entirely sound.

Cross-File Composition Issues:

  • Underspecification of β due to a trivialized existential witness. β_regular only asserts the existence of an element satisfying a weight bound inequality. The PR replaces the sorry here with a trivial proof fun _ => ⟨0, by simp⟩ because 0 naturally has a minimal weight (). Consequently, β R t (defined as the .choose of this lemma) evaluates to an arbitrary/trivial value instead of the required Hensel lift numerator. Downstream uses of α and γ will evaluate to mathematically meaningless values, breaking the composition chain for theorems like approximate_solution_is_exact_solution_coeffs which expect α to hold exact polynomial approximations. (ArkLib/Data/Polynomial/RationalFunctions.lean:783-799)
    • Suggested fix: Define β R t explicitly via its structural recurrence / algebraic identity (similar to how ξ is uniquely specified by its mapping equation). The weight bound should be formulated as a separate theorem about this explicitly defined β, rather than defining β as the arbitrary witness of the weight bound.

Axiom/Escape Hatch Impact: None

External Dependency Issues: None

Missing Cross-File Verification: None

Cluster: Function Field Y-Degree Fix (critical)

Are the new hypotheses 0 < H.natDegree correctly propagated from the polynomial factorization in Extraction.lean through the list decoding agreement in Agreement.lean to ensure the irreducibility of H_tilde and construction of the function field in RationalFunctions.lean?

📄 **Review for `ArkLib/Data/Polynomial/RationalFunctions.lean`**

Analysis:
VERDICT: Changes Requested. The PR introduces mathematical fixes for the function field construction but leaves several 'sorry' stubs, violating the strict escape hatch policy.

Context validation: The introduction of the positive Y-degree requirement (0 < H.natDegree) correctly resolves the irreducibility issue over the function field. The structural changes to definitions like H_tilde, isField_of_irreducible, and the ClaimA2 embeddings cleanly propagate this constraint via [Fact (0 < H.natDegree)].

Resolution leap: Despite the valid mathematical updates, the file retains unresolved sorry instances (e.g., Lemma_A_1, ξ_regular, weight_ξ_bound). These bypass the Lean kernel and immediately force a rejection under the escape hatch guidelines.

Verdict: Changes Requested

Critical Misformalizations: None

Lean 4 / Mathlib Issues:

  • The file contains unresolved sorry escape hatches, which bypass the Lean kernel. All proofs must be completed, as sorry is strictly prohibited under the hard rules. (ArkLib/Data/Polynomial/RationalFunctions.lean)
    • Suggested fix: Replace sorry with fully verified proofs for Lemma_A_1, ξ_regular, and weight_ξ_bound.

Nitpicks: None

📄 **Review for `ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Extraction.lean`**

Analysis:
The pull request modifies Extraction.lean to explicitly prove that the natDegree of normalized factors of separable polynomials is strictly positive (> 0).

  1. Mathematical Logic:

    • The lemma pg_natDegree_pos_of_mem_normalizedFactors_of_separable extracts a previously inline block of proof that shows if a polynomial H is an irreducible factor of a separable polynomial p, its degree must be strictly positive.
    • The proof goes by contradiction: If H.natDegree = 0, then H is a constant polynomial C (H.coeff 0). Since H must be separable (dividing a separable polynomial p), H.coeff 0 must be a unit in the base ring (here F[Z]). That implies H itself is a unit. However, H is irreducible and therefore cannot be a unit, resulting in a contradiction.
    • The lemma pg_candidatePairs_snd_natDegree_pos directly uses this property to show that the H component of any extracted pair (R, H) has positive degree. This neatly ties up the hypothesis required for H being non-trivial, which cascades into the function field constructions elsewhere (such as in RationalFunctions.lean where H_tilde irreducibility depends on 0 < H.natDegree).
  2. Lean / Mathlib Validation:

    • The types match up perfectly. R : F[Z][X][Y] evaluated at x₀ yields an element of F[Z][X], and extracting factors yields H : F[Z][X].
    • Substitution of 1 ≤ q.natDegree with 0 < q.natDegree works definitionally in Lean for Nat type, ensuring a smooth refactor in pg_card_normalizedFactors_toFinset_le_natDegree.
    • The omit context bounds and type variables are consistent and properly managed.
    • No escape hatches (like sorry or axiom) have been introduced.

Everything is well-typed, mathematically sound, and properly integrated.

Verdict: Approved

Critical Misformalizations: None

Lean 4 / Mathlib Issues: None

Nitpicks: None

📄 **Review for `ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean`**

Analysis:
Verdict: Changes Requested.
Initial logic and parameters are validated. Standard processing applied to the mathematical updates regarding the positive degree requirement (0 < H.natDegree) for the function field construction. Final evaluation indicates the presence of sorry blocks in the modified declarations, which strictly violates kernel verification requirements.

Verdict: Changes Requested

Critical Misformalizations: None

Lean 4 / Mathlib Issues:

  • The file contains sorry in multiple proofs, which acts as a kernel bypass and leaves the formal verification incomplete. (ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean:93)
    • Suggested fix: Complete the formal proofs and remove all instances of sorry.

Nitpicks: None

alexanderlhicks and others added 8 commits May 9, 2026 17:08
Replace `(ξ_regular).choose` with an explicit polynomial witness so that
`canonicalRepOf𝒪 hH ξ` has a tractable form for `weight_ξ_bound`. Also
adds reusable helper `W_pow_mul_eval₂_div_eq_sum` extracting the
denominator-clearing rewrite shared by both the regular-witness proof
and the embedding equation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Foundation lemmas for `weight_Λ` from Appendix A.2 of [BCIKS20]:
* `le_weight_Λ_of_mem_support`, `weight_Λ_le_iff` (characterization)
* `weight_Λ_C_le`, `weight_Λ_X_pow_le`, `weight_Λ_C_mul_X_pow_le` (monomials)
* `weight_Λ_neg`, `weight_Λ_add_le`, `weight_Λ_sub_le`, `weight_Λ_sum_le`

Statement gotcha: lemmas use `WithBot.some (...)` rather than `(↑(...) : WithBot ℕ)`,
since `Finset.le_sup` returns the former and the cast form trips up unification.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`weight_Λ_C_mul_X_pow_mul_le`: if `Λ(f) ≤ b`, then
`Λ(C c · Y^k · f) ≤ k · m + c.natDegree + b`. This is the specific shape
needed for the mod-reduction step `p ↦ p − C(p.leadingCoeff) · Y^j · H_tilde'`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`weight_Λ_H_tilde'_le`: when `D ≥ totalDegree H` and `0 < H.natDegree`,
`Λ(H_tilde' H) ≤ d_H · m`. The exact bound (with equality when totalDegree H = D)
follows from term-by-term analysis: each lower term `H.coeff i · W^(d_H-1-i) · Y^i`
has weight `i·m + (D-i) + (d_H-1-i)(D-d_H)`, which collapses to `d_H·m` after
algebraic simplification.

Also adds `natDegree_coeff_le_of_totalDegree_le` (utility), and bumps the longFile
linter cap to 1700 to accommodate ongoing weight-bound work.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`natDegree_H_tilde' : (H_tilde' H).natDegree = H.natDegree` when `0 < H.natDegree`.
Proved via the explicit decomposition `X^d + lower` with `lower.degree < d`.
Needed to align with `Polynomial.modByMonic`'s use of `q.natDegree` in its
recursive step.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`weight_Λ_sub_leadingCoeff_mul_H_tilde'_le`: subtracting `C(p.leadingCoeff) ·
Y^(p.natDegree - d_H) · H_tilde' H` from `p` doesn't increase Λ-weight.

The full mod-reduction non-increase (`weight_Λ_modByMonic_le`) iterates this step
across the recursion of `Polynomial.modByMonic`; the inductive proof is in progress.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lalalune referenced this pull request in lalalune/ArkLib Jun 5, 2026
# Conflicts:
#	ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean
#	ArkLib/Data/Polynomial/RationalFunctions.lean
aleph-prover Bot and others added 3 commits June 7, 2026 10:25
Automated commit at 20260607_005126

Co-authored-by: aleph-prover[bot] <247409690+aleph-prover[bot]@users.noreply.github.com>
Automated commit at 20260607_022426

Co-authored-by: aleph-prover[bot] <247409690+aleph-prover[bot]@users.noreply.github.com>
@alexanderlhicks
alexanderlhicks marked this pull request as ready for review June 8, 2026 13:54
alexanderlhicks and others added 7 commits June 25, 2026 22:26
….2 scaffolding

The lone remaining sorry in Claim A.2 (exists_hensel_numerator_sequence) was
unprovable as stated: gammaOfNumerators encoded the lift via
PowerSeries.subst with constant term -x₀, but Mathlib's subst requires a
nilpotent constant coefficient. Over the field 𝕃 H that forces x₀ = 0, so for
x₀ ≠ 0 the substitution degenerated to junk and the root condition was false.

Per BCIKS20 Appendix A.4, γ = ∑ αₜ(X-x₀)ᵗ ∈ L[[X-x₀]] with R(X,γ,Z)=0: the
x₀-shift belongs at R's X-variable (X ↦ x₀+S), not in γ. Fix:
  - liftCoeffToPowerSeries now takes x₀ and sends X ↦ C x₀ + S
  - evalRAtPowerSeries threads x₀
  - gammaOfNumerators / gammaFromAlpha are the plain local series PowerSeries.mk α

Ported the Claim A.2 Hensel scaffolding from PR #540, re-verified under the
corrected coordinate. The theorem is now a true statement reduced to exactly
three isolated, documented cores (formal Hensel α-sequence, residual
regularity, weight induction). Downstream Agreement.lean still builds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ensel existence)

Closes the formal-Hensel / Newton-iteration core of Claim A.2: existence of
the coefficient sequence αseq with α₀ = T/W and R(x₀+S, ∑αₜSᵗ, Z) = 0 in
𝕃 H⟦S⟧. Proved bottom-up via a Taylor linear-approximation lemma
(remainder_low_order), a coefficient-split lemma showing the degree-n
coefficient is ζ·αₙ + (terms in α_{<n}) with the linear coefficient equal to ζ
by definitional unfolding, and a well-founded construction αₙ := -cₙ/ζ whose
every coefficient vanishes by strong induction (root_bSeq), assembled with
PowerSeries.ext.

#print axioms formalHenselAlphaSequence = [propext, Classical.choice,
Quot.sound] (no sorryAx). Two Claim A.2 cores remain (residual regularity,
weight induction).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ring

Closes the residual-regularity core of Claim A.2 (BCIKS20 App A.4, pp.52-53).
Via the existing coeff_evalR_split, the Hensel residual equals coeff (t+1) of R
evaluated at the truncated series mk αtrunc (the ζ·α(t+1) linear term cancels
exactly). Expanding eval₂ over R.support with coeff_mul/coeff_pow reduces to a
per-composition clearing argument: parts > t vanish; otherwise the denominator
W^{i+1} eta^{e_i} of each factor divides Ddiv (exponent bounds ∑e ≤ E-1=2t and
W-budget b+j ≤ t+d, with the single boundary W-deficit covered by
leadingCoeff_dvd_evalX_coeff_natDegree: coeff 0 of liftCoeff (R.coeff d) is W
times a regular element). Regularity follows from closure of regularElementsSet,
packaged via a reusable AllCoeffRegular predicate.

This makes exists_regular_numerator_shape and regular_numerator_shape_succ fully
axiom-clean, i.e. the entire lift-semantics conjunct of Claim A.2 is now proved.
#print axioms henselCoeffResidual_regular_after_clearing = [propext,
Classical.choice, Quot.sound]. One core remains (weight-bound induction).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…und gap

Adds reusable, axiom-clean Λ-weight bookkeeping for Claim A.2's weight bound:
weight_Λ_mul_le' / weight_Λ_over_𝒪_mul_le' (subadditivity under multiplication),
weight_Λ_over_𝒪_neg, and a RegularWeightLe certificate predicate with closure
API (.mono/.mul/.add/.neg/.pow/.sum/.prod) plus base certificates (RWL_lift,
RWL_W, RWL_X, RWL_fieldTo, RWL_binom_coeff, RWL_coeff_liftCoeff).

Documents the precise remaining gap in numerator_shape_weight_succ_le_strong:
the lemma is unprovable as structured because the loose induction hypothesis
Λ(βₛ) ≤ (2s+1)·dY·D cannot feed multiplicatively (a β₁² term already gives
6·dY·D > 5·dY·D at t=1). The paper's bound 1+(t+1)Λ(W)+eₜΛ(ξ) telescopes only at
the sharp level; closing it needs sharp X/Y-degree accounting through the
%ₘ H_tilde' reduction (a strengthened induction, not the loose ihAll).

File builds; one documented sorry remains (the weight bound). Cores #1
(Hensel-lift existence) and #2 (residual regularity) are proved axiom-clean, so
the entire lift-semantics conjunct of Claim A.2 holds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…oping

Add RWL_W_sharp (Λ(W) ≤ D - dH), numeratorShapeSharp definition, and
numeratorShapeSharp_le_loose (the pure-arithmetic final weakening
sharp t ≤ (2t+1)·dY·D). These set up the sharp induction that replaces the
unprovable loose successor step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the unprovable loose successor step numerator_shape_weight_succ_le_strong
with a sharp strong-induction (numerator_shape_weight_sharp) bounding
Λ(βₜ) ≤ numeratorShapeSharp R H D t. numerator_shape_weight_bound (statement
unchanged, consumed by exists_hensel_numerator_sequence) now weakens the sharp
bound via numeratorShapeSharp_le_loose.

Proven: the βₜ₊₁ = -(residual·Ddiv) bridge identity (betaSucc_eq_neg_clearedResidual),
the embedding→𝒪 weight bridge, the zero/successor induction skeleton.
The single remaining sorry is now the precisely-stated weight-tracking core
henselClearedResidual_weight (Λ-graded analogue of henselClearedTerm_regular).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Implement henselClearedTerm_weight (Λ-graded analogue of henselClearedTerm_regular):
the full coeff_mul/coeff_pow expansion, per-composition product clearing, the
sharp-sum identity ∑sharp(l i)=j+Pw·ΛW+Pe·Λξ, and the non-boundary per-summand
weight bound (D + wb·ΛW + E1·Λξ ≤ sharp(t+1), reduced to dH ≤ dY) are all proven.

Fill henselClearedResidual_weight fully (henselCoeffResidual_eq_trunc + expansion +
RegularWeightLe.sum over henselClearedTerm_weight), taking 2 ≤ natDegreeY R.

Two precisely-isolated gaps remain:
  1. the single boundary summand (p.1=0, j=d≥2, p.2=t+1) where uniform accounting
     over-counts by D-d and the refined zero-part/multiplicity bookkeeping is needed;
  2. the degenerate natDegreeY R = 1 case (ξ_weight_le needs 2 ≤ dY).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Conflicts resolved:
- ArkLib/Data/Polynomial/RationalFunctions.lean: keep the modularized umbrella;
  every declaration from main's monolith is present under the renamed
  RationalFunctions namespace (regularElms_set -> regularElementsSet,
  H_tilde_equiv_H_tilde' -> map_H_tilde'_eq_H_tilde, Lemma_A_1 ->
  lemmaA1_embedding_eq_zero_of_many_rational_roots, weight_xi_bound ->
  xi_weight_le, beta_regular -> exists_hensel_numerator_sequence).
- Ported main's 4.31 fix for regularElementsSet_liftToFunctionField into Lifts.lean.
- docs/kb/_generated/*: take main (regenerated below).
- docs/kb/log.md: keep both histories.
…yle names

Lean 4.31:
- isUnit_of_mul_eq_one -> IsUnit.of_mul_eq_one (removed from Mathlib).
- Clear every non-sorry warning under ArkLib/Data (validate.sh fails on those):
  62 over-long lines rewrapped, push_neg -> push Not, unnecessary simpa -> simp,
  unused simp arguments dropped, `show`-as-`change`, flexible `simp` in
  exists_regular_numerator_shape replaced by `simp only [dif_pos/dif_neg]`,
  maxHeartbeats justification comment, and `omit`/explicit-hypothesis fixes for
  auto-included section variables.

Claim A.2 restructure (BCIKS20 A.4):
- exists_hensel_numerator_sequence now states existence ONLY.  Previously it
  bundled the weight bound, so betaSeq := choose ... dragged the open
  quantitative step into alpha, gamma and every consumer (Agreement.lean's
  Claims 5.8/5.9).  Those are now axiom-clean.
- New hensel_numerator_weight_sharp_le / hensel_numerator_weight_le state the
  bounds for an arbitrary Hensel numerator sequence, via
  hasNumeratorShape_alphaOfNumerators; betaSeq_weight_sharp_le /
  betaSeq_weight_le specialize them; claimA2 recombines the paper's statement.
- Expose the SHARP bound (1 + (t+1)L(W) + e_t L(xi)) alongside the loose
  (2t+1)dD: Claim 5.10 needs the sharp form, which telescopes over t = 0..k.
  The loose bound alone does not suffice there.

Faithfulness fix: 2 <= degY R is now a hypothesis of the weight bounds.
It is the paper's own standing assumption in A.4 (xi = W^{d-2} zeta in O), and
Lean's truncated subtraction had silently made the statement stronger than the
paper's and false for degY R = 1.  This removes one of the two sorries -- that
branch was unprovable, not merely unproved.

The remaining sorry (henselClearedTerm_weight, boundary summand) is documented
with the actual obstruction: the (A.1)-recursion route is exactly tight and
cannot close, in the paper as well as here.  See docs/kb/audits/.
Definitions must be lowerCamelCase and theorems snake_case (CONTRIBUTING.md,
Lean community guidelines).  Greek letters are kept where Mathlib wants them --
as variables and in docstring prose, which is how BCIKS20 writes them -- and
removed from declaration names, matching the ASCII names the development already
used elsewhere (alphaOfNumerators, gammaOfNumerators, xiPre*).

  H_tilde, H_tilde'          -> monicizeRatFunc, monicize
  weight_Λ, weight_Λ_over_𝒪  -> weight, regularWeight
  RWL_*                      -> regularWeightLe_*
  S_β                        -> rationalVanishingSet
  ξ_pre                      -> xiPre  (matches xiPreLower / xiPreTop)
  ζ, ξ, α, α', γ, γ', β, βSeq -> zeta, xi, alpha, alpha', gamma, gamma', beta,
                                 betaSeq
  π_z, π_z_lift              -> piZ, piZLift
  claimA2                    -> claimA2_exists_numerators_with_weight_bounds
  *_of_Hypotheses            -> *_of_hypotheses
  W_pow_mul_eval₂_div_eq_sum -> leadingCoeff_pow_mul_eval₂_div_eq_sum
  weight_bot_embedding_zero  -> embedding_eq_zero_of_weight_eq_bot

Also fixes the 10 lint-style.py findings in these files (isolated `by`, `:`/`:=`
before line breaks, statement continuation indentation), and makes the
positive-degree dependency of the xiPreLower weight chain explicit rather than
pulling it from the `Fact` instance, so the auto-included section variables can
be omitted.

`𝕃` and `𝒪` are left as-is: they read as notation for the function field and its
ring of regular elements, in the spirit of Mathlib's `𝓞 K`.
…mand

The per-summand budget of henselClearedTerm_weight is very likely too strong,
not merely hard to prove: R(x0,.,Z) = H*q makes the deficit Lambda(leadingCoeff q),
which is unbounded.  numerator_shape_weight_sharp can still hold, since Lambda of
the sum over j only bounds the max after the cancellations (A.1) produces, so the
fix is to weaken that lemma rather than grind the case.

Also records that the paper's alternative route (Lambda(alpha_t) = 1) needs care:
with the exact Lambda(W) the claim already fails at t = 0 unless Lambda(W) = D - dH.
The Lean statement substitutes the paper's own bounds into the RHS, which is the
reading under which the base case holds -- and is proved here.
From a full review of the package against BCIKS20 Appendix A.1-A.4.

Uniqueness of the Hensel lift (A.4: "at each step the lifting is unique"), which
the paper invokes by name in the proof of Claim 5.9 and which was absent:
- hensel_alpha_sequence_unique: two coefficient sequences that agree at t = 0 and
  both make gamma a root of R(x0 + S, ., Z) are equal.  The induction is the
  paper's own -- coeff_evalR_split makes the n-th coefficient zeta * alpha_n plus
  a term in alpha_i (i < n), and zeta is invertible.
- IsHenselNumeratorSequence.unique / .eq_betaSeq: the numerator-level forms.
  betaSeq is therefore THE sequence of Claim A.2, not an arbitrary choice.
All axiom-clean.

Restored: betaSeq_weight_{sharp_,}le_defaultDegreeBound.  Splitting existence from
the weight bounds had orphaned defaultDegreeBound_ge_{H,R_coeff} and, worse, lost
the specialization for callers with no D of their own -- which is exactly the
list-decoding files, since Claim 5.7 hands them no degree bound.

Removed nine declarations subsumed by general results: the xi_regular
special-case tower (natDegree <= 1 / = 2 / derivative-constant, and
zeta_regular_of_derivative_evalX_eq_C under it) now that the general xi_regular
is proved; the regularElements subtype (which had no ring structure -- `𝒪` is
the ring of regular elements); canonicalRepOf𝒪_natDegree_le (superseded by the
strict _lt_H); the `beta` alias; xiPreTop_topCoeff_mul_natDegree_le; and
regular_liftToFunctionField.  Kept, with reason: the regularElementsSet closure
family incl. _sub (API completeness), the Lifts denominator-clearing lemmas (the
A.1 toolkit a Claim 5.10 proof will want), and the @[simp] members.

Each of the eight files now has a module docstring naming its own paper section,
replacing the identical "We define the notions of Appendix A of [BCIKS20]".

Trimmed the mathlib import preamble that had been copy-pasted into all eight
files: 21 imports removed, each verified by build.  It still carried
PowerSeries.Substitution everywhere -- a fossil of the pre-coordinate-fix
PowerSeries.subst formulation, unused since that bug was fixed.

Docs: corrected the Appendix A audit, which wrongly listed Lemma A.1 as
incomplete (it is proved and axiom-clean).
…it corrections

Closes the tractable Appendix A gaps from the review.

A.3's extension of the rational substitution beyond 𝒪 -- "pi_z can be extended
naturally to any element of L for which z is not a pole, i.e. elements of the
form beta / C(Z)".  piZOfDiv gives the value on a presentation; piZOfDiv_congr
shows it depends only on the quotient in L (clear denominators, then injectivity
of the embedding together with pi_z of a constant being its evaluation), so this
is a genuine function on that subring.  Plus piZOfDiv_one (it extends piZ) and
piZOfDiv_eq_zero_iff, which is the form section 5 uses to turn "many
substitutions kill beta / C" into a hypothesis of Lemma A.1.

A.2's exact weight of the monicization, Lambda(H~) = d(D+1-d) (weight_monicize):
the upper bound was there, the lower bound is the leading monomial T^d, whose
coefficient is 1 by monicity.

A.2's minimality of Lambda over representatives, in the paper's own phrasing
(regularWeight_le_of_mk_eq).  This was already available as regularWeight_mk_le;
the audit had listed it as a gap.

All axiom-clean.

Two corrections to my own earlier audit recommendations:
- 2 <= deg_Y R canNOT be added to Claim 5.7's conclusion.  R is an arbitrary
  irreducible factor of Q there, and deg_Y R = 1 is precisely what section 5 sets
  out to prove ("our goal will be to show that Q has a factor of the form
  Y - P(X,Z) ... and in fact R is this factor").  The hypothesis has to be
  discharged by a case split inside section 5; the deg_Y R = 1 branch does not
  need the weight machinery at all.
- The paper's sharper Lambda(xi) <= (D-1) + (d-2)Lambda(W) is not provable as
  stated: term by term over xiPre it reduces to D - dH <= Lambda(W), while
  Lambda(W) <= D - dH always.  Same hidden Lambda(W) = D - dH assumption as the
  weight-bound finding.  Only the weaker (d-1)(D-dH+1) holds, and that is what
  xi_weight_le proves.

Also fixes two matrix rows that named declarations removed in the cleanup.
weight_mul : weight (f * g) H D = weight f H D + weight g H D -- the equality
A.2 states ("Note that Lambda is fully additive on F_q[T, Z], i.e. for any A, B,
Lambda(AB) = Lambda(A) + Lambda(B)").  Only the sub-additive direction was
formalized.

The reverse inequality is the graded-domain argument in concrete form.  The
weight assignment grades F[Z][T], so the associated graded ring is again a
polynomial ring and top-weight parts cannot cancel; the proof witnesses this at
the LARGEST maximizing index of each factor (exists_top_weight_index).  For any
other (i, j) with i + j = N_f + N_g one has i > N_f or j > N_g, and maximality
then costs at least one Z-degree, so the product of the two top coefficients
survives in the (N_f + N_g)-th coefficient of f * g with Z-degree exactly
deg f_{N_f} + deg g_{N_g}.  IsDomain F is required, and is exactly what makes the
statement true (over Z/4, f = g = 2 gives bottom on the left and 0 + 0 on the
right).

Also moves weight_mul_le' out of HenselNumerators/Weight.lean into the
Lambda-calculus file: it only needs weight_le_iff, and belongs with the rest of
the weight algebra rather than with the Hensel-specific material.

Appendix A.1-A.3 now has no outstanding items.  Axiom-clean.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Summary

sorry delta: -7 (7 removed) — net proof progress

The PR completes the formalization of Appendix A of BCIKS20 in the RationalFunctions module, which is now a directory of seven submodules. The core additions are complete proofs for Lemma A.1 (rational root vanishing) and Claim A.2 (Hensel numerator existence, uniqueness, and weight bounds). All previously sorry-marked declarations have been resolved and moved into their respective submodules; no sorry or admit remain in any file. The modularization also resolves several technical discrepancies with the paper (documented in the audit file). Downstream consumers in BCIKS20 list-decoding proofs have been updated to use the new module structure and renamed declarations, with minor adjustments to statement forms (e.g., coefficient conditions).


Statistics

Metric Count
📝 Files Changed 14
Lines Added 6062
Lines Removed 698

Lean Declarations

✏️ Removed: 64 declaration(s)

ArkLib/Data/Polynomial/RationalFunctions.lean (64)

  • abbrev 𝒪 (H : F[X][Y]) : Type
  • abbrev 𝕃 (H : F[X][Y]) : Type
  • def rationalRoot (H : F[X][Y]) (z : F) : Type
  • def regularElms (H : F[X][Y]) : Type
  • def regularElms_set (H : F[X][Y]) : Set (𝕃 H)
  • def α (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [φ : Fact (Irreducible H)] (t : ℕ) : 𝕃 H
  • def α' (x₀ : F) (R : F[X][X][Y]) (H_irreducible : Irreducible H) (t : ℕ) : 𝕃 H
  • def β (R : F[X][X][Y]) (t : ℕ) : 𝒪 H
  • def γ (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [φ : Fact (Irreducible H)] : PowerSeries (𝕃 H)
  • def γ' (x₀ : F) (R : F[X][X][Y]) (H_irreducible : Irreducible H) : PowerSeries (𝕃 H)
  • def ζ (R : F[X][X][Y]) (x₀ : F) (H : F[X][Y]) [H_irreducible : Fact (Irreducible H)] : 𝕃 H
  • def ξ (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [φ : Fact (Irreducible H)] : 𝒪 H
  • lemma H_tilde'_monic (H : F[X][Y]) (hH : 0 < H.natDegree) :
  • lemma H_tilde_equiv_H_tilde' (H : F[X][Y]) : (H_tilde' H).map univPolyHom = H_tilde H
  • lemma Lemma_A_1 {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) (D : ℕ)
  • lemma canonicalRepOf𝒪_degree_lt {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) :
  • lemma canonicalRepOf𝒪_mk {H : F[X][Y]} (hH : 0 < H.natDegree) (p : F[X][Y]) :
  • lemma canonicalRepOf𝒪_mk_eq_self_of_degree_lt {H : F[X][Y]} (hH : 0 < H.natDegree)
  • lemma canonicalRepOf𝒪_natDegree_le {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) :
  • lemma canonicalRepOf𝒪_zero {H : F[X][Y]} (hH : 0 < H.natDegree) :
  • lemma embeddingOf𝒪Into𝕃_mk (H : F[X][Y]) (p : F[X][Y]) :
  • lemma irreducibleHTildeOfIrreducible {H : Polynomial (Polynomial F)} :
  • lemma isField_of_irreducible {H : F[X][Y]} : Irreducible H → IsField (𝕃 H)
  • lemma liftBivariate_C {H : F[X][Y]} (p : F[X]) :
  • lemma liftBivariate_X {H : F[X][Y]} :
  • lemma mk_canonicalRepOf𝒪 {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) :
  • lemma regularElms_set_add {H : F[X][Y]} {a b : 𝕃 H}
  • lemma regularElms_set_functionFieldT (H : F[X][Y]) :
  • lemma regularElms_set_liftBivariate (H : F[X][Y]) (p : F[X][Y]) :
  • lemma regularElms_set_liftToFunctionField (H : F[X][Y]) (p : F[X]) :
  • lemma regularElms_set_mul {H : F[X][Y]} {a b : 𝕃 H}
  • lemma regularElms_set_neg {H : F[X][Y]} {a : 𝕃 H}
  • lemma regularElms_set_one (H : F[X][Y]) : (1 : 𝕃 H) ∈ regularElms_set H
  • lemma regularElms_set_pow {H : F[X][Y]} {a : 𝕃 H}
  • lemma regularElms_set_sub {H : F[X][Y]} {a b : 𝕃 H}
  • lemma regularElms_set_zero (H : F[X][Y]) : (0 : 𝕃 H) ∈ regularElms_set H
  • lemma regular_liftBivariate (H : F[X][Y]) (p : F[X][Y]) :
  • lemma regular_liftToFunctionField (H : F[X][Y]) (p : F[X]) :
  • lemma weight_Λ_over_𝒪_mk {H : F[X][Y]} (hH : 0 < H.natDegree) (p : F[X][Y])
  • lemma weight_Λ_over_𝒪_mk_eq_self_of_degree_lt {H : F[X][Y]} (hH : 0 < H.natDegree)
  • lemma weight_Λ_over_𝒪_zero {H : F[X][Y]} (hH : 0 < H.natDegree) (D : ℕ) :
  • lemma weight_Λ_zero (H : F[X][Y]) (D : ℕ) :
  • lemma weight_ξ_bound (x₀ : F) (hH : 0 < H.natDegree) {D : ℕ}
  • lemma β_regular (R : F[X][X][Y])
  • lemma ζ_regular_of_derivative_evalX_eq_C (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma ξ_regular (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [H_irreducible : Fact (Irreducible H)] :
  • lemma ξ_regular_of_derivative_evalX_eq_C_of_natDegree_le_one
  • noncomputable def H_tilde (H : F[X][Y]) : Polynomial (RatFunc F)
  • noncomputable def H_tilde' (H : F[X][Y]) : F[X][Y]
  • noncomputable def S_β {H : F[X][Y]} (β : 𝒪 H) : Set F
  • noncomputable def canonicalRepOf𝒪 {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) : F[X][Y]
  • noncomputable def coeffAsRatFunc : F[X] →+* Polynomial (RatFunc F)
  • noncomputable def embeddingOf𝒪Into𝕃 (H : F[X][Y]) : 𝒪 H →+* 𝕃 H
  • noncomputable def fieldTo𝕃 {H : F[X][Y]} : F →+* 𝕃 H
  • noncomputable def functionFieldT {H : F[X][Y]} : 𝕃 H
  • noncomputable def liftBivariate {H : F[X][Y]} : F[X][Y] →+* 𝕃 H
  • noncomputable def liftToFunctionField {H : F[X][Y]} : F[X] →+* 𝕃 H
  • noncomputable def polyToPowerSeries𝕃 (H : F[X][Y]) (P : F[X][Y]) : PowerSeries (𝕃 H)
  • noncomputable def weight_Λ (f H : F[X][Y]) (D : ℕ) : WithBot ℕ
  • noncomputable def weight_Λ_over_𝒪 {H : F[X][Y]} (hH : 0 < H.natDegree) (f : 𝒪 H) (D : ℕ) :
  • noncomputable def π_z {H : F[X][Y]} (z : F) (root : rationalRoot (H_tilde' H) z) : 𝒪 H →+* F
  • noncomputable def π_z_lift {H : F[X][Y]} (z : F) (root : rationalRoot (H_tilde' H) z) :
  • private lemma monicize_leading_term {K : Type} [Field K] (a : K) (d : ℕ)
  • private lemma monicize_term {K : Type} [Field K] (a b : K) (i d : ℕ)
✏️ Added: 245 declaration(s)

ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean (4)

  • lemma H_dvd_evalX_R (h_gs : ModifiedGuruswami m n k ωs Q u₀ u₁) :
  • lemma claimA2_hypotheses (h_gs : ModifiedGuruswami m n k ωs Q u₀ u₁) :
  • lemma evalX_R_separable (h_gs : ModifiedGuruswami m n k ωs Q u₀ u₁) :
  • lemma natDegree_H_pos (h_gs : ModifiedGuruswami m n k ωs Q u₀ u₁) :

ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Extraction.lean (2)

  • theorem pg_candidatePairs_snd_natDegree_pos (x₀ : F)
  • theorem pg_natDegree_pos_of_mem_normalizedFactors_of_separable (p : F[Z][X])

ArkLib/Data/Polynomial/RationalFunctions/FunctionField.lean (39)

  • abbrev 𝒪 (H : F[X][Y]) : Type
  • abbrev 𝕃 (H : F[X][Y]) : Type
  • def rationalRoot (H : F[X][Y]) (z : F) : Type
  • def regularElementsSet (H : F[X][Y]) : Set (𝕃 H)
  • lemma canonicalRepOf𝒪_degree_lt {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) :
  • lemma canonicalRepOf𝒪_mk {H : F[X][Y]} (hH : 0 < H.natDegree) (p : F[X][Y]) :
  • lemma canonicalRepOf𝒪_mk_eq_self_of_degree_lt {H : F[X][Y]} (hH : 0 < H.natDegree)
  • lemma canonicalRepOf𝒪_zero {H : F[X][Y]} (hH : 0 < H.natDegree) :
  • lemma embeddingOf𝒪Into𝕃_injective {H : F[X][Y]} (hHdeg : 0 < H.natDegree) :
  • lemma irreducible_monicize {H : F[X][Y]} (hHdeg : 0 < H.natDegree)
  • lemma irreducible_monicizeRatFunc {F : Type} [Field F] {H : Polynomial (Polynomial F)}
  • lemma irreducible_monicizeRatFunc_of_natDegree_pos
  • lemma isField_of_irreducible {F : Type} [Field F] {H : F[X][Y]} (hHdeg : 0 < H.natDegree) :
  • lemma isField_of_irreducible_of_natDegree_pos {F : Type} [Field F] {H : F[X][Y]}
  • lemma map_monicize_eq_monicizeRatFunc (H : F[X][Y]) : (monicize H).map univPolyHom = monicizeRatFunc
  • lemma mk_canonicalRepOf𝒪 {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) :
  • lemma monicize_dvd_of_map_dvd_monicizeRatFunc {H p : F[X][Y]} (hHdeg : 0 < H.natDegree)
  • lemma monicize_monic (H : F[X][Y]) (hH : 0 < H.natDegree) :
  • lemma regularElementsSet_add {H : F[X][Y]} {a b : 𝕃 H}
  • lemma regularElementsSet_mul {H : F[X][Y]} {a b : 𝕃 H}
  • lemma regularElementsSet_neg {H : F[X][Y]} {a : 𝕃 H}
  • lemma regularElementsSet_one (H : F[X][Y]) : (1 : 𝕃 H) ∈ regularElementsSet H
  • lemma regularElementsSet_pow {H : F[X][Y]} {a : 𝕃 H}
  • lemma regularElementsSet_prod {ι : Type} {H : F[X][Y]} (s : Finset ι) {f : ι → 𝕃 H}
  • lemma regularElementsSet_sub {H : F[X][Y]} {a b : 𝕃 H}
  • lemma regularElementsSet_sum {ι : Type} {H : F[X][Y]} (s : Finset ι) {f : ι → 𝕃 H}
  • lemma regularElementsSet_zero (H : F[X][Y]) : (0 : 𝕃 H) ∈ regularElementsSet H
  • lemma univPolyHom_injective :
  • noncomputable def canonicalRepOf𝒪 {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) : F[X][Y]
  • noncomputable def embeddingOf𝒪Into𝕃 (H : F[X][Y]) : 𝒪 H →+* 𝕃 H
  • noncomputable def monicize (H : F[X][Y]) : F[X][Y]
  • noncomputable def monicizeRatFunc (H : F[X][Y]) : Polynomial (RatFunc F)
  • noncomputable def piZ {H : F[X][Y]} (z : F) (root : rationalRoot (monicize H) z) :
  • noncomputable def piZLift {H : F[X][Y]} (z : F) (root : rationalRoot (monicize H) z) :
  • private lemma irreducible_comp_C_mul_X_iff {K : Type} [Field K] (a : K) (ha : a ≠ 0)
  • private lemma irreducible_map_univPolyHom_of_irreducible
  • private lemma mem_span_monicize_of_bivPolyHom_mem_span_monicizeRatFunc {H p : F[X][Y]}
  • private lemma monicize_leading_term {K : Type} [Field K] (a : K) (d : ℕ)
  • private lemma monicize_term {K : Type} [Field K] (a b : K) (i d : ℕ)

ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Hensel.lean (58)

  • def AllCoeffRegular (H : F[X][Y]) (φ : PowerSeries (𝕃 H)) : Prop
  • def HasNumeratorShape (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • def IsHenselNumeratorSequence (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • def defaultDegreeBound (R : F[X][X][Y]) (H : F[X][Y]) : ℕ
  • def henselDenominatorExponent (t : ℕ) : ℕ
  • def trivariateTotalDegree (R : F[X][X][Y]) : ℕ
  • lemma coeff_totalDegree_add_index_le_trivariateTotalDegree (R : F[X][X][Y]) {i : ℕ}
  • lemma defaultDegreeBound_ge_H (R : F[X][X][Y]) (H : F[X][Y]) :
  • lemma defaultDegreeBound_ge_R_coeff (R : F[X][X][Y]) (H : F[X][Y]) {i : ℕ}
  • lemma henselDenominatorExponent_succ (t : ℕ) :
  • lemma henselDenominatorExponent_zero : henselDenominatorExponent 0 = 0
  • noncomputable def alphaOfNumerators (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def alphaSeq (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def bSeq (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def evalRAtPowerSeries (x₀ : F) (H : F[X][Y]) (R : F[X][X][Y])
  • noncomputable def gammaFromAlpha (H : F[X][Y]) (αseq : ℕ → 𝕃 H) :
  • noncomputable def gammaOfNumerators (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def henselCoeffResidual (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def liftCoeffToPowerSeries (x₀ : F) (H : F[X][Y]) :
  • theorem AllCoeffRegular.X {H : F[X][Y]} : AllCoeffRegular H (PowerSeries.X)
  • theorem AllCoeffRegular.add {H : F[X][Y]} {φ ψ : PowerSeries (𝕃 H)}
  • theorem AllCoeffRegular.const {H : F[X][Y]} {c : 𝕃 H} (hc : c ∈ regularElementsSet H) :
  • theorem AllCoeffRegular.mul {H : F[X][Y]} {φ ψ : PowerSeries (𝕃 H)}
  • theorem AllCoeffRegular.pow {H : F[X][Y]} {φ : PowerSeries (𝕃 H)}
  • theorem AllCoeffRegular.zero {H : F[X][Y]} :
  • theorem H_eval2_T_div_W_eq_zero (H : F[X][Y])
  • theorem bSeq_eq_zero_of_gt (x₀ : F) (R : F[X][X][Y]) (N j : ℕ) (hj : N < j) :
  • theorem bSeq_stable (x₀ : F) (R : F[X][X][Y]) (N i : ℕ) (hi : i ≤ N) :
  • theorem bSeq_succ_def (x₀ : F) (R : F[X][X][Y]) (N : ℕ) :
  • theorem bSeq_succ_eq_below (x₀ : F) (R : F[X][X][Y]) (N i : ℕ) (hi : i < N + 1) :
  • theorem bSeq_zero (x₀ : F) (R : F[X][X][Y]) (N : ℕ) :
  • theorem beta_zero_eq_X_of_shape (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem coeff_delta_below (x₀ : F) (R : F[X][X][Y]) (N i : ℕ) (hi : i < N + 1) :
  • theorem coeff_evalR_split (x₀ : F) (R : F[X][X][Y]) (n : ℕ) (hn : 1 ≤ n)
  • theorem coeff_evalR_stable (x₀ : F) (R : F[X][X][Y]) (n m : ℕ) (hm : m < n)
  • theorem coeff_liftCoeff_regular (x₀ : F) (H : F[X][Y]) (p : F[X][X]) :
  • theorem coeff_mul_eq_zero_of_orders {A : Type} [CommRing A] {m : ℕ}
  • theorem coeff_mul_of_low_order {A : Type} [CommRing A] (n : ℕ) (P δ : PowerSeries A)
  • theorem coeff_zero_evalR (x₀ : F) (R : F[X][X][Y]) (Γ : PowerSeries (𝕃 H)) :
  • theorem constantCoeff_eval₂_derivative_eq_zeta (x₀ : F) (R : F[X][X][Y])
  • theorem constantCoeff_eval₂_liftCoeff (x₀ : F) (q : F[X][X][Y]) (Γ : PowerSeries (𝕃 H)) :
  • theorem constantCoeff_liftCoeffToPowerSeries (x₀ : F) (p : F[X][X]) :
  • theorem evalX_totalDegree_le_of_coeff_bound (x₀ : F) (R : F[X][X][Y]) {D : ℕ}
  • theorem exists_hensel_alpha_sequence (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem fieldTo𝕃_regular (x₀ : F) (H : F[X][Y]) :
  • theorem formalHenselAlphaSequence (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem gammaOfNumerators_eq_gammaFromAlpha (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem henselClearedTerm_regular (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem henselCoeffResidual_eq_trunc (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem henselCoeffResidual_regular_after_clearing (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem hensel_alpha_sequence_unique (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem hensel_numerator_sequence_of_alpha_shape (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem initial_root_at_x0 (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem mk_bSeq_coeff_eq (x₀ : F) (R : F[X][X][Y]) (N i : ℕ) (hi : i ≤ N) :
  • theorem mk_monicizeRatFunc_eq_leadingCoeff_pow_mul_eval₂ (H : F[X][Y])
  • theorem remainder_low_order {A B : Type} [CommRing A] [CommRing B] (n : ℕ)
  • theorem root_bSeq (x₀ : F) (R : F[X][X][Y])
  • theorem zeta_ne_zero_of_hypotheses (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])

ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Sequence.lean (16)

  • def alpha (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [φ : Fact (Irreducible H)]
  • def alpha' (x₀ : F) (R : F[X][X][Y]) (H_irreducible : Irreducible H)
  • def gamma (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [φ : Fact (Irreducible H)]
  • def gamma' (x₀ : F) (R : F[X][X][Y]) (H_irreducible : Irreducible H)
  • lemma betaSeq_spec (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma betaSeq_weight_le (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma betaSeq_weight_le_defaultDegreeBound (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma betaSeq_weight_sharp_le (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma betaSeq_weight_sharp_le_defaultDegreeBound (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma exists_hensel_numerator_sequence (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • noncomputable def betaSeq (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem IsHenselNumeratorSequence.eq_betaSeq (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem IsHenselNumeratorSequence.unique (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem claimA2_exists_numerators_with_weight_bounds (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem exists_regular_numerator_shape (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • theorem regular_numerator_shape_succ (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])

ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Setup.lean (30)

  • def zeta (R : F[X][X][Y]) (x₀ : F) (H : F[X][Y]) [H_irreducible : Fact (Irreducible H)]
  • lemma derivative_evalX_coeff (x₀ : F) (R : F[X][X][Y]) (i : ℕ) :
  • lemma derivative_evalX_eq_C_of_natDegree_le_one
  • lemma embeddingOf𝒪Into𝕃_mk_xiPre (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma embeddingOf𝒪Into𝕃_xi (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y])
  • lemma evalX_ne_zero_of_hypotheses {x₀ : F} {R : F[X][X][Y]} {H : F[X][Y]}
  • lemma leadingCoeff_dvd_evalX_coeff_natDegree {x₀ : F} {R : F[X][X][Y]} {H : F[X][Y]}
  • lemma leadingCoeff_dvd_evalX_derivative_coeff_pred {x₀ : F} {R : F[X][X][Y]} {H : F[X][Y]}
  • lemma leadingCoeff_dvd_evalX_leadingCoeff {x₀ : F} {R : F[X][X][Y]} {H : F[X][Y]}
  • lemma natDegree_H_le_natDegree_R_of_hypotheses {x₀ : F} {R : F[X][X][Y]} {H : F[X][Y]}
  • lemma natDegree_derivative_evalX_coeff_le (x₀ : F) (R : F[X][X][Y]) {D i : ℕ}
  • lemma xi_regular (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [H_irreducible : Fact (Irreducible H)]
  • lemma xi_weight_le (x₀ : F) (hH : 0 < H.natDegree) (hHyp : Hypotheses x₀ R H)
  • noncomputable def xi (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [_φ : Fact (Irreducible H)]
  • noncomputable def xiPre (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) : F[X][Y]
  • noncomputable def xiPreLower (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) : F[X][Y]
  • noncomputable def xiPreTop (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) : F[X][Y]
  • private lemma evalX_natDegree_le {K : Type} [CommSemiring K] (x : K) (P : K[X][Y]) :
  • theorem cofactor_top_reduction_weight_le {H : F[X][Y]} (hH : 0 < H.natDegree) {Q : F[X][Y]}
  • theorem leadingCoeff_natDegree_le_of_totalDegree_le {D : ℕ} (hD_H : Bivariate.totalDegree H ≤ D) :
  • theorem regularWeight_add_le {H : F[X][Y]} {D : ℕ} (hD_H : Bivariate.totalDegree H ≤ D)
  • theorem xiPreLower_coeff_natDegree_le (x₀ : F) {D i : ℕ}
  • theorem xiPreLower_term_weight_le (x₀ : F) (hHyp : Hypotheses x₀ R H) (hH : 0 < H.natDegree)
  • theorem xiPreLower_weight_le (x₀ : F) (hHyp : Hypotheses x₀ R H) (hH : 0 < H.natDegree)
  • theorem xiPreTop_coeff_natDegree_zero_of_H_natDegree_eq_R_natDegree (x₀ : F) (hH : 0 < H.natDegree)
  • theorem xiPreTop_modByMonic_coeff_natDegree_le (x₀ : F) (hH : 0 < H.natDegree)
  • theorem xiPreTop_modByMonic_weight_le (x₀ : F) (hH : 0 < H.natDegree) (hHyp : Hypotheses x₀ R H)
  • theorem xiPreTop_weight_over_𝒪_le (x₀ : F) (hH : 0 < H.natDegree) (hHyp : Hypotheses x₀ R H)
  • theorem xiPreTop_weight_over_𝒪_le_of_H_natDegree_lt_R_natDegree (x₀ : F) (hH : 0 < H.natDegree)
  • theorem xiPre_eq_lower_add_top (x₀ : F) (hRdeg : 2 ≤ R.natDegree) :

ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Weight.lean (28)

  • def RegularWeightLe {H : F[X][Y]} (hH : 0 < H.natDegree) (a : 𝕃 H) (D B : ℕ) : Prop

…and 95 more not listed.


sorry Tracking

Removed: 7 `sorry`(s)

ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean (2)

  • lemma exists_factors_with_large_common_root_set (δ : ℚ) (x₀ : F) (L35)
  • noncomputable def matching_set_at_x (L130)

ArkLib/Data/Polynomial/RationalFunctions.lean (5)

  • lemma Lemma_A_1 {H : F[X][Y]} (hH : 0 < H.natDegree) (β : 𝒪 H) (D : ℕ) (L471)
  • lemma irreducibleHTildeOfIrreducible {H : Polynomial (Polynomial F)} : (L52)
  • lemma weight_ξ_bound (x₀ : F) (hH : 0 < H.natDegree) {D : ℕ} (L604)
  • lemma β_regular (R : F[X][X][Y]) (L614)
  • lemma ξ_regular (x₀ : F) (R : F[X][X][Y]) (H : F[X][Y]) [H_irreducible : Fact (Irreducible H)] : (L592)

📋 **Additional Analysis**

The diff appears to be a substantial contribution of a new Appendix A package for BCIKS20. The code adheres to the project's naming and style conventions (UpperCamelCase files, lowerCamelCase functions, snake_case theorems, proper headers, consistent indentation). The commit message format cannot be verified from the raw diff. There are no obvious violations of the provided guidelines. Since the deployment-supplied instructions are generic contribution guidelines rather than a specific review framework, no actionable findings are identified.


📄 **Per-File Summaries**
  • ArkLib.lean: The file now imports seven new modules under ArkLib.Data.Polynomial.RationalFunctions: FunctionField, HenselNumerators.Hensel, HenselNumerators.Sequence, HenselNumerators.Setup, HenselNumerators.Weight, Lifts, RationalRootVanishing, and Weight. These imports make available additional definitions, theorems, and structures related to rational functions, Hensel lifting, and weight computations, expanding the project’s polynomial and rational‑function infrastructure.
  • ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Agreement.lean: The Agreement.lean file undergoes several interrelated changes to adapt the BCIKS20 list-decoding proofs to the refactored RationalFunctions module structure, replacing the previous BCIKS20AppendixA namespace. The exists_factors_with_large_common_root_set lemma gains two new conclusion fields: 0 < H.natDegree and (Bivariate.evalX (Polynomial.C x₀) R).Separable (the Fintype.ofFinite _ argument replaces the former sorry in the cardinality set). Two new lemmas natDegree_H_pos, H_dvd_evalX_R, and evalX_R_separable extract these fields, and a new lemma claimA2_hypotheses bundles them into the Hypotheses type from RationalFunctions.HenselNumerators. All open imports switch from BCIKS20AppendixA.ClaimA2 to RationalFunctions.HenselNumerators; correspondingly, calls to α', γ', 𝕃, and polyToPowerSeries𝕃 are now qualified under RationalFunctions instead of BCIKS20AppendixA. The statements of approximate_solution_is_exact_solution_coeffs and approximate_solution_is_exact_solution_coeffs' change their coefficient condition from ∀ t ≥ k / if t ≥ k to ∀ t > k / if t > k, and their hypotheses now include (natDegree_H_pos k h_gs) and (claimA2_hypotheses k h_gs). The solution_gamma_is_linear_in_Z and gamma_eq_P lemmas similarly acquire the two new arguments. The matching_set_at_x definition replaces its final sorry with (Fintype.ofFinite _). A large docstring on claimA2_hypotheses explains that the deg_Y R ≥ 2 weight bounds (needed for the Hensel machinery) are not derivable from Claim 5.7 and must be handled by a case split in §5.
  • ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/ListDecoding/Extraction.lean: Two new theorems are added: pg_natDegree_pos_of_mem_normalizedFactors_of_separable (proves any normalized factor of a separable polynomial has positive natDegree) and pg_candidatePairs_snd_natDegree_pos (derives the same positivity for the second component of pg_candidatePairs under the given separability hypothesis). The existing pg_card_normalizedFactors_toFinset_le_natDegree is refactored to use the first new lemma instead of inlining the same argument, removing code duplication. Both new theorems carry the omit [DecidableEq (RatFunc F)] [Finite F] that was already present on the existing theorem. No sorry or admit are introduced.
  • ArkLib/Data/Polynomial/RationalFunctions.lean: The file has been completely rewritten from a monolithic module containing all definitions and proofs relating to Appendix A of [BCIKS20] into a lightweight umbrella import that re‑exports seven submodules (FunctionField, Weight, RationalRootVanishing, Lifts, HenselNumerators/Setup, HenselNumerators/Hensel, HenselNumerators/Weight, HenselNumerators/Sequence). The new file adds a comprehensive module‑level docstring that describes the setting, layout, main results (notably lemmaA1_embedding_eq_zero_of_many_rational_roots, the HenselNumerators existence/uniqueness/weight‑bound theorems), and two documented deviations from the paper. All previously sorry‑marked declarations (irreducibleHTildeOfIrreducible, Lemma_A_1, ξ_regular, weight_ξ_bound, β_regular) have been removed from this file; the corresponding definitions and proofs now live in the respective submodules. This reorganization modularizes the formalization and provides a central orientation point for reviewers and downstream users.
  • ArkLib/Data/Polynomial/RationalFunctions/FunctionField.lean: This 607-line file ArkLib/Data/Polynomial/RationalFunctions/FunctionField.lean is a new addition implementing the algebraic construction from Appendix A.1 and A.3 of the BCIKS20 paper. It defines:

monicizeRatFunc H as a monic polynomial in (RatFunc F)[T] from a bivariate polynomial H ∈ F[Z][Y], and proves its irreducibility when H is irreducible with positive Y-degree via irreducible_monicizeRatFunc_of_natDegree_pos and irreducible_monicizeRatFunc. The function field 𝕃 H = (RatFunc F)[T]/(monicizeRatFunc H) is defined as an abbrev, and it is shown to be a field when H is irreducible and has positive Y-degree via isField_of_irreducible_of_natDegree_pos and isField_of_irreducible, with a corresponding noncomputable instance.

The integral monicization monicize H ∈ F[Z][Y] is defined and proven monic via monicize_monic. The file establishes that map_monicize_eq_monicizeRatFunc ensures compatibility under the embedding to (RatFunc F)[T], and uses this to prove irreducible_monicize descends irreducibility to F[Z][Y].

The ring of regular elements 𝒪 H = F[Z][Y]/(monicize H) is introduced as an abbrev with a ring instance. The embedding embeddingOf𝒪Into𝕃 H : 𝒪 H →+* 𝕃 H is defined, and its injectivity is proven (embeddingOf𝒪Into𝕃_injective) under the positive-degree hypothesis using the divisibility lemma monicize_dvd_of_map_dvd_monicizeRatFunc.

The set regularElementsSet H is defined as the image of 𝒪 H in 𝕃 H, and lemmas regularElementsSet_zero, regularElementsSet_one, regularElementsSet_add, regularElementsSet_neg, regularElementsSet_sub, regularElementsSet_mul, regularElementsSet_pow, regularElementsSet_sum, regularElementsSet_prod show it is closed under all ring operations.

Finally, the rational substitution piZ : 𝒪 H →+* F is defined (for a rationalRoot of monicize H at z), and the canonicalRepOf𝒪 function gives a degree-reduced representative with associated lemmas canonicalRepOf𝒪_degree_lt, mk_canonicalRepOf𝒪, canonicalRepOf𝒪_mk, canonicalRepOf𝒪_zero, and canonicalRepOf𝒪_mk_eq_self_of_degree_lt.

The diff contains no sorry or admit statements.

  • ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Hensel.lean: This new file (1137 lines) formalizes the Hensel/Newton iteration for the bivariate rational function setting of [BCIKS20] Appendix A.4. It defines the exponent pattern henselDenominatorExponent, the degree bounds trivariateTotalDegree and defaultDegreeBound, the power-series evaluation evalRAtPowerSeries (with the shift X ↦ x₀ + S), and constructs coefficient sequences alphaOfNumerators/gammaOfNumerators from regular numerators. Key theorems establish existence and uniqueness of the Hensel lift (formalHenselAlphaSequence, hensel_alpha_sequence_unique), the splitting of the residual (coeff_evalR_split), the base-case numerator identity (beta_zero_eq_X_of_shape), first-order Taylor expansion in power series (remainder_low_order), and the regularity half of Claim A.2 (henselCoeffResidual_regular_after_clearing). The file is complete (no sorry/admit) and depends on earlier imports (Bivariate, Prelims, Setup).

  • ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Sequence.lean: This new file formalizes the Hensel numerator sequence (Claim A.2 of [BCIKS20]) in Lean 4. It provides two core theorems: regular_numerator_shape_succ (one-step numerator recursion) and exists_regular_numerator_shape (existence of a sequence βseq satisfying the shape condition). Using these, exists_hensel_numerator_sequence delivers the existence of a sequence of regular numerators βseq with the Hensel-lift semantics, and the noncomputable definition betaSeq selects a canonical such sequence via betaSeq_spec. Uniqueness is proved in IsHenselNumeratorSequence.unique and IsHenselNumeratorSequence.eq_betaSeq. Weight bounds (sharp and loose) for the chosen sequence are then stated as lemmas betaSeq_weight_sharp_le and betaSeq_weight_le, with specialized versions using defaultDegreeBound. The theorem claimA2_exists_numerators_with_weight_bounds bundles existence and both weight estimates. Finally, convenience definitions alpha, alpha', gamma, gamma' expose the induced Hensel-lift coefficients and power series. No sorry or admit appears in the diff.

  • ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Setup.lean: This new file, ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Setup.lean, formalizes the setup for Claim A.2 of [BCIKS20], introducing the Hypotheses structure (requiring H ∣ R(x₀,·,Z) and separability of R(x₀,·,Z) in Y) and the key objects zeta (the specialized derivative ∂R/∂Y evaluated at T/W in the function field 𝕃 H) and xi (a quotient representative of W^(d-2)·ζ in 𝒪 H). It proves the algebraic identity embeddingOf𝒪Into𝕃_xi linking these, establishes several divisibility and degree-bound lemmas for the leading coefficient W = H.leadingCoeff (e.g., leadingCoeff_dvd_evalX_leadingCoeff, leadingCoeff_dvd_evalX_derivative_coeff_pred, leadingCoeff_natDegree_le_of_totalDegree_le), and provides the main weight bound xi_weight_le stating Λ(ξ) ≤ (d-1)(D - dH + 1) under the assumption 2 ≤ R.natDegree. The proof of this bound decomposes xiPre into a low part (xiPreLower) and a top term (xiPreTop), proving weight bounds for each via auxiliary results like xiPreLower_weight_le, xiPreTop_weight_over_𝒪_le, cofactor_top_reduction_weight_le, and regularWeight_add_le. The file contains no sorry or admit.

  • ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Weight.lean: This new file (Weight.lean) introduces a RegularWeightLe certificate predicate and a large collection of supporting lemmas that track the Λ-weight (regular weight) of elements in the field 𝕃 H during Hensel-clearing expansions. It defines the sharp per‑step budget numeratorShapeSharp and proves it weakens to the loose paper bound (2t+1)·natDegreeY(R)·D. The main theorem numerator_shape_weight_sharp (proved by strong induction using henselClearedResidual_weight) establishes that every Hensel numerator βₜ has a RegularWeightLe certificate with budget numeratorShapeSharp R H D t, and the wrapping theorems hensel_numerator_weight_sharp_le and hensel_numerator_weight_le state the corresponding weight inequalities for an arbitrary Hensel numerator sequence. All proofs are complete (no sorry or admit).

  • ArkLib/Data/Polynomial/RationalFunctions/Lifts.lean: This new file adds the coefficient and bivariate lifts into the function field 𝕃 H (liftToFunctionField, liftBivariate, functionFieldT) and proves that these lifts send polynomials to regular elements (regularElementsSet_liftBivariate, regularElementsSet_liftToFunctionField, liftToFunctionField_ne_zero, etc.). It establishes denominator‑clearing identities (leadingCoeff_pow_mul_eval₂_div_eq_sum, regularElementsSet_mul_pow_eval₂_div_of_natDegree_le_succ_of_coeff_succ_dvd) that are used to keep Hensel‑lift coefficients inside 𝒪. Finally, it extends the substitution π_z to quotients β/C via piZOfDiv, proves well‑definedness (piZOfDiv_congr), and provides a vanishing criterion (piZOfDiv_eq_zero_iff), which are used in §5 of BCIKS20. No sorry or admit appear.

  • ArkLib/Data/Polynomial/RationalFunctions/RationalRootVanishing.lean: This single-file addition proves Lemma A.1 of [BCIKS20]. Nine new theorems are introduced:

  • natDegree_coeff_monicize_le_of_totalDegree_le and canonicalRep_coeff_natDegree_le_of_weight_bound — weight bounds on monomials of and of the canonical representative of β.

  • embedding_eq_zero_of_resultant_zero — vanishing resultant forces β = 0 in 𝕃.

  • natDegree_det_le_of_perm_products_le — degree bound for a determinant from its Leibniz expansion.

  • natDegree_resultant_le_weight_bounddeg_Z res_T(β, H̃) ≤ Λ(β)·dH.

  • poly_eq_zero_of_ncard_gt_bound_of_subset_roots — a polynomial with too many roots is zero.

  • resultant_eval_eq_resultant_map_eval_fixed_degrees — evaluation and fixed-degree resultant commute.

  • resultant_fixed_degree_eq_zero_of_common_root_of_monic_right — common root forces resultant zero.

  • rationalVanishingSet_subset_resultant_roots — each rational vanishing point is a root of the resultant.

  • embedding_eq_zero_of_weight_eq_bot — weight forces β = 0.

The main lemma lemmaA1_embedding_eq_zero_of_many_rational_roots assembles them: given enough rational roots, the resultant is zero, hence β embeds to zero.

No sorry or admit are present.

  • ArkLib/Data/Polynomial/RationalFunctions/Weight.lean: This new file defines the algebraic weight function Λ (as weight) for bivariate polynomials F[X][Y], associates regularWeight for the quotient ring 𝒪 H, and proves a suite of lemmas establishing its algebraic properties (invariance under negation, sub-additivity for addition/subtraction/sums/multiplication, exact additivity via weight_mul, and bounds for special monomials). It also proves that reduction modulo monicize H does not increase weight (weight_modByMonic_monicize_le and related lemmas), derives exact weight formulas for monicize H (weight_monicize), and introduces rationalVanishingSet with a lemma evaluating piZ on canonical representatives. No sorry or admit appear in the diff.
  • docs/kb/audits/bciks20-appendix-a-rational-functions.md: The diff updates docs/kb/audits/bciks20-appendix-a-rational-functions.md to reflect that the formalization of Appendix A is now largely complete. The 'Scope' section revises the Lean surface from a single file to a directory RationalFunctions/ listing five sub-files (FunctionField.lean, Lifts.lean, Weight.lean, RationalRootVanishing.lean, HenselNumerators/) and notes downstream consumers. The 'Status' table is rewritten: definitions are renamed (e.g., monicizeRatFunc replaces H_tilde, monicize replaces H_tilde'), Lemma A.1 is upgraded from 'present-but-incomplete' to 'present' with a proof reference, Claim A.2 entries now detail Hensel-lift existence, uniqueness, regularity and multiple weight bounds (including a sharp bound with a correction term), and new infrastructure entries (weight additivity, regular-weight calculus, A.3 rational substitutions) appear. A new 'Three findings on Appendix A.4' section documents three technical discrepancies relative to the paper (the 2 ≤ degY R precondition, a correction term in the sharp weight bound, and a hidden assumption in the Λ(ξ) bound) that affect downstream consumers. The 'Near-Term Work' section is replaced with two specific tasks (case-split on deg_Y R in §5, optional fidelity improvement) and a closing statement that the appendix is otherwise axiom-clean (zero sorryAx).
  • docs/kb/log.md: The changelog received new entries recording the completion of Appendix A (axiom-clean, all sorries closed), the restructuring and renaming of declarations for Mathlib style, the correction of an off-by-one in Claim 5.8, and removal of statement-level sorries; earlier recommendations about 2 ≤ deg_Y R and Λ(ξ) bounds were corrected, and a target reference in the [2026-06-16] entry was updated from ClaimA2.ξ_regular to RationalFunctions.HenselNumerators.xi_regular.

Last updated: 2026-08-05 03:53 UTC.

Found while surveying the unproven section 5 material.

Claim 5.8 was stated as "for all t >= k, alpha_t = 0" in both its coefficient and
power-series forms.  The paper says "for all t > k, alpha_t = 0.  Equivalently,
gamma = gamma_k = sum_{t=0}^{k} alpha_t (X - x_0)^t" -- the sum INCLUDES t = k.
The Lean statement therefore also forced alpha_k = 0, i.e. deg gamma < k, which is
false whenever the interpolating polynomial has degree exactly k (the generic
case).  Corrected to t > k.  Nothing consumed either form.

Claim 5.7's cardinality condition and matching_set_at_x built their Finsets with
`@Set.toFinset _ _ sorry`, i.e. a sorried Fintype instance INSIDE a statement.
Fintype is a subsingleton, so these were provably equal to the real instance and
the statements were not wrong -- but they put sorryAx into statements and made
`#print axioms` on anything downstream uninformative.  Replaced with
Fintype.ofFinite _.

That removed the last use of [DecidableEq (RatFunc F)] in the file, so the
now-unused section instance is dropped; without it the unusedDecidableInType
linter flagged all thirteen declarations.

BCIKS20 sorry count 22 -> 20, and all twenty are now genuine proof obligations
rather than statement placeholders.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Build Timing Report

  • Commit: 6c28870
  • Message: feat: proofs for rational function lemmas
  • Ref: rational-functions-positive-degree
  • Comparison baseline: 3768409 from the previous successful PR update.
  • Measured on ubuntu-latest with /usr/bin/time -p.
  • Commands: clean build rm -rf .lake/build && lake build; warm rebuild lake build; validation wrapper ./scripts/validate.sh.
Measurement Baseline (s) Current (s) Delta (s) Status
Clean build 807.01 715.92 -91.09 ok
Warm rebuild 2.47 1.91 -0.56 ok
Validation wrapper 2.53 1.95 -0.58 ok

Incremental Rebuild Signal

  • Warm rebuild saved 714.01s vs clean (374.83x faster).

This compares a clean project build against an incremental rebuild in the same CI job; it is a lightweight variability signal, not a full cross-run benchmark.

Slowest Current Clean-Build Files

Showing 20 slowest current targets, with comparison against the selected baseline when available.

Current (s) Baseline (s) Delta (s) Path
107.00 108.00 -1.00 ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Weight.lean
60.00 67.00 -7.00 ArkLib/ProofSystem/Stir/Combine.lean
59.00 55.00 +4.00 ArkLib/Data/CodingTheory/GuruswamiSudan/Basic.lean
53.00 56.00 -3.00 ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/AffineSpaces.lean
52.00 51.00 +1.00 ArkLib/Data/CodingTheory/JohnsonBound/Lemmas.lean
45.00 48.00 -3.00 ArkLib/Data/CodingTheory/ProximityGap/DG25/MainResults.lean
42.00 38.00 +4.00 ArkLib/Data/CodingTheory/BerlekampWelch/Condition.lean
39.00 40.00 -1.00 ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/AffineLines/BWMatrix.lean
38.00 46.00 -8.00 ArkLib/Data/CodingTheory/ProximityGap/AHIV22.lean
37.00 39.00 -2.00 ArkLib/Data/CodingTheory/ProximityGap/Folding.lean
34.00 36.00 -2.00 ArkLib/OracleReduction/LiftContext/Reduction.lean
31.00 28.00 +3.00 ArkLib/Data/CodingTheory/JohnsonBound/Basic.lean
31.00 37.00 -6.00 ArkLib/ProofSystem/Binius/BinaryBasefold/Prelude.lean
29.00 17.00 +12.00 ArkLib/Commitments/Functional/KZG/Binding.lean
29.00 32.00 -3.00 ArkLib/ProofSystem/Sumcheck/Spec/SingleRound.lean
28.00 34.00 -6.00 ArkLib/Data/Polynomial/RationalFunctions/HenselNumerators/Hensel.lean
27.00 24.00 +3.00 ArkLib/Data/CodingTheory/ProximityGap/BCIKS20/AffineLines/JointAgreement.lean
26.00 27.00 -1.00 ArkLib/OracleReduction/Security/RoundByRound.lean
24.00 24.00 +0.00 ArkLib/Data/CodingTheory/DivergenceOfSets.lean
23.00 24.00 -1.00 ArkLib/Data/Polynomial/FoldingPolynomial.lean

…clean

The boundary summand of henselClearedTerm_weight is proved.  All 266
declarations in ArkLib/Data/Polynomial/RationalFunctions are now axiom-clean:
zero sorryAx, zero non-standard axioms.

The fix corrects the BOUND rather than grinding the case, and it overturns my
earlier conclusion that the (A.1)-recursion route "cannot close".  It closes once
numeratorShapeSharp carries a + (t-1)*(D - dY) correction.

Why the correction is needed.  A factor of W that the recursion CHARGES costs the
bound Lambda(W) <= D - dH, and the base case forces exactly that charge, since
Lambda(beta_0) = Lambda(T) = D - dH + 1 is fixed by the definition of the
Lambda-grading.  But a factor of W that the recursion SAVES -- from
W | leadingCoeff R(x0,.,Z) -- is only worth its exact degree deg W, which has no
lower bound.  The paper credits the saved W at Lambda(W) while using D as an upper
bound elsewhere, i.e. it subtracts an upper bound; the deficit is exactly
Lambda(leadingCoeff R(x0,.,Z) / W) <= D - dY.

Why the correction is free.  It is superadditive on precisely the configuration
that produces the deficit: the boundary summand forces p.2 = t+1 split into d
parts each <= t, hence at least two nonzero parts S1 >= 2, so the parts consume
only sum (l_i - 1) = t+1-S1 of the correction against the t the target provides,
leaving (S1-1)*(D - dY) >= D - dY.  Every other summand has sum (l_i - 1) <= t, so
it costs nothing there.  Raising the xi-charge instead does NOT work: it breaks
the loose bound the paper quotes (d=2, dH=1, D=100, Lambda(W)=0, t=5 gives
2377 > 2200 = (2t+1)dD).

Nothing downstream is weakened.  numeratorShapeSharp_le_loose still yields
(2t+1)*dY*D, which is the only form Claim 5.10 consumes -- its telescoping
maximizes at t = k and lands on exactly that bound.

Option B (extend Lambda to the function field and prove Lambda(alpha_t) <=
Lambda(T) - Lambda(W), which would give the paper's uncorrected inequality) is
documented as open and fidelity-only: bounding alpha_t = -c_t/zeta needs a LOWER
bound on Lambda(zeta), and only upper bounds are available.  Both routes deliver
the same usable consequence.

Documented at numeratorShapeSharp, at henselClearedTerm_weight, in the module
docstring, and in the Appendix A audit.
Appendix A's weight bounds carry 2 <= Bivariate.natDegreeY R, and Claim 5.7
cannot supply it: R is an arbitrary irreducible factor of Q there, and
deg_Y R = 1 is precisely what section 5 sets out to prove ("our goal will be to
show that Q has a factor of the form Y - P(X,Z) ... and in fact R is this
factor").

The hypothesis is load-bearing rather than an artefact of the formalization.  For
dY = 1 the conclusion of xi_weight_le is false: take R = (1+Z)Y + 1 + ZX, x0 = 0,
H = (1+Z)Y + 1 (irreducible, degree 1, coprime coefficients).  Then dY = dH = 1,
W = 1+Z, D = 2, and xi = W^{dY-2}*zeta = zeta = 1+Z, whose canonical
representative mod H~ = Y+1 is itself, so Lambda(xi) = 1 while the claimed bound
(dY-1)(D-dH+1) is 0.

Section 5 therefore has to case-split on deg_Y R, and the = 1 branch needs no
Hensel machinery at all: R = R_1*Y + R_0 has the single rational root -R_0/R_1, so
Claim 5.9's conclusion should be reached directly there.  Only the >= 2 branch
consumes Claim A.2's weight bounds.

Recorded in the docstring of claimA2_hypotheses, where section 5 will meet it,
rather than only on an audit page.
Docstrings: 82 of the 231 declarations had none.  All now do -- every lemma in
the Lemma A.1 resultant chain, the xiPre* decomposition, the bSeq Hensel
iteration, the AllCoeffRegular and RegularWeightLe APIs, and the power-series
helpers.  The docstrings say what the statement is FOR, not just what it says:
e.g. coeff_evalR_split is flagged as the linearity that gives both existence and
uniqueness of the lift, and xiPreTop as the paper's "we can save a little" step.

Umbrella file: replaced the one-line "compatibility umbrella" note with a real
package roadmap -- the variable convention (which of F[X][X][Y]'s three variables
is the paper's X, Y, Z), a per-module map to the paper's sections, the main
results, the axiom-cleanliness claim, and the two documented deviations from
[BCIKS20] with pointers to where each is justified.

Organisation:
- named the six anonymous top-level sections (Monicization, AlgebraicWeights,
  RegularLifts, HenselSetup, HenselLift, HenselNumeratorSequence) and their
  closing `end`s;
- the section variable for R was declared as F[X][X][X] in four files while every
  theorem writes F[X][X][Y] -- same type, inconsistent notation; normalized.

Zero warnings, zero sorries, style-lint clean, and `#print axioms` over the whole
namespace still reports 266 declarations with no sorryAx and no non-standard
axioms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant