Skip to content
back to the quest log
Goldreich-Levin query complexity repository with the exact locator proof
rare∎ researchshipped

Goldreich-Levin Locator

The exact locator before approximation

A Lean 4 formalization of finite Fourier coefficients with an exhaustive locator proved to return a maximum-magnitude frequency.

role
Formalization author
org
Independent research
when
2026

What it is

This development builds the finite Fourier setting, implements a concrete exhaustive locator, and proves that its returned frequency attains the largest absolute coefficient.

It also proves threshold correctness and records the 2^n size of the search cube.

The difficult part of Goldreich-Levin is not estimating one coefficient. It is avoiding an exponential scan across all candidates. The project makes that boundary explicit.

where the effort went

  • Fourier92
  • Proof96
  • Algorithms84
  • Auditability96

the numbers

Search space
2^n
Proof escapes
0
Locator
Exact max
Lean
4.33.1

built with

  • Lean 4
  • Mathlib
  • Lake
  • Finite Fourier analysis

delivery record

What I made

I wanted the exact search specification and its correctness proof fixed in Lean before reasoning about the randomized algorithm that avoids exhaustive frequency search.

  • 01

    Finite Boolean-cube Fourier coefficient definitions

  • 02

    Executable exhaustive maximum-magnitude locator

  • 03

    Proof that the returned frequency is globally maximal

  • 04

    Threshold soundness and completeness lemmas

  • 05

    Explicit proof that the candidate cube contains 2^n frequencies

Hard problems

The constraints mattered as much as the finished interface.

01field note

Argmax with proof-producing ties

problem
An executable maximum must return a concrete frequency while remaining correct when several coefficients tie.
response
The locator folds over the finite cube with a proved invariant that the current candidate dominates everything already visited.
02field note

Avoiding a false complexity claim

problem
Exact coefficient estimation is easy to confuse with an efficient heavy-frequency locator.
response
The publication isolates the exponential frequency scan as the unresolved obstacle and does not claim the approximate query bound.

Screens

after shipping

What stayed with me

  • Proving an argmax implementation exposes tie cases and finiteness assumptions that paper notation usually suppresses.

  • The expensive dimension should be visible in the formal object being searched.