Sum-of-terms circuit basis #
This basis represents restricted arithmetic circuits whose charged gates produce members of a prescribed dictionary and whose free gates add already constructed values. By choosing the term type appropriately, it models diagonal depth-three circuits (sums of powers), sums of products, tensor-rank decompositions, and related representation problems.
Coefficients can be included in the term parameter itself. This keeps the syntax independent of any scalar action on the semantic carrier.
Equations
- Algebraic.SumOfTerms.instDecidableEqOp.decEq Algebraic.SumOfTerms.Op.add Algebraic.SumOfTerms.Op.add = isTrue ⋯
- Algebraic.SumOfTerms.instDecidableEqOp.decEq Algebraic.SumOfTerms.Op.add (Algebraic.SumOfTerms.Op.term value) = isFalse ⋯
- Algebraic.SumOfTerms.instDecidableEqOp.decEq (Algebraic.SumOfTerms.Op.term value) Algebraic.SumOfTerms.Op.add = isFalse ⋯
- Algebraic.SumOfTerms.instDecidableEqOp.decEq (Algebraic.SumOfTerms.Op.term a) (Algebraic.SumOfTerms.Op.term b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Arity of sum-of-terms operations.
Equations
Instances For
Signature for free addition of charged dictionary terms.
Equations
- Algebraic.SumOfTerms.signature T = { Op := Algebraic.SumOfTerms.Op T, Arity := Algebraic.SumOfTerms.arity }
Instances For
Interpret a term by its dictionary value and addition by carrier addition.
Equations
- Algebraic.SumOfTerms.interpretation termValue Algebraic.SumOfTerms.Op.add input = input 0 + input 1
- Algebraic.SumOfTerms.interpretation termValue (Algebraic.SumOfTerms.Op.term term) x_2 = termValue term
Instances For
Charge source additions and dictionary terms independently.
Equations
- Algebraic.SumOfTerms.weightedCost addition term Algebraic.SumOfTerms.Op.add = addition
- Algebraic.SumOfTerms.weightedCost addition term (Algebraic.SumOfTerms.Op.term value) = term
Instances For
Charge one for each dictionary term and make addition free.
Instances For
Charge each dictionary term by a term-dependent natural weight and make addition free.
Equations
- Algebraic.SumOfTerms.dictionaryCost weight Algebraic.SumOfTerms.Op.add = 0
- Algebraic.SumOfTerms.dictionaryCost weight (Algebraic.SumOfTerms.Op.term value) = weight value
Instances For
Charge source additions and make dictionary terms free.
Instances For
Charge every source operation once.
Instances For
Weighted source cost decomposes exactly into addition count and dictionary term count.
Circuit form of exact weighted source-cost decomposition.