Require Export GeoCoq.Elements.OriginalProofs.lemma_supplementsymmetric.
Require Export GeoCoq.Elements.OriginalProofs.lemma_oppositesidesymmetric.
Require Export GeoCoq.Elements.OriginalProofs.proposition_27.

Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_28B : 
   forall A B C D G H, 
   BetS A G B -> BetS C H D -> RT B G H G H D -> OS B D G H ->
   Par A B C D.
Proof.
(* Goal: forall (A B C D G H : @Point Ax0) (_ : @BetS Ax0 A G B) (_ : @BetS Ax0 C H D) (_ : @RT Ax0 B G H G H D) (_ : @OS Ax0 B D G H), @Par Ax0 A B C D *)
intros.
(* Goal: @Par Ax0 A B C D *)
assert (OS D B G H) by (forward_using lemma_samesidesymmetric).
let Tf:=fresh in
assert (Tf:exists a b c d e, (Supp a b c e d /\ CongA B G H a b c /\ CongA G H D e b d)) by (conclude_def RT );destruct Tf as [a[b[c[d[e]]]]];spliter.
(* Goal: @Par Ax0 A B C D *)
assert (CongA a b c B G H) by (conclude lemma_equalanglessymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (neq G H) by (forward_using lemma_angledistinct).
(* Goal: @Par Ax0 A B C D *)
assert (CongA e b d G H D) by (conclude lemma_equalanglessymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (eq H H) by (conclude cn_equalityreflexive).
(* Goal: @Par Ax0 A B C D *)
assert (Out G H H) by (conclude lemma_ray4).
(* Goal: @Par Ax0 A B C D *)
assert (Supp A G H H B) by (conclude_def Supp ).
(* Goal: @Par Ax0 A B C D *)
assert (Supp B G H H A) by (conclude lemma_supplementsymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (CongA e b d H G A) by (conclude lemma_supplements).
(* Goal: @Par Ax0 A B C D *)
assert (CongA G H D e b d) by (conclude lemma_equalanglessymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (CongA G H D H G A) by (conclude lemma_equalanglestransitive).
(* Goal: @Par Ax0 A B C D *)
assert (nCol H G A) by (conclude lemma_equalanglesNC).
(* Goal: @Par Ax0 A B C D *)
assert (CongA H G A A G H) by (conclude lemma_ABCequalsCBA).
(* Goal: @Par Ax0 A B C D *)
assert (CongA G H D A G H) by (conclude lemma_equalanglestransitive).
(* Goal: @Par Ax0 A B C D *)
assert (CongA A G H G H D) by (conclude lemma_equalanglessymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (eq G G) by (conclude cn_equalityreflexive).
(* Goal: @Par Ax0 A B C D *)
assert (Col G H G) by (conclude_def Col ).
(* Goal: @Par Ax0 A B C D *)
assert (nCol A G H) by (conclude lemma_equalanglesNC).
(* Goal: @Par Ax0 A B C D *)
assert (~ Col G H A).
(* Goal: not (@Col Ax0 G H A) *)
(* Goal: @Par Ax0 A B C D *)
 {
(* Goal: not (@Col Ax0 G H A) *)
 intro.
(* Goal: False *)
 assert (Col A G H) by (forward_using lemma_collinearorder).
(* Goal: False *)
 contradict.
 }
(* Goal: @Par Ax0 A B C D *)
assert (TS A G H B) by (conclude_def TS ).
(* Goal: @Par Ax0 A B C D *)
assert (TS B G H A) by (conclude lemma_oppositesidesymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (TS D G H A) by (conclude lemma_planeseparation).
(* Goal: @Par Ax0 A B C D *)
assert (TS A G H D) by (conclude lemma_oppositesidesymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (Par A B C D) by (conclude proposition_27).
(* Goal: @Par Ax0 A B C D *)
close.
Qed.

End Euclid.
