Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Chapter CoherentGeometry

Definition
ChapterCoherentGeometry

by leonardopedro · Oct 5, 2026 · Mathlib 0df444a (Lean v4.33.1)

definitionsformalizationtimepiece

Formal definitions for the timepiece Lean 4 formalization (source chapter BookProof/ChapterCoherentGeometry.lean): generated def bundle for ChapterCoherentGeometry. See BookProof/ChapterCoherentGeometry.lean for full context.

Definition code
import Definitions.Def_ChapterSoftmaxSharpness
import Definitions.Def_ChapterCoherentOverlap
import Definitions.Def_ChapterSoftmaxBorn
import Mathlib

/-!
# Chapter "The Coherent State of Attention", §"The Geometry of the Wave-packet"

`Book/CoherentState.lean` reads the coherent-state overlap geometrically: a key is
a *wave-packet* centred at its parameter, and the query interrogates the packets by
proximity.  `ChapterCoherentOverlap` already identifies the overlap with the
Gaussian kernel `exp (-‖q - k‖² / 2)`; this module turns that identification into
the order-theoretic statements the prose actually uses.

* `neg_two_mul_log_coherentOverlap` — the kernel is a *metric readout*:
  `-2 log ⟨q|k⟩ = ‖q - k‖²`.  Nothing is lost in passing from the distance to the
  overlap.
* `coherentOverlap_le_iff_dist_le` / `coherentOverlap_lt_iff_dist_lt` — the overlap
  is a strictly decreasing function of the distance between the parameters.
* `bornWeight_eq_scoreSoftmax_neg_dist_sq` — the **Born weight is a Softmax over
  minus the squared distances**, at inverse temperature `1`.  This is the geometric
  face of `coherentBorn_eq_softmax`: it needs no hypothesis on the key norms,
  because the key penalties are exactly what the squared distance absorbs.
* `bornWeight_le_iff_dist_le` — consequently the Born weights order the keys by
  proximity, and `bornWeight_max_of_nearest` / `bornWeight_lt_of_nearest`: the
  nearest key carries the largest attention weight (strictly, if it is strictly
  nearest).

Everything here is `sorry`-free and `axiom`-free (only `propext`,
`Classical.choice`, `Quot.sound`).
-/
namespace BookProof.ChapterCoherentGeometry

end BookProof.ChapterCoherentGeometry
Source
https://github.com/leonardopedro/timepiece/blob/61595bc/BookProof/ChapterCoherentGeometry.lean

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me