Aether Catalog definitions — Evergreen_AStarFactoring_GaussianBridge
DefinitionEvergreen_AStarFactoring_GaussianBridgeaether-catalogevergreen
Definition bundle for the Aether Catalog module Evergreen.AStarFactoring.GaussianBridge, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.
Definition code
-- Def bundle generated from Evergreen/AStarFactoring/GaussianBridge.lean by skeleton subtraction
import Mathlib
/-!
# The Gaussian Integer Bridge: Connecting Pythagorean Triples to Factoring
## Overview
This file formalizes the connection between Gaussian integers ℤ[i] and integer
factoring via Pythagorean triples, as described in the A* Factoring research.
The key insight is that the Brahmagupta-Fibonacci identity — which is simply
norm multiplicativity for Gaussian integers — provides a composition law for
Pythagorean triples that bridges the additive structure of the Berggren tree
with the multiplicative structure of integer factoring.
## Main Results
1. **Brahmagupta-Fibonacci Identity**: (a²+b²)(c²+d²) = (ac-bd)²+(ad+bc)²
2. **Norm multiplicativity**: The Gaussian norm N(z₁z₂) = N(z₁)·N(z₂)
3. **Euler's factoring method**: Two distinct sum-of-squares representations
of N yield a non-trivial factor
4. **Composition of Pythagorean triples**: If (a₁,b₁,c₁) and (a₂,b₂,c₂)
are Pythagorean triples, their Gaussian composition is also Pythagorean
5. **Fermat's theorem on sums of two squares**: Connection to primes ≡ 1 (mod 4)
-/
open Nat Int
-- ═══════════════════════════════════════════════════════════════
-- Section 1: Brahmagupta-Fibonacci Identity (Norm Multiplicativity)
-- ═══════════════════════════════════════════════════════════════
-- ═══════════════════════════════════════════════════════════════
-- Section 2: Sum-of-Two-Squares Closure
-- ═══════════════════════════════════════════════════════════════
-- ═══════════════════════════════════════════════════════════════
-- Section 3: Pythagorean Triple Composition
-- ═══════════════════════════════════════════════════════════════
-- ═══════════════════════════════════════════════════════════════
-- Section 4: Euler's Factoring Method
-- ═══════════════════════════════════════════════════════════════
-- ═══════════════════════════════════════════════════════════════
-- Section 5: Difference-of-Squares Factoring Identity
-- ═══════════════════════════════════════════════════════════════
-- ═══════════════════════════════════════════════════════════════
-- Section 6: Gaussian Norm Properties
-- ═══════════════════════════════════════════════════════════════
-- ═══════════════════════════════════════════════════════════════
-- Section 7: Connection to the Berggren Tree
-- ═══════════════════════════════════════════════════════════════
/-- The Euclid parametrization: from (m,n) to a Pythagorean triple.
If gcd(m,n) = 1 and m > n > 0 with m-n odd, the triple is primitive. -/
def euclid_triple (m n : ℤ) : ℤ × ℤ × ℤ :=
(m ^ 2 - n ^ 2, 2 * m * n, m ^ 2 + n ^ 2)
-- ═══════════════════════════════════════════════════════════════
-- Section 8: The Bridge Theorem
-- ═══════════════════════════════════════════════════════════════