Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Uni.EvalCompound

The universal machine evaluates formulas: hd, tl, cons, ite #

For a construct with subformulas the machine pushes a frame, evaluates the first subformula, and on the return to the frame goes on: it takes a subtree of the value (hd, tl), evaluates the second subformula and builds a record (cons), or chooses the subformula to evaluate (ite). Each case is a chain of forced steps (Uni.InMode.sumTo_step) between the uses of the induction hypotheses.

Main results #

References #

theorem Cslib.Circuits.Arithmetic.Separation.Uni.EvalsTo.hd_tl {A : Type} [CommRing A] {θ : List Bool → A} {supp : Finset (List Bool)} {o a x : Interpreter.Tree} (b : Bool) {j : Fin 11} (hj : j = bif b then 2 else 3) (ho : o.len = ↑j) {l : List (Interpreter.Run A)} (ih : EvalsTo θ supp a x l) :
EvalsTo θ supp (o.cons a) x (List.map (fun (r : Interpreter.Run A) => r.tick (bif b then r.out.hd else r.out.tl)) l)

hd (for b = true, opcode 2) and tl (for b = false, opcode 3).

theorem Cslib.Circuits.Arithmetic.Separation.Uni.EvalsTo.cons {A : Type} [CommRing A] {θ : List Bool → A} {supp : Finset (List Bool)} {o a x : Interpreter.Tree} (ho : o.len = 4) {la lb : List (Interpreter.Run A)} (iha : EvalsTo θ supp a.hd x la) (ihb : EvalsTo θ supp a.tl x lb) :
EvalsTo θ supp (o.cons a) x (List.flatMap (fun (r : Interpreter.Run A) => List.map (fun (s : Interpreter.Run A) => (r.seq s).tick (r.out.cons s.out)) lb) la)
theorem Cslib.Circuits.Arithmetic.Separation.Uni.EvalsTo.ite {A : Type} [CommRing A] {θ : List Bool → A} {supp : Finset (List Bool)} {o a x : Interpreter.Tree} (ho : o.len = 5) {la : List (Interpreter.Run A)} {L : Interpreter.Run A → List (Interpreter.Run A)} (iha : EvalsTo θ supp a.hd x la) (ihb : ∀ r ∈ la, r.out ≠ Interpreter.Tree.nil → EvalsTo θ supp a.tl.hd x (L r)) (ihc : ∀ r ∈ la, r.out = Interpreter.Tree.nil → EvalsTo θ supp a.tl.tl x (L r)) :
EvalsTo θ supp (o.cons a) x (List.flatMap (fun (r : Interpreter.Run A) => List.map (fun (s : Interpreter.Run A) => (r.seq s).tick s.out) (L r)) la)