Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

GBFPlus occupied cells, residual updates and honest histories

Definition
GBFPlus_OccupancyDisclosure

by queelius · Oct 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

cryptographyfinite-algebragbfplusoccupancy-disclosure

A configuration has mmm cells, 1≤κ≤m1\le\kappa\le m1≤κ≤m selected cells per insertion, positive prefix width ppp and positive suffix width ℓ\ellℓ; the full word width is λ=p+ℓ\lambda=p+\ellλ=p+ℓ, so 0<ℓ<λ0<\ell<\lambda0<ℓ<λ. Words are pairs of bit-coordinate vectors over Z/2Z\mathbb Z/2\mathbb ZZ/2Z, with addition equal to XOR. Concatenation places the prefix coordinates first and suffix coordinates last. A snapshot maps each cell to either empty or an occupied word; an occupied zero remains occupied.

A row has a set of exactly κ\kappaκ distinct cells, an arbitrary prefix and an adjacent-domain identifier. An attempted insertion specifies the row, either an empty selected pivot or a request for failure, and arbitrary words for free cells. On success, previously occupied words are reused, other empty selected cells receive their free words, and the pivot receives the target word XOR the other selected words. Cells outside the selected set are unchanged. A failure request is admissible only when all selected cells are occupied and leaves the state unchanged.

An honest history starts from an empty array and consists of admissible attempts evaluated in order. The successful rows, in order, are derived from those attempts, including no failed attempts. Public recovery XORs exactly the occupied cells and returns the suffix. Its inputs are the snapshot and public configuration; it receives no row, prefix, identifier, history, secret or token. The model imposes no distribution on free words and does not model ledger access, authentication or timeout policy; those remain premises of the source's disclosure interpretation.

Definition code
import Mathlib

namespace GBFPlus.OccupancyDisclosure

structure Config where
  cells : ℕ
  shares : ℕ
  prefixBits : ℕ
  suffixBits : ℕ
  shares_pos : 1 ≤ shares
  shares_le : shares ≤ cells
  prefix_pos : 1 ≤ prefixBits
  suffix_pos : 1 ≤ suffixBits

abbrev Word (C : Config) :=
  (Fin C.prefixBits → ZMod 2) × (Fin C.suffixBits → ZMod 2)
abbrev Identifier (C : Config) := Fin C.suffixBits → ZMod 2
abbrev Snapshot (C : Config) := Fin C.cells → Option (Word C)

def wordBits {C : Config} (w : Word C) : Fin (C.prefixBits + C.suffixBits) → ZMod 2 :=
  Fin.addCases w.1 w.2

def empty (C : Config) : Snapshot C := fun _ => none

structure Row (C : Config) where
  support : Finset (Fin C.cells)
  support_card : support.card = C.shares
  hashPrefix : Fin C.prefixBits → ZMod 2
  identifier : Identifier C

def Row.target {C : Config} (r : Row C) : Word C := (r.hashPrefix, r.identifier)

structure Attempt (C : Config) where
  row : Row C
  pivot : Option (Fin C.cells)
  free : Fin C.cells → Word C

def admissible {C : Config} (A : Snapshot C) (e : Attempt C) : Prop :=
  match e.pivot with
  | none => ∀ i ∈ e.row.support, A i ≠ none
  | some p => p ∈ e.row.support ∧ A p = none

instance {C : Config} (A : Snapshot C) : (e : Attempt C) → Decidable (admissible A e)
  | ⟨r, none, _⟩ => inferInstanceAs (Decidable (∀ i ∈ r.support, A i ≠ none))
  | ⟨r, some p, _⟩ => inferInstanceAs (Decidable (p ∈ r.support ∧ A p = none))

def fillWord {C : Config} (A : Snapshot C) (free : Fin C.cells → Word C)
    (i : Fin C.cells) : Word C := (A i).getD (free i)

def insert {C : Config} (A : Snapshot C) (r : Row C) (p : Fin C.cells)
    (free : Fin C.cells → Word C) : Snapshot C := fun i =>
  if i ∈ r.support then
    some (if i = p then r.target + ∑ j ∈ r.support.erase p, fillWord A free j
      else fillWord A free i)
  else A i

