(******************************************************************************)
(*   Some standard geometry definitions                                       *)
(******************************************************************************)
Definition collinear x y z := x ∨ y ∨ z = 0.
Definition line (x y : point) := x ∨ y.
Definition intersection (x y : vect) := x ∧ y.
Definition concur (l1 l2 l3 : vect) := l1 ∧ l2 ∧ l3 = 0.
Definition online (x y z : point) := y ∨ z <> 0 /\ x ∨ y ∨ z = 0.
Definition online1 (x : point) k1 (y : point) k2 (z : point) :=
x = k1 .* y + k2 .* z :> vect.
Definition inter_lines (x a b c d : point) : Prop :=
x = (a ∨ b) ∧ (c ∨ d) :> vect.

Theorem Desargues (a b c a' b' c': point) :
let AB := line a b in
let A'B' := line a' b' in
let p := intersection AB A'B' in
let AC := line a c in
let A'C' := line a' c' in
let q := intersection AC A'C' in
let BC := line b c in
let B'C' := line b' c' in
let r := intersection BC B'C' in
let AA' := line a a' in
let BB' := line b b' in
let CC' := line c c' in
collinear p q r <-> collinear a b c \/ collinear a' b' c' \/ concur AA' BB' CC'.