Documentation

CslibFrontier.Computability.Circuit.Simps

Normalizing and bounding circuits built with combinators #

Fills the simp set circuit_simps and registers the rules of the tactic circuit_bound for the circuit combinators Circuit.comp, Circuit.append, Circuit.pi, Circuit.wiring, Circuit.wiringOn, Circuit.oneGate, Circuit.mapOp, Circuit.iterate, Formula.gate and Formula.toCircuit.

A module that proves a bound of a named circuit tags it @[circuit_bound], and later constructions that contain the circuit then use the bound without naming it.

The simp set holds the lemmas that a proof in the library uses through it. A lemma of the same kind that is missing, such as Circuit.eval_iterate or Formula.eval_gate₂, is added here with its first use.

Main definitions #

theorem Cslib.Circuits.sup_univ_fin_zero {α : Type u_1} [SemilatticeSup α] [OrderBot α] (f : Fin 0 → α) :

The supremum over Fin 0 is ⊥.

theorem Cslib.Circuits.sup_univ_fin_one {α : Type u_1} [SemilatticeSup α] [OrderBot α] (f : Fin 1 → α) :

The supremum over Fin 1 is the value at 0.

theorem Cslib.Circuits.sup_univ_fin_two {α : Type u_1} [LinearOrder α] [OrderBot α] (f : Fin 2 → α) :
Finset.univ.sup f = max (f 0) (f 1)

The supremum over Fin 2 is the maximum of the values at 0 and 1.

Rewrites the program cost of a circuit built with a combinator to the costs of its parts, by Circuit.cost_program_comp and the like. Those are not simp lemmas: once simp has rewritten the gate count, an implicit argument of Program.cost, by Circuit.size_comp they no longer match. This procedure reads only the circuit and the cost function.