Correctness of the Tree Evaluation read machine #
Run on the encoding of an instance, Cslib.TreeEval.Reader.machine halts with the value of the
tree as its output: a call on a subtree performs the procedure Cslib.TreeEval.proc on it and
returns, by induction on the subtree, with the rounds of a gate, the reading of a leaf and the pass
over the table of a gate as loops of their own.
Main results #
Cslib.TreeEval.Reader.exists_runFrom_call: a call on a subtree performs the procedure and returns.Cslib.TreeEval.Reader.exists_run_eq: the machine halts with the value of the tree.
@[reducible, inline]
abbrev Cslib.TreeEval.Reader.cfg {ℓ H : ℕ} (p : ℕ) (R : Regs) (st : List Iter.Frame) (mode : Iter.Mode) (ctl : Ctl) (out : List Bool) :
A configuration of the machine on T, running with the prime p.
Instances For
theorem Cslib.TreeEval.Reader.exists_runFrom_call {ℓ H : ℕ} {T : Tree ℓ H} {p : ℕ} [Fact (Nat.Prime p)] {d : ℕ} (U : Tree ℓ d) (st : List Iter.Frame) :
A call on a subtree at the path of the stack performs the procedure on it and returns, for every initial content of the registers.
The header, the prime and the output #
The read machine evaluates the tree. On the encoding of an instance it halts, with the value of the tree as its output.