Fixpoint map_inner_tm (v:value) : nat -> Prop :=
    fun n =>
    match v with
      | value_label _ => n = 0
      | value_cons v1 v2 =>
          exists x1, exists x2,
           proj1_sig f_tm v1 x1 /\
           map_inner_tm v2 x2  /\
           n = 1 + x1 + 1 + x2
    end.

Lemma map_inner_tm_fun : forall v x1 x2, map_inner_tm v x1 -> map_inner_tm v x2 -> x1 = x2.