def step {C : Config} (A : Snapshot C) (e : Attempt C) : Snapshot C :=
  match e.pivot with
  | none => A
  | some p => insert A e.row p e.free

def run {C : Config} (A : Snapshot C) : List (Attempt C) → Snapshot C
  | [] => A
  | e :: es => run (step A e) es

def Honest {C : Config} (A : Snapshot C) : List (Attempt C) → Prop
  | [] => True
  | e :: es => admissible A e ∧ Honest (step A e) es

def honestDecidable {C : Config} : (A : Snapshot C) → (es : List (Attempt C)) → Decidable (Honest A es)
  | _, [] => isTrue trivial
  | A, e :: es => @instDecidableAnd (admissible A e) (Honest (step A e) es)
      inferInstance (honestDecidable (step A e) es)

instance {C : Config} (A : Snapshot C) (es : List (Attempt C)) : Decidable (Honest A es) := honestDecidable A es

def successful {C : Config} (es : List (Attempt C)) : List (Row C) :=
  es.filterMap fun e => e.pivot.map fun _ => e.row

def finalSnapshot {C : Config} (es : List (Attempt C)) : Snapshot C := run (empty C) es

def occupied {C : Config} (A : Snapshot C) : Finset (Fin C.cells) :=
  Finset.univ.filter fun i => (A i).isSome

def payload {C : Config} (A : Snapshot C) (i : Fin C.cells) : Word C := (A i).getD 0

def rowXor {C : Config} (A : Snapshot C) (r : Row C) : Word C :=
  ∑ i ∈ r.support, payload A i

def recover {C : Config} (A : Snapshot C) : Identifier C :=
  (∑ i ∈ occupied A, payload A i).2

def supportUnion {C : Config} (rs : List (Row C)) : Finset (Fin C.cells) :=
  rs.foldl (fun U r => U ∪ r.support) ∅

def identifierXor {C : Config} (rs : List (Row C)) : Identifier C :=
  (rs.map Row.identifier).sum

end GBFPlus.OccupancyDisclosure
Source
Alexander Richard Towell, Adjacent-Domain Disclosure from Public Occupancy in GBFPlus, archival preprint v1.0.0, 20 October 2026, Section 2, DOI 10.5281/zenodo.23497466. Original analyzed protocol: Qin, Zhou, Dai, Sun and Qiang, Entropy 28 (2026), 947, DOI 10.3390/e28090947, Algorithm 4 and Sections 5.1–5.2. The source note is CC-BY-4.0; this new Lean formalization retains attribution and is prepared for the platform public-contribution terms. Definition layer: construction preceding Eq.(1), Propositions 1–2, and source-premises supplement.
Read-back

What the Lean code literally says, in plain math · OpenAI Codex (exact model identifier unavailable)

Blind mathematical read-back

The declarations below are in the namespace GBFPlus.OccupancyDisclosure. In the mathematical notation used here, Im={0,…,m−1}I_m=\{0,\ldots,m-1\}Im​={0,…,m−1} is the set of natural numbers strictly less than mmm, B=Z/2ZB=\mathbb Z/2\mathbb ZB=Z/2Z, and BImB^{I_m}BIm​ is the set of all functions from ImI_mIm​ to BBB. Addition of such functions, and of pairs of such functions, is coordinatewise addition modulo two; zero denotes the corresponding all-zero function or pair. An optional value is either an absent value, written ⊥\bot⊥, or a present value, written some⁡(x)\operatorname{some}(x)some(x); in particular, some⁡(0)\operatorname{some}(0)some(0) and ⊥\bot⊥ are distinct. Finite-set sums include each member once, list sums include each occurrence, and an empty sum is zero. Each paragraph renders one explicit declaration, with the two anonymous instance declarations identified by the propositions they decide.

Config. A configuration is a record of four natural numbers nnn (cells), kkk (shares), aaa (prefixBits), and bbb (suffixBits), together with witnesses of the four inequalities 1≤k1\le k1≤k, k≤nk\le nk≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b. Thus every configuration has 1≤k≤n1\le k\le n1≤k≤n and positive a,ba,ba,b, and none of n,k,a,bn,k,a,bn,k,a,b can be zero. These are all the fields and conditions in this record; no further relationship between the four numbers is imposed.

