Require Export GeoCoq.Elements.OriginalProofs.lemma_collinearorder.
Require Export GeoCoq.Elements.OriginalProofs.lemma_ray4.

Section Euclid.

Context `{Ax1:euclidean_neutral_ruler_compass}.

Lemma lemma_ABCequalsCBA : 
   forall A B C, 
   nCol A B C ->
   CongA A B C C B A.
Proof.
(* Goal: forall (A B C : @Point Ax) (_ : @nCol Ax A B C), @CongA Ax A B C C B A *)
intros.
(* Goal: @CongA Ax A B C C B A *)
assert (~ eq B A).
(* Goal: not (@eq Ax B C) *)
(* Goal: @CongA Ax A B C C B A *)
 {
(* Goal: not (@eq Ax B C) *)
 intro.
(* Goal: False *)
 assert (eq A B) by (conclude lemma_equalitysymmetric).
(* Goal: False *)
 assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
 contradict.
 }
(* Goal: @CongA Ax A B C C B A *)
assert (~ eq C B).
(* Goal: not (@eq Ax B C) *)
(* Goal: @CongA Ax A B C C B A *)
 {
(* Goal: not (@eq Ax B C) *)
 intro.
(* Goal: False *)
 assert (Col C B A) by (conclude_def Col ).
(* Goal: False *)
 assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
 contradict.
 }
let Tf:=fresh in
assert (Tf:exists E, (BetS B A E /\ Cong A E C B)) by (conclude lemma_extension);destruct Tf as [E];spliter.
(* Goal: @CongA Ax A B C C B A *)
assert (~ eq B C).
(* Goal: not (@eq Ax B C) *)
(* Goal: @CongA Ax A B C C B A *)
 {
(* Goal: not (@eq Ax B C) *)
 intro.
(* Goal: False *)
 assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
 contradict.
 }
(* Goal: @CongA Ax A B C C B A *)
assert (neq A B) by (conclude lemma_inequalitysymmetric).
let Tf:=fresh in
assert (Tf:exists F, (BetS B C F /\ Cong C F A B)) by (conclude lemma_extension);destruct Tf as [F];spliter.
(* Goal: @CongA Ax A B C C B A *)
assert (Cong B A F C) by (forward_using lemma_doublereverse).
(* Goal: @CongA Ax A B C C B A *)
assert (BetS F C B) by (conclude axiom_betweennesssymmetry).
(* Goal: @CongA Ax A B C C B A *)
assert (Cong B E F B) by (conclude cn_sumofparts).
(* Goal: @CongA Ax A B C C B A *)
assert (Cong F B B F) by (conclude cn_equalityreverse).
(* Goal: @CongA Ax A B C C B A *)
assert (Cong B E B F) by (conclude lemma_congruencetransitive).
(* Goal: @CongA Ax A B C C B A *)
assert (Cong B F B E) by (conclude lemma_congruencesymmetric).
(* Goal: @CongA Ax A B C C B A *)
assert (Cong E F F E) by (conclude cn_equalityreverse).
(* Goal: @CongA Ax A B C C B A *)
assert (Out B A E) by (conclude lemma_ray4).
(* Goal: @CongA Ax A B C C B A *)
assert (Out B C F) by (conclude lemma_ray4).
(* Goal: @CongA Ax A B C C B A *)
assert (CongA A B C C B A) by (conclude_def CongA ).
(* Goal: @CongA Ax A B C C B A *)
close.
Qed.

End Euclid.


