Require Import GeoCoq.Tarski_dev.Annexes.quadrilaterals_inter_dec.

Section UnitTests.

Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.

Goal forall A B I, A <> B -> Midpoint I A B -> I <> A /\ I <> B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B I, B <> A -> Midpoint I A B -> I <> A /\ I <> B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B I, I<>A -> Midpoint I A B -> I <> B /\ A <> B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B I, I<>B -> Midpoint I A B -> I <> A /\ A <> B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B I, A<>I -> Midpoint I A B -> I <> B /\ A <> B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B I, B<>I -> Midpoint I A B -> I <> A /\ A <> B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B I, A<>B -> Midpoint I A B -> A <> I /\ I <> B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *)
split;auto.
Qed.

Goal forall A B:Tpoint, A<>B -> B<>A -> True.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: True *)
first [not_exist_hyp_comm A B | clear H].
(* Goal: True *)
first [not_exist_hyp_comm A B | clear H0].
(* Goal: True *)
not_exist_hyp_comm A B.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
auto.
Qed.

Goal forall A B C, Col A B C -> Col A C B -> Col B A C -> Col B C A -> Col C A B -> Col C B A -> True.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: True *)
first [not_exist_hyp_perm_col A B C | clear H].
(* Goal: True *)
first [not_exist_hyp_perm_col A B C | clear H0].
(* Goal: True *)
first [not_exist_hyp_perm_col A B C | clear H1].
(* Goal: True *)
first [not_exist_hyp_perm_col A B C | clear H2].
(* Goal: True *)
first [not_exist_hyp_perm_col A B C | clear H3].
(* Goal: True *)
first [not_exist_hyp_perm_col A B C | clear H4].
(* Goal: True *)
not_exist_hyp_perm_col A B C.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
auto.
Qed.

Goal forall A B C, ~ Col A B C -> ~ Col A C B ->
  ~ Col B A C -> ~ Col B C A -> ~ Col C A B -> ~ Col C B A -> True.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: True *)
first [not_exist_hyp_perm_ncol A B C | clear H].
(* Goal: True *)
first [not_exist_hyp_perm_ncol A B C | clear H0].
(* Goal: True *)
first [not_exist_hyp_perm_ncol A B C | clear H1].
(* Goal: True *)
first [not_exist_hyp_perm_ncol A B C | clear H2].
(* Goal: True *)
first [not_exist_hyp_perm_ncol A B C | clear H3].
(* Goal: True *)
first [not_exist_hyp_perm_ncol A B C | clear H4].
(* Goal: True *)
not_exist_hyp_perm_ncol A B C.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
auto.
Qed.

Goal forall A B C Q,
 B <> A -> Col A B C -> Midpoint Q A C ->
 A <> C -> B <> C -> Midpoint A B C ->
 Q <> C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assumption.
Qed.

Goal forall A B C, A<>B -> Per A B C -> A<>C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assumption.
Qed.

Goal forall A B C, B<>A -> Per A B C -> A<>C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assumption.
Qed.

Goal forall A B C, B<>C -> Per A B C -> A<>C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
auto.
Qed.

Goal forall A B C, C<>B -> Per A B C -> A<>C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
auto.
Qed.

Goal forall A B C D, Perp A B C D -> A<>B /\ C<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B C D, A<>B -> Perp A B C D -> A<>B /\ C<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B C D, A<>B -> Perp B A C D -> A<>B /\ C<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B C D, A<>B -> Perp B A D C -> A<>B /\ C<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *)
split;intuition.
Qed.

Goal forall A B C D, A<>B -> C<>D -> Perp B A D C -> A<>B /\ C<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *)
split;intuition.
Qed.

Goal forall A B C D, D<>C -> Perp B A D C -> A<>B /\ C<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C D)) *)
split;intuition.
Qed.

