Documentation

Complexitylib.Circuits.Dependency.Defs

Circuit dependency graphs -- definitions #

The dependency graph of a circuit has one vertex for every primary input, internal gate, and output gate. Each gate-input occurrence contributes an edge from the referenced wire to the gate that reads it. Repeated occurrences of the same wire at the same gate collapse in the graph's edge set, while Circuit.totalFanIn continues to count them with multiplicity.

def Complexity.Circuit.totalFanIn {B : Basis} {N M G : } [NeZero N] [NeZero M] (c : Circuit B N M G) :

Total number of gate-input occurrences, including output gates.

Equations
Instances For
    @[reducible, inline]
    abbrev Complexity.Circuit.DependencyOccurrence {B : Basis} {N M G : } [NeZero N] [NeZero M] (c : Circuit B N M G) :

    One internal- or output-gate input occurrence in a circuit.

    Equations
    Instances For
      def Complexity.Circuit.dependencyEdge {B : Basis} {N M G : } [NeZero N] [NeZero M] (c : Circuit B N M G) :
      c.DependencyOccurrenceFin (N + G + M) × Fin (N + G + M)

      The directed dependency edge represented by one gate-input occurrence.

      Equations
      Instances For
        def Complexity.Circuit.dependencyEdges {B : Basis} {N M G : } [NeZero N] [NeZero M] (c : Circuit B N M G) :
        Finset (Fin (N + G + M) × Fin (N + G + M))

        The finite set of dependency edges. Parallel occurrences collapse here.

        Equations
        Instances For
          def Complexity.Circuit.dependencyGraph {B : Basis} {N M G : } [NeZero N] [NeZero M] (c : Circuit B N M G) :
          Digraph (Fin (N + G + M))

          The directed graph whose edges are the circuit's wire dependencies.

          Equations
          Instances For