AFTD Auto-Formalizing Theoretical Domains

op_2130_converse_d2

theoremverified

There exists an edge sequence of length at most 2^3 on the 4-vertex path graph SimpleGraph.pathGraph 4 such that the uniform probability over all fair coin assignments that randomized greedy carpooling achieves maximum prefix discrepancy at least 2 is at least 1/2.

Statement

theorem op_2130_converse_d2 :
    ∃ (edges : List (Fin 4 × Fin 4)),
      (∀ e ∈ edges, (SimpleGraph.pathGraph 4).Adj e.1 e.2) ∧
      edges.length ≤ 2 ^ 3 ∧
      let T := edges.length
      let high_discrepancy := Finset.univ.filter (fun r : Fin T → Bool =>
        2 ≤ carpool_max_discrepancy 4 edges
          (carpool_greedy_orientations 4 edges (List.ofFn r)))
      (1 / 2 : ℝ) ≤ ((high_discrepancy.card : ℝ) / (2 ^ T : ℝ))
Source
arXiv:2611.00388; OP-2130
Verified
22 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3

Read back from the Lean

There exists a list edges of pairs of vertices in Fin 4 such that: 1. Every edge e in edges is an edge of the path graph on 4 vertices (SimpleGraph.pathGraph 4), i.e., e.1 and e.2 are adjacent; 2. The length of edges is at most $2^3 = 8$; and 3. Letting $T$ be the length of edges, if coin flips $r \in \mathrm{Bool}^T$ are chosen uniformly at random, then with probability at least $1/2$ (i.e., for at least $2^{T-1}$ of the $2^T$ possible assignments $r : \mathrm{Fin}\; T \to \mathrm{Bool}$), the maximum vertex discrepancy reached at any point during the online greedy carpool orientation process on edges with tie-breaking given by $r$ is at least 2.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

The proof exhibits an explicit witness sequence of three edges on the 4-vertex path graph: e₁ = (0, 1), e₂ = (2, 3), and e₃ = (1, 2). Because the first two edges are vertex-disjoint, their orientations are chosen by two independent fair coin tosses, resulting in vertices 1 and 2 having identical discrepancies with probability 1/2. When this tie occurs, greedy orientation on the third edge e₃ = (1, 2) is forced to increase the absolute discrepancy of one of these vertices to 2 regardless of the third coin toss. The edge validity, the length bound 3 ≤ 2^3, and the exact count of 4 high-discrepancy outcomes out of 8 are all established by finite computation.

  1. We propose the three-edge sequence [(0, 1), (2, 3), (1, 2)] as a witness.

    The existential quantifier is instantiated with the candidate sequence of three edges [(0, 1), (2, 3), (1, 2)], where each vertex index in Fin 4 is verified by arithmetic bounds (0 < 4, 1 < 4, 2 < 4, 3 < 4). This splits the goal into three subgoals: validity of the edges in the path graph, the length bound, and the discrepancy probability bound.

    line 11

      refine ⟨[(⟨0, by decide⟩, ⟨1, by decide⟩), (⟨2, by decide⟩, ⟨3, by decide⟩), (⟨1, by decide⟩, ⟨2, by decide⟩)], ?_, ?_, ?_⟩
  2. Every edge in the sequence is an adjacent edge in the 4-vertex path graph.

    For an arbitrary edge e in the list, expanding the definition of list membership with List.mem_cons, List.not_mem_nil, and or_false reduces the condition to e = (0, 1) ∨ e = (2, 3) ∨ e = (1, 2). Case analysis on these three possibilities confirms by direct evaluation of the graph adjacency relation that each pair is an edge of SimpleGraph.pathGraph 4.

    lines 12–14

    uses List.mem_cons, List.not_mem_nil, or_false

      · intro e he
        simp only [List.mem_cons, List.not_mem_nil, or_false] at he
        rcases he with rfl | rfl | rfl <;> decide
  3. The sequence length is at most 2^3.

    The list has length 3, and the inequality 3 ≤ 2^3 = 8 is verified by direct calculation.

    line 15

      · decide
  4. The probability that randomized greedy carpooling achieves maximum prefix discrepancy at least 2 is at least 1/2.

    With sequence length T = 3, there are 2^3 = 8 possible coin toss sequences in Fin 3 → Bool. Exhaustive evaluation over all 8 sequences shows that exactly 4 of them produce a maximum prefix discrepancy of at least 2 (hc). Substituting this count into the probability ratio gives 4 / 2^3 = 4 / 8, which numerical evaluation confirms is at least 1/2.

    lines 16–20

      · intro T high_discrepancy
        have hc : high_discrepancy.card = 4 := by decide
        change (1 / 2 : ℝ) ≤ (high_discrepancy.card : ℝ) / (2 ^ 3 : ℝ)
        rw [hc]
        norm_num
List.mem_cons
An element belongs to a prepended list b :: l if and only if it equals the head b or belongs to the tail l.
List.not_mem_nil
No element belongs to the empty list.
or_false
For any proposition p, the disjunction p ∨ False is equivalent to p.

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

/-- The D = 2 case of the OP-2130 converse: an oblivious sequence of 3 edges on the 4-vertex path graph achieves maximum prefix discrepancy at least 2 with probability at least 1/2. -/theorem op_2130_converse_d2 :    ∃ (edges : List (Fin 4 × Fin 4)),      (∀ e ∈ edges, (SimpleGraph.pathGraph 4).Adj e.1 e.2) ∧      edges.length ≤ 2 ^ 3 ∧      let T := edges.length      let high_discrepancy := Finset.univ.filter (fun r : Fin T → Bool =>        2 ≤ carpool_max_discrepancy 4 edges          (carpool_greedy_orientations 4 edges (List.ofFn r)))      (1 / 2 : ℝ) ≤ ((high_discrepancy.card : ℝ) / (2 ^ T : ℝ)) := by  refine ⟨[(⟨0, by decide⟩, ⟨1, by decide⟩), (⟨2, by decide⟩, ⟨3, by decide⟩), (⟨1, by decide⟩, ⟨2, by decide⟩)], ?_, ?_, ?_⟩  · intro e he    simp only [List.mem_cons, List.not_mem_nil, or_false] at he    rcases he with rfl | rfl | rfl <;> decide  · decide  · intro T high_discrepancy    have hc : high_discrepancy.card = 4 := by decide    change (1 / 2 : ℝ) ≤ (high_discrepancy.card : ℝ) / (2 ^ 3 : ℝ)    rw [hc]    norm_num
See it in the graphDiscuss this resultChallenge it