Coordinate identities (Heron, law of cosines, Pythagoras, isosceles triangle)
import /Freeks/2.book(section 2 まで)
Let \(X\) be a commutative ring; a point is a pair \((x, y)\) of its elements, and the squared distance between two points is \((x-u)^2 + (y-v)^2\). No real numbers are needed; these are identities in a general commutative ring.
For a triangle \(A=(x,y)\), \(B=(u,v)\), \(C=(s,t)\), inside each theorem we set \(a = |BC|^2\), \(b = |CA|^2\), \(c = |AB|^2\), \(m = \overrightarrow{CA}\cdot\overrightarrow{CB}\) (the inner product at \(C\)) and \(D = \overrightarrow{CA}\times\overrightarrow{CB}\) (twice the signed area) by formulas. Orthogonal means \(m = 0\).
1 Vector identities (hidden lemmas)
2 #94 Law of cosines
\(c = a + b - 2m\). When \(m = 0\) (a right angle), it reduces to Pythagoras' theorem.
Lcosine …
\(( X , \textit{0} , \textit{1} , [-] , [+] , [\cdot] ) :\mathsf{CRing} \Longrightarrow \forall x , y , u , v , s , t \in X . \forall a , b , c , m \in X . ( a = ( u - s ) \cdot ( u - s ) + ( v - t ) \cdot ( v - t ) , b = ( x - s ) \cdot ( x - s ) + ( y - t ) \cdot ( y - t ) , c = ( x - u ) \cdot ( x - u ) + ( y - v ) \cdot ( y - v ) , m = ( x - s ) \cdot ( u - s ) + ( y - t ) \cdot ( v - t ) \Longrightarrow c = ( a + b ) - ( m + m ) )\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+3 #57 Heron's formula
In the form \(16S^2 = 4a^2b^2 - (a^2+b^2-c^2)^2\): with \(D\) twice the signed area (\(D = 2S\)) and \(a, b, c\) the squared side lengths, \(4D^2 = 4ab - (a+b-c)^2\). It follows from \(ab = m^2 + D^2\) (Lagrange's identity) and the law of cosines.
Lheron …
\(( X , \textit{0} , \textit{1} , [-] , [+] , [\cdot] ) :\mathsf{CRing} \Longrightarrow \forall x , y , u , v , s , t \in X . \forall a , b , c , m , D \in X . ( a = ( u - s ) \cdot ( u - s ) + ( v - t ) \cdot ( v - t ) , b = ( x - s ) \cdot ( x - s ) + ( y - t ) \cdot ( y - t ) , c = ( x - u ) \cdot ( x - u ) + ( y - v ) \cdot ( y - v ) , m = ( x - s ) \cdot ( u - s ) + ( y - t ) \cdot ( v - t ) , D = ( x - s ) \cdot ( v - t ) - ( y - t ) \cdot ( u - s ) \Longrightarrow ( ( D \cdot D + D \cdot D ) + ( D \cdot D + D \cdot D ) ) = ( ( a \cdot b + a \cdot b ) + ( a \cdot b + a \cdot b ) ) - ( ( a + b ) - c ) \cdot ( ( a + b ) - c ) )\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+4 #4 Pythagoras' theorem
Orthogonality (\(m = 0\)) is equivalent to \(a + b = c\). It is stated in the form \(m + m = 0\), so it holds in rings where one cannot divide by \(2\).
Lpyth …
\(( X , \textit{0} , \textit{1} , [-] , [+] , [\cdot] ) :\mathsf{CRing} \Longrightarrow \forall x , y , u , v , s , t \in X . \forall a , b , c , m \in X . ( a = ( u - s ) \cdot ( u - s ) + ( v - t ) \cdot ( v - t ) , b = ( x - s ) \cdot ( x - s ) + ( y - t ) \cdot ( y - t ) , c = ( x - u ) \cdot ( x - u ) + ( y - v ) \cdot ( y - v ) , m = ( x - s ) \cdot ( u - s ) + ( y - t ) \cdot ( v - t ) \Longrightarrow ( c = a + b \Longleftrightarrow m + m = \textit{0} ) )\) \(\blacktriangleleft\) Lcosine ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+5 #65 Base angles of an isosceles triangle
\(|CA| = |CB|\) holds if and only if the inner products \(\overrightarrow{AB}\cdot\overrightarrow{AC} = \overrightarrow{BA}\cdot\overrightarrow{BC}\) (the cosines of the two base angles times \(|AB|\)) are equal. It uses no order, so it holds in a general commutative ring.
Lisos …
\(( X , \textit{0} , \textit{1} , [-] , [+] , [\cdot] ) :\mathsf{CRing} \Longrightarrow \forall x , y , u , v , s , t \in X . \forall a , b , m , p , q \in X . ( a = ( u - s ) \cdot ( u - s ) + ( v - t ) \cdot ( v - t ) , b = ( x - s ) \cdot ( x - s ) + ( y - t ) \cdot ( y - t ) , m = ( x - s ) \cdot ( u - s ) + ( y - t ) \cdot ( v - t ) , p = ( u - x ) \cdot ( s - x ) + ( v - y ) \cdot ( t - y ) , q = ( x - u ) \cdot ( s - u ) + ( y - v ) \cdot ( t - v ) \Longrightarrow ( b = a \Longleftrightarrow p = q ) )\) \(\blacktriangleleft\) Lmid ,Lcm ,Lneg ,Ltr ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+6 The squared distance is nonnegative (ordered ring)
This is the only place where an order is needed. \(|AB|^2 = (x-u)^2 + (y-v)^2 \succeq 0\) (squares are nonnegative).
\(( X , \textit{0} , \textit{1} , [-] , [+] , [\cdot] , P ) :\mathsf{OCRing} \Longrightarrow \forall x , y , u , v \in X . \textit{0} \preceq P ( x - u ) \cdot ( x - u ) + ( y - v ) \cdot ( y - v )\) \(\blacktriangleleft\) LOG ,Lsq ,Ladd ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+