Require Import Setoid.
Require Import Coq.Classes.Morphisms.
Require Import Coq.Classes.Morphisms_Prop.
Require Import GeoCoq.Axioms.gupta_inspired_variant_axioms.
Require Import GeoCoq.Meta_theory.Models.gupta_inspired_to_tarski.
Require Import GeoCoq.Tactics.Coinc.tactics_axioms.
Require Import GeoCoq.Tactics.Coinc.ColR.
Require Import GeoCoq.Meta_theory.Dimension_axioms.upper_dim_3.
Require Import GeoCoq.Meta_theory.Parallel_postulates.parallel_postulates.
Require Import GeoCoq.Axioms.hilbert_axioms.

Section Hilbert_2D_to_Tarski_2D.

Context `{Hi:Hilbert_neutral_dimensionless}.

(** Tarski's betweenness is not strict: *)

Definition Bet A B C := BetH A B C \/ A = B \/ B = C.

Lemma betH_distincts : forall A B C, BetH A B C -> A <> B /\ B <> C /\ A <> C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: and (not (@eq (@Point Hi) A B)) (and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C))) *)
assert(HH:= H).
(* Goal: and (not (@eq (@Point Hi) A B)) (and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C))) *)
assert(HP:= between_comm A B C H).
(* Goal: and (not (@eq (@Point Hi) A B)) (and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C))) *)
assert (HQ:=HP).
(* Goal: and (not (@eq (@Point Hi) A B)) (and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C))) *)
apply between_only_one in H.
(* Goal: and (not (@eq (@Point Hi) A B)) (and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C))) *)
apply between_only_one in HP.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C)) *)
subst B.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C)) *)
subst B.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ColH Hi A B C *)
subst C.
(* Goal: False *)
apply between_diff in HH.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
Qed.

(** Hilbert's congruence is 'defined' only for non degenerated segments,
    while Tarski's segment congruence allows the null segment. *)

Lemma congH_perm : forall A B, A<>B -> CongH A B B A.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: or (@ColH Hi A B C) (not (@ColH Hi A B C)) *)
destruct (line_existence A B H) as [l []].
(* Goal: @CongH Hi A B B A *)
elim (cong_existence A B A B l); auto; intros B' H2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @CongH Hi A B B A *)
apply cong_pseudo_transitivity with A B'.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @CongH Hi A B' B A *)
apply cong_permr.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Lemma congH_refl : forall A B, A<>B -> CongH A B A B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @CongH Hi A B A B *)
apply cong_pseudo_transitivity with B A; auto using congH_perm.
Qed.

Lemma congH_sym : forall A B C D, A<>B -> CongH A B C D -> CongH C D A B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @CongH Hi C D A B *)
assert(HH:= cong_pseudo_transitivity A B C D A B).
(* Goal: @CongH Hi C D A B *)
apply HH.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @CongH Hi A B A B *)
apply congH_refl.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Global Instance IncidL_morphism' : Proper(eq ==> EqL ==> iff) IncidL.
Proof.
(* Goal: @Proper (forall (_ : @Line Hi) (_ : @Plane Hi), Prop) (@respectful (@Line Hi) (forall _ : @Plane Hi, Prop) (@eq (@Line Hi)) (@respectful (@Plane Hi) Prop (@EqP Hi) iff)) (@IncidLP Hi) *)
apply proper_sym_impl_iff_2.
(* Goal: @Symmetric (@Line Hi) (@eq (@Line Hi)) *)
(* Goal: @Symmetric (@Plane Hi) (@EqP Hi) *)
(* Goal: @Proper (forall (_ : @Line Hi) (_ : @Plane Hi), Prop) (@respectful (@Line Hi) (forall _ : @Plane Hi, Prop) (@eq (@Line Hi)) (@respectful (@Plane Hi) Prop (@EqP Hi) Basics.impl)) (@IncidLP Hi) *)
apply eq_Symmetric.
(* Goal: @Symmetric (@Line Hi) (@EqL Hi) *)
(* Goal: @Symmetric (@Plane Hi) (@eq (@Plane Hi)) *)
(* Goal: @Proper (forall (_ : @Line Hi) (_ : @Plane Hi), Prop) (@respectful (@Line Hi) (forall _ : @Plane Hi, Prop) (@EqL Hi) (@respectful (@Plane Hi) Prop (@eq (@Plane Hi)) Basics.impl)) (@IncidLP Hi) *)
apply (Equivalence.equiv_symmetric EqL_Equiv).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @respectful (@Plane Hi) Prop (@EqP Hi) Basics.impl (@IncidLP Hi x) (@IncidLP Hi y) *)
subst y.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @IncidL Hi x y *)
apply IncidL_morphism with x0.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
Defined.

Global Instance IncidP_morphism' : Proper(eq ==> EqP ==> iff) IncidP.
Proof.
(* Goal: @Proper (forall (_ : @Line Hi) (_ : @Plane Hi), Prop) (@respectful (@Line Hi) (forall _ : @Plane Hi, Prop) (@eq (@Line Hi)) (@respectful (@Plane Hi) Prop (@EqP Hi) iff)) (@IncidLP Hi) *)
apply proper_sym_impl_iff_2.
(* Goal: @Symmetric (@Line Hi) (@eq (@Line Hi)) *)
(* Goal: @Symmetric (@Plane Hi) (@EqP Hi) *)
(* Goal: @Proper (forall (_ : @Line Hi) (_ : @Plane Hi), Prop) (@respectful (@Line Hi) (forall _ : @Plane Hi, Prop) (@eq (@Line Hi)) (@respectful (@Plane Hi) Prop (@EqP Hi) Basics.impl)) (@IncidLP Hi) *)
apply eq_Symmetric.
(* Goal: @Symmetric (@Plane Hi) (@EqP Hi) *)
(* Goal: @Proper (forall (_ : @Line Hi) (_ : @Plane Hi), Prop) (@respectful (@Line Hi) (forall _ : @Plane Hi, Prop) (@eq (@Line Hi)) (@respectful (@Plane Hi) Prop (@EqP Hi) Basics.impl)) (@IncidLP Hi) *)
apply (Equivalence.equiv_symmetric EqP_Equiv).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @respectful (@Plane Hi) Prop (@EqP Hi) Basics.impl (@IncidLP Hi x) (@IncidLP Hi y) *)
subst y.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @IncidP Hi x y *)
apply IncidP_morphism with x0.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
Defined.

Lemma colH_permut_231 : forall A B C, ColH A B C -> ColH B C A.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ColH Hi B A C *)
unfold ColH in *.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l C' P) (@cut Hi l D' P)) *)
(* Goal: @CongH Hi B C B' C' *)
exists x.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
repeat split; assumption.
Qed.

Lemma colH_permut_312 : forall A B C, ColH A B C -> ColH C A B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ColH Hi C A B *)
apply colH_permut_231 in H.
(* Goal: @ColH Hi C A B *)
apply colH_permut_231 in H.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Lemma colH_permut_213 : forall A B C, ColH A B C -> ColH B A C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ColH Hi B A C *)
unfold ColH in *.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l C' P) (@cut Hi l D' P)) *)
(* Goal: @CongH Hi B C B' C' *)
exists x.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
repeat split; assumption.
Qed.

Lemma colH_permut_132 : forall A B C, ColH A B C -> ColH A C B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ColH Hi C B A *)
apply colH_permut_312 in H.
(* Goal: @ColH Hi A C B *)
apply colH_permut_213 in H.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Lemma colH_permut_321 : forall A B C, ColH A B C -> ColH C B A.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ColH Hi C B A *)
apply colH_permut_312 in H.
(* Goal: @ColH Hi C B A *)
apply colH_permut_132 in H.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Lemma other_point_exists : forall A: Point, exists B, A <> B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => not (@eq (@Point Hi) A B)) *)
assert (T:=lower_dim_2).
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => not (@eq (@Point Hi) A B)) *)
destruct T.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => not (@eq (@Point Hi) A B)) *)
induction(eq_dec_pointsH A PP).
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => not (@eq (@Point Hi) A B)) *)
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => not (@eq (@Point Hi) A B)) *)
subst A.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @ex (@Point Hi) (fun C : @Point Hi => not (or (@Bet Hi (@PP Hi) B C) (or (@Bet Hi B C (@PP Hi)) (@Bet Hi C (@PP Hi) B))))) *)
exists PQ.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: @ex (@Point Hi) (fun A : @Point Hi => @ex (@Point Hi) (fun B : @Point Hi => @ex (@Point Hi) (fun C : @Point Hi => not (or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)))))) *)
exists PP.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
Qed.

Lemma colH_trivial111 : forall A, ColH A A A.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
elim (other_point_exists A);intros.
(* Goal: @ColH Hi A A A *)
assert (H1:= line_existence A x H).
(* Goal: @ColH Hi A B A *)
decompose [ex and] H1.
(* Goal: @ColH Hi A A A *)
exists x0.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
Qed.

Lemma colH_trivial112 : forall A B, ColH A A B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ColH Hi A B A *)
destruct (eq_dec_pointsH A B).
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
subst.
(* Goal: @ColH Hi B B B *)
(* Goal: @ColH Hi A B A *)
apply colH_trivial111.
(* Goal: @ColH Hi A B A *)
assert (H1:= line_existence A B H).
(* Goal: @ColH Hi A B A *)
decompose [ex and] H1.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l C' P) (@cut Hi l D' P)) *)
(* Goal: @CongH Hi B C B' C' *)
exists x.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
Qed.

Lemma colH_trivial122 : forall A B, ColH A B B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ColH Hi A B A *)
destruct (eq_dec_pointsH A B).
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
subst.
(* Goal: @ColH Hi B B B *)
(* Goal: @ColH Hi A B A *)
apply colH_trivial111.
(* Goal: @ColH Hi A B A *)
assert (H1:= line_existence A B H).
(* Goal: @ColH Hi A B A *)
decompose [ex and] H1.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l C' P) (@cut Hi l D' P)) *)
(* Goal: @CongH Hi B C B' C' *)
exists x.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
Qed.

Lemma colH_trivial121 : forall A B, ColH A B A.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ColH Hi A B A *)
destruct (eq_dec_pointsH A B).
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
subst.
(* Goal: @ColH Hi B B B *)
(* Goal: @ColH Hi A B A *)
apply colH_trivial111.
(* Goal: @ColH Hi A B A *)
assert (H1:= line_existence A B H).
(* Goal: @ColH Hi A B A *)
decompose [ex and] H1.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l C' P) (@cut Hi l D' P)) *)
(* Goal: @CongH Hi B C B' C' *)
exists x.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
Qed.

Hint Resolve colH_trivial121 colH_trivial122 colH_trivial112 colH_trivial111 colH_permut_231 colH_permut_312 colH_permut_321 
             colH_permut_213 colH_permut_132 colH_permut_231 : colH.

Ltac ColH := auto 3 with colH.

Ltac line_col A B C := match goal with
                          |H1:(IncidL A ?l), H2:(IncidL B ?l), H3:(IncidL C ?l) |- _ 
                          => let HH := fresh in assert(ColH A B C) by (unfold ColH; exists l; repeat split; auto); auto
                       end.

(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
Ltac col_line H l := assert(HH:=H); unfold ColH in HH; destruct HH as [l HH]; spliter.

Ltac lines_eq l m :=
match goal with
   | H0:(?X1 <> ?X2), H1:(IncidL ?X1 l), H2:(IncidL ?X1 m),
   H3:(IncidL ?X2 l) , H4:(IncidL ?X2 m) |- _ => let HH := fresh in assert(HH : EqL l m) by (apply (line_uniqueness X1 X2 l m);auto);
                                               rewrite <-HH in *;
                                               clean_duplicated_hyps
end.

Lemma colH_dec : forall A B C, ColH A B C \/ ~ ColH A B C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
induction(eq_dec_pointsH A B).
(* Goal: False *)
(* Goal: and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C)) *)
subst B.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @ColH Hi A A C *)
(* Goal: @ColH Hi A C C *)
apply colH_trivial112.
(* Goal: or (@ColH Hi A B C) (not (@ColH Hi A B C)) *)
destruct (line_existence A B H) as [l []].
(* Goal: or (@ColH Hi A B C) (not (@ColH Hi A B C)) *)
induction(IncidL_dec C l).
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @ex (@Line Hi) (fun l : @Line Hi => and (@IncidL Hi A l) (and (@IncidL Hi X l) (@IncidL Hi Q l))) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
exists l.
(* Goal: Cong C D C' D' *)
repeat split; assumption.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
apply H2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
destruct H3 as [l00]; spliter.
(* Goal: Cong C D C' D' *)
rewrite (line_uniqueness A B l l00 H); assumption.
Qed.

Lemma colH_trans : forall X Y A B C, X <> Y -> ColH X Y A -> ColH X Y B -> ColH X Y C -> ColH A B C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ColH Hi A B C *)
destruct H0 as [l].
(* Goal: @ColH Hi A B C *)
destruct H1 as [m].
(* Goal: @ColH Hi A B C *)
destruct H2 as [o].
(* Goal: @ex (@Line Hi) (fun l : @Line Hi => and (@IncidL Hi A l) (and (@IncidL Hi X l) (@IncidL Hi Q l))) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
exists l.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
repeat split.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
rewrite (line_uniqueness X Y l m); assumption.
(* Goal: Cong C D C' D' *)
rewrite (line_uniqueness X Y l o); assumption.
Qed.

Global Instance Hilbert_is_a_Col_theory : (Col_theory Point ColH).
Proof.
(* Goal: Col_theory (@Point Hi) (@ColH Hi) *)
exact (Build_Col_theory Point ColH colH_trivial112 colH_permut_231 colH_permut_132 colH_trans).
Defined.

Lemma bet_colH : forall A B C, Bet A B C -> ColH A B C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @eq (@Point Hi) A B *)
unfold Bet in H.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: False *)
(* Goal: and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C)) *)
induction H;subst B.
(* Goal: @ColH Hi A A C *)
(* Goal: @ColH Hi A C C *)
apply colH_trivial112.
(* Goal: @ColH Hi A C C *)
apply colH_trivial122.
Qed.

End Hilbert_2D_to_Tarski_2D.

Hint Resolve colH_trivial121 colH_trivial122 colH_trivial112 colH_trivial111 colH_permut_231
             colH_permut_312 colH_permut_321 colH_permut_213 colH_permut_132 colH_permut_231
             between_col bet_colH : col.

Ltac Col := auto 3 with col.

Ltac line A B l Hdiff := let H:=fresh in (assert(H:= line_existence A B Hdiff); destruct H as [l]; spliter).

Ltac line_col A B C := match goal with
                          |H1:(IncidL A ?l), H2:(IncidL B ?l), H3:(IncidL C ?l) |- _ 
                          => let HH := fresh in assert(ColH A B C) by (unfold ColH; exists l; repeat split; auto); auto
                       end.

(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
Ltac col_line H l := assert(HH:=H); unfold ColH in HH; destruct HH as [l HH]; spliter.

Ltac lines_eq l m :=
match goal with
   | H0:(?X1 <> ?X2), H1:(IncidL ?X1 l), H2:(IncidL ?X1 m),
   H3:(IncidL ?X2 l) , H4:(IncidL ?X2 m) |- _ => let HH := fresh in assert(HH : EqL l m)
                                                   by (apply (line_uniqueness X1 X2 l m);auto);
                                               rewrite <-HH in *;
                                               clean_duplicated_hyps
end.

Ltac ColHR :=
 let tpoint := constr:(Point) in
 let col := constr:(ColH) in
   Col_refl tpoint col.

Hint Resolve between_comm : bet.

Ltac Bet := auto 3 with bet.

(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
Ltac two_points l X Y := assert(_H := two_points_on_line l); destruct _H as [X _H]; destruct _H as [Y _H]; spliter.

Section HilbertContext_2.

Context `{Hi:Hilbert_neutral_dimensionless}.

Lemma ncolH_exists : forall A B, A <> B -> exists C, ~ColH A B C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Point Hi) (fun A : @Point Hi => @ex (@Point Hi) (fun B : @Point Hi => @ex (@Point Hi) (fun C : @Point Hi => not (or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)))))) *)
assert (HH:= lower_dim_2).
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => not (@ColH Hi A B C)) *)
destruct HH.
(* Goal: and (@ColH Hi A B C) (and (not (@eq (@Point Hi) A C)) (not (@eq (@Point Hi) A B))) *)
destruct H1.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => not (@ColH Hi A B C)) *)
destruct H2.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => not (@ColH Hi A B C)) *)
induction(colH_dec A B PP).
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => not (@ColH Hi A B C)) *)
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => not (@ColH Hi A B C)) *)
induction(colH_dec A B PQ).
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => not (@ColH Hi A B C)) *)
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => not (@ColH Hi A B C)) *)
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => not (@ColH Hi A B C)) *)
induction(colH_dec A B PR).
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
(* Goal: or (@EqL Hi l m) (not (@EqL Hi l m)) *)
apply H3.
(* Goal: Cong C D C' D' *)
apply (colH_trans A B); assumption.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => not (or (@Bet Hi (@PP Hi) (@PQ Hi) C) (or (@Bet Hi (@PQ Hi) C (@PP Hi)) (@Bet Hi C (@PP Hi) (@PQ Hi))))) *)
exists PR.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @ex (@Point Hi) (fun C : @Point Hi => not (or (@Bet Hi (@PP Hi) B C) (or (@Bet Hi B C (@PP Hi)) (@Bet Hi C (@PP Hi) B))))) *)
exists PQ.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @ex (@Point Hi) (fun A : @Point Hi => @ex (@Point Hi) (fun B : @Point Hi => @ex (@Point Hi) (fun C : @Point Hi => not (or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)))))) *)
exists PP.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Lemma ncolH_distincts : forall A B C, ~ColH A B C -> A <> B /\ B <> C /\ A <> C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
repeat split;
intro;
apply H;
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
try subst B; Col.
(* Goal: @ColH Hi A B C *)
subst C; Col.
Qed.

Lemma betH_expand : forall A B C, BetH A B C -> BetH A B C /\ A <> B /\ B <> C /\ A <> C /\ ColH A B C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @cut Hi l P Y *)
assert (HH0:= H).
(* Goal: @BetH Hi A C D *)
apply betH_distincts in HH0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
Qed.

Lemma inter_uniquenessH : forall A B A' B' X Y, A' <> B' -> ~ColH A B A' -> ColH A B X -> ColH A B Y -> ColH A' B' X -> ColH A' B' Y -> X = Y.
Proof.
(* Goal: forall (A B A' B' X Y : @Point Hi) (_ : not (@eq (@Point Hi) A' B')) (_ : not (@ColH Hi A B A')) (_ : @ColH Hi A B X) (_ : @ColH Hi A B Y) (_ : @ColH Hi A' B' X) (_ : @ColH Hi A' B' Y), @eq (@Point Hi) X Y *)
intros A B A' B' X Y HD.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
assert(A <> B).
(* Goal: not (@eq (@Point Hi) A B) *)
(* Goal: @eq (@Point Hi) X Y *)
intro;subst B;apply H; Col.
(* Goal: @cut Hi l P Y *)
induction(eq_dec_pointsH X Y).
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
ColHR.
Qed.

Lemma inter_incid_uniquenessH : forall P X Y l m,
  ~IncidL P l ->
  IncidL P m -> IncidL X l -> IncidL Y l -> IncidL X m -> IncidL Y m ->
  X = Y.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @eq (@Point Hi) X Y *)
two_points l A B.
(* Goal: @eq (@Point Hi) X Y *)
two_points m A' B'.

(* Goal: @eq (@Point Hi) X Y *)
line_col A B X.
(* Goal: @eq (@Point Hi) X Y *)
line_col A B Y.
(* Goal: @eq (@Point Hi) X Y *)
line_col A' B' X.
(* Goal: @eq (@Point Hi) X Y *)
line_col A' B' Y.

(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(~ColH A B P).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @IncidL Hi P l *)
(* Goal: @eq (@Point Hi) X Y *)
col_line H15 l00.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
lines_eq l l00.
(* Goal: Cong C D C' D' *)
assumption.

(* Goal: @eq (@Point Hi) X Y *)
induction(eq_dec_pointsH A' P).
(* Goal: False *)
(* Goal: False *)
subst P.

(* Goal: @eq (@Point Hi) X Y *)
(* Goal: @eq (@Point Hi) X Y *)
eapply(inter_uniquenessH A B A' B'); auto.

(* Goal: @eq (@Point Hi) X Y *)
induction(eq_dec_pointsH P B').
(* Goal: False *)
(* Goal: False *)
subst P.
(* Goal: @eq (@Point Hi) X Y *)
(* Goal: @eq (@Point Hi) X Y *)
eapply(inter_uniquenessH A B B' A'); auto.
(* Goal: @ColH Hi B' A' Y *)
(* Goal: @eq (@Point Hi) X Y *)
apply colH_permut_213.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @ColH Hi B' A' Y *)
(* Goal: @eq (@Point Hi) X Y *)
apply colH_permut_213.
(* Goal: Cong C D C' D' *)
assumption.

(* Goal: @eq (@Point Hi) X Y *)
eapply(inter_uniquenessH A B P B'); auto.
(* Goal: @ColH Hi C E G *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH.
(* Goal: @ex (@Line Hi) (fun l : @Line Hi => and (@IncidL Hi B l) (and (@IncidL Hi C l) (@IncidL Hi P l))) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
exists m.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.

(* Goal: @ColH Hi C E G *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH.
(* Goal: @ex (@Line Hi) (fun l : @Line Hi => and (@IncidL Hi B l) (and (@IncidL Hi C l) (@IncidL Hi P l))) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
exists m.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
Qed.

Lemma between_only_one' : forall A B C, BetH A B C -> ~ BetH B C A /\ ~ BetH B A C.
Proof.
(* Goal: forall (A B C : @Point Hi) (_ : @BetH Hi A B C), and (not (@BetH Hi B C A)) (not (@BetH Hi B A C)) *)
intros A B C HBet1; assert (HBet2 := between_comm _ _ _ HBet1).
(* Goal: and (not (@BetH Hi B C A)) (not (@BetH Hi B A C)) *)
split; apply between_only_one; auto.
Qed.

Lemma betH_colH : forall A B C, BetH A B C -> ColH A B C /\ A <> B /\ B <> C /\ A <> C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
apply betH_distincts in H.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
Qed.

Lemma cut_comm : forall A B l, cut l A B -> cut l B A.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: and (not (@IncidL Hi A l)) (not (@IncidL Hi B l)) *)
unfold cut in *.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi B I A)) *)
destruct H1 as [I H1].
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi B I A)) *)
exists I.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: and (@IncidL Hi I l) (@BetH Hi B I A) *)
apply between_comm in H2.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
Qed.

Lemma line_on_plane' : forall A B C p, A <> B ->
  IncidP A p -> IncidP B p -> ColH A B C -> IncidP C p.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @IncidP Hi C p *)
destruct H2 as [l].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
apply (line_on_plane A B l); assumption.
Qed.

Lemma inner_pasch_aux : forall A B C P Q,
                            ~ ColH B C P -> Bet A P C -> Bet B Q C ->
      exists X, Bet P X B /\ Bet Q X A.
Proof.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
unfold Bet.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
induction H0; induction H1.

(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
elim (eq_dec_pointsH Q A);intros HQA.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
subst.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
exfalso.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
apply betH_expand in H1;spliter.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
apply betH_expand in H0;spliter.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
ColHR.

(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
line Q A l HQA.

(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
induction(eq_dec_pointsH P A).
(* Goal: False *)
(* Goal: False *)
subst P.
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi X I Y)) *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
exists A.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
split; unfold Bet.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
right; left.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right; right.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.

(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
induction(eq_dec_pointsH Q C).
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst Q.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
exists P.
split;
unfold Bet in *.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right; left; auto.

(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
(* Goal: Cong C D C' D' *)
assumption.

(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(HI:~IncidL P l).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H0.
(* Goal: False *)
(* Goal: False *)
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply between_col in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
line_col A P Q.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(ColH P C Q).
(* Goal: @ColH Hi P C Q *)
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
eapply (colH_trans A P); Col.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
eapply (colH_trans Q C); Col.

(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
induction(eq_dec_pointsH B Q).
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst Q.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C C)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
exists B.

split;
(* Goal: or (Para l m) (@EqL Hi l m) *)
 right.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
left; auto.

(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
induction(eq_dec_pointsH A C).
(* Goal: @ColH Hi A B C *)
subst C.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
apply betH_distincts in H0.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
solve [intuition].

(* Goal: @Coplanar H_to_T A B C D *)
assert(~IncidL B l).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
line_col A B Q.
(* Goal: False *)
assert(ColH A B C).
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H0.
(* Goal: False *)
(* Goal: False *)
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply between_col in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
apply(colH_trans B Q);
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H0.
(* Goal: False *)
(* Goal: False *)
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply between_col in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.

(* Goal: @ColH Hi B D C *)
(* Goal: @IncidP Hi F p *)
apply (colH_trans A C); Col.

(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(~IncidL C l).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
line_col A C Q.
(* Goal: False *)
assert(ColH A B C).
(* Goal: False *)
(* Goal: False *)
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply between_col in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
apply(colH_trans C Q);
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H0.
(* Goal: False *)
(* Goal: False *)
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply between_col in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi B D C *)
(* Goal: @IncidP Hi F p *)
apply (colH_trans A C); Col.

(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(cut l B C).
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
exists Q.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.

(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
destruct (plane_existence B C P H) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(PH:=pasch B C P l p).
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
induction PH; trivial.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
unfold cut in H14.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
destruct H13 as [X HX].
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l A P) (@cut Hi l C P)) *)
exists X.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => and (not (@eq (@Point Hi) A B)) (@IncidL Hi B l)) *)
induction(eq_dec_pointsH A X).
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
subst X.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right; right; auto.
(* Goal: False *)
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(A <> Q).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst Q.
(*unfold Bet*)
apply between_col in  H0.
apply between_col in  H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi B D C *)
(* Goal: @IncidP Hi F p *)
apply (colH_trans A C); Col.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(P <> C).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
  intro.
(* Goal: False *)
(* Goal: False *)
  subst P.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  Col.
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
assert(A <> B).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
  intro.
(* Goal: False *)
(* Goal: and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C)) *)
  subst B.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
  apply between_col in H0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  spliter.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  Col.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(X <> Q).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
