(** We deduce the axioms of the area method. *)

Definition vect := (F * F)%type.Definition cross_product (u v : vect) : F :=
  fst u * snd v - snd u * fst v.Definition scalar_product (u v : vect) : F :=
  fst u * fst v + snd u * snd v.Definition ratio A B C D :=
  let (Ac, _) := coordinates_of_point_F A in
  let (Ax, Ay) := Ac in
  let (Bc, _) := coordinates_of_point_F B in
  let (Bx, By) := Bc in
  let (Cc, _) := coordinates_of_point_F C in
  let (Cx, Cy) := Cc in
  let (Dc, _) := coordinates_of_point_F D in
  let (Dx, Dy) := Dc in
  let VAB := (Bx-Ax, By-Ay) in
  let VCD := (Dx-Cx, Dy-Cy) in
  scalar_product VAB VCD / scalar_product VCD VCD.Definition signed_area A B C :=
  let (Ac, _) := coordinates_of_point_F A in
  let (Ax, Ay) := Ac in
  let (Bc, _) := coordinates_of_point_F B in
  let (Bx, By) := Bc in
  let (Cc, _) := coordinates_of_point_F C in
  let (Cx, Cy) := Cc in
  let VAB := (Bx-Ax, By-Ay) in
  let VAC := (Cx-Ax, Cy-Ay) in
  1 / 2 * cross_product VAB VAC.(** We introduce this definition to simplify the automatic proofs:*)

Definition twice_signed_area A B C :=
  let (Ac, _) := coordinates_of_point_F A in
  let (Ax, Ay) := Ac in
  let (Bc, _) := coordinates_of_point_F B in
  let (Bx, By) := Bc in
  let (Cc, _) := coordinates_of_point_F C in
  let (Cx, Cy) := Cc in
  let VAB := (Bx-Ax, By-Ay) in
  let VAC := (Cx-Ax, Cy-Ay) in
  cross_product VAB VAC.

Lemma signed_area_sum : forall A B C D, signed_area A B C =F= signed_area A B D + signed_area A D C + signed_area D B C.