Require Export GeoCoq.Elements.OriginalProofs.lemma_triangletoparallelogram.
Require Export GeoCoq.Elements.OriginalProofs.lemma_PGrotate.
Require Export GeoCoq.Elements.OriginalProofs.proposition_36.

Section Euclid.

Context `{Ax:area}.

Lemma proposition_38 : 
   forall A B C D E F P Q, 
   Par P Q B C -> Col P Q A -> Col P Q D -> Cong B C E F -> Col B C E -> Col B C F ->
   ET A B C D E F.
Proof.
(* Goal: forall (A B C D E F P Q : @Point Ax0) (_ : @Par Ax0 P Q B C) (_ : @Col Ax0 P Q A) (_ : @Col Ax0 P Q D) (_ : @Cong Ax0 B C E F) (_ : @Col Ax0 B C E) (_ : @Col Ax0 B C F), @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
intros.
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Par B C P Q) by (conclude lemma_parallelsymmetric).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Par C B P Q) by (forward_using lemma_parallelflip).
let Tf:=fresh in
assert (Tf:exists G, (PG A G B C /\ Col P Q G)) by (conclude lemma_triangletoparallelogram);destruct Tf as [G];spliter.
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (PG G B C A) by (conclude lemma_PGrotate).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (nCol P B C) by (forward_using lemma_parallelNC).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (neq B C) by (forward_using lemma_NCdistinct).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (neq E F) by (conclude axiom_nocollapse).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Par P Q E F) by (conclude lemma_collinearparallel2).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Par E F P Q) by (conclude lemma_parallelsymmetric).
rename_H H;let Tf:=fresh in
assert (Tf:exists H, (PG D H F E /\ Col P Q H)) by (conclude lemma_triangletoparallelogram);destruct Tf as [H];spliter.
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (PG H F E D) by (conclude lemma_PGrotate).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Cong B C F E) by (forward_using lemma_congruenceflip).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (nCol P Q B) by (forward_using lemma_parallelNC).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (neq P Q) by (forward_using lemma_NCdistinct).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Col G A H) by (conclude lemma_collinear5).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Col G A D) by (conclude lemma_collinear5).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (EF G B C A H F E D) by (conclude proposition_36).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (EF G B C A E F H D) by (forward_using axiom_EFpermutation).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (EF E F H D G B C A) by (conclude axiom_EFsymmetric).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (EF E F H D C B G A) by (forward_using axiom_EFpermutation).
let Tf:=fresh in
assert (Tf:exists M, (BetS D M F /\ BetS H M E)) by (conclude lemma_diagonalsmeet);destruct Tf as [M];spliter.
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Col D M F) by (conclude_def Col ).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Col F D M) by (forward_using lemma_collinearorder).
let Tf:=fresh in
assert (Tf:exists m, (BetS A m B /\ BetS G m C)) by (conclude lemma_diagonalsmeet);destruct Tf as [m];spliter.
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Col A m B) by (conclude_def Col ).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Col B A m) by (forward_using lemma_collinearorder).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Par A G B C) by (conclude_def PG ).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (nCol A G B) by (forward_using lemma_parallelNC).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (nCol B A G) by (forward_using lemma_NCorder).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Par D H F E) by (conclude_def PG ).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (nCol D H F) by (forward_using lemma_parallelNC).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (nCol F D H) by (forward_using lemma_NCorder).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (TS G B A C) by (conclude_def TS ).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (TS C B A G) by (conclude lemma_oppositesidesymmetric).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (TS H F D E) by (conclude_def TS ).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (TS E F D H) by (conclude lemma_oppositesidesymmetric).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Cong_3 F H D D E F) by (conclude proposition_34).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (ET F H D D E F) by (conclude axiom_congruentequal).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (ET F H D E F D) by (forward_using axiom_ETpermutation).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (ET E F D F H D) by (conclude axiom_ETsymmetric).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (ET E F D F D H) by (forward_using axiom_ETpermutation).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (PG G B C A) by (conclude lemma_PGrotate).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (Cong_3 B G A A C B) by (conclude proposition_34).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (ET B G A A C B) by (conclude axiom_congruentequal).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (ET B G A C B A) by (forward_using axiom_ETpermutation).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (ET C B A B G A) by (conclude axiom_ETsymmetric).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (ET C B A B A G) by (forward_using axiom_ETpermutation).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (ET E F D C B A) by (conclude axiom_halvesofequals).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (ET E F D A B C) by (forward_using axiom_ETpermutation).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (ET A B C E F D) by (conclude axiom_ETsymmetric).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
assert (ET A B C D E F) by (forward_using axiom_ETpermutation).
(* Goal: @ET Ax0 Ax1 Ax2 Ax A B C D E F *)
close.
Qed.

End Euclid.