Word. For each configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, a word is an ordered pair (u,v)(u,v)(u,v) in BIa×BIbB^{I_a}\times B^{I_b}BIa​×BIb​. Its first component assigns a residue modulo two to each of the aaa prefix positions, and its second component assigns a residue modulo two to each of the bbb suffix positions. Every such pair is a word, including the all-zero pair; there is no condition relating its two components to one another or to the cells or shares.

Identifier. For each configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, an identifier is any function v:Ib→Bv:I_b\to Bv:Ib​→B. All bbb-coordinate binary functions, including zero, are allowed. The type carries no additional property such as uniqueness or a relation to a prefix.

Snapshot. For each configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, a snapshot is any function A:In→Option⁡(BIa×BIb)A:I_n\to\operatorname{Option}(B^{I_a}\times B^{I_b})A:In​→Option(BIa​×BIb​). At each of the nnn cells it specifies either ⊥\bot⊥ or a present pair of binary functions of lengths aaa and bbb. Every assignment of these optional values is allowed, including an assignment with no present cells or with every cell present; a present zero word is distinct from an absent cell.

wordBits. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, and every word w=(u,v)∈BIa×BIbw=(u,v)\in B^{I_a}\times B^{I_b}w=(u,v)∈BIa​×BIb​, this function returns the binary function z:Ia+b→Bz:I_{a+b}\to Bz:Ia+b​→B with z(i)=u(i)z(i)=u(i)z(i)=u(i) when 0≤i<a0\le i<a0≤i<a and z(i)=v(i−a)z(i)=v(i-a)z(i)=v(i−a) when a≤i<a+ba\le i<a+ba≤i<a+b. Thus the first component occupies the first aaa positions and the second component occupies the following bbb positions. The subtraction occurs in the second case, where i≥ai\ge ai≥a, so it gives an index in IbI_bIb​; no sum of the two components is taken.

empty. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, this is the snapshot A:In→Option⁡(BIa×BIb)A:I_n\to\operatorname{Option}(B^{I_a}\times B^{I_b})A:In​→Option(BIa​×BIb​) defined by A(i)=⊥A(i)=\botA(i)=⊥ for every cell iii. Its domain has n≥1n\ge1n≥1 cells, all absent; its values are not present zero words.

Row. For each configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, a row is a record consisting of a finite set S⊆InS\subseteq I_nS⊆In​ (support), a witness that ∣S∣=k|S|=k∣S∣=k (support_card), a function h:Ia→Bh:I_a\to Bh:Ia​→B (hashPrefix), and a function y:Ib→By:I_b\to By:Ib​→B (identifier). The support has exactly k≥1k\ge1k≥1 distinct members and is therefore nonempty. Apart from the cardinality condition, these fields are unrestricted: the two binary functions are not required to be computed from one another or from the support, and separate rows may have equal supports, equal prefixes, or equal identifiers.

Row.target. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, and every row consisting of S⊆InS\subseteq I_nS⊆In​ with ∣S∣=k|S|=k∣S∣=k, h:Ia→Bh:I_a\to Bh:Ia​→B, and y:Ib→By:I_b\to By:Ib​→B, its target word is exactly (h,y)∈BIa×BIb(h,y)\in B^{I_a}\times B^{I_b}(h,y)∈BIa​×BIb​. The value uses the row's two binary functions and does not depend on which cells belong to its support.

Attempt. For each configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, an attempt is a record containing a row (S,h,y)(S,h,y)(S,h,y) with S⊆InS\subseteq I_nS⊆In​, ∣S∣=k|S|=k∣S∣=k, h:Ia→Bh:I_a\to Bh:Ia​→B, and y:Ib→By:I_b\to By:Ib​→B; an optional cell p∈Option⁡(In)p\in\operatorname{Option}(I_n)p∈Option(In​) (pivot); and an arbitrary function f:In→BIa×BIbf:I_n\to B^{I_a}\times B^{I_b}f:In​→BIa​×BIb​ (free). The pivot may be absent or may name any cell, whether or not that cell is in SSS. The function fff is specified at every cell, including cells outside SSS, and has no distributional, independence, or other restriction. The record itself has no snapshot argument and imposes no occupancy requirement.

