Documentation

CslibFrontier.Computability.Circuit.Topology

Circuit topologies #

The topology of a circuit records, for each gate, its arity and the wires supplying its arguments, together with the output wires, and forgets the gate operations. It is the part of a circuit that a garbled circuit is allowed to reveal (topology side information in the sense of [BHR12b]).

A topology is ordered when every gate reads only wires of smaller wire number than its own (Circuit.Topology.IsOrdered); the topology of every circuit is ordered (Circuit.isOrdered_topology).

Main definitions #

Main results #

References #

The wiring of a circuit with n inputs, m outputs and s gates, without the gate operations: each gate's arity and argument wires, and the output wires.

  • arity : Fin s → ℕ

    The arity of each gate.

  • wires (g : Fin s) : Fin (self.arity g) → Wire n s

    The wire supplying each argument of each gate.

  • outputs : Fin m → Wire n s

    The wire carrying each output.

def Cslib.Circuits.Circuit.topology {σ : Signature} {n m : ℕ} (C : Circuit σ n m) :

The topology of a circuit: the arities and argument wires of its lines and its output wires.

Every gate reads only wires whose number is smaller than its own.

The topology of a circuit is ordered: its lines read only inputs and earlier gates.