AFTD Auto-Formalizing Theoretical Domains

boundary_one_barrier_count_impossible

theoremverified

The displayed nonnegative integer block counts, odd extra-shore size, residual size and endpoint and extra-shore defect inequalities are inconsistent.

Statement

theorem boundary_one_barrier_count_impossible
    (k a b c d e f g h i j l m t : ℕ) (hk : 5 ≤ k)
    (ha : 1 ≤ a) (hg : 1 ≤ g) (hu : i+j+l+m=2*t+1)
    (htotal : a+b+c+d+e+f+g+h+i+j+l+m+1=2*k)
    (hA : a+e+i ≤ 5) (hC : c+g+l ≤ 5)
    (hB : b+f+j+5 ≤ 2*k) (hD : d+h+m+5 ≤ 2*k)
    (hx : e+i+g+l+h+m ≤ 3) (hy : a+i+b+j+c+l ≤ 3)
    (hAi : 1 ≤ i → a+e+c+g+d+h ≤ 2)
    (hBj : 1 ≤ j → b+f+c+g+d+h+8 ≤ 2*k)
    (hCl : 1 ≤ l → a+e+b+f+c+g ≤ 2)
    (hDm : 1 ≤ m → a+e+b+f+d+h+8 ≤ 2*k) : False
Source
OP-1957: arithmetic for a one-vertex barrier in the nonclique four-block route.
Verified
22 Nov 2026
Axioms
Quot.soundpropext
Used by 1

The proof, explained

The proof proceeds by an exhaustive case analysis on the positivity of the four variables $i, j, l$, and $m$. Branching on whether each variable is at least 1 or equal to 0 produces 16 subcases, in each of which the conditional hypotheses resolve into definite linear inequalities. The automated Presburger arithmetic solver `omega` then shows that the resulting system of linear integer constraints is unsatisfiable in every single case.

  1. The goal reduces to 16 cases, corresponding to whether each of the four variables $i, j, l, m$ is positive or zero.

    We perform a fourfold case split on whether $1 \le i$, $1 \le j$, $1 \le l$, and $1 \le m$. Since the variables are natural numbers, the negative case $\neg(1 \le x)$ corresponds to $x = 0$. Considering each variable's positivity independently yields $2^4 = 16$ distinct subgoals.

    lines 12–13

      by_cases hi : 1 ≤ i <;> by_cases hj : 1 ≤ j <;>
        by_cases hl : 1 ≤ l <;> by_cases hm : 1 ≤ m <;>
  2. Every one of the 16 cases is contradictory, establishing False. automation

    In each branch, the four conditional hypotheses (`hAi`, `hBj`, `hCl`, `hDm`) have their premises evaluated using `true_implies` and `false_implies`. Premises that hold are discharged, promoting the corresponding inequalities into active linear constraints, while premises that fail are discarded as vacuously true. The automated linear arithmetic solver `omega` then determines that the resulting system of linear equations and inequalities over $\mathbb{N}$ admits no solutions in any of the 16 cases, closing all goals.

    line 14

    uses true_implies, false_implies

        simp_all only [true_implies, false_implies] <;> omega
true_implies
An implication whose antecedent is true is logically equivalent to its consequent: $(\mathrm{True} \to P) \iff P$.
false_implies
An implication whose antecedent is false is vacuously true: $(\mathrm{False} \to P) \iff \mathrm{True}$.

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 boundary_one_barrier_count_impossible    (k a b c d e f g h i j l m t : ℕ) (hk : 5 ≤ k)    (ha : 1 ≤ a) (hg : 1 ≤ g) (hu : i+j+l+m=2*t+1)    (htotal : a+b+c+d+e+f+g+h+i+j+l+m+1=2*k)    (hA : a+e+i ≤ 5) (hC : c+g+l ≤ 5)    (hB : b+f+j+5 ≤ 2*k) (hD : d+h+m+5 ≤ 2*k)    (hx : e+i+g+l+h+m ≤ 3) (hy : a+i+b+j+c+l ≤ 3)    (hAi : 1 ≤ i → a+e+c+g+d+h ≤ 2)    (hBj : 1 ≤ j → b+f+c+g+d+h+8 ≤ 2*k)    (hCl : 1 ≤ l → a+e+b+f+c+g ≤ 2)    (hDm : 1 ≤ m → a+e+b+f+d+h+8 ≤ 2*k) : False := by  by_cases hi : 1 ≤ i <;> by_cases hj : 1 ≤ j <;>    by_cases hl : 1 ≤ l <;> by_cases hm : 1 ≤ m <;>    simp_all only [true_implies, false_implies] <;> omega
See it in the graphDiscuss this resultChallenge it