Orthogonality 2

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 which itself closely follows a treatise by Schwabhäuser, Szmielew, and Tarski.

This page is one of several involving perpendicular lines. We prove some additional theorems about, and define a predicate saying that lines are perpendicular at a point. A future page will enable us to prove the existence of the midpoint of a line segment.

We import the theorems of propositional logic and predicate logic, and the geometry results so far and define some variables:  import (CLASSICAL Interface:Classical_propositional_calculus ) import (FIRSTORDER Interface:First-order_logic_with_quantifiability (CLASSICAL) ) import (START Interface:Orthogonality_1 (CLASSICAL FIRSTORDER) )

var (point A B C D E F M P Q R S U V X Y Z) var (point U0 V0) var (point A′ B′ C′ D′ E′ M′ P′ Q′ R′ S′ X′ Y′) var (point C″) var (variable a a′ b b′ c c′ c″ d d′ e e′ f p p′ q r r′ u u′ v v′ x x′ y y′ z) var (variable u0 v0) 

Right angles
We've proved a number of the results relating to  in Orthogonality definitions. Here we pick up a few more (particularly ones for which the automatic expansion of definitions in Orthogonality definitions is inconvenient, and ones which follow from those).

Proving is-right-angle from an object
To prove  from   requires that we come up with a point which satisfies the conditions of. Here's a theorem which handles the logic involved in going from that point to an expression containing.  thm (RightAngleObject ( (z A) (z B) (z C) (z Z))  (((B is-midpoint-of C Z) ∧ (A C ≡ A Z)) → (is-right-angle A B C)) (  Our substitution is.  B EqualityReflexivity C EqualityReflexivity B B C C (value z) Z MidpointBuilder detach2of3 detach1of2

C EqualityReflexivity A EqualityReflexivity A EqualityReflexivity A A C C A A (value z) Z CongruenceBuilder detach1of4 detach2of3 detach1of2

buildConjunctionInConsequent  Now we just turn that into  and apply.  makeSubstExplicit eliminateBiconditionalForward

Z         z          ((B is-midpoint-of C (value z)) ∧ (A C ≡ A (value z))) ThereExistsIntroductionFromObject applySyllogism

A B C z RightAngle eliminateBiconditionalForward applySyllogism )) 

Swapping the vertex with one of the legs
Another degenerate case is.

Let  be the symmetric point of   through the point.

First assume  (if not, we are done). Then expand  by the definition:. We also flip  to   and expand it according to the definition:.  thm (RightAngleVertexLeg-cprime ((c′ A) (c′ B) (c′ C))   (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) → (∃ c′     (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧ ((B is-midpoint-of C (value c′)) ∧ (A C ≡ A (value c′)))) )) ( (B ≠ C)         ((is-right-angle A B C) ∧ (is-right-angle A C B)) ConjunctionLeftElimination eliminateRightConjunctInConsequent

A B C c′ RightAngle eliminateBiconditionalReverse applySyllogism

repeatAntecedentThereExists ))

