(***********************************************************************)


Inductive le_app_spec (ni1 : nested_imps) (n : nat) : Set :=
    Le_App_Spec_Intro :
      forall ni11 ni12 : nested_imps,
      ni1 = ni11 ++ ni12 -> length ni11 = n -> le_app_spec ni1 n.(***********************************************************************)


Inductive le_app_spec (ni1 : nested_imps) (n : nat) : Set :=
    Le_App_Spec_Intro :
      forall ni11 ni12 : nested_imps,
      ni1 = ni11 ++ ni12 -> length ni11 = n -> le_app_spec ni1 n.

(* Specifications: *)
Lemma le_app0 : forall ni1 ni21 ni22 : nested_imps, le_ni ni1 (ni21 ++ ni22) -> le_app_spec ni1 (length ni21).
Lemma le_ni_app_nn : forall (ni1 ni2 ni3 ni4 : nested_imps) (x : nimp), length ni1 = length ni3 -> le_ni (ni1 ++ ni2) (ni3 ++ ni4) -> le_ni (ni1 ++ Undecorated x :: ni2) (ni3 ++ Undecorated x :: ni4).
Lemma le_ni_app_dn : forall (ni1 ni2 ni3 ni4 : nested_imps) (x : nimp) (k : kripke_tree), length ni1 = length ni3 -> le_ni (ni1 ++ ni2) (ni3 ++ ni4) -> le_ni (ni1 ++ Decorated x k :: ni2) (ni3 ++ Undecorated x :: ni4).
Lemma le_ni_app_dd : forall (ni1 ni2 ni3 ni4 : nested_imps) (x : nimp) (k : kripke_tree), length ni1 = length ni3 -> le_ni (ni1 ++ ni2) (ni3 ++ ni4) -> le_ni (ni1 ++ Decorated x k :: ni2) (ni3 ++ Decorated x k :: ni4).