Brahmagupta's identity (sums of two squares and Pell type)
import /Freeks/2.book(section 2 まで)
Uses z[|X]. As identities in a general commutative ring, the product has the same form (composition law), shown in one step. The product of two sums of two squares is a sum of two squares (Brahmagupta–Fibonacci), and the product of two numbers of the form \(x^2 - n y^2\) has the same form (composition of solutions of Pell's equation). No order and no division are used.
1 Product of two sums of two squares
Lbf …
\(( X , \textit{0} , \textit{1} , [-] , [+] , [\cdot] ) :\mathsf{CRing} \Longrightarrow \forall a , b , c , d \in X . \forall u , v \in X . ( u = a \cdot c - b \cdot d , v = a \cdot d + b \cdot c \Longrightarrow ( a \cdot a + b \cdot b ) \cdot ( c \cdot c + d \cdot d ) = u \cdot u + v \cdot v )\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+2 Composition of Pell type
Lpell …
\(( X , \textit{0} , \textit{1} , [-] , [+] , [\cdot] ) :\mathsf{CRing} \Longrightarrow \forall n , x , y , s , t \in X . \forall u , v \in X . ( u = x \cdot s + n \cdot ( y \cdot t ) , v = x \cdot t + y \cdot s \Longrightarrow ( x \cdot x - n \cdot ( y \cdot y ) ) \cdot ( s \cdot s - n \cdot ( t \cdot t ) ) = u \cdot u - n \cdot ( v \cdot v ) )\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+