Goal forall X A B C D, Perp_at X A B C D -> A<>B /\ C<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B C D, Par A B C D -> A<>B /\ C<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B C D, Par_strict A B C D -> A<>B /\ C<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B C, Out A B C -> B<>A /\ C<>A.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: and (not (@Col Tn A B X)) (not (@Col Tn A B Y)) *)
split;assumption.
Qed.

Goal forall A B C, Out A B C -> Col B A C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: @Col Tn B A C *)
assert_cols.
(* Goal: @Col Tn B A C *)
Col.
Qed.

Goal forall A B C D, ~ Col A B C -> ~ Col A B D ->
  A<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: @Col Tn A B C *)
intuition.
Qed.

Goal forall A B C D I,
  Midpoint I A B -> Par A B C D -> I<>A.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assumption.
Qed.

Goal forall A B C D I,
  Midpoint I A B -> Par A I C D -> B<>A.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: @Col Tn A B C *)
intuition.
Qed.

Goal forall A B C D,
 Cong A B C D -> C<>D -> A<>B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: @Col Tn A B C *)
intuition.
Qed.

Goal forall A B C D,
 Cong A B C D -> D<>C -> A<>B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: @Col Tn A B C *)
intuition.
Qed.

Goal forall A B C D,
 Cong A B C D -> A<>B -> C<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: @Col Tn A B C *)
intuition.
Qed.

Goal forall A B C D,
 Cong A B C D -> B<>A -> C<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: @Col Tn A B C *)
intuition.
Qed.

Goal forall A B C D E,
 ~ Col A B C ->
 ~ Col B D E -> A<>B ->
  Col A B D -> Col A B E -> Col A B C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: @Col Tn A B C *)
search_contradiction.
Qed.
(*
Goal forall  A B C D E,
 ~ Col A B C ->
 ~ Col B D E -> A<>B ->
  Col A B D -> Col A B E -> C<>D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
assert_all_diffs_by_contradiction'.
(* Goal: @Cong Tn A B C D *)
finish.
Qed.
*)

Goal forall A B C D X,
 Inter A B C D X ->
 A <> B /\ C <> D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
split; auto.
Qed.

Goal forall A B C D,
 Par_strict A B C D ->
 A <> B /\ A <> C /\ A <> D /\ B <> C /\ B <> D /\ C <> D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
repeat split; auto.
Qed.

Goal forall A B C, (A<>B -> B<>C -> A<>C -> Col A B C) -> Col A B C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: @Col Tn A B C *)
assert_diffs_by_cases.
(* Goal: @Col Tn A B C *)
intuition.
Qed.
(*
Goal forall A B C D I, I <> A -> I <> B -> I <> C -> I <> D -> Col I A B -> Col I C D -> ~ Col A B C -> ~ Col A B D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
assert_all_not_cols_by_contradiction.
(* Goal: @Cong Tn A B C D *)
finish.
Qed.

Goal forall A B C D I, I <> A -> I <> B -> I <> C -> I <> D -> Col I A B -> Col I C D -> ~ Col A B C ->  A <> D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
assert_all_diffs_by_contradiction'.
(* Goal: @Cong Tn A B C D *)
finish.
Qed.
*)

Goal forall A B C, Midpoint A B C -> Cong A B C A.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: @Cong Tn A B C D *)
assert_congs_perm.
(* Goal: @Cong Tn A B C D *)
finish.
Qed.

Goal forall A B C, Bet A B C -> A <> B -> A <> C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assumption.
Qed.

Goal forall A B C, Bet A B C -> B <> A -> A <> C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assumption.
Qed.

Goal forall A B C, Bet A B C -> B <> C -> A <> C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assumption.
Qed.

Goal forall A B C, Bet A B C -> C <> B -> A <> C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assumption.
Qed.

Goal forall A B C, ~ Bet A B C -> A <> B /\ B <> C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
split; assumption.
Qed.

