From Undecidability.L Require Import Util.L_facts Complexity.ResourceMeasures.
From Undecidability.L Require Import LM_heap_def.
(* ** Direct correctness proof  *)
(* *** Correctnes Heap-interaction *)
Definition extended (H H' : Heap) := forall alpha m, nth_error H alpha = Some m -> nth_error H' alpha = Some m.

Lemma tailRecursion_compile s P a T:
tailRecursion (a,compile s ++ P) T = ((a,compile s ++ P))::T.