Require Export GeoCoq.Elements.OriginalProofs.lemma_extension.
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinearorder.

Section Euclid.

Context `{Ax:euclidean_neutral_ruler_compass}.

Lemma proposition_11 : 
   forall A B C, 
   BetS A C B ->
   exists X, Per A C X.
Proof.
(* Goal: forall (A B C : @Point Ax0) (_ : @BetS Ax0 A C B), @ex (@Point Ax0) (fun X : @Point Ax0 => @Per Ax0 A C X) *)
intros.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @Per Ax0 A C X) *)
assert (neq A C) by (forward_using lemma_betweennotequal).
let Tf:=fresh in
assert (Tf:exists E, (BetS A C E /\ Cong C E A C)) by (conclude lemma_extension);destruct Tf as [E];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @Per Ax0 A C X) *)
assert (neq A E) by (forward_using lemma_betweennotequal).
let Tf:=fresh in
assert (Tf:exists F, (equilateral A E F /\ Triangle A E F)) by (conclude proposition_01);destruct Tf as [F];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @Per Ax0 A C X) *)
assert (Cong E F F A) by (conclude_def equilateral ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @Per Ax0 A C X) *)
assert (Cong A F F E) by (forward_using lemma_doublereverse).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @Per Ax0 A C X) *)
assert (Cong A F E F) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @Per Ax0 A C X) *)
assert (~ eq C F).
(* Goal: not (@eq Ax0 C F) *)
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @Per Ax0 A C X) *)
 {
(* Goal: not (@eq Ax0 C F) *)
 intro.
(* Goal: False *)
 assert (Col A C E) by (conclude_def Col ).
(* Goal: False *)
 assert (Col A F E) by (conclude cn_equalitysub).
(* Goal: False *)
 assert (Col A E F) by (forward_using lemma_collinearorder).
(* Goal: False *)
 assert (nCol A E F) by (conclude_def Triangle ).
(* Goal: False *)
 contradict.
 }
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @Per Ax0 A C X) *)
assert (Cong C A E C) by (forward_using lemma_doublereverse).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @Per Ax0 A C X) *)
assert (Cong A C E C) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @Per Ax0 A C X) *)
assert (Per A C F) by (conclude_def Per ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @Per Ax0 A C X) *)
close.
Qed.

End Euclid.


