Lowering finite joins to binary cyclic AND/OR circuits #
This module expands every finite join into a local binary-OR accumulator and maps binary meet directly to binary AND. Each join block begins with a self-referential OR gate; its least fixed point is the empty set, so nullary join is implemented without adding a constant operation. The expansion adds no charged AND gates.
Number of binary gates in one expanded operation block.
Equations
Instances For
Local output gate of an expanded operation block.
Equations
Instances For
Dependent collection of all gates in all expanded blocks.
Equations
- Algebraic.Fusion.JoinMeetLowering.ExpandedGate source = ((gate : Fin g) × Fin (Algebraic.Fusion.JoinMeetLowering.blockGateCount (source.lines gate).op))
Instances For
Number of gates in the binary expansion.
Equations
Instances For
Chosen numbering of the dependent expanded-gate collection.
Equations
Instances For
Number a particular local gate of a particular source block.
Equations
- Algebraic.Fusion.JoinMeetLowering.expandedGate source gate localGate = (Algebraic.Fusion.JoinMeetLowering.gateEquiv source) ⟨gate, localGate⟩
Instances For
Number the output gate of a source block.
Equations
- Algebraic.Fusion.JoinMeetLowering.rootGate source gate = Algebraic.Fusion.JoinMeetLowering.expandedGate source gate (Algebraic.Fusion.JoinMeetLowering.rootLocal (source.lines gate).op)
Instances For
Translate an original input-or-gate wire to the corresponding binary input-or-block-root wire.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A binary line with the two specified wires.
Equations
Instances For
Evaluation of a binary OR line.
Evaluation of a binary AND line.
Expand one source line, given a numbering of its local block gates and a translation of its source wires.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Binary line at a local gate of one expanded source block.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Binary AND/OR expansion of a finite-join/meet cyclic circuit.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Value carried by an original input-or-gate wire.
Equations
- Algebraic.Fusion.JoinMeetLowering.sourceWireValue inputs state = Cslib.Circuits.Wire.elim inputs state
Instances For
Union of those arguments whose indices occur before a local accumulator
position. Position zero is bottom; position i + 1 includes arguments
through i.
Equations
Instances For
Intended local values of one expanded source block.
Equations
- One or more equations did not get rendered due to their size.
- Algebraic.Fusion.JoinMeetLowering.blockValueOf { op := Algebraic.JoinMeet.Op.join arity, wires := wires } rootValue arguments_2 = Algebraic.Fusion.JoinMeetLowering.joinPrefix arguments_2
Instances For
Intended values in one block, computed from an original cyclic state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Intended state of the binary expanded circuit.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The root of a local block has the supplied source value whenever that value satisfies the source operation.
The root of every expanded block carries its original source-gate value whenever the source state satisfies its equations.
Reading a translated source wire in the expanded values returns the original wire value.
Local block values satisfy the expanded binary equations whenever encoded gates and translated wires have their intended values.
The expanded values satisfy every binary cyclic equation.
State on original gates obtained by reading expanded block roots.
Equations
- Algebraic.Fusion.JoinMeetLowering.restrictedState source targetState gate = targetState (Algebraic.Fusion.JoinMeetLowering.rootGate source gate)
Instances For
Original wire values in the restricted state are target wire values along the wire translation.
Prefix unions lie below accumulator gates whenever every accumulator step is pre-fixed.
A pre-fixed expanded block makes the corresponding source operation pre-fixed at its block root.
Every pre-fixed binary expansion restricts to a pre-fixed finite-join/meet state.
Prefix unions are monotone in all their arguments.
Intended local block values lie below any pre-fixed target block once the source root and arguments lie below their target representatives.
Original source-wire values lie below translated target wires once source gate values lie below target roots.
The canonical expanded values form the least pre-fixed binary state.
Lower a proof-carrying finite-join/meet construction to the ordinary binary AND/OR cyclic basis.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One expanded block has exactly the charged cost of its source operation.
Lowering preserves charged meet/AND cost exactly.