Require Export GeoCoq.Elements.OriginalProofs.lemma_extension.
Require Export GeoCoq.Elements.OriginalProofs.lemma_lessthancongruence2.

Section Euclid.

Context `{Ax:euclidean_neutral_ruler_compass}.

Lemma lemma_TTflip2 : 
   forall A B C D E F G H, 
   TT A B C D E F G H ->
   TT A B C D H G F E.
Proof.
(* Goal: forall (A B C D E F G H : @Point Ax0) (_ : @TT Ax0 A B C D E F G H), @TT Ax0 A B C D H G F E *)
intros.
let Tf:=fresh in
assert (Tf:exists J, (BetS E F J /\ Cong F J G H /\ TG A B C D E J)) by (conclude_def TT );destruct Tf as [J];spliter.
let Tf:=fresh in
assert (Tf:exists K, (BetS A B K /\ Cong B K C D /\ Lt E J A K)) by (conclude_def TG );destruct Tf as [K];spliter.
(* Goal: @TT Ax0 A B C D H G F E *)
assert (neq F J) by (forward_using lemma_betweennotequal).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (neq G H) by (conclude axiom_nocollapse).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (neq H G) by (conclude lemma_inequalitysymmetric).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (neq E F) by (forward_using lemma_betweennotequal).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (neq F E) by (conclude lemma_inequalitysymmetric).
let Tf:=fresh in
assert (Tf:exists L, (BetS H G L /\ Cong G L F E)) by (conclude lemma_extension);destruct Tf as [L];spliter.
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Cong L G E F) by (forward_using lemma_congruenceflip).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Cong G H F J) by (conclude lemma_congruencesymmetric).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (BetS L G H) by (conclude axiom_betweennesssymmetry).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Cong L H E J) by (conclude cn_sumofparts).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Cong H L L H) by (conclude cn_equalityreverse).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Cong H L E J) by (conclude lemma_congruencetransitive).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Cong E J H L) by (conclude lemma_congruencesymmetric).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Lt H L A K) by (conclude lemma_lessthancongruence2).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (TG A B C D H L) by (conclude_def TG ).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (TT A B C D H G F E) by (conclude_def TT ).
(* Goal: @TT Ax0 A B C D H G F E *)
close.
Qed.

End Euclid.