Line segment congruence

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.

We import the theorems of propositional logic and predicate logic, and the geometry axioms and define some variables:  import (CLASSICAL Interface:Classical_propositional_calculus ) import (FIRSTORDER Interface:First-order_logic_with_quantifiability (CLASSICAL) ) import (AXIOMS Interface:Tarski's_geometry_axioms (CLASSICAL FIRSTORDER) )

var (point x y z w u v A B C D E P Q A′ B′ C′ D′ B″ C″) var (point x′ y′ z′ w′ u′) var (variable a b b′ c d′ q q′ ww ww′ b″ c″) var (formula antecedent) 

Congruence
A line segment is congruent to itself.  thm (CongruenceReflexivity  (x y ≡ x y) ( y x CongruenceABBA y x CongruenceABBA introduceConjunction

y x x y x y CongruenceTransitivityAxiom

applyModusPonens )) 

Congruence is symmetrical. The biconditionalized version is not in Narboux, but fits our usual conventions and the nature of JHilbert.  thm (CongruenceSymmetryImplication  ((x y ≡ z w) → (z w ≡ x y)) ( x y CongruenceReflexivity x y z w x y CongruenceTransitivityAxiom detach2of2 ))

thm (CongruenceSymmetry  ((x y ≡ z w) ↔ (z w ≡ x y)) ( x y z w CongruenceSymmetryImplication z w x y CongruenceSymmetryImplication introduceBiconditionalFromImplications ))

thm (swapCongruenceInConsequent ((H (antecedent → (x y ≡ z w))))  (antecedent → (z w ≡ x y)) ( H       x y z w CongruenceSymmetryImplication applySyllogism )) 

Congruence is transitive.  thm (CongruenceTransitivity  (((x y ≡ z w) ∧ (z w ≡ u v)) → (x y ≡ u v)) ( x y z w CongruenceSymmetry eliminateBiconditionalReverse (z w ≡ u v) conjoinRR

z w x y u v CongruenceTransitivityAxiom

applySyllogism )) 

We can commute the endpoints of the first line segment.  thm (CongruenceLeftCommutativityImplication  ((x y ≡ z w) → (y x ≡ z w)) ( x y CongruenceABBA x y y x z w CongruenceTransitivityAxiom detach1of2 ))

thm (CongruenceLeftCommutativity  ((x y ≡ z w) ↔ (y x ≡ z w)) ( x y z w CongruenceLeftCommutativityImplication y x z w CongruenceLeftCommutativityImplication introduceBiconditionalFromImplications ))

thm (commuteCongruenceLeftInConsequent ((H (antecedent → (x y ≡ z w))))  (antecedent → (y x ≡ z w)) ( H       x y z w CongruenceLeftCommutativityImplication applySyllogism )) 

Likewise for the second line segment.  thm (CongruenceRightCommutativity  ((x y ≡ z w) ↔ (x y ≡ w z)) ( x y z w CongruenceSymmetry

z w x y CongruenceLeftCommutativity applyBiconditionalTransitivity

w z x y CongruenceSymmetry applyBiconditionalTransitivity ))

thm (commuteCongruenceRightInConsequent ((H (antecedent → (x y ≡ z w))))  (antecedent → (x y ≡ w z)) ( H       x y z w CongruenceRightCommutativity eliminateBiconditionalReverse applySyllogism )) 

A line segment with the same point as both of its endpoints is congruent to another such segment. To prove this, start with the line segment x x. Extend x y beyond y to another point a such that y a ≡ x x. Then we show that a must equal y.  thm (CongruenceTrivialIdentity ((a x) (a y)) (y y ≡ x x) ( a x y x x SegmentConstruction  Now we have. We drop the between part.  (between x y (value a)) (y (value a) ≡ x x) ConjunctionLeftElimination a addThereExists applyModusPonens  Here we combine  with our previous result and rearrange a bit to get.  y (value a) x CongruenceIdentity (y (value a) ≡ x x) ImplicationReflexivity composeConjunction a addThereExists applyModusPonens </jh> Now we just need a substitution. The substitution is.  x EqualityReflexivity x EqualityReflexivity y EqualityReflexivity y y y (value a) x x x x CongruenceBuilder detach1of4 detach2of2 detach2of2 </jh> Taking the reverse implication and combining with the previous result gives us.  eliminateBiconditionalForwardInConsequent import a addThereExists applyModusPonens </jh> The quantifier is no longer needed, and removing it finishes the proof.  removeThereExists )) </jh>

Here is a version of  with left and right sides swapped.  thm (CongruenceIdentityLeft  ((x x ≡ y z) → (y = z)) ( x x y z CongruenceSymmetry eliminateBiconditionalReverse

y z x CongruenceIdentity applySyllogism )) </jh>

Congruence is unaffected by exchanging the endpoints of both line segments.  thm (CongruenceCommutativity  ((x y ≡ z w) ↔ (y x ≡ w z)) ( x y z w CongruenceLeftCommutativity y x z w CongruenceRightCommutativity applyBiconditionalTransitivity ))

thm (commuteCongruenceInConsequent ((H (antecedent → (x y ≡ z w))))  (antecedent → (y x ≡ w z)) ( H       x y z w CongruenceCommutativity eliminateBiconditionalReverse applySyllogism )) </jh>

The next lemma is a convenience form of.  thm (CongruenceIdentityFromEquality  ((x = y) → ((x y ≡ z w) → (z = w))) ( </jh> This is just a substitution away from. The substitution is.  z EqualityReflexivity w EqualityReflexivity x EqualityReflexivity x x x y z z w w CongruenceBuilder detach1of4 detach2of2 detach2of2

eliminateBiconditionalForwardInConsequent

x z w CongruenceIdentityLeft (x = y) introduceAntecedent applySyllogismInConsequent )) </jh>

Outer three segment
The next theorem,, is basically a degenerate case of the five segment axiom. We call it outer three segment because we are given congruences for the inner line segments, and conclude a congruence for the outer segments. We will later prove an inner variant in which which the reverse is true.

There are two cases. If, then applying five segments to x y z and x yields the desired result (the additional two antecedents are fulfilled because one becomes   and the other  ). If, then   follows from   (and  , which follows from  ).

We first prove the  case as a lemma.  thm (ThreeSegmentXEqualsY  ((x = y) → (((((between x y z) ∧ (between x′ y′ z′)) ∧ (x y ≡ x′ y′)) ∧ (y z ≡ y′ z′)) → (x z ≡ x′ z′))) ( </jh> We start with  x y x′ y′ CongruenceIdentityFromEquality </jh> Using  for something takes this form:.  z EqualityReflexivity z′ EqualityReflexivity x y z z x′ y′ z′ z′ CongruenceBuilder detach2of2 detach2of3 eliminateBiconditionalForwardInConsequent export </jh> We combine those to get.  applySyllogismInConsequent </jh> Adding two more antecedents and importing several times gives us the complete  case.  (between x′ y′ z′) introduceAntecedentInConsequent (between x y z) introduceAntecedentInConsequent importInConsequent importInConsequent importInConsequent )) </jh> Now, the  case.  thm (ThreeSegmentXNotEqualY  ((x ≠ y) → (((((between x y z) ∧ (between x′ y′ z′)) ∧ (x y ≡ x′ y′)) ∧ (y z ≡ y′ z′)) → (x z ≡ x′ z′))) ( </jh> Applying the five segment axiom gives us. First we detach  x x′ CongruenceTrivialIdentity x y z x′ y′ z′ x x′ OuterFiveSegment detach2of3 </jh> Next we commute  to.  z x z′ x′ CongruenceCommutativity eliminateBiconditionalReverse applySyllogism </jh> We are still facing. We need to remove the  (because it is redundant with  ).

We get most of the way with : <jh> ((x y ≡ x′ y′) ∧ (y z ≡ y′ z′)) ImplicationReflexivity

(x y ≡ x′ y′) (y z ≡ y′ z′) ConjunctionRightElimination commuteCongruenceInConsequent

composeConjunction </jh> Now we just add the rest of the antecedents and combine to finish the  case. <jh> (x z ≡ x′ z′) addCommonConsequent exportInAntecedent exportInAntecedent exportInConsequent (between x′ y′ z′) addCommonAntecedent (between x y z) addCommonAntecedent (x ≠ y) addCommonAntecedent

importInAntecedent importInAntecedent importInAntecedent importInAntecedent importInAntecedent

applyModusPonens

importInConsequent importInConsequent importInConsequent ))

thm (OuterThreeSegment   (((((between x y z) ∧ (between x′ y′ z′)) ∧ (x y ≡ x′ y′)) ∧ (y z ≡ y′ z′)) → (x z ≡ x′ z′)) ( x y z x′ y′ z′ ThreeSegmentXEqualsY x y z x′ y′ z′ ThreeSegmentXNotEqualY eliminateCases )) </jh>

Uniqueness of segment construction
Here we prove that the segment constructed by the segment construction axiom is unique. We state this as. The proof is first that  (because both are congruent to  ), and between that and   we can apply   to   and   to get. Then we will apply  with the lines   and   and the points   and. The four congruences we need are,  ,  , and  , and then   gives us. This congruence yields  by.

The only real difficulty in formalizing this is juggling all those conjunctions and multiple antecedents. The first lemma shows. <jh> thm (SegmentConstructionUniquenessAxAy  ((((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) ∧ (A y ≡ B C)) → (A x ≡ A y)) ( </jh> First we extract the two pieces we care about, first showing that big long antecedent implies , <jh> ((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) (A y ≡ B C) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent </jh> And then that it implies. <jh> ((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) (A y ≡ B C) ConjunctionLeftElimination </jh> We apply symmetry to turn that into. <jh> swapCongruenceInConsequent </jh> We combine the two to get, and apply transitivity to finish. <jh> composeConjunction

A x B C A y CongruenceTransitivity applySyllogism )) </jh> The next lemma shows. <jh> thm (SegmentConstructionUniquenessQxQy  ((((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) ∧ (A y ≡ B C)) → (Q x ≡ Q y)) ( </jh> To apply  we need four things. The first is. <jh> ((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) (A y ≡ B C) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent </jh> The second is. <jh> ((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) (A y ≡ B C) ConjunctionRightElimination eliminateLeftConjunctInConsequent

composeConjunction </jh> The third is. <jh> Q A CongruenceReflexivity (((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) ∧ (A y ≡ B C)) introduceAntecedent

composeConjunction </jh> The fourth is. <jh> Q A x B C y SegmentConstructionUniquenessAxAy

composeConjunction </jh> Applying  we are done. <jh> Q A x Q A y OuterThreeSegment applySyllogism )) </jh>

The next lemma gets us most of the way. It shows. <jh> thm (SegmentConstructionUniquenessxxxy  ((((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) ∧ (A y ≡ B C)) → (x x ≡ x y)) ( </jh> We'll be applying  which has seven antecedents. The first two we can do together,. <jh> ((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) (A y ≡ B C) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent </jh> The next is. <jh> ((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) (A y ≡ B C) ConjunctionRightElimination eliminateRightConjunctInConsequent eliminateRightConjunctInConsequent eliminateLeftConjunctInConsequent

composeConjunction </jh> We now need four congruences. The first is. <jh> Q A CongruenceReflexivity (((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) ∧ (A y ≡ B C)) introduceAntecedent

composeConjunction </jh> The second congruence is. <jh> A x CongruenceReflexivity (((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) ∧ (A y ≡ B C)) introduceAntecedent

composeConjunction </jh> The third congruence is. <jh> Q A x B C y SegmentConstructionUniquenessQxQy composeConjunction </jh> The fourth congruence is. <jh> Q A x B C y SegmentConstructionUniquenessAxAy composeConjunction </jh> We are ready to apply. <jh> Q A x Q A x x y OuterFiveSegment applySyllogism )) </jh>

The final theorem is only a small step further. <jh> thm (SegmentConstructionUniqueness  ((((((Q ≠ A) ∧ (between Q A x)) ∧ (A x ≡ B C)) ∧ (between Q A y)) ∧ (A y ≡ B C)) → (x = y)) ( Q A x B C y SegmentConstructionUniquenessxxxy x x y CongruenceIdentityLeft applySyllogism )) </jh>

Export
We now export to Interface:Line segment congruence. <jh> export (RESULTS Interface:Line_segment_congruence (CLASSICAL FIRSTORDER) ) </jh>