Ltac construct_grid O U V H :=
elim grid_existence;let H:= fresh in (
intros O H; elim H; clear H;intros U H;elim H;clear H;intro V;intros H;decompose [and] H).

(* Specifications: *)
Lemma area_grid : forall O U V, perp O U O V ->
O ** U <> 0 -> O ** V <> 0 ->
2*2*(S O U V * S O U V) = O**U*O**U*O**V*O**V.
Lemma grid_not_col : forall O U V, perp O U O V ->
O ** U <> 0 -> O ** V <> 0 -> ~ Col O U V.
Lemma degen_py_elim : forall O U V, perp O U O V ->
O ** U <> 0 -> O ** V <> 0 ->
forall A B,  (* ~ Col A O V -> ~ Col B O U -> *)
Py A B A = 2*2*2*(
(S O V A-S O V B) * (S O V A-S O V B) / (O**V * O**V) +
(S O U A-S O U B) * (S O U A-S O U B) / (O**U * O**U)).
Lemma py_to_pys : forall A B C,
Py A B C = 1/2 * (Py A B A + Py B C B - Py A C A).
Lemma py_elim :  forall O U V, perp O U O V ->
O ** U <> 0 -> O ** V <> 0 ->
forall A B C,
~ Col A O V -> ~ Col B O U ->
Py A B C =
(- (2*2*2)* O ** U * O ** U * S O V A * S O V B +
2*2*2 * O ** U * O ** U * S O V A * S O V C +
2*2*2 * O ** U * O ** U * S O V B * S O V B -
2*2*2 * O ** U * O ** U * S O V B * S O V C -
2*2*2 * O ** V * O ** V * S O U A * S O U B +
2*2*2 * O ** V * O ** V * S O U A * S O U C +
2*2*2 * O ** V * O ** V * S O U B * S O U B -
2*2*2 * O ** V * O ** V * S O U B * S O U C) /
(O ** V * O ** V * O ** U * O ** U).