(* 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                                                     *)
(* Verifiable in MuPAD *)
Axiom
Math_prop_alarm_1 :
forall (a l : R) (T : TimeT),
(MinDistance T <= l)%R ->
(l <= MaxDistance T)%R ->
(0 <= a)%R ->
(a <= MinBeta)%R ->
(Rsqr (l * cos a - v V * T) + Rsqr (l * sin a) <= Rsqr AlertRange)%R.
(* Verifiable in MuPAD *)
Axiom
Math_prop_no_conflict_1 :
forall (a l x y : R) (T : TimeT),
(MinDistance T <= l)%R ->
(l <= MaxDistance T)%R ->
(MinBeta <= a)%R ->
(a <= PI / 2)%R ->
(l * sin a + r_V * (cos (rho_V * T) - 1) <= y)%R ->
(r_V * sin (rho_V * T) - l * cos a <= x)%R ->
(Rsqr ConflictRange < Rsqr x + Rsqr y)%R.
unfold MinBeta in |- *; unfold Rdiv in |- *.
apply Rmult_lt_0_compat; [ prove_sup | apply Rinv_0_lt_compat; prove_sup ].
Qed.
intros; apply Rplus_le_compat_r; apply Rmult_le_compat_l;
[ assumption
| apply sin_incr_1;
[ left; apply Rlt_trans with 0%R;
[ apply _PI2_RLT_0 | apply MinBeta_pos ]
| apply Rle_trans with a; assumption
| left; apply Rlt_trans with 0%R;
[ apply _PI2_RLT_0
| apply Rlt_le_trans with MinBeta; [ apply MinBeta_pos | assumption ] ]
| assumption
| assumption ] ].
Qed.

(**********)
Lemma Math_prop_approx_y_a_PI2 :
forall (a l1 l2 : R) (T : TimeT),
(0 <= a)%R ->
(a <= PI / 2)%R ->
(0 <= l1)%R ->
(l1 <= l2)%R ->
(l1 * sin_lb a + r_ub V * (cos_lb (rho_ub V * MaxT) - 1) <=
l2 * sin a + r_V * (cos (rho_V * T) - 1))%R.