Documentation

CslibFrontier.Computability.Complexity.RealAlgebraic.CriticalCoordinateCoefficientSign

Signs of doubly indexed coordinate characteristic coefficients #

The zero-centered deformation gives a bivariate characteristic polynomial for each coordinate. One further coefficient sum extracts a coordinate-value coefficient of an addressed deformation coefficient. The norm bound and the prime-window sign algorithm then recover its integer sign from the residues at a fixed counting level over the controlled source evaluator.

This composes the coordinate evaluator adapted from lean-canny 970f28a5ecefc1327402ade16c068aa4b1b2c183 with the coefficient extraction and sign recovery in [OAI26f], Lemma 2.4 and Proposition 2.6, for the polynomial in Proposition 6.3, equation (6.11). The natural degree in the deformation parameter counts the thresholds strictly below its highest nonzero coefficient index. Using that binary index in the addressed evaluator gives uniform modular access to the values and coefficients of the leading deformation coefficient. Coefficient and binary-order derivative queries use the same counting level as value queries. For derivatives, the counting sum uses an addressed deformation index before substituting the integer degree, so the sum does not increase the final level. The prescribed-root fingerprint evaluator also delays this substitution, preserving the a + 20 counting bound of ControlledIndexedLabels in lean-canny at the pinned revision. For supplied fingerprint parameters, criticalCoordinateFingerprintLabels packages this evaluator as a controlled univariate family with binary degree, norm and cutoff bounds. The leading deformation coefficients themselves form a controlled family at level a + 18. The counting endpoints remain open in #6560.

A controlled input at level a yields the sign of the coefficient at any binary pair of deformation and coordinate-value indices at level a + 15. The coordinate index and pure-power exponent minus one are binary, and the source arity is unary.

theorem Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateParameterNatDegree_mem {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) (E : Turing.MultiTapeTM.Decoder enc) {d : α → ℕ} (i : (w : α) → Fin (n w)) (hdpos : ∀ (w : α), 1 ≤ d w) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) (hd : Turing.MultiTapeTM.ComputableInPolyTime d enc Turing.MultiTapeTM.encNat) (hi : Turing.MultiTapeTM.ComputableInPolyTime (fun (w : α) => ↑(i w)) enc Turing.MultiTapeTM.encNat) :

The natural degree in the deformation parameter has a binary counting-function certificate at level a + 18 from a controlled source at level a. It is the highest nonzero coefficient index, with zero as the natural degree of the zero polynomial.

noncomputable def Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateLeadingValue {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) {d : α → ℕ} (i : (w : α) → Fin (n w)) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) :
α × ℕ × ℕ → ℕ

Evaluate the leading deformation coefficient at the queried coordinate value modulo the queried modulus, using the controlled source evaluator. The query supplies the instance, modulus, and value, in that order. The degree is taken before reduction modulo the modulus.

A controlled source at level a supplies the leading deformation-coefficient evaluator at level a + 18. The modulus, value, coordinate index and exponent parameter are binary.

theorem Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateLeadingValue_cast {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) {d : α → ℕ} (i : (w : α) → Fin (n w)) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) (w : α) (hd : 1 ≤ d w) {p : ℕ} [Fact (Nat.Prime p)] (t : ℕ) (hsource : C.cutoff w < p) (hcut : (d w + 1) * ((d w + 1) ^ n w + n w * d w + 1) + 1 < p) (hdegree : (d w + 1) ^ n w * (d w + 1) ^ n w < p - 1) (hparam : MvPolynomial.CriticalSystem.coordinateParameterDegreeBound (n w) (d w) < p - 1) :

Above the source and interpolation cutoffs, the leading coordinate evaluator agrees with the integer leading deformation coefficient evaluated in the prime field.

noncomputable def Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateLeadingCoefficientResidue {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) {d : α → ℕ} (i : (w : α) → Fin (n w)) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) :
α × ℕ × ℕ → ℕ

Extract the coefficient at the queried coordinate-value exponent, modulo the queried modulus, from the leading deformation coefficient selected over the integers. The query supplies the instance, modulus, and exponent, in that order.

Selecting the integer deformation degree and extracting an addressed coordinate-value coefficient both fit in level a + 18. The queried modulus and exponent are binary.

theorem Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateLeadingCoefficientResidue_cast {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) {d : α → ℕ} (i : (w : α) → Fin (n w)) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) (w : α) (hd : 1 ≤ d w) {p : ℕ} [Fact (Nat.Prime p)] (k : ℕ) (hsource : C.cutoff w < p) (hcut : (d w + 1) * ((d w + 1) ^ n w + n w * d w + 1) + 1 < p) (hdegree : (d w + 1) ^ n w * (d w + 1) ^ n w < p - 1) (hparam : MvPolynomial.CriticalSystem.coordinateParameterDegreeBound (n w) (d w) < p - 1) (hk : k < p - 1) :

