Require Export GeoCoq.Elements.OriginalProofs.lemma_ray5.
Require Export GeoCoq.Elements.OriginalProofs.lemma_layoffunique.

Section Euclid.

Context `{Ax:euclidean_neutral_ruler_compass}.

Lemma lemma_lessthanbetween : 
   forall A B C, 
   Lt A B A C -> Out A B C ->
   BetS A B C.
Proof.
(* Goal: forall (A B C : @Point Ax0) (_ : @Lt Ax0 A B A C) (_ : @Out Ax0 A B C), @BetS Ax0 A B C *)
intros.
let Tf:=fresh in
assert (Tf:exists M, (BetS A M C /\ Cong A M A B)) by (conclude_def Lt );destruct Tf as [M];spliter.
(* Goal: @BetS Ax0 A B C *)
assert (neq A M) by (forward_using lemma_betweennotequal).
(* Goal: @BetS Ax0 A B C *)
assert (Out A M C) by (conclude lemma_ray4).
(* Goal: @BetS Ax0 A B C *)
assert (Out A C M) by (conclude lemma_ray5).
(* Goal: @BetS Ax0 A B C *)
assert (Out A C B) by (conclude lemma_ray5).
(* Goal: @BetS Ax0 A B C *)
assert (eq M B) by (conclude lemma_layoffunique).
(* Goal: @BetS Ax0 A B C *)
assert (BetS A B C) by (conclude cn_equalitysub).
(* Goal: @BetS Ax0 A B C *)
close.
Qed.

End Euclid.


