(** The three following lemmas constitute Omar Khayyam's Theorem (22.6) *)

(* Specifications: *)
Lemma cong_sac__per : forall A B C D,
Saccheri A B C D ->
Cong A D B C <-> Per A B C.
Lemma lt_sac__acute : forall A B C D,
Saccheri A B C D ->
Lt A D B C <-> Acute A B C.
Lemma lt_sac__obtuse : forall A B C D,
Saccheri A B C D ->
Lt B C A D <-> Obtuse A B C.
Lemma t22_7__per : forall A B C D P Q,
Saccheri A B C D ->
Bet B P C -> Bet A Q D ->
A <> Q -> B <> P -> P <> C ->
Per P Q A ->
Cong P Q A B ->
Per A B C.
Lemma t22_7__acute : forall A B C D P Q,
Saccheri A B C D ->
Bet B P C -> Bet A Q D ->
A <> Q -> B <> P -> P <> C ->
Per P Q A ->
Lt P Q A B ->
Acute A B C.
Lemma t22_7__obtuse : forall A B C D P Q,
Saccheri A B C D ->
Bet B P C -> Bet A Q D ->
A <> Q -> B <> P -> P <> C ->
Per P Q A ->
Lt A B P Q ->
Obtuse A B C.
Lemma t22_7__cong : forall A B C D P Q,
Saccheri A B C D ->
Bet B P C -> Bet A Q D ->
A <> Q -> B <> P -> P <> C ->
Per P Q A -> Per A B C ->
Cong P Q A B.
Lemma t22_7__lt5612 : forall A B C D P Q,
Saccheri A B C D ->
Bet B P C -> Bet A Q D ->
A <> Q -> B <> P -> P <> C ->
Per P Q A -> Acute A B C ->
Lt P Q A B.
Lemma t22_7__lt1256 : forall A B C D P Q,
Saccheri A B C D ->
Bet B P C -> Bet A Q D ->
A <> Q -> B <> P -> P <> C ->
Per P Q A -> Obtuse A B C ->
Lt A B P Q.
Lemma t22_8__per : forall A B C D R S,
Saccheri A B C D ->
Bet B C R -> Bet A D S ->
C <> R ->
Per A S R ->
Cong R S A B ->
Per A B C.
Lemma t22_8__acute : forall A B C D R S,
Saccheri A B C D ->
Bet B C R -> Bet A D S ->
C <> R ->
Per A S R ->
Lt A B R S ->
Acute A B C.
Lemma t22_8__obtuse : forall A B C D R S,
Saccheri A B C D ->
Bet B C R -> Bet A D S ->
C <> R ->
Per A S R ->
Lt R S A B ->
Obtuse A B C.
Lemma t22_8__cong : forall A B C D R S,
Saccheri A B C D -> Bet B C R -> Bet A D S ->
C <> R -> Per A S R -> Per A B C -> Cong R S A B.
Lemma t22_8__lt1256 : forall A B C D R S,
Saccheri A B C D ->
Bet B C R -> Bet A D S ->
C <> R ->
Per A S R -> Acute A B C ->
Lt A B R S.
Lemma t22_8__lt5612 : forall A B C D R S,
Saccheri A B C D ->
Bet B C R -> Bet A D S ->
C <> R ->
Per A S R -> Obtuse A B C ->
Lt R S A B.
Lemma t22_9__per : forall N M P Q R S,
Lambert N M P Q -> Lambert N M R S ->
Bet M P R -> Bet N Q S ->
(Per S R M <-> Per Q P M).
Lemma t22_9__acute : forall N M P Q R S,
Lambert N M P Q -> Lambert N M R S ->
Bet M P R -> Bet N Q S ->
(Acute S R M <-> Acute Q P M).
Lemma t22_9__obtuse : forall N M P Q R S,
Lambert N M P Q -> Lambert N M R S ->
Bet M P R -> Bet N Q S ->
(Obtuse S R M <-> Obtuse Q P M).