Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The cosine rule is an identity of quadratic algebras

Proved
Diaz.trace_norm_quadratic_algebra

by carlok · Sep 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

diaz-modulus-leannumber-theory

Source. Carlo Perassi's mathematics: an identity displayed in his p-adic analogue of the argument. It is the identity that carries the archimedean proof of algebraic-distance rigidity into a setting with no archimedean absolute value.

Statement. Let R be a commutative ring and σ : R →+* R an involution. Write N x = x * σ x for the norm and Tr x = x + σ x for the trace. Then for all u, v ∈ R,

Tr (u * σ v) = N u + N v − N (u − v) and N (u * σ v) = N u * N v.

Over ℂ / ℝ with σ complex conjugation the first identity reads 2 Re(u * conj v) = |u|² + |v|² − |u − v|², which is the cosine rule. Carlo Perassi's point is that the cosine rule "was never metric": it is the polarisation identity of the norm form of a quadratic algebra, and holds verbatim over a quadratic extension of ℚ_p, where there is no archimedean modulus and no involution of ℂ_p to imitate conjugation.

Not in the companion note. This statement is not in Carlo Perassi's companion note to https://github.com/carlok/diaz-modulus-lean (version 1.9, 25 September 2026, GitHub release note-v1.9), which does not treat the p-adic setting; it is unpublished apart from this node. Nothing here was withdrawn as wrong. It is worth recording because the argument is unconditional and short.

Novelty. No novelty is claimed. This is the polarisation identity for the norm form attached to a ring involution.

The proof is ring after rewriting σ (σ x) = x.

Preamble
import Mathlib
import Definitions.Def_Diaz_Closure
import Definitions.Def_Diaz_Instantiation

open ComplexConjugate
open Diaz
Formal statement
theorem Diaz.trace_norm_quadratic_algebra {R : Type*} [CommRing R] (σ : R →+* R) (hσ : ∀ x, σ (σ x) = x)
    (u v : R) :
    (u * σ v) + σ (u * σ v)
        = u * σ u + v * σ v - (u - v) * σ (u - v)
      ∧ (u * σ v) * σ (u * σ v) = (u * σ u) * (v * σ v) := by sorry

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