Correctness of the tensor coefficient selector
ProvedTensorCubeEmitter.selectProg_correctcomplexity-theorycomputation
Given two Boolean flag heads, the fixed selector preserves both flag stacks and prepends the canonical rational encoding of the selected coefficient to an arbitrary output tail. The positive flag selects ; otherwise the negative flag selects ; otherwise the coefficient is . The program terminates within 13 structured-program steps.
Preamble
import Definitions.Def_TensorCubeEmitter open CookPvsNP ProjSchedTW.Complexity
Formal statement
namespace TensorCubeEmitter
theorem selectProg_correct (positive negative : Bool) (positiveTail negativeTail output : List BSym) :
∃ steps, steps ≤ 13 ∧
selectProg.Exec
(store (flagSym positive :: positiveTail) (flagSym negative :: negativeTail) output)
(store (flagSym positive :: positiveTail) (flagSym negative :: negativeTail)
(TensorNP.Eigen.encRat (coefficient positive negative) ++ output)) steps := by
sorry
end TensorCubeEmitter