Output guesses and erasure for aggregate circuits #
Only special occurrences receive guessed bits. Erasure preserves every gate index and every ordinary incoming wire, replacing each special gate by a nullary constant. Thus a special output may feed another special gate, an ordinary gate, or the output.
The aggregate register belonging to a particular special occurrence.
Equations
- Algebraic.Aggregate.Register p gate = Algebraic.Aggregate.Op.Register (p.lines ↑gate).op
Instances For
Simultaneous registers for all special occurrences.
Equations
- Algebraic.Aggregate.Registers p = ((gate : Algebraic.Aggregate.SpecialGate p) → Algebraic.Aggregate.Register p gate)
Instances For
Output-guess bits plus the binary logarithmic budgets of the actual registers.
Equations
- Algebraic.Aggregate.budget p = Algebraic.Aggregate.specialCount p + ∑ gate : Algebraic.Aggregate.SpecialGate p, Nat.clog 2 (Fintype.card (Algebraic.Aggregate.Register p gate))
Instances For
Extend special-only guesses by a dummy bit on ordinary gates. The dummy is ignored.
Equations
- Algebraic.Aggregate.guessValues p a gate = if h : Algebraic.Aggregate.Op.isSpecial (p.lines gate).op = true then a ⟨gate, h⟩ else false
Instances For
Erase one line while retaining the wire namespace.
Equations
- One or more equations did not get rendered due to their size.
- Algebraic.Aggregate.eraseLine { op := Algebraic.Aggregate.Op.binary f, wires := wires } value = { op := Algebraic.Aggregate.OrdinaryOp.binary f, wires := wires }
Instances For
The structural erasure uses a total lookup; only special entries are inspected.
Equations
- Algebraic.Aggregate.eraseWith Cslib.Circuits.Program.empty x_3 = Cslib.Circuits.Program.empty
- Algebraic.Aggregate.eraseWith (p.gate line) values = (Algebraic.Aggregate.eraseWith p (values ∘ Fin.castSucc)).gate (Algebraic.Aggregate.eraseLine line (values (Fin.last g)))
Instances For
The designated outputs use precisely the same wires after erasure.
Equations
- Algebraic.Aggregate.eraseCircuit c a = { size := c.size, program := Algebraic.Aggregate.erase c.program a, outputs := c.outputs }
Instances For
Every special gate agrees with evaluation of its original slots on a candidate trace.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The true special-output vector.
Equations
- Algebraic.Aggregate.actualGuess p input gate = p.eval Algebraic.Aggregate.interpretation input ↑gate