Section particular.
Hypothesis alpha_irr : forall n p : Z, (alpha * IZR p)%R <> IZR n.
Hypothesis prop_alpha : (0 < alpha)%R /\ (alpha < 1)%R.
Hypothesis prop_N : forall N : nat, N >= 2.
(**********)
Definition M (N : nat) := first N + last N.
intros; apply (sym_equal (x:=n + first (M N)) (y:=after (M N) n));
apply (tech_after alpha_irr (M N) n (n + first (M N)) H);
auto with arith real.
apply (lt_le_trans n (last (M N)) (M N) H0 (last_N01 (M N))).
unfold M at 2 in |- *;
rewrite (last_eq_M_N alpha_irr prop_alpha prop_N N (M N));
auto with arith real;
rewrite (first_eq_M_N alpha_irr prop_alpha prop_N N (M N));
auto with arith real.
rewrite (plus_comm (first (M N)) (last (M N)));
apply (plus_lt_compat_r n (last (M N)) (first (M N)) H0).
fold (frac_part_n_alpha (n + first (M N)) > frac_part_n_alpha n)%R in |- *;
apply
(Rnot_le_lt (frac_part_n_alpha (n + first (M N))) (frac_part_n_alpha n));
red in |- *; intro;
generalize
(Rplus_le_compat_l (- frac_part_n_alpha (first (M N)))
(frac_part_n_alpha (n + first (M N))) (frac_part_n_alpha n) H1);
rewrite
(Rplus_comm (- frac_part_n_alpha (first (M N)))
(frac_part_n_alpha (n + first (M N))));
rewrite
(Rplus_comm (- frac_part_n_alpha (first (M N))) (frac_part_n_alpha n))
;
fold
(frac_part_n_alpha (n + first (M N)) - frac_part_n_alpha (first (M N)))%R
in |- *;
fold (frac_part_n_alpha n - frac_part_n_alpha (first (M N)))%R in |- *;
cut
(frac_part_n_alpha (n + first (M N)) >= frac_part_n_alpha (first (M N)))%R.
intro; unfold frac_part_n_alpha at 1 2 in |- *;
unfold frac_part_n_alpha in H2;
rewrite <-
(Rminus_fp1 (INR (n + first (M N)) * alpha) (INR (first (M N)) * alpha) H2)
; rewrite (plus_INR n (first (M N)));
rewrite (Rmult_comm (INR n + INR (first (M N))) alpha);
rewrite (Rmult_plus_distr_l alpha (INR n) (INR (first (M N))));
rewrite (Rmult_comm alpha (INR (first (M N)))); unfold Rminus at 1 in |- *;
rewrite
(Rplus_assoc (alpha * INR n) (INR (first (M N)) * alpha)
(- (INR (first (M N)) * alpha)));
rewrite (Rplus_opp_r (INR (first (M N)) * alpha)).
elim (Rplus_ne (alpha * INR n)); intros a b; rewrite a; clear a b;
rewrite (Rmult_comm alpha (INR n)); fold (frac_part_n_alpha n) in |- *;
intro; cut (0 < frac_part_n_alpha (first (M N)))%R.
intro;
generalize
(tech_Rgt_minus (frac_part_n_alpha n) (frac_part_n_alpha (first (M N))) H4);
clear H4 H1 H2; intro; unfold Rgt in H1;
generalize
(Rgt_not_le (frac_part_n_alpha n)
(frac_part_n_alpha n - frac_part_n_alpha (first (M N))) H1);
auto with arith real.
fold (frac_part_n_alpha (first (M N)) > 0)%R in |- *;
apply (fp_first_R0 alpha_irr prop_N (M N)).
unfold Rge in |- *; unfold Rgt in |- *;
cut
((frac_part_n_alpha (first (M N)) < frac_part_n_alpha (n + first (M N)))%R \/
frac_part_n_alpha (first (M N)) = frac_part_n_alpha (n + first (M N))).
intro; elim H2; intro.
left; auto with arith real.
right; auto with arith real.
fold
(frac_part_n_alpha (first (M N)) <= frac_part_n_alpha (n + first (M N)))%R
in |- *; apply (first_n (M N) (n + first (M N)));
auto with arith real;
generalize (plus_lt_compat_r n (last (M N)) (first (M N)) H0);
intro; unfold M at 2 in |- *;
rewrite (first_eq_M_N alpha_irr prop_alpha prop_N N (M N));
auto with arith real;
rewrite (last_eq_M_N alpha_irr prop_alpha prop_N N (M N));
auto with arith real; rewrite (plus_comm (first (M N)) (last (M N)));
assumption.
(**)
intro; elim H1; intros; elim H2; intros; elim H4; intros; elim H6; intros;
clear H6 H4 H2 H1.
elim (le_or_lt x n); intro.
generalize
(Ropp_lt_gt_contravar (frac_part_n_alpha n) (frac_part_n_alpha x) H7);
intro;
generalize
(Rplus_gt_compat_l (frac_part_n_alpha (n + first (M N)))
(- frac_part_n_alpha n) (- frac_part_n_alpha x) H2);
fold (frac_part_n_alpha (n + first (M N)) - frac_part_n_alpha n)%R in |- *;
fold (frac_part_n_alpha (n + first (M N)) - frac_part_n_alpha x)%R in |- *;
fold (frac_part_n_alpha (n + first (M N)) > frac_part_n_alpha x)%R in H8;
generalize
(Rgt_ge (frac_part_n_alpha (n + first (M N))) (frac_part_n_alpha x) H8);
intro; unfold frac_part_n_alpha in H4; unfold frac_part_n_alpha in |- *;
rewrite <- (Rminus_fp1 (INR (n + first (M N)) * alpha) (INR x * alpha) H4);
fold (frac_part_n_alpha x > frac_part_n_alpha n)%R in H7;
generalize
(Rgt_trans (frac_part_n_alpha (n + first (M N)))
(frac_part_n_alpha x) (frac_part_n_alpha n) H8 H7);
intro;
generalize
(Rgt_ge (frac_part_n_alpha (n + first (M N))) (frac_part_n_alpha n) H6);
intro; unfold frac_part_n_alpha in H9;
rewrite <- (Rminus_fp1 (INR (n + first (M N)) * alpha) (INR n * alpha) H9);
rewrite (plus_INR n (first (M N)));
rewrite (Rmult_comm (INR n + INR (first (M N))) alpha);
rewrite (Rmult_plus_distr_l alpha (INR n) (INR (first (M N))));
rewrite (Rmult_comm alpha (INR n)); unfold Rminus at 1 in |- *;
rewrite (Rplus_comm (INR n * alpha) (alpha * INR (first (M N))));
rewrite
(Rplus_assoc (alpha * INR (first (M N))) (INR n * alpha)
(- (INR n * alpha))); rewrite (Rplus_opp_r (INR n * alpha));
elim (Rplus_ne (alpha * INR (first (M N)))); intros a b;
rewrite a; clear a b; rewrite (Rmult_comm alpha (INR (first (M N))));
fold (frac_part_n_alpha (first (M N))) in |- *; unfold Rminus in |- *;
rewrite
(Rplus_assoc (INR (first (M N)) * alpha) (INR n * alpha)
(- (INR x * alpha))); rewrite (Rmult_comm (INR (first (M N))) alpha);
rewrite (Rmult_comm (INR n) alpha);
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));
rewrite <- (Rmult_plus_distr_l alpha (INR (first (M N))) (INR n + - INR x));
fold (INR n - INR x)%R in |- *; rewrite <- (minus_INR n x H1);
rewrite <- (plus_INR (first (M N)) (n - x));
rewrite (Rmult_comm alpha (INR (first (M N) + (n - x))));
fold (frac_part_n_alpha (first (M N) + (n - x))) in |- *;
intro; clear H2 H4 H6 H9; cut (0 < first (M N) + (n - x)).
cut (first (M N) + (n - x) < M N).
intros;
generalize
(first_n (M N) (first (M N) + (n - x)) (prop_N (M N)) H4 H2 prop_alpha);
intro; clear H2 H4; unfold Rgt in H10;
generalize
(Rgt_not_le (frac_part_n_alpha (first (M N)))
(frac_part_n_alpha (first (M N) + (n - x))) H10);
auto with arith real.
unfold M at 2 in |- *;
rewrite (first_eq_M_N alpha_irr prop_alpha prop_N N (M N));
auto with arith real.
apply (plus_lt_compat_l (n - x) (last N) (first (M N)));
rewrite (last_eq_M_N alpha_irr prop_alpha prop_N N (M N));
auto with arith real.
apply (lt_minus_p n (last (M N)) x H0).
apply (lt_O_plus (first (M N)) (n - x) (first_0 (M N) (prop_N (M N)))).
(**)
generalize
(Rplus_lt_compat_l (- frac_part_n_alpha n) (frac_part_n_alpha x)
(frac_part_n_alpha (n + first (M N))) H8);
rewrite (Rplus_comm (- frac_part_n_alpha n) (frac_part_n_alpha x));
rewrite
(Rplus_comm (- frac_part_n_alpha n) (frac_part_n_alpha (n + first (M N))))
; fold (frac_part_n_alpha x - frac_part_n_alpha n)%R in |- *;
fold (frac_part_n_alpha (n + first (M N)) - frac_part_n_alpha n)%R in |- *;
fold (frac_part_n_alpha x > frac_part_n_alpha n)%R in H7;
generalize (Rgt_ge (frac_part_n_alpha x) (frac_part_n_alpha n) H7);
intro;
fold (frac_part_n_alpha (n + first (M N)) > frac_part_n_alpha x)%R in H8;
generalize
(Rgt_trans (frac_part_n_alpha (n + first (M N)))
(frac_part_n_alpha x) (frac_part_n_alpha n) H8 H7);
intro;
generalize
(Rgt_ge (frac_part_n_alpha (n + first (M N))) (frac_part_n_alpha n) H4);
intro; unfold frac_part_n_alpha in H2, H6; unfold frac_part_n_alpha in |- *;
rewrite <- (Rminus_fp1 (INR x * alpha) (INR n * alpha) H2);
rewrite <- (Rminus_fp1 (INR (n + first (M N)) * alpha) (INR n * alpha) H6);
rewrite (plus_INR n (first (M N)));
rewrite (Rmult_comm (INR n + INR (first (M N))) alpha);
rewrite (Rmult_plus_distr_l alpha (INR n) (INR (first (M N))));
rewrite (Rmult_comm alpha (INR n));
rewrite (Rmult_comm alpha (INR (first (M N)))); unfold Rminus at 2 in |- *;
rewrite (Rplus_comm (INR n * alpha) (INR (first (M N)) * alpha));
rewrite
(Rplus_assoc (INR (first (M N)) * alpha) (INR n * alpha)
(- (INR n * alpha))); rewrite (Rplus_opp_r (INR n * alpha));
elim (Rplus_ne (INR (first (M N)) * alpha)); intros a b;
rewrite a; clear a b; fold (frac_part_n_alpha (first (M N))) in |- *;
clear H2 H4 H6; unfold Rminus in |- *; rewrite (Rmult_comm (INR x) alpha);
rewrite <- (Ropp_mult_distr_l_reverse (INR n) alpha);
rewrite (Rmult_comm (- INR n) alpha);
rewrite <- (Rmult_plus_distr_l alpha (INR x) (- INR n));
fold (INR x - INR n)%R in |- *; rewrite (Rmult_comm alpha (INR x - INR n));
generalize (lt_le_weak n x H1); intro; rewrite <- (minus_INR x n H2);
fold (frac_part_n_alpha (x - n)) in |- *; intro; cut (0 < x - n).
intro; cut (x - n < M N).
intro; generalize (first_n (M N) (x - n) (prop_N (M N)) H6 H9 prop_alpha);
intro; clear H9 H6;
generalize
(Rgt_not_le (frac_part_n_alpha (first (M N))) (frac_part_n_alpha (x - n))
H4); auto with arith real.
apply (lt_minus_p x (M N) n H5).
apply (lt_minus2 n x H1).
Qed.

(**********)
Lemma inter31b :
forall N n : nat,
last (M N) <= n -> n < M N -> after (M N) n = n - last (M N).