Arithmetic circuit basis #
The arithmetic basis has binary addition and multiplication together with a family of nullary constants. The constant symbols are parameterized independently of the semantic carrier, so the same syntax can be interpreted in a polynomial ring, an extension field, a quotient, or an abstract algebra.
No ring laws are built into the circuit syntax. interpretation only asks for
addition and multiplication on the carrier and for a map assigning semantic
values to constant symbols. Algebraic laws and homomorphism properties belong
to the chosen interpretations.
Equations
- Algebraic.Arithmetic.instDecidableEqOp.decEq Algebraic.Arithmetic.Op.add Algebraic.Arithmetic.Op.add = isTrue ⋯
- Algebraic.Arithmetic.instDecidableEqOp.decEq Algebraic.Arithmetic.Op.add Algebraic.Arithmetic.Op.mul = isFalse ⋯
- Algebraic.Arithmetic.instDecidableEqOp.decEq Algebraic.Arithmetic.Op.add (Algebraic.Arithmetic.Op.constant value) = isFalse ⋯
- Algebraic.Arithmetic.instDecidableEqOp.decEq Algebraic.Arithmetic.Op.mul Algebraic.Arithmetic.Op.add = isFalse ⋯
- Algebraic.Arithmetic.instDecidableEqOp.decEq Algebraic.Arithmetic.Op.mul Algebraic.Arithmetic.Op.mul = isTrue ⋯
- Algebraic.Arithmetic.instDecidableEqOp.decEq Algebraic.Arithmetic.Op.mul (Algebraic.Arithmetic.Op.constant value) = isFalse ⋯
- Algebraic.Arithmetic.instDecidableEqOp.decEq (Algebraic.Arithmetic.Op.constant value) Algebraic.Arithmetic.Op.add = isFalse ⋯
- Algebraic.Arithmetic.instDecidableEqOp.decEq (Algebraic.Arithmetic.Op.constant value) Algebraic.Arithmetic.Op.mul = isFalse ⋯
- Algebraic.Arithmetic.instDecidableEqOp.decEq (Algebraic.Arithmetic.Op.constant a) (Algebraic.Arithmetic.Op.constant b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
A finite constant alphabet gives a finite arithmetic signature.
Arity of an arithmetic operation.
Equations
Instances For
Signature of arithmetic circuits with constants named by K.
Equations
- Algebraic.Arithmetic.signature K = { Op := Algebraic.Arithmetic.Op K, Arity := Algebraic.Arithmetic.arity }
Instances For
Interpret arithmetic syntax in any carrier with addition and
multiplication, using constant to interpret the nullary symbols.
Equations
- Algebraic.Arithmetic.interpretation constant Algebraic.Arithmetic.Op.add input = input (Fin.cast ⋯ 0) + input (Fin.cast ⋯ 1)
- Algebraic.Arithmetic.interpretation constant Algebraic.Arithmetic.Op.mul input = input (Fin.cast ⋯ 0) * input (Fin.cast ⋯ 1)
- Algebraic.Arithmetic.interpretation constant (Algebraic.Arithmetic.Op.constant value) x_2 = constant value
Instances For
Interpret constants by themselves in their native arithmetic carrier.
Instances For
Charge additions and multiplications independently; constants are free.
Equations
- Algebraic.Arithmetic.weightedCost addition multiplication Algebraic.Arithmetic.Op.add = addition
- Algebraic.Arithmetic.weightedCost addition multiplication Algebraic.Arithmetic.Op.mul = multiplication
- Algebraic.Arithmetic.weightedCost addition multiplication (Algebraic.Arithmetic.Op.constant value) = 0
Instances For
Standard arithmetic gate count: additions and multiplications cost one.
Instances For
Multiplicative complexity: only multiplication gates are charged.
Instances For
Additive complexity: only addition gates are charged.