intros; elim (le_lt_or_eq (last (M N)) n H); intro; clear H.
apply (sym_equal (x:=n - last (M N)) (y:=after (M N) n));
apply (tech_after alpha_irr (M N) n (n - last (M N)));
auto with arith real.
apply (lt_trans 0 (last (M N)) n (last_0 (M N) (prop_N (M N))) H1).
apply (lt_minus_p n (M N) (last (M N)) H0).
cut
(frac_part_n_alpha n <
frac_part_n_alpha n - frac_part_n_alpha (last (M N)) + 1)%R.
intro; unfold frac_part_n_alpha in H; generalize H; clear H;
rewrite <- (Rminus_fp2 (INR n * alpha) (INR (last (M N)) * alpha)).
fold (frac_part_n_alpha n) in |- *; rewrite (Rmult_comm (INR n) alpha);
unfold Rminus in |- *;
rewrite <- (Ropp_mult_distr_l_reverse (INR (last (M N))) alpha);
rewrite (Rmult_comm (- INR (last (M N))) alpha);
rewrite <- (Rmult_plus_distr_l alpha (INR n) (- INR (last (M N))));
fold (INR n - INR (last (M N)))%R in |- *;
rewrite <- (minus_INR n (last (M N)) (lt_le_weak (last (M N)) n H1));
rewrite (Rmult_comm alpha (INR (n - last (M N))));
fold (frac_part_n_alpha (n - last (M N))) in |- *;
trivial.
fold (frac_part_n_alpha n) in |- *;
fold (frac_part_n_alpha (last (M N))) in |- *;
generalize
(last_n (M N) n (prop_N (M N))
(lt_trans 0 (last (M N)) n (last_0 (M N) (prop_N (M N))) H1) H0
prop_alpha); intro; unfold Rle in H; elim H; intro;
auto with arith real.
generalize
(contra_tech_fp_alp_irr alpha_irr prop_alpha (last (M N)) n
(lt_not_eq (last (M N)) n H1)); intro; elimtype False;
auto with arith real.
unfold Rminus in |- *;
rewrite
(Rplus_assoc (frac_part_n_alpha n) (- frac_part_n_alpha (last (M N))) 1)
; rewrite (Rplus_comm (- frac_part_n_alpha (last (M N))) 1);
fold (1 - frac_part_n_alpha (last (M N)))%R in |- *;
elim (Rplus_ne (frac_part_n_alpha n)); intros a b;
pattern (frac_part_n_alpha n) at 1 in |- *; rewrite <- a;
clear a b;
apply
(Rplus_lt_compat_l (frac_part_n_alpha n) 0
(1 - frac_part_n_alpha (last (M N))));
fold (1 - frac_part_n_alpha (last (M N)) > 0)%R in |- *;
apply (Rgt_minus 1 (frac_part_n_alpha (last (M N))));
unfold Rgt in |- *; unfold frac_part_n_alpha in |- *;
elim (base_fp (INR (last (M N)) * alpha)); intros;
assumption.
(**)
intro; elim H; intros; elim H2; intros; elim H4; intros; elim H6; intros;
clear H H2 H4 H6.
elim (le_or_lt n x); intro.
generalize
(Rplus_lt_compat_l (- frac_part_n_alpha (n - last (M N)))
(frac_part_n_alpha n) (frac_part_n_alpha x) H7);
intro;
generalize
(Rplus_lt_compat_l 1
(- frac_part_n_alpha (n - last (M N)) + frac_part_n_alpha n)
(- frac_part_n_alpha (n - last (M N)) + frac_part_n_alpha x) H2);
clear H2;
rewrite
(Rplus_comm 1 (- frac_part_n_alpha (n - last (M N)) + frac_part_n_alpha n))
;
rewrite
(Rplus_comm 1 (- frac_part_n_alpha (n - last (M N)) + frac_part_n_alpha x))
;
rewrite
(Rplus_comm (- frac_part_n_alpha (n - last (M N))) (frac_part_n_alpha n))
;
rewrite
(Rplus_comm (- frac_part_n_alpha (n - last (M N))) (frac_part_n_alpha x))
; fold (frac_part_n_alpha n - frac_part_n_alpha (n - last (M N)))%R in |- *;
fold (frac_part_n_alpha x - frac_part_n_alpha (n - last (M N)))%R in |- *;
unfold frac_part_n_alpha in |- *;
rewrite <- (Rminus_fp2 (INR n * alpha) (INR (n - last (M N)) * alpha)).
rewrite <- (Rminus_fp2 (INR x * alpha) (INR (n - last (M N)) * alpha)).
rewrite (minus_INR n (last (M N)) (lt_le_weak (last (M N)) n H1));
unfold Rminus in |- *;
rewrite (Rmult_comm (INR n + - INR (last (M N))) alpha);
rewrite (Rmult_plus_distr_l alpha (INR n) (- INR (last (M N))));
rewrite (Ropp_plus_distr (alpha * INR n) (alpha * - INR (last (M N))));
rewrite <-
(Rplus_assoc (INR n * alpha) (- (alpha * INR n))
(- (alpha * - INR (last (M N))))); rewrite (Rmult_comm (INR n) alpha);
rewrite (Rplus_opp_r (alpha * INR n));
elim (Rplus_ne (- (alpha * - INR (last (M N)))));
intros a b; rewrite b; clear a b;
rewrite (Rmult_comm alpha (- INR (last (M N))));
rewrite <- (Ropp_mult_distr_l_reverse (- INR (last (M N))) alpha);
rewrite (Ropp_involutive (INR (last (M N))));
fold (frac_part_n_alpha (last (M N))) in |- *;
rewrite <-
(Rplus_assoc (INR x * alpha) (- (alpha * INR n)) (INR (last (M N)) * alpha))
; rewrite (Rmult_comm alpha (INR n));
rewrite <- (Ropp_mult_distr_l_reverse (INR n) alpha);
rewrite (Rmult_comm (- INR n) alpha); rewrite (Rmult_comm (INR x) alpha);
rewrite <- (Rmult_plus_distr_l alpha (INR x) (- INR n));
fold (INR x - INR n)%R in |- *; rewrite <- (minus_INR x n H);
rewrite (Rmult_comm (INR (last (M N))) alpha);
rewrite <- (Rmult_plus_distr_l alpha (INR (x - n)) (INR (last (M N))));
rewrite <- (plus_INR (x - n) (last (M N)));
rewrite (Rmult_comm alpha (INR (x - n + last (M N))));
fold (frac_part_n_alpha (x - n + last (M N))) in |- *;
intro; cut (0 < x - n + last (M N)).
intro; cut (x - n + last (M N) < M N).
intro;
generalize
(last_n (M N) (x - n + last (M N)) (prop_N (M N)) H4 H6 prop_alpha);
intro; clear H4 H6;
generalize
(Rgt_not_le (frac_part_n_alpha (x - n + last (M N)))
(frac_part_n_alpha (last (M N))) H2); intro; elimtype False;
auto with arith real.
apply (tech_inter31b (last (M N)) n x (M N) H1 H H5).
rewrite plus_comm;
apply (lt_O_plus (last (M N)) (x - n) (last_0 (M N) (prop_N (M N)))).
fold (frac_part_n_alpha x) in |- *;
fold (frac_part_n_alpha (n - last (M N))) in |- *;
assumption.
fold (frac_part_n_alpha n) in |- *;
fold (frac_part_n_alpha (n - last (M N))) in |- *;
apply
(Rlt_trans (frac_part_n_alpha n) (frac_part_n_alpha x)
(frac_part_n_alpha (n - last (M N))) H7 H8).
(**)
generalize
(Ropp_lt_gt_contravar (frac_part_n_alpha x)
(frac_part_n_alpha (n - last (M N))) H8); unfold Rgt in |- *;
intro;
generalize
(Rplus_lt_compat_l (frac_part_n_alpha n)
(- frac_part_n_alpha (n - last (M N))) (- frac_part_n_alpha x) H2);
clear H2;
fold (frac_part_n_alpha n - frac_part_n_alpha (n - last (M N)))%R in |- *;
fold (frac_part_n_alpha n - frac_part_n_alpha x)%R in |- *;
intro;
generalize
(Rplus_lt_compat_l 1
(frac_part_n_alpha n - frac_part_n_alpha (n - last (M N)))
(frac_part_n_alpha n - frac_part_n_alpha x) H2);
clear H2;
rewrite
(Rplus_comm 1 (frac_part_n_alpha n - frac_part_n_alpha (n - last (M N))))
; rewrite (Rplus_comm 1 (frac_part_n_alpha n - frac_part_n_alpha x));
unfold frac_part_n_alpha in |- *;
rewrite <- (Rminus_fp2 (INR n * alpha) (INR (n - last (M N)) * alpha)).
rewrite <- (Rminus_fp2 (INR n * alpha) (INR x * alpha)).
rewrite (Rmult_comm (INR n) alpha); unfold Rminus at 2 in |- *;
rewrite <- (Ropp_mult_distr_l_reverse (INR x) alpha);
rewrite (Rmult_comm (- INR x) alpha);
rewrite <- (Rmult_plus_distr_l alpha (INR n) (- INR x));
fold (INR n - INR x)%R in |- *;
rewrite <- (minus_INR n x (lt_le_weak x n H));
rewrite (Rmult_comm alpha (INR (n - x)));
fold (frac_part_n_alpha (n - x)) in |- *;
rewrite (minus_INR n (last (M N)) (lt_le_weak (last (M N)) n H1));
unfold Rminus in |- *;
rewrite (Rmult_comm (INR n + - INR (last (M N))) alpha);
rewrite (Rmult_plus_distr_l alpha (INR n) (- INR (last (M N))));
rewrite (Ropp_plus_distr (alpha * INR n) (alpha * - INR (last (M N))));
rewrite <-
(Rplus_assoc (alpha * INR n) (- (alpha * INR n))
(- (alpha * - INR (last (M N))))); rewrite (Rplus_opp_r (alpha * INR n));
elim (Rplus_ne (- (alpha * - INR (last (M N)))));
intros a b; rewrite b; clear a b;
rewrite (Rmult_comm alpha (- INR (last (M N))));
rewrite <- (Ropp_mult_distr_l_reverse (- INR (last (M N))) alpha);
rewrite (Ropp_involutive (INR (last (M N))));
fold (frac_part_n_alpha (last (M N))) in |- *; intro;
cut (0 < n - x).
intro; cut (n - x < M N).
intro; generalize (last_n (M N) (n - x) (prop_N (M N)) H4 H6 prop_alpha);
intro;
generalize
(Rgt_not_le (frac_part_n_alpha (n - x)) (frac_part_n_alpha (last (M N))) H2);
intro; elimtype False; auto with arith real.
apply (lt_minus_p n (M N) x H0).
apply (lt_minus2 x n H).
fold (frac_part_n_alpha n) in |- *; fold (frac_part_n_alpha x) in |- *;
assumption.
fold (frac_part_n_alpha n) in |- *;
fold (frac_part_n_alpha (n - last (M N))) in |- *;
apply
(Rlt_trans (frac_part_n_alpha n) (frac_part_n_alpha x)
(frac_part_n_alpha (n - last (M N))) H7 H8).
rewrite <- H1; rewrite <- (minus_n_n (last (M N)));
apply (after_last prop_alpha prop_N (M N)).
Qed.

(**********)
Lemma tech1 :
forall N n : nat,
N - first N <= n ->
n < last N ->
(frac_part_n_alpha n < frac_part_n_alpha (n + first N - last N))%R.