admissible. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, every optional-word assignment A:In→Option⁡(BIa×BIb)A:I_n\to\operatorname{Option}(B^{I_a}\times B^{I_b})A:In​→Option(BIa​×BIb​), and every attempt with row (S,h,y)(S,h,y)(S,h,y), ∣S∣=k|S|=k∣S∣=k, optional pivot, and arbitrary word function fff, this proposition has two cases. If the pivot is absent, it means that A(i)≠⊥A(i)\ne\botA(i)=⊥ for every i∈Si\in Si∈S. If the pivot is some⁡(p)\operatorname{some}(p)some(p), it means the conjunction p∈Sp\in Sp∈S and A(p)=⊥A(p)=\botA(p)=⊥. In the latter case no condition is imposed on the other cells in SSS, which may be present or absent. Neither case constrains hhh, yyy, or fff, and neither imposes a condition outside SSS. Since ∣S∣=k≥1|S|=k\ge1∣S∣=k≥1, the universal condition in the absent-pivot case is not over an empty support; an absent-pivot attempt against the all-absent snapshot does not satisfy it.

Anonymous instance deciding admissible. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, and every snapshot A:In→Option⁡(BIa×BIb)A:I_n\to\operatorname{Option}(B^{I_a}\times B^{I_b})A:In​→Option(BIa​×BIb​), this supplies, for each attempt with row support SSS of cardinality kkk, an explicit decision of its admissibility proposition: either evidence that the proposition holds or evidence that it does not. An absent pivot selects the decision of ∀i∈S, A(i)≠⊥\forall i\in S,\ A(i)\ne\bot∀i∈S, A(i)=⊥; a present pivot ppp selects the decision of p∈S∧A(p)=⊥p\in S\land A(p)=\botp∈S∧A(p)=⊥. The row's prefix and identifier and the attempt's arbitrary word function do not enter these tests. This declares decidability for all attempts, including inadmissible ones; it does not assert that all attempts are admissible.

fillWord. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, every snapshot A:In→Option⁡(W)A:I_n\to\operatorname{Option}(W)A:In​→Option(W) where W=BIa×BIbW=B^{I_a}\times B^{I_b}W=BIa​×BIb​, every function f:In→Wf:I_n\to Wf:In​→W, and every cell i∈Ini\in I_ni∈In​, this returns www if A(i)=some⁡(w)A(i)=\operatorname{some}(w)A(i)=some(w) and returns f(i)f(i)f(i) if A(i)=⊥A(i)=\botA(i)=⊥. A present zero word returns zero rather than the fallback. No support, pivot, or admissibility condition is an argument or hypothesis.

insert. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, let W=BIa×BIbW=B^{I_a}\times B^{I_b}W=BIa​×BIb​; take any snapshot A:In→Option⁡(W)A:I_n\to\operatorname{Option}(W)A:In​→Option(W), any row (S,h,y)(S,h,y)(S,h,y) with ∣S∣=k|S|=k∣S∣=k, any cell p∈Inp\in I_np∈In​, and any function f:In→Wf:I_n\to Wf:In​→W. Write F(i)=wF(i)=wF(i)=w if A(i)=some⁡(w)A(i)=\operatorname{some}(w)A(i)=some(w) and F(i)=f(i)F(i)=f(i)F(i)=f(i) if A(i)=⊥A(i)=\botA(i)=⊥. The returned snapshot A′A'A′ is defined at each i∈Ini\in I_ni∈In​ by A′(i)=A(i)A'(i)=A(i)A′(i)=A(i) for i∉Si\notin Si∈/S, by A′(i)=some⁡(F(i))A'(i)=\operatorname{some}(F(i))A′(i)=some(F(i)) for i∈Si\in Si∈S with i≠pi\ne pi=p, and by A′(p)=some⁡((h,y)+∑j∈S∖{p}F(j))A'(p)=\operatorname{some}\bigl((h,y)+\sum_{j\in S\setminus\{p\}}F(j)\bigr)A′(p)=some((h,y)+∑j∈S∖{p}​F(j)) if p∈Sp\in Sp∈S. The sums and addition are coordinatewise modulo two, and all F(j)F(j)F(j) use the input snapshot AAA. No assumption requires p∈Sp\in Sp∈S or A(p)=⊥A(p)=\botA(p)=⊥: if p∉Sp\notin Sp∈/S, every cell of SSS receives the nonpivot rule and the value at ppp is unchanged; if p∈Sp\in Sp∈S and was already present, its value is overwritten by the displayed sum. Every cell of SSS becomes present, even when its assigned word is zero. If S={p}S=\{p\}S={p}, the sum is empty and the word assigned at ppp is (h,y)(h,y)(h,y).

step. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, every snapshot A:In→Option⁡(W)A:I_n\to\operatorname{Option}(W)A:In​→Option(W) with W=BIa×BIbW=B^{I_a}\times B^{I_b}W=BIa​×BIb​, and every attempt consisting of a row (S,h,y)(S,h,y)(S,h,y) with ∣S∣=k|S|=k∣S∣=k, an optional pivot, and a function f:In→Wf:I_n\to Wf:In​→W, this returns AAA unchanged if the pivot is absent. If the pivot is some⁡(p)\operatorname{some}(p)some(p), define F(i)F(i)F(i) to be the present word at iii in AAA, or f(i)f(i)f(i) if that cell is absent; the returned snapshot leaves cells outside SSS unchanged, assigns some⁡(F(i))\operatorname{some}(F(i))some(F(i)) at each i∈S∖{p}i\in S\setminus\{p\}i∈S∖{p}, and, if p∈Sp\in Sp∈S, assigns some⁡((h,y)+∑j∈S∖{p}F(j))\operatorname{some}\bigl((h,y)+\sum_{j\in S\setminus\{p\}}F(j)\bigr)some((h,y)+∑j∈S∖{p}​F(j)) at ppp, with coordinatewise addition modulo two and an empty sum equal to zero. The operation requires no admissibility hypothesis and performs no admissibility test; it is defined for absent pivots when supported cells are absent and for present pivots outside the support or at already-present cells.

run. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, every initial snapshot A:In→Option⁡(W)A:I_n\to\operatorname{Option}(W)A:In​→Option(W) where W=BIa×BIbW=B^{I_a}\times B^{I_b}W=BIa​×BIb​, and every finite list of attempts, this returns the result of processing the list in order from its first element to its last. An attempt contains a support S⊆InS\subseteq I_nS⊆In​ of size kkk, a prefix h:Ia→Bh:I_a\to Bh:Ia​→B, an identifier y:Ib→By:I_b\to By:Ib​→B, an optional pivot, and a function f:In→Wf:I_n\to Wf:In​→W. An absent pivot leaves the current snapshot unchanged. For a present pivot ppp, let F(i)F(i)F(i) be the current word at iii when present and f(i)f(i)f(i) otherwise; the next snapshot leaves cells outside SSS unchanged, stores F(i)F(i)F(i) at every nonpivot cell i∈Si\in Si∈S, and, if p∈Sp\in Sp∈S, stores (h,y)+∑j∈S∖{p}F(j)(h,y)+\sum_{j\in S\setminus\{p\}}F(j)(h,y)+∑j∈S∖{p}​F(j) at ppp, where every stored value is marked present and all additions are coordinatewise modulo two. Processing the empty list returns the initial snapshot itself. Lists may repeat attempts, and no admissibility condition is imposed on the initial snapshot or any list entry.