thm (RightAngleVertexLeg-aprime ((C′ a′) (a′ A) (a′ B) (a′ C))   ( (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧     ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) → (∃ a′     ((((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧      ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ∧ ((C is-midpoint-of A (value a′)) ∧ (B A ≡ B (value a′)))) )) ( ((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ((B is-midpoint-of C C′) ∧ (A C ≡ A C′)) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateLeftConjunctInConsequent

A C B RightAngleSymmetry eliminateBiconditionalReverse applySyllogism

B C A a′ RightAngle eliminateBiconditionalReverse applySyllogism

repeatAntecedentThereExists )) 

Now we apply  to get.

 thm (RightAngleVertexLeg-cprime-c-a    ( ((((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧ ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ∧     ((C is-midpoint-of A A′) ∧ (B A ≡ B A′))) → (is-right-angle C′ C A) ) (  First is.  (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧           ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ((C is-midpoint-of A A′) ∧ (B A ≡ B A′)) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent eliminateLeftConjunctInConsequent

A C B RightAngleSymmetry eliminateBiconditionalReverse applySyllogism  Next is.  (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧           ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ((C is-midpoint-of A A′) ∧ (B A ≡ B A′)) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

composeConjunction  Finally is.  (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧           ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ((C is-midpoint-of A A′) ∧ (B A ≡ B A′)) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

C B C′ BetweennessCollinearity applySyllogism

composeConjunction

B C A C′ RightAngleLeg applySyllogism )) </jh>

We can paraphrase the definition of  as "the symmetric point of   through   is the same distance from   as   is". By symmetric point uniqueness, said symmetric point is just. We express this via the "uniqueness lemma",, which we prove after a few lemmas which reflect parts of its proof.  thm (RightAngleVertexLeg-uniqueness-lemma-z-aprime   ((((C is-midpoint-of A Z) ∧ (C′ A ≡ C′ Z)) ∧ (C is-midpoint-of A A′)) → (Z = A′)) ( ((C is-midpoint-of A Z) ∧ (C′ A ≡ C′ Z)) (C is-midpoint-of A A′) ConjunctionRightElimination eliminateRightConjunctInConsequent

((C is-midpoint-of A Z) ∧ (C′ A ≡ C′ Z)) (C is-midpoint-of A A′) ConjunctionLeftElimination

composeConjunction

C A Z A′ SymmetricPointUniqueness applySyllogism ))

thm (RightAngleVertexLeg-uniqueness-lemma-cprime-a-cprime-aprime   ((((C is-midpoint-of A Z) ∧ (C′ A ≡ C′ Z)) ∧ (C is-midpoint-of A A′)) → (C′ A ≡ C′ A′)) ( ((C is-midpoint-of A Z) ∧ (C′ A ≡ C′ Z)) (C is-midpoint-of A A′) ConjunctionRightElimination eliminateLeftConjunctInConsequent

C A Z C′ A′ RightAngleVertexLeg-uniqueness-lemma-z-aprime

A EqualityReflexivity C′ EqualityReflexivity C′ EqualityReflexivity C′ C′ A A C′ C′ Z A′ CongruenceBuilder detach1of4 detach2of3 detach1of2 eliminateBiconditionalReverseInConsequent

applySyllogism

applyModusPonensInConsequent ))

thm (RightAngleVertexLeg-uniqueness-lemma ( (z C′) (z C) (z A) (z A′))   (((is-right-angle C′ C A) ∧ (C is-midpoint-of A A′)) → (C′ A ≡ C′ A′)) ( (is-right-angle C′ C A)         (C is-midpoint-of A A′) ConjunctionRightElimination

C′ C A z RightAngle eliminateBiconditionalReverse applySyllogism

(is-right-angle C′ C A)         (C is-midpoint-of A A′) ConjunctionLeftElimination composeConjunction

moveRightConjunctIntoThereExistsInConsequent </jh> The consequent is now, so we just need to combine with the lemmas we already proved.  C A (value z) C′ A′ RightAngleVertexLeg-uniqueness-lemma-cprime-a-cprime-aprime z addThereExists applySyllogism

removeThereExistsInConsequent )) </jh>

Our next step is.  thm (RightAngleVertexLeg-aprime-c-aprime-cprime   ( ((((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧ ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ∧     ((C is-midpoint-of A A′) ∧ (B A ≡ B A′))) → (A′ C ≡ A′ C′) ) ( </jh> We start with, from the construction of.  (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧           ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ((C is-midpoint-of A A′) ∧ (B A ≡ B A′)) ConjunctionLeftElimination eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent swapCongruenceInConsequent commuteCongruenceLeftInConsequent </jh> Next is  (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧           ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ((C is-midpoint-of A A′) ∧ (B A ≡ B A′)) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateLeftConjunctInConsequent

applyCongruenceTransitivityInConsequent </jh> Next is, which follows readily from the uniqueness lemma. The uniqueness lemma needs  and , and it gives us.  B C A C′ A′ RightAngleVertexLeg-cprime-c-a

(((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧           ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ((C is-midpoint-of A A′) ∧ (B A ≡ B A′)) ConjunctionLeftElimination eliminateRightConjunctInConsequent

composeConjunction

C′ C A A′ RightAngleVertexLeg-uniqueness-lemma applySyllogism commuteCongruenceInConsequent

applyCongruenceTransitivityInConsequent )) </jh>

Next is.  thm (RightAngleVertexLeg-aprime-b-c   ( ((((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧ ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ∧     ((C is-midpoint-of A A′) ∧ (B A ≡ B A′))) → (is-right-angle A′ B C) ) ( </jh> We start with.  (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧           ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ((C is-midpoint-of A A′) ∧ (B A ≡ B A′)) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateRightConjunctInConsequent

B C A C′ A′ RightAngleVertexLeg-aprime-c-aprime-cprime

composeConjunction </jh> Applying  we are done.  B C C′ A′ RightAngleObject applySyllogism )) </jh>

 thm (RightAngleVertexLeg-b-not-c-1   ( ((((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧ ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ∧     ((C is-midpoint-of A A′) ∧ (B A ≡ B A′))) → (B = C) ) ( </jh> First we need.  (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧           ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ((C is-midpoint-of A A′) ∧ (B A ≡ B A′)) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent eliminateRightConjunctInConsequent </jh> Next we need.  B C A C′ A′ RightAngleVertexLeg-aprime-b-c composeConjunction </jh> Finally we need  (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) ∧           ((B is-midpoint-of C C′) ∧ (A C ≡ A C′))) ((C is-midpoint-of A A′) ∧ (B A ≡ B A′)) ConjunctionLeftElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

composeConjunction A B C A′ RightAngleBetween applySyllogism ))

thm (RightAngleVertexLeg-b-not-c ( (c′ A) (c′ B) (c′ C) (c′ a′) (a′ A) (a′ B) (a′ C))   (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (is-right-angle A C B))) → (B = C)) ( B C A c′ RightAngleVertexLeg-cprime

B C A (value c′) a′ RightAngleVertexLeg-aprime c′ addThereExists applySyllogism

B C A (value c′) (value a′) RightAngleVertexLeg-b-not-c-1 a′ addThereExists c′ addThereExists applySyllogism

removeThereExistsInConsequent removeThereExistsInConsequent ))

thm (RightAngleVertexLeg   (((is-right-angle A B C) ∧ (is-right-angle A C B)) → (B = C)) ( (B = C)         ((is-right-angle A B C) ∧ (is-right-angle A C B)) AntecedentIntroduction

B C A RightAngleVertexLeg-b-not-c export

eliminateCases )) </jh>

A leg which is perpendicular to itself
Another degenerate case is. The proof is that  gives us , but   is a theorem, so we are done.  thm (RightAngleLegItself  ((is-right-angle A B A) → (A = B)) ( B A RightAngleABB

B A A RightAngleSymmetry eliminateBiconditionalReverse applyModusPonens

A B A RightAngleVertexLeg detach2of2

B A EqualitySymmetry eliminateBiconditionalReverse applySyllogism )) </jh>

Three points which are both perpendicular and collinear
If three points are both perpendicular and collinear, then one of the legs must be an empty line segment.  thm (RightAngleCollinear  (((is-right-angle A B C) ∧ (collinear A B C)) → ((A = B) ∨ (C = B))) ( </jh> The  case is trivial. <jh> (A = B)         ((is-right-angle A B C) ∧ (collinear A B C)) ConjunctionRightElimination

(A = B) (C = B) DisjunctionRightIntroduction applySyllogism

export </jh> The  case is only slightly harder. We apply  which in this case is. <jh> (A ≠ B)         ((is-right-angle A B C) ∧ (collinear A B C)) ConjunctionLeftElimination eliminateRightConjunctInConsequent

(A ≠ B)         ((is-right-angle A B C) ∧ (collinear A B C)) ConjunctionRightElimination composeConjunction

(A ≠ B)         ((is-right-angle A B C) ∧ (collinear A B C)) ConjunctionLeftElimination eliminateLeftConjunctInConsequent

A B C Collinearity12 eliminateBiconditionalReverse applySyllogism

composeConjunction

A B C C RightAngleLeg applySyllogism </jh> Then  immediately follows from. <jh> C B RightAngleLegItself applySyllogism

(C = B) (A = B) DisjunctionLeftIntroduction applySyllogism

export </jh> Combining the cases we are done. <jh> eliminateCases )) </jh>

Slight variant of RightAngleABB
We'll want this straightforward consequence of  in a moment.

<jh> thm (RightAngleABBFromEquality   ((B = C) → (is-right-angle A B C)) ( A B RightAngleABB

A EqualityReflexivity B EqualityReflexivity A A B B B C RightAngleBuilder detach2of3 detach1of2

detachImplicationBiconditional )) </jh>

A congruence theorem
The only reason we rederive this theorem, rather than importing it, is to avoid editing all the interfaces between Betweenness of points and here. <jh> thm (NegatedCongruenceIdentityFromEquality   (((A ≠ B) ∧ (A B ≡ C D)) → (C ≠ D)) ( A B C D CongruenceSymmetry eliminateBiconditionalReverse (A ≠ B) conjoinLL

C D A B CongruenceIdentityFromEquality export applyComm

(C = D) (A = B) Transposition eliminateBiconditionalReverse applySyllogism

applyComm import applySyllogism )) </jh>

An angle congruent to a right angle is a right angle
That is,.

We start with the  case, where we first conclude   and so the conclusion follows from. <jh> thm (RightAngleCongruence-b-c   (((B = C) ∧ ((is-right-angle A B C) ∧ (A B C ≅ A′ B′ C′))) → (is-right-angle A′ B′ C′)) ( (B = C)         ((is-right-angle A B C) ∧ (A B C ≅ A′ B′ C′)) ConjunctionRightElimination

(B = C)         ((is-right-angle A B C) ∧ (A B C ≅ A′ B′ C′)) ConjunctionLeftElimination eliminateLeftConjunctInConsequent

A B C A′ B′ C′ Congruence23 applySyllogism

composeConjunction

B C B′ C′ CongruenceIdentityFromEquality applySyllogism

B′ C′ A′ RightAngleABBFromEquality applySyllogism )) </jh>

Here's the sketch of the  case. Let  be the point we get by expanding the definition of   (that is,  ). Let  be the symmetric point of   through. Now we just need. We apply outer five segment with baselines  and points   and , which gives us. We have  from the construction of   and   from. So by transitivity, we have  which is what we needed.

It will be most convenient to start with the construction of  and. First we construct  by expanding the definition of   and moving terms inside the quantifier. <jh> thm (RightAngleCongruence-d ((d A) (d B) (d C) (d A′) (d B′) (d C′))  (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (A B C ≅ A′ B′ C′))) → (∃ d ((B ≠ C) ∧ (((B is-midpoint-of C (value d)) ∧ (A C ≡ A (value d))) ∧     (A B C ≅ A′ B′ C′))))) ( A B C d RightAngle eliminateBiconditionalReverse

(A B C ≅ A′ B′ C′) conjoinRR moveRightConjunctIntoThereExistsInConsequent

(B ≠ C) conjoinLL moveLeftConjunctIntoThereExistsInConsequent )) </jh>

Next we construct  as the symmetric point of   through. <jh> thm (RightAngleCongruence-dprime ((d′ A) (d′ B) (d′ C) (d′ A′) (d′ B′) (d′ C′) (d′ D))  (((B ≠ C) ∧    (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) → (∃ d′ (((B ≠ C) ∧     (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) ∧ (B′ is-midpoint-of C′ (value d′)))   ) ) (       d′ B′ C′ SymmetricPoint

((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) introduceAntecedent repeatAntecedentThereExists )) </jh>

Having constructed our points, we can get going, starting with, which follows from   and. <jh> thm (RightAngleCongruence-bprime-not-cprime   ((((B ≠ C) ∧ (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧       (A B C ≅ A′ B′ C′))) ∧      (B′ is-midpoint-of C′ D′)) → (B′ ≠ C′)) ( ((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionRightElimination eliminateRightConjunctInConsequent

((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateLeftConjunctInConsequent

A B C A′ B′ C′ Congruence23 applySyllogism

composeConjunction

B C B′ C′ NegatedCongruenceIdentityFromEquality applySyllogism )) </jh>

Next is outer five segment with baselines  and points   and , to get.

<jh> thm (RightAngleCongruence-d-a-dprime-aprime   ((((B ≠ C) ∧ (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧       (A B C ≅ A′ B′ C′))) ∧      (B′ is-midpoint-of C′ D′)) → (D A ≡ D′ A′)) ( </jh> : <jh> ((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionRightElimination eliminateRightConjunctInConsequent

B C EqualitySymmetry addNegation eliminateBiconditionalReverse applySyllogism </jh> : <jh> ((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

composeConjunction </jh> : <jh> ((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionLeftElimination eliminateRightConjunctInConsequent

composeConjunction </jh> : <jh> ((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateLeftConjunctInConsequent

A B C A′ B′ C′ Congruence23 applySyllogism commuteCongruenceInConsequent

composeConjunction </jh> Next is, which follows from  ,  , and. <jh> ((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent swapCongruenceInConsequent commuteCongruenceRightInConsequent

((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateLeftConjunctInConsequent

A B C A′ B′ C′ Congruence23 applySyllogism applyCongruenceTransitivityInConsequent

((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionLeftElimination eliminateLeftConjunctInConsequent commuteCongruenceLeftInConsequent applyCongruenceTransitivityInConsequent

composeConjunction </jh> : <jh> ((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateLeftConjunctInConsequent

A B C A′ B′ C′ Congruence13 applySyllogism commuteCongruenceInConsequent

composeConjunction </jh> : <jh> ((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateLeftConjunctInConsequent

A B C A′ B′ C′ Congruence12 applySyllogism commuteCongruenceInConsequent

composeConjunction </jh> Applying outer five segment gives us. <jh> C B D C′ B′ D′ A A′ OuterFiveSegment applySyllogism )) </jh>

Now we apply transitivity on some line segment congruences which we already have to get.

<jh> thm (RightAngleCongruence-aprime-cprime-aprime-dprime   ((((B ≠ C) ∧ (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧       (A B C ≅ A′ B′ C′))) ∧      (B′ is-midpoint-of C′ D′)) → (A′ C′ ≡ A′ D′)) ( </jh> First is , <jh> ((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateLeftConjunctInConsequent

A B C A′ B′ C′ Congruence13 applySyllogism swapCongruenceInConsequent </jh> followed by , <jh> ((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent

applyCongruenceTransitivityInConsequent </jh> and finally. <jh> B C D A A′ B′ C′ D′ RightAngleCongruence-d-a-dprime-aprime commuteCongruenceInConsequent applyCongruenceTransitivityInConsequent )) </jh>

That's all the major pieces of. We just need to do a bit of assembly.

<jh> thm (RightAngleCongruence-aprime-bprime-cprime   ((((B ≠ C) ∧ (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧     (A B C ≅ A′ B′ C′))) ∧    (B′ is-midpoint-of C′ D′)) → (is-right-angle A′ B′ C′)) ( </jh> The first piece is , <jh> ((B ≠ C) ∧         (((B is-midpoint-of C D) ∧ (A C ≡ A D)) ∧ (A B C ≅ A′ B′ C′))) (B′ is-midpoint-of C′ D′) ConjunctionLeftElimination </jh> and the second piece is. <jh> B C D A A′ B′ C′ D′ RightAngleCongruence-aprime-cprime-aprime-dprime composeConjunction </jh> We can now turn those two pieces into. <jh> B′ C′ D′ A′ RightAngleObject applySyllogism ))

thm (RightAngleCongruence-b-not-c ((d d′ A) (d d′ B) (d d′ C) (d d′ A′) (d d′ B′) (d d′ C′))   (((B ≠ C) ∧ ((is-right-angle A B C) ∧ (A B C ≅ A′ B′ C′))) → (is-right-angle A′ B′ C′)) ( B C A A′ B′ C′ d RightAngleCongruence-d

B C (value d) A A′ B′ C′ d′ RightAngleCongruence-dprime d addThereExists applySyllogism

B C (value d) A A′ B′ C′ (value d′) RightAngleCongruence-aprime-bprime-cprime d′ addThereExists d addThereExists applySyllogism

removeThereExistsInConsequent removeThereExistsInConsequent ))

thm (RightAngleCongruence  (((is-right-angle A B C) ∧ (A B C ≅ A′ B′ C′)) → (is-right-angle A′ B′ C′)) ( B C A A′ B′ C′ RightAngleCongruence-b-c export

B C A A′ B′ C′ RightAngleCongruence-b-not-c export

eliminateCases )) </jh>

Perpendicular lines at a point
The line  is perpendicular to the line   at the point   if that point lies on both lines and if choosing one point from each line plus the vertex   always produces a right angle. In symbols,  is defined as.

<jh> def ((⟂at A B C D X) (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧ (∀ u (∀ v (((collinear (value u) A B) ∧ (collinear (value v) C D)) →    (is-right-angle (value u) X (value v))))))) </jh>

Definition as a theorem
As usual, we'll need a theorem form of the definition. <jh> thm (PerpendicularAt ((u v A) (u v B) (u v C) (u v D) (u v X)   (u′ v′ u v) (u′ v′ A) (u′ v′ B) (u′ v′ C) (u′ v′ D) (u′ v′ X))   ((A B C D ⟂at X) ↔ (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧    (∀ u (∀ v (((collinear (value u) A B) ∧ (collinear (value v) C D)) → (is-right-angle (value u) X (value v))))))) ( </jh> We start with. <jh> D EqualityReflexivity C EqualityReflexivity (value v) (value v′) C C D D CollinearityBuilder detach2of3 detach2of2

(collinear (value u) A B) buildConjunctionLLInConsequent

(value u) EqualityReflexivity X EqualityReflexivity (value u) (value u) X X (value v) (value v′) RightAngleBuilder detach2of3 detach1of2

buildImplicationInConsequent </jh> We turn that into. <jh> ChangeVariableForAll u buildForAll </jh> Now we pull the same trick for, starting with. <jh> B EqualityReflexivity A EqualityReflexivity (value u) (value u′) A A B B CollinearityBuilder detach2of3 detach2of2

(collinear (value v′) C D) buildConjunctionRRInConsequent

(value v′) EqualityReflexivity X EqualityReflexivity (value u) (value u′) X X (value v′) (value v′) RightAngleBuilder detach2of3 detach2of2

buildImplicationInConsequent

v′ buildForAllInConsequent

ChangeVariableForAll

applyBiconditionalTransitivity </jh> That's the hard part; the bit outside the quantifiers needs no extra work. <jh> ((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) buildConjunctionLL swapBiconditional )) </jh>

Symmetry
Here we prove. The concept is pretty simple: expand the definition and apply symmetry to each piece. The only thing which makes this proof a bit long is the number of pieces. <jh> thm (PerpendicularAtSymmetry ( (u v A) (u v B) (u v C) (u v D) (u v X))   ((A B C D ⟂at X) ↔ (C D A B ⟂at X)) ( </jh> Before we get started, we'll expand  according to the definition. <jh> A B C D X u v PerpendicularAt </jh> Working on the left hand part of the definition, we just need to apply conjunction commutativity and associativity. <jh> ((A ≠ B) ∧ (C ≠ D)) (collinear X A B)         (collinear X C D)          ConjunctionAssociativity

(A ≠ B) (C ≠ D) ConjunctionCommutativity (collinear X A B) (collinear X C D) ConjunctionCommutativity buildConjunction applyBiconditionalTransitivity

((C ≠ D) ∧ (A ≠ B)) (collinear X C D)         (collinear X A B)          ConjunctionAssociativity swapBiconditional applyBiconditionalTransitivity </jh> That's the easy part. Next is <jh> (collinear (value u) A B) (collinear (value v) C D) ConjunctionCommutativity (value u) X (value v) RightAngleSymmetry buildImplication

v buildForAll u buildForAll

u v         (((collinear (value v) C D) ∧ (collinear (value u) A B)) →            (is-right-angle (value v) X (value u))) ForAllCommutation applyBiconditionalTransitivity </jh> Now we just need to combine the two halves and unexpand the definition on the right side. <jh> buildConjunction applyBiconditionalTransitivity

C D A B X v u PerpendicularAt swapBiconditional applyBiconditionalTransitivity )) </jh>

Only one point on each line is needed
The definition of  might seem a bit odd, in that it would intuitively appear that one point on each line which forms a right angle would suffice, rather than needing to make an assertion about all points on those lines. In fact, this intuition is correct subject to the condition that the points being chosen on the line do not equal the vertex. In symbols,.

The proof is based on the idea that,  ,   are on a line and we'll also consider an arbitrary point, which we'll call  , on that line. We'll use  to turn   to   (and some collinearity transitivity to set up the hypotheses for  ). Then we'll do much the same for,  ,  , and an arbitrary point   on the line   to. Fortunately, the first half and the similar half are similar enough that we can break it off into a lemma which we'll be able to apply twice.

The lemma is. In this case,  is. The first two hypotheses we have, so the first part of our proof is headed towards. We'll start by applying collinearity transitivity twice.

The first collinearity is  by transitivity from ,   and.

<jh> thm (PerpendicularAtThereExists-b-u-u0   (((((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧ (is-right-angle U X V)) ∧ (U ≠ X)) → (collinear B U U0)) ( (((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧           (is-right-angle U X V)) (U ≠ X)         ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

A B EqualitySymmetry addNegation eliminateBiconditionalReverse applySyllogism

(((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧           (is-right-angle U X V)) (U ≠ X)         ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent

A B U Collinearity12 eliminateBiconditionalReverse applySyllogism

composeConjunction

(((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧           (is-right-angle U X V)) (U ≠ X)         ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent

A B U0 Collinearity12 eliminateBiconditionalReverse applySyllogism

composeConjunction

B A U U0 CollinearityOuterTransitivity applySyllogism )) </jh>

The other collinearity is  by transitivity from ,   and.

<jh> thm (PerpendicularAtThereExists-b-u-x   (((((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧ (is-right-angle U X V)) ∧ (U ≠ X)) → (collinear B U X)) ( (((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧           (is-right-angle U X V)) (U ≠ X)         ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

(((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧           (is-right-angle U X V)) (U ≠ X)         ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent composeConjunction

(((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧           (is-right-angle U X V)) (U ≠ X)         ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent composeConjunction

A B U X CollinearityInnerTransitivity applySyllogism )) </jh>

At this point we prove  by considering   and   cases.

For the  case, we first apply transitivity to give   (from ,   and  ). <jh> thm (PerpendicularAtThereExists-b-x-u0   (((((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧ (is-right-angle U X V)) ∧ (U ≠ X)) → (collinear B X U0)) ( (((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧           (is-right-angle U X V)) (U ≠ X)         ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

(((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧           (is-right-angle U X V)) (U ≠ X)         ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent composeConjunction

(((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧           (is-right-angle U X V)) (U ≠ X)         ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent composeConjunction

A B X U0 CollinearityInnerTransitivity applySyllogism )) </jh> The rest of the  case is just substituting   for   in   to get.

<jh> thm (PerpendicularAtThereExists-b-u   (((B = U) ∧ ((((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧      (is-right-angle U X V)) ∧ (U ≠ X))) → (collinear X U U0)) ( </jh> First we apply the previous result to get. <jh> (B = U)         ((((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧ (is-right-angle U X V)) ∧ (U ≠ X)) ConjunctionLeftElimination

A B U0 X U V PerpendicularAtThereExists-b-x-u0 applySyllogism

</jh> Now we use a substitution to get. <jh> (B = U)         ((((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧ (is-right-angle U X V)) ∧ (U ≠ X)) ConjunctionRightElimination

X EqualityReflexivity U0 EqualityReflexivity B U X X U0 U0 CollinearityBuilder detach2of2 detach2of2

applySyllogism eliminateBiconditionalReverseInConsequent </jh> Combining those two and adjusting the order of the operands we are done. <jh> applyModusPonensInConsequent

U X U0 Collinearity12 eliminateBiconditionalReverse applySyllogism )) </jh>

The  case applies transitivity to ,   and  , to give.

<jh> thm (PerpendicularAtThereExists-b-not-u   (((B ≠ U) ∧ ((((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧      (is-right-angle U X V)) ∧ (U ≠ X))) → (collinear X U U0)) ( (B ≠ U)         ((((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧ (is-right-angle U X V)) ∧ (U ≠ X)) ConjunctionRightElimination

(B ≠ U)         ((((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧ (is-right-angle U X V)) ∧ (U ≠ X)) ConjunctionLeftElimination A B U0 X U V PerpendicularAtThereExists-b-u-u0 applySyllogism composeConjunction

(B ≠ U)         ((((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧ (is-right-angle U X V)) ∧ (U ≠ X)) ConjunctionLeftElimination A B U0 X U V PerpendicularAtThereExists-b-u-x applySyllogism composeConjunction

B U U0 X CollinearityInnerTransitivity applySyllogism

X U U0 CollinearityRotation eliminateBiconditionalForward applySyllogism ))

</jh> Combining the two cases gives. <jh> thm (PerpendicularAtThereExists-x-u-u0   (((((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧ (is-right-angle U X V)) ∧ (U ≠ X)) → (collinear X U U0)) ( B U A U0 X V PerpendicularAtThereExists-b-u export

B U A U0 X V PerpendicularAtThereExists-b-not-u export

eliminateCases )) </jh>

We're now ready to prove the lemma. We just need to apply  which is.

<jh> thm (PerpendicularAtThereExists-half   (((((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧ (is-right-angle U X V)) ∧ (U ≠ X)) → (is-right-angle U0 X V)) ( (((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧           (is-right-angle U X V)) (U ≠ X)         ConjunctionRightElimination eliminateLeftConjunctInConsequent

(((((A ≠ B) ∧ (collinear A B U0)) ∧ (collinear A B X)) ∧ (collinear A B U)) ∧           (is-right-angle U X V)) (U ≠ X)         ConjunctionLeftElimination composeConjunction

A B U0 X U V PerpendicularAtThereExists-x-u-u0 composeConjunction

U X V U0 RightAngleLeg applySyllogism )) </jh>

Now we apply this lemma twice to give.

The first application of the lemma is. <jh> thm (PerpendicularAtThereExists-u0-x-v   (((((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧ (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ∧ ((collinear U0 A B) ∧ (collinear V0 C D))) → (is-right-angle U0 X V)) ( </jh> . <jh> (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧         (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ((collinear U0 A B) ∧ (collinear V0 C D)) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

</jh> : <jh> (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧         (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ((collinear U0 A B) ∧ (collinear V0 C D)) ConjunctionLeftElimination eliminateRightConjunctInConsequent

U0 A B CollinearityRotation eliminateBiconditionalReverse applySyllogism

composeConjunction </jh> : <jh> (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧         (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ((collinear U0 A B) ∧ (collinear V0 C D)) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent

X A B CollinearityRotation eliminateBiconditionalReverse applySyllogism

composeConjunction </jh> : <jh> (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧         (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ((collinear U0 A B) ∧ (collinear V0 C D)) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

U A B CollinearityRotation eliminateBiconditionalReverse applySyllogism

composeConjunction </jh> : <jh> (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧         (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ((collinear U0 A B) ∧ (collinear V0 C D)) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateLeftConjunctInConsequent

composeConjunction </jh> : <jh> (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧         (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ((collinear U0 A B) ∧ (collinear V0 C D)) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent

composeConjunction

A B U0 X U V PerpendicularAtThereExists-half applySyllogism )) </jh>

Applying the lemma a second time is only slightly more complicated.

<jh> thm (PerpendicularAtThereExists-u0-x-v0   (((((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧ (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ∧ ((collinear U0 A B) ∧ (collinear V0 C D))) → (is-right-angle U0 X V0)) ( </jh> : <jh> (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧         (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ((collinear U0 A B) ∧ (collinear V0 C D)) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent </jh> : <jh> (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧         (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ((collinear U0 A B) ∧ (collinear V0 C D)) ConjunctionLeftElimination eliminateLeftConjunctInConsequent

V0 C D CollinearityRotation eliminateBiconditionalReverse applySyllogism

composeConjunction </jh> : <jh> (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧         (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ((collinear U0 A B) ∧ (collinear V0 C D)) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent

X C D CollinearityRotation eliminateBiconditionalReverse applySyllogism

composeConjunction </jh> : <jh> (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧         (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ((collinear U0 A B) ∧ (collinear V0 C D)) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent

V C D CollinearityRotation eliminateBiconditionalReverse applySyllogism

composeConjunction </jh> At this point our proof builds on the previous proof. We need. <jh> A B C D X U V U0 V0 PerpendicularAtThereExists-u0-x-v

U0 X V RightAngleSymmetry eliminateBiconditionalReverse applySyllogism

composeConjunction </jh> : <jh> (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧         (((((collinear U A B) ∧ (collinear V C D)) ∧ (U ≠ X)) ∧ (V ≠ X)) ∧ (is-right-angle U X V))) ((collinear U0 A B) ∧ (collinear V0 C D)) ConjunctionRightElimination eliminateLeftConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent

composeConjunction

C D V0 X V U0 PerpendicularAtThereExists-half applySyllogism

V0 X U0 RightAngleSymmetry eliminateBiconditionalReverse applySyllogism )) </jh>

Now we need to handle the logic to turn that into our desired theorem.

<jh> thm (PerpendicularAtThereExists-1 ((u v A) (u v B) (u v C) (u v D) (u v X) (u v U0) (u v V0))   ( (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧     (∃ u (∃ v (((((collinear (value u) A B) ∧ (collinear (value v) C D)) ∧ ((value u) ≠ X)) ∧ ((value v) ≠ X)) ∧ (is-right-angle (value u) X (value v)))))) → (((collinear U0 A B) ∧ (collinear V0 C D)) →   (is-right-angle U0 X V0))) ( </jh> First we move the quantifiers to the start. <jh> u         ((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) (∃ v (((((collinear (value u) A B) ∧ (collinear (value v) C D)) ∧ ((value u) ≠ X)) ∧ ((value v) ≠ X)) ∧ (is-right-angle (value u) X (value v)))) ThereExistsConjunctionMovement eliminateBiconditionalForward

v         ((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) (((((collinear (value u) A B) ∧ (collinear (value v) C D)) ∧           ((value u) ≠ X)) ∧ ((value v) ≠ X)) ∧              (is-right-angle (value u) X (value v))) ThereExistsConjunctionMovement eliminateBiconditionalForward u addThereExists applySyllogism </jh> Now we apply. <jh> A B C D X (value u) (value v) U0 V0 PerpendicularAtThereExists-u0-x-v0 export

v addThereExists u addThereExists applySyllogism

removeThereExistsInConsequent removeThereExistsInConsequent ))

thm (PerpendicularAtThereExists ((u v A) (u v B) (u v C) (u v D) (u v X)

(u v u0 v0) (u0 v0 A) (u0 v0 B) (u0 v0 C) (u0 v0 D) (u0 v0 X))  ( (((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) ∧     (∃ u (∃ v (((((collinear (value u) A B) ∧ (collinear (value v) C D)) ∧ ((value u) ≠ X)) ∧ ((value v) ≠ X)) ∧ (is-right-angle (value u) X (value v)))))) → (A B C D ⟂at X) ) ( ((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) (∃ u (∃ v (((((collinear (value u) A B) ∧ (collinear (value v) C D)) ∧           ((value u) ≠ X)) ∧ ((value v) ≠ X)) ∧            (is-right-angle (value u) X (value v))))) ConjunctionRightElimination

A B C D X u v (value u0) (value v0) PerpendicularAtThereExists-1 v0 addForAllToConsequent u0 addForAllToConsequent

composeConjunction )) </jh>

Perpendicular lines meet at right angles
Narboux doesn't explicitly state the following lemma (apparently his coq tactics cover it), but it states that if lines are perpendicular at a point, they form a right angle there. The proof may seem a bit long, but the idea is simple: expand  according to the definition to get. Substitute  for   and   for   to get , and then detach   and   as they are theorems.

<jh> thm (PerpendicularAtRightAngle ( (u v A) (u v B) (u v C) (u v D) (u v X))  ((A B C D ⟂at X) → (is-right-angle A X C)) ( </jh> We put the theorems on the proof stack for use at the end, and then expand. <jh> C D CollinearityAAB A B CollinearityAAB

A B C D X u v PerpendicularAt eliminateBiconditionalReverse

((((A ≠ B) ∧ (C ≠ D)) ∧ (collinear X A B)) ∧ (collinear X C D)) (∀ u (∀ v (((collinear (value u) A B) ∧ (collinear (value v) C D)) →           (is-right-angle (value u) X (value v))))) ConjunctionLeftElimination applySyllogism

</jh> Now we substitute  for. <jh> A specializeToObjectInConsequent

B EqualityReflexivity A EqualityReflexivity (value u) A A A B B CollinearityBuilder detach2of3 detach2of2

(collinear (value v) C D) buildConjunctionRRInConsequent

(value v) EqualityReflexivity X EqualityReflexivity (value u) A X X (value v) (value v) RightAngleBuilder detach2of3 detach2of2

buildImplicationInConsequent v buildForAllInConsequent

makeSubstExplicit eliminateBiconditionalReverse applySyllogism </jh> Now we substitute  for. <jh> C specializeToObjectInConsequent

D EqualityReflexivity C EqualityReflexivity (value v) C C C D D CollinearityBuilder detach2of3 detach2of2

(collinear A A B) buildConjunctionLLInConsequent

A EqualityReflexivity X EqualityReflexivity A A X X (value v) C RightAngleBuilder detach2of3 detach1of2

buildImplicationInConsequent

makeSubstExplicit eliminateBiconditionalReverse applySyllogism </jh> Now we detach the two degenerate collinearities. <jh> exportInConsequent detachImplicationImplication detachImplicationImplication )) </jh>

Builder
Equals can be substituted for equals, in the context of. Because the definition of  is long, this proof is kind of long, but it is just a straightforward application of the builders for everything making up the definition of. <jh> thm (PerpendicularAtBuilder ( (u v A) (u v B) (u v C) (u v D) (u v X) (u v A′) (u v B′) (u v C′) (u v D′) (u v X′))   ((((((A = A′) ∧ (B = B′)) ∧ (C = C′)) ∧ (D = D′)) ∧ (X = X′)) → ((A B C D ⟂at X) ↔ (A′ B′ C′ D′ ⟂at X′))) ( </jh> : <jh> ((((A = A′) ∧ (B = B′)) ∧ (C = C′)) ∧ (D = D′)) (X = X′) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

A A′ B B′ EqualityBuilder applySyllogism addNegationInConsequent

</jh> : <jh> ((((A = A′) ∧ (B = B′)) ∧ (C = C′)) ∧ (D = D′)) (X = X′) ConjunctionRightElimination

((A = A′) ∧ (B = B′)) (C = C′) (D = D′) ConjunctionAssociativity eliminateBiconditionalReverse applySyllogism eliminateLeftConjunctInConsequent

C C′ D D′ EqualityBuilder applySyllogism addNegationInConsequent

buildConjunctionInConsequent </jh> : <jh> ((((A = A′) ∧ (B = B′)) ∧ (C = C′)) ∧ (D = D′)) (X = X′) ConjunctionLeftElimination

((((A = A′) ∧ (B = B′)) ∧ (C = C′)) ∧ (D = D′)) (X = X′) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

composeConjunction

((((A = A′) ∧ (B = B′)) ∧ (C = C′)) ∧ (D = D′)) (X = X′) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent

composeConjunction

X X′ A A′ B B′ CollinearityBuilder applySyllogism

buildConjunctionInConsequent </jh> : <jh> ((((A = A′) ∧ (B = B′)) ∧ (C = C′)) ∧ (D = D′)) (X = X′) ConjunctionLeftElimination

((((A = A′) ∧ (B = B′)) ∧ (C = C′)) ∧ (D = D′)) (X = X′) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent

composeConjunction

((((A = A′) ∧ (B = B′)) ∧ (C = C′)) ∧ (D = D′)) (X = X′) ConjunctionRightElimination eliminateLeftConjunctInConsequent

composeConjunction

X X′ C C′ D D′ CollinearityBuilder applySyllogism

buildConjunctionInConsequent </jh> What we have left is, starting with. <jh> ((((A = A′) ∧ (B = B′)) ∧ (C = C′)) ∧ (D = D′)) (X = X′) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

(value u) EqualityReflexivity (value u) (value u) A A′ B B′ CollinearityBuilder detach1of3

applySyllogism </jh> : <jh> ((((A = A′) ∧ (B = B′)) ∧ (C = C′)) ∧ (D = D′)) (X = X′) ConjunctionRightElimination

((A = A′) ∧ (B = B′)) (C = C′) (D = D′) ConjunctionAssociativity eliminateBiconditionalReverse applySyllogism eliminateLeftConjunctInConsequent

(value v) EqualityReflexivity (value v) (value v) C C′ D D′ CollinearityBuilder detach1of3

applySyllogism

buildConjunctionInConsequent </jh> : <jh> ((((A = A′) ∧ (B = B′)) ∧ (C = C′)) ∧ (D = D′)) (X = X′) ConjunctionLeftElimination

(value u) EqualityReflexivity (value v) EqualityReflexivity (value u) (value u) X X′ (value v) (value v) RightAngleBuilder detach2of2 detach1of2

applySyllogism

buildImplicationInConsequent </jh> Now we add the quantifiers. <jh> v buildForAllInConsequent u buildForAllInConsequent

buildConjunctionInConsequent )) </jh>

Commutativity
As with line segment congruence, we use the word commutativity to refer to exchanging the points within each line (that is, ), and the word symmetry to exchanging the two lines.

We already proved symmetry, so next is commutativity on the left side. The proof is a straightforward exercise in expanding the definition and then commuting the relevant pieces. <jh> thm (PerpendicularAtLeftCommutativity ( (u v A) (u v B) (u v C) (u v D) (u v X))  ((A B C D ⟂at X) ↔ (B A C D ⟂at X)) ( A B C D X u v PerpendicularAt

A B EqualitySymmetry addNegation

(C ≠ D) buildConjunctionRR

X A B Collinearity23 buildConjunction

(collinear X C D) buildConjunctionRR

(value u) A B Collinearity23

(collinear (value v) C D) buildConjunctionRR

(is-right-angle (value u) X (value v)) buildImplicationConsequent

v buildForAll u buildForAll

buildConjunction

applyBiconditionalTransitivity

B A C D X u v PerpendicularAt swapBiconditional applyBiconditionalTransitivity )) </jh>

Right commutativity follows from left commutativity and symmetry. <jh> thm (PerpendicularAtRightCommutativity   ((A B C D ⟂at X) ↔ (A B D C ⟂at X)) ( A B C D X PerpendicularAtSymmetry

C D A B X PerpendicularAtLeftCommutativity applyBiconditionalTransitivity

D C A B X PerpendicularAtSymmetry applyBiconditionalTransitivity )) </jh>

Commutativity follows from left and right commutativity. <jh> thm (PerpendicularAtCommutativity   ((A B C D ⟂at X) ↔ (B A D C ⟂at X)) ( A B C D X PerpendicularAtLeftCommutativity

B A C D X PerpendicularAtRightCommutativity applyBiconditionalTransitivity )) </jh>

No line is perpendicular to itself
Here we show. The proof is by contradiction:  from the definition, but   will follow from two applications of. <jh> thm (PerpendicularIrreflexivityAt  (¬ (A B A B ⟂at X)) ( </jh> We start with  which in turn implies. <jh> A B A B X PerpendicularAtRightAngle A X RightAngleLegItself applySyllogism </jh> Then  implies. <jh> A B A B X PerpendicularAtCommutativity eliminateBiconditionalReverse

B A B A X PerpendicularAtRightAngle applySyllogism

B X RightAngleLegItself applySyllogism

B X EqualitySymmetry eliminateBiconditionalReverse applySyllogism </jh> Combining those equalities we get , <jh> composeConjunction

A X B EqualityTransitivity applySyllogism </jh> but that contradicts, which we already have. <jh> (A B A B ⟂at X) ImplicationReflexivity eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent

noteContradiction )) </jh>

Export
We now export to Interface:Orthogonality 2. <jh> export (RESULTS Interface:Orthogonality_2 (CLASSICAL FIRSTORDER) ) </jh>

Also, since this is currently the last proof module for geometry, we export to Interface:Basic geometry. <jh> export (GEOMETRY Interface:Basic_geometry (CLASSICAL FIRSTORDER) ) </jh>