Section trajectory.
Unset Standard Proposition Elimination Names.
Variable intr : Trajectory.
Variable evad : EvaderTrajectory.
Variable T : TimeT.
unfold thetat in |- *; apply (cond_diff (theta intr)).
Qed.
Definition xe : R := x (tr evad) T.
Definition ye : R := y (tr evad) T.
Definition ve : R := v (h (tr evad)).
Definition r_vi : R := r (vi intr).
Definition rho_vi : R := rho (vi intr).
Definition Die (ti te : R) : R :=
sqrt
(Rsqr (xi intr ti - x (tr evad) te) + Rsqr (yi intr ti - y (tr evad) te)).
Definition conflict (t : R) : bool :=
match Rle_dec (Die t t) ConflictRange with
| left _ => true
| right _ => false
end.
intro; unfold xi, vi, thetat in |- *.
assert (H := cond_x intr t).
rewrite <- H.
apply pr_nu.
Qed.
intro; unfold yi, vi, thetat in |- *.
assert (H := cond_y intr t).
rewrite <- H.
apply pr_nu.
Qed.
Definition l : R := Die 0 T.
Definition d : R := Die 0 0.
Axiom
beta_exists :
{ beta : R |
xe = (l * cos beta + xi intr 0)%R /\
ye = (yi intr 0 - l * sin beta)%R /\
(0 <= beta + thetat intr 0 < 2 * PI)%R }.
Definition beta := let (a,_) := beta_exists in a.
unfold beta in |- *; case beta_exists; trivial.
Qed.
Definition Omega (a : R) : bool :=
match Rle_dec (PI / 2) a with
| left _ =>
match Rle_dec a (3 * (PI / 2)) with
| left _ => true
| right _ => false
end
| right _ => false
end.
Proof with trivial.
generalize beta_def; intro; elim H...
Qed.
Proof with trivial.
generalize beta_def; intro; elim H; intros _ H0; elim H0...
Qed.
Proof with trivial.
unfold d in |- *; unfold Die in |- *; rewrite Rsqr_sqrt...
replace (xi intr 0 - x (tr evad) 0)%R with
(xi intr 0 - xe + (xe - x (tr evad) 0))%R...
replace (yi intr 0 - y (tr evad) 0)%R with
(yi intr 0 - ye + (ye - y (tr evad) 0))%R...
repeat rewrite Rsqr_plus; cut ((ye - y (tr evad) 0)%R = 0%R)...
intro; rewrite H; repeat rewrite Rmult_0_r; rewrite Rsqr_0;
repeat rewrite Rplus_0_r; cut ((xe - x (tr evad) 0)%R = (ve * T)%R)...
intro; rewrite H0;
replace
(Rsqr (xi intr 0 - xe) + Rsqr (ve * T) + 2 * (xi intr 0 - xe) * (ve * T) +
Rsqr (yi intr 0 - ye))%R with
(Rsqr (ve * T) + (Rsqr (xi intr 0 - xe) + Rsqr (yi intr 0 - ye)) +
2 * (xi intr 0 - xe) * (ve * T))%R...
cut (Rsqr l = (Rsqr (xi intr 0 - xe) + Rsqr (yi intr 0 - ye))%R)...
intro; rewrite <- H1; rewrite xe_0; ring...
unfold l in |- *; unfold Die in |- *; rewrite Rsqr_sqrt;
[ unfold xe, ye in |- * | apply Rplus_le_le_0_compat; apply Rle_0_sqr ]...
ring...
unfold xe, ve in |- *; rewrite (tr_cond1 evad); ring...
unfold ye, ve in |- *; rewrite (tr_cond2 evad); unfold Rminus in |- *;
rewrite Rplus_opp_r...
ring...
ring...
apply Rplus_le_le_0_compat; apply Rle_0_sqr...
Qed.
Definition yp (t : R) : R :=
(- sin (thetat intr 0) * (xi intr t - xe) +
cos (thetat intr 0) * (yi intr t - ye))%R.
Hint Resolve xi_derivable yi_derivable: diff.
unfold yp in |- *; set (thetat_p := thetat intr); set (xi_p := xi intr);
set (yi_p := yi intr); reg.
apply (yi_derivable intr).
apply (xi_derivable intr).
Qed.
Hint Resolve yp_derivable: diff.
Definition xp (t : R) : R :=
(cos (thetat intr 0) * (xi intr t - xe) +
sin (thetat intr 0) * (yi intr t - ye))%R.
unfold xp in |- *; set (thetat_p := thetat intr); set (xi_p := xi intr);
set (yi_p := yi intr); reg.
apply (yi_derivable intr).
apply (xi_derivable intr).
Qed.
Hint Resolve xp_derivable: diff.
Definition Rsqr_evader_distance (t : R) : R :=
(Rsqr (xi intr t - xe) + Rsqr (yi intr t - ye))%R.
unfold Rsqr_evader_distance in |- *.
set (xi_p := xi intr); set (yi_p := yi intr); reg.
apply (yi_derivable intr).
apply (xi_derivable intr).
Qed.
Hint Resolve Rsqr_evader_distance_derivable: diff.
Definition Rsqr_intruder_distance (t : R) : R :=
(Rsqr (xi intr t - xi intr 0) + Rsqr (yi intr t - yi intr 0))%R.
unfold Rsqr_intruder_distance in |- *; set (xi_p := xi intr);
set (yi_p := yi intr); reg.
apply (yi_derivable intr).
apply (xi_derivable intr).
Qed.
Hint Resolve Rsqr_intruder_distance_derivable: diff.
intro; unfold Rsqr_evader_distance in |- *; apply Rplus_le_le_0_compat;
apply Rle_0_sqr.
Qed.

Lemma Rsqr_intruder_distance_pos :
forall t : R, (0 <= Rsqr_intruder_distance t)%R.