(***************************************************************************)
(* 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 area_method.
(* A small lemma to check that centroid is really at the intersection of medians. *)

(* Specifications: *)
Lemma centroid_check : forall A B C G A',
is_centroid G A B C ->
is_midpoint A' B C ->
Col A G A'.
Lemma euler_line : forall A B C H O G,
is_circumcenter O A B C ->
is_orthocenter H A B C ->
is_centroid G A B C ->
Col O G H.
Lemma centroid_midpoint_centroid : forall A B C G A' B' C' G' X,
is_centroid G A B C ->
is_midpoint A' B C ->
is_midpoint B' A C ->
is_midpoint C' A B ->
is_centroid G' A' B' C' ->
1+2<>0 ->
Col G G' X.
Lemma centroid_midpoint_centroid_2 : forall A B C G A' B' C' G',
is_centroid G A B C ->
is_midpoint A' B C ->
is_midpoint B' A C ->
is_midpoint C' A B ->
is_centroid G' A' B' C' ->
1+2<>0 ->
Py G G' G = 0.
Lemma l6_44 : forall A B C G P Q,
is_centroid G A B C ->
on_inter_line_parallel P G A B B C  ->
on_inter_line_parallel Q G A C B C  ->
G<>Q -> G<>P -> 1+2 <> 0 ->
2*2*S4 P Q C B = (2+2+1)* S A Q P.
Lemma l6_47 : forall A B C G M N,
is_centroid G A B C ->
on_line M A B ->
inter_ll N G M A C ->
parallel M B A M -> A<>M -> A<>N ->
parallel N C A N -> B<>M ->
1+2<> 0 -> 2+1 <> 0 ->
M**B/A**M + N**C/A**N = 1.