Costs of straight-line programs over all operations on a finite set #
Cslib.Circuits.SlpN inp p H: the functions of H are computed by a straight-line program with
p gates over all operations on Fin D (fullSignature 2 (Fin D)), from the inputs inp. Gates
are added one at a time (Cslib.Circuits.SlpN.snoc), the inputs take one gate each
(Cslib.Circuits.SlpN.inputs), and a program runs unchanged over a larger alphabet
(Cslib.Circuits.SlpN.castLE).
Cslib.Circuits.Cost D A c h is the calculus on top: h is computed in c further gates from the
functions of A, by constants and binary operations whose values stay below D. It is turned into
gates by Cslib.Circuits.Cost.run and, for a family, by Cslib.Circuits.SlpN.stage.
Cslib.Circuits.CostP is the same for properties, through their indicators, with rules for
relations, connectives, bounded quantifiers and choice (Cslib.Circuits.Cost.ite).
Main definitions #
Main results #
Cslib.Circuits.SlpN.snoc,SlpN.le,SlpN.castLE,SlpN.mapInputs,SlpN.inputs,SlpN.exists_isSlpStep,Cost.run,SlpN.stage.
References #
- Anthropic, VP ≠ VNP over every field, paper and Lean formalization,
modules
Nc.SlpCalcandPaper.HeavyProg(slp_cast)
One gate more: an input, a constant, or a binary operation of two computed functions.
A larger alphabet: the gates of a program over Fin D compute the same numbers over Fin D',
for D ≤ D', from inputs with the same values.
A program whose inputs are among the inputs inp' computes the same functions from them.
h is computed in at most c steps from functions of A.
- base {Inp : Type} {D : ℕ} {A : Set (Inp → ℕ)} {h : Inp → ℕ} : h ∈ A → Cost D A 0 h
available
- const {Inp : Type} {D : ℕ} {A : Set (Inp → ℕ)} (c : ℕ) : c < D → Cost D A 1 fun (x : Inp) => c
constants
- op {Inp : Type} {D : ℕ} {A : Set (Inp → ℕ)} {p q : ℕ} {h1 h2 : Inp → ℕ} (φ : ℕ → ℕ → ℕ) : Cost D A p h1 →
Cost D A q h2 → (∀ (x : Inp), φ (h1 x) (h2 x) < D) → Cost D A (p + q + 1) fun (x : Inp) => φ (h1 x) (h2 x)
binary operations
- mono {Inp : Type} {D : ℕ} {A : Set (Inp → ℕ)} {p q : ℕ} {h : Inp → ℕ} : Cost D A p h → p ≤ q → Cost D A q h
idle steps