subst X.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: False *)
(* Goal: False *)
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply between_col in H1.
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_col in H14.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B Q); Col.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(ColH A X Q).
(* Goal: @ColH Hi C E G *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH.
(* Goal: @ex (@Line Hi) (fun l : @Line Hi => and (@IncidL Hi A l) (and (@IncidL Hi X l) (@IncidL Hi Q l))) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
exists l.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(HN:~ ColH A C Q).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply H9.
(* Goal: @IncidL Hi C l *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
col_line H21 l00.

(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
lines_eq l l00.

(* Goal: Cong C D C' D' *)
assumption.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert (HPB : P<>B).
(* Goal: not (@eq (@Point Hi) P B) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply ncolH_distincts in H.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
line P B m HPB.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(~ IncidL Q m).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.

(* Goal: @ColH Hi C E G *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH.

(* Goal: @ColH Hi C E G *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH.
(* Goal: @ex (@Line Hi) (fun l : @Line Hi => and (@IncidL Hi B l) (and (@IncidL Hi C l) (@IncidL Hi P l))) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
exists m.
(* Goal: Cong C D C' D' *)
repeat split; try assumption.
(* Goal: False *)
(* Goal: False *)
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply between_col in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi C m *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
col_line H1 m0.
(* Goal: @ColH Hi E F C' *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
lines_eq m m0.
(* Goal: Cong C D C' D' *)
assumption.

(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(~ColH A B P).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans A P); Col.

(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(cut m A C).
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (not (@IncidL Hi C m)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I m) (@BetH Hi A I C))) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply H24.
(* Goal: @ColH Hi C E G *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH.
(* Goal: @ex (@Line Hi) (fun l : @Line Hi => and (@IncidL Hi B l) (and (@IncidL Hi C l) (@IncidL Hi P l))) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
exists m.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C E G *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH.
(* Goal: @ColH Hi C E G *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH.
(* Goal: @ex (@Line Hi) (fun l : @Line Hi => and (@IncidL Hi B l) (and (@IncidL Hi C l) (@IncidL Hi P l))) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
exists m.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
exists P.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.

(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
destruct (plane_existence A C Q HN) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(HH:= pasch A C Q m p).
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
induction HH; trivial.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
unfold cut in H29.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
destruct H28 as [Y H28].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(X=Y).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply(inter_incid_uniquenessH B X Y l m); auto.
(* Goal: @ColH Hi C I Q *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply between_col in H29.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi Y l *)
(* Goal: @IncidL Hi X m *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
unfold ColH in H29.
(* Goal: @IncidL Hi Y l *)
(* Goal: @IncidL Hi X m *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
destruct H29 as [l0 H29].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi Y l *)
(* Goal: @IncidL Hi X m *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
lines_eq l0 l.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_col in H14.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi X m *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
col_line H14 m0.
(* Goal: @ColH Hi E F C' *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
lines_eq m m0.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
subst Y.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
(* Goal: Cong C D C' D' *)
assumption.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
unfold cut in H29.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
destruct H28 as [I H28].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(ColH C I Q).
(* Goal: @ColH Hi C I Q *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply between_col in H29.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
col_line H30 o.
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(~IncidL C m).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C E G *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH.
(* Goal: @ColH Hi C E G *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH.
(* Goal: @ex (@Line Hi) (fun l : @Line Hi => and (@IncidL Hi B l) (and (@IncidL Hi C l) (@IncidL Hi P l))) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
exists m.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.

(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(IncidL B o).
(* Goal: False *)
(* Goal: False *)
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply between_col in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi B o *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
col_line H1 n0.
(* Goal: @IncidL Hi B o *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
lines_eq o n0.
(* Goal: Cong C D C' D' *)
assumption.

(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(HH:= inter_incid_uniquenessH C I B m o H34 H31 H28 H22 H32 H35).
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst I.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: or (@BetH Hi A C D) (@BetH Hi A D C) *)
apply between_only_one' in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply H36.
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
(* Goal: Cong C D C' D' *)
assumption.

(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply (line_on_plane P B).
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' A C); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' Q C); Col.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
unfold cut in H14.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
destruct H13 as [I H13].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(A = I).

(* Goal: @eq (@Point Hi) A I *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
line A C s H7.

(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply (inter_incid_uniquenessH Q A I s l); auto.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.

(* Goal: False *)
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert( A <> Q).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst Q.
(* Goal: False *)
(* Goal: False *)
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply between_col in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H0.
(* Goal: @ColH Hi C E G *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi B D C *)
(* Goal: @IncidP Hi F p *)
apply (colH_trans A C); Col.

(* Goal: False *)
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
lines_eq l s.
(* Goal: False *)
(* Goal: @BetH Hi P A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
unfold cut in H10.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_col in H14.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
unfold ColH in H0.
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
destruct H0 as [s0 H0].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
lines_eq s s0.

(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
col_line H14 s1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
apply ncolH_distincts in H;spliter.
(* Goal: @IncidL Hi I s *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
lines_eq s s1.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst I.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply between_only_one in H14.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

(* Goal: Cong C D C' D' *)
contradiction.

(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply (line_on_plane Q A).
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' B C); Col.
(* Goal: not (@eq (@Point Hi) B C) *)
(* Goal: @IncidP Hi A p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply (between_diff B Q C H1).
(* Goal: @IncidP Hi A p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
apply betH_colH in H0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' P C); Col.

(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
induction H1.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst Q.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C C)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
exists B.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right;right; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right;left;auto.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst Q.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
exists P.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right;left; auto.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
assumption;
(* Goal: False *)
(* Goal: False *)
subst P.
(* Goal: @ColH Hi A B C *)
induction H0.
(* Goal: False *)
(* Goal: False *)
subst P.
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi X I Y)) *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
exists A.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right; left; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right; right; auto.
(* Goal: False *)
(* Goal: False *)
subst P.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: @ColH Hi A B C *)
induction H0.
(* Goal: False *)
(* Goal: False *)
subst P.
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi X I Y)) *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
exists A.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right;left; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right; right; auto.
(* Goal: False *)
(* Goal: False *)
subst P.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
Qed.

Lemma betH_trans1 : forall A B C D, BetH A B C ->  BetH B C D -> BetH A C D.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @cut Hi l P Y *)
assert(HH0 := H).
(* Goal: @BetH Hi A C D *)
assert(HH1:= H0).
(* Goal: @BetH Hi A C D *)
apply betH_distincts in HH0.
(* Goal: @BetH Hi A C D *)
apply betH_distincts in HH1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
clean_duplicated_hyps.
(* Goal: @BetH Hi A C D *)
assert(HH:=ncolH_exists A C H6).
(* Goal: @BetH Hi A C D *)
destruct HH as [E HE].
(* Goal: @BetH Hi A C D *)
assert(C <> E).
(* Goal: not (@eq (@Point Hi) B G) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply ncolH_distincts in HE.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @BetH Hi A C D *)
assert(HF:=between_out C E H1).
(* Goal: @BetH Hi A C D *)
destruct HF as [F HF].
(* Goal: @BetH Hi A C D *)
assert(HHF:=HF).
(* Goal: @BetH Hi A C D *)
apply betH_distincts in HHF.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

(* Goal: False *)
assert(ColH A B C).
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: or (@BetH Hi B C D) (@BetH Hi B D C) *)
assert(ColH B C D).
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H0.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @BetH Hi A C D *)
assert(ColH C E F).
(* Goal: @ColH Hi C E F *)
(* Goal: @BetH Hi A C D *)
apply between_col in HF.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.

(* Goal: @BetH Hi A C D *)
assert(~ColH F C B).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
assert(ColH C E B).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans C F); Col.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B C); Col.

(* Goal: @BetH Hi A C D *)
assert(exists X : Point, Bet B X F /\ Bet E X A).
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (@Bet Hi B X F) (@Bet Hi E X A)) *)
(* Goal: @BetH Hi A C D *)
apply(inner_pasch_aux A F C B E H13).
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
unfold Bet.
(* Goal: Cong C D C' D' *)
left; assumption.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
unfold Bet.
(* Goal: Cong C D C' D' *)
left; apply between_comm; assumption.
(* Goal: @BetH Hi A C D *)
destruct H14 as [G H14].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.


(* Goal: @BetH Hi A C D *)
induction H14.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
induction H15.
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(HH15:=H14).
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_col in HH15.
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(HH16:=H15).
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_col in HH16.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(~ColH D B G).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(ColH B D F).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B G); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @BetH Hi A C D *)
subst G.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans A B); Col.
(* Goal: False *)
apply H13.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans B D); Col.

(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
line C E m H1.

(*///////////*)

(*///////////*)

(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(~(cut m A G \/ cut m B G)).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
induction H19.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold cut in H19.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
ex_and H21 E'.
(* Goal: False *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(E = E').
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (inter_uniquenessH A G C F E E'); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(ColH B C G).
(* Goal: @ColH Hi B D C *)
(* Goal: @IncidP Hi F p *)
apply (colH_trans A C); Col.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply H16.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B C); Col.
(* Goal: @ColH Hi E F C' *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
ex_and H12 m0.
(* Goal: @ColH Hi E F C' *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
lines_eq m m0.
(* Goal: @ColH Hi C F E' *)
(* Goal: False *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
line_col C F E'.
(* Goal: False *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
subst E'.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_only_one in H22.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold cut in H19.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
ex_and H21 F'.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(F = F').
(* Goal: @IncidP Hi F p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply betH_distincts in H14.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (inter_uniquenessH C E B G); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B C); Col.
(* Goal: @ColH Hi C E F' *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
line_col C E F'.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
subst F'.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_only_one in H22.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_comm in H14.
(* Goal: Cong C D C' D' *)
contradiction.

(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(~ ColH B D G ).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H16. Col.

(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(~IncidL G m).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(ColH C E G).
(* Goal: @ColH Hi C E G *)
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
exists m; split; auto.
(* Goal: @IncidP Hi E p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply betH_distincts in H15.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans E G); Col.

(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(cut m D B).
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.


(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.

(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: or (@BetH Hi A C D) (@BetH Hi A D C) *)
assert(ColH A C D).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans B C); Col.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans C D); Col.
(* Goal: @ColH Hi C D E *)
(* Goal: and (not (@IncidL Hi B m)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I m) (@BetH Hi D I B))) *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
line_col C D E.

(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans B C); Col.
(* Goal: @ColH Hi B C E *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I m) (@BetH Hi D I B)) *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
line_col B C E.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B)))) *)
exists C.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply cut_comm in H22.

(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
destruct (plane_existence B D G H20) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(HP:= pasch B D G m p).
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
induction HP; trivial.


(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply H19.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold cut in H26.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
destruct H25 as [HX H25].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(~ ColH G D A).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(ColH A B D).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B C); Col.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply H20.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans A D); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
subst D.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_only_one' in H0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply between_comm in H.
(* Goal: Cong C D C' D' *)
contradiction.

(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(~IncidL A m).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi A C E *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
line_col A C E.

(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(cut m G D).
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I m) (@BetH Hi G I D)) *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
exists HX.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
(* Goal: Cong C D C' D' *)
assumption.

(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
destruct (plane_existence G D A H27) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(HP:=pasch G D A m p).
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
induction HP; trivial.

(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply H19.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @cut Hi l B A *)
apply cut_comm.
(* Goal: Cong C D C' D' *)
assumption.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold cut in H33.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
ex_and H32 C'.

(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(C'= C).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(inter_uniquenessH A D E F); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: or (@BetH Hi A C D) (@BetH Hi A D C) *)
assert(ColH A C D).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B C); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans A D); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
subst D.
(* Goal: False *)
(* Goal: @ColH Hi A D C *)
(* Goal: @ColH Hi E F C' *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply H27.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
apply between_col in H33;
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B C); Col.
(* Goal: @ColH Hi E F C' *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold ColH in H12.
(* Goal: @ColH Hi E F C' *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
ex_and H12 m0.
(* Goal: @ColH Hi E F C' *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
lines_eq m m0.
(* Goal: @ColH Hi E F C' *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
line_col E F C'.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
subst C'.
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
(* Goal: Cong C D C' D' *)
assumption.

(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply (line_on_plane C E).
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @IncidP Hi C p *)
(* Goal: @IncidP Hi E p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert (ColH A C D) by (apply (colH_trans B C); Col).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' A D); Col.
(* Goal: Cong C D C' D' *)
intro; apply (between_only_one A B C); subst; assumption.
(* Goal: @IncidP Hi E p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply betH_distincts in H15.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' G A); Col.

(* Goal: forall _ : not (@ColH Hi A C B), or (cut' A B X Y) (@same_side' Hi A B X Y) *)
assert (IncidP C p).
(* Goal: False *)
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
apply betH_distincts in H0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' B D); Col.
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply (line_on_plane C E); trivial.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' C F); Col.
(* Goal: @IncidP Hi F p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply betH_distincts in H14.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' B G); Col.

(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
induction H15.
(* Goal: @BetH Hi A C D *)
subst G.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_col in H14.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
apply H13.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans E F); Col.
(* Goal: @BetH Hi A C D *)
subst G.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_col in H14.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
apply H13.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans A B); Col.
(* Goal: @BetH Hi A C D *)
induction H14.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
induction H15.
(* Goal: @BetH Hi A C D *)
subst G.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_col in H15.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans A B); Col.
(* Goal: @BetH Hi A C D *)
subst G.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
induction H15.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
subst E.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
apply H13.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
subst B; tauto.
(* Goal: @BetH Hi A C D *)
subst G.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
induction H15.
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
apply between_col in H14.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans E F); Col.
(* Goal: @BetH Hi A C D *)
induction H14.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
subst F.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
subst F.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
apply H13.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
Qed.

Lemma betH_trans2 : forall A B C D, BetH A B C ->  BetH B C D -> BetH A B D.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply between_comm in H.
(* Goal: not (@eq (@Point Hi) B D) *)
(* Goal: @ColH Hi B D C *)
(* Goal: @IncidP Hi F p *)
apply between_comm in H0.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply (betH_trans1 D C B A); auto.
Qed.

Lemma betH_trans : forall A B C D, BetH A B C ->  BetH B C D -> BetH A B D /\ BetH A C D.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply (betH_trans2 A B C D); auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply (betH_trans1 A B C D); auto.
Qed.

Lemma not_cut3 : forall A B C l p,
  IncidP A p -> IncidP B p -> IncidP C p -> IncidLP l p ->
  ~ IncidL A l -> ~ ColH A B C -> ~ cut l A B -> ~ cut l A C ->
  ~ cut l B C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
assert(~ColH B C A).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
apply H4;
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: False *)
assert(HH:= pasch B C A l p).
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
induction HH; trivial.
(* Goal: False *)
apply cut_comm in H9.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: False *)
apply cut_comm in H9.
(* Goal: Cong C D C' D' *)
contradiction.
Qed.

Lemma betH_trans0 : forall A B C D, BetH A B C ->  BetH A C D -> BetH B C D /\ BetH A B D.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: False *)
apply betH_expand in H.
(* Goal: False *)
apply betH_expand in H0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
clean_duplicated_hyps.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(HH:=ncolH_exists A B H5).
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
destruct HH as [G HE].
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(B <> G).
(* Goal: not (@eq (@Point Hi) B G) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply ncolH_distincts in HE.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(HF:=between_out B G H1).
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
ex_and HF F.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
apply betH_expand in H9.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
elim (eq_dec_pointsH C F).
(* Goal: forall _ : @eq (@Point Hi) C F, and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: forall _ : not (@eq (@Point Hi) C F), and (@BetH Hi B C D) (@BetH Hi A B D) *)
intros HCF.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
subst.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
exfalso.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B F);Col.
(* Goal: forall _ : not (@eq (@Point Hi) C F), and (@BetH Hi B C D) (@BetH Hi A B D) *)
intro HCF.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
line C F l HCF.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(~cut l A B).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
unfold cut in H16.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
ex_and H18 X.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(X=C).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (inter_uniquenessH A B F C); Col.

(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans B F); Col.
(* Goal: @ColH Hi F C X *)
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply between_col in H19.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
spliter; Col.
(* Goal: @ColH Hi F C X *)
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
line_col F C X.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
subst X.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply between_only_one in H19.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply between_comm in H.
(* Goal: Cong C D C' D' *)
contradiction.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(~cut l B G).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
unfold cut in H17.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
ex_and H19 X.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply betH_expand in H20.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(ColH B X F).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B G); Col.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
col_line H25 l00.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(X <> F).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
subst X.
(* Goal: False *)
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply between_only_one in H20.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply between_comm in H9.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
lines_eq l l00.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(~cut l A G).
(* Goal: not (@cut Hi l A G) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
destruct (plane_existence A B G HE) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: not (@cut Hi l A G) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply not_cut3 with B p; trivial.
(* Goal: @IncidLP Hi l p *)
apply (line_on_plane C F); trivial.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' A B); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' B G); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(ColH B C G).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B F);Col.
(* Goal: @ColH Hi B F C *)
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
line_col B F C.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B C); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply HE; Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply cut_comm in H21.
(* Goal: Cong C D C' D' *)
contradiction.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(cut l A G \/ cut l D G).
(* Goal: or (@cut Hi l A G) (@cut Hi l D G) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert (~ ColH A D G).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans A D); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans A C) ; Col.
(* Goal: or (@cut Hi l A G) (@cut Hi l D G) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
destruct (plane_existence A D G H19) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@cut Hi l A G) (@cut Hi l D G) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply(pasch A D G l p); trivial.
(* Goal: forall _ : not (@ColH Hi A C B), or (cut' A B X Y) (@same_side' Hi A B X Y) *)
assert (IncidP C p).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' A D); Col.
(* Goal: @IncidLP Hi l p *)
apply (line_on_plane C F); trivial.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' B G); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' A C); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(ColH B C G).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans G F); Col.
(* Goal: @ColH Hi G F C *)
(* Goal: False *)
(* Goal: @cut Hi l A D *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
line_col G F C.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B C); Col.
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
repeat split.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I D)) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(ColH A C F).
(* Goal: @ColH Hi A C F *)
(* Goal: False *)
(* Goal: not (@IncidL Hi D l) *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I D)) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
line_col A C F.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I D)) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(ColH A B F).
(* Goal: @ColH Hi B D C *)
(* Goal: @IncidP Hi F p *)
apply (colH_trans A C); Col.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B F); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I D)) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(ColH C D F).
(* Goal: @ColH Hi C D F *)
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I D)) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
line_col C D F.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I D)) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(ColH A C F).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans C D); Col.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I D)) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(ColH A B F).
(* Goal: @ColH Hi B D C *)
(* Goal: @IncidP Hi F p *)
apply (colH_trans A C); Col.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B F); Col.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B)))) *)
exists C.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
induction H19.
(* Goal: Cong C D C' D' *)
contradiction.


(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(~ ColH D G B).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(ColH A B D).
(* Goal: @ColH Hi B D C *)
(* Goal: @IncidP Hi F p *)
apply (colH_trans A C); Col.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B D); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
subst D.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply between_only_one in H0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply between_comm in H.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @Coplanar H_to_T A B C D *)
assert(~ IncidL B l).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(ColH B C G).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B F); Col.
(* Goal: @ColH Hi B F C *)
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
line_col B F C.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B C); Col.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
destruct (plane_existence D G B H20) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
assert(HH:=pasch D G B l p).
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
induction HH; trivial.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
unfold cut in H25.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
ex_and H24 C'.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
assert(C = C').
(* Goal: @eq (@Point Hi) C C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
assert(ColH C C' F).
(* Goal: @ColH Hi C C' F *)
(* Goal: @eq (@Point Hi) C C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
line_col C C' F.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (inter_uniquenessH  A B F C); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply HE.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B F); Col.
(* Goal: @ColH Hi A B C' *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply betH_expand in H25.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B D); Col.
(* Goal: @ColH Hi B D C *)
(* Goal: @IncidP Hi F p *)
apply (colH_trans A C); Col.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
subst C'.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
assert(BetH B C D).
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @BetH Hi A B D *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
assert(HH:=betH_trans A B C D H H26).
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
apply cut_comm in H25.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @IncidLP Hi l p *)
apply (line_on_plane C F); trivial.
(* Goal: @IncidP Hi C p *)
(* Goal: @IncidP Hi F p *)
apply (line_on_plane' B D); trivial.
(* Goal: not (@eq (@Point Hi) B D) *)
(* Goal: @ColH Hi B D C *)
(* Goal: @IncidP Hi F p *)
apply between_comm in H0.
(* Goal: Cong C D C' D' *)
intro; apply (between_only_one A B C); subst; assumption.
(* Goal: @ColH Hi B D C *)
(* Goal: @IncidP Hi F p *)
apply (colH_trans A C); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' B G); Col.
Qed.

Lemma betH_outH2__betH: forall A B C A' C',
 BetH A B C ->
 outH B C C' ->
 outH B A A' ->
 BetH A' B C'.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @outH Hi A C D *)
destruct H0.
(* Goal: and (@ColH Hi A B C) (and (not (@eq (@Point Hi) A C)) (not (@eq (@Point Hi) A B))) *)
 - destruct H1.
   assert (BetH A B C')
     by (apply (betH_trans A B C C');auto).
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
   apply between_comm.
(* Goal: @BetH Hi C' B A' *)
(* Goal: @BetH Hi A' B C' *)
   apply (betH_trans C' B A A'); auto using between_comm.
(* Goal: and (@ColH Hi A B C) (and (not (@eq (@Point Hi) A C)) (not (@eq (@Point Hi) A B))) *)
   destruct H1.

   assert (BetH C B A') by
      (apply between_comm;
      apply (betH_trans0 A A' B C);auto using between_comm).
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
   apply (betH_trans A' B C C');auto using between_comm.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
   spliter;subst.
    apply between_comm;
   apply (betH_trans C' C B A');auto using between_comm.
(* Goal: @outH Hi A C D *)
 - destruct H0.
(* Goal: and (@ColH Hi A B C) (and (not (@eq (@Point Hi) A C)) (not (@eq (@Point Hi) A B))) *)
   destruct H1.
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
   assert (BetH A B C').
    apply between_comm;
    apply (betH_trans0 C C' B A);auto using between_comm.
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
   apply between_comm; apply (betH_trans C' B A A');auto using between_comm.
(* Goal: and (@ColH Hi A B C) (and (not (@eq (@Point Hi) A C)) (not (@eq (@Point Hi) A B))) *)
   destruct H1.
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
   assert (BetH A B C').
(* Goal: @BetH Hi A B C' *)
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
     apply between_comm; apply (betH_trans0 C C' B A);auto using between_comm.
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
   apply (betH_trans0 A A' B C');auto using between_comm.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
   spliter;subst.
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
   apply between_comm;apply (betH_trans0 C C' B A');auto using between_comm.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
   spliter;subst.
(* Goal: and (@ColH Hi A B C) (and (not (@eq (@Point Hi) A C)) (not (@eq (@Point Hi) A B))) *)
   destruct H1.
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
   apply (betH_trans A' A B C');auto using between_comm.
(* Goal: and (@ColH Hi A B C) (and (not (@eq (@Point Hi) A C)) (not (@eq (@Point Hi) A B))) *)
   destruct H1.
(* Goal: @BetH Hi A' B C' *)
(* Goal: @BetH Hi A' B C' *)
   apply (betH_trans0 A A' B C');auto using between_comm.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
   spliter;subst.
(* Goal: Cong C D C' D' *)
   assumption.
Qed.

Lemma cong_existence' : forall A B l M,
  A <> B ->
  IncidL M l ->
  exists A' B', IncidL A' l /\ IncidL B' l /\ BetH A' M B' /\ CongH M A' A B /\ CongH M B' A B.
Proof.
(* Goal: forall (A B : @Point Hi) (l : @Line Hi) (M : @Point Hi) (_ : not (@eq (@Point Hi) A B)) (_ : @IncidL Hi M l), @ex (@Point Hi) (fun A' : @Point Hi => @ex (@Point Hi) (fun B' : @Point Hi => and (@IncidL Hi A' l) (and (@IncidL Hi B' l) (and (@BetH Hi A' M B') (and (@CongH Hi M A' A B) (@CongH Hi M B' A B)))))) *)
intros A B l M HAB HInM.
(* Goal: @ex (@Point Hi) (fun A' : @Point Hi => @ex (@Point Hi) (fun B' : @Point Hi => and (@IncidL Hi A' l) (and (@IncidL Hi B' l) (and (@BetH Hi A' M B') (and (@CongH Hi M A' A B) (@CongH Hi M B' A B)))))) *)
assert (H : exists P, IncidL P l /\ M <> P).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@IncidL Hi P l) (not (@eq (@Point Hi) M P))) *)
  destruct (two_points_on_line l) as [P1 [P2 [HP2 [HP1 HP1P2]]]].
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@IncidL Hi P l) (not (@eq (@Point Hi) M P))) *)
  elim (eq_dec_pointsH M P1); intro HMP1; try subst P1; [exists P2; auto|].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  elim (eq_dec_pointsH M P2); intro HMP2; try subst P2; exists P1; auto.
  }
(* Goal: @ex (@Point Hi) (fun A' : @Point Hi => @ex (@Point Hi) (fun B' : @Point Hi => and (@IncidL Hi A' l) (and (@IncidL Hi B' l) (and (@BetH Hi A' M B') (and (@CongH Hi M A' A B) (@CongH Hi M B' A B)))))) *)
destruct H as [P [HInP HMP]].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
destruct (between_out P M) as [P' HP']; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
destruct (cong_existence A B M P l) as [A' [HInA' [HoutA' HCongA']]]; auto.
destruct (cong_existence A B M P' l) as [B' [HInB' [HoutB' HCongB']]]; auto;
[apply betH_distincts in HP'; tauto|apply between_col in HP'|
 exists A', B'; repeat split; auto; apply betH_outH2__betH with P P'; auto].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
destruct HP' as [l' [HIn1 [HIn2 HIn3]]]; apply IncidL_morphism with l'; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply line_uniqueness with M P; auto.
Qed.

Definition Cong A B C D := (CongH A B C D /\ A <> B /\ C <> D) \/ (A = B /\ C = D).

Lemma betH_to_bet : forall A B C , BetH A B C -> Bet A B C /\ A <> B /\ B <> C /\ A <> C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: and (@Bet Hi A B C) (and (not (@eq (@Point Hi) A B)) (and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C)))) *)
assert(HH:= betH_distincts A B C H).
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
induction HH.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
unfold Bet.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
repeat split; assumption.
Qed.

Lemma betH_line : forall A B C, BetH A B C ->
  exists l, IncidL A l /\ IncidL B l /\ IncidL C l.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H.
(* Goal: Cong C D C' D' *)
assumption.
Qed.


(****************** between_identity ************************)

Lemma bet_identity : forall A B, Bet A B A -> A = B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @eq (@Point Hi) A B *)
unfold Bet in H.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
apply betH_distincts in H.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @eq (@Point Hi) A B *)
apply sym_equal.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
Qed.

(************************************************************)

Lemma morph : forall l m, EqL l m -> (forall A, IncidL A l <-> IncidL A m).
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
rewrite <-H.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: iff (and (not (@IncidL Hi y0 x)) (and (not (@IncidL Hi y1 x)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
rewrite H.
(* Goal: Cong C D C' D' *)
assumption.
Qed.


Lemma point3_online_exists : forall A B l, IncidL A l -> IncidL B l -> exists C, IncidL C l  /\ C <> A /\ C <> B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
induction(eq_dec_pointsH A B).
(* Goal: False *)
(* Goal: and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C)) *)
subst B.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C A)))) *)
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B)))) *)
two_points l A0 B0.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C A)))) *)
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B)))) *)
induction(eq_dec_pointsH A A0).
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C A)))) *)
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C A)))) *)
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B)))) *)
subst A0.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C A)))) *)
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C A)))) *)
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B)))) *)
exists B0.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C A)))) *)
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B)))) *)
exists A0.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B)))) *)
assert(HH:= between_out A B H1).
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B)))) *)
destruct HH as [C HH].
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B)))) *)
apply betH_colH in HH.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B)))) *)
exists C.
(* Goal: and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B))) *)
unfold ColH in H3.
(* Goal: and (@IncidL Hi C l) (and (not (@eq (@Point Hi) C A)) (not (@eq (@Point Hi) C B))) *)
destruct H2 as [m H2].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
lines_eq l m.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
Qed.

Lemma not_betH121 : forall A B, ~BetH A B A.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
apply betH_colH in H.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
Qed.

(***************************** cong_identity ***********************)

Lemma cong_identity : forall A B C , Cong A B C C -> A = B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @eq (@Point Hi) A B *)
unfold Cong in H.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
spliter;
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
Qed.

(************************ cong_inner_transitivity ****************************)

Lemma cong_inner_transitivity : forall A B C D E F, Cong A B C D -> Cong A B E F -> Cong C D E F.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
unfold Cong in *.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: @ColH Hi A B C *)
induction H0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply (cong_pseudo_transitivity A B); auto.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @ColH Hi A B C *)
induction H0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
Qed.

Lemma other_point_on_line : forall A l, IncidL A l -> exists B, A <> B /\ IncidL B l.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
assert(HH:= two_points_on_line l).
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => and (not (@eq (@Point Hi) A B)) (@IncidL Hi B l)) *)
destruct HH as [X HH].
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => and (not (@eq (@Point Hi) A B)) (@IncidL Hi B l)) *)
destruct HH as [Y HH].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => and (not (@eq (@Point Hi) A B)) (@IncidL Hi B l)) *)
induction(eq_dec_pointsH A X).
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => and (not (@eq (@Point Hi) A B)) (@IncidL Hi B l)) *)
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => and (not (@eq (@Point Hi) A B)) (@IncidL Hi B l)) *)
exists Y.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
subst X.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l A P) (@cut Hi l C P)) *)
exists X.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
Qed.

Lemma bet_disjoint : forall A B C, BetH A B C -> disjoint A B B C.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @disjoint Hi A B B C *)
unfold disjoint.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
destruct H0 as [P []].
(* Goal: False *)
assert(HP:= betH_trans0 A P B C H0 H).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi A C D) (@BetH Hi A D C) *)
apply between_only_one' in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
contradiction.
Qed.

Lemma addition_betH : forall A B C A' B' C',
  BetH A B C -> BetH A' B' C' ->
  CongH A B A' B' -> CongH B C B' C' ->
  CongH A C A' C'.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @CongH Hi A C A' C' *)
apply addition with B B';auto using bet_disjoint, between_col.
Qed.

Lemma outH_trivial : forall A B, A<>B -> outH A B B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @outH Hi A C D *)
(* Goal: @outH Hi A C D *)
unfold outH.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
Qed.

Lemma same_side_refl :forall l A,
 ~ IncidL A l ->
 same_side A A l.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @same_side Hi A C l *)
unfold same_side.
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (and (not (@IncidL Hi A l)) (and (not (@IncidL Hi P l)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I P))))) (and (not (@IncidL Hi A l)) (and (not (@IncidL Hi P l)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I P)))))) *)
destruct (two_points_on_line l).
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (and (not (@IncidL Hi A l)) (and (not (@IncidL Hi P l)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I P))))) (and (not (@IncidL Hi A l)) (and (not (@IncidL Hi P l)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I P)))))) *)
destruct s.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (and (not (@IncidL Hi A l)) (and (not (@IncidL Hi P l)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I P))))) (and (not (@IncidL Hi A l)) (and (not (@IncidL Hi P l)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I P)))))) *)
destruct (between_out A x).
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intro;subst. intuition.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (and (not (@IncidL Hi A l)) (and (not (@IncidL Hi P l)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I P))))) (and (not (@IncidL Hi A l)) (and (not (@IncidL Hi P l)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I P)))))) *)
exists x1.
(* Goal: Cong C D C' D' *)
repeat split;try assumption.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@cut Hi l B P) (@cut Hi l C P) *)
apply betH_expand in H3.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I x1)) *)
destruct H8.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I x1)) *)
assert (EqL x2 l).
(* Goal: Cong C D C' D' *)
apply line_uniqueness with x x1;try assumption.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
rewrite H11 in H8;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
exists x;auto.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
 intro.
(* Goal: False *)
(* Goal: and (@cut Hi l B P) (@cut Hi l C P) *)
apply betH_expand in H3.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I x1)) *)
destruct H8.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I x1)) *)
assert (EqL x2 l).
(* Goal: Cong C D C' D' *)
apply line_uniqueness with x x1;try assumption.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
rewrite H11 in H8;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
exists x;auto.
Qed.

Lemma same_side_prime_refl: forall A B C,
 ~ ColH A B C ->  same_side' C C A B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @same_side' Hi B C X Y *)
unfold same_side'.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
apply ncolH_distincts in H;intuition.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @same_side Hi C C l *)
apply same_side_refl.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
exists l;auto.
Qed.

Lemma outH_expand: forall A B C,
  outH A B C -> outH A B C  /\ ColH A B C /\ A<>C /\ A<>B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @outH Hi A C B *)
unfold outH in *.
(* Goal: and (@ColH Hi A B C) (and (not (@eq (@Point Hi) A C)) (not (@eq (@Point Hi) A B))) *)
decompose [or] H.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
apply betH_expand in H0;intuition.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
apply betH_expand in H1;intuition.
(* Goal: and (@ColH Hi A B C) (and (not (@eq (@Point Hi) A C)) (not (@eq (@Point Hi) A B))) *)
destruct H1.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
subst.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
Qed.

Lemma construction_uniqueness : forall A B D E,
  BetH A B D -> BetH A B E -> CongH B D B E -> D = E.
Proof.
(* Goal: forall (A B D E : @Point Hi) (_ : @BetH Hi A B D) (_ : @BetH Hi A B E) (_ : @CongH Hi B D B E), @eq (@Point Hi) D E *)
intros A B D E HBet1 HBet2 HCong.
(* Goal: @eq (@Point Hi) D E *)
assert (HD1 : A <> B) by (apply betH_expand in HBet1; spliter; auto).
(* Goal: @eq (@Point Hi) D E *)
destruct (ncolH_exists _ _ HD1) as [C HNC].
(* Goal: @eq (@Point Hi) D E *)
assert (HConga : CongaH A C D A C E).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @outH Hi C D E *)
  assert (HD2 := between_diff _ _ _ HBet1).
(* Goal: @CongaH Hi A C D A C E *)
  assert (HD3 := between_diff _ _ _ HBet2).
(* Goal: @CongaH Hi A C D A C E *)
  assert (HC1 := between_col _ _ _ HBet1).
(* Goal: @CongaH Hi A C D A C E *)
  assert (HC2 := between_col _ _ _ HBet2).
  apply cong_5; try apply congH_refl; try apply addition_betH with B B;
  try apply congH_refl; auto; try (intro; subst; Col); try (apply HNC; ColHR).
  apply conga_out_conga with C B C B; try apply outH_trivial; try left; auto;
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  try apply conga_refl; try intro; subst; apply HNC; Col.
  }
(* Goal: @eq (@Point Hi) D E *)
assert (Hout : outH C D E).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @outH Hi C D E *)
  assert (HD2 := between_diff _ _ _ HBet1).
(* Goal: @outH Hi C D E *)
  assert (HC := between_col _ _ _ HBet1).
  apply (cong_4_uniqueness A C D C D A D E); try apply conga_refl;
  try apply same_side_prime_refl; auto; try (intro; apply HNC; ColHR).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  destruct (between_out B A) as [F HBet3]; auto.
(* Goal: @same_side' Hi D E C A *)
  split; [intro; subst; Col|intros l HI1 HI2; exists F; split].

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @cut Hi l D F *)
    split; [intro; assert (ColH A C D) by (exists l; auto); apply HNC; ColHR|].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    apply betH_expand in HBet3; spliter.
(* Goal: and (not (@IncidL Hi F l)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi E I F))) *)
    split; [intro; assert (ColH A C F) by (exists l; auto); apply HNC; ColHR|].
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi E I F)) *)
    exists A; split; trivial.
(* Goal: @BetH Hi E A F *)
    apply betH_trans1 with B; Bet.
    }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    apply betH_expand in HBet2; spliter.
(* Goal: @cut Hi l E F *)
    split; [intro; assert (ColH A C E) by (exists l; auto); apply HNC; ColHR|].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    apply betH_expand in HBet3; spliter.
(* Goal: and (not (@IncidL Hi F l)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi E I F))) *)
    split; [intro; assert (ColH A C F) by (exists l; auto); apply HNC; ColHR|].
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi E I F)) *)
    exists A; split; trivial.
(* Goal: @BetH Hi E A F *)
    apply betH_trans1 with B; Bet.
    }
  }
apply betH_expand in HBet1; apply betH_expand in HBet2;
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply outH_expand in Hout; spliter; apply inter_uniquenessH with A B C D; Col.
Qed.

Lemma out_distinct : forall A B C, outH A B C -> A <> B /\ A <> C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ColH Hi A B C *)
unfold outH in H.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
apply betH_distincts in H.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
apply betH_distincts in H.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi A B C *)
subst C.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
Qed.

