(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)
Definition rho (h : TypeSpeed) : R := (g * (tan MaxBank / h))%R.
Definition r (h : TypeSpeed) : R := (h / rho h)%R.
Definition rho_ub (h : TypeSpeed) : R := (g * (tan_ub_MaxBank / h))%R.
Definition rho_lb (h : TypeSpeed) : R := (g * (tan_lb_MaxBank / h))%R.
intro; assert (H := v_cond1 h).
apply Rlt_le_trans with MinSpeed.
unfold MinSpeed in |- *; prove_sup.
assumption.
Qed.
unfold g in |- *; unfold Rdiv in |- *; apply Rmult_lt_reg_l with 10%R.
prove_sup.
rewrite Rmult_0_r; rewrite <- Rmult_comm; rewrite Rmult_assoc;
rewrite <- Rinv_l_sym; [ prove_sup | discrR ].
Qed.
intros; unfold rho, rho_ub in |- *; apply Rmult_lt_compat_l;
[ apply g_pos
| generalize TypeSpeed_pos; intros; generalize (H h); clear H; intro H;
generalize (Rinv_0_lt_compat h H); intro H1; generalize tan_MaxBank_ub;
intro H2;
generalize (Rmult_lt_compat_l (/ h) (tan MaxBank) tan_ub_MaxBank H1 H2);
rewrite Rmult_comm; rewrite <- (Rmult_comm tan_ub_MaxBank);
intro H3; assumption ].
Qed.
intros; unfold rho, rho_lb in |- *; apply Rmult_lt_compat_l;
[ apply g_pos
| generalize TypeSpeed_pos; intros; generalize (H h); clear H; intro H;
generalize (Rinv_0_lt_compat h H); intro H1; generalize tan_MaxBank_lb;
intro H2;
generalize (Rmult_lt_compat_l (/ h) tan_lb_MaxBank (tan MaxBank) H1 H2);
rewrite <- (Rmult_comm (tan MaxBank));
rewrite <- (Rmult_comm tan_lb_MaxBank); intro H3;
assumption ].
Qed.
Definition r_ub (h : TypeSpeed) : R := (h / rho_lb h)%R.
Definition r_lb (h : TypeSpeed) : R := (h / rho_ub h)%R.
unfold tan_lb_MaxBank in |- *; unfold Rdiv in |- *;
apply Rmult_lt_reg_l with 10%R.
prove_sup.
rewrite Rmult_0_r; rewrite <- Rmult_comm; rewrite Rmult_assoc;
rewrite <- Rinv_l_sym; [ prove_sup | discrR ].
Qed.
apply Rlt_trans with tan_lb_MaxBank;
[ apply tan_lb_MaxBank_pos
| apply Rlt_trans with (tan MaxBank);
[ apply tan_MaxBank_lb | apply tan_MaxBank_ub ] ].
Qed.
intros; unfold rho_lb in |- *; apply Rmult_lt_0_compat;
[ apply g_pos
| replace (tan_lb_MaxBank / h)%R with (tan_lb_MaxBank * / h)%R;
[ rewrite Rmult_comm; generalize TypeSpeed_pos; intro H; generalize (H h);
clear H; intro H; generalize (Rinv_0_lt_compat h H);
intro H0; apply Rmult_lt_0_compat;
[ assumption | apply tan_lb_MaxBank_pos ]
| auto ] ].
Qed.
intro; apply Rlt_trans with (rho_lb h); [ apply rho_lb_pos | apply rho_lb_0 ].
Qed.
intro; apply Rlt_trans with (rho h); [ apply rho_pos | apply rho_ub_0 ].
Qed.
intros; unfold r, r_ub in |- *; generalize (rho_lb_0 h); intro H;
generalize (Rmult_lt_0_compat (rho_lb h) (rho h) (rho_lb_pos h) (rho_pos h));
intro H0; generalize (Rinv_lt_contravar (rho_lb h) (rho h) H0 H);
intro H1;
generalize (Rmult_lt_compat_l h (/ rho h) (/ rho_lb h) (TypeSpeed_pos h) H1);
intro H2; assumption.
Qed.
intros; unfold r, r_lb in |- *; generalize (rho_ub_0 h); intro H;
generalize (Rmult_lt_0_compat (rho h) (rho_ub h) (rho_pos h) (rho_ub_pos h));
intro H0; generalize (Rinv_lt_contravar (rho h) (rho_ub h) H0 H);
intro H1;
generalize (Rmult_lt_compat_l h (/ rho_ub h) (/ rho h) (TypeSpeed_pos h) H1);
intro H2; assumption.
Qed.

(**********)
Lemma rho_PI2 : forall h : TypeSpeed, (rho h <= PI / 2)%R.