Require Export GeoCoq.Tarski_dev.Ch16_coordinates.
Ltac cnf2 f :=
match f with
| ?A \/ (?B /\ ?C) =>
let c1 := cnf2 (A\/B) in
let c2 := cnf2 (A\/C) in constr:(c1/\c2)
| (?B /\ ?C) \/ ?A =>
let c1 := cnf2 (B\/A) in
let c2 := cnf2 (C\/A) in constr:(c1/\c2)
| (?A \/ ?B) \/ ?C =>
let c1 := cnf2 (B\/C) in cnf2 (A \/ c1)
| _ => f
end
with cnf f :=
match f with
| ?A \/ ?B =>
let c1 := cnf A in
let c2 := cnf B in
cnf2 (c1 \/ c2)
| ?A /\ ?B =>
let c1 := cnf A in
let c2 := cnf B in
constr:(c1 /\ c2)
| _ => f
end.
Ltac scnf :=
match goal with
| |- ?f => let c := cnf f in
assert c; [repeat split|]
end.
Section T17.
Context `{T2D:Tarski_2D}.
Context `{TE:@Tarski_euclidean Tn TnEQD}.
Definition O := PA.
Definition E := PB.
Definition E' := PC.

(* Specifications: *)
Lemma ncolOEE' : ~ Col O E E'.
Lemma sum_col: forall A B C, Sum O E E' A B C -> Col O E C.
Lemma prod_col: forall A B C, Prod O E E' A B C -> Col O E C.
Lemma prod_f : forall A B, Col O E A -> Col O E B -> {C | Prod O E E' A B C}.
Lemma diff_col: forall A B C, Diff O E E' A B C -> Col O E C.
Lemma diff_f : forall A B, Col O E A -> Col O E B -> {C | Diff O E E' A B C}.
Lemma opp_col : forall A B, Opp O E E' A B -> Col O E B.
Lemma opp_f : forall A, Col O E A -> {B | Opp O E E' A B}.
Lemma opp_pythrel : forall O E E' A B C C' , Opp O E E' C C' -> PythRel O E E' A B C -> PythRel O E E' A B C'.
Lemma pythrel_null : forall O E E' A B, PythRel O E E' A B O -> A = O /\ B = O.
Lemma pythrel_not_null : forall O E E' A B C, C <> O -> PythRel O E E' A B C -> A <> O \/ B <> O.
intros.