Section T16.
Context `{T2D:Tarski_2D}.
Context `{TE:@Tarski_euclidean Tn TnEQD}.
(** Lemma 16.2 in dimension 2. *)
(** As we are in dimension 2, we skip 16.3 which is only needed to prove 16.4 in dimension n. *)

Lemma square_distance_formula_aux : forall O E E' S U1 U2 P PX PY Q QX PXQX,
Cd O E S U1 U2 P PX PY -> Cd O E S U1 U2 Q QX PY ->
P <> Q -> ~ Col O E E' -> Col O E PX -> Col O E QX -> Col O E PY ->
Cs O E S U1 U2 -> Length O E E' PX QX PXQX ->
Length O E E' Q P PXQX.