Section Saccheri.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
(** The two following lemmas come from Theorem 21.10 *)
(** The five following lemmas come from Theorem 21.8 *)
(** The two following lemmas constitute Theorem 21.11 *)
(** The four following constitute Theorem 22.3 *)
(** The six following lemmas constitute Theorem 22.5 *)
(** The three following lemmas constitute Omar Khayyam's Theorem (22.6) *)
(** The two following lemmas come from Theorem 22.4 *)
(** This comes from Martin's proof in Theorem 22.10 *)
(** Saccheri's three hypotheses *)
Definition hypothesis_of_right_saccheri_quadrilaterals := forall A B C D, Saccheri A B C D -> Per A B C.
Definition hypothesis_of_acute_saccheri_quadrilaterals := forall A B C D, Saccheri A B C D -> Acute A B C.
Definition hypothesis_of_obtuse_saccheri_quadrilaterals := forall A B C D, Saccheri A B C D -> Obtuse A B C.
(** Under the Right angle hypothesis, the sum of the three angles of a triangle is equal to 180 *)
(** Under the Acute angle hypothesis, the sum of the three angles of a triangle is less than 180 *)
(** Under the Obtuse angle hypothesis, the sum of the three angles of a triangle is greater than 180 *)
(** If the sum of the angles of a non-degenerate triangle is equal to 180, then the Right angle hypothesis holds *)
(** If the sum of the angles of a triangle is less than 180, then the Acute angle hypothesis holds *)
(** If the sum of the angles of a triangle is greater than 180, then the Obtuse angle hypothesis holds *)
(** If C is on the circle of diameter AB, then we have the angles equation A + B = C *)
(** The three following lemmas link Saccheri's three hypotheses with triangles ABC having C on the circle of diameter AB; the first one states the equivalence between the Right angle hypothesis and Thales' theorem *)

Lemma t22_17__rah : forall A B C M,
~ Col A B C ->
Midpoint M A B -> Cong M A M C ->
(Per A C B <-> hypothesis_of_right_saccheri_quadrilaterals).