{{interfaces | imports = Interface:Triangle congruence | exports = Interface:Collinearity }}

This is part of a series of modules which prove a variety of geometrical theorems starting with Tarski's axioms for geometry. We follow the formalization of Julien Narboux<ref>The formal proofs are at http://www.lix.polytechnique.fr/Labo/Julien.Narboux/tarski.html Formalization of Tarski's geometry in the Coq proof assistant and are described in Julien Narboux (2007), "http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.158.8614 Mechanical Theorem Proving in Tarski’s Geometry", F. Botana and T. Recio (Eds.): ADG 2006, LNAI 4869, pp. 139–156</ref> which itself closely follows a treatise by Schwabhäuser, Szmielew, and Tarski.<ref>W. Schwabhäuser, W Szmielew, and A. Tarski (1983), ''Metamathematische Methoden in der Geometrie'', ISBN 0387129588</ref>

We import the theorems of propositional logic and predicate logic, and the geometry results so far and define some variables:

## Collinearity

To say that three points are collinear is just to say that one of them is between the other two (in any order).<ref>Definition Col in Narboux</ref>

### Permutations

One way to express the "in any order" concept is to provide permutation theorems. The first is rotation: collinear x y z ↔ collinear y z x.<ref>col_permutation_1 and col_permutation_2 in Narboux</ref>

The next permutation swaps the second and third points.<ref>col_permutation_5 in Narboux, biconditionalized</ref>

To swap the first and second points, we rotate and then swap the second and third points.<ref>col_permutation_4 in Narboux, biconditionalized</ref>

To swap the first and third points, we rotate and then swap the first and second points.<ref>col_permutation_3 in Narboux, biconditionalized</ref>

### Collinearity of a point, itself, and another point

A point is collinear with itself and any second point. That is, collinear A A B, and likewise for any other order of the three points.<ref>col_trivial_1, col_trivial_2, and col_trivial_3 in Narboux</ref>

### Collinearity and degenerate congruent triangles

The analogue to BetweennessDegenerateTriangle also holds for collinearity.<ref>l4_13 in Narboux</ref>

### Builder

Equals can be substituted for equals in a collinearity.

• ( → (∧ (∧ (= x0 y0) (= x1 y1)) (= x2 y2)) (↔ (collinear x0 x1 x2) (collinear y0 y1 y2))) (CollinearityBuilder)

## Constructing congruent degenerate triangles from collinear points

Given a (degenerate) triangle and a line segment congruent to one of the sides of the triangle, we can construct a second triangle on the line segment which is congruent to the given triangle. Here we prove a degenerate case, in which the points of the given triangle are collinear. In symbols, collinear A B C ∧ A B ≡ A′ B′ → ∃ c′ A B C ≅ A′ B′ c′.<ref>l4_14 in Narboux</ref> This is an analogue to InnerDegenerateTriangle but for collinearity rather than betweenness.

There are three cases, corresponding to the three betweenness predicates which make up the definition of collinear.

The first lemma is basically predicate logic. It enables us to move the two antecedents inside the quantifier.

## Five segment

<gallery> File:Five segment.svg|Outer five segment File:Inner five segment.svg|Inner five segment </gallery> This five segment theorem combines inner and outer five segment. It is A ≠ B ∧ collinear A B C ∧ A B C ≅ A′ B′ C′ ∧ A D ≡ A′ D′ ∧ B D ≡ B′ D′ → C D ≡ C′ D′.<ref>l4_16 in Narboux</ref> The illustrations show the inner and outer cases. A, B, and C correspond to x, y, and z but can be in any order (as long as A and B are the ones with known congruences). D corresponds to u.

We prove the result separately for each of the three betweenness relationships which make up the definition of collinear. Each of those proofs is just a matter of applying either inner or outer five segment, so it is just a matter of rearranging the many conjuncts which make up the antecedent of each theorem. The first bunch of lemmas are for those rearrangements.

• (→ (∧ p (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′))) (¬ (= A B))) (FiveSegment-anotb)
• (→ (∧ p (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′))) (≡ A B A′ B′)) (FiveSegment-ab)
• (→ (∧ p (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′))) (≡ B C B′ C′)) (FiveSegment-bc)
• (→ (∧ p (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′))) (≡ A D A′ D′)) (FiveSegment-ad)
• (→ (∧ p (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′))) (≡ B D B′ D′)) (FiveSegment-bd)
• (→ (∧ (between A B C) (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′))) (between A′ B′ C′)) (FiveSegment-abcabc)
• (→ (between A B C) (→ (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′)) (≡ C D C′ D′))) (FiveSegment-abc)
• (→ (∧ (between B C A) (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′))) (between B′ C′ A′)) (FiveSegment-bcabca)
• (→ (∧ p (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′))) (≡ C A C′ A′)) (FiveSegment-ca)
• (→ (between B C A) (→ (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′)) (≡ C D C′ D′))) (FiveSegment-bca) The third case is between C A B but due to the way that OuterFiveSegment is written, we need to write it as between B A C instead.
• (→ (∧ (between B A C) (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′))) (between B′ A′ C′)) (FiveSegment-bacbac)
• (→ (between B A C) (→ (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′)) (≡ C D C′ D′))) (FiveSegment-bac)
• (→ (between C A B) (→ (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′)) (≡ C D C′ D′))) (FiveSegment-cab)
• (→ (collinear A B C) (→ (∧ (∧ (∧ (¬ (= A B)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′)) (≡ C D C′ D′))) (FiveSegment-core) The only thing remaining is to rearrange the conjuncts in the antecedent. We write the rearrangement as a lemma.
• (→ (∧ (∧ (∧ (∧ p q) r) s) t) (∧ q (∧ (∧ (∧ p r) s) t))) (FiveSegment-conjuncts)
• (→ (∧ (∧ (∧ (∧ (¬ (= A B)) (collinear A B C)) (≅ A B C A′ B′ C′)) (≡ A D A′ D′)) (≡ B D B′ D′)) (≡ C D C′ D′)) (FiveSegment)

## Points equidistant from two given points

thumb|right|EquidistantLine If two given points are equidistant to each of two distinct points on a line, they are equidistant to every point on that line. That is, A ≠ B ∧ collinear A B C ∧ A P ≡ A Q ∧ B P ≡ B Q → C P ≡ C Q.<ref>l4_17 in Narboux</ref>

The proof applies FiveSegment with A B C as the collinear points for both parts and P and Q as the fourth points, respectively.

• (→ (∧ (∧ (∧ (¬ (= A B)) (collinear A B C)) (≡ A P A Q)) (≡ B P B Q)) (≡ C P C Q)) (EquidistantLine)

## Uniqueness of a point given distances to two collinear points

On a given line, the distance to two distinct points uniquely determines a point. That is, A ≠ B ∧ collinear A B C ∧ A C ≡ A C′ ∧ B C ≡ B C′ → C = C′. We prove this by applying EquidistantLine to the line A B C and the points C and C′, which gives us C C ≡ C C′.<ref>l4_18 in Narboux</ref>

## A point on a line segment

A point on a line segment is uniquely determined by its distance to the two endpoints. That is, between A C B ∧ A C ≡ A C′ ∧ B C ≡ B C′ → C = C′.<ref>l4_19 in Narboux</ref>

We divide the proof into two cases, A = B and A ≠ B.

The A = B case is easy; C also equals A and so A C ≡ A C′ implies C = C′.

The A ≠ B case follows easily from CollinearTwoDistanceUniqueness.

We can now assemble the theorem.

## Export

We now export to Interface:Collinearity.

<references/>