At an admissible prime and exponent, the coefficient query gives the reduction of the corresponding integer coefficient of the selected leading deformation coefficient.

noncomputable def Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateLeadingDerivativeResidue {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) {d : α → ℕ} (i : (w : α) → Fin (n w)) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) (w : α) (p k z : ℕ) :

Evaluate the derivative of binary order k at z modulo p, for the leading deformation coefficient selected over the integers.

Binary modulus, derivative order and evaluation-point queries give a derivative evaluator at counting level a + 18.

theorem Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateLeadingDerivativeResidue_cast {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) {d : α → ℕ} (i : (w : α) → Fin (n w)) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) (w : α) (hd : 1 ≤ d w) {p : ℕ} [Fact (Nat.Prime p)] (k z : ℕ) (hsource : C.cutoff w < p) (hcut : (d w + 1) * ((d w + 1) ^ n w + n w * d w + 1) + 1 < p) (hdegree : (d w + 1) ^ n w * (d w + 1) ^ n w < p - 1) (hparam : MvPolynomial.CriticalSystem.coordinateParameterDegreeBound (n w) (d w) < p - 1) :

Above the source and interpolation cutoffs, the derivative residue agrees with evaluation of the integer derivative. This holds for all orders, including beyond the degree.

noncomputable def Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateFingerprintLabelResidue {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) {d : α → ℕ} (i : (w : α) → Fin (n w)) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) (w : α) (p μ t z : ℕ) (target : ℤ) :

Evaluate the prescribed-root fingerprint label for the leading deformation coefficient of a coordinate characteristic polynomial, using the constant qualifying polynomial 1. The evaluation modulus p and the fingerprint modulus μ are independent.

The coordinate fingerprint evaluator has counting level a + 20 with binary queries. Evaluate the fingerprint label at an addressed deformation index first, then substitute the integer deformation degree.

theorem Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateFingerprintLabelResidue_cast {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) {d : α → ℕ} (i : (w : α) → Fin (n w)) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) (w : α) (hd : 1 ≤ d w) {p : ℕ} [Fact (Nat.Prime p)] (μ t z : ℕ) (hμ : μ ≠ 0) (target : ℤ) (hsource : C.cutoff w < p) (hcut : (d w + 1) * ((d w + 1) ^ n w + n w * d w + 1) + 1 < p) (hdegree : (d w + 1) ^ n w * (d w + 1) ^ n w < p - 1) (hparam : MvPolynomial.CriticalSystem.coordinateParameterDegreeBound (n w) (d w) < p - 1) :

Above the source and interpolation cutoffs, the coordinate fingerprint residue agrees with the integer prescribed-root label evaluated in the prime field.

noncomputable def Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateEquations {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) (E : Turing.MultiTapeTM.Decoder enc) {d : α → ℕ} (i : (w : α) → Fin (n w)) (hdpos : ∀ (w : α), 1 ≤ d w) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) (hd : Turing.MultiTapeTM.ComputableInPolyTime d enc Turing.MultiTapeTM.encNat) (hi : Turing.MultiTapeTM.ComputableInPolyTime (fun (w : α) => ↑(i w)) enc Turing.MultiTapeTM.encNat) :
have Q := fun (w : α) => (Polynomial.Bivariate.swap (MvPolynomial.CriticalSystem.parametricCoordinatePolynomial ⋯ (F w) ⋯ (i w))).leadingCoeff; Controlled (fun (w : α) => (MvPolynomial.uniqueAlgEquiv ℤ (Fin 1)).symm (Q w)) enc (a + 18)

Package the leading deformation coefficient of the selected coordinate characteristic polynomial as a controlled univariate family. Evaluation at level a + 18 computes the deformation degree over the integers and then reads that coefficient modulo the query prime.

theorem Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateEquations_bounds_eq {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) (E : Turing.MultiTapeTM.Decoder enc) {d : α → ℕ} (i : (w : α) → Fin (n w)) (hdpos : ∀ (w : α), 1 ≤ d w) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) (hd : Turing.MultiTapeTM.ComputableInPolyTime d enc Turing.MultiTapeTM.encNat) (hi : Turing.MultiTapeTM.ComputableInPolyTime (fun (w : α) => ↑(i w)) enc Turing.MultiTapeTM.encNat) (u v : α) (hn : n u = n v) (hduv : d u = d v) (hm : C.massExponent u = C.massExponent v) (hc : C.cutoff u = C.cutoff v) :
have equations := C.criticalCoordinateEquations E i hdpos hF hd hi; equations.degreeBound u = equations.degreeBound v ∧ equations.massExponent u = equations.massExponent v ∧ equations.cutoff u = equations.cutoff v

