(**********)
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.

(* Specifications: *)
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)}.
Lemma P1 : forall n : nat, (0 <= frac_part_n_alpha n)%R.
Lemma P2 : forall n : nat, (frac_part_n_alpha n < 1)%R.