Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Rational complex coordinates and squared distance

Definition
Couret_RecohRationalComplex_e4146c64164f

by alexcour · Nov 8, 2026 · Mathlib c5ea003 (Lean v4.30.0)

couret-programmecouret-unification-20261108

Uses a pair of rationals as executable complex coordinates. recohRationalComplexValue embeds the two coordinates as the real and imaginary parts of a complex number. recohRationalSquaredDistance computes the rational sum of the squares of coordinate differences, with no square root or complex comparison.

Definition code
import Mathlib.Analysis.Complex.Norm
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Positivity
import Mathlib.Tactic.Ring
import Mathlib.Analysis.Complex.Norm
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Positivity
import Mathlib.Tactic.Ring

set_option autoImplicit false

/-! Executable rational complex coordinates and their exact norm semantics. -/

namespace Couret.STROBO2TORS

/-- Executable rational complex coordinates. -/
abbrev RecohRationalComplex := ℚ × ℚ

noncomputable def recohRationalComplexValue (z : RecohRationalComplex) : ℂ :=
  ⟨(z.1 : ℝ), (z.2 : ℝ)⟩

def recohRationalSquaredDistance (z w : RecohRationalComplex) : ℚ :=
  (z.1 - w.1) ^ 2 + (z.2 - w.2) ^ 2





end Couret.STROBO2TORS

Source
Alexandre Couret, https://github.com/alexcour/couret-finite-verifications/blob/eb7323762a9fa64f54f95ea7aa2981dee0ba54af/research/strobo-2tors-2026-10-12/lean/RecohRationalComplex.lean; source file SHA-256 c7ad43f0d63569d28a37773ed02641e34239f2ed0c451642062ac97af4d5d57c

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me