Section ycngftys.
Unset Standard Proposition Elimination Names.
Variable intr : Trajectory.
(**********)
Definition xi : R -> R := x intr.
Definition yi : R -> R := y intr.
Definition vi : TypeSpeed := h intr.
Definition xP (t : R) : R := (xi t - xi 0)%R.
Definition yP (t : R) : R := (yi t - yi 0)%R.
Definition u (eps : posreal) (t : R) : R :=
sqrt (Rsqr (xP t) + Rsqr (yP t) + Rsqr eps).
Definition u0 (t : R) : R := sqrt (Rsqr (xP t) + Rsqr (yP t)).
unfold xi in |- *; apply (cond_diff (x intr)).
Qed.
unfold yi in |- *; apply (cond_diff (y intr)).
Qed.
unfold xP in |- *.
reg; apply xi_derivable.
Qed.
unfold yP in |- *.
reg; apply yi_derivable.
Qed.
intro.
unfold u in |- *; unfold derivable in |- *; intro.
reg.
apply yP_derivable.
apply xP_derivable.
apply Rle_lt_trans with (Rsqr (xP x) + Rsqr (yP x))%R.
apply Rplus_le_le_0_compat; apply Rle_0_sqr.
rewrite Rplus_assoc.
apply Rplus_lt_compat_l.
pattern (Rsqr (yP x)) at 1 in |- *; rewrite <- Rplus_0_r.
apply Rplus_lt_compat_l.
apply Rsqr_pos_lt.
red in |- *; intro; assert (H0 := cond_pos eps); rewrite H in H0;
elim (Rlt_irrefl _ H0).
Qed.
intros; set (f := u eps); reg.
apply (d_u eps).
Qed.
intros; set (f := u eps).
cut (derivable_pt f t); [ intro H | apply (d_u eps t) ].
cut (derive_pt f t H = derive_pt f t (d_u eps t)); [ intro | apply pr_nu ].
reg.
Qed.
intro; unfold xP in |- *; reg.
apply pr_nu.
apply xi_derivable.
Qed.
intro; unfold yP in |- *; reg.
apply pr_nu.
apply yi_derivable.
Qed.
intros; reg.
apply yP_derivable.
apply xP_derivable.
Qed.
intros; set (f := u eps).
replace (derive_pt (fun y : R => Rsqr (f y)) t (fct_der2 eps t)) with
(derive_pt (fun y : R => (Rsqr (xP y) + (Rsqr (yP y) + Rsqr eps))%R) t
(fct_der3 eps t)).
replace
(derive_pt (fun y : R => (Rsqr (xP y) + (Rsqr (yP y) + Rsqr eps))%R) t
(fct_der3 eps t)) with
(2 * derive_pt xP t (xP_derivable t) * xP t +
2 * derive_pt yP t (yP_derivable t) * yP t)%R.
rewrite (xP_derive t).
rewrite (yP_derive t).
assert (H0 := cond_x intr t).
assert (H1 := cond_y intr t).
cut
(derive_pt (x intr) t (cond_diff (x intr) t) =
derive_pt xi t (xi_derivable t)); [ intro | apply pr_nu ].
cut
(derive_pt (y intr) t (cond_diff (y intr) t) =
derive_pt yi t (yi_derivable t)); [ intro | apply pr_nu ].
rewrite <- H; rewrite <- H2; rewrite H1; rewrite H0.
unfold vi in |- *.
repeat rewrite Rmult_assoc.
rewrite <- Rmult_plus_distr_l.
apply Rmult_le_compat_l.
left; prove_sup0.
rewrite <- Rmult_plus_distr_l.
rewrite (Rmult_comm (u0 t)); apply Rmult_le_compat_l.
left; apply (TypeSpeed_pos (h intr)).
generalize
(sqrt_cauchy (cos (theta intr t)) (sin (theta intr t)) (xP t) (yP t));
rewrite (Rplus_comm (Rsqr (cos (theta intr t))));
rewrite sin2_cos2; rewrite sqrt_1; rewrite Rmult_1_l;
intro H8; unfold u0 in |- *; assumption.
set (H0 := xP_derivable t).
set (H1 := yP_derivable t).
symmetry  in |- *; reg.
unfold derive_pt in |- *; unfold derivable_pt_abs in |- *;
cut
(forall l : R,
derivable_pt_lim (fun y : R => (Rsqr (xP y) + (Rsqr (yP y) + Rsqr eps))%R)
t l <-> derivable_pt_lim (fun y : R => Rsqr (f y)) t l).
intro; unfold projT1 in |- *.
case (fct_der3 eps t); intros.
case (fct_der2 eps t); intros.
assert (H0 := H x).
unfold derivable_pt_abs in d.
elim H0; intros; fold f in d0.
assert (H3 := H1 d).
eapply uniqueness_limite.
apply H3.
apply d0.
intro; unfold derivable_pt_lim in |- *.
split; intros.
elim (H eps0 H0); intros.
exists x; intros; unfold f in |- *; unfold u in |- *.
repeat rewrite Rsqr_sqrt.
repeat rewrite Rplus_assoc.
apply H1; assumption.
repeat apply Rplus_le_le_0_compat; try apply Rle_0_sqr.
repeat apply Rplus_le_le_0_compat; try apply Rle_0_sqr.
elim (H eps0 H0); intros.
exists x; intros; unfold f in H1; unfold u in H1.
replace
((Rsqr (xP (t + h)) + (Rsqr (yP (t + h)) + Rsqr eps) -
(Rsqr (xP t) + (Rsqr (yP t) + Rsqr eps))) / h - l)%R with
((Rsqr (sqrt (Rsqr (xP (t + h)) + Rsqr (yP (t + h)) + Rsqr eps)) -
Rsqr (sqrt (Rsqr (xP t) + Rsqr (yP t) + Rsqr eps))) / h - l)%R.
apply H1; assumption.
repeat rewrite Rsqr_sqrt.
repeat rewrite Rplus_assoc; reflexivity.
repeat apply Rplus_le_le_0_compat; try apply Rle_0_sqr.
repeat apply Rplus_le_le_0_compat; try apply Rle_0_sqr.
Qed.
intros; unfold u in |- *; apply sqrt_lt_R0; apply Rplus_le_lt_0_compat;
[ apply Rplus_le_le_0_compat; apply Rle_0_sqr
| apply Rsqr_pos_lt; red in |- *; intro H; generalize (cond_pos eps);
intro H0; rewrite H in H0; elim (Rlt_irrefl 0 H0) ].
Qed.
intros; left; apply u_stric_pos.
Qed.
intros; unfold u0 in |- *; apply sqrt_positivity; apply Rplus_le_le_0_compat;
apply Rle_0_sqr.
Qed.
intros; apply sqrt_inj;
[ apply Rle_0_sqr
| apply Rplus_le_le_0_compat; apply Rle_0_sqr
| rewrite sqrt_Rsqr;
[ unfold u0 in |- *; rewrite Rsqr_sqrt;
[ unfold u in |- *; reflexivity
| apply Rplus_le_le_0_compat; apply Rle_0_sqr ]
| apply (u_pos eps t) ] ].
Qed.
intros; apply Rsqr_incr_0;
[ unfold u0, u in |- *; repeat rewrite Rsqr_sqrt;
[ rewrite <- (Rplus_0_r (Rsqr (xP t) + Rsqr (yP t)));
repeat rewrite Rplus_assoc; repeat apply Rplus_le_compat_l;
rewrite Rplus_0_l; apply Rle_0_sqr
| repeat apply Rplus_le_le_0_compat; apply Rle_0_sqr
| apply Rplus_le_le_0_compat; apply Rle_0_sqr ]
| apply u0_pos
| apply u_pos ].
Qed.
intros.
generalize (D_Rsqr_u_epsilon_2 eps t); intro H.
rewrite (D_Rsqr_u_epsilon_1 eps t) in H.
repeat rewrite Rmult_assoc in H.
assert (Hyp : (0 < 2)%R).
prove_sup0.
generalize
(Rmult_le_reg_l 2 (u eps t * derive_pt (u eps) t (d_u eps t))
(u0 t * vi) Hyp H); intro H1.
generalize (u0_u_epsilon eps t); intro H2;
generalize
(Rmult_le_compat_r (v vi) (u0 t) (u eps t) (Rlt_le 0 vi (TypeSpeed_pos vi))
H2); intro H3.
generalize
(Rle_trans (u eps t * derive_pt (u eps) t (d_u eps t))
(u0 t * vi) (u eps t * vi) H1 H3); intro H4.
apply
(Rmult_le_reg_l (u eps t) (derive_pt (u eps) t (d_u eps t)) vi
(u_stric_pos eps t) H4).
Qed.

(**********)
Lemma vit_derivable : derivable (fun t : R => (vi * t)%R).