While this submission is a draft, it cannot be used by other submissions.

Explicit thin matrix preprocessing bounds

Lax350013.MatrixPreprocessing · concepts/Lax350013/MatrixPreprocessing.lean · lax-350013

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Theorem

    Corollary 26 gives O(N2/D0.063)O(N^2/D^{0.063}) preprocessing time and space and O(D0.437)O(D^{0.437}) time per query for 1≤D1\leq D and D18≤ND^{18}\leq N. Theorem 30 gives the underlying bounds at integer recursion parameters. Theorem 3 extends the trade-off to every ε<0.1204\varepsilon<0.1204 and every positive query exponent.

    Concept map
    7 concepts; 1 descendant hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    This concept declares 3 statements. Each proof establishes one of them relative to its assumptions.

    Lean source view on GitHub

    1/-
    2Copyright (c) 2026 Anthropic, PBC. All rights reserved.
    3Released under Apache 2.0 license as described in the file LICENSE.
    4SPDX-License-Identifier: Apache-2.0
    5-/
    6/-
    7Modified for the independent Lax packaging by Édouard Bonnet, 2026.
    8Derived from 3sum-apsp/EndStatement.lean / PaperStatements.lean at upstream commit e1a4e6508154ea59f030480661590a9fe3018011.
    9Changes: Lax module/namespace layout, separated concepts and proofs, archive
    10annotations, and compatibility with the archive Lean/mathlib environment.
    11See NOTICE and README.md in the submission root for provenance and scope.
    12-/
    13
    14import Mathlib.Algebra.MvPolynomial.Basic
    15import Mathlib.Analysis.SpecialFunctions.Log.Base
    16import Mathlib.Analysis.SpecialFunctions.Log.Basic
    17import Mathlib.Analysis.SpecialFunctions.Pow.Real
    18import Mathlib.Combinatorics.SimpleGraph.Basic
    19import Mathlib.Data.Finset.Sort
    20import Mathlib.LinearAlgebra.Matrix.Notation
    21import Mathlib.MeasureTheory.Integral.Bochner.Basic
    22import Mathlib.NumberTheory.PrimeCounting
    23import Mathlib.Probability.Independence.Basic
    24import Mathlib.Tactic.DeriveFintype
    25import Lax350013.MatrixTradeoffs
    26
    27/-!
    28---
    29title: Explicit thin matrix preprocessing bounds
    30type: theorem
    31---
    32Corollary 26 gives O(N2/D0.063)O(N^2/D^{0.063}) preprocessing time and space and O(D0.437)O(D^{0.437}) time per query for 1≤D1\leq D and D18≤ND^{18}\leq N. Theorem 30 gives the underlying bounds at integer recursion parameters. Theorem 3 extends the trade-off to every ε<0.1204\varepsilon<0.1204 and every positive query exponent.
    33-/
    34
    35namespace Lax350013.MatrixPreprocessing
    36
    37open Finset
    38open Lax350013.WordRAM
    39open Lax350013.RAMResources
    40open Lax350013.ThinMatrices
    41open Lax350013.MatrixParameters
    42open Lax350013.MatrixTradeoffs
    43
    44/-- **Corollary 26**, first two sentences: "Let N ≥ D^18, and let X ∈ ℤ^{N×D} and Y ∈ ℤ^{D×N}
    45have entries of absolute value at most N^{O(1)}. We can preprocess them deterministically in
    46O(N²/D^{0.063}) time and space, after which any single entry (XY)[I,J] can be computed
    47deterministically in O(D^{0.437}) time."
    48
    49NOTE. The paper states no lower bound on `D`; `D ≥ 1` is assumed (for `D = 0` the bound
    50`O(D^{0.437})` would be 0 steps). -/
    51def Corollary_26 : Prop :=
    52 ∀ c : ℕ, ∃ (P Q : List Instr) (qI qJ qOut : ℤ) (b : ℕ) (C : ℝ),
    53 IsDataStructure P Q qI qJ qOut b [] (fun x => 1 ≤ x.D ∧ x.D ^ 18 ≤ x.N ∧ x.U = x.N ^ c)
    54 (fun x => C * ((x.N : ℝ) ^ 2 / (x.D : ℝ) ^ (0.063 : ℝ)))
    55 (fun x => C * ((x.N : ℝ) ^ 2 / (x.D : ℝ) ^ (0.063 : ℝ)))
    56 (fun x => C * (x.D : ℝ) ^ (0.437 : ℝ))
    57
    58/-- The hypotheses of **Theorem 30**: "Let m ≥ 1, D = 4^m, L ≥ 10m, 0 ≤ t ≤ m, and N ≥ √K
    59N₀", with entries "of absolute value at most N^{O(1)}". -/
    60def theorem30Dom (c m L t : ℕ) (x : ThinPair) : Prop :=
    61 1 ≤ m ∧ x.D = 4 ^ m ∧ 10 * m ≤ L ∧ t ≤ m ∧ Real.sqrt (K L m) * (N0 L m : ℝ) ≤ (x.N : ℝ) ∧
    62 x.U = x.N ^ c
    63
    64/-- **Theorem 30**: "we can preprocess them deterministically in time and space" (8). "After
    65this, any single entry (XY)[I,J] can be computed deterministically in O(L ∑_{d=0}^{t}
    66α_d) time." "The constants hidden in the O(·) depend only on the exponent in N^{O(1)}": the
    67constant `C` is chosen after the exponent `c` and before `m`, `L`, `t`. These parameters are given
    68to the preprocessing after `N` and `D`; the two programs do not depend on them. -/
    69def Theorem_30 : Prop :=
    70 ∀ c : ℕ, ∃ (P Q : List Instr) (qI qJ qOut : ℤ) (b : ℕ) (C : ℝ), ∀ m L t : ℕ,
    71 IsDataStructure P Q qI qJ qOut b [(m : ℤ), (L : ℤ), (t : ℤ)] (theorem30Dom c m L t)
    72 (fun x => C * cost8 L m t x.N) (fun x => C * cost8 L m t x.N) (fun _ => C * costQuery L m t)
    73
    74/-- **Theorem 3**: "Let N ≥ D^18, and let X ∈ ℤ^{N×D}, Y ∈ ℤ^{D×N} have entries of absolute
    75value N^{O(1)}. The pair (X,Y) can be preprocessed deterministically in O(N²/D^{0.063}) time [...].
    76After this, any single entry (XY)[I,J] can be computed deterministically in O(D^{0.437}) time [...].
    77More generally, for every ε < 0.1204 and every q > 0 there is a γ > 0 such that, whenever D ≤ N^ε,
    78the pair can be preprocessed in O(N²/D^γ) time, after which any single entry can be computed in
    79O(D^q) time." The first part is `Corollary_26`.
    80
    81NOTE. The departures are those of the two definitions: `D ≥ 1` in the first part; `D ≥ 1` and
    82`N ≥ 1` in the second; and in both the space is bounded like the time, while the theorem speaks of
    83time only. -/
    84def Theorem_3 : Prop :=
    85 Corollary_26 ∧ DataStructureBelow 0.1204
    86
    87/-- Explicit thin matrix preprocessing bounds: Corollary 26. -/
    88axiom corollary26 : Corollary_26
    89
    90
    91/-- Explicit thin matrix preprocessing bounds: Theorem 30. -/
    92axiom theorem30 : Theorem_30
    93
    94
    95/-- Explicit thin matrix preprocessing bounds: Theorem 3. -/
    96axiom theorem3 : Theorem_3
    97
    98end Lax350013.MatrixPreprocessing
    99
    Show ProofShow ProofShow Proof

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…