Lemma out_same_side : forall A B C l, IncidL A l -> ~IncidL B l ->  outH A B C -> same_side B C l.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @same_side Hi B C l *)
assert(B <> A).
(* Goal: not (@eq (@Point Hi) B A) *)
(* Goal: @same_side Hi B C l *)
apply out_distinct in H1.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: @same_side Hi B C l *)
assert(HH:= between_out B A H2).
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
destruct HH as [P].
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
exists P.
(* Goal: and (@cut Hi l B P) (@cut Hi l C P) *)
assert(~IncidL P l).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@cut Hi l B P) (@cut Hi l C P) *)
apply betH_expand in H3.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@cut Hi l B P) (@cut Hi l C P) *)
col_line H8 ll.
(* Goal: False *)
(* Goal: and (@cut Hi l B P) (@cut Hi l C P) *)
lines_eq l ll.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi X I Y)) *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
exists A.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
unfold outH in H1.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
induction H1.

(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
apply betH_expand in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi C I P)) *)
col_line H9 m.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
lines_eq l m.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
induction H1.
(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
apply betH_expand in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi C I P)) *)
col_line H9 m.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
lines_eq l m.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi A B C *)
subst C.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi X I Y)) *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
exists A.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.

(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
unfold outH in H1.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
induction H1.

(* Goal: @BetH Hi C A P *)
(* Goal: @BetH Hi C A P *)
assert(BetH P A C /\ BetH P B C).
(* Goal: and (@BetH Hi P A C) (@BetH Hi P B C) *)
(* Goal: @BetH Hi C A P *)
(* Goal: @BetH Hi C A P *)
apply(betH_trans P A B C); Bet.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
Bet.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
induction H1.
(* Goal: @BetH Hi C A P *)
(* Goal: @BetH Hi C A P *)
assert(BetH C A P /\ BetH B C P).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply(betH_trans0 B C A P); Bet.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi A B C *)
subst C.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
Qed.

Lemma between_one : forall A B C,
  A <> B -> A <> C -> B <> C -> ColH A B C ->
  BetH A B C \/ BetH B C A \/ BetH B A C.
Proof.
intros A B C HD1 HD2 HD3 HC.
destruct (ncolH_exists _ _ HD2) as [D HNC1].
assert (HD4 : B <> D) by (intro; subst; apply HNC1; Col).
destruct (between_out _ _ HD4) as [G HBet1].
assert (HD5 : A <> D) by (intro; subst; Col); line A D lAD HD5.
assert (HD6 : C <> D) by (intro; subst; Col); line C D lCD HD6.
assert (HNC2 : ~ ColH B G C)
  by (intro; apply betH_expand in HBet1; spliter; apply HNC1; ColHR).
assert (HNC3 : ~ ColH B G A)
  by (intro; apply betH_expand in HBet1; spliter; apply HNC1; ColHR).
assert (HNI1 : ~ IncidL C lAD) by (intro; apply HNC1; exists lAD; auto).
assert (HNI2 : ~ IncidL A lCD) by (intro; apply HNC1; exists lCD; auto).
assert (HCut1 : cut lAD B G).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_expand in HBet1; spliter.
  split; [intro; assert (ColH A B D) by (exists lAD; auto); apply HNC1; ColHR|].
  split; [intro; assert (ColH A D G) by (exists lAD; auto); apply HNC1; ColHR|].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  exists D; auto.
  }
assert (HCut2 : cut lCD B G).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_expand in HBet1; spliter.
  split; [intro; assert (ColH B C D) by (exists lCD; auto); apply HNC1; ColHR|].
  split; [intro; assert (ColH C D G) by (exists lCD; auto); apply HNC1; ColHR|].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  exists D; auto.
  }
destruct (plane_existence B G C HNC2) as [bgc].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
destruct (plane_existence B G A HNC3) as [bga].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert (HLP1 : IncidLP lAD bgc).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  apply (line_on_plane A D); trivial.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply (line_on_plane' B C); Col.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_colH in HBet1; spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply (line_on_plane' B G); Col.
  }
  assert (HLP2 : IncidLP lCD bga).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  apply (line_on_plane C D); trivial.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply (line_on_plane' A B); Col.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_colH in HBet1; spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply (line_on_plane' B G); Col.
  }
elim (pasch B G C lAD bgc); trivial; clear dependent bgc; intro HCut3;
elim (pasch B G A lCD bga); trivial; clear dependent bga; intro HCut4.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  destruct HCut3 as [_ [_ [I [HI3 HBet2]]]].
  elim (eq_dec_pointsH A I); intro HD7; [subst; right; right; auto|].
  assert (I = A); [|subst; right; right; auto].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_expand in HBet2; spliter.
  assert (ColH A D I) by (exists lAD; auto).
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  apply inter_uniquenessH with B C D A; try (intro; apply HNC1); Col; ColHR.
  }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  destruct HCut3 as [_ [_ [I [HI3 HBet2]]]].
  elim (eq_dec_pointsH A I); intro HD7; [subst; right; right; auto|].
  assert (I = A); [|subst; right; right; auto].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_expand in HBet2; spliter.
  assert (ColH A D I) by (exists lAD; auto).
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  apply inter_uniquenessH with B C D A; try (intro; apply HNC1); Col; ColHR.
  }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  destruct HCut4 as [_ [_ [I [HI3 HBet2]]]].
  elim (eq_dec_pointsH C I); intro HD7; [subst; right; left; auto|].
  assert (I = C); [|subst; right; left; auto].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_expand in HBet2; spliter.
  assert (ColH C D I) by (exists lCD; auto).
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  apply inter_uniquenessH with A B D C; try (intro; apply HNC1); Col; ColHR.
  }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  destruct HCut3 as [_ [_ [E [HI3 HBet2]]]].
  destruct HCut4 as [_ [_ [F [HI4 HBet3]]]].
  assert (HNC4 : ~ ColH A G E).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    intro; apply betH_expand in HBet1; apply betH_expand in HBet2; spliter.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
    apply HNC1; ColHR.
    }
  assert (HD7 : C <> F); [|line C F lCF HD7].
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    apply betH_expand in HBet2; apply betH_expand in HBet3; spliter.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
    intro; subst; apply HNC4; ColHR.
    }
  assert (HNI3 : ~ IncidL E lCF).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    apply betH_expand in HBet1; apply betH_expand in HBet2;
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    apply betH_expand in HBet3; spliter.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
    intro; assert (ColH C E F) by (exists lCF; auto); apply HNC1; ColHR.
    }
  assert (HCut3 : cut lCF A G).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    apply betH_expand in HBet1; apply betH_expand in HBet2;
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    apply betH_expand in HBet3; spliter.
    split; [intro; assert (ColH A C F) by (exists lCF; auto); apply HNC1; ColHR|].
    split; [intro; assert (ColH C F G) by (exists lCF; auto); apply HNC1; ColHR|].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    exists F; auto; split; try apply between_comm; auto.
    }
  destruct (plane_existence A G E HNC4) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  spliter.
  assert (HLP : IncidLP lCF p).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @IncidLP Hi l p *)
  apply (line_on_plane C F); trivial.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_colH in HBet2; spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply (line_on_plane' G E); Col.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_colH in HBet3; spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply (line_on_plane' G A); Col.
  }
  elim (pasch A G E lCF p); trivial; clear dependent p; intro HCut4.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    destruct HCut4 as [_ [_ [I [HI5 HBet4]]]].
    assert (I = D); [|subst].
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
      apply betH_expand in HBet4; spliter.
      apply inter_uniquenessH with C D A E; try intro; subst; Col;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      [|exists lAD]; auto.
      assert (ColH C D F) by (exists lCD; auto).
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
      assert (ColH C F I) by (exists lCF; auto); ColHR.
      }
    assert (HNC5 : ~ ColH A E C)
      by (intro; apply betH_expand in HBet4; spliter; apply HNC1; ColHR).
    assert (HD8 : B <> D) by (intro; subst; apply HNC1; Col).
    line B D lBD HD8; assert (HNI4 : ~ IncidL C lBD)
      by (intro; assert (ColH B C D) by (exists lBD; auto); apply HNC1; ColHR).
    assert (HCut4 : cut lBD A E).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
      apply betH_expand in HBet4; spliter.
      split; [intro; assert (ColH A B D) by (exists lBD; auto); apply HNC1; ColHR|].
      split; [intro; assert (ColH B D E) by (exists lBD; auto); apply HNC1; ColHR|].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      exists D; auto.
      }
    destruct (plane_existence A E C HNC5) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    spliter.
    assert (HLP : IncidLP lBD p).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    apply (line_on_plane B D); trivial.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    apply (line_on_plane' A C); Col.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    apply betH_colH in HBet4; spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    apply (line_on_plane' A E); Col.
    }
    elim (pasch A E C lBD p); trivial; clear dependent p; intro HCut5.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
      destruct HCut5 as [_ [_ [I [HI6 HBet5]]]].
      assert (I = B); [|subst; left; auto].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
      apply betH_expand in HBet5; spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply inter_uniquenessH with A C D B; Col; exists lBD; auto.
      }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
      destruct HCut5 as [_ [_ [I [HI6 HBet5]]]].
      assert (I = G); [|subst].
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
        {
        apply betH_expand in HBet1; apply betH_expand in HBet2;
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
        apply betH_expand in HBet5; spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
        apply inter_uniquenessH with D B C E; Col; try exists lBD; auto.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
        intro; apply HNC1; ColHR.
        }
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
      apply between_only_one' in HBet5; spliter; intuition.
      }
    }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    destruct HCut4 as [_ [_ [I [HI5 HBet4]]]].
    assert (I = C); [|subst].
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
      apply betH_expand in HBet1; apply betH_expand in HBet2;
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
      apply betH_expand in HBet3; apply betH_expand in HBet4; spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply inter_uniquenessH with G E F C; Col; try exists lCF; auto.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
      intro; apply HNC4; ColHR.
      }
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
    apply between_only_one' in HBet4; spliter; intuition.
    }
  }
Qed.

Lemma betH_dec : forall A B C, A <> B -> B <> C -> A <> C -> BetH A B C \/ ~ BetH A B C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: or (@BetH Hi A B C) (not (@BetH Hi A B C)) *)
induction(colH_dec A B C).
(* Goal: or (@BetH Hi A B C) (not (@BetH Hi A B C)) *)
(* Goal: or (@BetH Hi A B C) (not (@BetH Hi A B C)) *)
assert(HH:=between_one A B C H H1 H0 H2).
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
induction HH.
(* Goal: Cong C D C' D' *)
left; assumption.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
induction H3.
(* Goal: or (@BetH Hi A B C) (not (@BetH Hi A B C)) *)
(* Goal: or (@BetH Hi A B C) (not (@BetH Hi A B C)) *)
apply between_only_one' in H3.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: or (@BetH Hi A B C) (not (@BetH Hi A B C)) *)
(* Goal: or (@BetH Hi A B C) (not (@BetH Hi A B C)) *)
apply H4.
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: or (@BetH Hi A B C) (not (@BetH Hi A B C)) *)
(* Goal: or (@BetH Hi A B C) (not (@BetH Hi A B C)) *)
apply between_only_one' in H3.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
apply H2.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
apply between_col in H3.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Lemma cut2_not_cut : forall A B C l, ~ColH A B C -> cut l A B -> cut l A C -> ~cut l B C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: and (not (@IncidL Hi A l)) (not (@IncidL Hi B l)) *)
unfold cut in *.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
destruct H8 as [AB Hab].
destruct H6 as [AC Hac].
destruct H4 as [BC Hbc].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(ColH A AB B /\ ColH A AC C /\ ColH B BC C).
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
repeat split.
apply between_col in H11.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
apply between_col in H9.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
apply between_col in H6.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(ColH AB AC BC).
line_col AB AC BC.


assert(AB <> AC /\ AB <> BC /\ AC <> BC).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
{
apply betH_distincts in H11.
(* Goal: not (@eq (@Point Hi) A B) *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
apply betH_distincts in H9.
apply betH_distincts in H6.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
repeat split;
intro;
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
subst AC.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans A AB); Col.
subst BC.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans B AB); Col.
subst BC.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans C AC); Col.
}
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert(HH:=between_one AB AC BC H16 H17 H18 H15).
assert(HH12:= H11).
assert(HH10:= H9).
assert(HH7:=H6).
apply betH_distincts in HH12.
apply betH_distincts in HH10.
apply betH_distincts in HH7.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
induction HH.

line A C m H24.

assert(~ ColH AB BC B).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
 { intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply H.
   assert(ColH A B BC).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply(colH_trans B AB); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply(colH_trans B BC); Col.
 }

assert(~ IncidL B m).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
line_col A B C.

assert(cut m AB BC).
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
repeat split.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans A AB); Col.
line_col A AB C.

(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
line_col A C BC.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans C BC); Col.

exists AC.

(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
col_line H13 m0.
(* Goal: @ColH Hi E F C' *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
lines_eq m m0.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.

destruct (plane_existence AB BC B H31) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(HH:= pasch AB BC B m p).

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
induction HH; trivial.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
unfold cut in H37.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
destruct H36 as [I H36].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert(HH37:= H37).
apply between_col in HH37.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
assert(ColH A I B).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans B AB); Col.
assert(ColH A I C).
line_col A I C.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans A I); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst I.
apply between_only_one' in H37.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
unfold cut in H37.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
destruct H36 as [C' H36].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert(HH38:=H37).
apply between_col in HH38.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(ColH B C C').
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans B BC); Col.
assert(C <> C').
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
subst C'.
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold cut in H33.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
destruct H40 as [I H42].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(I = AC).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(inter_uniquenessH A C AB BC); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans A AB); Col.
line_col A C I.
apply between_col in H41.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst I.
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
clean_duplicated_hyps.
apply between_only_one' in H37.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
apply between_comm in H6.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.

(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans C C'); Col.
line_col C C' A.

apply (line_on_plane A C); trivial.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' AB B); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' B BC); Col.

(********************)

induction H28.

line C B m (sym_not_equal H21).

assert(~ ColH AB AC A).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
assert(ColH A C AB).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans A AC); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans A AB); Col.

(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
assert(~ IncidL A m).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
line_col A B C.

assert(cut m AC AB).
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
repeat split.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans C AC); Col.
line_col C AC B.

(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
line_col B C AB.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans B AB); Col.

exists BC.

(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @IncidL Hi X m *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
col_line H14 m0.
(* Goal: @ColH Hi E F C' *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
lines_eq m m0.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
apply cut_comm in H33.

destruct (plane_existence AB AC A H31) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(HH:= pasch AB AC A m p).

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
induction HH; trivial.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
unfold cut in H37.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
destruct H36 as [B' H36].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert(HH38:=H37).
apply between_col in HH38.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(ColH A B B').
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans A AB); Col.
assert(B <> B').
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
subst B'.
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold cut in H33.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
destruct H40 as [I H42].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(I = BC).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(inter_uniquenessH C B AC AB); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans C AC); Col.
line_col C B I.
apply between_col in H41.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst I.
apply between_only_one' in H37.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
apply between_comm in H11.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.

(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B B'); Col.
line_col B B' C.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
unfold cut in H37.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
destruct H36 as [I H36].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert(HH38:= H37).
apply between_col in HH38.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
assert(ColH C I A).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans A AC); Col.
assert(ColH C I B).
line_col C I B.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans C I); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst I.
apply between_only_one' in H37.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: False *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
apply between_comm in H9.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.

apply (line_on_plane B C); trivial.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' A AB); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' A AC); Col.

line A B m H27.

assert(~ ColH BC AC C).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
assert(ColH B C AC).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans C BC); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans C AC); Col.

(* Goal: or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)) *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
assert(~ IncidL C m).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
line_col A B C.

assert(cut m BC AC).
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
repeat split.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans B BC); Col.
line_col B BC A.

(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
line_col B A AC.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans A AC); Col.

exists AB.

(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
col_line H12 m0.
(* Goal: @ColH Hi E F C' *)
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
lines_eq m m0.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
(* Goal: Cong C D C' D' *)
assumption.

destruct (plane_existence BC AC C H31) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(HH:= pasch BC AC C m p).

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
induction HH; trivial.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
unfold cut in H37.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
destruct H36 as [I H36].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert(HH38:= H37).
apply between_col in HH38.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
assert(ColH B I C).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans C BC); Col.
assert(ColH B I A).
line_col B I A.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B I); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst I.
apply between_only_one' in H37.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.

(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
clear dependent p.
unfold cut in H37.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
destruct H36 as [A' H36].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert(HH38:=H37).
apply between_col in HH38.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(ColH C A A').
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans C AC); Col.
assert(A <> A').
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
subst A'.
(* Goal: @BetH Hi A C D *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @IncidLP Hi m p *)
(* Goal: @BetH Hi A C D *)
(* Goal: @BetH Hi A C D *)
unfold cut in H33.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
destruct H40 as [I H42].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(I = AB).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(inter_uniquenessH B A BC AC); Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B BC); Col.
line_col B A I.
apply between_col in H41.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @IncidLP Hi l p *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
subst I.
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
clean_duplicated_hyps.
apply between_only_one' in H37.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.

(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans A A'); Col.
line_col A A' B.

apply (line_on_plane A B); trivial.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' AC C); Col.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
destruct H14 as [n]; spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' BC C); Col.
Qed.

Lemma strong_pasch : forall A B C l p, ~ ColH A B C ->
       IncidP A p -> IncidP B p -> IncidP C p -> IncidLP l p -> ~ IncidL C l -> cut l A B ->
       cut l A C /\ ~ cut l B C \/ cut l B C /\ ~ cut l A C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: or (and (@cut Hi l A C) (not (@cut Hi l B C))) (and (@cut Hi l B C) (not (@cut Hi l A C))) *)
induction (pasch A B C l p); trivial.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply(cut2_not_cut A B C l); auto.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply(cut2_not_cut B A C l); auto.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H; Col.
(* Goal: @cut Hi l B A *)
apply cut_comm.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Lemma out2_out : forall A B C D, C <> D -> BetH A B C -> BetH A B D -> BetH B C D \/ BetH B D C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: False *)
apply betH_expand in H0.
(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
apply betH_expand in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi B C D) (@BetH Hi B D C) *)
assert(ColH B C D).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans A B); Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_one in H10; auto.
(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
induction H10.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
left; auto.
(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
induction H10.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
Bet.
(* Goal: or (@BetH Hi A C D) (@BetH Hi A D C) *)
assert(ColH A C D).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans A B); Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_one in H11; auto.
(* Goal: @BetH Hi P A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
induction H11.
(* Goal: or (@BetH Hi B C D) (@BetH Hi B D C) *)
(* Goal: or (@BetH Hi B C D) (@BetH Hi B D C) *)
assert(BetH B C D /\ BetH A B D).
(* Goal: Cong C D C' D' *)
apply betH_trans0; assumption.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
Bet.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi B C D) (@BetH Hi B D C) *)
apply between_only_one' in H12.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @BetH Hi P A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
induction H11.
(* Goal: or (@BetH Hi B C D) (@BetH Hi B D C) *)
(* Goal: or (@BetH Hi B C D) (@BetH Hi B D C) *)
assert(BetH B D C /\ BetH A B C).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply betH_trans0; Bet.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
Bet.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi B C D) (@BetH Hi B D C) *)
apply between_only_one' in H12.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi A C D) (@BetH Hi A D C) *)
(* Goal: or (@BetH Hi A C D) (@BetH Hi A D C) *)
apply between_comm in H10.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: or (@BetH Hi B C D) (@BetH Hi B D C) *)
assert(BetH B A C /\ BetH D B C).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply betH_trans0; Bet.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
Bet.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi B C D) (@BetH Hi B D C) *)
apply between_only_one' in H12.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
contradiction.
Qed.

Lemma out2_out1 : forall A B C D, C <> D -> BetH A B C -> BetH A B D -> BetH A C D \/ BetH A D C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: False *)
apply betH_expand in H0.
(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
apply betH_expand in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi A C D) (@BetH Hi A D C) *)
assert(ColH A C D).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(colH_trans A B); Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_one in H10; auto.
(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
induction H10.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
induction H10.
(* Goal: or (@BetH Hi A C D) (@BetH Hi A D C) *)
(* Goal: or (@BetH Hi A C D) (@BetH Hi A D C) *)
apply between_comm in H10.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.

(* Goal: or (@BetH Hi A C D) (@BetH Hi A D C) *)
assert(BetH B A D /\ BetH C B D).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply(betH_trans0 C B A D); Bet.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi A C D) (@BetH Hi A D C) *)
apply between_only_one' in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
contradiction.
Qed.

Lemma betH2_out : forall A B C D, B <> C -> BetH A B D -> BetH A C D -> BetH A B C \/ BetH A C B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: False *)
apply betH_expand in H0.
(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
apply betH_expand in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
assert(ColH A B C).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans A D); Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_one in H10; auto.
(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
induction H10.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
left; auto.
(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
induction H10.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
right; Bet.

(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
assert(BetH C A D /\ BetH C B D).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply(betH_trans C A B D); Bet.
(* Goal: @BetH Hi P A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
induction H11.
(* Goal: or (@BetH Hi A B C) (@BetH Hi A C B) *)
apply between_only_one' in H11.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
contradiction.
Qed.

Lemma segment_construction : forall A B C D,
    exists E, Bet A B E /\ Cong B E C D.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
induction(eq_dec_pointsH C D).
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
subst D.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C C)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
exists B.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
unfold Bet.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: Cong A B B A *)
unfold Cong.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
right; tauto.

(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
destruct (eq_dec_pointsH A B) as [HAB|HAB].
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
- subst.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi B B E) (Cong B E C D)) *)
  elim (other_point_exists B);intros A HBA.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi B B E) (Cong B E C D)) *)
  line B A l HBA.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi B B E) (Cong B E C D)) *)
   assert(HH:= cong_existence' C D l B H H0).
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
   ex_and HH F.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
   ex_and H2 F'.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
   apply betH_expand in H4.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
   spliter.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
   exists F.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
   split.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
   unfold Bet.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    auto.
(* Goal: Cong A B B A *)
   unfold Cong.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   repeat split;auto.
-
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
line A B l HAB.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
assert(HH:= cong_existence' C D l B H H1).
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
ex_and HH F.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
ex_and H2 F'.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
apply betH_expand in H4.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
assert(ColH A F F').
(* Goal: @ColH Hi A F F' *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
line_col A F F'.

(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
induction(eq_dec_pointsH A F).
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
subst F.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
exists F'.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
left; auto.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.

(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
induction (eq_dec_pointsH A F').
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
subst F'.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
exists F.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
left; Bet.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.

(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_one in H11; auto.
(* Goal: @BetH Hi P A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
induction H11.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
exists F'.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @Bet Hi A B F' *)
(* Goal: Cong B F' C D *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
assert(BetH B F A /\ BetH F' B A).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply betH_trans0; Bet.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
Bet.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
Bet.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: @BetH Hi P A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
induction H11.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
exists F.
(* Goal: and (@Bet Hi A B F) (Cong B F C D) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
assert(BetH B F' A /\ BetH F B A).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply betH_trans0; Bet.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
Bet.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.

(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
induction(eq_dec_pointsH A B).
(* Goal: False *)
(* Goal: and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C)) *)
subst B.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
exists F.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right; auto.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.

(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
assert(BetH F' A B \/ BetH F' B A).

(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply(betH2_out F' A B F); Bet.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
assert(BetH F A B \/ BetH F B A).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply(betH2_out F A B F'); Bet.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
induction H15.
(* Goal: or (@BetH Hi A B P) (or (@BetH Hi A P B) (and (not (@eq (@Point Hi) A B)) (@eq (@Point Hi) B P))) *)
induction H16.

(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
assert(BetH A F F' \/ BetH A F' F).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply(out2_out B A F F' H9); Bet.
induction H17;
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
apply between_only_one' in H17.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
apply between_comm in H11.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
exists F.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
Bet.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: or (@BetH Hi A B P) (or (@BetH Hi A P B) (and (not (@eq (@Point Hi) A B)) (@eq (@Point Hi) B P))) *)
induction H16.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
exists F'.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
Bet.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
assert(BetH B F F' \/ BetH B F' F).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply(out2_out A B F F' H9); Bet.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
induction H17.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
apply between_only_one' in H17.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
apply between_only_one' in H17.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@Bet Hi A B E) (Cong B E C D)) *)
apply between_comm in H4.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
Qed.

Lemma lower_dim_e : exists A, exists B, exists C, ~ (Bet A B C \/ Bet B C A \/ Bet C A B).
Proof.
(* Goal: @ex (@Point Hi) (fun A : @Point Hi => @ex (@Point Hi) (fun B : @Point Hi => @ex (@Point Hi) (fun C : @Point Hi => not (or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)))))) *)
assert(HH:=lower_dim_2).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun A : @Point Hi => @ex (@Point Hi) (fun B : @Point Hi => @ex (@Point Hi) (fun C : @Point Hi => not (or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)))))) *)
exists PP.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @ex (@Point Hi) (fun C : @Point Hi => not (or (@Bet Hi (@PP Hi) B C) (or (@Bet Hi B C (@PP Hi)) (@Bet Hi C (@PP Hi) B))))) *)
exists PQ.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => not (or (@Bet Hi (@PP Hi) (@PQ Hi) C) (or (@Bet Hi (@PQ Hi) C (@PP Hi)) (@Bet Hi C (@PP Hi) (@PQ Hi))))) *)
exists PR.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
apply H2.
induction H3;
unfold Bet in H3;
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
induction H3.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
apply between_col in H3.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
induction H3;
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
rewrite H3; Col.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
induction H3.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply between_col in H3; spliter; Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
induction H3; rewrite H3; Col.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
induction H3.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply between_col in H3; spliter; Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
induction H3; rewrite H3; Col.
Qed.

Lemma outH_dec : forall A B C, outH A B C \/ ~outH A B C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
assert(HH:=colH_dec A B C).
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
induction HH.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
induction(eq_dec_pointsH A B).
(* Goal: False *)
(* Goal: and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C)) *)
subst B.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ColH Hi A B C *)
unfold outH in H0.
(* Goal: @ColH Hi A B C *)
induction H0.
(* Goal: False *)
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
apply betH_distincts in H0.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ColH Hi A B C *)
induction H0.
(* Goal: False *)
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
apply betH_distincts in H0.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
induction(eq_dec_pointsH A C).
(* Goal: @ColH Hi A B C *)
subst C.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
unfold outH in H1.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
induction H1.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
apply betH_distincts in H1.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
induction H1.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
apply betH_distincts in H1.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C)) *)
subst B.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
induction(eq_dec_pointsH B C).
(* Goal: @ColH Hi A B C *)
subst C.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right; right.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.

(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_one in H; auto.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
left; auto.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
right; left.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
Bet.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
unfold outH in H3.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
induction H3.
(* Goal: False *)
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
apply between_only_one' in H.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
induction H3.
(* Goal: False *)
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
apply between_only_one' in H.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
apply betH_distincts in H.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi A B C *)
unfold outH in H0.
(* Goal: @ColH Hi A B C *)
induction H0.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H0.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ColH Hi A B C *)
induction H0.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi A B C *)
subst C.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
Qed.

Lemma out_construction : forall A B X Y, X <> Y -> A <> B -> exists C, CongH A C X Y /\ (outH A B C).
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@CongH Hi A C X Y) (@outH Hi A B C)) *)
line A B l H0.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@CongH Hi A C X Y) (@outH Hi A B C)) *)
assert(HH:=cong_existence' X Y l A H H1).
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
destruct HH as [P].
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@CongH Hi A C X Y) (@outH Hi A B C)) *)
ex_and H3 P'.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@CongH Hi A C X Y) (@outH Hi A B C)) *)
induction(outH_dec A B P).
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
exists P.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @ex (@Point Hi) (fun C : @Point Hi => and (@CongH Hi A C X Y) (@outH Hi A B C)) *)
exists P'.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @outH Hi A B P' *)
line_col A B P'.
(* Goal: @outH Hi A B P' *)
apply betH_expand in H5.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
induction (eq_dec_pointsH B  P').
(* Goal: @outH Hi A B P' *)
(* Goal: @outH Hi A B P' *)
subst P'.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right; right.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_one in H9; auto.
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
induction H9.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
induction H9.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
right; left.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
Bet.
(* Goal: @outH Hi A B P' *)
apply False_ind.
(* Goal: False *)
induction(eq_dec_pointsH B P).
(* Goal: False *)
(* Goal: False *)
subst P.
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
apply H8.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right; right; auto.
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
apply H8.
(* Goal: @outH Hi A C D *)
(* Goal: @outH Hi A C D *)
unfold outH.
(* Goal: or (@BetH Hi A B P) (or (@BetH Hi A P B) (and (not (@eq (@Point Hi) A B)) (@eq (@Point Hi) B P))) *)
assert(BetH A B P \/ BetH A P B).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply(out2_out P' A B P); Bet.
(* Goal: or (@BetH Hi A B P) (or (@BetH Hi A P B) (and (not (@eq (@Point Hi) A B)) (@eq (@Point Hi) B P))) *)
induction H16.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
left; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
right; left; auto.
Qed.

Definition Para := fun l m =>
    (~ exists X, IncidL X l /\ IncidL X m) /\ exists p, IncidLP l p /\ IncidLP m p.

Definition ParaP := fun A B C D =>
    forall l m, IncidL A l -> IncidL B l -> IncidL C m -> IncidL D m -> Para l m.

Lemma segment_constructionH : forall A B C D : Point,
 A <> B -> C <> D -> exists E : Point, BetH A B E /\ CongH B E C D.
Proof.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
assert(HH:= segment_construction A B C D).
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
ex_and HH E.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
induction H1.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
induction H2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
exists E.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
subst E.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
apply betH_distincts in H1.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
induction H1.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
subst E.
(* Goal: @ex (@Point Hi) (fun E : @Point Hi => and (@BetH Hi A B E) (@CongH Hi B E C D)) *)
induction H2.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
Qed.

Lemma EqL_dec : forall l m, EqL l m \/ ~EqL l m.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
assert(HH:=two_points_on_line l).
(* Goal: or (@EqL Hi l m) (not (@EqL Hi l m)) *)
ex_and HH A.
(* Goal: or (@EqL Hi l m) (not (@EqL Hi l m)) *)
ex_and p B.
(* Goal: or (@EqL Hi l m) (not (@EqL Hi l m)) *)
induction(IncidL_dec A m).
(* Goal: or (@EqL Hi l m) (not (@EqL Hi l m)) *)
induction(IncidL_dec B m).
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
lines_eq l m.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: or (@EqL Hi l m) (not (@EqL Hi l m)) *)
apply H3.
rewrite <-H4.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: or (@EqL Hi l m) (not (@EqL Hi l m)) *)
induction(IncidL_dec B m).
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
apply H2.
rewrite <-H4.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
rewrite <-H4 in H2.
(* Goal: Cong C D C' D' *)
contradiction.
Qed.

Definition is_line A B l := A <> B /\ IncidL A l /\ IncidL B l.

Lemma cut_exists : forall A l, ~IncidL A l -> exists B, cut l A B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
assert(HH:= two_points_on_line l).
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
ex_and HH X.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
ex_and p Y.

(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
assert(A <> X).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
subst X.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
assert(HH:= between_out A X H3).
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
destruct HH as [P].
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
exists P.
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
apply betH_expand in H4.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I P)) *)
assert(ColH X Y P).
(* Goal: @ColH Hi X Y P *)
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I P)) *)
line_col X Y P.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
assert(ColH A X Y).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans X P); Col.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I P)) *)
unfold ColH in H11.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi A I P)) *)
ex_and H11 m.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
lines_eq l m.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l A P) (@cut Hi l C P)) *)
exists X.
split; auto;
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => @cut Hi l A B) *)
subst X.
Qed.

