Require Export GeoCoq.Tarski_dev.Annexes.suma.
Section HalfAngle.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Definition HalfA P A O B := ~ Bet A O B /\ InAngle P A O B /\ CongA A O P B O P.

(* Specifications: *)
Lemma halfa_distincts : forall P A O B, HalfA P A O B -> O <> A /\ O <> B /\ O <> P.
Lemma halfa__suma : forall P A O B, HalfA P A O B -> SumA A O P A O P A O B.
Lemma halfa_exists : forall A O B, ~ Bet A O B -> exists P, HalfA P A O B.
Lemma halfa_sym : forall A O B P, HalfA P A O B -> HalfA P B O A.
Lemma halfa__nbet : forall A O B P, HalfA P A O B -> ~ Bet A O P.
Lemma out_preserves_halfa : forall P A O B P' A' B',
Out O A A' -> Out O B B' -> Out O P P' ->
HalfA P A O B -> HalfA P' A' O B'.
Lemma halfa__nbet2 : forall A O B P, HalfA P A O B -> ~ Bet A O P /\ ~ Bet B O P.
Lemma halfa_chara1 : forall P A O B, HalfA P A O B ->
exists A', exists M, Cong O A' O A /\ Out O A' B /\ Midpoint M A A' /\ Out O M P.
Lemma halfa_chara2 : forall P A O B,
(exists A', exists M, Cong O A' O A /\ Out O A' B /\ Midpoint M A A' /\ Out O M P) -> HalfA P A O B.
Lemma halfa_uniqueness : forall O A B P P', HalfA P A O B -> HalfA P' A O B -> Out O P P'.
Lemma halfa_not_null : forall P A O B, ~ Col A O B -> HalfA P A O B -> ~ Col A O P.
Lemma null_halfa__null : forall P A O B, Col A O B -> HalfA P A O B -> Out O A P.
Lemma halfa1123__out : forall A O B, HalfA A A O B -> Out O A B.
Lemma halfa3123__out : forall A O B, HalfA B A O B -> Out O A B.
Lemma halfa__sams : forall P A O B, HalfA P A O B -> SAMS A O P A O P.
Lemma halfa__acute : forall P A O B, HalfA P A O B -> Acute A O P.
Lemma halfa__lea : forall P A O B, HalfA P A O B -> LeA A O P A O B.
Lemma halfa2_lea__lea1 : forall P A O B P' A' O' B',
HalfA P A O B -> HalfA P' A' O' B' -> LeA A' O' P' A O P -> LeA A' O' B' A O B.
Lemma halfa__ts : forall P A O B, ~ Col A O B -> HalfA P A O B -> TS O P A B.
Lemma conga_halfa__conga1 : forall P A O B P' A' O' B',
HalfA P A O B -> HalfA P' A' O' B' ->
CongA A O P A' O' P' ->
CongA A O B A' O' B'.
Lemma conga_halfa__conga2 : forall P A O B P' A' O' B',
HalfA P A O B -> HalfA P' A' O' B' -> CongA A O B A' O' B' -> CongA A O P A' O' P'.
Lemma halfa2_lta__lta1 : forall P A O B P' A' O' B',
HalfA P A O B -> HalfA P' A' O' B' -> LtA A' O' P' A O P -> LtA A' O' B' A O B.
Lemma halfa2_lea__lea2 : forall P A O B P' A' O' B',
HalfA P A O B -> HalfA P' A' O' B' -> LeA A' O' B' A O B -> LeA A' O' P' A O P.
Lemma halfa2_lta__lta2 : forall P A O B P' A' O' B',
HalfA P A O B -> HalfA P' A' O' B' -> LtA A' O' B' A O B -> LtA A' O' P' A O P.
Lemma col_halfa__out : forall P A O B, Col A O B -> HalfA P A O B -> Out O A B.
(* Lemma lta_nbet__ncol : forall A B C X Y Z, ~ Bet X Y Z -> LtA A B C X Y Z -> ~ Col X Y Z. *)
Lemma halfa__coplanar : forall A B C D,
HalfA A B C D -> Coplanar A B C D.
Lemma cop_halfa_perp__os : forall P A O B T, HalfA P A O B -> Perp O P T O -> Coplanar A O P T ->
OS O T P A.
Lemma cop_halfa_perp__os2 : forall P A O B T, HalfA P A O B -> Perp O P T O -> Coplanar A O P T ->
OS O T P A /\ OS O T P B.
Lemma inangle_halfa2__inangle : forall O A B C A' C',
~ Col A O B -> InAngle C A O B ->
HalfA A' A O B -> HalfA C' C O B ->
InAngle C' A' O B.