Honest. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, every initial snapshot A:In→Option⁡(W)A:I_n\to\operatorname{Option}(W)A:In​→Option(W) where W=BIa×BIbW=B^{I_a}\times B^{I_b}W=BIa​×BIb​, and every finite list of attempts, this is the recursively defined proposition that each attempt meets its pivot condition in the snapshot reached immediately before it. For an attempt with row (S,h,y)(S,h,y)(S,h,y), ∣S∣=k|S|=k∣S∣=k, optional pivot, and word function fff, that condition is ∀i∈S, A(i)≠⊥\forall i\in S,\ A(i)\ne\bot∀i∈S, A(i)=⊥ if the pivot is absent, and p∈S∧A(p)=⊥p\in S\land A(p)=\botp∈S∧A(p)=⊥ if the pivot is some⁡(p)\operatorname{some}(p)some(p), using the current snapshot in place of AAA. An absent pivot leaves that snapshot unchanged; for a present pivot ppp, let F(i)F(i)F(i) be its current present word, or f(i)f(i)f(i) if absent, leave cells outside SSS unchanged, store F(i)F(i)F(i) at cells of SSS other than ppp, and store (h,y)+∑j∈S∖{p}F(j)(h,y)+\sum_{j\in S\setminus\{p\}}F(j)(h,y)+∑j∈S∖{p}​F(j) at ppp when p∈Sp\in Sp∈S, with coordinatewise addition modulo two and all newly stored values marked present. For a nonempty list, the proposition is the conjunction of the first attempt's condition and the same recursively defined proposition for the remaining list at this updated snapshot. For the empty list it is true for every initial snapshot. There is no requirement that the initial snapshot be all absent, and no restriction on the values of the word functions beyond their types.

honestDecidable. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, this supplies a decision for every snapshot A:In→Option⁡(W)A:I_n\to\operatorname{Option}(W)A:In​→Option(W), W=BIa×BIbW=B^{I_a}\times B^{I_b}W=BIa​×BIb​, and every finite list of attempts, as to whether the following successive conditions hold. An attempt has row (S,h,y)(S,h,y)(S,h,y) with ∣S∣=k|S|=k∣S∣=k, optional pivot, and word function fff; an absent pivot requires every cell of SSS currently present and makes no update, whereas a present pivot ppp requires p∈Sp\in Sp∈S and its current cell absent. The update associated to a present pivot uses F(i)F(i)F(i) equal to the current present word or f(i)f(i)f(i) if absent, preserves cells outside SSS, stores F(i)F(i)F(i) at each nonpivot supported cell, and, if p∈Sp\in Sp∈S, stores (h,y)+∑j∈S∖{p}F(j)(h,y)+\sum_{j\in S\setminus\{p\}}F(j)(h,y)+∑j∈S∖{p}​F(j) at ppp, with coordinatewise addition modulo two and newly stored words marked present. The decision is affirmative for an empty list. For a nonempty list it combines the decision of the first pivot condition with the recursively obtained decision for the remaining list at the updated snapshot, deciding their conjunction. Its result is either evidence that all successive conditions hold or evidence that they do not; it makes no assertion that an arbitrary input list satisfies them.

Anonymous instance deciding Honest. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, every snapshot A:In→Option⁡(W)A:I_n\to\operatorname{Option}(W)A:In​→Option(W) with W=BIa×BIbW=B^{I_a}\times B^{I_b}W=BIa​×BIb​, and every finite list of attempts, this installs the recursively computed decision of the following property: at each attempt, with row (S,h,y)(S,h,y)(S,h,y) of support size kkk, optional pivot, and word function fff, an absent pivot has all supported cells currently present, while a present pivot ppp belongs to SSS and is currently absent. Snapshots evolve in list order by leaving them unchanged for absent pivots and, for present pivots, taking F(i)F(i)F(i) to be the current present word or the fallback f(i)f(i)f(i), leaving cells outside SSS unchanged, storing F(i)F(i)F(i) at each i∈S∖{p}i\in S\setminus\{p\}i∈S∖{p}, and storing (h,y)+∑j∈S∖{p}F(j)(h,y)+\sum_{j\in S\setminus\{p\}}F(j)(h,y)+∑j∈S∖{p}​F(j) at ppp if p∈Sp\in Sp∈S, where addition is coordinatewise modulo two and stored words are present. The empty list satisfies the property regardless of AAA. The installed decision produces either evidence of this property or its negation for every input, and has no additional hypothesis beyond the specified types.

