Counting accepted and satisfying inputs of Boolean circuits #
Defines exact acceptance and satisfying-input counts (Circuit.acceptCount, Circuit.satCount)
for circuits interpreted over Bool under an arbitrary signature σ.
Main definitions #
Cslib.Circuits.Circuit.acceptCount: number of inputsx : Fin n → Boolon which every outputosatisfiesacc o.Cslib.Circuits.Circuit.satCount: number of satisfying inputsx : Fin n → Boolof a single-output Boolean circuit (c.eval I x 0 = true).
Main results #
Cslib.Circuits.Circuit.satCount_eq_acceptCount:satCountisacceptCountacceptingtrueat output0.Cslib.Circuits.Circuit.acceptCount_eq_ncard:acceptCountagrees withSet.ncardof the accepted input set.Cslib.Circuits.Circuit.satCount_pos_iff:satCountis positive if and only if the circuit has a satisfying input.
References #
def Cslib.Circuits.Circuit.satCount {σ : Signature} {n : ℕ} (c : Circuit σ n 1) (I : Interpretation σ Bool) :
Number of satisfying inputs x : Fin n → Bool of a single-output Boolean circuit
(c.eval I x 0 = true).
Instances For
theorem Cslib.Circuits.Circuit.satCount_eq_acceptCount {σ : Signature} {n : ℕ} (c : Circuit σ n 1) (I : Interpretation σ Bool) :
Single-output satCount is acceptCount accepting true at output 0.
theorem Cslib.Circuits.Circuit.acceptCount_eq_ncard {σ : Signature} {n m : ℕ} (c : Circuit σ n m) (I : Interpretation σ Bool) (acc : Fin m → Bool → Bool) :
acceptCount agrees with Set.ncard of the accepted input set.