Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Lemma 8, p. 17 — every text character has a sampled occurrence

Proved
GagieRIndex.Kmers.sampled_character

by mikedeng1 · Oct 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

burrows-wheeler-transformp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1strings

Let T[1..n]T[1..n]T[1..n] be a terminated text with a suffix array and BWT run-boundary samples. Every text character appears at a sampled text position:

∀i∈[1..n],∃i′∈Sampled⁡(T),T[i′]=T[i].\forall i\in[1..n],\quad\exists i'\in\operatorname{Sampled}(T),\quad T[i']=T[i].∀i∈[1..n],∃i′∈Sampled(T),T[i′]=T[i].

This is the single-character base case of the primary-occurrence statement in Lemma 8.

Formalization Note The index iii is required to lie in [1..n][1..n][1..n]; the sampled set consists of text positions, not suffix-array cells.

Preamble
import Mathlib
import Definitions.Def_GagieRIndex_Locate_Core
Formal statement
namespace GagieRIndex.Kmers

theorem sampled_character (n σ : ℕ) (T SA : ℕ → ℕ)
    (hT : GagieRIndex.Locate.IsText n σ T) (hSA : GagieRIndex.Locate.IsSuffixArray n T SA)
    (i : ℕ) (hi : 1 ≤ i) (hin : i ≤ n) :
    ∃ i' ∈ GagieRIndex.Locate.sampled n T SA, T i' = T i := by sorry

end GagieRIndex.Kmers
Source
Gagie, Navarro, Prezza, Fully-Functional Suffix Trees and Optimal Text Searching in BWT-runs Bounded Space, arXiv:1809.02792v2, p. 17, proof of Lemma 8, second sentence
Human review
  • Endorsed by Shuze Chen · Oct 9, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 9, 2026

    Confirmed by the mission captain (proposal self-audit).

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