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.
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...
elim diff_true_false...
unfold Rdiv in n; cut (0 < 2 * ve evad * T)%R...
intro...
cut
(l intr evad T * cos (beta intr evad T) <
(Rsqr (ve evad * T) + Rsqr (l intr evad T) - Rsqr AlertRange) *
/ (2 * ve evad * T))%R...
intro;
generalize
(Rmult_lt_compat_r (2 * ve evad * T)
(l intr evad T * cos (beta intr evad T))
((Rsqr (ve evad * T) + Rsqr (l intr evad T) - Rsqr AlertRange) *
/ (2 * ve evad * T)) H0 H1); repeat rewrite Rmult_assoc;
rewrite <- Rinv_l_sym...
rewrite Rmult_1_r; intro;
generalize
(Rplus_lt_compat_l
(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))))
(Rsqr (ve evad * T) + Rsqr (l intr evad T) - Rsqr AlertRange) H2);
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_incrst_0...
left; apply AlertRange_pos...
unfold d in |- *; unfold Die in |- *; apply sqrt_positivity;
apply Rplus_le_le_0_compat; apply Rle_0_sqr...
ring...
ring...
repeat apply prod_neq_R0...
discrR...
red in |- *; intro; generalize (TypeSpeed_pos (h (tr evad))); intro;
unfold ve in H2; rewrite H2 in H3; elim (Rlt_irrefl 0 H3)...
cut (0 < T)%R...
intro...
red in |- *; intro; rewrite H3 in H2; elim (Rlt_irrefl 0 H2)...
apply Rlt_le_trans with MinT...
apply MinT_is_pos...
apply (cond_1 T)...
auto with real...
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.
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...
unfold Rdiv in r; cut (0 < 2 * ve evad * T)%R...
intro;
generalize
(Rmult_le_compat_l (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)...
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; 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)
(2 * (ve evad * (T * (l intr evad T * cos (beta intr evad T))))) H1)...
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)...
intro...
generalize
(Rsqr_incr_0_var (d intr evad) AlertRange H2
(Rlt_le 0 AlertRange AlertRange_pos))...
intro...
elim (Rlt_irrefl (d intr evad) (Rle_lt_trans _ _ _ H3 H))...
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.
(*** Verifiable in MuPAD ***)
Axiom
cos_beta_NOT_Alpha :
Alpha (beta intr evad T) = false ->
h intr = V ->
h (tr evad) = V ->
(MinDistance T <= l intr evad T)%R ->
(l intr evad T <= MaxDistance T)%R ->
(cos (beta intr evad T) <= cos MinBeta)%R.

Lemma tau_le_0_diverg :
(tau (measure2state intr 0) (measure2state (tr evad) 0) 0 <= 0)%R ->
(d intr evad <= RR (measure2state intr 0) (measure2state (tr evad) 0) T)%R.