(* Gabriel Braun November 2012 *)
Require Export GeoCoq.Tarski_dev.Ch12_parallel.
Section Quadrilateral.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.

(* Specifications: *)
Lemma cong_identity_inv :
forall A B C, A <> B -> ~ Cong A B C C.
Lemma midpoint_midpoint_col : forall A B A' B' M,
A <> B ->
Midpoint M A A' -> Midpoint M B B' ->
Col A B B' ->
A' <> B' /\ Col A A' B' /\ Col B A' B'.
Lemma midpoint_par_strict :
forall A B A' B' M,
A <> B ->
~ Col A B B' ->
Midpoint M A A' ->
Midpoint M B B' ->
Par_strict A B A' B'.
Lemma bet3_cong3_bet : forall A B C D D', A <> B -> A <> C -> A <> D -> Bet D A C -> Bet A C B -> Bet D C D' -> Cong A B C D -> Cong A D B C -> Cong D C C D'
-> Bet C B D'.
Lemma bet_double_bet :
forall A B C B' C',
Midpoint B' A B ->
Midpoint C' A C ->
Bet A B' C' ->
Bet A B C.
Lemma bet_half_bet :
forall A B C B' C',
Bet A B C  ->
Midpoint B' A B ->
Midpoint C' A C ->
Bet A B' C'.
Lemma midpoint_preserves_bet :
forall A B C B' C',
Midpoint B' A B ->
Midpoint C' A C ->
(Bet A B C <-> Bet A B' C').
Lemma symmetry_preseves_bet1 :
forall A B M A' B',
Midpoint M A A' ->
Midpoint M B B' ->
Bet M A B ->
Bet M A' B'.
Lemma symmetry_preseves_bet2 :
forall A B M A' B',
Midpoint M A A' ->
Midpoint M B B' ->
Bet M A' B' ->
Bet M A B.
Lemma symmetry_preserves_bet :
forall A B M A' B',
Midpoint M A A' ->
Midpoint M B B' ->
(Bet M A' B' <-> Bet M A B).
Lemma bet_cong_bet :
forall A B C D,
A <> B ->
Bet A B C ->
Bet A B D ->
Cong A C B D ->
Bet B C D.
Lemma col_cong_mid :
forall A B A' B',
Par A B A' B' ->
~ Par_strict A B A' B' ->
Cong A B A' B' ->
exists M,  Midpoint M A A' /\ Midpoint M B B' \/
Midpoint M A B' /\ Midpoint M B A'.
Lemma mid_par_cong1 :
forall A B A' B' M,
A <> B ->
Midpoint M A A' ->
Midpoint M B B' ->
Cong A B A' B' /\ Par A B A' B'.
Lemma mid_par_cong2 :
forall A B A' B' M,
A <> B' ->
Midpoint M A A' ->
Midpoint M B B' ->
Cong A B' A' B /\ Par A B' A' B.
Lemma mid_par_cong :
forall A B A' B' M,
A <> B -> A <> B' ->
Midpoint M A A' ->
Midpoint M B B' ->
Cong A B A' B' /\ Cong A B' A' B /\ Par A B A' B' /\ Par A B' A' B.
Lemma Parallelogram_strict_Parallelogram :
forall A B C D,
Parallelogram_strict A B C D -> Parallelogram A B C D.
Lemma plgf_permut :
forall A B C D,
Parallelogram_flat A B C D ->
Parallelogram_flat B C D A.
Lemma plgf_sym :
forall A B C D,
Parallelogram_flat A B C D ->
Parallelogram_flat C D A B.
Lemma plgf_irreflexive :
forall A B,
~ Parallelogram_flat A B A B.
Lemma plgs_irreflexive :
forall A B,
~ Parallelogram_strict A B A B.
Lemma plg_irreflexive :
forall A B,
~ Parallelogram A B A B.
Lemma plgf_mid :
forall A B C D,
Parallelogram_flat A B C D ->
exists M, Midpoint M A C /\ Midpoint M B D.
Lemma mid_plgs :
forall A B C D M,
~ Col A B C ->
Midpoint M A C -> Midpoint M B D ->
Parallelogram_strict A B C D.
Lemma mid_plgf_aux :
forall A B C D M,
A <> C ->
Col A B C ->
Midpoint M A C -> Midpoint M B D ->
Parallelogram_flat A B C D.
Lemma mid_plgf :
forall A B C D M,
(A <> C \/ B <> D ) ->
Col A B C ->
Midpoint M A C -> Midpoint M B D ->
Parallelogram_flat A B C D.
Lemma mid_plg :
forall A B C D M,
(A <> C \/ B <> D ) ->
Midpoint M A C -> Midpoint M B D ->
Parallelogram A B C D.
Lemma mid_plg_1 :
forall A B C D M,
A <> C ->
Midpoint M A C -> Midpoint M B D ->
Parallelogram A B C D.
Lemma mid_plg_2 :
forall A B C D M,
B <> D ->
Midpoint M A C -> Midpoint M B D ->
Parallelogram A B C D.
Lemma midpoint_cong_uniqueness :
forall A B C D M,
Col A B C ->
Midpoint M A B /\ Midpoint M C D ->
Cong A B C D ->
A = C /\ B = D \/ A = D /\ B = C.
Lemma plgf_not_comm :
forall A B C D, A <> B ->
Parallelogram_flat A B C D ->
~ Parallelogram_flat A B D C /\ ~ Parallelogram_flat B A C D.
Lemma plgf_cong :
forall A B C D,
Parallelogram_flat A B C D ->
Cong A B C D /\ Cong A D B C.
Lemma plg_to_parallelogram : forall A B C D, Plg A B C D -> Parallelogram A B C D.
Lemma plgs_one_side :
forall A B C D,
Parallelogram_strict A B C D ->
OS A B C D /\ OS C D A B.
Lemma parallelogram_strict_not_col : forall A B C D,
Parallelogram_strict A B C D ->
~ Col A B C.
Lemma parallelogram_strict_not_col_2 : forall A B C D,
Parallelogram_strict A B C D ->
~ Col B C D.
Lemma parallelogram_strict_not_col_3 : forall A B C D,
Parallelogram_strict A B C D ->
~ Col C D A.
Lemma parallelogram_strict_not_col_4 : forall A B C D,
Parallelogram_strict A B C D ->
~ Col A B D.
Lemma plgs__pars :
forall A B C D,
Parallelogram_strict A B C D ->
Par_strict A B C D.
Lemma plgs_sym :
forall A B C D,
Parallelogram_strict A B C D ->
Parallelogram_strict C D A B.
Lemma plg_sym :
forall A B C D,
Parallelogram A B C D ->
Parallelogram C D A B.
Lemma Rhombus_Plg : forall A B C D, Rhombus A B C D -> Plg A B C D.
Lemma Rectangle_Plg : forall A B C D,
Rectangle A B C D ->
Plg A B C D.
Lemma Rectangle_Parallelogram : forall A B C D,
Rectangle A B C D ->
Parallelogram A B C D.
Lemma plg_cong_rectangle :
forall A B C D,
Plg A B C D ->
Cong A C B D ->
Rectangle A B C D.