AFTD Auto-Formalizing Theoretical Domains

op2130_height_law_not_log_supermodular

theoremverified

For three fixed requests on a four-vertex path, the cumulative-height distribution assigns counts 1 and 1 to two incomparable profiles, but counts 2 and 0 to their coordinatewise minimum and maximum, so the joint law is not lattice log-supermodular.

Statement

theorem op2130_height_law_not_log_supermodular :
    let es : List (Fin 4 × Fin 4) := [(0,1), (2,3), (1,2)]
    let count : ℤ → ℤ → ℤ → ℕ := fun a b c =>
      (Finset.univ.filter fun r : Fin 3 → Bool =>
        let d := ((carpool_discrepancies 4 es (carpool_greedy_orientations 4 es (List.ofFn r))).getD 3 (fun _ => 0))
        d 0 = a ∧ d 0 + d 1 = b ∧ d 0 + d 1 + d 2 = c).card
    count (-1) (-1) 1 = 1 ∧ count 1 (-1) (-1) = 1 ∧
      count (-1) (-1) (-1) = 2 ∧ count 1 (-1) 1 = 0
Source
OP-2130, finite repeated-path counterexample
Verified
24 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
  • carpool_discrepanciesThe sequence of discrepancy vectors (d₀, ..., d_T) starting from the zero vector, where each d_t is updated from d_{t-1} using the t-th…
  • carpool_greedy_orientationsGiven a list of edges and a list of tie-breaking coins, randomized greedy carpooling orients each edge toward the endpoint with smaller…

The proof, explained

The proof provides a concrete counterexample to lattice log-supermodularity for the cumulative-height distribution in the carpool problem on a 4-vertex path with 3 requests. For the two incomparable height profiles $u = (-1, -1, 1)$ and $v = (1, -1, -1)$, their coordinatewise minimum is $u \wedge v = (-1, -1, -1)$ and their maximum is $u \vee v = (1, -1, 1)$. Because the sample space consists of only $2^3 = 8$ coin sequences, the tactic `decide` evaluates the algorithm on all inputs to establish that $u$ and $v$ each occur once, while $u \wedge v$ occurs twice and $u \vee v$ never occurs, violating $P(u) P(v) \le P(u \wedge v) P(u \vee v)$.

  1. The counts of coin-flip sequences yielding cumulative heights $(-1, -1, 1)$, $(1, -1, -1)$, $(-1, -1, -1)$, and $(1, -1, 1)$ are 1, 1, 2, and 0, respectively. automation

    With only 3 edge requests, there are $2^3 = 8$ possible coin-flip sequences in $\text{Fin } 3 \to \text{Bool}$. The decision procedure evaluates the deterministic greedy orientation algorithm and resulting cumulative discrepancies for all 8 sequences, filters each set, computes its cardinality, and verifies the four claimed equalities by direct finite computation.

    line 9

      decide

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

theorem op2130_height_law_not_log_supermodular :    let es : List (Fin 4 × Fin 4) := [(0,1), (2,3), (1,2)]    let count : ℤ → ℤ → ℤ → ℕ := fun a b c =>      (Finset.univ.filter fun r : Fin 3 → Bool =>        let d := ((carpool_discrepancies 4 es (carpool_greedy_orientations 4 es (List.ofFn r))).getD 3 (fun _ => 0))        d 0 = a ∧ d 0 + d 1 = b ∧ d 0 + d 1 + d 2 = c).card    count (-1) (-1) 1 = 1 ∧ count 1 (-1) (-1) = 1 ∧      count (-1) (-1) (-1) = 2 ∧ count 1 (-1) 1 = 0 := by  decide
See it in the graphDiscuss this resultChallenge it