intros ni1 dni1 ni2 dni2 le12.
generalize (le_ni_le_count_undecs (rev_app dni1 ni1) (rev_app dni2 ni2) le12);
clear le12.
rewrite (count_undecs_rev_app dni1 ni1).
rewrite (count_undecs_rev_app dni2 ni2).
trivial.
Qed.

(* Specifications: *)
Lemma My_Lt_Ks_rec :
forall P : nested_imps -> Set,
(forall (ni2 : nested_imps) (dni2 : decorated_nested_imps),
(forall (ni1 : nested_imps) (dni1 : decorated_nested_imps),
Lt_Ks ni1 dni1 ni2 dni2 -> P (rev_app dni1 ni1)) ->
P (rev_app dni2 ni2)) -> forall ni : nested_imps, P ni.