Lemma outH_col : forall A B C, outH A B C -> ColH A B C.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ColH Hi A B C *)
unfold outH in H.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: @ColH Hi A B C *)
(* Goal: @ColH Hi A B C *)
apply between_col in H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi A B C *)
subst C.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
Qed.

Lemma cut_distinct : forall A B l, cut l A B -> A <> B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @cut Hi l P Y *)
unfold cut in H.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: not (@eq (@Point Hi) A B) *)
ex_and H1 M.
(* Goal: not (@eq (@Point Hi) A B) *)
apply betH_distincts in H2.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
Qed.

Lemma same_side_not_cut : forall A B l, same_side A B l -> ~cut l A B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @same_side Hi A C l *)
unfold same_side in H.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
destruct H as [P].

(****** case ColH P A B ******)
(* Goal: not (@cut Hi l A B) *)
induction(colH_dec P A B).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: and (not (@IncidL Hi A l)) (not (@IncidL Hi B l)) *)
unfold cut in *.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
clean_duplicated_hyps.
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
ex_and H8 M.
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
ex_and H6 N.
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
assert(M <> N).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
subst N.
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
assert(BetH M A B \/ BetH M B A).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply(out2_out P); Bet.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
destruct H3 as [Q []].
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
apply betH_expand in H9.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
destruct H3 as [R []].
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
assert(ColH A B M).
induction H8;
apply between_col in H8;
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
apply betH_expand in H9; spliter.
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
assert(R = M).
(* Goal: @eq (@Point Hi) R M *)
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
line A B m H13.
(* Goal: @eq (@Point Hi) R M *)
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
col_line H0 mm.
(* Goal: @eq (@Point Hi) M N *)
(* Goal: not (@cut Hi l A B) *)
lines_eq m mm.
(* Goal: @eq (@Point Hi) R M *)
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
col_line H14 nn.
(* Goal: @eq (@Point Hi) M N *)
(* Goal: not (@cut Hi l A B) *)
lines_eq m nn.
(* Goal: @eq (@Point Hi) R M *)
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
col_line H10 pp.
(* Goal: @eq (@Point Hi) R M *)
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
lines_eq m pp.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply(inter_incid_uniquenessH P R M l m H7 H17); Col.
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
subst R.
induction H8;
apply between_only_one' in H9;
spliter;
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
assert(A <> B).
(* Goal: not (@eq (@Point Hi) A B) *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
ex_and H3 T.
(* Goal: not (@eq (@Point Hi) A B) *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
apply betH_distincts in H9.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
col_line H0 m.
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
apply H8.
(* Goal: @eq (@Point Hi) M N *)
(* Goal: not (@cut Hi l A B) *)
apply betH_expand in H2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @eq (@Point Hi) M N *)
(* Goal: not (@cut Hi l A B) *)
col_line H16 mm.
(* Goal: @eq (@Point Hi) M N *)
(* Goal: not (@cut Hi l A B) *)
lines_eq m mm.
(* Goal: @eq (@Point Hi) M N *)
(* Goal: not (@cut Hi l A B) *)
apply betH_expand in H6.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @eq (@Point Hi) M N *)
(* Goal: not (@cut Hi l A B) *)
col_line H22 nn.
(* Goal: @eq (@Point Hi) M N *)
(* Goal: not (@cut Hi l A B) *)
lines_eq m nn.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply(inter_incid_uniquenessH P M N l m); auto.

(****** case ~ColH P A B ******)

(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
destruct H.
(* Goal: not (@cut Hi l A B) *)
apply cut_comm in H.
(* Goal: not (@cut Hi l A B) *)
apply cut_comm in H1.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply(cut2_not_cut P A B l); auto.
Qed.

Lemma IncidLP_morphism : forall l m p q, IncidLP l p -> EqL l m -> EqP p q -> IncidLP m q.
Proof.
(* Goal: forall (l m : @Line Hi) (p q : @Plane Hi) (_ : @IncidLP Hi l p) (_ : @EqL Hi l m) (_ : @EqP Hi p q), @IncidLP Hi m q *)
unfold IncidLP.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @IncidP Hi A q *)
apply IncidP_morphism with p.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @IncidL Hi A l *)
(* Goal: @EqP Hi p q *)
apply IncidL_morphism with m.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @EqL Hi m l *)
(* Goal: @EqP Hi p q *)
apply Equivalence.equiv_symmetric_obligation_1 with EqL_Equiv.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Global Instance IncidLP_morphisml : Proper(EqL ==> eq ==> iff) IncidLP.
Proof.
(* Goal: @Proper (forall (_ : @Line Hi) (_ : @Plane Hi), Prop) (@respectful (@Line Hi) (forall _ : @Plane Hi, Prop) (@eq (@Line Hi)) (@respectful (@Plane Hi) Prop (@EqP Hi) iff)) (@IncidLP Hi) *)
apply proper_sym_impl_iff_2.
(* Goal: @Symmetric (@Line Hi) (@EqL Hi) *)
(* Goal: @Symmetric (@Plane Hi) (@eq (@Plane Hi)) *)
(* Goal: @Proper (forall (_ : @Line Hi) (_ : @Plane Hi), Prop) (@respectful (@Line Hi) (forall _ : @Plane Hi, Prop) (@EqL Hi) (@respectful (@Plane Hi) Prop (@eq (@Plane Hi)) Basics.impl)) (@IncidLP Hi) *)
apply (Equivalence.equiv_symmetric EqL_Equiv).
(* Goal: @Symmetric (@Line Hi) (@eq (@Line Hi)) *)
(* Goal: @Symmetric (@Plane Hi) (@EqP Hi) *)
(* Goal: @Proper (forall (_ : @Line Hi) (_ : @Plane Hi), Prop) (@respectful (@Line Hi) (forall _ : @Plane Hi, Prop) (@eq (@Line Hi)) (@respectful (@Plane Hi) Prop (@EqP Hi) Basics.impl)) (@IncidLP Hi) *)
apply eq_Symmetric.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: Basics.impl (@IncidLP Hi x x0) (@IncidLP Hi y y0) *)
subst y0.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @IncidLP Hi x y *)
apply IncidLP_morphism with x x0.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @EqP Hi x0 x0 *)
apply Equivalence.equiv_reflexive_obligation_1, EqP_Equiv.
Defined.

Global Instance IncidLP_morphismr : Proper(eq ==> EqP ==> iff) IncidLP.
Proof.
(* Goal: @Proper (forall (_ : @Line Hi) (_ : @Plane Hi), Prop) (@respectful (@Line Hi) (forall _ : @Plane Hi, Prop) (@eq (@Line Hi)) (@respectful (@Plane Hi) Prop (@EqP Hi) iff)) (@IncidLP Hi) *)
apply proper_sym_impl_iff_2.
(* Goal: @Symmetric (@Line Hi) (@eq (@Line Hi)) *)
(* Goal: @Symmetric (@Plane Hi) (@EqP Hi) *)
(* Goal: @Proper (forall (_ : @Line Hi) (_ : @Plane Hi), Prop) (@respectful (@Line Hi) (forall _ : @Plane Hi, Prop) (@eq (@Line Hi)) (@respectful (@Plane Hi) Prop (@EqP Hi) Basics.impl)) (@IncidLP Hi) *)
apply eq_Symmetric.
(* Goal: @Symmetric (@Plane Hi) (@EqP Hi) *)
(* Goal: @Proper (forall (_ : @Line Hi) (_ : @Plane Hi), Prop) (@respectful (@Line Hi) (forall _ : @Plane Hi, Prop) (@eq (@Line Hi)) (@respectful (@Plane Hi) Prop (@EqP Hi) Basics.impl)) (@IncidLP Hi) *)
apply (Equivalence.equiv_symmetric EqP_Equiv).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @respectful (@Plane Hi) Prop (@EqP Hi) Basics.impl (@IncidLP Hi x) (@IncidLP Hi y) *)
subst y.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @IncidLP Hi x y *)
apply IncidLP_morphism with x x0.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @EqL Hi x x *)
(* Goal: @EqP Hi x0 y *)
apply Equivalence.equiv_reflexive_obligation_1, EqL_Equiv.
(* Goal: Cong C D C' D' *)
assumption.
Defined.

Lemma same_side__plane : forall A B l, same_side A B l ->
  exists p, IncidP A p /\ IncidP B p /\ IncidLP l p.
Proof.
(* Goal: forall (A B : @Point Hi) (l : @Line Hi) (_ : @same_side Hi A B l), @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
unfold same_side, cut.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
destruct H as [P].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
destruct H4 as [X []].
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
destruct (colH_dec A B P).
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
destruct (other_point_on_line X l H4) as [Y []].
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
assert (~ ColH X Y A).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
apply H7.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
destruct H9 as [m]; spliter.
(* Goal: @eq (@Point Hi) X Y *)
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (@IncidLP Hi l p))) *)
apply inter_incid_uniquenessH with A l m; trivial.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
destruct (plane_existence X Y A H9) as [p]; spliter.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
exists p; repeat split.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
apply betH_colH in H5; spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' A P); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' A X); Col.
(* Goal: Cong C D C' D' *)
apply (line_on_plane X Y); assumption.

(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
destruct (plane_existence A B P H6) as [p]; spliter.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidLP Hi l p) (@IncidLP Hi m p)) *)
exists p.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
repeat split.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @IncidLP Hi l p *)
destruct (ncolH_distincts A B P H6).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidLP Hi l p *)
destruct H2 as [Y []].
(* Goal: @IncidLP Hi l p *)
apply (line_on_plane X Y); trivial.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
subst Y.
(* Goal: False *)
(* Goal: @IncidP Hi X p *)
(* Goal: @IncidP Hi Y p *)
apply H6.
(* Goal: @ColH Hi A B P *)
(* Goal: @IncidP Hi X p *)
(* Goal: @IncidP Hi Y p *)
apply betH_colH in H5.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply colH_trans with X P; Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' A P); Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' B P); Col.
Qed.

Lemma same_side_prime__plane : forall A B C D, same_side' A B C D ->
  exists p, IncidP A p /\ IncidP B p /\ IncidP C p /\ IncidP D p.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
destruct H.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
destruct (line_existence C D H) as [l].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
destruct (same_side__plane A B l) as [p]; spliter; auto.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
exists p; repeat split; auto.
Qed.

Lemma cut_same_side_cut : forall P X Y l, cut l P X -> same_side X Y l -> cut l P Y.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @cut Hi l P Y *)
assert(HC := same_side_not_cut X Y l H0).
(* Goal: @cut Hi l P Y *)
induction(eq_dec_pointsH X Y).
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
subst Y.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @cut Hi l P Y *)
assert(HH0:=H).
(* Goal: @cut Hi l P Y *)
unfold cut in H.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @cut Hi l P Y *)
ex_and H3 A.

(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
apply betH_expand in H4.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

(* Goal: @cut Hi l P Y *)
induction(colH_dec P X Y).
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.

(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @BetH Hi P A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
assert(A <> Y).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
subst Y.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
unfold same_side in H0.
(* Goal: False *)
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
ex_and H0 M.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
unfold cut in H11.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
apply betH_expand in H4.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
assert(ColH A X Y).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans P X); Col.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
col_line H16 m.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi P I Y)) *)
(* Goal: @cut Hi l P Y *)
lines_eq l m.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi X I Y)) *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
exists A.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.

(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_one in H9; auto.
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
induction H9.
(* Goal: @BetH Hi P A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
assert(HH:= betH_trans0 P A X Y H4 H9).
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
induction H9.

(* Goal: @BetH Hi P A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
assert(A <> Y).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
subst Y.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
unfold same_side in H0.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
ex_and H0 T.
(* Goal: False *)
(* Goal: @BetH Hi P A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
unfold cut in H10.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @BetH Hi P A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
assert(BetH P A Y \/ BetH P Y A).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply(betH2_out P A Y X H10 H4); Bet.
(* Goal: @BetH Hi P A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
induction H11.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
exfalso.
(* Goal: False *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
apply HC.
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
unfold same_side in H0.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
ex_and H0 T.
(* Goal: not (@IncidL Hi Y l) *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi X I Y)) *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
unfold cut in H12.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi X I Y)) *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
exists A.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @BetH Hi X A Y *)
(* Goal: @BetH Hi P A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
assert(HH:= betH_trans0 P Y A X H11 H4).
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
exfalso.
(* Goal: False *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
apply HC.
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
repeat split; auto.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
unfold same_side in H0.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
ex_and H0 T.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
unfold cut in H11.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi X I Y)) *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
exists A.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @BetH Hi X A Y *)
(* Goal: not (@eq (@Point Hi) P Y) *)
(* Goal: @cut Hi l P Y *)
assert(BetH A P Y /\ BetH X A Y).
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply(betH_trans0 X A P Y); Bet.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
subst Y.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
apply cut_comm in HH0.
(* Goal: Cong C D C' D' *)
contradiction.

(*********case ~ColH P X Y**********)

(* Goal: @cut Hi l P Y *)
assert(~IncidL Y l).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
unfold same_side in H0.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
ex_and H0 T.
(* Goal: False *)
(* Goal: @cut Hi l P Y *)
unfold cut in H11.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
contradiction.

(* Goal: @cut Hi l P Y *)
destruct (plane_existence P X Y H9) as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @cut Hi l P Y *)
induction (pasch P X Y l p); trivial.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: @IncidLP Hi l p *)
assert (IncidP A p) by (apply (line_on_plane' P X); Col).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
destruct (same_side__plane X Y l H0) as [q]; spliter.
(* Goal: @IncidLP Hi l p *)
assert (EqP p q).
(* Goal: @EqP Hi p q *)
(* Goal: @IncidLP Hi l p *)
apply (plane_uniqueness P X Y); trivial.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (line_on_plane' A X); Col.
(* Goal: @IncidLP Hi l p *)
rewrite H18.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

(* Theorem 11 of Hilbert: the angles at the base of an isosceles triangle are congruent *)

Lemma isosceles_congaH : forall A B C, ~ColH A B C -> CongH A B A C -> CongaH A B C A C B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @CongaH Hi A B C A C B *)
apply (cong_5 A B C A C B).
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
intro;apply H;Col.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply congH_sym;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply ncolH_distincts in H;spliter;auto.
(* Goal: @CongaH Hi B A C C A B *)
apply conga_comm.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
intro;apply H;Col.
Qed.

Lemma cong_distincts : forall A B C D, A <> B -> Cong A B C D -> C <> D.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
unfold Cong in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
subst D.
induction H0;
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
Qed.

Lemma cong_sym : forall A B C D, Cong A B C D -> Cong C D A B.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
unfold Cong in *.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
left; intuition.
(* Goal: @CongH Hi C D A B *)
(* Goal: @CongH Hi C D D C *)
apply congH_sym.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
Qed.

Lemma cong_trans : forall A B C D E F, Cong A B C D -> Cong C D E F -> Cong A B E F.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
unfold Cong in *.
induction H;
(* Goal: @ColH Hi A B C *)
induction H0.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
(* Goal: @CongH Hi A B E F *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
apply(cong_pseudo_transitivity C D A B E F).
(* Goal: @CongH Hi C D A B *)
(* Goal: @CongH Hi C D D C *)
apply congH_sym.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
subst D.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C)) *)
subst B.
(* Goal: Cong C D C' D' *)
contradiction.
(* Goal: or (Para l m) (@EqL Hi l m) *)
right.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.
Qed.

Lemma betH_not_congH : forall A B C, BetH A B C ->  ~ CongH A B A C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
apply betH_expand in H.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
apply H2.
(* Goal: @eq (@Point Hi) B C *)
assert(exists P : Point, BetH B A P).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply(between_out B A); auto.
(* Goal: @eq (@Point Hi) B C *)
destruct H5 as [P].
(* Goal: @eq (@Point Hi) B C *)
apply between_comm in H5.
(* Goal: @eq (@Point Hi) B C *)
assert(HB:BetH P A C).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
eapply (betH_trans2 _ _ B); auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply construction_uniqueness with P A; auto.
Qed.

Lemma congH_permlr : forall A B C D, A<>B -> C<>D -> CongH A B C D -> CongH B A D C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @CongH Hi B A D C *)
apply cong_pseudo_transitivity with A B.
(* Goal: @CongH Hi C D D C *)
apply congH_perm.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @CongH Hi A B D C *)
apply cong_pseudo_transitivity with C D.
(* Goal: @CongH Hi C D A B *)
(* Goal: @CongH Hi C D D C *)
apply congH_sym.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @CongH Hi C D D C *)
apply congH_perm.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Lemma congH_perms : forall A B C D,
  A<>B -> C<>D ->
  CongH A B C D ->
 (CongH B A C D /\ CongH A B D C /\ CongH C D A B /\
  CongH D C A B /\ CongH C D B A /\ CongH D C B A /\ CongH B A D C).
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: and (@CongH Hi B A C D) (and (@CongH Hi A B D C) (and (@CongH Hi C D A B) (and (@CongH Hi D C A B) (and (@CongH Hi C D B A) (and (@CongH Hi D C B A) (@CongH Hi B A D C)))))) *)
repeat split;eauto using congH_permlr, congH_perm, cong_pseudo_transitivity.
Qed.

Lemma congH_perml : forall A B C D,
  A <> B -> C <> D -> CongH A B C D ->
  CongH B A C D.
Proof. intros A B C D HD1 HD2 HC; apply congH_perms in HC; spliter; auto. Qed.

Lemma bet_cong3_bet : forall A B C A' B' C', A' <> B' -> B' <> C' -> A' <> C' ->
 BetH A B C -> ColH A' B' C' ->
 CongH A B A' B' -> CongH B C B' C' -> CongH A C A' C' ->
 BetH A' B' C'.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_one in H3; auto.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
induction H3.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: False *)
(* Goal: or (@outH Hi A B C) (not (@outH Hi A B C)) *)
induction H3.
apply between_comm in H3.
(* Goal: @eq (@Point Hi) M N *)
(* Goal: not (@cut Hi l A B) *)
apply betH_expand in H2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert(HH:=segment_constructionH B C B C H8 H8).
ex_and HH B''.

(* Goal: False *)
(* Goal: and (@cut Hi l B P) (@cut Hi l C P) *)
apply betH_expand in H3.
apply betH_expand in H11.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(BetH A B B'' /\ BetH A C B'').
apply(betH_trans A B C B'' H2 H11 ).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert(CongH A B'' A' B').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
     apply(addition A C B'' A' C' B'); auto.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
     apply(colH_trans B C); Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
     apply bet_disjoint; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
     apply bet_disjoint; auto.
     apply(cong_pseudo_transitivity C B); auto using congH_sym, congH_perml, cong_permr.
   }

assert(CongH A B'' A B).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
     apply betH_distincts in H21; spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
     apply (cong_pseudo_transitivity A' B'); apply congH_sym; auto.
   }

assert(~CongH A B A B'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply betH_not_congH; auto.
   }
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
exfalso.
apply H25.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
apply betH_distincts in H21; spliter.
(* Goal: Cong C D C' D' *)
apply congH_sym; assumption.

apply between_comm in H3.
(* Goal: @eq (@Point Hi) M N *)
(* Goal: not (@cut Hi l A B) *)
apply betH_expand in H2.
(* Goal: False *)
(* Goal: and (@cut Hi l B P) (@cut Hi l C P) *)
apply betH_expand in H3.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
clean_duplicated_hyps.
assert(exists E : Point, BetH C A E /\ CongH A E A B).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply(segment_constructionH C A A B); auto.
   }
ex_and H8 B''.
apply betH_expand in H8.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(CongH C B'' C' B').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
     apply(addition C A B'' C' A' B'); auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
     apply bet_disjoint; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
     apply bet_disjoint; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
     apply cong_permr, congH_perml; auto.
     apply (cong_pseudo_transitivity A B); auto using congH_sym.
   }

assert(BetH B A B'' /\ BetH C B B'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
      apply(betH_trans0 C B A B'');
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
      Bet.
   }
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert(~CongH C B C B'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
      apply betH_not_congH.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      assert(HH:=(betH_trans0 C B A B''));auto.
   }
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
exfalso.
apply H23.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
apply betH_distincts in H3; spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply (cong_pseudo_transitivity C' B'); apply congH_sym; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply cong_permr, congH_perml; auto.
Qed.

Lemma betH_congH3_outH_betH : forall A B C A' B' C',
  BetH A B C -> outH A' B' C' -> CongH A C A' C' -> CongH A B A' B' -> BetH A' B' C'.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: False *)
apply betH_expand in H.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @outH Hi A C B *)
unfold outH in *.
(* Goal: @ColH Hi A B C *)
induction H0.
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: @ColH Hi A B C *)
induction H0.
assert(HH:=segment_constructionH A' B' B C).
ex_and HH C''.
apply betH_expand in H7.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
exfalso.
assert(CongH A' C'' A C).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
eapply(addition A' B' C'' A B C); auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply bet_disjoint; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply bet_disjoint; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply congH_sym; auto.
assert(BetH C' B' C'' /\ BetH A' C' C'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply(betH_trans0 A' C' B' C''); auto.
   }
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert(HH:= betH_not_congH A' C' C'' H15).
(* Goal: @CongH Hi C D A B *)
apply HH.
apply(cong_pseudo_transitivity A C); auto using congH_sym.
(* Goal: False *)
apply betH_expand in H0.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: False *)
apply betH_expand in H0.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
tauto.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
subst C'.
assert(HH:=betH_not_congH A B C H).
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
exfalso.
(* Goal: @CongH Hi C D A B *)
apply HH.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply (cong_pseudo_transitivity A' B'); apply congH_sym; auto.
Qed.

Lemma outH_sym : forall A B C,
  A <> C -> outH A B C -> outH A C B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @outH Hi A C B *)
unfold outH in *.
(* Goal: or (@BetH Hi A C B) (or (@BetH Hi A B C) (and (not (@eq (@Point Hi) A C)) (@eq (@Point Hi) C B))) *)
decompose [or] H0;clear H0.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
spliter;subst;auto.
Qed.

Lemma soustraction_betH :
forall A B C A' B' C' : Point,
      BetH A B C ->
      BetH A' B' C' ->
      CongH A B A' B' -> CongH A C A' C' -> CongH B C B' C'.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: False *)
apply betH_expand in H.
(* Goal: False *)
apply betH_expand in H0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
elim (segment_constructionH A' B' B C H3 H8).
intros C1 [HC1 HC2].
assert (CongH A C A' C1).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
assert(HD := betH_distincts _ _ _ HC1); spliter.
apply addition_betH with B B';auto using congH_sym.
elim (between_out B A).
intros X HX.
elim (between_out B' A').
intros X' HX'.
assert (BetH X A C).
 apply (betH_trans2 X A B C);auto using between_comm.
assert (BetH X' A' C1).
 apply (betH_trans2 X' A' B' C1);auto using between_comm.
assert (C'=C1).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 apply construction_uniqueness with X' A'; auto.
 apply (betH_trans2 X' A' B' C'); auto using between_comm.
 apply cong_pseudo_transitivity with A C; auto using congH_sym.
 }
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
subst.
(* Goal: @CongH Hi B C B' D' *)
auto using congH_sym.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
Qed.

Lemma ncolH_expand : forall A B C, ~ ColH A B C -> ~ ColH A B C /\ A <> B /\ B <> C /\ A <> C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: and (not (@eq (@Point Hi) B C)) (not (@eq (@Point Hi) A C)) *)
subst B.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
split; intro;
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
subst C; apply H; Col.
Qed.

Lemma betH_outH__outH : forall A B C D,
  BetH A B C -> outH B C D -> outH A C D.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @outH Hi A C D *)
destruct H0.
(* Goal: @outH Hi A C D *)
(* Goal: @outH Hi A C D *)
unfold outH.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply (betH_trans A B C D);auto.
(* Goal: @outH Hi A C D *)
destruct H0.
(* Goal: @outH Hi A C D *)
(* Goal: @outH Hi A C D *)
unfold outH.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
right;left.
apply between_comm;
apply (betH_trans0 C D B A);auto using between_comm.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter. subst.
(* Goal: @outH Hi A D D *)
apply outH_trivial.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply betH_expand in H;spliter;auto.
Qed.

(** First case of congruence of triangles *)

Lemma th12: forall A B C A' B' C',
  ~ ColH A B C ->
  ~ ColH A' B' C' ->
  CongH A B A' B' ->
  CongH A C A' C' ->
  CongaH B A C B' A' C' ->
  CongaH A B C A' B' C' /\ CongaH A C B A' C' B' /\ CongH B C B' C'.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
