simpl in |- *; intros.
elim H.
apply same_quotient_order; auto; apply upper_bound.
intros; apply same_quotient_order; auto; apply upper_bound.
Qed.

(* Specifications: *)
Lemma comp_eq_most :
forall (n : nat) (x y : digit) (X Y : num n),
val x = val y ->
Val n X < Val n Y -> Val (S n) (Cons n x X) < Val (S n) (Cons n y Y).