(***************************************************************************)
(* Formalization of the Chou, Gao and Zhang's decision procedure.          *)
(* Julien Narboux (Julien@narboux.fr)                                      *)
(* LIX/INRIA FUTURS 2004-2006                                              *)
(* University of Strasbourg 2008                                           *)
(***************************************************************************)
Require Export pythagoras_difference.
Definition on_perp (A' B C : Point) : Prop := B <> C /\ perp A' B B C /\ S B C A' <> 0.
Definition on_perp_d (Y U V : Point)  (lambda : F) : Prop :=
U <> V  /\ perp Y U U V /\ lambda * Py U V U = (2+2) * S U V Y /\ lambda <> 0.
Definition on_inter_line_perp (Y R U V P Q : Point) : Prop :=
Col Y U V /\ perp Y R P Q /\ ~ perp P Q U V.

(* Specifications: *)
Lemma proj_ex : forall A P Q, P<>Q -> exists X, on_foot X A P Q.
Lemma on_perp_to_on_perp_d : forall A B C : Point,
on_perp A B C  -> on_perp_d A B C ((2 + 2) * S B C A / Py B C B).
Lemma on_line_d_iff_on_parallel_d : forall A B C r,
on_line_d A B C r <-> on_parallel_d A B C B (0-r).
Lemma on_line_iff_on_parallel : forall A B C,
on_line A B C <-> on_parallel A B C B.