AFTD Auto-Formalizing Theoretical Domains

boundary_clique_same_x_shore_count

theoremverified

The displayed odd-shore, size and defect constraints force the three stated counts in the same-x placement.

Statement

theorem boundary_clique_same_x_shore_count
    (k a b c d : ℕ) (hk : 5 ≤ k) (ha : 1 ≤ a) (hc : 1 ≤ c)
    (hd : d ≤ 2*k-5) (htotal : a+b+c+d=2*k)
    (hc3 : c ≤ 3) (hcodd : Odd c) (hy : a+b ≤ 3)
    (hotherC : 2 ≤ c → a+b ≤ 2)
    (hotherA : 2 ≤ a → c ≤ 2) :
    a=1 ∧ b=1 ∧ c=3
Source
OP-1957: arithmetic in the clique-block essential-edge classification; experiment 37117.
Verified
22 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

The proof, explained

The proof determines the values of c, a, and b sequentially through linear arithmetic on the given constraints. First, the odd integer c ≤ 3 cannot equal 1 because the total sum a + b + c + d = 2k and a + b ≤ 3 would force the defect d ≥ 2k - 4, contradicting d ≤ 2k - 5; hence c = 3. Next, since c ≥ 2, the hypothesis `hotherC` gives a + b ≤ 2, which together with the defect bound forces a + b = 2. Finally, assuming a ≠ 1 forces a ≥ 2 and thus c ≤ 2 via `hotherA`, contradicting c = 3; therefore a = 1 and b = 1.

  1. c = 3

    Unpack the oddness hypothesis `hcodd` to write c = 2i + 1 for some natural number i. If c were 1, then since a + b ≤ 3, the total sum a + b + c + d = 2k would force d = 2k - (a + b + 1) ≥ 2k - 4, contradicting the defect bound d ≤ 2k - 5. Thus c ≠ 1. Since c is an odd natural number satisfying 1 ≤ c ≤ 3 and c ≠ 1, linear arithmetic uniquely determines c = 3.

    lines 8–10

      obtain ⟨i, hi⟩ := hcodd
      have hcne1 : c ≠ 1 := by omega
      have hc_eq : c=3 := by omega
  2. a + b = 2

    Since c = 3 ≥ 2, the hypothesis `hotherC` applies and gives a + b ≤ 2. At the same time, using c = 3 and d ≤ 2k - 5 in the total sum a + b + c + d = 2k yields a + b = 2k - 3 - d ≥ 2k - 3 - (2k - 5) = 2. Linear arithmetic combines these two bounds to conclude a + b = 2.

    lines 11–13

      have hab : a+b=2 := by
        have h := hotherC (by omega)
        omega
  3. a = 1

    Argue by contradiction (`by_contra`): suppose a ≠ 1. Since 1 ≤ a, this forces 2 ≤ a. By hypothesis `hotherA`, 2 ≤ a implies c ≤ 2, which contradicts c = 3. Hence a = 1.

    lines 14–17

      have ha1 : a=1 := by
        by_contra h
        have hh := hotherA (by omega)
        omega
  4. a = 1 ∧ b = 1 ∧ c = 3

    Linear arithmetic combines a = 1, a + b = 2, and c = 3 to deduce b = 1 and close the conjunction.

    line 18

      omega

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_clique_same_x_shore_count    (k a b c d : ℕ) (hk : 5 ≤ k) (ha : 1 ≤ a) (hc : 1 ≤ c)    (hd : d ≤ 2*k-5) (htotal : a+b+c+d=2*k)    (hc3 : c ≤ 3) (hcodd : Odd c) (hy : a+b ≤ 3)    (hotherC : 2 ≤ c → a+b ≤ 2)    (hotherA : 2 ≤ a → c ≤ 2) :    a=1 ∧ b=1 ∧ c=3 := by  obtain ⟨i, hi⟩ := hcodd  have hcne1 : c ≠ 1 := by omega  have hc_eq : c=3 := by omega  have hab : a+b=2 := by    have h := hotherC (by omega)    omega  have ha1 : a=1 := by    by_contra h    have hh := hotherA (by omega)    omega  omega
See it in the graphDiscuss this resultChallenge it