intros; elim H1; intro; clear H1.
cut
((frac_part_n_alpha (last N) -
(frac_part_n_alpha k - frac_part_n_alpha (first N) + 1))%R = 0%R).
unfold frac_part_n_alpha in |- *;
rewrite <- (Rminus_fp2 (INR k * alpha) (INR (first N) * alpha) H2);
generalize
(Rminus_fp1 (INR (last N) * alpha) (INR k * alpha - INR (first N) * alpha));
intros;
cut
(frac_part (INR (last N) * alpha) >=
frac_part (INR k * alpha - INR (first N) * alpha))%R.
intro; rewrite <- (H1 H4) in H3; clear H1 H4;
elim
(fp_nat (INR (last N) * alpha - (INR k * alpha - INR (first N) * alpha)) H3).
unfold Rminus in |- *;
rewrite <- (Ropp_mult_distr_l_reverse (INR (first N)) alpha);
rewrite (Ropp_plus_distr (INR k * alpha) (- INR (first N) * alpha));
rewrite <- (Ropp_mult_distr_l_reverse (INR k) alpha);
rewrite <- (Ropp_mult_distr_l_reverse (- INR (first N)) alpha);
rewrite (Ropp_involutive (INR (first N)));
rewrite (Rmult_comm (- INR k) alpha);
rewrite (Rmult_comm (INR (first N)) alpha);
rewrite (Rmult_comm (INR (last N)) alpha);
rewrite <- (Rmult_plus_distr_l alpha (- INR k) (INR (first N)));
rewrite <-
(Rmult_plus_distr_l alpha (INR (last N)) (- INR k + INR (first N)))
; rewrite (Rplus_comm (- INR k) (INR (first N)));
rewrite <- (Rplus_assoc (INR (last N)) (INR (first N)) (- INR k));
fold (INR (last N) + INR (first N) - INR k)%R in |- *;
rewrite <- (plus_INR (last N) (first N));
rewrite (INR_IZR_INZ (last N + first N)).
rewrite (INR_IZR_INZ k).
rewrite (Z_R_minus (Z_of_nat (last N + first N)) (Z_of_nat k)).
intros.
generalize (alpha_irr x (Z_of_nat (last N + first N) - Z_of_nat k)).
intro.
auto.
unfold Rge in |- *; right; apply Rminus_diag_uniq; auto.
cut
((frac_part_n_alpha k - frac_part_n_alpha (first N) + 1 <=
frac_part_n_alpha (last N))%R /\
(frac_part_n_alpha k - frac_part_n_alpha (last N) + 1 >=
frac_part_n_alpha (first N))%R).
intro; elim H1; intros; clear H1.
generalize
(Rle_minus (frac_part_n_alpha k - frac_part_n_alpha (first N) + 1)
(frac_part_n_alpha (last N)) H3);
generalize
(Rge_minus (frac_part_n_alpha k - frac_part_n_alpha (last N) + 1)
(frac_part_n_alpha (first N)) H4); intros; clear H3 H4;
generalize
(Rge_le
(frac_part_n_alpha k - frac_part_n_alpha (last N) + 1 -
frac_part_n_alpha (first N)) 0 H1); intro; clear H1;
rewrite <- Ropp_minus_distr; rewrite <- Ropp_0; apply Ropp_eq_compat.
unfold Rminus in H3;
rewrite (Rplus_comm (frac_part_n_alpha k) (- frac_part_n_alpha (last N)))
in H3;
rewrite (Rplus_assoc (- frac_part_n_alpha (last N)) (frac_part_n_alpha k) 1)
in H3.
rewrite
(Rplus_assoc (- frac_part_n_alpha (last N)) (frac_part_n_alpha k + 1)
(- frac_part_n_alpha (first N))) in H3;
rewrite
(Rplus_comm (- frac_part_n_alpha (last N))
(frac_part_n_alpha k + 1 + - frac_part_n_alpha (first N)))
in H3;
rewrite
(Rplus_assoc (frac_part_n_alpha k) 1 (- frac_part_n_alpha (first N)))
in H3; rewrite (Rplus_comm 1 (- frac_part_n_alpha (first N))) in H3;
rewrite <-
(Rplus_assoc (frac_part_n_alpha k) (- frac_part_n_alpha (first N)) 1)
in H3; fold (frac_part_n_alpha k - frac_part_n_alpha (first N))%R in H3;
fold
(frac_part_n_alpha k - frac_part_n_alpha (first N) + 1 -
frac_part_n_alpha (last N))%R in H3;
elim
(Rle_le_eq
(frac_part_n_alpha k - frac_part_n_alpha (first N) + 1 -
frac_part_n_alpha (last N)) 0); auto.
split; unfold frac_part_n_alpha in |- *.
unfold frac_part_n_alpha in H2;
rewrite <- (Rminus_fp2 (INR k * alpha) (INR (first N) * alpha) H2);
elim (tech_first_last N (k - first N) (prop_N N)).
intros; unfold ordre_total in H3; unfold frac_part_n_alpha in H3;
cut (first N <= k).
intro; rewrite (minus_INR k (first N) H4) in H3; unfold Rminus in H3;
rewrite (Rmult_comm (INR k + - INR (first N)) alpha) in H3;
rewrite (Rmult_plus_distr_l alpha (INR k) (- INR (first N))) in H3;
rewrite (Rmult_comm alpha (- INR (first N))) in H3;
rewrite (Ropp_mult_distr_l_reverse (INR (first N)) alpha) in H3;
fold (alpha * INR k - INR (first N) * alpha)%R in H3;
rewrite (Rmult_comm alpha (INR k)) in H3; auto.
generalize (first_N01 N); intro; apply (le_trans (first N) N k H4 H).
elim (lt_minus2 (first N) k); auto.
generalize (first_N N (prop_N N)); intro.
apply (lt_le_trans (first N) N k H1 H).
cut (k - first N < last N).
generalize (last_N01 N); intros;
apply (lt_le_trans (k - first N) (last N) N H3 H1).
apply (lt_plus_minus k (first N) (last N)).
generalize (first_N N (prop_N N)); intro;
apply (lt_le_trans (first N) N k H1 H).
assumption.
cut (frac_part_n_alpha k < frac_part_n_alpha (last N))%R.
intro; unfold frac_part_n_alpha in H1;
rewrite <- (Rminus_fp2 (INR k * alpha) (INR (last N) * alpha) H1);
elim (tech_first_last N (k - last N) (prop_N N)).
intros; unfold ordre_total in H3; unfold frac_part_n_alpha in H3;
cut (last N <= k).
intro; rewrite (minus_INR k (last N) H5) in H3; unfold Rminus in H3;
rewrite (Rmult_comm (INR k + - INR (last N)) alpha) in H3;
rewrite (Rmult_plus_distr_l alpha (INR k) (- INR (last N))) in H3;
rewrite (Rmult_comm alpha (- INR (last N))) in H3;
rewrite (Ropp_mult_distr_l_reverse (INR (last N)) alpha) in H3;
fold (alpha * INR k - INR (last N) * alpha)%R in H3;
rewrite (Rmult_comm alpha (INR k)) in H3;
apply
(Rle_ge (frac_part (INR (first N) * alpha))
(frac_part (INR k * alpha - INR (last N) * alpha))
(H3 prop_alpha)).
generalize (last_N01 N); intro; apply (le_trans (last N) N k H5 H).
elim (lt_minus2 (last N) k); auto.
generalize (last_N N (prop_N N)); intro.
apply (lt_le_trans (last N) N k H3 H).
cut (k - last N < first N).
generalize (first_N01 N); intros;
apply (lt_le_trans (k - last N) (first N) N H4 H3).
apply (lt_plus_minus k (last N) (first N)).
generalize (last_N N (prop_N N)); intro;
apply (lt_le_trans (last N) N k H3 H).
rewrite plus_comm; assumption.
generalize (le_first_last N (prop_N N)); unfold ordre_total in |- *; intros;
apply
(Rlt_le_trans (frac_part_n_alpha k) (frac_part_n_alpha (first N))
(frac_part_n_alpha (last N)) H2 (H1 prop_alpha)).
(***)
cut
((frac_part_n_alpha (last N) -
(frac_part_n_alpha k - frac_part_n_alpha (first N)))%R = 0%R).
cut (frac_part_n_alpha k >= frac_part_n_alpha (first N))%R.
unfold frac_part_n_alpha in |- *; intro;
rewrite <- (Rminus_fp1 (INR k * alpha) (INR (first N) * alpha) H1);
generalize
(Rminus_fp1 (INR (last N) * alpha) (INR k * alpha - INR (first N) * alpha));
intros;
cut
(frac_part (INR (last N) * alpha) >=
frac_part (INR k * alpha - INR (first N) * alpha))%R.
intro; rewrite <- (H3 H5) in H4; clear H3 H5;
elim
(fp_nat (INR (last N) * alpha - (INR k * alpha - INR (first N) * alpha)) H4).
unfold Rminus in |- *;
rewrite <- (Ropp_mult_distr_l_reverse (INR (first N)) alpha);
rewrite (Ropp_plus_distr (INR k * alpha) (- INR (first N) * alpha));
rewrite <- (Ropp_mult_distr_l_reverse (INR k) alpha);
rewrite <- (Ropp_mult_distr_l_reverse (- INR (first N)) alpha);
rewrite (Ropp_involutive (INR (first N)));
rewrite (Rmult_comm (- INR k) alpha);
rewrite (Rmult_comm (INR (first N)) alpha);
rewrite (Rmult_comm (INR (last N)) alpha);
rewrite <- (Rmult_plus_distr_l alpha (- INR k) (INR (first N)));
rewrite <-
(Rmult_plus_distr_l alpha (INR (last N)) (- INR k + INR (first N)))
; rewrite (Rplus_comm (- INR k) (INR (first N)));
rewrite <- (Rplus_assoc (INR (last N)) (INR (first N)) (- INR k));
fold (INR (last N) + INR (first N) - INR k)%R in |- *;
rewrite <- (plus_INR (last N) (first N)).
rewrite (INR_IZR_INZ (last N + first N)).
rewrite (INR_IZR_INZ k).
rewrite (Z_R_minus (Z_of_nat (last N + first N)) (Z_of_nat k)).
intros.
generalize (alpha_irr x (Z_of_nat (last N + first N) - Z_of_nat k)).
intro.
auto.
unfold Rge in |- *; right; apply Rminus_diag_uniq; auto.
generalize (le_first_last N (prop_N N)); unfold ordre_total in |- *; intros;
unfold Rgt in H2; cut (frac_part_n_alpha (first N) <= frac_part_n_alpha k)%R.
intro; apply (Rle_ge (frac_part_n_alpha (first N)) (frac_part_n_alpha k) H3).
cut (frac_part_n_alpha (first N) < frac_part_n_alpha k)%R.
intro; apply (Rlt_le (frac_part_n_alpha (first N)) (frac_part_n_alpha k) H3).
apply
(Rle_lt_trans (frac_part_n_alpha (first N)) (frac_part_n_alpha (last N))
(frac_part_n_alpha k) (H1 prop_alpha) H2).
cut
((frac_part_n_alpha k - frac_part_n_alpha (first N) <=
frac_part_n_alpha (last N))%R /\
(frac_part_n_alpha k - frac_part_n_alpha (last N) >=
frac_part_n_alpha (first N))%R).
intro; elim H1; intros; clear H1.
generalize
(Rle_minus (frac_part_n_alpha k - frac_part_n_alpha (first N))
(frac_part_n_alpha (last N)) H3);
generalize
(Rge_minus (frac_part_n_alpha k - frac_part_n_alpha (last N))
(frac_part_n_alpha (first N)) H4); intros; clear H3 H4;
generalize
(Rge_le
(frac_part_n_alpha k - frac_part_n_alpha (last N) -
frac_part_n_alpha (first N)) 0 H1); intro; clear H1;
rewrite <- Ropp_minus_distr; rewrite <- Ropp_0; apply Ropp_eq_compat.
unfold Rminus in H3;
rewrite
(Rplus_assoc (frac_part_n_alpha k) (- frac_part_n_alpha (last N))
(- frac_part_n_alpha (first N))) in H3;
rewrite
(Rplus_comm (- frac_part_n_alpha (last N)) (- frac_part_n_alpha (first N)))
in H3;
rewrite <-
(Rplus_assoc (frac_part_n_alpha k) (- frac_part_n_alpha (first N))
(- frac_part_n_alpha (last N))) in H3;
fold (frac_part_n_alpha k - frac_part_n_alpha (first N))%R in H3;
fold
(frac_part_n_alpha k - frac_part_n_alpha (first N) -
frac_part_n_alpha (last N))%R in H3;
elim
(Rle_le_eq
(frac_part_n_alpha k - frac_part_n_alpha (first N) -
frac_part_n_alpha (last N)) 0); auto.
split.
cut (frac_part_n_alpha k >= frac_part_n_alpha (first N))%R.
unfold frac_part_n_alpha in |- *; intro;
rewrite <- (Rminus_fp1 (INR k * alpha) (INR (first N) * alpha) H1);
elim (tech_first_last N (k - first N) (prop_N N)).
intros; unfold ordre_total in H4; unfold frac_part_n_alpha in H4;
cut (first N <= k).
intro; rewrite (minus_INR k (first N) H5) in H4; unfold Rminus in H4;
rewrite (Rmult_comm (INR k + - INR (first N)) alpha) in H4;
rewrite (Rmult_plus_distr_l alpha (INR k) (- INR (first N))) in H4;
rewrite (Rmult_comm alpha (- INR (first N))) in H4;
rewrite (Ropp_mult_distr_l_reverse (INR (first N)) alpha) in H4;
fold (alpha * INR k - INR (first N) * alpha)%R in H4;
rewrite (Rmult_comm alpha (INR k)) in H4; auto.
generalize (first_N01 N); intro; apply (le_trans (first N) N k H5 H).
elim (lt_minus2 (first N) k); auto.
generalize (first_N N (prop_N N)); intro.
apply (lt_le_trans (first N) N k H3 H).
cut (k - first N < last N).
generalize (last_N01 N); intros;
apply (lt_le_trans (k - first N) (last N) N H4 H3).
apply (lt_plus_minus k (first N) (last N)).
generalize (first_N N (prop_N N)); intro;
apply (lt_le_trans (first N) N k H3 H).
assumption.
unfold frac_part_n_alpha in |- *; generalize (le_first_last N (prop_N N));
unfold ordre_total in |- *; intros; unfold Rgt in H2;
cut (frac_part_n_alpha (first N) <= frac_part_n_alpha k)%R.
intro; apply (Rle_ge (frac_part_n_alpha (first N)) (frac_part_n_alpha k) H3).
cut (frac_part_n_alpha (first N) < frac_part_n_alpha k)%R.
intro; apply (Rlt_le (frac_part_n_alpha (first N)) (frac_part_n_alpha k) H3).
apply
(Rle_lt_trans (frac_part_n_alpha (first N)) (frac_part_n_alpha (last N))
(frac_part_n_alpha k) (H1 prop_alpha) H2).
cut (frac_part_n_alpha k >= frac_part_n_alpha (last N))%R.
unfold frac_part_n_alpha in |- *; intro;
rewrite <- (Rminus_fp1 (INR k * alpha) (INR (last N) * alpha) H1);
elim (tech_first_last N (k - last N) (prop_N N)).
intros; unfold ordre_total in H3; unfold frac_part_n_alpha in H3;
cut (last N <= k).
intro; rewrite (minus_INR k (last N) H5) in H3; unfold Rminus in H3;
rewrite (Rmult_comm (INR k + - INR (last N)) alpha) in H3;
rewrite (Rmult_plus_distr_l alpha (INR k) (- INR (last N))) in H3;
rewrite (Rmult_comm alpha (- INR (last N))) in H3;
rewrite (Ropp_mult_distr_l_reverse (INR (last N)) alpha) in H3;
fold (alpha * INR k - INR (last N) * alpha)%R in H3;
rewrite (Rmult_comm alpha (INR k)) in H3;
apply
(Rle_ge (frac_part (INR (first N) * alpha))
(frac_part (INR k * alpha - INR (last N) * alpha))
(H3 prop_alpha)).
generalize (last_N01 N); intro; apply (le_trans (last N) N k H5 H).
elim (lt_minus2 (last N) k); auto.
generalize (last_N N (prop_N N)); intro.
apply (lt_le_trans (last N) N k H3 H).
cut (k - last N < first N).
generalize (first_N01 N); intros;
apply (lt_le_trans (k - last N) (first N) N H4 H3).
apply (lt_plus_minus k (last N) (first N)).
generalize (last_N N (prop_N N)); intro;
apply (lt_le_trans (last N) N k H3 H).
rewrite plus_comm; assumption.
apply Rgt_ge; auto.
Qed.

(* Specifications: *)
(**********)
Lemma absurd1 :
forall N k : nat,
N <= k ->
k < first N + last N ->
(frac_part_n_alpha k >= frac_part_n_alpha (first N))%R /\
(frac_part_n_alpha k <= frac_part_n_alpha (last N))%R.