(* elimination of ratios for euclidean constructions *)
(* the condition A<>Y is required *)

(* Specifications: *)
Theorem elim_ratio_on_foot_a :
forall Y P U V A C D : Point,
on_foot Y P U V ->
Col A U V ->
parallel A Y C D ->
C <> D ->
A <> Y ->
A**Y / C**D = Py4 P C A D / Py C D C.
Theorem elim_ratio_on_foot_a_invariant : forall C D,
C<>D -> Py C D C <> 0.
Theorem elim_ratio_on_foot_spec_a :
forall Y P U V A C D : Point,
on_foot Y P U V ->
Col A U V ->
parallel A Y C Y ->
C <> Y ->
A <> Y ->
A**Y / C**Y = (Py P U V * Py4 P C A V + Py P V U * Py4 P C A U) /
(Py P U V * Py C V C + Py P V U * Py C U C - Py P U V * Py P V U).
Theorem elim_ratio_on_foot_b :
forall Y P U V A C D : Point,
on_foot Y P U V ->
~ Col A U V ->
parallel A Y C D ->
C <> D ->
A**Y / C**D = S A U V / S4 C U D V.
Theorem elim_ratio_on_foot_spec_b :
forall Y P U V A C : Point,
on_foot Y P U V ->
~ Col A U V ->
parallel A Y C Y ->
C <> Y ->
A**Y / C**Y = S A U V / S C U V.
Theorem elim_ratio_on_foot_b_invariant :
forall Y P U V A C D : Point,
on_foot Y P U V ->
~ Col A U V ->
parallel A Y C D ->
C<>D ->
S4 C U D V <> 0.
Theorem elim_ratio_on_perp_d_a_invariant :
forall Y P Q A C D : Point, forall r: F,
on_perp_d Y P Q r->
Col A P Y  ->
parallel A Y C D ->
A<>Y ->
C<>D ->
S4 C P D Q <> 0.
Theorem elim_ratio_on_perp_d_a_aux :
forall Y P Q A C D : Point, forall r: F,
on_perp_d Y P Q r->
Col A P Y  ->
parallel A Y C D ->
C<>D ->
A<>Y ->
A<>P ->
A**Y / C**D = (S A P Q -r/(2+2) * Py P Q P)/(S4 C P D Q).
Theorem elim_ratio_on_perp_d_a :
forall Y P Q A C D : Point, forall r: F,
on_perp_d Y P Q r->
Col A P Y  ->
parallel A Y C D ->
C<>D ->
A<>Y ->
A**Y / C**D = (S A P Q -r/(2+2) * Py P Q P)/(S4 C P D Q).
Theorem elim_ratio_on_perp_d_spec_a :
forall Y P Q A C : Point, forall r: F,
on_perp_d Y P Q r->
Col A P Y  ->
parallel A Y C Y ->
C<>Y ->
A<>Y ->
A**Y / C**Y = (S A P Q - r / (2 + 2) * Py P Q P) /
(S Q C P -r/(2+2) * Py P Q P).
Lemma elim_ratio_on_perp_d_b_auxi :
forall A Y C D P Q : Point,
on_parallel_d Y A C D 1 ->
Py C P Q - Py D P Q = Py A P Q - Py Y P Q.
Theorem elim_ratio_on_perp_d_b_aux :
forall Y P Q A C D : Point, forall r: F,
on_perp_d Y P Q r->
~ Col A P Y  ->
parallel A Y C D ->
C<>D -> C**D <>A**Y ->
A**Y / C**D = Py A P Q / Py4 C P D Q.
Theorem elim_ratio_on_perp_d_b_invariant :
forall Y P Q A C D : Point, forall r: F,
on_perp_d Y P Q r ->
~ Col A P Y ->
parallel A Y C D ->
C<>D ->
Py4 C P D Q <> 0.
Theorem elim_ratio_on_perp_d_b :
forall Y P Q A C D : Point, forall r: F,
on_perp_d Y P Q r->
~ Col A P Y  ->
parallel A Y C D ->
C<>D ->
A**Y / C**D = Py A P Q / Py4 C P D Q.
Theorem elim_ratio_on_perp_d_spec_b :
forall Y P Q A C : Point, forall r: F,
on_perp_d Y P Q r->
~ Col A P Y  ->
parallel A Y C Y ->
C<>Y ->
A**Y / C**Y = Py A P Q / Py C P Q.