Section Lifting.
Variable (sig : Type).
Variable (m n : nat).
(* [P] is the premise of the lifted machine [M@I]. *)
Variable (P : @SpecV sig n).
Variable (I : Vector.t (Fin.t n) m). (* [m<=n] *)
Hypothesis (HI : dupfree I).
(* We want to extract from [P] the premise [P'] for [M] *)
Definition Downlift : @SpecV sig m :=
(select I P).
(* Same specification as in [P] on indices not in [I], but as in [Q] for indices in [I] (lifted).  *)
Definition Frame (Q : @SpecV sig m) : @SpecV sig n := fill I P Q.
End Lifting.

(* Move [withFrame] out of [Frame] *)
Lemma Frame_withSpace (m n : nat) (sig : Type) (P : SpecV sig n) (P' : SpecV sig m) (I : Vector.t (Fin.t n) m) (ss : Vector.t nat n) (ss' : Vector.t nat m) :
dupfree I ->
Frame (withSpace P ss) I (withSpace P' ss') = withSpace (Frame P I P') (fill I ss ss').