Aether Catalog definitions — Evergreen_QuaternionFactoring_QuaternionNorm
DefinitionEvergreen_QuaternionFactoring_QuaternionNormaether-catalogevergreen
Definition bundle for the Aether Catalog module Evergreen.QuaternionFactoring.QuaternionNorm, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.
Definition code
-- Def bundle generated from Evergreen/QuaternionFactoring/QuaternionNorm.lean by skeleton subtraction
import Mathlib
/-!
# Quaternion Norm Identity and Pythagorean Quadruples
## Overview
We formalize the connection between Hamiltonian quaternions and Pythagorean quadruples.
The key insight: the quaternion norm identity |q₁|² · |q₂|² = |q₁ · q₂|² is exactly
the Euler four-square identity, which generates all Pythagorean quadruples from parameters.
## Main Results
- `euler_four_square_identity`: The Euler four-square identity for integers
- `quaternion_norm_mul`: Quaternion norm is multiplicative
- `quadruple_from_params_valid`: The parametric formula produces valid quadruples
- `pell_obstacle`: There are no nontrivial integer solutions to λ² - μ² = 1
-/
/-! ## Section 1: Euler Four-Square Identity -/
/-! ## Section 2: Pythagorean Quadruple Parametrization -/
/-- A Pythagorean quadruple (a, b, c, d) satisfies a² + b² + c² = d² -/
def IsPythQuadruple (a b c d : ℤ) : Prop :=
a^2 + b^2 + c^2 = d^2
/-
The parametric construction of a Pythagorean quadruple from four parameters.
Given (m, n, p, q), define:
a = m² + n² - p² - q²
b = 2(mq + np)
c = 2(nq - mp)
d = m² + n² + p² + q²
This always yields a valid quadruple.
-/
/-
The sum d = m² + n² + p² + q² is always nonneg when d represents the hypotenuse.
-/
/-! ## Section 3: The Pell Obstacle -/
/-
**The Pell Obstacle**: The equation λ² - μ² = 1 has no nontrivial integer solutions.
The only solutions are (λ, μ) = (±1, 0).
This is the key obstruction preventing a direct generalization of
Berggren matrices from 2D to 3D.
-/
/-
Corollary: If λ² - μ² = 1 then λ = 1 or λ = -1
-/
/-! ## Section 4: Quaternion Norm and Factoring -/
/-- The norm of a quaternion (a, b, c, d) is a² + b² + c² + d². -/
def quatNorm (a b c d : ℤ) : ℤ := a^2 + b^2 + c^2 + d^2
/-
Quaternion norm is always nonnegative.
-/
/-
Quaternion norm is multiplicative: this is equivalent to the
Euler four-square identity.
-/
/-
**Quaternion Factoring Principle**: If N = quatNorm a b c d and
N = p * q for primes p, q, then finding quaternion factorizations
of p and q yields a factorization of N.
-/
/-! ## Section 5: The Lattice L₄(N) -/
/-- The lattice L₄(N) consists of all integer triples (x, y, z) such that
x² + y² + z² ≡ 0 (mod N). A short vector in this lattice can reveal
factors of N. -/
def inQuadLattice (N : ℤ) (x y z : ℤ) : Prop :=
N ∣ (x^2 + y^2 + z^2)
/-
The zero vector is always in L₄(N).
-/
/-
L₄(N) is closed under negation.
-/
/-
**Factor Extraction**: If p | N and x² + y² + z² = k·N with
gcd(x² + y², N) nontrivial, then we extract a factor.
-/
/-! ## Section 6: Dimensional Hierarchy -/
/-
In a d-dimensional lattice of determinant N, the Minkowski bound on
the shortest vector is proportional to N^(1/d). This theorem states
the key inequality for dimension 3 vs dimension 2.
-/
/-
For all N ≥ 2, N^(1/4) ≤ N^(1/3) — dimension 4 beats dimension 3.
-/