(* interpretation is invariant under context weakening *)
(* under assumption that the interpreted term is well-formed *)

Definition wf i t := 
  match t with 
    Pts n _ => n < size (keyx i) 
  | Var n => n < size (varx i)
  end.

Lemma valid_wf i ts : valid (interp i ts) -> all (wf i) ts.