intros ni1 ni2 x k le12.
elim le12; clear le12 ni1 ni2.
intros; assumption.
intros x' ni1 ni2 le12 ih in_k.
right.
apply ih.
inversion_clear in_k.
discriminate H.
assumption.
intros x' k' ni1 ni2 le12 ih in_k.
right.
apply ih.
inversion_clear in_k.
discriminate H.
assumption.
intros x' k' ni1 ni2 le12 ih in_k.
inversion_clear in_k.
left; assumption.
right; apply ih; assumption.
Qed.

Lemma le_ni_refl : forall ni : nested_imps, le_ni ni ni.
intros ni; elim ni; clear ni.