Section alpha_no_conflict.
Unset Standard Proposition Elimination Names.
Variable intr : Trajectory.
Variable evad : EvaderTrajectory.
Variable T : TimeT.
Definition Alpha (a : R) : bool :=
let a1 :=
((Rsqr (ve evad * T) + Rsqr (l intr evad T) - Rsqr AlertRange) /
(2 * ve evad * T))%R in
let a2 := (l intr evad T * cos a)%R in
match Rle_dec a1 a2 with
| left _ => true
| right _ => false
end.
Proof with trivial.
unfold Alpha in |- *;
case
(Rle_dec
((Rsqr (ve evad * T) + Rsqr (l intr evad T) - Rsqr AlertRange) /
(2 * ve evad * T)) (l intr evad T * cos (beta intr evad T)));
intros...
unfold Rdiv in r; cut (0 < 2 * ve evad * T)%R...
intro;
generalize
(Rmult_le_compat_r (2 * ve evad * T)
((Rsqr (ve evad * T) + Rsqr (l intr evad T) - Rsqr AlertRange) *
/ (2 * ve evad * T)) (l intr evad T * cos (beta intr evad T))
(Rlt_le 0 (2 * ve evad * T) H0) r); repeat rewrite Rmult_assoc;
rewrite <- Rinv_l_sym...
rewrite Rmult_1_r; intro;
generalize
(Rplus_le_compat_l
(Rsqr AlertRange -
2 * l intr evad T * ve evad * T * cos (beta intr evad T))
(Rsqr (ve evad * T) + Rsqr (l intr evad T) - Rsqr AlertRange)
(l intr evad T * (cos (beta intr evad T) * (2 * (ve evad * T)))) H1);
replace
(Rsqr AlertRange - 2 * l intr evad T * ve evad * T * cos (beta intr evad T) +
l intr evad T * (cos (beta intr evad T) * (2 * (ve evad * T))))%R with
(Rsqr AlertRange)...
replace
(Rsqr AlertRange - 2 * l intr evad T * ve evad * T * cos (beta intr evad T) +
(Rsqr (ve evad * T) + Rsqr (l intr evad T) - Rsqr AlertRange))%R with
(Rsqr (ve evad * T) + Rsqr (l intr evad T) -
2 * ve evad * T * l intr evad T * cos (beta intr evad T))%R...
rewrite <- d_l_beta...
intro; apply Rsqr_incr_0_var...
left; apply AlertRange_pos...
ring...
ring...
repeat apply prod_neq_R0...
discrR...
red in |- *; intro; generalize (TypeSpeed_pos (h (tr evad))); intro;
unfold ve in H1; rewrite H1 in H2; elim (Rlt_irrefl 0 H2)...
cut (0 < T)%R...
intro...
red in |- *; intro; rewrite H2 in H1; elim (Rlt_irrefl 0 H1)...
apply Rlt_le_trans with MinT...
apply MinT_is_pos...
apply (cond_1 T)...
repeat apply Rmult_lt_0_compat...
prove_sup0...
unfold ve in |- *; apply (TypeSpeed_pos (h (tr evad)))...
apply Rlt_le_trans with MinT...
apply MinT_is_pos...
apply (cond_1 T)...
elim diff_false_true...
Qed.
Proof with trivial.
intros; unfold Alpha in |- *;
case
(Rle_dec
((Rsqr (ve evad * T) + Rsqr (l intr evad T) - Rsqr AlertRange) /
(2 * ve evad * T)) (l intr evad T * cos (beta intr evad T)));
intro...
elim n; unfold Rdiv in |- *; cut (0 < 2 * ve evad * T)%R...
intro; apply Rmult_le_reg_l with (2 * ve evad * T)%R...
rewrite <-
(Rmult_comm
((Rsqr (ve evad * T) + Rsqr (l intr evad T) - Rsqr AlertRange) *
/ (2 * ve evad * T))); repeat rewrite Rmult_assoc;
rewrite <- Rinv_l_sym...
rewrite Rmult_1_r;
apply
Rplus_le_reg_l
with
(Rsqr AlertRange -
2 * l intr evad T * ve evad * T * cos (beta intr evad T))%R;
replace
(Rsqr AlertRange - 2 * l intr evad T * ve evad * T * cos (beta intr evad T) +
(Rsqr (ve evad * T) + Rsqr (l intr evad T) - Rsqr AlertRange))%R with
(Rsqr (ve evad * T) + Rsqr (l intr evad T) -
2 * ve evad * T * l intr evad T * cos (beta intr evad T))%R...
rewrite <- d_l_beta;
replace
(Rsqr AlertRange - 2 * l intr evad T * ve evad * T * cos (beta intr evad T) +
2 * (ve evad * (T * (l intr evad T * cos (beta intr evad T)))))%R with
(Rsqr AlertRange)...
apply Rsqr_incr_1...
unfold d in |- *; unfold Die in |- *; apply sqrt_positivity;
apply Rplus_le_le_0_compat; apply Rle_0_sqr...
left; apply AlertRange_pos...
ring...
ring...
repeat apply prod_neq_R0...
discrR...
red in |- *; intro; generalize (TypeSpeed_pos (h (tr evad))); intro;
unfold ve in H1; rewrite H1 in H2; elim (Rlt_irrefl 0 H2)...
cut (0 < T)%R...
intro; red in |- *; intro; rewrite H2 in H1; elim (Rlt_irrefl 0 H1)...
apply Rlt_le_trans with MinT...
apply MinT_is_pos...
apply (cond_1 T)...
repeat apply Rmult_lt_0_compat;
[ prove_sup0
| unfold ve in |- *; apply (TypeSpeed_pos (h (tr evad)))
| apply Rlt_le_trans with MinT; [ apply MinT_is_pos | apply (cond_1 T) ] ]...
Qed.

Lemma Alpha_d_AlertRange_2 :
Alpha (beta intr evad T) = false -> (AlertRange < d intr evad)%R.