Goal forall A B C D, TS A B C D -> A <> B /\ A <> C /\ A <> D /\ B <> C /\ B <> D /\ C <> D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
repeat split; assumption.
Qed.

Goal forall A B C D, OS A B C D -> A <> B /\ A <> C /\ A <> D /\ B <> C /\ B <> D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
repeat split; assumption.
Qed.

Goal forall A B C D, Parallelogram_strict A B C D ->
  A <> B /\ B <> C /\ C <> D /\ D <> A /\ A <> C /\ B <> D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
repeat split; assumption.
Qed.

Goal forall A B C D, A <> B -> Le A B C D -> C <> D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assumption.
Qed.

Goal forall A B C D, Lt A B C D -> C <> D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
assumption.
Qed.

Goal forall A B C, Bet A B C -> Bet B A C -> A = B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: @eq (@Tpoint Tn) B C *)
treat_equalities.
(* Goal: @eq (@Tpoint Tn) C C *)
trivial.
Qed.

Goal forall A B C, Bet A B C -> Bet A C B -> B = C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: @eq (@Tpoint Tn) B C *)
treat_equalities.
(* Goal: @eq (@Tpoint Tn) C C *)
trivial.
Qed.

Goal forall A B C, Bet A B C -> Bet C A B -> A = B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: @eq (@Tpoint Tn) B C *)
treat_equalities.
(* Goal: @eq (@Tpoint Tn) C C *)
trivial.
Qed.

Goal forall A B C, Bet A B C -> Bet B C A -> B = C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: @eq (@Tpoint Tn) B C *)
treat_equalities.
(* Goal: @eq (@Tpoint Tn) C C *)
trivial.
Qed.

Goal forall A B X Y, TS A B X Y -> ~ Col A B X /\ ~ Col A B Y.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: and (not (@Col Tn A B C)) (and (not (@Col Tn B C D)) (and (not (@Col Tn C D A)) (not (@Col Tn A B D)))) *)
assert_ncols.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
split; assumption.
Qed.

Goal forall A B X Y, OS A B X Y -> ~ Col A B X /\ ~ Col A B Y.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: and (not (@Col Tn A B C)) (and (not (@Col Tn B C D)) (and (not (@Col Tn C D A)) (not (@Col Tn A B D)))) *)
assert_ncols.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
split; assumption.
Qed.

Goal forall A B C D, ~ Coplanar A B C D ->
  ~ Col A B C /\ ~ Col A B D /\ ~ Col A C D /\ ~ Col B C D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: and (not (@Col Tn A B C)) (and (not (@Col Tn B C D)) (and (not (@Col Tn C D A)) (not (@Col Tn A B D)))) *)
assert_ncols.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
repeat split; assumption.
Qed.

Goal forall A B C D, Par_strict A B C D ->
  ~ Col A B C /\ ~ Col B C D /\ ~ Col C D A /\ ~ Col A B D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: and (not (@Col Tn A B C)) (and (not (@Col Tn B C D)) (and (not (@Col Tn C D A)) (not (@Col Tn A B D)))) *)
assert_ncols.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
repeat split; assumption.
Qed.

Goal forall A B C D, Parallelogram_strict A B C D ->
  ~ Col A B C /\ ~ Col B C D /\ ~ Col C D A /\ ~ Col A B D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: and (not (@Col Tn A B C)) (and (not (@Col Tn B C D)) (and (not (@Col Tn C D A)) (not (@Col Tn A B D)))) *)
assert_ncols.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
repeat split; assumption.
Qed.

End UnitTests.

Section UnitTestsEucl.

Context `{TE:Tarski_euclidean}.

Goal forall A B C D, Parallelogram A B C D -> Cong A B C D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Parallelogram Tn A B C D), @Cong Tn A B C D *)
intros.
(* Goal: @Cong Tn A B C D *)
assert_congs_perm.
(* Goal: @Cong Tn A B C D *)
finish.
Qed.

End UnitTestsEucl.