successful. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, and every finite list of attempts, each having a row (S,h,y)(S,h,y)(S,h,y) with S⊆InS\subseteq I_nS⊆In​, ∣S∣=k|S|=k∣S∣=k, h:Ia→Bh:I_a\to Bh:Ia​→B, and y:Ib→By:I_b\to By:Ib​→B, an optional cell pivot, and an arbitrary function In→BIa×BIbI_n\to B^{I_a}\times B^{I_b}In​→BIa​×BIb​, this returns the list of rows from precisely those attempts whose pivots are present. It keeps their original order and multiplicities, discards attempts with absent pivots, and discards the actual pivot values and word functions from the result. It has no snapshot argument and checks neither pivot membership in the support nor occupancy nor any successive admissibility condition. The input list may be empty, in which case the returned list is empty.

finalSnapshot. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, and every finite list of attempts, this produces an optional-word assignment on InI_nIn​ by starting with A(i)=⊥A(i)=\botA(i)=⊥ at every cell and processing the attempts in list order. For each attempt with row (S,h,y)(S,h,y)(S,h,y), ∣S∣=k|S|=k∣S∣=k, optional pivot, and function f:In→Wf:I_n\to Wf:In​→W where W=BIa×BIbW=B^{I_a}\times B^{I_b}W=BIa​×BIb​, an absent pivot leaves the current assignment unchanged. For a present pivot ppp, let F(i)F(i)F(i) be the current present word at iii or f(i)f(i)f(i) if absent; the next assignment preserves cells outside SSS, stores F(i)F(i)F(i) at cells of SSS other than ppp, and stores (h,y)+∑j∈S∖{p}F(j)(h,y)+\sum_{j\in S\setminus\{p\}}F(j)(h,y)+∑j∈S∖{p}​F(j) at ppp if p∈Sp\in Sp∈S, with coordinatewise addition modulo two and all stored words marked present. The returned snapshot is the assignment after the last entry; for the empty list it is the all-absent assignment. No admissibility condition is assumed or tested, so the function also accepts lists containing pivots outside their supports or at already-present cells.

occupied. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, and every snapshot A:In→Option⁡(BIa×BIb)A:I_n\to\operatorname{Option}(B^{I_a}\times B^{I_b})A:In​→Option(BIa​×BIb​), this is the finite set {i∈In∣A(i)=some⁡(w) for some w∈BIa×BIb}\{i\in I_n\mid A(i)=\operatorname{some}(w)\text{ for some }w\in B^{I_a}\times B^{I_b}\}{i∈In​∣A(i)=some(w) for some w∈BIa​×BIb​}. Membership depends only on whether a word is present, so a cell containing a zero word belongs to this set. The set is empty for an all-absent snapshot and is InI_nIn​ for a snapshot with every cell present; it has no row or list argument.

payload. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, every snapshot A:In→Option⁡(W)A:I_n\to\operatorname{Option}(W)A:In​→Option(W) where W=BIa×BIbW=B^{I_a}\times B^{I_b}W=BIa​×BIb​, and every cell i∈Ini\in I_ni∈In​, this returns the word www when A(i)=some⁡(w)A(i)=\operatorname{some}(w)A(i)=some(w) and returns the all-zero word of WWW when A(i)=⊥A(i)=\botA(i)=⊥. Consequently an absent cell and a cell containing the zero word have the same returned payload, even though their optional snapshot values differ. There is no hypothesis that iii is occupied.

rowXor. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, every snapshot A:In→Option⁡(W)A:I_n\to\operatorname{Option}(W)A:In​→Option(W) with W=BIa×BIbW=B^{I_a}\times B^{I_b}W=BIa​×BIb​, and every row (S,h,y)(S,h,y)(S,h,y) with S⊆InS\subseteq I_nS⊆In​, ∣S∣=k|S|=k∣S∣=k, h:Ia→Bh:I_a\to Bh:Ia​→B, and y:Ib→By:I_b\to By:Ib​→B, this returns ∑i∈SP(i)∈W\sum_{i\in S}P(i)\in W∑i∈S​P(i)∈W, where P(i)P(i)P(i) is the word present at iii in AAA, or the all-zero word if that cell is absent. The sum is coordinatewise modulo two and counts each supported cell once. The support is nonempty, but every summand may still be zero, including when all supported cells are absent. The row's prefix hhh and identifier yyy do not enter the expression, and no assertion equates this sum with (h,y)(h,y)(h,y).

