Require Export GeoCoq.Elements.OriginalProofs.proposition_29B.
Require Export GeoCoq.Elements.OriginalProofs.proposition_27B.

Section Euclid.

Context `{Ax:euclidean_euclidean}.

Lemma proposition_33 : 
   forall A B C D M, 
   Par A B C D -> Cong A B C D -> BetS A M D -> BetS B M C ->
   Par A C B D /\ Cong A C B D.
Proof.
(* Goal: forall (A B C D M : @Point Ax0) (_ : @Par Ax0 A B C D) (_ : @Cong Ax0 A B C D) (_ : @BetS Ax0 A M D) (_ : @BetS Ax0 B M C), and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
intros.
let Tf:=fresh in
assert (Tf:exists a b c d m, (neq A B /\ neq C D /\ Col A B a /\ Col A B b /\ neq a b /\ Col C D c /\ Col C D d /\ neq c d /\ ~ Meet A B C D /\ BetS a m d /\ BetS c m b)) by (conclude_def Par );destruct Tf as [a[b[c[d[m]]]]];spliter.
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (Col B M C) by (conclude_def Col ).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (Col B C M) by (forward_using lemma_collinearorder).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (~ Col B C A).
(* Goal: not (@Col Ax0 B C D) *)
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
 {
(* Goal: not (@Col Ax0 B C D) *)
 intro.
(* Goal: False *)
 assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
 assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: False *)
 assert (Col C D C) by (conclude_def Col ).
(* Goal: False *)
 assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
 contradict.
 }
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (TS A B C D) by (conclude_def TS ).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (CongA A B C B C D) by (conclude proposition_29B).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (~ Col B C D).
(* Goal: not (@Col Ax0 B C D) *)
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
 {
(* Goal: not (@Col Ax0 B C D) *)
 intro.
(* Goal: False *)
 assert (Col C D B) by (forward_using lemma_collinearorder).
(* Goal: False *)
 assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: False *)
 assert (Col A B B) by (conclude_def Col ).
(* Goal: False *)
 assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
 contradict.
 }
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (CongA B C D D C B) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (CongA A B C D C B) by (conclude lemma_equalanglestransitive).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (Cong B C B C) by (conclude cn_congruencereflexive).
assert (nCol A B C) by (assert (nCol B C A) by auto;
 (forward_using lemma_NCorder)). 
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (Cong B A C D) by (forward_using lemma_congruenceflip).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (Cong B C C B) by (forward_using lemma_congruenceflip).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert ((Cong A C D B /\ CongA B A C C D B /\ CongA B C A C B D)) by (conclude proposition_04).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (nCol A C B) by (forward_using lemma_NCorder).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (CongA A C B B C A) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (CongA A C B C B D) by (conclude lemma_equalanglestransitive).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (Cong A C B D) by (forward_using lemma_congruenceflip).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (Col C B M) by (forward_using lemma_collinearorder).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (nCol C B A) by (forward_using lemma_NCorder).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (TS A C B D) by (conclude_def TS ).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (Par A C B D) by (conclude proposition_27B).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
close.
Qed.

End Euclid.


