Every birth permutation has a valid positional insertion replay
Proof verified
complete
Can every permutation of birth times be realized by a sequence of valid positional insertions, with every intermediate list equal to the final order filtered by birth time?
Example: desired final order [2,0,1]. Insert identity 0 at position 0, producing [0]. Insert identity 1 at position 1, producing [0,1]. Insert identity 2 at position 0, producing [2,0,1]. Each identity is inserted once; no deletion or concurrency is needed.
Self-contained definitions: order is a list of distinct natural identities containing exactly 0 through n-1. born(order,cut) filters order to identities strictly less than cut. position(order,time) counts previously born identities before time in the final order: take the prefix before time, filter it to identities less than time, and count it. insertAt(state,pos,value) is state.take(pos) followed by value and state.drop(pos). replay begins empty and inserts identities 0,1,... using those positions.
The exact proposition requires three facts: for every cut at most n, replay equals born; each insertion position is at most the actual pre-insertion list length; and the final replay equals order. The bound matters because take/drop alone would otherwise silently clamp an invalid position. Uniqueness and complete membership are explicit premises, and no reconstruction equality is assumed.
Why this is useful: our historical source-rank problem allows arbitrary insertion positions. This lemma checks that arbitrary final-order birth permutations really occur in an abstract sequential list, rather than treating arbitrary birth arrays as unexplained inputs. It supports applying existing temporal-rank hardness reasoning. Hon, Lee, Sadakane and Tsakalidis already use a birth-only construction in their 2013 lower-bound proof; the reduction idea is prior art.
This question proves only the list construction. It does not formalize the cited cell-probe lower bound, transfer it to origin queries or whole CRDT merge latency, prove native Rust/CRDT refinement, or demonstrate a speed or memory gain. The offline construction knows the desired final order; it is not a proposed online CRDT algorithm. Prepared by James Addison (jungle) with Codex; separate adversarial AI review is recorded locally, and is not an independent human review on this site.
Formal statement
(fun (born : List Nat → Nat → List Nat) => (fun (position : List Nat → Nat → Nat) => (fun (insertAt : List Nat → Nat → Nat → List Nat) => (fun (replay : List Nat → Nat → List Nat) => ∀ (order : List Nat) (n : Nat), order.Nodup → (∀ time < n, time ∈ order) → (∀ time ∈ order, time < n) → (∀ cut ≤ n, replay order cut = born order cut) ∧ (∀ time < n, position order time ≤ (replay order time).length) ∧ replay order n = order ) (fun order cut => Nat.rec [] (fun time state => insertAt state (position order time) time) cut) ) (fun state pos value => state.take pos ++ value :: state.drop pos) ) (fun order time => (born (order.takeWhile (fun x => x != time)) time).length) ) (fun order cut => order.filter (fun time => time < cut))
Lean core · approved, fixed dependencies · download challenge
Exact version and statement fingerprint
Lean 62b6a2291302d4bbeace37642a066b7510d0145c
Statement SHA-256 daa2cbedd59be36b26a221343083d9a3b05f9a48b0d88df275369df5e4524987
Policy oa-lean-v1
Platform statement-check output
OA_statement : Prop
Linked requests
Recover the nearest older right neighbor from a shared-left group open
Review the meaning
A checked proof establishes this exact proposition. Statement reviews assess whether it expresses the description above.