repeat split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply cong_5;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply cong_5;auto.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
intro;apply H;Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
intro;apply H0;Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply conga_permlr;auto.
(* Goal: @CongH Hi B C B' C' *)
assert (T:=ncolH_distincts A B C H).
(* Goal: @CongH Hi B C B' C' *)
assert (U:=ncolH_distincts A' B' C' H0).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @CongH Hi B C B' C' *)
elim (out_construction B' C' B C H8 H5).
(* Goal: forall (x : @Point Hi) (_ : and (@CongH Hi B' x B C) (@outH Hi B' C' x)), @CongH Hi B C B' C' *)
intros D' [HD1 HD2].
(* Goal: @CongH Hi B C B' C' *)
destruct (eq_dec_pointsH B' D').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
 subst.
(* Goal: @BetH Hi C' B' x *)
(* Goal: not (@IncidL Hi D' l) *)
(* Goal: not (@IncidL Hi x l) *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
 unfold outH in HD2.
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 destruct HD2.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
 apply betH_expand in H10;intuition.
(* Goal: @CongH Hi B C D' C' *)
 destruct H10.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
 apply betH_expand in H10;intuition.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
 intuition.
 }
(* Goal: @CongH Hi B C B' C' *)
assert (CongaH A B C A' B' C') by ( apply cong_5;auto).

(* Goal: @CongH Hi B C B' C' *)
assert (CongaH B A C B' A' D').
(* Goal: @CongaH Hi B A C B' A' D' *)
(* Goal: @CongH Hi B C B' C' *)
 apply (cong_5 B A C B' A' D').
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
 intro;apply H;Col.
(* Goal: not (@ColH Hi B' A' D') *)
(* Goal: @CongH Hi B A B' A' *)
(* Goal: @CongH Hi B C B' D' *)
(* Goal: @CongaH Hi A B C A' B' D' *)
(* Goal: @CongH Hi B C B' C' *)
 intro;apply H0.
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply outH_col in HD2.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply colH_trans with B' D';Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 apply congH_permlr;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 apply congH_sym;auto.
(* Goal: @CongaH Hi A B C A' B' D' *)
(* Goal: @CongH Hi B C B' C' *)
 apply conga_out_conga with A C A' C'; auto using outH_trivial.

(* Goal: @CongH Hi B C B' C' *)
assert (outH A' C' D').
(* Goal: Cong C D C' D' *)
 apply (cong_4_uniqueness B A C A' C' B' C' D');try assumption.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
intro;apply H0;Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
intro;apply H;Col.

(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply same_side_prime_refl;auto.
(* Goal: @same_side' Hi B C X Y *)
unfold same_side'.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @same_side Hi A C l *)
unfold same_side.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l C' P) (@cut Hi l D' P)) *)
(* Goal: @CongH Hi B C B' C' *)
destruct (between_out D' B').
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 auto.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l C' P) (@cut Hi l D' P)) *)
(* Goal: @CongH Hi B C B' C' *)
exists x.
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
repeat split.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply H0;exists l;auto.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply outH_col in HD2.
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
destruct HD2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
apply betH_expand in H15.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
destruct H23.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
assert (EqL x1 l).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply line_uniqueness with B' x;auto.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
rewrite H26 in *.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
assert (EqL x0 l).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply line_uniqueness with B' D';auto.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
rewrite H27 in *.
(* Goal: False *)
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply H0.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
exists l;auto.
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
exists B'.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @BetH Hi C' B' x *)
(* Goal: not (@IncidL Hi D' l) *)
(* Goal: not (@IncidL Hi x l) *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
unfold outH in HD2.
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
destruct HD2.
(* Goal: @BetH Hi C' B' x *)
(* Goal: @BetH Hi C' B' x *)
(* Goal: not (@IncidL Hi D' l) *)
(* Goal: not (@IncidL Hi x l) *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
apply (betH_trans0 D' C' B' x);auto using between_comm.
(* Goal: @BetH Hi C' B' x *)
(* Goal: not (@IncidL Hi D' l) *)
(* Goal: not (@IncidL Hi x l) *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
destruct H16.
(* Goal: @BetH Hi C' B' x *)
(* Goal: @BetH Hi C' B' x *)
(* Goal: not (@IncidL Hi D' l) *)
(* Goal: not (@IncidL Hi x l) *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
apply between_comm;apply (betH_trans2 x B' D' C');auto using between_comm.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
spliter;subst;auto.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply outH_col in HD2.
(* Goal: False *)
(* Goal: not (@IncidL Hi x l) *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
assert (ColH A' B' D').
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
exists l;auto.
(* Goal: False *)
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply H0.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply (colH_trans B' D' A' B' C');Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply outH_col in HD2.
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
destruct HD2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
apply betH_expand in H15.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
destruct H23.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
assert (EqL x1 l).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply line_uniqueness with B' x;auto.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
rewrite H26 in *.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
assert (EqL x0 l).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply line_uniqueness with B' D';auto.
(* Goal: False *)
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
rewrite H27 in *.
(* Goal: False *)
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply H0.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
exists l;auto.

(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi D' I x)) *)
(* Goal: @CongH Hi B C B' C' *)
exists B'.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.

(* Goal: @CongH Hi B C B' C' *)
assert (C'=D').

(* Goal: @eq (@Point Hi) C' D' *)
(* Goal: @CongH Hi B C B' C' *)
line B' C' lB'C' H5.
(* Goal: @eq (@Point Hi) C' D' *)
(* Goal: @CongH Hi B C B' C' *)
line A' C' lA'C' H6.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply inter_incid_uniquenessH with A' lB'C' lA'C';auto.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply H0.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
exists lB'C';auto.
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply outH_col in HD2.
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
destruct HD2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
assert (EqL x lB'C').
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply line_uniqueness with B' C';auto.
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
rewrite H21 in H20.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply outH_col in H13.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
destruct H13.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
assert (EqL x lA'C').
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply line_uniqueness with A' C';auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
rewrite H20 in H19.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
auto.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
subst.
(* Goal: @CongH Hi B C B' D' *)
auto using congH_sym.
Qed.

Lemma th14: forall A B C D A' B' C' D',
  ~ ColH A B C ->
  ~ ColH A' B' C' ->
  CongaH A B C A' B' C' ->
  BetH A B D ->
  BetH A' B' D' ->
  CongaH C B D C' B' D'.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @eq (@Point Hi) M N *)
(* Goal: not (@cut Hi l A B) *)
apply betH_expand in H2.
(* Goal: False *)
(* Goal: and (@cut Hi l B P) (@cut Hi l C P) *)
apply betH_expand in H3.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @CongH Hi B C B' C' *)
assert (T:=ncolH_distincts A B C H).
(* Goal: @CongH Hi B C B' C' *)
assert (U:=ncolH_distincts A' B' C' H0).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
elim (out_construction B' A' A B);try solve [auto].
intros A'' [HA1 HA2].
elim (out_construction B' C' B C);try solve [auto].
intros C'' [HC1 HC2].
elim (out_construction B' D' B D);try solve [auto].
intros D'' [HD1 HD2].
assert (CongaH B A C B' A'' C'' /\
       CongaH B C A B' C'' A'' /\ CongH A C A'' C'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
  apply (th12 B A C B' A'' C'').
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intro;apply H;Col.
(* Goal: not (@ColH Hi B' A' D') *)
(* Goal: @CongH Hi B A B' A' *)
(* Goal: @CongH Hi B C B' D' *)
(* Goal: @CongaH Hi A B C A' B' D' *)
(* Goal: @CongH Hi B C B' C' *)
  intro;apply H0.
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {

  destruct HA2.
   apply betH_expand in H19.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
   spliter.
  destruct HC2.
   apply betH_expand in H24.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
   spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with B' A'';Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with B' C'';Col.
   destruct H24.
   apply betH_expand in H24.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
   spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with B' A'';Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with B' C'';Col.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
   spliter;subst.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
   exfalso. apply H0.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with B' A'';Col.
  destruct H19.
  apply betH_expand in H19.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  spliter.
  destruct HC2.
     apply betH_expand in H24.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
   spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with B' A'';Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with B' C'';Col.
   destruct H24.
   apply betH_expand in H24.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
   spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with B' A'';Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with B' C'';Col.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
   spliter;subst.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
   exfalso. apply H0.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with B' A'';Col.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
   spliter;subst.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
   exfalso. apply H0.
   destruct HC2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
   apply betH_expand in H20;spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with B' C'';Col.
   destruct H20.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
   apply betH_expand in H20;spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with B' C'';Col.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
   spliter;subst.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with A'' B';Col.
  }
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply outH_expand in HA2; spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply congH_sym; auto.
(* Goal: @CongH Hi B A D C *)
  apply cong_pseudo_transitivity with A B.
(* Goal: @CongH Hi B C B' D' *)
  auto using congH_sym.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply congH_perm; auto.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply outH_expand in HC2; spliter.
(* Goal: @CongH Hi B C B' D' *)
  auto using congH_sym.
(* Goal: @CongaH Hi A B C A' B' D' *)
(* Goal: @CongH Hi B C B' C' *)
  apply conga_out_conga with A C A' C'; auto using outH_trivial.
 }
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert (BetH A'' B' D'')
  by (apply betH_outH2__betH with A' D';auto).
apply betH_expand in H21.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert (CongH A D A'' D'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply addition_betH with B B';auto.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
   apply congH_perms in HA1;intuition.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
   apply congH_perms in HD1;intuition.
 }
assert (~ ColH A C D).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
 intro; apply H; apply colH_trans with A D;Col.
assert (~ ColH A'' C'' D'').
(* Goal: False *)
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 intro; apply H0.
   apply outH_expand in HA2.
   apply outH_expand in HC2.
   apply outH_expand in HD2.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
   spliter;ColHR.
assert (T:=ncolH_distincts A C D H27).
assert (U:=ncolH_distincts A'' C'' D'' H28).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert (CongaH A C D A'' C'' D'' /\
       CongaH A D C A'' D'' C'' /\ CongH C D C'' D'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
(* Goal: Cong C D C' D' *)
  apply (th12 A C D A'' C'' D'');try assumption.
  apply conga_out_conga with C B C'' B'; auto using conga_permlr, outH_trivial.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  unfold outH;left;auto.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
  left.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply betH_outH2__betH with A' D';auto.
 }
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert (~ ColH D B C) by (intro; apply H; ColHR).
assert (~ ColH D'' B' C'').
  apply outH_expand in HA2.
   apply outH_expand in HC2.
   apply outH_expand in HD2.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  intro;apply  H0;spliter;ColHR.
assert (T:=ncolH_distincts D B C H38).
assert (U:=ncolH_distincts D'' B' C'' H39).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
assert (CongaH D B C D'' B' C'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
   apply (cong_5 D B C D'' B' C'').
(* Goal: Cong C D C' D' *)
   assumption.
(* Goal: Cong C D C' D' *)
   assumption.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply congH_perms in HD1;spliter;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply congH_perms in H37;spliter;auto.
   apply conga_out_conga with A C A'' C'';auto using outH_trivial.
(* Goal: @outH Hi A C D *)
(* Goal: @outH Hi A C D *)
   unfold outH.
   right;left;auto using between_comm.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
   right;left.
   apply betH_outH2__betH with D' A';auto using between_comm.
  }
apply conga_permlr.
apply conga_out_conga with D C D'' C'';auto using outH_trivial, outH_sym.
Qed.

Lemma congH_colH_betH: forall A B I,
 A<>B -> A<>I -> B<>I ->
 CongH I A I B ->
 ColH I A B ->
 BetH A I B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_one in H3;auto.
(* Goal: @BetH Hi A I B *)
decompose [or] H3;clear H3.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
- exfalso.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply (betH_not_congH I A B);auto.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
- exfalso.

(* Goal: False *)
  assert (T:=betH_not_congH I B A).
(* Goal: False *)
  apply T; auto using between_comm, congH_sym.
(* Goal: Cong C D C' D' *)
- assumption.
Qed.

Definition cut' A B X Y := X <> Y /\ forall l, IncidL X l -> IncidL Y l -> cut l A B.

Global Instance cut_morphism : Proper(EqL ==> eq ==> eq ==> iff) cut.
Proof.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
subst.
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
unfold cut.
(* Goal: iff (and (not (@IncidL Hi y0 x)) (and (not (@IncidL Hi y1 x)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
rewrite H .
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
intuition.

(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
elim H3;intros I;intros;spliter;exists I;split;try rewrite <- H;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
elim H3;intros I;intros;spliter;exists I;split;try rewrite H;auto.
Defined.

Global Instance same_side_morphism : Proper(eq ==> eq ==> EqL ==> iff) same_side.
Proof.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @same_side Hi A C l *)
unfold same_side.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
subst.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
split;intro.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi x1 y P) (@cut Hi x1 y0 P)) *)
destruct H as [x []].
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi y1 y P) (@cut Hi y1 y0 P)) *)
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi x1 y P) (@cut Hi x1 y0 P)) *)
rewrite H1 in *.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
exists x;split;auto.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi x1 y P) (@cut Hi x1 y0 P)) *)
destruct H as [x []].
rewrite <- H1 in *.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
exists x;split;auto.
Defined.

Lemma plane_separation : forall A B X Y p,
  ~ ColH A X Y -> ~ ColH B X Y ->
  IncidP A p -> IncidP B p -> IncidP X p -> IncidP Y p ->
  cut' A B X Y \/ same_side' A B X Y.
Proof.
(* Goal: forall (A B X Y : @Point Hi) (p : @Plane Hi) (_ : not (@ColH Hi A X Y)) (_ : not (@ColH Hi B X Y)) (_ : @IncidP Hi A p) (_ : @IncidP Hi B p) (_ : @IncidP Hi X p) (_ : @IncidP Hi Y p), or (cut' A B X Y) (@same_side' Hi A B X Y) *)
intros A B X Y p HNC1 HNC2 HAp HBp HXp HYp; assert (HD1 : X <> Y) by (intro; subst; Col).
line X Y l HD1; destruct (cut_exists A l) as [C HC1];
[intro; apply HNC1; exists l; auto|].
elim (eq_dec_pointsH A B); [intro; subst; right; apply same_side_prime_refl;
                            intro; apply HNC1; Col|intro HD2].
(* Goal: or (@cut' Hi A B X Y) (@same_side' Hi A B X Y) *)
assert (HD3 : A <> C) by (apply cut_distinct with l; auto).
(* Goal: or (@cut' Hi A B X Y) (@same_side' Hi A B X Y) *)
elim (eq_dec_pointsH B C).

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
  intro; subst; left; split; auto; intro m; intros.
(* Goal: @cut Hi m A C *)
  destruct HC1 as [HNI1 [HNI2 [I [HI HBet]]]].
(* Goal: and (not (@IncidL Hi C m)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I m) (@BetH Hi A I C))) *)
  split; [apply (line_uniqueness _ Y m l) in H; try rewrite H; auto|].
(* Goal: and (not (@IncidL Hi C m)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I m) (@BetH Hi A I C))) *)
  split; [apply (line_uniqueness _ Y m l) in H; try rewrite H; auto|].
  exists I; split; auto; apply (line_uniqueness _ Y m l) in H;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  auto; rewrite H; auto.
  }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: forall _ : not (@eq (@Point Hi) B C), or (@cut' Hi A B X Y) (@same_side' Hi A B X Y) *)
  intro HD4; elim (colH_dec A C B).

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: forall _ : @ColH Hi A C B, or (@cut' Hi A B X Y) (@same_side' Hi A B X Y) *)
    intro HCol1; assert (HI := HC1); destruct HI as [_ [_ [I [HInc HCol2]]]].
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
    apply between_col in HCol2; assert (HE : ColH A I B) by ColHR.
    apply between_one in HE; auto;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    [|intro; subst; apply HNC1|intro; subst; apply HNC2]; try exists l; auto.
(* Goal: or (@cut' Hi A B X Y) (@same_side' Hi A B X Y) *)
    assert (HNI : ~ IncidL A l) by (intro; apply HNC1; exists l; auto).
    elim HE; clear HE; intro HE; try (elim HE; clear HE; intro HE);
    [left|right; split; auto; intro m; intros;
          apply (line_uniqueness _ Y m l) in H;
          try rewrite H in *; auto;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
          apply out_same_side with I; unfold outH; auto..].
(* Goal: @cut' Hi A B X Y *)
    split; [intro; subst; Col|intro m; intros].
(* Goal: @cut Hi m A B *)
    split; [intro; apply HNC1; exists m; auto|].
(* Goal: and (not (@IncidL Hi B m)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I m) (@BetH Hi A I B))) *)
    split; [intro; apply HNC2; exists m; auto|].
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    exists I; split; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply (line_uniqueness _ Y m l) in H; try rewrite H; auto.
    }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: forall _ : not (@ColH Hi A C B), or (cut' A B X Y) (@same_side' Hi A B X Y) *)
    assert (IncidLP l p) by (apply (line_on_plane X Y); trivial).
(* Goal: forall _ : not (@ColH Hi A C B), or (cut' A B X Y) (@same_side' Hi A B X Y) *)
    assert (IncidP C p).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
(* Goal: @IncidP Hi C p *)
      destruct HC1 as [_ [_ [I [ HI1 HI2]]]].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
      apply betH_colH in HI2; spliter.
(* Goal: @IncidP Hi C p *)
      apply (line_on_plane' A I); trivial.
(* Goal: Cong C D C' D' *)
      apply (line_on_plane X Y l); assumption.
      }
    intro HNC3; elim (pasch A C B l p); auto; intro HC2; try (apply HNC2; exists l; auto); [left|right];
    split; auto; intro m; intros;
    apply (line_uniqueness _ Y m l) in H; try rewrite H;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    try (exists C; split); auto; apply cut_comm; auto.
    }
  }
Qed.

Lemma same_side_comm : forall A B l,
  same_side A B l -> same_side B A l.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: and (not (@IncidL Hi A l)) (not (@IncidL Hi B l)) *)
unfold same_side in *.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
elim H;intros.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l B P) (@cut Hi l A P)) *)
exists x;spliter;split;auto using cut_comm.
Qed.

Lemma same_side_not_incid : forall A B l,
  same_side A B l -> ~ IncidL A l /\ ~ IncidL B l.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: and (not (@IncidL Hi A l)) (not (@IncidL Hi B l)) *)
unfold same_side in *.
(* Goal: and (not (@IncidL Hi A l)) (not (@IncidL Hi B l)) *)
destruct H as [P [HP1 HP2]].
(* Goal: and (not (@IncidL Hi A l)) (not (@IncidL Hi B l)) *)
unfold cut in *.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
spliter;auto.
Qed.

Lemma out_same_side' : forall X Y A B C l , X <> Y ->
  IncidL X l -> IncidL Y l -> IncidL A l -> ~ IncidL B l-> outH A B C ->
  same_side' B C X Y.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @same_side' Hi B C X Y *)
assert(HH:= out_same_side A B C l H2 H3 H4).
(* Goal: @same_side' Hi B C X Y *)
unfold same_side'.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
split; auto.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @same_side Hi B C l0 *)
lines_eq l l0.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Lemma same_side_trans : forall A B C l,
  same_side A B l -> same_side B C l -> same_side A C l.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @same_side Hi A C l *)
unfold same_side in H.
(* Goal: @same_side Hi A C l *)
destruct H as [X [HX1 HX2]].
assert (cut l X C)
 by (apply (cut_same_side_cut X B C l);auto using cut_comm).
(* Goal: @same_side Hi A C l *)
unfold same_side.
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l A P) (@cut Hi l C P)) *)
exists X.
(* Goal: and (@cut Hi l A X) (@cut Hi l C X) *)
split;auto using cut_comm.
Qed.

Lemma colH_IncidL__IncidL : forall A B C l,
 A<>B ->
 IncidL A l ->
 IncidL B l ->
 ColH A B C ->
 IncidL C l.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @IncidL Hi C l *)
elim H2.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi C l *)
assert (EqL l x) by (eauto using line_uniqueness).
(* Goal: @IncidL Hi C l *)
rewrite H6 in *.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Lemma IncidL_not_IncidL__not_colH :forall A B C l,
 A<>B ->
 IncidL A l ->
 IncidL B l ->
 ~ IncidL C l ->
 ~ ColH A B C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
apply H2.
(* Goal: Cong C D C' D' *)
apply (colH_IncidL__IncidL A B); assumption.
Qed.

Lemma same_side_prime_not_colH : forall A B C D,
 same_side' A B C D -> ~ ColH A C D /\ ~ ColH B C D.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: and (not (@ColH Hi A C D)) (not (@ColH Hi B C D)) *)
unfold same_side' in *.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: and (not (@ColH Hi A C D)) (not (@ColH Hi B C D)) *)
elim (line_existence C D H).
(* Goal: forall (x : @Line Hi) (_ : and (@IncidL Hi C x) (@IncidL Hi D x)), and (not (@ColH Hi A C D)) (not (@ColH Hi B C D)) *)
intros l [HL1 HL2].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
assert (same_side A B l) by auto.
(* Goal: and (not (@ColH Hi A C D)) (not (@ColH Hi B C D)) *)
apply same_side_not_incid in H1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: not (@ColH Hi A C D) *)
(* Goal: not (@ColH Hi B C D) *)
assert (~ ColH C D A).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply IncidL_not_IncidL__not_colH with l;auto.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
intuition Col.
(* Goal: not (@ColH Hi B C D) *)
assert (~ ColH C D B).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply IncidL_not_IncidL__not_colH with l;auto.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
intuition Col.
Qed.

Lemma OS2__TS : forall O X Y Z,
  same_side' Y Z O X -> same_side' X Y O Z -> cut' X Z O Y.
Proof.
(* Goal: forall (O X Y Z : @Point Hi) (_ : @same_side' Hi Y Z O X) (_ : @same_side' Hi X Y O Z), cut' X Z O Y *)
intros O X Y Z HOS1 HOS2.
(* Goal: cut' X Z O Y *)
destruct (between_out Z O) as [Z' HZ']; [unfold same_side' in *; spliter; auto|].
(* Goal: cut' X Z O Y *)
assert (HTS : cut' Y Z' O X).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @cut Hi l Z Z' *)
  assert (HD1 : O <> X) by (unfold same_side' in *; spliter; auto).
(* Goal: @cut Hi l Z Z' *)
  assert (HD2 : O <> Z) by (unfold same_side' in *; spliter; auto).
(* Goal: cut' Y Z' O X *)
  split; [auto|intro l; intros].
  apply cut_comm; apply cut_same_side_cut with Z;
  [|destruct HOS1 as [_ HOS1]; apply same_side_comm; apply HOS1; auto].
  destruct (same_side_not_incid Y Z l) as [HNI1 HNI2];
  [destruct HOS1 as [_ HOS1]; apply HOS1; auto|].
(* Goal: @cut Hi l Z' Z *)
  assert (HNC := IncidL_not_IncidL__not_colH O X Z l HD1).
(* Goal: @cut Hi l Z' Z *)
  split; [|split; auto; exists O; split; try apply between_comm; auto].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  intro; apply HNC; auto.
(* Goal: @ColH Hi O X Z *)
  assert (HC1 : ColH O X Z') by (exists l; auto).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  assert (HD3 := betH_distincts _ _ _ HZ'); spliter.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  assert (HC2 := between_col _ _ _ HZ'); ColHR.
  }
split; [destruct (same_side_prime_not_colH _ _ _ _ HOS1) as [HNC _];
        intro; subst; apply HNC; Col|intro l; intros].
(* Goal: @cut Hi l X Z *)
apply cut_comm; apply cut_same_side_cut with Z'.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @cut Hi l Z Z' *)
  assert (HD1 : O <> X) by (unfold same_side' in *; spliter; auto).
(* Goal: @cut Hi l Z Z' *)
  assert (HD2 : O <> Z) by (unfold same_side' in *; spliter; auto).
(* Goal: not (@IncidL Hi Z' l) *)
  destruct (same_side_prime_not_colH _ _ _ _ HOS2) as [_ HNC].
(* Goal: @cut Hi l Z Z' *)
  split; [intro; apply HNC; exists l; auto|].
(* Goal: and (not (@IncidL Hi Z' l)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi Z I Z'))) *)
  assert (HD3 : O <> Y) by (intro; subst; apply HNC; Col).
(* Goal: and (not (@IncidL Hi Z' l)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi Z I Z'))) *)
  split; [intro|exists O; auto].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  assert (HD4 := betH_distincts _ _ _ HZ'); spliter.
(* Goal: False *)
  assert (HC1 : ColH O Y Z') by (exists l; auto).
(* Goal: @outH Hi O X X' *)
  assert (HC2 := between_col _ _ _ HZ').
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  apply HNC; apply between_col in HZ'; ColHR.
  }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @same_side Hi Z' X l *)
  destruct HTS as [HD1 HTS]; line O X m HD1.
(* Goal: @same_side Hi Z' X l *)
  assert (HCut : cut m Y Z') by (apply HTS; auto).
(* Goal: @same_side Hi Z' X l *)
  assert (HX' := HCut); destruct HX' as [HNI1 [HNI2 [X' [HI HBet]]]].
(* Goal: @same_side Hi Z' X l *)
  apply same_side_trans with X'.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply out_same_side with Y; try (right; left); auto.
(* Goal: not (@IncidL Hi Z' l) *)
    destruct (same_side_prime_not_colH _ _ _ _ HOS2) as [_ HNC].
(* Goal: False *)
    intro; assert (HC1 : ColH O Y Z') by (exists l; auto).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    assert (HD3 := betH_distincts _ _ _ HZ'); spliter.
(* Goal: @outH Hi O X X' *)
    assert (HC2 := between_col _ _ _ HZ').
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
    apply HNC; apply between_col in HZ'; ColHR.
    }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @same_side Hi X' X l *)
    assert (HC : ColH O X X') by (exists m; auto).
(* Goal: @same_side Hi X' X l *)
    destruct (same_side_prime_not_colH _ _ _ _ HOS1) as [HNC1 _].
    apply same_side_comm; apply out_same_side with O; auto;
    [intro; apply HNC1; exists l; auto|].
(* Goal: @outH Hi O X X' *)
    elim (eq_dec_pointsH X X'); intro HD2; [subst; apply outH_trivial; auto|].
(* Goal: @outH Hi O X X' *)
    destruct (same_side_prime_not_colH _ _ _ _ HOS2) as [_ HNC2].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    assert (HD3 := betH_distincts _ _ _ HZ'); spliter.
(* Goal: @outH Hi O X X' *)
    assert (HC2 := between_col _ _ _ HZ').
(* Goal: @outH Hi O X X' *)
    assert (HC3 := between_col _ _ _ HBet).
(* Goal: @outH Hi O X X' *)
    elim (eq_dec_pointsH O X'); intro HD3; [subst; exfalso; apply HNC2; ColHR|].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    assert (HC4 := HC); apply between_one in HC; auto.
(* Goal: @outH Hi O X X' *)
    elim HC; clear HC; intro HC; [left; auto|].
(* Goal: @outH Hi O X X' *)
    elim HC; clear HC; intro HFalse; [right; left; apply between_comm; auto|].
(* Goal: @outH Hi O X X' *)
    assert (HD4 : O <> Z) by auto; line O Z o HD4.
    assert (HOS3 : same_side X Y o)
      by (destruct HOS2 as [_ HOS]; apply HOS; auto).
(* Goal: @outH Hi O X X' *)
    exfalso; apply (same_side_not_cut _ _ _ HOS3).
(* Goal: @cut Hi o X Y *)
    apply cut_same_side_cut with X'.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
(* Goal: @cut Hi o X X' *)
      destruct (same_side_prime_not_colH _ _ _ _ HOS1) as [_ HNC3].
(* Goal: @cut Hi o X X' *)
      split; [intro; apply HNC3; exists o; auto|].
(* Goal: and (not (@IncidL Hi X' o)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I o) (@BetH Hi X I X'))) *)
      split;[|exists O; auto].
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
      intro; assert (ColH X' O Z) by (exists o; auto); apply HNC3; ColHR.
      }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
(* Goal: @same_side Hi X' Y o *)
      apply out_same_side with Z'; try (left; apply between_comm; auto).

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
        {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
        destruct HC2 as [p [HI' ]]; spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
        apply (line_uniqueness _ O o) in HI'; auto; rewrite HI'; auto.
        }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
        {
(* Goal: not (@IncidL Hi X' o) *)
        intro; assert (ColH O X' Z) by (exists o; auto).
(* Goal: False *)
        destruct (same_side_prime_not_colH _ _ _ _ HOS2) as [HNC3 _].
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
        apply HNC3; ColHR.
        }
      }
    }
  }
Qed.

Lemma th15: forall H K O L H' K' O' L',
  ~ ColH H O L -> ~ ColH H' O' L' -> ~ ColH K O L -> ~ ColH K' O' L' ->
  ~ ColH H O K -> ~ ColH H' O' K' ->
  (cut' H K O L /\ cut' H' K' O' L') \/ (same_side' H K O L /\ same_side' H' K' O' L') ->
  CongaH H O L H' O' L' -> CongaH K O L K' O' L' ->
  CongaH H O K H' O' K'.
Proof.
assert (th15_aux : forall H K O L H' K' O' L',
                     ~ ColH H O L -> ~ ColH H' O' L' ->
                     ~ ColH K O L -> ~ ColH K' O' L' ->
                     ~ ColH H O K -> ~ ColH H' O' K' ->
                     same_side' H K O L -> same_side' H' K' O' L' ->
                     CongaH H O L H' O' L' -> CongaH K O L K' O' L' ->
                     CongaH H O K H' O' K').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  assert (th15_aux : forall H K O L H' K' O' L',
                       ~ ColH H O L -> ~ ColH H' O' L' ->
                       ~ ColH K O L -> ~ ColH K' O' L' ->
                       ~ ColH H O K -> ~ ColH H' O' K' ->
                       same_side' H K O L -> same_side' H' K' O' L' ->
                       cut' K L O H ->
                       CongaH H O L H' O' L' -> CongaH K O L K' O' L' ->
                       CongaH H O K H' O' K').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    intros H K O L H' K' O' L' HNC1 HNC2 HNC3 HNC4 HNC5 HNC6.
    intros HOS1 HOS2 HCut' HConga1 HConga2.
    destruct (out_construction O' K' O K) as [K'' [HCong1 Hout1]];
    try (intro; subst; Col).
    destruct (out_construction O' L' O L) as [L'' [HCong2 Hout2]];
    try (intro; subst; Col).
    apply (conga_out_conga _ _ _ _ _ _ K L K'' L'') in HConga2; auto;
    try apply outH_sym; try apply outH_trivial; auto; try (intro; subst; Col).
    assert (HD1 : O <> H) by (intro; subst; Col).
    line O H l HD1; assert (HCut : cut l K L)
      by (destruct HCut' as [_ HCut]; apply HCut; auto).
    destruct HCut as [HNI1 [HNI2 [I [HI HBet1]]]].
    assert (HD2 : O <> I)
      by (intro; subst; apply HNC3; apply between_col; auto).
    assert (HI' : exists I',
                    O' <> I' /\ I' <> L'' /\
                    outH O H I /\ outH O' H' I' /\
                    ColH O' I' H' /\ CongH O' I' O I /\
                    CongaH I O L I' O' L'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
      assert (outH O I H).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
        {
        assert (HE : ColH O I H) by (exists l; auto).
        elim (eq_dec_pointsH H I); intro HD3;
        [subst; apply outH_trivial; auto|].
        apply between_one in HE; auto;
        elim HE; clear HE; intro HE; [left; auto|].
        elim HE; clear HE; intro HFalse;
        [right; left; apply between_comm; auto|].
        assert (HD4 : O <> L) by (intro; subst; Col).
        line O L m HD4; destruct HOS1 as [_ HOS1].
        assert (HF : same_side H K m) by (apply HOS1; auto).
        exfalso; apply (same_side_not_cut _ _ _ HF).
        apply cut_same_side_cut with I.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
(* Goal: @cut Hi m A B *)
          split; [intro; apply HNC1; exists m; auto|].
          split; [|exists O; split; try apply between_comm; auto].
          intro; assert (ColH O L I) by (exists m; auto).
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
          apply between_col in HFalse; apply HNC1; ColHR.
          }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
          apply out_same_side with L; try (left; apply between_comm); auto.
          intro; assert (ColH O L I) by (exists m; auto).
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
          apply between_col in HFalse; apply HNC1; ColHR.
          }
        }
      destruct (out_construction O' H' O I) as [I' [HCong3 Hout4]];
      try (intro; subst; Col).
      apply (conga_out_conga _ _ _ _ _ _ I L I' L'') in HConga1; auto;
      try apply outH_sym; try apply outH_trivial;
        auto; try (intro; subst; Col).
      assert (O' <> I') by (apply outH_expand in Hout4; spliter; auto).
      assert (I' <> L'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
        {
        intro; subst; apply same_side_prime_not_colH in HOS2;
        destruct HOS2 as [HNC _]; apply HNC.
        apply outH_expand in Hout2;
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
        apply outH_expand in Hout4; spliter; ColHR.
        }
      exists I'; split; auto; split; auto; split; [apply outH_sym; auto|].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      split; auto; split; try apply outH_col; try apply outH_sym; auto.
      }
    assert (HCol1 : ColH O I H) by (exists l; auto); clear HConga1.
    destruct HI' as [I' [HD3 [HD4 [Hout3 [Hout4 [HCol2 [HCong3 HConga1]]]]]]].
    assert (HT : CongaH O I L O' I' L'' /\ CongaH O L I O' L'' I' /\
                 CongH I L I' L'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
      assert (O <> L) by (intro; subst; Col).
      assert (O' <> L'') by (apply outH_expand in Hout2; spliter; auto).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
      apply outH_expand in Hout2; spliter.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
      apply th12; auto using congH_sym; try intro; [apply HNC1|apply HNC2]; ColHR.
      }
    destruct HT as [_ [HConga3 HCong4]].
    assert (HT : CongaH O K L O' K'' L'' /\ CongaH O L K O' L'' K'' /\
                 CongH K L K'' L'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
      assert (O <> K) by (intro; subst; Col).
      assert (O <> L) by (intro; subst; Col).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
      apply outH_expand in Hout1; apply outH_expand in Hout2; spliter.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
      apply th12; auto using congH_sym; intro; [apply HNC3|apply HNC4]; Col; ColHR.
      }
    destruct HT as [HConga4 [HConga5 HCong5]].
    assert (HBet2 : BetH K'' I' L'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
      assert (Hout5 : outH L'' I' K'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
        {
        assert (O <> K) by (intro; subst; Col).
        assert (O <> L) by (intro; subst; Col).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
        apply outH_expand in Hout1; apply outH_expand in Hout2; spliter.
        apply cong_4_uniqueness with O L K H' O'; auto;
        [intro; apply HNC2; ColHR|intro; apply HNC3; Col| | |].

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
          apply conga_out_conga with O I O' I'; try apply outH_trivial; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
          left; apply between_comm; auto.
          }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
          assert (HD5 : O' <> L'') by auto; line O' L'' m HD5.
          apply out_same_side' with O' m; auto; intro; apply HNC2.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
          assert (ColH O' L'' H') by (exists m; auto); ColHR.
          }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
          split; auto; destruct HOS2 as [_ HOS2]; intro m; intros.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
          assert (HCol3 : ColH O' L' L'') by auto.
          destruct HCol3 as [o [HI1 [HI2 HI3]]]; assert (HEq := HI1).
          apply (line_uniqueness _ L'' m _) in HEq; auto; rewrite HEq.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
          apply same_side_trans with K'; try apply HOS2; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
          apply out_same_side with O'; auto; intro; apply HNC4; exists o; auto.
          }
        }
      apply between_comm; assert (K <> L) by (intro; subst; Col).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
      apply outH_expand in Hout5; apply betH_expand in HBet1; spliter.
      apply betH_congH3_outH_betH with L I K; try apply between_comm;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
        try apply cong_permr, congH_perml; auto.
      }
    assert (HT : CongaH K O I K'' O' I' /\ CongaH K I O K'' I' O' /\
                 CongH O I O' I').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
      assert (K <> O) by (intro; subst; Col).
      apply outH_expand in Hout1; apply outH_expand in Hout2;
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
      apply betH_expand in HBet1; apply betH_expand in HBet2; spliter.
      assert (CongH I' K'' I K)
        by (apply soustraction_betH with L'' L;
            try apply between_comm; auto using congH_sym, cong_permr, congH_perml).
      apply th12; auto using congH_sym, cong_permr, congH_perml;
      try apply conga_out_conga with O L O' L''; try (intro; apply HNC3; ColHR);
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      try (intro; apply HNC4; ColHR); try apply outH_trivial; try (right; left); auto.
      }
    destruct HT as [HConga6 _]; apply conga_permlr.
    apply outH_expand in Hout1; apply outH_expand in Hout3;
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    apply outH_expand in Hout4; spliter.
    apply conga_out_conga with K I K'' I'; try apply outH_trivial;
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    try apply outH_sym; auto; intro; subst; Col.
    }
  intros H K O L H' K' O' L' HNC1 HNC2 HNC3 HNC4 HNC5 HNC6 HOS1 HOS2 HConga1 HConga2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  destruct (same_side_prime__plane H K O L HOS1) as [p]; spliter.
  elim (plane_separation K L O H p); trivial; intro HS;
  [apply th15_aux with L L'; auto| |apply HNC5; Col|apply HNC1; Col].
  apply conga_permlr; apply th15_aux with L L'; try solve[intro; Col]; auto;
  [| |apply OS2__TS; auto]; split; try (intro l ; subst; Col); intros;
  apply same_side_comm; [destruct HOS1 as [_ HOS1]; apply HOS1; auto|].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  destruct HOS2 as [_ HOS2]; apply HOS2; auto.
  }
intros H K O L H' K' O' L' HNC1 HNC2 HNC3 HNC4 HNC5 HNC6 HE HConga1 HConga2.
elim HE; clear HE; intros [HTS1 HTS2]; [|apply th15_aux with L L'; auto].
destruct (between_out H O) as [SH HSH]; [intro; subst; Col|].
destruct (between_out H' O') as [SH' HSH']; [intro; subst; Col|].
assert (HConga3 : CongaH SH O L SH' O' L')
  by (apply conga_permlr; apply th14 with H H'; auto).
assert (HConga4 : CongaH SH O K SH' O' K').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  assert (HD1 := betH_distincts _ _ _ HSH); spliter.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  assert (HD2 := betH_distincts _ _ _ HSH'); spliter.
  assert (HC1 := between_col _ _ _ HSH).
  assert (HC2 := between_col _ _ _ HSH').
  apply th15_aux with L L'; auto;
  try (intro; apply HNC1; ColHR); try (intro; apply HNC2; ColHR);
  try (intro; apply HNC5; ColHR); try (intro; apply HNC6; ColHR).

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    split; [intro; subst; Col|intro l; intros; exists H; split];
    [|destruct HTS1 as [_ HTS1]; apply cut_comm; apply HTS1; auto].
    split; [intro; apply HNC1; assert (ColH O L SH) by (exists l; auto); ColHR|].
    split; [intro; apply HNC1; exists l; auto|
            exists O; split; try apply between_comm; auto].
    }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    split; [intro; subst; Col|intro l; intros; exists H'; split];
    [|destruct HTS2 as [_ HTS2]; apply cut_comm; apply HTS2; auto].
    split; [intro; apply HNC2; assert (ColH O' L' SH') by (exists l; auto); ColHR|].
    split; [intro; apply HNC2; exists l; auto|
            exists O'; split; try apply between_comm; auto].
    }
  }
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
assert (HD1 := betH_distincts _ _ _ HSH); spliter.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
assert (HD2 := betH_distincts _ _ _ HSH'); spliter.
assert (HC1 := between_col _ _ _ HSH).
assert (HC2 := between_col _ _ _ HSH').
apply conga_permlr; apply th14 with SH SH'; try apply between_comm; auto;
intro; try (apply HNC5; ColHR); try (apply HNC6; ColHR).
Qed.

Lemma th17:
 forall X Y Z1 Z2 I,
 ~ ColH X Y Z1 ->
 ~ ColH X Y Z2 ->
 ColH X I Y ->
 BetH Z1 I Z2 ->
 CongH X Z1 X Z2 ->
 CongH Y Z1 Y Z2 ->
 CongaH X Y Z1 X Y Z2.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
induction (colH_dec Y Z1 Z2).
 induction (colH_dec X Z1 Z2).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
(* Goal: @eq (@Point Hi) M N *)
(* Goal: not (@cut Hi l A B) *)
  apply betH_expand in H2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  spliter.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
  exfalso.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  apply H0;ColHR.
 }
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
 assert (CongaH X Z1 Z2 X Z2 Z1)
  by (apply (isosceles_congaH X Z1 Z2);auto).

 apply conga_permlr.
 apply (cong_5 Z1 Y X Z2 Y X).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intro;apply H;Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intro;apply H0;Col.
  apply congH_perms in H4;spliter; auto; try (intro; subst; Col).
  apply congH_perms in H3;spliter; auto; try (intro; subst; Col).
  apply conga_permlr.
  assert (BetH Z1 Y Z2).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
     apply ncolH_distincts in H;
     apply ncolH_distincts in H0;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
     apply congH_colH_betH;apply betH_expand in H2;spliter;auto.
    }
  apply conga_out_conga with X Z2 X Z1;auto using outH_trivial.
  apply ncolH_distincts in H;spliter;auto using outH_trivial.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  unfold outH. right;left;auto.
   apply ncolH_distincts in H0;spliter;auto using outH_trivial.
(* Goal: @outH Hi A C D *)
(* Goal: @outH Hi A C D *)
  unfold outH. right;left;auto using between_comm.
  }
  induction (colH_dec X Z1 Z2).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
 assert (CongaH Y Z1 Z2 Y Z2 Z1)
  by (apply (isosceles_congaH Y Z1 Z2);auto).

 apply conga_permlr.
 apply (cong_5 Z1 Y X Z2 Y X).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intro;apply H;Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intro;apply H0;Col.
  apply congH_perms in H4;spliter; auto; try (intro; subst; Col).
  apply congH_perms in H3;spliter; auto; try (intro; subst; Col).
  assert (BetH Z1 X Z2) by (apply ncolH_distincts in H;
     apply ncolH_distincts in H0;apply congH_colH_betH;apply betH_expand in H2;spliter;auto).
  apply conga_out_conga with Y Z2 Y Z1;auto using outH_trivial.
  apply ncolH_distincts in H;spliter;auto using outH_trivial.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  unfold outH. right;left;auto.
   apply ncolH_distincts in H0;spliter;auto using outH_trivial.
(* Goal: @outH Hi A C D *)
(* Goal: @outH Hi A C D *)
  unfold outH. right;left;auto using between_comm.
  }

assert (CongaH X Z1 Z2 X Z2 Z1)
  by (apply (isosceles_congaH X Z1 Z2);auto).
assert (CongaH Y Z1 Z2 Y Z2 Z1)
  by (apply (isosceles_congaH Y Z1 Z2);auto).
assert (CongaH X Z1 Y X Z2 Y).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  apply th15 with Z2 Z1; auto;
  try solve[intro; apply H5; Col]; try solve[intro; apply H6; Col];
  try solve[intro; apply H; Col]; try solve[intro; apply H0; Col].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  destruct (plane_existence X Y Z1 H) as [p]; spliter.
  assert (IncidP Z2 p).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    apply betH_colH in H2; spliter.
    apply (line_on_plane' Z1 I); trivial.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    apply ncolH_distincts in H; spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    apply (line_on_plane' X Y); Col.
    }
  elim (plane_separation X Y Z1 Z2 p); Col; intro HS; [left|right]; split; auto;
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  destruct HS; split; auto.
  }
apply conga_permlr.
apply (cong_5 Z1 Y X Z2 Y X);auto using conga_permlr, congH_perms.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
 intro;apply H;Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
 intro;apply H0;Col.
 apply congH_perms in H4;spliter; auto; try (intro; subst; Col).
 apply congH_perms in H3;spliter; auto; try (intro; subst; Col).
Qed.

Lemma congaH_existence_congH :
 forall A B C O X P U V : Point,
       U<>V ->
       ~ ColH P O X ->
       ~ ColH A B C ->
       exists Y : Point, CongaH A B C X O Y /\ same_side' P Y O X /\ CongH O Y U V.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
assert (T:=ncolH_distincts A B C H1).
assert (T':=ncolH_distincts P O X H0).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
elim (cong_4_existence A B C O X P); auto.
intros Yaux [HA HB].
assert (O<>Yaux).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  apply same_side_prime_not_colH in HB; destruct HB as [_ HFalse].
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intro; subst O; apply HFalse; Col.
  }
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
elim (out_construction O Yaux U V);auto.
intros Y [HC HD].
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => and (not (@eq (@Point Hi) A B)) (@IncidL Hi B l)) *)
(* Goal: @ex (@Point Hi) (fun B : @Point Hi => and (not (@eq (@Point Hi) A B)) (@IncidL Hi B l)) *)
exists Y.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
apply conga_out_conga with A C X Yaux;auto using outH_trivial.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
 elim (line_existence O X H3).
(* Goal: forall (x : @Line Hi) (_ : and (@IncidL Hi C x) (@IncidL Hi D x)), and (not (@ColH Hi A C D)) (not (@ColH Hi B C D)) *)
 intros l [HL1 HL2].
 assert (same_side Y Yaux l).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply (out_same_side O Y Yaux);auto.
   apply (same_side_prime_not_colH P Yaux O X) in HB.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
   spliter.
   apply outH_expand in HD.
   intro;apply H10.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
   spliter.
   assert (ColH O X Y) by (exists l;auto).
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
   ColHR.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply outH_sym;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply outH_expand in HD;spliter;auto.
  }
(* Goal: @same_side' Hi B C X Y *)
  unfold same_side'.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  split;auto.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
  intros.
  assert (EqL l0 l).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply line_uniqueness with O X;auto.
  rewrite H12.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  unfold same_side' in HB;spliter.
  specialize H14 with l.
  apply same_side_trans with Yaux;auto using same_side_comm.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Lemma th18_aux:
forall A B C A' B' C',
  ~ ColH A B C ->
  ~ ColH A' B' C' ->
  CongH A B A' B' ->
  CongH A C A' C' ->
  CongH B C B' C' ->
  CongaH B A C B' A' C'.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @CongH Hi B C B' C' *)
assert (T:=ncolH_distincts A B C H).
(* Goal: @CongH Hi B C B' C' *)
assert (U:=ncolH_distincts A' B' C' H0).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
elim (congaH_existence_congH C A B A' C' B' A B);try solve [intuition Col].
intros B0 [HA [HB HC]].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
elim (between_out B' C');auto.
intros P HP.
elim (congaH_existence_congH C A B A' C' P A B);try solve [intuition Col].
intros B'' [HA'' [HB'' HC'']].
assert (~ ColH A' C' B0).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
 intro.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
 apply (same_side_prime_not_colH B' B0 A' C');intuition Col.
assert (~ ColH A' C' B'').
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
 intro.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
 apply (same_side_prime_not_colH P B'' A' C');intuition Col.
assert (CongH B C B0 C').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
  apply (th12 A B C A' B0 C').
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intuition Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intuition Col.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply ncolH_expand in H10; spliter.
(* Goal: @CongH Hi B C B' D' *)
  auto using congH_sym.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply conga_permlr;auto.
 }
assert (CongH B C B'' C').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
  apply (th12 A B C A' B'' C').
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intuition Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intuition Col.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply ncolH_expand in H11; spliter.
(* Goal: @CongH Hi B C B' D' *)
  auto using congH_sym.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply conga_permlr;auto.
 }
assert (HA'B'' : A' <> B'') by (apply ncolH_expand in H11; spliter; auto).
assert (HA'B0 : A' <> B0) by (apply ncolH_expand in H10; spliter; auto).
assert (CongH A' B'' A' B0)
  by (apply cong_pseudo_transitivity with A B;auto using congH_sym).
assert (CongH B'' C' B0 C')
  by (apply cong_pseudo_transitivity with B C;auto using congH_sym).
assert (CongH A' B'' A' B')
    by (apply cong_pseudo_transitivity with A B;auto using congH_sym).
assert (CongH B'' C' B' C')
    by (apply cong_pseudo_transitivity with B C;auto using congH_sym).
(* Goal: forall (x : @Line Hi) (_ : and (@IncidL Hi C x) (@IncidL Hi D x)), and (not (@ColH Hi A C D)) (not (@ColH Hi B C D)) *)
elim (line_existence A' C' H6);intros l [HL1 HL2].
assert (cut l B' P).
(* Goal: iff (@cut Hi x y0 y1) (@cut Hi y y0 y1) *)
 { unfold cut.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
   split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   intro;apply H0;exists l;auto.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
   split.
(* Goal: False *)
(* Goal: @IncidL Hi D' lB'C' *)
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   intro; apply H0.
   assert (ColH A' C' P) by (exists l;auto).
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
   apply betH_expand in HP;spliter;ColHR.
(* Goal: Cong C D C' D' *)
   exists C';split;assumption.
 }
assert (cut l B' B'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply (cut_same_side_cut B' P B'' l);auto.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    unfold same_side' in *;spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    specialize H20 with l. auto.
 }
assert (exists I', ColH A' I' C' /\ BetH B' I' B'').
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  { unfold cut in H19;spliter.
    elim H21;intros I' [HI1 HI2].
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
    exists I';split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    exists l;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    auto.
  }
destruct H20 as [I' [HI1' HI2']].
assert (exists I, ColH A' I C' /\ BetH B0 I B'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  assert (cut l B'' B0).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
     apply (cut_same_side_cut B'' B' B0 l).
     auto using cut_comm.
     unfold same_side' in HB.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
     spliter.
     specialize H21 with l.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
     apply H21;auto.
     }
   unfold cut in H20.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
   spliter.
   destruct H22 as [I [HI1 HI2]].
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
   exists I;split.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   exists l;auto.
   auto using between_comm.
  }
destruct H20 as [I [HI1 HI2]].


assert (CongaH C' A' B'' C' A' B0).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 { apply (th17 C' A' B'' B0 I);intuition (Col || auto using between_comm).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply congH_perms in H15;spliter;auto; intro; subst; Col.
 }
assert (CongaH C' A' B'' C' A' B').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 { apply (th17 C' A' B'' B' I');intuition (Col || auto using between_comm).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply congH_perms in H17;spliter;auto;intro;subst;Col.
 }
assert (outH A' B0 B').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
  apply (cong_4_uniqueness C' A' B'' A' B' C' B0 B');try solve [intuition Col].
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply same_side_prime_refl;intuition Col.
 }
  apply conga_permlr; apply conga_out_conga with C B C' B0;auto using outH_trivial.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
 intro;apply betH_expand in HP;spliter;apply H0;ColHR.
Qed.

Lemma th19: forall O A B O1 A1 B1 O2 A2 B2,
 ~ ColH O A B ->
 ~ ColH O1 A1 B1 ->
 ~ ColH O2 A2 B2 ->
 CongaH A O B A1 O1 B1 ->
 CongaH A O B A2 O2 B2 ->
 CongaH A1 O1 B1 A2 O2 B2.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
assert (T1:=ncolH_distincts O A B H).
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
assert (T2:=ncolH_distincts O1 A1 B1 H0).
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
assert (T3:=ncolH_distincts O2 A2 B2 H1).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
elim (out_construction O1 A1 O A);auto.
(* Goal: forall (x : @Point Hi) (_ : and (@CongH Hi O1 x O A) (@outH Hi O1 A1 x)), @CongaH Hi A1 O1 B1 A2 O2 B2 *)
intros A1' [T1 T2].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
elim (out_construction O2 A2 O A);auto.
(* Goal: forall (x : @Point Hi) (_ : and (@CongH Hi O2 x O A) (@outH Hi O2 A2 x)), @CongaH Hi A1 O1 B1 A2 O2 B2 *)
intros A2' [T3 T4].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
elim (out_construction O1 B1 O B);auto.
(* Goal: forall (x : @Point Hi) (_ : and (@CongH Hi O1 x O B) (@outH Hi O1 B1 x)), @CongaH Hi A1 O1 B1 A2 O2 B2 *)
intros B1' [T5 T6].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
elim (out_construction O2 B2 O B);auto.
(* Goal: forall (x : @Point Hi) (_ : and (@CongH Hi O2 x O B) (@outH Hi O2 B2 x)), @CongaH Hi A1 O1 B1 A2 O2 B2 *)
intros B2' [T7 T8].
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
assert (T2' := T2).
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
apply outH_expand in T2'.
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
assert (T4' := T4).
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
apply outH_expand in T4'.
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
assert (T6':=T6).
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
apply outH_expand in T6'.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
assert (T8':=T8).
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
apply outH_expand in T8'.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
assert (CongH A B A1' B1').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
 {
(* Goal: @CongH Hi A B A1' B1' *)
 apply (th12 O A B O1 A1' B1' ).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intro;apply H;Col.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  intro;apply H0;ColHR.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply congH_perms in T1;spliter;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply congH_perms in T5;spliter;auto.
(* Goal: @CongaH Hi A O B A1' O1 B1' *)
  apply conga_out_conga with A B A1 B1;auto using outH_trivial.
 }
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
assert (CongH A B A2' B2').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
{
(* Goal: @CongH Hi A B A2' B2' *)
 apply (th12 O A B O2 A2' B2' ).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intro;apply H;Col.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  intro;apply H1;ColHR.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply congH_perms in T3;spliter;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply congH_perms in T7;spliter;auto.
(* Goal: @CongaH Hi A O B A2' O2 B2' *)
  apply conga_out_conga with A B A2 B2;auto using outH_trivial.
 }
assert (CongH A1' B1' A2' B2')
 by (apply cong_pseudo_transitivity with A B;auto).
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
assert (CongaH A1' O1 B1' A2' O2 B2').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
{
(* Goal: @CongaH Hi A1' O1 B1' A2' O2 B2' *)
 apply (th18_aux O1 A1' B1' O2 A2' B2').
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
 intro;apply H0;ColHR.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
 intro;apply H1;ColHR.
(* Goal: @CongH Hi O1 A1' O2 A2' *)
(* Goal: @CongH Hi O1 B1' O2 B2' *)
(* Goal: @CongH Hi A1' B1' A2' B2' *)
 apply cong_pseudo_transitivity with O A.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 apply congH_perms in T1;spliter;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 apply congH_perms in T3;spliter;auto.
(* Goal: @CongH Hi O1 B1' O2 B2' *)
(* Goal: @CongH Hi A1' B1' A2' B2' *)
 apply cong_pseudo_transitivity with O B.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 apply congH_perms in T5;spliter;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 apply congH_perms in T7;spliter;auto.
(* Goal: Cong C D C' D' *)
 assumption.
}
(* Goal: @CongaH Hi A1 O1 B1 A2 O2 B2 *)
apply conga_out_conga with A1' B1' A2' B2';auto using outH_trivial, outH_sym.
Qed.

Lemma congaH_sym : forall A B C D E F, ~ColH A B C -> ~ColH D E F
                                       -> CongaH A B C D E F -> CongaH D E F A B C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply (th19 B A C); auto.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
intuition Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
intuition Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
intuition Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply conga_refl; auto.
Qed.

Lemma congaH_commr : forall A B C D E F, ~ColH A B C -> ~ColH D E F
                                         -> CongaH A B C D E F -> CongaH A B C F E D.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @CongaH Hi A B C F E D *)
apply(th19 E D F B A C ).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H0; Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H; Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply H0; Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply congaH_sym; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply conga_comm; auto.
Qed.

Lemma cong_preserves_col : forall A B C A' B' C', BetH A B C -> CongH A B A' B' -> CongH B C B' C' -> CongH A C A' C'
                                                   -> ColH A' B' C'.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
induction(colH_dec A' B' C').
(* Goal: Cong C D C' D' *)
assumption.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
exfalso.
(* Goal: False *)
apply betH_expand in H.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert(A' <> C').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
     intro.
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: and (@BetH Hi B C D) (@BetH Hi A B D) *)
(* Goal: @IncidLP Hi l p *)
     subst C'.
(* Goal: False *)
(* Goal: or (@EqL Hi l m) (not (@EqL Hi l m)) *)
     apply H3.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
     Col.
  }

assert(exists C0 : Point, CongH A' C0 A B /\ outH A' C' C0).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply(out_construction A' C' A B); auto.
ex_and H9 B''.
apply outH_expand in H10.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply outH_sym in H10; auto.
assert(BetH A' B'' C').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @CongH Hi B C B' D' *)
      apply(betH_congH3_outH_betH A B C A' B'' C'); auto using congH_sym.
   }

assert(A' <> B').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
      intro.
      subst B'.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      apply H3;Col.
   }

assert(exists E : Point, BetH A' B' E /\ CongH B' E B C).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply(segment_constructionH A' B' B C); auto.
   }
ex_and H16 C''.

(**********)

apply betH_expand in H14.
apply betH_expand in H16.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.

assert(CongH B C B'' C').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @CongH Hi B C B' D' *)
      apply(soustraction_betH A B C A' B'' C'); auto using congH_sym.
   }

assert(CongH A' C'' A' C').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply(addition A' B' C'' A' B'' C'); auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply bet_disjoint; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply bet_disjoint; auto.
      apply (cong_pseudo_transitivity A B); auto using congH_sym.
(* Goal: @CongH Hi B C B' D' *)
      apply (cong_pseudo_transitivity B C); auto using congH_sym.
   }


assert(~ColH A' C'' C').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
      intro.
(* Goal: False *)
(* Goal: or (@EqL Hi l m) (not (@EqL Hi l m)) *)
      apply H3.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      apply (colH_trans A' C''); Col.
   }

assert(CongaH A' C'' C' A' C' C'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply(isosceles_congaH A' C'' C'); auto.
   }

assert(~ ColH B' C'' C').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
      intro.
(* Goal: False *)
(* Goal: or (@EqL Hi l m) (not (@EqL Hi l m)) *)
      apply H3.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
      ColHR.
   }

assert(CongaH B' C'' C' B' C' C'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply(isosceles_congaH B' C'' C'); auto.
(* Goal: @CongH Hi B C B' D' *)
      apply (cong_pseudo_transitivity B C); auto using congH_sym.
   }

assert(CongaH A' C'' C' B' C'' C').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
      apply(conga_out_conga B' C'' C' B' C'' C' A' C' B' C').
      apply conga_refl.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      Col.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
      left.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
      Bet.
(* Goal: or (Para l m) (@EqL Hi l m) *)
      right; right.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      split; auto.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
      apply ncolH_expand in H30;intuition.
(* Goal: or (Para l m) (@EqL Hi l m) *)
      right; right.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      split; auto.
(* Goal: or (Para l m) (@EqL Hi l m) *)
      right; right.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      split; auto.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
      apply ncolH_expand in H30;intuition.
   }

assert(CongaH A' C' C'' B' C' C'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply(th19 C'' A' C'  C' A' C''  C' B' C''); auto.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      intuition Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      intuition Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      intuition Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply(conga_out_conga B' C'' C' B' C' C'' A' C' B' C''); auto.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
      left.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
      Bet.
(* Goal: or (Para l m) (@EqL Hi l m) *)
      right; right.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      split; auto.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
      apply ncolH_expand in H30;intuition.
(* Goal: or (Para l m) (@EqL Hi l m) *)
      right; right.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      split; auto.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
      apply ncolH_expand in H30;intuition.
(* Goal: or (Para l m) (@EqL Hi l m) *)
      right; right.
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      split; auto.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
      apply ncolH_expand in H30;intuition.
   }

assert(outH C' A' B').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
   {
      apply(cong_4_uniqueness A' C' C'' C' B' C'' A' B').
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
      intro.
      apply H30.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      Col.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
      intro.
      apply H28.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      apply congaH_commr; intuition Col.
      apply conga_refl.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      intuition Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      apply congaH_commr; intuition Col.
      assert(C' <> C'').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
         {
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
            intro.
            subst C''.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
            apply H30; Col.
         }
      line C' C'' l H34.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      eapply (out_same_side' C' C'' C'' B' A' l); auto.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
      intro.
      apply H30.
      line_col B' C' C''.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      Col.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
      left.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
      Bet.
      apply same_side_prime_refl.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
      intuition Col.
   }
apply outH_col in H34.
(* Goal: False *)
(* Goal: or (@EqL Hi l m) (not (@EqL Hi l m)) *)
apply H3.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
Col.
Qed.

Lemma cong_preserves_col_stronger : forall A B C A' B' C',
  A <> B -> A <> C -> B <> C ->
  ColH A B C -> CongH A B A' B' -> CongH B C B' C' -> CongH A C A' C' ->
  ColH A' B' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Point Hi) (_ : not (@eq (@Point Hi) A B)) (_ : not (@eq (@Point Hi) A C)) (_ : not (@eq (@Point Hi) B C)) (_ : @ColH Hi A B C) (_ : @CongH Hi A B A' B') (_ : @CongH Hi B C B' C') (_ : @CongH Hi A C A' C'), @ColH Hi A' B' C' *)
intros A B C A' B' C' HD1 HD2 HD3 HCol HCong1 HCong2 HCong3.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
elim (eq_dec_pointsH A' B'); intro HD4; subst; Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
elim (eq_dec_pointsH A' C'); intro HD5; subst; Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
elim (eq_dec_pointsH B' C'); intro HD6; subst; Col.
apply between_one in HCol; auto;
elim HCol; clear HCol; intro HColH; try (elim HColH; clear HColH; intro HBet);
try (rename HCol into HBet); [|apply colH_permut_312|apply colH_permut_231];
[apply cong_preserves_col with A B C|apply cong_preserves_col with B C A|
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 apply cong_preserves_col with C A B]; Bet; apply cong_permr, congH_perml; auto.
Qed.

Lemma betH_congH2__False : forall A B C A' B' C',
  BetH A B C ->
  BetH A' C' B' ->
  CongH A B A' B' ->
  CongH A C A' C' -> False.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: False *)
apply betH_expand in H.
(* Goal: False *)
apply betH_expand in H0.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
elim (segment_constructionH A' B' B C);auto.
(* Goal: forall (x : @Point Hi) (_ : and (@BetH Hi A' B' x) (@CongH Hi B' x B C)), False *)
intros C0 [HA HB].
assert (CongH A' C0 A C)
  by (apply addition_betH with B' B;auto using congH_sym).

assert (BetH A' C' C0)
 by (apply (betH_trans0 A' C' B' C0);auto).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
apply betH_expand in H12; spliter.
assert (CongH A' C' A' C0)
 by (apply cong_pseudo_transitivity with A C;auto using congH_sym).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply (betH_not_congH A' C' C0);auto.
Qed.

Lemma cong_preserves_bet : forall A B C A' B' C', A'<>B' -> B'<>C' -> A'<>C' ->
 BetH A B C -> CongH A B A' B' -> CongH B C B' C' -> CongH A C A' C' ->
 BetH A' B' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Point Hi) (_ : not (@eq (@Point Hi) A' B')) (_ : not (@eq (@Point Hi) B' C')) (_ : not (@eq (@Point Hi) A' C')) (_ : @BetH Hi A B C) (_ : @CongH Hi A B A' B') (_ : @CongH Hi B C B' C') (_ : @CongH Hi A C A' C'), @BetH Hi A' B' C' *)
intros A B C A' B' C' HD1 HD2 HD3 HBet1 HCong1 HCong2 HCong3.
(* Goal: @BetH Hi A' B' C' *)
assert (HCol : ColH A' B' C').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  apply betH_expand in HBet1; spliter;
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply cong_preserves_col_stronger with A B C; Col.
  }
(* Goal: @BetH Hi A' B' C' *)
assert (HElim : outH A' B' C' \/ BetH B' A' C').
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  apply between_one in HCol; auto; elim HCol; clear HCol; intro HCol;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  try (elim HCol; clear HCol; intro); auto; left; [left|right; left]; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply between_comm; auto.
  }
(* Goal: @BetH Hi A' B' C' *)
elim HElim; clear HElim; intro;[apply betH_congH3_outH_betH with A B C; auto|].
exfalso; apply betH_congH2__False with C B A C' B' A';
try apply between_comm; apply betH_expand in HBet1; spliter; auto using cong_permr, congH_perml.
Qed.

Lemma axiom_five_segmentsH:
    forall A A' B B' C C' D D', A<>D -> A'<>D' -> B<>D -> B'<>D' -> C<>D -> C'<>D' ->
    CongH A B A' B' ->
    CongH B C B' C' ->
    CongH A D A' D' ->
    CongH B D B' D' ->
    BetH A B C -> BetH A' B' C' -> A' <> D' ->
    CongH C D C' D'.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
induction (colH_dec A B D).
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: not (@cut Hi l A B) *)
- apply betH_expand in H9.
  apply betH_expand in H10.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  spliter.
(* Goal: Cong C D C' D' *)
  apply between_one in H12; try assumption.
  assert (CongH A C A' C') by (apply addition_betH with B B';assumption).
  decompose [or] H12;clear H12.
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
   assert (BetH A' B' D')
    by (apply cong_preserves_bet with A B D;try assumption).
   assert (HB:BetH A' D' C' \/ BetH A' C' D')
     by (apply (out2_out1 A' B' D' C');auto).
   destruct HB.

    assert (BetH A D C).
       assert (BetH B D C \/ BetH B C D) by ( apply (out2_out A B D C);auto).
       destruct H24.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
       apply ( betH_trans A B D C);auto.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
       exfalso.
(* Goal: Cong C D C' D' *)
       apply betH_congH2__False with B C D B' C' D';try assumption.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
       apply (betH_trans0 A' B' D' C');auto.

(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply congH_permlr; apply betH_expand in H24; spliter; auto.
(* Goal: Cong C D C' D' *)
   apply (soustraction_betH A D C A' D' C');assumption.
      assert (BetH A C D).
        assert (HB:BetH A D C \/ BetH A C D)
     by (apply (out2_out1 A B D C);auto).
     destruct HB.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
     exfalso.
(* Goal: Cong C D C' D' *)
     apply betH_congH2__False with A D C A' D' C';try assumption.
(* Goal: Cong C D C' D' *)
    assumption.
(* Goal: Cong C D C' D' *)
    apply (soustraction_betH A C D A' C' D');assumption.
 }
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  assert (BetH B' D' A').
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply cong_preserves_bet with B D A;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply congH_permlr;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply congH_permlr;auto.
  assert (BetH C D A).
    assert (T:=betH_trans0 A D B C).
    apply between_comm in H23.
    assert (U:=T H23 H9).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply between_comm;auto.
  assert (BetH C' D' A').
    assert (T:=betH_trans0 A' D' B' C').
    apply between_comm in H12.
    assert (U:=T H12 H10).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    spliter.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply between_comm;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply congH_permlr; apply betH_expand in H24; spliter; auto.
  apply (soustraction_betH A D C A' D' C'); auto using between_comm.
  }
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
   assert (BetH B' A' D').
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply cong_preserves_bet with B A D;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply congH_permlr;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply congH_permlr;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   apply congH_permlr;auto.
   assert (BetH C' B' D').
    apply betH_trans2 with A'.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply between_comm;auto.
(* Goal: Cong C D C' D' *)
    assumption.
    apply addition_betH with B B'.
    apply (betH_trans2 C B A D);auto using between_comm.
(* Goal: Cong C D C' D' *)
    assumption.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply congH_permlr;auto.
(* Goal: Cong C D C' D' *)
    assumption.
  }
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
- apply betH_expand in H9;apply betH_expand in H10; spliter.
  assert (~ ColH A' B' D')
    by (intro;apply H12;apply cong_preserves_col_stronger with A' B' D';auto using congH_sym).
  assert (CongaH B A D B' A' D') by (apply th18_aux;assumption).
  assert (CongH A C A' C')
    by (apply addition with B B'; auto using between_col, bet_disjoint).
(* Goal: Cong C D C' D' *)
  apply (th12 A C D  A' C' D');try assumption.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
  intro.
  assert (A<>C) by (apply between_diff with B;auto).
  apply H12.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   apply colH_trans with A C;Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply between_col in H9;Col.
  intro;apply H12.
(* Goal: @CongH Hi B C B' D' *)
  apply cong_preserves_col_stronger with A' B' D';auto using congH_sym.
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  apply betH_expand in H10;spliter;  ColHR.
  assert (T:=ncolH_distincts A B D H12).
  decompose [and] T;clear T.
  apply conga_out_conga with B D B' D';
  unfold outH;intuition idtac.
Qed.

Lemma five_segment :
 forall A A' B B' C C' D D' : Point,
   Cong A B A' B' ->
   Cong B C B' C' ->
   Cong A D A' D' ->
   Cong B D B' D' -> Bet A B C -> Bet A' B' C' -> A <> B -> Cong C D C' D'.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: Cong C D C' D' *)
unfold Bet in H3.
(* Goal: Cong C D C' D' *)
decompose [or and] H3; clear H3.
- unfold Bet in H4;decompose [or and] H4;clear H4.
   apply betH_expand in H6;
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
   apply betH_expand in H3;spliter.
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   unfold Cong in *.
   decompose [or and] H; decompose [or and] H0;
   decompose [or and] H1; decompose [or and] H2; subst; auto using cong_permr, congH_permlr.
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   clean_duplicated_hyps.
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   clear H H0 H1 H2.
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   destruct (eq_dec_pointsH C D).
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
   subst.
(* Goal: or (Para l m) (@EqL Hi l m) *)
   right.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   split;auto.
(* Goal: @eq (@Point Hi) C' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    assert (CongH B' C' B' D').
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply cong_pseudo_transitivity with B D; auto.
(* Goal: @eq (@Point Hi) C' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
     assert (BetH A' B' D').
(* Goal: @BetH Hi A' B' D' *)
(* Goal: @eq (@Point Hi) C' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
       apply cong_preserves_bet with A' B' C';auto using congH_refl.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
         apply cong_pseudo_transitivity with A D;auto.
(* Goal: @CongH Hi A D A' C' *)
(* Goal: @eq (@Point Hi) C' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
        apply addition with B B';auto using bet_disjoint.
(* Goal: Cong C D C' D' *)
    apply construction_uniqueness with A' B';try assumption.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
   left.
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   assert (C'<>D').
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
     intro;subst.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
   assert (CongH B D B C).
    apply cong_pseudo_transitivity with B' D';
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply congH_sym;auto.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    assert (BetH A B D).
    apply  cong_preserves_bet with A' B' D';auto using congH_refl, congH_sym.
(* Goal: False *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    apply H.
(* Goal: @eq (@Point Hi) C D *)
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    apply construction_uniqueness with A B; auto using congH_sym, congH_refl.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   repeat split;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply axiom_five_segmentsH with A A' B B';auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
   left;split;auto.
(* Goal: @CongH Hi C D C' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    apply addition with B B'.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply bet_disjoint;apply between_comm;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply bet_disjoint;apply between_comm;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply congH_permlr;auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply congH_permlr;auto.
(* Goal: Cong C D C' D' *)
   contradiction.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
   subst.
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    exfalso;apply H5.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply cong_identity with B';auto.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
   subst.
(* Goal: Cong C D C' D' *)
    assert (B=C).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply cong_identity with C';auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    subst;auto.
(* Goal: Cong C D C' D' *)
- contradiction.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
- subst.
(* Goal: Cong C D C' D' *)
assert (B'=C').
(* Goal: @eq (@Point Hi) B' C' *)
(* Goal: Cong C D C' D' *)
apply cong_identity with C.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply cong_sym;auto.
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
subst.
(* Goal: Cong C D C' D' *)
assumption.
Qed.

Lemma bet_comm:
  forall (A B C : Point), Bet A B C -> Bet C B A.
Proof.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
unfold Bet.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
destruct H as [|[|]]; Bet.
Qed.

Lemma bet_trans:
 forall A B C D : Point, Bet A B D -> Bet B C D -> Bet A B C.
Proof.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
unfold Bet.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
destruct H as [|[|]]; destruct H0 as [|[|]]; subst; auto.
(* Goal: or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C)) *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
left.
(* Goal: @BetH Hi A B C *)
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
apply between_comm.
(* Goal: @BetH Hi A P' B *)
(* Goal: @outH Hi A B P' *)
apply (betH_trans0 D C B A); Bet.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
exfalso.
(* Goal: False *)
apply (between_diff D C D); trivial.
Qed.

Lemma cong_transitivity :
 forall A B C D E F : Point, Cong A B E F -> Cong C D E F -> Cong A B C D.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: Cong A B C D *)
apply cong_inner_transitivity with E F; auto using cong_sym.
Qed.

Lemma cong_permT :
 forall A B : Point, Cong A B B A.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: Cong A B B A *)
unfold Cong.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
induction (eq_dec_pointsH A B).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
subst;auto.
(* Goal: or (and (@CongH Hi A B B A) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) B A)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) B A)) *)
left;auto using congH_perm.
Qed.

Lemma pasch_general_case:
 forall A B C P Q : Point,
  Bet A P C ->
  Bet B Q C ->
  A <> P ->
  P <> C ->
  B <> Q ->
  Q <> C ->
  ~ (Bet A B C \/ Bet B C A \/ Bet C A B) ->
  exists x : Point, Bet P x B /\ Bet Q x A.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
induction (eq_dec_pointsH A B).
(* Goal: @ex (@Point Hi) (fun x : @Point Hi => and (@Bet Hi P x B) (@Bet Hi Q x A)) *)
- subst.
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
  unfold Bet in *;intuition.
- induction (eq_dec_pointsH B C).
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
  subst;unfold Bet in *;intuition.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  induction (eq_dec_pointsH A C).
(* Goal: iff (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I x) (@BetH Hi y0 I y1))))) (and (not (@IncidL Hi y0 y)) (and (not (@IncidL Hi y1 y)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I y) (@BetH Hi y0 I y1))))) *)
  subst;unfold Bet in *;intuition.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply inner_pasch_aux with C;auto.
(* Goal: not (@ColH Hi B C P) *)
  apply bet_colH in H.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
assert (ColH A B C).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply colH_trans with P C;Col.
(* Goal: False *)
apply H5.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_one in H10;auto.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
unfold Bet.
(* Goal: or (or (@BetH Hi A B C) (or (@eq (@Point Hi) A B) (@eq (@Point Hi) B C))) (or (or (@BetH Hi B C A) (or (@eq (@Point Hi) B C) (@eq (@Point Hi) C A))) (or (@BetH Hi C A B) (or (@eq (@Point Hi) C A) (@eq (@Point Hi) A B)))) *)
intuition (auto using between_comm).
Qed.

Lemma lower_dim_l : ~ (Bet PP PQ PR \/ Bet PQ PR PP \/ Bet PR PP PQ).
Proof.
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
intro.
(* Goal: False *)
apply lower_dim_2.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H; unfold Bet in H; induction H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply between_col in H; Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
induction H; rewrite H; Col.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply between_col in H; Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
induction H; rewrite H; Col.
(* Goal: @ColH Hi (@PP Hi) (@PQ Hi) (@PR Hi) *)
induction H.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply between_col in H; Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
induction H; rewrite H; Col.
Qed.

Lemma ColH_bets : forall A B C, ColH A B C -> Bet A B C \/ Bet B C A \/ Bet C A B.
Proof.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
induction (eq_dec_pointsH A B).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 subst;unfold Bet;auto.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
induction (eq_dec_pointsH B C).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 subst;unfold Bet;auto.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
induction (eq_dec_pointsH A C).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
 subst;unfold Bet;auto.
(* Goal: Cong C D C' D' *)
apply between_one in H;try assumption.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
unfold Bet.
decompose [or] H;auto using between_comm.
Qed.

Global Instance independent_Tarski_neutral_dimensionless_follows_from_Hilbert :
  Gupta_inspired_variant_of_Tarski_neutral_dimensionless_with_decidable_point_equality.
Proof.
exact (Build_Gupta_inspired_variant_of_Tarski_neutral_dimensionless_with_decidable_point_equality
       Point Bet Cong eq_dec_pointsH cong_permT cong_transitivity cong_identity
       segment_construction five_segment
       bet_comm bet_trans pasch_general_case PP PQ PR lower_dim_l).
Defined.

Global Instance H_to_T : Tarski_neutral_dimensionless.
Proof.
(* Goal: Tarski_neutral_dimensionless *)
apply TG_to_T.
Defined.

Global Instance H_to_T_PED :
  Tarski_neutral_dimensionless_with_decidable_point_equality H_to_T.
Proof.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: forall A B : @Tpoint H_to_T, or (@eq (@Tpoint H_to_T) A B) (not (@eq (@Tpoint H_to_T) A B)) *)
apply eq_dec_pointsH.
Defined.


Lemma col_colh : forall A B C, Col A B C <-> ColH A B C.
Proof.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
unfold Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
intros A B C; split; intro HCol.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
destruct HCol as [H|[H|H]]; apply bet_colH in H; Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
apply ColH_bets, HCol.
Qed.

Lemma line_col : forall A B C l, IncidL A l -> IncidL B l -> IncidL C l -> Col A B C.
Proof.
(* Goal: forall (A B C : @Point Hi) (l : @Line Hi) (_ : @IncidL Hi A l) (_ : @IncidL Hi B l) (_ : @IncidL Hi C l), @Col H_to_T A B C *)
intros A B C l HA HB HC.
(* Goal: @Col H_to_T A B C *)
apply col_colh.
(* Goal: Cong C D C' D' *)
exists l; repeat split; assumption.
Qed.

Lemma bet__beth : forall A B C, A <> B -> B <> C -> Bet A B C -> BetH A B C.
Proof.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
intros A B C HAB HBC [|[|]]; try (subst B; exfalso); auto.
Qed.

Lemma coplanar_plane0 : forall A B C D X, ColH A B X -> ColH C D X ->
  exists p, IncidP A p /\ IncidP B p /\ IncidP C p /\ IncidP D p.
Proof.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
intros A B C D X [l] [m]; spliter.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
destruct (other_point_on_line X l) as [Y [HXY ]]; [assumption|].
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
destruct (EqL_dec l m) as [Heq|Hneq].
rewrite <- Heq in *.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
destruct (ncolH_exists X Y HXY) as [Z HNCol].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
destruct (plane_existence X Y Z HNCol) as [p]; spliter.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
assert (Hlp : IncidLP l p) by (apply (line_on_plane X Y); assumption).
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
exists p; repeat split; auto.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
destruct (other_point_on_line X m) as [Z [HXZ ]]; [assumption|].
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
assert (HNCol : ~ ColH X Y Z).
(* Goal: Cong C D C' D' *)
apply IncidL_not_IncidL__not_colH with l; [assumption..|].
(* Goal: Cong C D C' D' *)
intro; apply Hneq, (line_uniqueness X Z); assumption.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
destruct (plane_existence X Y Z HNCol) as [p]; spliter.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
assert (Hlp : IncidLP l p) by (apply (line_on_plane X Y); assumption).
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
assert (Hmp : IncidLP m p) by (apply (line_on_plane X Z); assumption).
(* Goal: and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D'))) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
exists p; repeat split; auto.
Qed.

Lemma coplanar_plane1 : forall A B C D X,
  (Bet A B X \/ Bet B X A \/ Bet X A B) -> (Bet C D X \/ Bet D X C \/ Bet X C D) ->
  exists p, IncidP A p /\ IncidP B p /\ IncidP C p /\ IncidP D p.
Proof.
(* Goal: forall (A B C D X : @Point Hi) (_ : or (@Bet Hi A B X) (or (@Bet Hi B X A) (@Bet Hi X A B))) (_ : or (@Bet Hi C D X) (or (@Bet Hi D X C) (@Bet Hi X C D))), @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
intros A B C D X H1 H2.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
apply coplanar_plane0 with X.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
clear H2; destruct H1 as [|[|]]; Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
clear H1; destruct H2 as [|[|]]; Col.
Qed.

Lemma coplanar_plane : forall A B C D, Coplanar A B C D ->
  exists p, IncidP A p /\ IncidP B p /\ IncidP C p /\ IncidP D p.
Proof.
(* Goal: forall (A B C D : @Tpoint H_to_T) (_ : @Coplanar H_to_T A B C D), @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidP Hi A p) (and (@IncidP Hi B p) (and (@IncidP Hi C p) (@IncidP Hi D p)))) *)
intros A B C D [X [[H1 H2]|[[H1 H2]|[H1 H2]]]].
(* Goal: Cong C D C' D' *)
apply coplanar_plane1 with X; assumption.
(* Goal: Cong C D C' D' *)
destruct (coplanar_plane1 A C B D X) as [p]; [..|spliter; exists p]; repeat split; assumption.
(* Goal: Cong C D C' D' *)
destruct (coplanar_plane1 A D B C X) as [p]; [..|spliter; exists p]; repeat split; assumption.
Qed.

Lemma plane_coplanar : forall A B C D p, IncidP A p -> IncidP B p -> IncidP C p -> IncidP D p ->
  Coplanar A B C D.
Proof.
(* Goal: forall (A B C D : @Point Hi) (p : @Plane Hi) (_ : @IncidP Hi A p) (_ : @IncidP Hi B p) (_ : @IncidP Hi C p) (_ : @IncidP Hi D p), @Coplanar H_to_T A B C D *)
intros A B C D p HA HB HC HD.
(* Goal: @Coplanar H_to_T A B C D *)
destruct (colH_dec A B C) as [HCol|HNCol].
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply col__coplanar, col_colh, HCol.
(* Goal: @Coplanar H_to_T A B C D *)
assert (HAB : A <> B).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  intro; subst; apply HNCol; Col.
(* Goal: @Coplanar H_to_T A B C D *)
assert (HM : exists M, Midpoint M A B).
(* Goal: @ex (@Tpoint H_to_T) (fun M : @Tpoint H_to_T => @Midpoint H_to_T M A B) *)
(* Goal: @Coplanar H_to_T A B C D *)
  apply midpoint_existence.
(* Goal: @Coplanar H_to_T A B C D *)
destruct HM as [M HM].
(* Goal: @Coplanar H_to_T A B C D *)
destruct (midpoint_distinct_1 M A B HAB HM).
(* Goal: @Coplanar H_to_T A B C D *)
destruct HM.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
assert (HM : ColH A B M) by Col.
(* Goal: @Coplanar H_to_T A B C D *)
destruct (eq_dec_pointsH D M) as [|HDM].
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  exists D; subst; left; split; Col.
(* Goal: @Coplanar H_to_T A B C D *)
destruct (line_existence D M HDM) as [l []].
(* Goal: @Coplanar H_to_T A B C D *)
destruct (IncidL_dec A l).
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  destruct HM as [m]; spliter.
(* Goal: @Coplanar H_to_T A B C D *)
(* Goal: @Coplanar H_to_T A B C D *)
  assert (Heq : hilbert_axioms.EqL m l) by (apply (line_uniqueness M A); auto).
(* Goal: @Coplanar H_to_T A B C D *)
(* Goal: @Coplanar H_to_T A B C D *)
  rewrite Heq in *.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  exists A; right; left; split; [|apply line_col with l]; Col.
(* Goal: @Coplanar H_to_T A B C D *)
assert (~ IncidL B l).
(* Goal: not (@IncidL Hi B l) *)
(* Goal: @Coplanar H_to_T A B C D *)
  intro.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  destruct HM as [m]; spliter.
(* Goal: False *)
(* Goal: @Coplanar H_to_T A B C D *)
  assert (Heq : hilbert_axioms.EqL m l) by (apply (line_uniqueness M B); auto).
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  rewrite Heq in *; auto.
(* Goal: @Coplanar H_to_T A B C D *)
destruct (IncidL_dec C l).
(* Goal: @Coplanar H_to_T A B C D *)
(* Goal: @Coplanar H_to_T A B C D *)
  exists M; left; split; [Col|apply line_col with l; assumption].
(* Goal: @Coplanar H_to_T A B C D *)
assert (IncidP M p).
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply (line_on_plane' A B); Col.
(* Goal: @Coplanar H_to_T A B C D *)
destruct (pasch A B C l p) as [HI|HI]; trivial.
- apply (line_on_plane D M); trivial.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
- repeat split; trivial; exists M; split; [|apply bet__beth]; auto.
- destruct HI as [_ [_ [I []]]].
(* Goal: @Coplanar H_to_T A B C D *)
  apply coplanar_trans_1 with I.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    rewrite col_colh; intro HCol; apply HNCol, (colH_trans A I); Col; intro; subst; auto.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    exists I; right; left; split; apply col_colh; Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    exists M; right; right; split; apply col_colh; [exists l|]; Col.
- destruct HI as [_ [_ [I []]]].
(* Goal: @Coplanar H_to_T A B C D *)
  apply coplanar_perm_6, coplanar_trans_1 with I.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    rewrite col_colh; intro HCol; apply HNCol, (colH_trans B I); Col; intro; subst; auto.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    exists I; right; left; split; apply col_colh; Col.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    exists M; right; right; split; apply col_colh; [exists l|]; Col.
Qed.

Lemma pars__para : forall A B C D l m,
  IncidL A l -> IncidL B l -> IncidL C m -> IncidL D m -> Par_strict A B C D -> Para l m.
Proof.
(* Goal: forall (A B C D : @Point Hi) (l m : @Line Hi) (_ : @IncidL Hi A l) (_ : @IncidL Hi B l) (_ : @IncidL Hi C m) (_ : @IncidL Hi D m) (_ : @Par_strict H_to_T A B C D), Para l m *)
intros A B C D l m HA HB HC HD [HAB [HCD [HCop HNI]]].
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: not (@ex (@Point Hi) (fun X : @Point Hi => and (@IncidL Hi X l) (@IncidL Hi X m))) *)
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidLP Hi l p) (@IncidLP Hi m p)) *)
intros [X []].
(* Goal: @ex (@Point Hi) (fun P : @Point Hi => and (@cut Hi l A P) (@cut Hi l C P)) *)
apply HNI; exists X.
(* Goal: Cong C D C' D' *)
rewrite 2 col_colh; split; [exists l|exists m]; repeat split; assumption.
(* Goal: @ex (@Plane Hi0) (fun p : @Plane Hi0 => and (@IncidLP Hi0 l p) (@IncidLP Hi0 m2 p)) *)
apply coplanar_plane in HCop.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
destruct HCop as [p]; spliter.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidLP Hi l p) (@IncidLP Hi m p)) *)
exists p.
(* Goal: Cong C D C' D' *)
split; [apply (line_on_plane A B)|apply (line_on_plane C D)]; assumption.
Qed.

Lemma par__or_eq_para : forall A B C D l m,
  IncidL A l -> IncidL B l -> IncidL C m -> IncidL D m -> Par A B C D -> Para l m \/ EqL l m.
Proof.
(* Goal: forall (A B C D : @Point Hi) (l m : @Line Hi) (_ : @IncidL Hi A l) (_ : @IncidL Hi B l) (_ : @IncidL Hi C m) (_ : @IncidL Hi D m) (_ : @Par H_to_T A B C D), or (Para l m) (@EqL Hi l m) *)
  intros A B C D l m HA HB HC HD [HParS|Heq].
(* Goal: Cong C D C' D' *)
    left; apply (pars__para A B C D); assumption.
(* Goal: or (Para l m) (@EqL Hi l m) *)
  right.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  spliter.
(* Goal: @EqL Hi l m *)
  rewrite col_colh in *.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply (line_uniqueness A B); trivial; apply (colH_IncidL__IncidL C D); Col.
Qed.

End HilbertContext_2.

Ltac out_exists A B X := try match goal with |H : A <> B |- _
                                 => assert(HH:=between_out A B H);auto; destruct HH as [X]
                              end.

Ltac not_on_line A B X :=  try match goal with |H : A <> B |- _
                                 => assert(HH:=ncolH_exists A B H);auto; destruct HH as [X]
                              end.

Hint Resolve betH_trans0 betH_trans1 betH2_out out2_out : bet.

Hint Resolve congH_sym congH_perm congH_perml cong_permr congH_refl
     cong_pseudo_transitivity congH_perms: cong.

Ltac Cong := eauto 3 with cong.

Section HilbertContext_2D.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
Context `{H2D : Hilbert_neutral_2D}.

Lemma plane_separation_2D : forall A B X Y,
  ~ ColH A X Y -> ~ ColH B X Y ->
  cut' A B X Y \/ same_side' A B X Y.
Proof.
(* Goal: forall (A B X Y : @Point Hi) (_ : not (@ColH Hi A X Y)) (_ : not (@ColH Hi B X Y)), or (@cut' Hi A B X Y) (@same_side' Hi A B X Y) *)
intros A B X Y HNC1 HNC2; assert (HD1 : X <> Y) by (intro; subst; Col).
line X Y l HD1; destruct (cut_exists A l) as [C HC1];
[intro; apply HNC1; exists l; auto|].
elim (eq_dec_pointsH A B); [intro; subst; right; apply same_side_prime_refl;
                            intro; apply HNC1; Col|intro HD2].
(* Goal: or (@cut' Hi A B X Y) (@same_side' Hi A B X Y) *)
assert (HD3 : A <> C) by (apply cut_distinct with l; auto).
(* Goal: or (@cut' Hi A B X Y) (@same_side' Hi A B X Y) *)
elim (eq_dec_pointsH B C).

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
  intro; subst; left; split; auto; intro m; intros.
(* Goal: @cut Hi m A C *)
  destruct HC1 as [HNI1 [HNI2 [I [HI HBet]]]].
(* Goal: and (not (@IncidL Hi C m)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I m) (@BetH Hi A I C))) *)
  split; [apply (line_uniqueness _ Y m l) in H; try rewrite H; auto|].
(* Goal: and (not (@IncidL Hi C m)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I m) (@BetH Hi A I C))) *)
  split; [apply (line_uniqueness _ Y m l) in H; try rewrite H; auto|].
  exists I; split; auto; apply (line_uniqueness _ Y m l) in H;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  auto; rewrite H; auto.
  }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: forall _ : not (@eq (@Point Hi) B C), or (@cut' Hi A B X Y) (@same_side' Hi A B X Y) *)
  intro HD4; elim (colH_dec A C B).

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: forall _ : @ColH Hi A C B, or (@cut' Hi A B X Y) (@same_side' Hi A B X Y) *)
    intro HCol1; assert (HI := HC1); destruct HI as [_ [_ [I [HInc HCol2]]]].
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
    apply between_col in HCol2; assert (HE : ColH A I B) by ColHR.
    apply between_one in HE; auto;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    [|intro; subst; apply HNC1|intro; subst; apply HNC2]; try exists l; auto.
(* Goal: or (@cut' Hi A B X Y) (@same_side' Hi A B X Y) *)
    assert (HNI : ~ IncidL A l) by (intro; apply HNC1; exists l; auto).
    elim HE; clear HE; intro HE; try (elim HE; clear HE; intro HE);
    [left|right|right]; try (split; auto; intro m; intros;
                             apply (line_uniqueness _ Y m l) in H;
                             try rewrite H in *; auto;
                             apply out_same_side with I; unfold outH; auto).
(* Goal: @cut' Hi A B X Y *)
    split; [intro; subst; Col|intro m; intros].
(* Goal: @cut Hi m A B *)
    split; [intro; apply HNC1; exists m; auto|].
(* Goal: and (not (@IncidL Hi B m)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I m) (@BetH Hi A I B))) *)
    split; [intro; apply HNC2; exists m; auto|].
(* Goal: and (@eq (@Point Hi) D D) (@eq (@Point Hi) C' D') *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    exists I; split; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply (line_uniqueness _ Y m l) in H; try rewrite H; auto.
    }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    intro HNC3; elim (pasch_2D A C B l); auto; intro HC2; try (apply HNC2; exists l; auto); [left|right];
    split; auto; intro m; intros;
    apply (line_uniqueness _ Y m l) in H; try rewrite H;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    try (exists C; split); auto; apply cut_comm; auto.
    }
  }
Qed.


Lemma col_upper_dim : forall A B C P Q,
  ColH A P Q -> P <> Q -> A <> B -> A <> C -> B <> C ->
  A <> P -> A <> Q -> B <> P -> B <> Q -> C <> P -> C <> Q ->
  CongH A P A Q -> CongH B P B Q -> CongH C P C Q ->
  (Bet A B C \/ Bet B C A \/ Bet C A B).
Proof.
(* Goal: forall (A B C P Q : @Point Hi) (_ : @ColH Hi A P Q) (_ : not (@eq (@Point Hi) P Q)) (_ : not (@eq (@Point Hi) A B)) (_ : not (@eq (@Point Hi) A C)) (_ : not (@eq (@Point Hi) B C)) (_ : not (@eq (@Point Hi) A P)) (_ : not (@eq (@Point Hi) A Q)) (_ : not (@eq (@Point Hi) B P)) (_ : not (@eq (@Point Hi) B Q)) (_ : not (@eq (@Point Hi) C P)) (_ : not (@eq (@Point Hi) C Q)) (_ : @CongH Hi A P A Q) (_ : @CongH Hi B P B Q) (_ : @CongH Hi C P C Q), or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
intros A B C P Q HBet HD1 HD2 HD3 HD4 HD5 HD6 HD7 HD8 HD9 HD10.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
intros HCong1 HCong2 HCong3; apply congH_colH_betH in HBet; auto.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HNC1 : ~ ColH B P Q).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  intro H; apply congH_colH_betH in H; auto.
(* Goal: False *)
  elim (betH2_out P A B Q); auto; intro HBet'.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: False *)
    assert (BetH Q B A) by (destruct (betH_trans0 P A B Q); Bet).
(* Goal: False *)
    apply betH_congH2__False with P A B Q A B; Cong.
    }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: False *)
    assert (BetH Q A B) by (destruct (betH_trans0 P B A Q); Bet).
(* Goal: False *)
    apply betH_congH2__False with P B A Q B A; Cong.
    }
  }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HNC2 : ~ ColH C P Q).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  intro H; apply congH_colH_betH in H; auto.
(* Goal: False *)
  elim (betH2_out P A C Q); auto; intro HBet'.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: False *)
    assert (BetH Q C A) by (destruct (betH_trans0 P A C Q); Bet).
(* Goal: False *)
    apply betH_congH2__False with P A C Q A C; Cong.
    }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: False *)
    assert (BetH Q A C) by (destruct (betH_trans0 P C A Q); Bet).
(* Goal: False *)
    apply betH_congH2__False with P C A Q C A; Cong.
    }
  }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
elim (plane_separation_2D _ _ _ _ HNC1 HNC2); intro HS.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  destruct HS as [_ HCut]; line P Q l HD1.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  assert (HC : cut l B C); [apply HCut; auto|clear HCut; rename HC into HCut].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  destruct HCut as [HNI1 [HNI2 [I [HI HBet']]]].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  assert (HD11 : P <> I).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    intro; subst; assert (HC : ColH B Q C)
      by (apply cong_preserves_col with B I C; Cong).
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
    apply HNC1; apply betH_expand in HBet'; spliter; ColHR.
    }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  assert (HD12 : Q <> I).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    intro; subst; assert (HC : ColH B P C)
      by (apply cong_preserves_col with B I C; auto with cong).
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
    apply HNC1; apply betH_expand in HBet'; spliter; ColHR.
    }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  assert (HC' : ColH P Q I) by (exists l; auto).
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  assert (HConga : CongaH I B P I B Q).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    apply betH_expand in HBet'; apply conga_out_conga with C P C Q;
    try apply outH_trivial; unfold outH; spliter; auto; apply th18_aux; Cong;
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
    intro; [apply HNC1|apply HNC2]; ColHR.
    }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  assert (HCong4 : CongH I P I Q).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    apply betH_expand in HBet'; spliter.
    destruct (th12 B I P B I Q) as [_ [_ ]]; Cong;
    try (intro; apply HNC1; ColHR).
    }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  elim (eq_dec_pointsH A I); intro HD13; [subst; right; right; unfold Bet; Bet|].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  assert (HBet'' : ColH I P Q); Col; clear HC'.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply congH_colH_betH in HBet''; auto.
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
  elim (betH2_out P A I Q); auto; intro HF; exfalso.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: False *)
    assert (BetH Q I A) by (destruct (betH_trans0 P A I Q); Bet).
(* Goal: False *)
    apply betH_congH2__False with P A I Q A I; Cong.
    }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: False *)
    assert (BetH Q A I) by (destruct (betH_trans0 P I A Q); Bet).
(* Goal: False *)
    apply betH_congH2__False with P I A Q I A; Cong.
    }
  }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  assert (HNC3 : ~ ColH P B C).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    intro HC1; assert (H : ColH C P B) by Col; assert (HC2 : ColH B C Q)
      by (apply cong_preserves_col_stronger with B C P; Cong; Col).
(* Goal: False *)
    assert (HBet1 : BetH P B Q) by (apply congH_colH_betH; auto; ColHR).
(* Goal: False *)
    assert (HBet2 : BetH P C Q) by (apply congH_colH_betH; auto; ColHR).
    clear HC1; apply between_one in H; auto; elim H; clear H; intro HBet3;
    [apply between_only_one' in HBet2; destruct HBet2 as [_ HF];
     apply HF; eauto with bet|elim HBet3; clear HBet3; intro HBet3].

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
(* Goal: False *)
      assert (HBet4 : BetH Q C B) by (destruct (betH_trans0 P B C Q); Bet).
(* Goal: False *)
      apply betH_congH2__False with P B C Q B C; Cong.
      }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
(* Goal: False *)
      assert (HBet4 : BetH Q B C) by (destruct (betH_trans0 P C B Q); Bet).
(* Goal: False *)
      apply betH_congH2__False with P C B Q C B; Cong.
      }
    }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  assert (HNC4 : ~ ColH Q B C).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    intro HC1; assert (HC2 : ColH B C P); [|apply HNC3; Col];
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    apply cong_preserves_col_stronger with B C Q; Cong; Col.
    }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  elim (plane_separation_2D _ _ _ _ HNC3 HNC4); intro HS'.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    destruct HS' as [_ HS']; line B C lBC HD4; elim (HS' lBC); auto.
(* Goal: forall (_ : not (@IncidL Hi P lBC)) (_ : and (not (@IncidL Hi Q lBC)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I lBC) (@BetH Hi P I Q)))), or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
    intros _ [_ [I [HI HBet']]].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
    assert (HBet2 : ColH B I C) by (exists lBC; auto).
    apply between_one in HBet2;
    try solve[intro; subst; apply betH_expand in HBet'; spliter; Col].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
    elim HBet2; clear HBet2; intro HBet''.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
      line P Q lPQ HD1; destruct HS as [_ HS]; assert (HS4 : same_side B C lPQ)
        by (apply HS; auto); apply same_side_not_cut in HS4; exfalso; apply HS4.
(* Goal: @cut Hi lPQ A B *)
      split; [intro; apply HNC1; exists lPQ; auto|].
(* Goal: and (not (@IncidL Hi B lPQ)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I lPQ) (@BetH Hi A I B))) *)
      split; [intro; apply HNC2; exists lPQ; auto|].
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I lPQ) (@BetH Hi B I C)) *)
      exists I; split; auto; apply betH_line in HBet'.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      destruct HBet' as [l [HI2 [HI3 HI4] ]]; apply morph with l; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply line_uniqueness with P Q; auto.
      }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
      elim HBet''; clear HBet''; intro HBet''.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
        {
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
        assert (HConga : CongaH P C I Q C I).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
          apply th14 with B B; Bet; apply betH_expand in HBet';
          apply betH_expand in HBet''; spliter;
          assert (HD11 : P <> I) by auto; assert (HD12 : Q <> I) by auto;
          [intro; apply HD11; apply inter_uniquenessH with P Q C B; try intro; Col|
           intro; apply HD12; apply inter_uniquenessH with P Q C B; try intro; Col|].
          apply th18_aux; Cong;
          [intro; apply HD11; apply inter_uniquenessH with P Q C B; try intro; Col|
           intro; apply HD12; apply inter_uniquenessH with P Q C B; try intro; Col].
          }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
        assert (HCong4 : CongH I P I Q).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
          apply betH_expand in HBet'; apply betH_expand in HBet''; spliter.
(* Goal: @CongH Hi I P I Q *)
          destruct (th12 C P I C Q I) as [_ [_ ]]; Cong; try (intro; apply HNC1; ColHR).
          }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
        elim (eq_dec_pointsH A I); intro HD13; [subst; right; left; unfold Bet; Bet|].
        assert (HBet''' : ColH I P Q)
          by (apply betH_expand in HBet'; spliter; Col).
        apply congH_colH_betH in HBet''';
        try solve[apply betH_expand in HBet'; spliter; Col].
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
        elim (betH2_out P A I Q); auto; intro HF; exfalso.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
          apply betH_expand in HBet'; spliter.
(* Goal: False *)
          assert (BetH Q I A) by (destruct (betH_trans0 P A I Q); Bet).
(* Goal: False *)
          apply betH_congH2__False with P A I Q A I; Cong.
          }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
          apply betH_expand in HBet'; spliter.
(* Goal: False *)
          assert (BetH Q A I) by (destruct (betH_trans0 P I A Q); Bet).
(* Goal: False *)
          apply betH_congH2__False with P I A Q I A; Cong.
          }
        }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
        {
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
        assert (HConga : CongaH P B I Q B I).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
          apply th14 with C C; Bet; apply betH_expand in HBet';
          apply betH_expand in HBet''; spliter;
          assert (HD11 : P <> I) by auto; assert (HD12 : Q <> I) by auto;
          [intro; apply HD11; apply inter_uniquenessH with P Q B C; try intro; Col|
           intro; apply HD12; apply inter_uniquenessH with P Q B C; try intro; Col|].
          apply th18_aux; Cong;
          [intro; apply HD11; apply inter_uniquenessH with P Q B C; try intro; Col|
           intro; apply HD12; apply inter_uniquenessH with P Q B C; try intro; Col].
          }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
        assert (HCong4 : CongH I P I Q).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
          apply betH_expand in HBet'; apply betH_expand in HBet''; spliter.
(* Goal: @CongH Hi I P I Q *)
          destruct (th12 B P I B Q I) as [_ [_ ]]; Cong; try (intro; apply HNC1; ColHR).
          }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
        elim (eq_dec_pointsH A I); intro HD13; [subst; left; unfold Bet; Bet|].
        assert (HBet''' : ColH I P Q)
          by (apply betH_expand in HBet'; spliter; Col).
        apply congH_colH_betH in HBet''';
        try solve[apply betH_expand in HBet'; spliter; Col].
(* Goal: or (@BetH Hi A D C) (or (@eq (@Point Hi) A D) (@eq (@Point Hi) D C)) *)
        elim (betH2_out P A I Q); auto; intro HF; exfalso.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
          apply betH_expand in HBet'; spliter.
(* Goal: False *)
          assert (BetH Q I A) by (destruct (betH_trans0 P A I Q); Bet).
(* Goal: False *)
          apply betH_congH2__False with P A I Q A I; Cong.
          }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
          {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
          apply betH_expand in HBet'; spliter.
(* Goal: False *)
          assert (BetH Q A I) by (destruct (betH_trans0 P I A Q); Bet).
(* Goal: False *)
          apply betH_congH2__False with P I A Q I A; Cong.
          }
        }
      }
    }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    assert (H : outH B P Q);
    [|apply outH_expand in H; spliter; exfalso; apply HNC1; Col].
    apply cong_4_uniqueness with C B P P C; try apply conga_refl;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    try apply same_side_prime_refl; try (intro; apply HNC3; Col); auto.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    apply th18_aux; Cong; intro; [apply HNC3|apply HNC4]; Col.
    }
  }
Qed.

Lemma TS_upper_dim : forall A B C P Q,
  cut' A B P Q -> P <> Q -> A <> B -> A <> C -> B <> C ->
  A <> P -> A <> Q -> B <> P -> B <> Q -> C <> P -> C <> Q ->
  CongH A P A Q -> CongH B P B Q -> CongH C P C Q ->
  (Bet A B C \/ Bet B C A \/ Bet C A B).
Proof.
(* Goal: forall (A B C P Q : @Point Hi) (_ : @cut' Hi A B P Q) (_ : not (@eq (@Point Hi) P Q)) (_ : not (@eq (@Point Hi) A B)) (_ : not (@eq (@Point Hi) A C)) (_ : not (@eq (@Point Hi) B C)) (_ : not (@eq (@Point Hi) A P)) (_ : not (@eq (@Point Hi) A Q)) (_ : not (@eq (@Point Hi) B P)) (_ : not (@eq (@Point Hi) B Q)) (_ : not (@eq (@Point Hi) C P)) (_ : not (@eq (@Point Hi) C Q)) (_ : @CongH Hi A P A Q) (_ : @CongH Hi B P B Q) (_ : @CongH Hi C P C Q), or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
intros A B C P Q HCut HD1 HD2 HD3 HD4 HD5 HD6 HD7 HD8 HD9 HD10.
(* Goal: forall (_ : @CongH Hi A P A Q) (_ : @CongH Hi B P B Q) (_ : @CongH Hi C P C Q), or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
intros HCong1 HCong2 HCong3; destruct HCut as [_ HCut]; line P Q l HD1.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HC : cut l A B); [apply HCut; auto|clear HCut; rename HC into HCut].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
elim (colH_dec A P Q); intro HNC1; [elim (col_upper_dim A B C P Q); auto|].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
elim (colH_dec B P Q); intro HNC2; [destruct (col_upper_dim B C A P Q) as [|[|]]; auto|].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
destruct HCut as [HNI1 [HNI2 [I [HI HBet]]]].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HC' : ColH P Q I) by (exists l; auto).
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HD11 : P <> I).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  intro; subst; assert (HC : ColH A Q B)
    by (apply cong_preserves_col with A I B; Cong).
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  apply HNC1; apply betH_expand in HBet; spliter; ColHR.
  }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HD12 : Q <> I).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  intro; subst; assert (HC : ColH A P B)
    by (apply cong_preserves_col with A I B; auto with cong).
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  apply HNC1; apply betH_expand in HBet; spliter; ColHR.
  }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HConga : CongaH I A P I A Q).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  apply betH_expand in HBet; apply conga_out_conga with B P B Q;
  try apply outH_trivial; unfold outH; spliter; auto; apply th18_aux; Cong;
(* Goal: @ColH Hi B C P *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
(* Goal: @ex (@Point Hi) (fun X : @Point Hi => and (or (@BetH Hi P X B) (or (@eq (@Point Hi) P X) (@eq (@Point Hi) X B))) (or (@BetH Hi Q X A) (or (@eq (@Point Hi) Q X) (@eq (@Point Hi) X A)))) *)
  intro; [apply HNC1|apply HNC2]; ColHR.
  }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HCong4 : CongH I P I Q).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_expand in HBet; spliter.
(* Goal: @CongH Hi I P I Q *)
  destruct (th12 A I P A I Q) as [_ [_ ]]; Cong; try (intro; apply HNC1; ColHR).
  }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HC : ColH A B C).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  elim (eq_dec_pointsH C I); intro HD13; subst;
  try solve[apply between_col in HBet; Col].
(* Goal: @ColH Hi A B C *)
  assert (HC : ColH A C I); [|apply betH_expand in HBet; spliter; ColHR].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_expand in HBet; spliter.
  elim (col_upper_dim I A C P Q); Col; intro HE;
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  elim HE; clear HE; intro HE; apply bet_colH in HE; Col.
  }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
apply between_one in HC; Bet; unfold Bet.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
elim HC; clear HC; intro HC; [|elim HC; clear HC; intro HC]; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_comm in HC; auto.
Qed.

Lemma cut'_comm: forall A B X Y, cut' A B X Y -> cut' B A X Y.
Proof.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
intros A B X Y [HD H]; split; auto; intros l HI1 HI2; apply cut_comm; auto.
Qed.

Lemma TS_upper_dim_bis : forall A B C P Q I,
  BetH P I Q -> BetH I B A -> P <> Q -> A <> B -> A <> C -> B <> C ->
  A <> P -> A <> Q -> B <> P -> B <> Q -> C <> P -> C <> Q ->
  CongH A P A Q -> CongH B P B Q -> CongH C P C Q ->
  (Bet A B C \/ Bet B C A \/ Bet C A B).
Proof.
(* Goal: forall (A B C P Q I : @Point Hi) (_ : @BetH Hi P I Q) (_ : @BetH Hi I B A) (_ : not (@eq (@Point Hi) P Q)) (_ : not (@eq (@Point Hi) A B)) (_ : not (@eq (@Point Hi) A C)) (_ : not (@eq (@Point Hi) B C)) (_ : not (@eq (@Point Hi) A P)) (_ : not (@eq (@Point Hi) A Q)) (_ : not (@eq (@Point Hi) B P)) (_ : not (@eq (@Point Hi) B Q)) (_ : not (@eq (@Point Hi) C P)) (_ : not (@eq (@Point Hi) C Q)) (_ : @CongH Hi A P A Q) (_ : @CongH Hi B P B Q) (_ : @CongH Hi C P C Q), or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
intros A B C P Q I HBet1 HBet2 HD1 HD2 HD3 HD4 HD5 HD6 HD7 HD8 HD9 HD10.
(* Goal: forall (_ : @CongH Hi A P A Q) (_ : @CongH Hi B P B Q) (_ : @CongH Hi C P C Q), or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
intros HCong1 HCong2 HCong3.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
elim (colH_dec A P Q); intro HNC1; [elim (col_upper_dim A B C P Q); auto|].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
elim (colH_dec B P Q); intro HNC2; [destruct (col_upper_dim B C A P Q) as [|[|]]; auto|].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HConga : CongaH P B I Q B I).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  apply th14 with A A; Bet; apply betH_expand in HBet1;
  apply betH_expand in HBet2; spliter;
  assert (HD11 : P <> I) by auto; assert (HD12 : Q <> I) by auto;
  [intro; apply HD11; apply inter_uniquenessH with P Q A B; try intro; Col|
   intro; apply HD12; apply inter_uniquenessH with P Q A B; try intro; Col|].
  apply th18_aux; Cong;
  [intro; apply HD11; apply inter_uniquenessH with P Q A B; try intro; Col|
   intro; apply HD12; apply inter_uniquenessH with P Q A B; try intro; Col].
  }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HCong4 : CongH I P I Q).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_expand in HBet1; apply betH_expand in HBet2; spliter.
(* Goal: @CongH Hi I P I Q *)
  destruct (th12 B P I B Q I) as [_ [_ ]]; Cong; try (intro; apply HNC1; ColHR).
  }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HC : ColH A B C).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @ColH Hi A B C *)
  assert (HC1 : ColH A B I).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
    apply betH_expand in HBet1; apply betH_expand in HBet2; spliter.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    elim (col_upper_dim I A B P Q); Col.
    }
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  elim (eq_dec_pointsH C I); intro HD11; subst; Col.
(* Goal: @ColH Hi A B C *)
  assert (HC2 : ColH A C I); [|apply betH_expand in HBet2; spliter; ColHR].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
  apply betH_expand in HBet1; apply betH_expand in HBet2; spliter.
  elim (col_upper_dim I A C P Q); Col; intro HE;
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  elim HE; clear HE; intro HE; apply bet_colH in HE; Col.
  }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
apply between_one in HC; Bet; unfold Bet.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
elim HC; clear HC; intro HC; [|elim HC; clear HC; intro HC]; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply between_comm in HC; auto.
Qed.

Lemma upper_dim : forall A B C P Q,
  P <> Q -> A <> B -> A <> C -> B <> C ->
  Cong A P A Q -> Cong B P B Q -> Cong C P C Q ->
  (Bet A B C \/ Bet B C A \/ Bet C A B).
Proof.
(* Goal: forall (A B C P Q : @Point Hi) (_ : not (@eq (@Point Hi) P Q)) (_ : not (@eq (@Point Hi) A B)) (_ : not (@eq (@Point Hi) A C)) (_ : not (@eq (@Point Hi) B C)) (_ : @Cong Hi A P A Q) (_ : @Cong Hi B P B Q) (_ : @Cong Hi C P C Q), or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
unfold Cong; intros A B C P Q HD1 HD2 HD3 HD4 HCong1 HCong2 HCong3.
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
elim HCong1; clear HCong1; intro HCong1; [|spliter; repeat subst; intuition].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
elim HCong2; clear HCong2; intro HCong2; [|spliter; repeat subst; intuition].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
elim HCong3; clear HCong3; intro HCong3; [|spliter; repeat subst; intuition].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
destruct HCong1 as [HCong1 [HD5 HD6]].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
destruct HCong2 as [HCong2 [HD7 HD8]].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
destruct HCong3 as [HCong3 [HD9 HD10]].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
elim (colH_dec A P Q); intro HNC1; [elim (col_upper_dim A B C P Q); auto|].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
elim (colH_dec B P Q); intro HNC2; [destruct (col_upper_dim B C A P Q) as [|[|]]; auto|].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
elim (colH_dec C P Q); intro HNC3; [destruct (col_upper_dim C A B P Q) as [|[|]]; auto|].
elim (plane_separation_2D _ _ _ _ HNC1 HNC2); intro HS1;
[elim (TS_upper_dim A B C P Q); auto|].
elim (plane_separation_2D _ _ _ _ HNC1 HNC3); intro HS2;
[destruct (TS_upper_dim C A B P Q) as [|[|]]; try apply cut'_comm; auto|].
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HNC4 : ~ ColH P A B).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  intro HC1; assert (H : ColH B P A) by Col; assert (HC2 : ColH A B Q)
    by (apply cong_preserves_col_stronger with A B P; Cong; Col).
(* Goal: False *)
  assert (HBet1 : BetH P A Q) by (apply congH_colH_betH; auto; ColHR).
(* Goal: False *)
  assert (HBet2 : BetH P B Q) by (apply congH_colH_betH; auto; ColHR).
  clear HC1; apply between_one in H; auto; elim H; clear H; intro HBet3;
  [apply between_only_one' in HBet2; destruct HBet2 as [_ HF];
   apply HF; eauto with bet|elim HBet3; clear HBet3; intro HBet3].

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: False *)
    assert (HBet4 : BetH Q B A) by (destruct (betH_trans0 P A B Q); Bet).
(* Goal: False *)
    apply betH_congH2__False with P A B Q A B; Cong.
    }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: False *)
    assert (HBet4 : BetH Q A B) by (destruct (betH_trans0 P B A Q); Bet).
(* Goal: False *)
    apply betH_congH2__False with P B A Q B A; Cong.
    }
  }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
assert (HNC5 : ~ ColH Q A B).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  intro HC1; assert (HC2 : ColH A B P); [|apply HNC4; Col];
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply cong_preserves_col_stronger with A B Q; Cong; Col.
  }
(* Goal: or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
elim (plane_separation_2D _ _ _ _ HNC4 HNC5); intro HS3.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  destruct HS3 as [_ HS3]; line A B lAB HD2; elim (HS3 lAB); auto.
(* Goal: forall (_ : not (@IncidL Hi P lAB)) (_ : and (not (@IncidL Hi Q lAB)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I lAB) (@BetH Hi P I Q)))), or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
  intros _ [_ [I [HI HBet1]]]; assert (HBet2 : ColH A I B) by (exists lAB; auto).
  apply between_one in HBet2; try (elim HBet2; clear HBet2; intro HBet2);
  try (intro; intro; subst; apply betH_expand in HBet1; spliter; Col).

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    line P Q lPQ HD1; destruct HS1 as [_ HS1]; assert (HS4 : same_side A B lPQ)
      by (apply HS1; auto); apply same_side_not_cut in HS4; exfalso; apply HS4.
(* Goal: @cut Hi lPQ A B *)
    split; [intro; apply HNC1; exists lPQ; auto|].
(* Goal: and (not (@IncidL Hi B lPQ)) (@ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I lPQ) (@BetH Hi A I B))) *)
    split; [intro; apply HNC2; exists lPQ; auto|].
    exists I; split; auto; apply betH_line in HBet1;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    destruct HBet1 as [l [HI2 [HI3 HI4] ]]; apply morph with l; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply line_uniqueness with P Q; auto.
    }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
    elim HBet2; clear HBet2; intro HBet2;
    [elim (TS_upper_dim_bis A B C P Q I)|elim (TS_upper_dim_bis B A C P Q I)];
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    auto; intro HE; [|elim HE; clear HE; intro HE]; apply bet_comm in HE; auto.
    }
  }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  assert (H : outH A P Q);
  [|apply outH_expand in H; spliter; exfalso; apply HNC1; Col].
  apply cong_4_uniqueness with B A P P B; try apply conga_refl;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  try apply same_side_prime_refl; try (intro; apply HNC4; Col); auto.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
  apply th18_aux; Cong; intro; [apply HNC4|apply HNC5]; Col.
  }
Qed.

Global Instance H2D_to_T2D : Tarski_2D H_to_T_PED.
Proof.
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
split.
(* Goal: forall (A B C P Q : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intros.
elim (point_equality_decidability A B); intro;
[unfold tarski_axioms.Bet; simpl; subst; unfold Bet; auto|].
elim (point_equality_decidability A C); intro;
[unfold tarski_axioms.Bet; simpl; subst; unfold Bet; auto|].
elim (point_equality_decidability B C); intro;
[unfold tarski_axioms.Bet; simpl; subst; unfold Bet; auto|].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply upper_dim with P Q; auto.
Defined.

End HilbertContext_2D.

Section HilbertContext_3D.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
Context `{H3D : Hilbert_neutral_3D}.

Lemma tarski_upper_dim : forall A B C P Q R, P <> Q -> Q <> R -> P <> R ->
  Cong A P A Q -> Cong B P B Q -> Cong C P C Q ->
  Cong A P A R -> Cong B P B R -> Cong C P C R ->
  (Bet A B C \/ Bet B C A \/ Bet C A B).
Proof.
(* Goal: forall (A B C P Q R : @Point Hi) (_ : not (@eq (@Point Hi) P Q)) (_ : not (@eq (@Point Hi) Q R)) (_ : not (@eq (@Point Hi) P R)) (_ : @Cong Hi A P A Q) (_ : @Cong Hi B P B Q) (_ : @Cong Hi C P C Q) (_ : @Cong Hi A P A R) (_ : @Cong Hi B P B R) (_ : @Cong Hi C P C R), or (@Bet Hi A B C) (or (@Bet Hi B C A) (@Bet Hi C A B)) *)
cut upper_dim_3_axiom.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
unfold upper_dim_3_axiom; auto.
(* Goal: @upper_dim_3_axiom (@H_to_T Hi) *)
cut plane_intersection_axiom.
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
apply upper_dim_3_equivalent_axioms; simpl; tauto.
(* Goal: @plane_intersection_axiom (@H_to_T Hi) *)
intros A B C D E F P HP1 HP2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
apply coplanar_plane in HP1.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
apply coplanar_plane in HP2.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
destruct HP1 as [p].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
destruct HP2 as [q].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: Cong C D C' D' *)
destruct (plane_intersection P p q) as [Q]; [assumption..|].
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
spliter.
(* Goal: @ex (@Tpoint (@H_to_T Hi)) (fun Q : @Tpoint (@H_to_T Hi) => and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q)))) *)
exists Q.
(* Goal: and (@Coplanar (@H_to_T Hi) A B C Q) (and (@Coplanar (@H_to_T Hi) D E F Q) (not (@eq (@Tpoint (@H_to_T Hi)) P Q))) *)
repeat split; [..|assumption].
(* Goal: Cong C D C' D' *)
  apply plane_coplanar with p; assumption.
(* Goal: Cong C D C' D' *)
  apply plane_coplanar with q; assumption.
Defined.

Global Instance Tarski_3D_follows_from_Hilbert_3D : (Tarski_3D H_to_T_PED).
Proof.
(* Goal: @Tarski_3D (@H_to_T Hi) (@H_to_T_PED Hi) *)
exists HS1 HS2 HS3 HS4.
(* Goal: not (@ex (@Tpoint (@H_to_T Hi)) (fun X : @Tpoint (@H_to_T Hi) => or (and (or (@tarski_axioms.Bet (@H_to_T Hi) (@HS1 Hi H3D) (@HS2 Hi H3D) X) (or (@tarski_axioms.Bet (@H_to_T Hi) (@HS2 Hi H3D) X (@HS1 Hi H3D)) (@tarski_axioms.Bet (@H_to_T Hi) X (@HS1 Hi H3D) (@HS2 Hi H3D)))) (or (@tarski_axioms.Bet (@H_to_T Hi) (@HS3 Hi H3D) (@HS4 Hi H3D) X) (or (@tarski_axioms.Bet (@H_to_T Hi) (@HS4 Hi H3D) X (@HS3 Hi H3D)) (@tarski_axioms.Bet (@H_to_T Hi) X (@HS3 Hi H3D) (@HS4 Hi H3D))))) (or (and (or (@tarski_axioms.Bet (@H_to_T Hi) (@HS1 Hi H3D) (@HS3 Hi H3D) X) (or (@tarski_axioms.Bet (@H_to_T Hi) (@HS3 Hi H3D) X (@HS1 Hi H3D)) (@tarski_axioms.Bet (@H_to_T Hi) X (@HS1 Hi H3D) (@HS3 Hi H3D)))) (or (@tarski_axioms.Bet (@H_to_T Hi) (@HS2 Hi H3D) (@HS4 Hi H3D) X) (or (@tarski_axioms.Bet (@H_to_T Hi) (@HS4 Hi H3D) X (@HS2 Hi H3D)) (@tarski_axioms.Bet (@H_to_T Hi) X (@HS2 Hi H3D) (@HS4 Hi H3D))))) (and (or (@tarski_axioms.Bet (@H_to_T Hi) (@HS1 Hi H3D) (@HS4 Hi H3D) X) (or (@tarski_axioms.Bet (@H_to_T Hi) (@HS4 Hi H3D) X (@HS1 Hi H3D)) (@tarski_axioms.Bet (@H_to_T Hi) X (@HS1 Hi H3D) (@HS4 Hi H3D)))) (or (@tarski_axioms.Bet (@H_to_T Hi) (@HS2 Hi H3D) (@HS3 Hi H3D) X) (or (@tarski_axioms.Bet (@H_to_T Hi) (@HS3 Hi H3D) X (@HS2 Hi H3D)) (@tarski_axioms.Bet (@H_to_T Hi) X (@HS2 Hi H3D) (@HS3 Hi H3D)))))))) *)
(* Goal: forall (A B C P Q R : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) Q R)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P R)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A R) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B R) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C R), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
intro HX.
(* Goal: False *)
(* Goal: forall (A B C P Q R : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) Q R)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P R)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A R) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B R) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C R), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
apply lower_dim_3.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
apply coplanar_plane; auto.
(* Goal: forall (A B C P Q R : @Tpoint (@H_to_T Hi)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P Q)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) Q R)) (_ : not (@eq (@Tpoint (@H_to_T Hi)) P R)) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C Q) (_ : @tarski_axioms.Cong (@H_to_T Hi) A P A R) (_ : @tarski_axioms.Cong (@H_to_T Hi) B P B R) (_ : @tarski_axioms.Cong (@H_to_T Hi) C P C R), or (@tarski_axioms.Bet (@H_to_T Hi) A B C) (or (@tarski_axioms.Bet (@H_to_T Hi) B C A) (@tarski_axioms.Bet (@H_to_T Hi) C A B)) *)
apply tarski_upper_dim.
Defined.

End HilbertContext_3D.

Require Export GeoCoq.Meta_theory.Parallel_postulates.parallel_postulates.

Section Hilbert_euclidean.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
Context `{Hi:Hilbert_euclidean}.

Lemma Col__ColH : forall A B C, Col A B C -> ColH A B C.
Proof. intros A B C [HBet|[HBet|HBet]]; apply bet_colH in HBet; Col. Qed.

Lemma ColH__Col : forall A B C, ColH A B C -> Col A B C.
Proof. intros A B C HCol; apply ColH_bets in HCol; auto. Qed.

Lemma playfair_s_postulateH : playfair_s_postulate.
Proof.
(* Goal: @playfair_s_postulate (@H_to_T Hi0) *)
intros A1 A2 B1 B2 C1 C2 P HPar1 HCol1 HPar2 HCol2.
destruct (line_existence A1 A2) as [l [Hl1 Hl2]];
[unfold Par, Par_strict in *; destruct HPar1 as [[HDiff _]|[HDiff _]]; auto|].
destruct (line_existence B1 B2) as [m1 [Hm11 Hm12]];
[unfold Par, Par_strict in *; destruct HPar1 as [[_ [HDiff _]]|[_ [HDiff _]]]; auto|].
destruct (line_existence C1 C2) as [m2 [Hm21 Hm22]];
[unfold Par, Par_strict in *; destruct HPar2 as [[_ [HDiff _]]|[_ [HDiff _]]]; auto|].
(* Goal: and (@Col (@H_to_T Hi0) C1 B1 B2) (@Col (@H_to_T Hi0) C2 B1 B2) *)
elim (IncidL_dec P l); intro HInc.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: and (@Col (@H_to_T Hi0) C1 B1 B2) (@Col (@H_to_T Hi0) C2 B1 B2) *)
  assert (Col A1 A2 P) by (apply ColH__Col; exists l; auto).
  elim HPar1; [unfold Par_strict in *|];
  [intros [_ [_ [_ HFalse]]]; exfalso; apply HFalse; exists P; Col|];
  intros [? [? [? ?]]].
  elim HPar2; [unfold Par_strict in *|];
  [intros [_ [_ [_ HFalse]]]; exfalso; apply HFalse; exists P; Col|];
  intros [? [? [? ?]]]; split; ColR.
  }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: and (@Col (@H_to_T Hi0) C1 B1 B2) (@Col (@H_to_T Hi0) C2 B1 B2) *)
  assert (HNC : ~ Col A1 A2 P).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: not (@Col (@H_to_T Hi0) A1 A2 P) *)
    assert (HNC : ~ ColH A1 A2 P).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      apply IncidL_not_IncidL__not_colH with l; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      unfold Par, Par_strict in *; destruct HPar1 as [[HDiff _]|[HDiff _]]; auto.
      }
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    intro; apply HNC; apply Col__ColH; auto.
    }
(* Goal: and (@Col (@H_to_T Hi0) C1 B1 B2) (@Col (@H_to_T Hi0) C2 B1 B2) *)
  assert (HPara1 : Para l m1).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @Para Hi0 l m1 *)
    elim HPar1; [|intros [? [? [? ?]]]; exfalso; apply HNC; ColR].
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
    intros [_ [_ [HCop HFalse]]]; split.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi B I A)) *)
      intros [I [HInc1 HInc2]]; apply HFalse; exists I.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      split; apply ColH__Col; [exists l|exists m1]; auto.
      }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
      destruct HPar1 as [HPar1|[HDiff1 [HDiff2 [HCol3 HCol4]]]];
      [|exfalso; apply HNC; ColR].
(* Goal: @ex (@Plane Hi0) (fun p : @Plane Hi0 => and (@IncidLP Hi0 l p) (@IncidLP Hi0 m2 p)) *)
      apply coplanar_plane in HCop.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidLP Hi l p) (@IncidLP Hi m p)) *)
      destruct HCop as [p [Hp1 [Hp2 [Hp3 Hp4]]]]; exists p.
      split; assert_diffs;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      [apply line_on_plane with A1 A2|apply line_on_plane with B1 B2]; auto.
      }
    }
(* Goal: and (@Col (@H_to_T Hi0) C1 B1 B2) (@Col (@H_to_T Hi0) C2 B1 B2) *)
  assert (HPara2 : Para l m2).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @Para Hi0 l m2 *)
    elim HPar2; [|intros [? [? [? ?]]]; exfalso; apply HNC; ColR].
(* Goal: @Tarski_2D (@H_to_T Hi) (@H_to_T_PED Hi) *)
    intros [_ [_ [HCop HFalse]]]; split.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi B I A)) *)
      intros [I [HInc1 HInc2]]; apply HFalse; exists I.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      split; apply ColH__Col; [exists l|exists m2]; auto.
      }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
      {
      destruct HPar2 as [HPar2|[HDiff1 [HDiff2 [HCol3 HCol4]]]];
      [|exfalso; apply HNC; ColR].
(* Goal: @ex (@Plane Hi0) (fun p : @Plane Hi0 => and (@IncidLP Hi0 l p) (@IncidLP Hi0 m2 p)) *)
      apply coplanar_plane in HCop.
(* Goal: @ex (@Plane Hi) (fun p : @Plane Hi => and (@IncidLP Hi l p) (@IncidLP Hi m p)) *)
      destruct HCop as [p [Hp1 [Hp2 [Hp3 Hp4]]]]; exists p.
      split; assert_diffs;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
      [apply line_on_plane with A1 A2|apply line_on_plane with C1 C2]; auto.
      }
    }
(* Goal: and (@Col (@H_to_T Hi0) C1 B1 B2) (@Col (@H_to_T Hi0) C2 B1 B2) *)
  assert (HInc1 : IncidL P m1).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @IncidL Hi0 P m1 *)
    apply Col__ColH in HCol1; destruct HCol1 as [m1' [? [? ?]]].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply IncidL_morphism with m1'; auto.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    apply line_uniqueness with B1 B2; Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    unfold Par, Par_strict in *; destruct HPar1 as [[_ [HDiff _]]|[_ [HDiff _]]]; auto.
    }
(* Goal: and (@Col (@H_to_T Hi0) C1 B1 B2) (@Col (@H_to_T Hi0) C2 B1 B2) *)
  assert (HInc2 : IncidL P m2).
(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
    {
(* Goal: @IncidL Hi0 P m2 *)
    apply Col__ColH in HCol2; destruct HCol2 as [m2' [? [? ?]]].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    apply IncidL_morphism with m2'; auto.
(* Goal: @ColH Hi C' B' D' *)
(* Goal: @disjoint Hi C B B D *)
(* Goal: @disjoint Hi C' B' B' D' *)
(* Goal: @CongH Hi C B C' B' *)
(* Goal: @CongH Hi B D B' D' *)
(* Goal: or (and (@CongH Hi C D C' D') (and (not (@eq (@Point Hi) C D)) (not (@eq (@Point Hi) C' D')))) (and (@eq (@Point Hi) C D) (@eq (@Point Hi) C' D')) *)
(* Goal: Cong C D C' D' *)
(* Goal: Cong C D C' D' *)
    apply line_uniqueness with C1 C2; Col.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
    unfold Par, Par_strict in *; destruct HPar2 as [[_ [HDiff _]]|[_ [HDiff _]]]; auto.
    }
(* Goal: and (@Col (@H_to_T Hi0) C1 B1 B2) (@Col (@H_to_T Hi0) C2 B1 B2) *)
  assert (HEq := euclid_uniqueness l P m1 m2 HInc HPara1 HInc1 HPara2 HInc2).
  split; apply ColH__Col; exists m1; split; auto;
  apply IncidL_morphism with m2; auto; assert(HH:= EqL_Equiv); destruct HH;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  apply Equivalence_Symmetric; auto.
  }
Qed.

End Hilbert_euclidean.

Section Hilbert_euclidean_ID.

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
Context `{Hi:Hilbert_euclidean_ID}.

Lemma decidability_of_intersectionH :
  parallel_postulates.decidability_of_intersection.
Proof.
(* Goal: @parallel_postulates.decidability_of_intersection (@H_to_T Hi0) *)
intros A B C D.
(* Goal: or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
elim (eq_dec_pointsH A B); intro HAB; subst; [left; exists C; Col|].
(* Goal: or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
elim (eq_dec_pointsH C D); intro HCD; subst; [left; exists A; Col|].
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
destruct (line_existence A B) as [l [Hl1 Hl2]]; auto.
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
destruct (line_existence C D) as [m [Hm1 Hm2]]; auto.
(* Goal: or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
elim (hilbert_axioms.decidability_of_intersection l m).

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
  intros [I [HInc1 HInc2]]; left; exists I; split; apply ColH__Col;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  [exists l|exists m]; auto.
  }

(* Goal: forall _ : not (@ex (@Point Hi0) (fun I : @Point Hi0 => and (@IncidL Hi0 I l) (@IncidL Hi0 I m))), or (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D))) (not (@ex (@Tpoint (@H_to_T Hi0)) (fun I : @Tpoint (@H_to_T Hi0) => and (@Col (@H_to_T Hi0) I A B) (@Col (@H_to_T Hi0) I C D)))) *)
  {
(* Goal: @ex (@Point Hi) (fun I : @Point Hi => and (@IncidL Hi I l) (@BetH Hi B I A)) *)
  intro HFalse; right; intros [I [HCol1 HCol2]]; apply HFalse; exists I.
(* Goal: and (@IncidL Hi0 I l) (@IncidL Hi0 I m) *)
  apply Col__ColH in HCol1; apply Col__ColH in HCol2.
(* Goal: and (@IncidL Hi0 I l) (@IncidL Hi0 I m) *)
  destruct HCol1 as [l' [? [? ?]]]; destruct HCol2 as [m' [? [? ?]]].
  split; [apply IncidL_morphism with l'|apply IncidL_morphism with m']; auto;
(* Goal: @IncidL Hi D' lA'C' *)
(* Goal: @CongH Hi B C B' C' *)
  [apply line_uniqueness with A B|apply line_uniqueness with C D]; auto.
  }
Qed.

Lemma tarski_s_euclid : tarski_s_parallel_postulate.
Proof.
(* Goal: @tarski_s_parallel_postulate (@H_to_T Hi0) *)
cut playfair_s_postulate; [|apply playfair_s_postulateH].
(* Goal: forall _ : @playfair_s_postulate (@H_to_T Hi0), @tarski_s_parallel_postulate (@H_to_T Hi0) *)
assert (H := equivalent_postulates_with_decidability_of_intersection_of_lines).
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
(* Goal: or (and (@CongH Hi A B E F) (and (not (@eq (@Point Hi) A B)) (not (@eq (@Point Hi) E F)))) (and (@eq (@Point Hi) A B) (@eq (@Point Hi) E F)) *)
apply (H decidability_of_intersectionH); simpl; tauto.
Qed.

Global Instance H_euclidean_to_T_euclidean : Tarski_euclidean H_to_T_PED.
Proof. split; apply tarski_s_euclid. Qed.

End Hilbert_euclidean_ID.