Documentation

CslibFrontier.Computability.Complexity.RealAlgebraic.ControlledDegreePiece

Controlled degree-piece polynomials #

The inverse equation and the guarded sum of higher coefficient squares operate on the same controlled family. Coefficient extraction costs one counting level and the bounded sum costs one more. The inverse coordinate is prepended to the original parameter point. A witness word selects the degree with a fixed-width prefix and leaves its suffix available for the coordinate witnesses.

Adapted from ControlledLiftedCoefficient and ControlledDegreePiece in lean-canny at 970f28a5ecefc1327402ade16c068aa4b1b2c183. The common budgets adapt ControlledBoundedDegreePiece at the same revision. The word interface adapts ControlledWordDegreePiece by encoding the degree as a fixed-width binary prefix.

The degree-piece lift is controlled at two additional counting levels. The inverse equation uses coefficient k and the sum uses the higher coefficients through the binary bound N. Both addresses and bounds are computed in binary.

noncomputable def Cslib.Complexity.RealAlgebraic.Controlled.boundedDegreePiece {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {P : (w : α) → MvPolynomial (Fin (n w + 1)) ℤ} (C : Controlled P enc a) (E : Turing.MultiTapeTM.Decoder enc) (hn : Turing.MultiTapeTM.ComputableInPolyTime n enc Turing.MultiTapeTM.encUnary) (k : α → ℕ) (hk : Turing.MultiTapeTM.ComputableInPolyTime k enc Turing.MultiTapeTM.encNat) (hchoice : ∀ (w : α), k w ≤ C.degreeBound w) :
Controlled (fun (w : α) => (P w).degreePiecePolynomial (C.degreeBound w) (k w)) enc (a + 2)

A degree choice bounded by the source degree bound uses common degree, coefficient norm and prime budgets, independently of the choice. The evaluator is the degree-piece evaluator.

@[simp]
theorem Cslib.Complexity.RealAlgebraic.Controlled.degreeBound_boundedDegreePiece {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {P : (w : α) → MvPolynomial (Fin (n w + 1)) ℤ} (C : Controlled P enc a) (E : Turing.MultiTapeTM.Decoder enc) (hn : Turing.MultiTapeTM.ComputableInPolyTime n enc Turing.MultiTapeTM.encUnary) (k : α → ℕ) (hk : Turing.MultiTapeTM.ComputableInPolyTime k enc Turing.MultiTapeTM.encNat) (hchoice : ∀ (w : α), k w ≤ C.degreeBound w) (w : α) :
(C.boundedDegreePiece E hn k hk hchoice).degreeBound w = 2 * (C.degreeBound w + 1)

All bounded degree pieces have the same degree bound.

@[simp]

All bounded degree pieces have the same coefficient norm exponent.

@[simp]
theorem Cslib.Complexity.RealAlgebraic.Controlled.cutoff_boundedDegreePiece {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {P : (w : α) → MvPolynomial (Fin (n w + 1)) ℤ} (C : Controlled P enc a) (E : Turing.MultiTapeTM.Decoder enc) (hn : Turing.MultiTapeTM.ComputableInPolyTime n enc Turing.MultiTapeTM.encUnary) (k : α → ℕ) (hk : Turing.MultiTapeTM.ComputableInPolyTime k enc Turing.MultiTapeTM.encNat) (hchoice : ∀ (w : α), k w ≤ C.degreeBound w) (w : α) :
(C.boundedDegreePiece E hn k hk hchoice).cutoff w = max (C.cutoff w) (C.degreeBound w) + 1

All bounded degree pieces have the same prime cutoff.

The first N.size bits encode a most-significant-first degree choice modulo N + 1. Short words are decoded from the bits present. The suffix has no effect on the choice.

theorem Cslib.Complexity.RealAlgebraic.Controlled.exists_degreeChoiceWord {N : ℕ} (k : Fin (N + 1)) (suffix : List Bool) :
∃ (word : List Bool), word.length = N.size + suffix.length ∧ decodeDegreeChoice N word = k ∧ List.drop N.size word = suffix

Each bounded degree can be prefixed to any suffix using exactly N.size bits.

Degree selection takes polynomial time on a binary bound and a raw witness word.

A witness word selects a bounded degree piece at two additional counting levels. The arity and all three access bounds are determined by the source family.