The coordinate-equation bounds depend only on the arity, deformation degree, source norm exponent and source prime cutoff.

noncomputable def Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateFingerprintLabels {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) (E : Turing.MultiTapeTM.Decoder enc) {d μ μBound t : α → ℕ} {target : α → ℤ} (i : (w : α) → Fin (n w)) (hdpos : ∀ (w : α), 1 ≤ d w) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) (hd : Turing.MultiTapeTM.ComputableInPolyTime d enc Turing.MultiTapeTM.encNat) (hi : Turing.MultiTapeTM.ComputableInPolyTime (fun (w : α) => ↑(i w)) enc Turing.MultiTapeTM.encNat) (hμ : Turing.MultiTapeTM.ComputableInPolyTime μ enc Turing.MultiTapeTM.encNat) (ht : Turing.MultiTapeTM.ComputableInPolyTime t enc Turing.MultiTapeTM.encNat) (htarget : Turing.MultiTapeTM.ComputableInPolyTime target enc Turing.MultiTapeTM.encIntBin) (hμpos : ∀ (w : α), 0 < μ w) (hμBound : Turing.MultiTapeTM.ComputableInPolyTime μBound enc Turing.MultiTapeTM.encNat) (hμle : ∀ (w : α), μ w ≤ μBound w) (htargetBound : ∀ (w : α), (target w).natAbs ≤ (d w + 1) ^ n w * μ w) :
have P := fun (w : α) => MvPolynomial.CriticalSystem.parametricCoordinatePolynomial ⋯ (F w) ⋯ (i w); have D := fun (w : α) => (d w + 1) ^ n w; have b := fun (w : α) => MvPolynomial.CriticalSystem.parametricCoordinateCoeffNormExponent (n w) (d w + 1) (C.massExponent w); Controlled (fun (w : α) => (MvPolynomial.uniqueAlgEquiv ℤ (Fin 1)).symm ((Polynomial.Bivariate.swap (P w)).leadingCoeff.fingerprintIntegerRootLabel 1 (D w) (b w) (μ w) (t w) (target w))) enc (a + 20)

Package the coordinate fingerprint polynomials for supplied binary parameters as a controlled univariate family. The degree and norm bounds use a supplied upper bound on the modulus. The polynomials and evaluator use the actual modulus. This adapts the controlled-family step of lean-canny's ControlledIndexedLabels at 970f28a5ecefc1327402ade16c068aa4b1b2c183.

theorem Cslib.Complexity.RealAlgebraic.Controlled.criticalCoordinateFingerprintLabels_bounds_eq {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {F : (w : α) → MvPolynomial (Fin (n w)) ℤ} (C : Controlled F enc a) (E : Turing.MultiTapeTM.Decoder enc) {d μ μBound t : α → ℕ} {target : α → ℤ} (i : (w : α) → Fin (n w)) (hdpos : ∀ (w : α), 1 ≤ d w) (hF : ∀ (w : α), (F w).totalDegree ≤ d w + 1) (hd : Turing.MultiTapeTM.ComputableInPolyTime d enc Turing.MultiTapeTM.encNat) (hi : Turing.MultiTapeTM.ComputableInPolyTime (fun (w : α) => ↑(i w)) enc Turing.MultiTapeTM.encNat) (hμ : Turing.MultiTapeTM.ComputableInPolyTime μ enc Turing.MultiTapeTM.encNat) (ht : Turing.MultiTapeTM.ComputableInPolyTime t enc Turing.MultiTapeTM.encNat) (htarget : Turing.MultiTapeTM.ComputableInPolyTime target enc Turing.MultiTapeTM.encIntBin) (hμpos : ∀ (w : α), 0 < μ w) (hμBound : Turing.MultiTapeTM.ComputableInPolyTime μBound enc Turing.MultiTapeTM.encNat) (hμle : ∀ (w : α), μ w ≤ μBound w) (htargetBound : ∀ (w : α), (target w).natAbs ≤ (d w + 1) ^ n w * μ w) (u v : α) (hn : n u = n v) (hduv : d u = d v) (hm : C.massExponent u = C.massExponent v) (hc : C.cutoff u = C.cutoff v) (hcap : μBound u = μBound v) :
have labels := C.criticalCoordinateFingerprintLabels E i hdpos hF hd hi hμ ht htarget hμpos hμBound hμle htargetBound; labels.degreeBound u = labels.degreeBound v ∧ labels.massExponent u = labels.massExponent v ∧ labels.cutoff u = labels.cutoff v

The fingerprint bounds depend only on the source arity, deformation degree, source norm exponent and cutoff, and the common modulus bound.