Synthesis over the arithmetic basis #
Constants, sums and products can be synthesized over an arithmetic signature without importing
polynomial families, degree bounds or projections. The constant symbols have arbitrary type
K and are interpreted in a carrier R by a supplied map. The primitive rules need only
addition and multiplication on R; the finite-sum rule needs an additive commutative monoid.
There is no semiring assumption on K.
The declarations retain their names, statements and proofs from the VP module. VP publicly imports this module, while value-level clients can import it directly.
Main results #
Cslib.Circuits.Synthesis.arith_const: a constant costs one gate.Cslib.Circuits.Synthesis.arith_add: adding two available functions costs one gate.Cslib.Circuits.Synthesis.arith_mul: multiplying two available functions costs one gate.Cslib.Circuits.Synthesis.arith_sum: synthesize a finite sum from its summands and zero.
theorem Cslib.Circuits.Synthesis.arith_sum {K : Type u} {n : ℕ} {R : Type u_1} {constant : K → R} {s : Set ((Fin n → R) → R)} {ι : Type u_2} [AddCommMonoid R] [Mul R] (indices : Finset ι) (summand : ι → (Fin n → R) → R) (cost : ι → ℕ) (hzero : (fun (x : Fin n → R) => 0) ∈ s) (h : ∀ i ∈ indices, Synthesis (arithInterpretationWith K constant) s {summand i} (cost i)) :
A finite sum costs its summands and one addition each, when zero is available.