Compiling fusion covers to cyclic circuits #
For a finite set problem, this module turns the generated pair closure into a finite cyclic system. There is one gate for every subset of the target complement, one meet gate for every listed fusion pair, and one bottom gate. All generator and upward-closure rules are collected by free finite joins.
The sole semantic side condition is that the input generators cover the ambient type. It supplies the universal-set seed without assuming a free top constant. The resulting circuit has exactly one charged meet for every pair.
Every ambient point occurs in at least one input generator.
Equations
- Algebraic.Fusion.Problem.GeneratorsCover problem = ∀ (point : Γ), ∃ (input : Fin problem.inputCount), point ∈ problem.inputs input
Instances For
A fixed finite presentation of the subset-indexed closure gates.
Equations
Instances For
Number of subset-indexed closure gates.
Equations
- Algebraic.Fusion.PairClosureCompiler.subsetCount problem = Fintype.card (Set (Algebraic.Fusion.Problem.Outside problem))
Instances For
Canonical chosen numbering of subset-indexed closure gates.
Equations
Instances For
Total gate count: closure gates, pair gates, and one bottom gate.
Equations
- Algebraic.Fusion.PairClosureCompiler.gateCount problem pairs = Algebraic.Fusion.PairClosureCompiler.subsetCount problem + (pairs.length + 1)
Instances For
Total join arity used at every closure gate. Invalid candidate sources are redirected to the bottom gate.
Equations
- Algebraic.Fusion.PairClosureCompiler.sourceCount problem pairs = problem.inputCount + (Algebraic.Fusion.PairClosureCompiler.subsetCount problem + pairs.length)
Instances For
Slot occupied by an input among the candidate closure sources.
Equations
- Algebraic.Fusion.PairClosureCompiler.inputSlot problem pairs input = Fin.castAdd (Algebraic.Fusion.PairClosureCompiler.subsetCount problem + pairs.length) input
Instances For
Slot occupied by a lower closure gate among the candidate sources.
Equations
- Algebraic.Fusion.PairClosureCompiler.closureSlot problem pairs set = Fin.natAdd problem.inputCount (Fin.castAdd pairs.length ((Algebraic.Fusion.PairClosureCompiler.subsetEquiv problem) set))
Instances For
Slot occupied by a pair gate among the candidate closure sources.
Equations
- Algebraic.Fusion.PairClosureCompiler.pairSlot problem pairs index = Fin.natAdd problem.inputCount (Fin.natAdd (Algebraic.Fusion.PairClosureCompiler.subsetCount problem) index)
Instances For
Gate carrying the generated state at a specified subset.
Equations
- Algebraic.Fusion.PairClosureCompiler.closureGate problem pairs set = Fin.castAdd (pairs.length + 1) ((Algebraic.Fusion.PairClosureCompiler.subsetEquiv problem) set)
Instances For
Meet gate associated with one occurrence in the pair list.
Equations
- Algebraic.Fusion.PairClosureCompiler.pairGate problem pairs index = Fin.natAdd (Algebraic.Fusion.PairClosureCompiler.subsetCount problem) index.castSucc
Instances For
Dedicated nullary-join gate carrying the empty set.
Equations
- Algebraic.Fusion.PairClosureCompiler.bottomGate problem pairs = Fin.natAdd (Algebraic.Fusion.PairClosureCompiler.subsetCount problem) (Fin.last pairs.length)
Instances For
Turn a gate index into a wire.
Equations
- Algebraic.Fusion.PairClosureCompiler.gateWire problem pairs gate = Cslib.Circuits.Wire.gate gate
Instances For
A candidate input source is active at set exactly when its restriction
is contained in set.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A candidate closure source is active exactly along an upward-closure edge.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A candidate pair source is active at the gate indexed by the pair's intersection.
Equations
- One or more equations did not get rendered due to their size.
Instances For
All possible sources of one subset-indexed closure equation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Free join equation collecting every rule that can derive set.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Charged meet equation implementing one fusion rule.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Nullary join equation supplying bottom to inactive source slots.
Equations
- Algebraic.Fusion.PairClosureCompiler.bottomLine problem pairs = { op := Algebraic.JoinMeet.Op.join 0, wires := Fin.elim0 }
Instances For
The cyclic finite-join/meet circuit compiled from a pair list.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Intended semantic values of the compiled equations.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Each compiled closure equation evaluates to the corresponding generated state.
Each compiled pair equation evaluates to the intersection represented by its charged meet gate.
The dedicated nullary join equation evaluates to bottom.
The generated closure state satisfies every compiled cyclic equation.
Every candidate source lies below its closure gate in any pre-fixed state of the compiled circuit.
An active generator edge lies below its closure gate in every pre-fixed state.
An active upward edge lies below its closure gate in every pre-fixed state.
The active source of a pair intersection lies below the corresponding closure gate in every pre-fixed state.
A pair equation forces the meet of its two closure values into its pair gate in every pre-fixed state.
Restricting any pre-fixed circuit state to its closure gates gives a state closed under all abstract pair-closure rules.
The intended closure value lies below the corresponding gate of every pre-fixed circuit state.
The intended values form the least pre-fixed state of the compiled cyclic system.
A pair cover compiles to a proof-carrying least-fixed-point construction of the target.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The compiled circuit charges exactly one meet for each pair occurrence.
Under finite ambient support and covered generators, cyclic meet complexity is no larger than pair-cover complexity.
Modern fusion completeness for finite covered set problems: pair-cover complexity is exactly least-fixed-point cyclic meet complexity.