Documentation

Complexitylib.Algebraic.Basis.DeMorgan.CircuitAnalysis

Structural analysis of one-output De Morgan circuits #

The contracted origin of the circuit's designated output wire lies in the original program. For a function depending on at least two inputs, this origin must be a charged gate rather than a constant or a single literal.

structure Algebraic.DeMorgan.OutputRoot {n : ℕ} (circuit : Circuit signature n 1) :

The charged origin of a one-output circuit's terminal value.

Instances For
    theorem Algebraic.DeMorgan.OutputRoot.output_eq_of_gate_eq {n : ℕ} {circuit : Circuit signature n 1} (root : OutputRoot circuit) (left right : Fin n → Bool) (gate_eq : circuit.program.gateFunction interpretation root.gate left = circuit.program.gateFunction interpretation root.gate right) :
    circuit.eval interpretation left 0 = circuit.eval interpretation right 0

    Equality at the charged root implies equality of the circuit output.

    theorem Algebraic.DeMorgan.OutputRoot.gate_ne_of_output_ne {n : ℕ} {circuit : Circuit signature n 1} (root : OutputRoot circuit) (left right : Fin n → Bool) (different : circuit.eval interpretation left 0 ≠ circuit.eval interpretation right 0) :

    A changed circuit output forces its charged root to change.

    theorem Algebraic.DeMorgan.exists_outputRoot {n : ℕ} (circuit : Circuit signature (n + 1) 1) (positive : 0 < n) (allSupported : ∀ (input : Fin (n + 1)), input ∈ circuit.inputSupport) :

    A one-output circuit structurally supported by every one of at least two inputs has a charged output root.