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.
Proof with trivial.
intro; rewrite <- d_distance; rewrite distance_sym; rewrite <- R_distance...
cut (0 <= T)%R...
intro;
generalize
(asymptotic_increase_tau (measure2state intr 0) (measure2state (tr evad) 0)
0 0 T H H0); intro...
repeat rewrite Rplus_0_l in H1...
left; apply Rlt_le_trans with MinT...
apply MinT_is_pos...
apply (cond_1 T)...
Qed.
Proof with trivial.
intros hyp_evad H...
cut (0 <= d intr evad)%R...
cut (0 <= RR (measure2state intr 0) (measure2state (tr evad) 0) T)%R...
intros...
generalize
(Rsqr_incr_1 _ (RR (measure2state intr 0) (measure2state (tr evad) 0) T) H2
H1 H0); intro...
rewrite R_T in H3...
rewrite (d_l_beta intr evad T) in H3...
unfold ve in H3...
rewrite hyp_evad in H3...
rewrite Rsqr_minus in H3...
repeat rewrite Rsqr_mult in H3...
rewrite cos2 in H3...
generalize
(Rplus_le_compat_l (- Rsqr (l intr evad T) - Rsqr V * Rsqr T)
(Rsqr V * Rsqr T + Rsqr (l intr evad T) -
2 * V * T * l intr evad T * cos (beta intr evad T))
(Rsqr (l intr evad T) *
(1 - Rsqr (sin (beta intr evad T + thetat intr 0))) +
Rsqr V * Rsqr T -
2 * (l intr evad T * cos (beta intr evad T + thetat intr 0)) * (V * T) +
Rsqr (l intr evad T) * Rsqr (sin (beta intr evad T + thetat intr 0))) H3)...
replace
(- Rsqr (l intr evad T) - Rsqr V * Rsqr T +
(Rsqr V * Rsqr T + Rsqr (l intr evad T) -
2 * V * T * l intr evad T * cos (beta intr evad T)))%R with
(2 * V * T * l intr evad T * - cos (beta intr evad T))%R...
replace
(- Rsqr (l intr evad T) - Rsqr V * Rsqr T +
(Rsqr (l intr evad T) * (1 - Rsqr (sin (beta intr evad T + thetat intr 0))) +
Rsqr V * Rsqr T -
2 * (l intr evad T * cos (beta intr evad T + thetat intr 0)) * (V * T) +
Rsqr (l intr evad T) * Rsqr (sin (beta intr evad T + thetat intr 0))))%R
with
(2 * V * T * l intr evad T * - cos (beta intr evad T + thetat intr 0))%R...
intro...
rewrite <- (Ropp_involutive (cos (beta intr evad T)))...
rewrite <- (Ropp_involutive (cos (beta intr evad T + thetat intr 0)))...
apply Ropp_ge_le_contravar...
apply Rle_ge...
apply Rmult_le_reg_l with (2 * V * T * l intr evad T)%R...
apply Rmult_lt_0_compat...
prove_sup0...
(*apply TypeSpeed_pos. useless since 8.4 thanks to beta/delta in apply*)
apply Rlt_le_trans with MinT; [ apply MinT_is_pos | apply (cond_1 T) ]...
ring...
ring...
(*Rewrite hyp_evad.*)
apply RR_pos...
unfold d in |- *; unfold Die in |- *; apply sqrt_positivity...
apply Rplus_le_le_0_compat; apply Rle_0_sqr...
Qed.

Lemma R_T_d_diff_1 :
h (tr evad) = V ->
(cos (beta intr evad T + thetat intr 0) <= cos (beta intr evad T))%R ->
(d intr evad <= RR (measure2state intr 0) (measure2state (tr evad) 0) T)%R.