From Undecidability.L Require Import Prelim.MoreBase Util.L_facts AbstractMachines.LargestVar.
Require Export Undecidability.L.AbstractMachines.FlatPro.ProgramsDef.
(* * Abstract L machines *)
(* *** Program size *)
Definition sizeT t :=
match t with
varT n => 1 + n
|  _ => 1
end.
Definition sizeP (P:Pro) := sumn (map sizeT P) + 1.
Hint Unfold sizeP : core.

Lemma length_compile_leq s : |compile s| <= 2*size s.