simple induction N; intro.
absurd (0 >= 2).
inversion H.
auto with arith real.
intro X; case (N_classic n); intro.
elim s; intro y.
rewrite y; intro; absurd (1 >= 2); inversion H; inversion H1;
auto with arith real.
rewrite y; intro; exists 1; split; auto with arith real.
split; auto with arith real.
intros; replace m with 1.
apply tech_total_order.
apply sym_equal; elim H0; intro.
inversion H1; auto with arith real.
intros.
elim (X g); intros.
cut
({(frac_part_n_alpha x <= frac_part_n_alpha n)%R} +
{~ (frac_part_n_alpha x <= frac_part_n_alpha n)%R}).
intro X0; elim X0; intro.
exists n; split; auto with arith real.
split; auto with arith real.
intros; cut (0 < m /\ m < n \/ m = n).
intro; elim H1.
intro; elim p; intros; elim H4; intros; unfold ordre_total in |- *; intro.
cut (frac_part_n_alpha m <= frac_part_n_alpha x)%R.
intro;
apply
(Rle_trans (frac_part_n_alpha m) (frac_part_n_alpha x)
(frac_part_n_alpha n) H8 a).
elim (H6 m H2).
intro; apply (Rlt_le (frac_part_n_alpha m) (frac_part_n_alpha x) H8).
intro; rewrite H8; unfold Rle in |- *; right; auto with arith real.
apply prop_alpha.
intro; rewrite H2; apply tech_total_order.
elim H0; intros.
cut (0 < m /\ m < n \/ 0 < m /\ m = n).
intro; elim H3; intro.
left; auto with arith real.
elim H4; intros.
right; auto with arith real.
cut (0 < m /\ (m < n \/ m = n)).
intro; elim H3; intros.
elim H5; intro.
left; auto with arith real.
right; auto with arith real.
split; auto with arith real.
unfold lt in H2; inversion H2; auto with arith real.
exists x; split.
elim p; intros; auto with arith real.
split.
elim p; intros.
elim H1; intros; auto with arith real.
intros; elim p; intros; elim H2; intros; cut (0 < m /\ m < n \/ m = n).
intro; elim H5; intro.
elim (H4 m H6); auto with arith real.
apply prop_alpha.
rewrite H6; unfold ordre_total in |- *; intro.
cut (frac_part_n_alpha n < frac_part_n_alpha x)%R.
intro; apply (Rlt_le (frac_part_n_alpha n) (frac_part_n_alpha x) H8).
apply (Rnot_le_lt (frac_part_n_alpha x) (frac_part_n_alpha n) b).
elim H0; intros; cut (0 < m /\ m < n \/ 0 < m /\ m = n).
intro; elim H7; intros.
left; auto with arith real.
elim H8; intros; right; auto with arith real.
cut (0 < m /\ (m < n \/ m = n)).
intro; elim H7; intros; elim H9; intro.
left; auto with arith real.
right; auto with arith real.
split; auto with arith real.
unfold lt in H6; inversion H6; auto with arith real.
apply (Rle_dec (frac_part_n_alpha x) (frac_part_n_alpha n)).
Qed.
(**********)
Definition first (N : nat) :=
match N_classic N with
| inright p => match exist_first N p return nat with
| existT a b => a
end
| _ => 0
end.
(**********)
Definition last (N : nat) :=
match N_classic N with
| inright p => match exist_last N p return nat with
| existT a b => a
end
| _ => 0
end.
(*********************************************************)
(*       Definition of the next point                    *)
(*********************************************************)

Lemma exist_after_M :
forall M : R,
(0 <= M)%R ->
(M < 1)%R ->
forall N : nat,
sig
(fun I : nat =>
0 < I /\
I < N /\
(M < frac_part_n_alpha I)%R /\
(forall m : nat,
0 <= m ->
m < N ->
(frac_part_n_alpha m > M)%R ->
(frac_part_n_alpha m >= frac_part_n_alpha I)%R)) +
{(forall m : nat,
0 <= m ->
m < N -> (0 <= frac_part_n_alpha m)%R /\ (frac_part_n_alpha m <= M)%R)}.