Section RecoverStructure.
Fixpoint size_exp {Z} (s: exp Z) :=
match s with
| var _ => 0
| const c => 0
| app s t => S (size_exp s + size_exp t)
| lambda s => S (size_exp s)
end.

Lemma steps_u u p q k:
σ p q • u = t k ::: (τ • u) ->
exists l, u = lin (tab (fun i => t (i + k)) l) r.