Registers kept by a block of counter code #
Kept B base regs regs' says that a block of counter code, run on the registers regs, left the
registers regs' of the same length, unchanged below base, with every register at most B.
Compiled formulas and closure loops state their effect on the registers this way, and blocks run
in sequence compose by Kept.trans.
Main definitions #
Turing.CounterProgram.Kept: the registers after a block.
Main results #
Turing.CounterProgram.Kept.trans,Turing.CounterProgram.Kept.mono: composing blocks and forgetting registers.Turing.CounterProgram.Kept.facts: the cardinality and the free-variable registers survive a block that keeps the registers below them.
The registers after a block: the same length, unchanged below base, each at most B.
The block does not change the number of registers.
The block does not change the registers below
base.Every register is at most
Bafter the block.
Instances For
theorem Turing.CounterProgram.Kept.facts {B base d n : ℕ} {regs regs' : List ℕ} {α : Type u_1} {fv : α → ℕ} {val : α → Fin n} (hk : Kept B base regs regs') (hbase : 0 < base) (hfv : ∀ (x : α), fv x < base) (hd : base + d ≤ regs.length) (h0 : regs.getD 0 0 = n) (hv : ∀ (x : α), regs.getD (fv x) 0 = ↑(val x)) :
The cardinality in register 0 and the values of free variables in registers fv x below
base survive a block that keeps the registers below base.