Documentation

Complexitylib.Classes.PPoly.Uniform.Unrolling.Generator.Transition.PackedCopy

Delayed packed-formula copies #

An executable proof-carrying primitive that advances the rolling formula cursor and emits the corresponding packed-output copy gate.

Delayed packed-formula copy emission is sound.

theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitPackedFormulaCopy_spaceBoundByWidth (sizePolynomial : Polynomial ℕ) {initialSpace : ℕ → ℕ} {values : ℕ → BinaryValues WorkCount} {width : ℕ → ℕ} (hpolynomialCap : ∀ (inputLength : ℕ), 2 * TM.binaryPolynomialValueCap sizePolynomial (values inputLength Work.horizon) ≤ width inputLength) (hcursorResult : ∀ (inputLength : ℕ), values inputLength Work.gateCount + Polynomial.eval (values inputLength Work.horizon) sizePolynomial ≤ width inputLength) (havailable : ∀ (inputLength : ℕ), values inputLength Work.available ≤ width inputLength) (hreference₀ : ∀ (inputLength : ℕ), values inputLength Work.reference₀ ≤ width inputLength) (hpositive : ∀ (inputLength : ℕ), 0 < Polynomial.eval (values inputLength Work.horizon) sizePolynomial) :
(emitPackedFormulaCopy sizePolynomial).SpaceBoundByWidthAt initialSpace values width

A delayed packed-formula copy has a pointwise width certificate when the evaluator cap, advanced cursor, wire frontier, and old reference fit the shared width, and the formula block is explicitly nonempty. The cursor-result bound also bounds the evaluated formula size.

Exact zero-scratch and positive-formula-size domain.

@[simp]

The rolling formula cursor and wire frontier each advance exactly once; the reference and polynomial scratch registers are restored to zero.

@[simp]

Exact non-negated copy gate for the output wire of the newly traversed formula block.