recover. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, and every snapshot A:In→Option⁡(W)A:I_n\to\operatorname{Option}(W)A:In​→Option(W) where W=BIa×BIbW=B^{I_a}\times B^{I_b}W=BIa​×BIb​, this returns the suffix component of ∑i∈OP(i)\sum_{i\in O}P(i)∑i∈O​P(i), where O={i∈In∣A(i) is present}O=\{i\in I_n\mid A(i)\text{ is present}\}O={i∈In​∣A(i) is present} and P(i)P(i)P(i) is the present word at iii or zero if it is absent. Equivalently, the returned function y:Ib→By:I_b\to By:Ib​→B is defined by y(t)=∑i∈Ovi(t)y(t)=\sum_{i\in O}v_i(t)y(t)=∑i∈O​vi​(t), where A(i)=some⁡(ui,vi)A(i)=\operatorname{some}(u_i,v_i)A(i)=some(ui​,vi​) for i∈Oi\in Oi∈O and each sum is modulo two. Each occupied cell is counted once; cells storing zero are included and contribute zero. If OOO is empty, the result is the all-zero identifier. There is no input row, list of attempts, or admissibility hypothesis, and the definition asserts no relationship between this result and any prescribed identifier.

supportUnion. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, and every finite list of rows (S1,h1,y1),…,(Sm,hm,ym)(S_1,h_1,y_1),\ldots,(S_m,h_m,y_m)(S1​,h1​,y1​),…,(Sm​,hm​,ym​), where each Sj⊆InS_j\subseteq I_nSj​⊆In​ has cardinality kkk, each hj:Ia→Bh_j:I_a\to Bhj​:Ia​→B, and each yj:Ib→By_j:I_b\to Byj​:Ib​→B, this returns a finite set formed by starting with U0=∅U_0=\varnothingU0​=∅ and defining Uj=Uj−1∪SjU_j=U_{j-1}\cup S_jUj​=Uj−1​∪Sj​ for j=1,…,mj=1,\ldots,mj=1,…,m. Thus its value is ⋃j=1mSj\bigcup_{j=1}^{m}S_j⋃j=1m​Sj​. Empty lists give the empty set, repeated rows or overlapping supports do not create multiplicities, and the prefixes and identifiers are unused. Every individual support is nonempty; the union is nonempty when the list is nonempty.

identifierXor. For every configuration CCC with natural parameters n,k,a,bn,k,a,bn,k,a,b satisfying 1≤k≤n1\le k\le n1≤k≤n, 1≤a1\le a1≤a, and 1≤b1\le b1≤b, and every finite list of rows (S1,h1,y1),…,(Sm,hm,ym)(S_1,h_1,y_1),\ldots,(S_m,h_m,y_m)(S1​,h1​,y1​),…,(Sm​,hm​,ym​), where each Sj⊆InS_j\subseteq I_nSj​⊆In​ has cardinality kkk, each hj:Ia→Bh_j:I_a\to Bhj​:Ia​→B, and each yj:Ib→By_j:I_b\to Byj​:Ib​→B, this returns the function y:Ib→By:I_b\to By:Ib​→B defined by y(t)=∑j=1myj(t)y(t)=\sum_{j=1}^{m}y_j(t)y(t)=∑j=1m​yj​(t), with addition modulo two. Every row occurrence in the list contributes once, including repeated rows or repeated identifiers; an identifier repeated twice contributes zero from those two occurrences. The empty list returns the all-zero identifier. The row supports and prefixes do not enter this sum, and no uniqueness or disjointness hypothesis is required.

Human review
  • Endorsed by Shuze Chen · Oct 23, 2026

    Confirmed by the moderator at approval.

  • Endorsed by queelius · Oct 23, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me