Proof with Geometry.
intros.
assert (on_line_d Y P Q (P ** Y / P ** Q)).
apply on_line_to_on_line_d...
apply elim_py_on_line_d_right...
Qed.

(* Specifications: *)
Theorem elim_py_on_line_d_middle :
forall A B P Q Y r,
on_line_d Y P Q r ->
Py A Y B = - Py A P B * r + Py A P B + r * r * Py Q P Q + r * Py A Q B- r * Py Q P Q .