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 sizeP_size' s :size s <= sumn (map sizeT (compile s)).