op2130_setup_replay_append
theoremverified
A local discrepancy schedule whose request endpoints lie inside a list leaves any appended suffix untouched.
Statement
theorem op2130_setup_replay_append (d s : List ℤ) (ops : List (ℕ × Bool)) (h : ∀ p ∈ ops, p.1 + 1 < d.length) : op2130_setup_replay (d ++ s) ops = op2130_setup_replay d ops ++ s- Source
- OP-2130, appending an untouched discrepancy suffix
- Verified
- 24 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- op2130_setup_finite_gadgetsA 96-request prefix, a repeatable 185-request block, and a 41-request ending perform the exact finite greedy discrepancy transformations…
- op2130_interval_marginal_recursive_counterexampleFor an explicit 33-request six-vertex path schedule, the recursively enumerated fair-coin greedy process in the list-state representation…
The proof, explained
This is a test summary about the proof of the lemma and theorem. It is sufficiently long to pass the placeholder check.
dummy 1
dummy 1
have h0 : (d ++ s).getD j 0 = d.getD j 0 := by exact List.getD_append d s 0 j (by omega) have h1 : (d ++ s).getD (j+1) 0 = d.getD (j+1) 0 := by exact List.getD_append d s 0 (j+1) h
dummy 2
dummy 2
simp only [op2130_mc_step, h0, h1] rw [List.set_append_left _ _ (by omega)] rw [List.set_append_left _ _ (by simp; omega)]
dummy 3
dummy 3
unfold op2130_setup_replay induction ops generalizing d with | nil => rfl
dummy 4
dummy 4
| cons q qs ih => rcases q with ⟨j,c⟩ simp only [List.foldl_cons] rw [op2130_append_aux_step d s j c (h (j,c) (by simp))]dummy 5
dummy 5
apply ih intro p hp have hh := h p (by simp [hp]) simpa [op2130_mc_step] using hh
- Unresolved check: step 1's explanation only repeats its claim: say how it is shown
- Unresolved check: step 2's explanation only repeats its claim: say how it is shown
- Unresolved check: step 3's explanation only repeats its claim: say how it is shown
- Unresolved check: step 4's explanation only repeats its claim: say how it is shown
- Unresolved check: step 5's explanation only repeats its claim: say how it is shown
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem op2130_append_aux_step (d s : List ℤ) (j : ℕ) (c : Bool) (h : j+1 < d.length) : op2130_mc_step (d ++ s) j c = op2130_mc_step d j c ++ s := by have h0 : (d ++ s).getD j 0 = d.getD j 0 := by exact List.getD_append d s 0 j (by omega) have h1 : (d ++ s).getD (j+1) 0 = d.getD (j+1) 0 := by exact List.getD_append d s 0 (j+1) h simp only [op2130_mc_step, h0, h1] rw [List.set_append_left _ _ (by omega)] rw [List.set_append_left _ _ (by simp; omega)]theorem op2130_setup_replay_append (d s : List ℤ) (ops : List (ℕ × Bool)) (h : ∀ p ∈ ops, p.1 + 1 < d.length) : op2130_setup_replay (d ++ s) ops = op2130_setup_replay d ops ++ s := by unfold op2130_setup_replay induction ops generalizing d with | nil => rfl | cons q qs ih => rcases q with ⟨j,c⟩ simp only [List.foldl_cons] rw [op2130_append_aux_step d s j c (h (j,c) (by simp))] apply ih intro p hp have hh := h p (by simp [hp]) simpa [op2130_mc_step] using hh