AFTD Auto-Formalizing Theoretical Domains

boundary_five_blocks_two_defect_shore_arithmetic

theoremverified

The displayed degree, parity, size and separator counts force the second shore to contain both C nonneighbors of x, no A vertices on the first shore and exactly one B vertex on the first shore when x has exactly two C nonneighbors.

Statement

theorem boundary_five_blocks_two_defect_shore_arithmetic
    (m r qa qb qc qd wa wb wc wd Q W : ℕ)
    (hm : 5 ≤ m) (hr : r = 2) (hrc : wc ≤ r)
    (hqcapa : qa+wa ≤ 4) (hqcapb : qb+wb ≤ m)
    (hqcapc : qc+wc ≤ 4) (hqcapd : qd+wd ≤ m)
    (hQ : Q=qa+qb+qc+qd) (hW : W=wa+wb+wc+wd)
    (hQe : Even Q) (hWe : Even W) (htotal : Q+W=m+3)
    (hx : wa+wd+r ≤ 2) (hy : qa+qb+qc ≤ 2)
    (hqa : 0<qa → wa+wc+wd+1 ≤ 2)
    (hqb : 0<qb → wb+wc+wd+1+3 ≤ m)
    (hqc : 0<qc → wa+wb+wc+1 ≤ 2)
    (hqd : 0<qd → wa+wb+wd+3 ≤ m)
    (hwa : 0<wa → qa+qc+qd+1 ≤ 2)
    (hwb : 0<wb → qb+qc+qd+3 ≤ m)
    (hwc : 0<wc → qa+qb+qc+1 ≤ 2)
    (hwd : 0<wd → qa+qb+qd+1+3 ≤ m)
    (hsep : 0<qd → qd+wb+wd ≤ m) : wc=2 ∧ qa=0 ∧ qb=1
Source
OP-1957: unbounded arithmetic core of the two-five-block boundary classification.
Verified
24 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
Used by 2

The proof, explained

The proof deduces the shore vertex counts via linear-arithmetic constraints. First, the defect constraint wa + wd + r ≤ 2 with r = 2 forces wa = wd = 0, and a case analysis on whether qd is positive establishes qa ≤ 1. Next, assuming wc ≤ 1 would invoke the companion lemma boundary_five_blocks_short_c_shore_arithmetic to force qa ≥ 2, so wc must equal 2. Finally, neighborhood and separator bounds eliminate qa and qc, force qd > 0, and pin down qb = 1.

  1. wa = 0 and wd = 0

    Extracting the evenness witness of Q prepares for later lemma application. Then, because wa + wd + r ≤ 2 and r = 2, nonnegativity of wa and wd immediately forces wa = 0 and wd = 0.

    lines 18–19

      obtain ⟨i, hi⟩ := hQe
      have hzero : wa=0 ∧ wd=0 := by omega
  2. qa ≤ 1

    Suppose for contradiction that qa > 1. Combined with qa + qb + qc ≤ 2, this forces qa = 2 and qb = qc = 0. We then split into two cases: if qd > 0, the separator bound gives qd + wb ≤ m, which with the total sum Q + W = m + 3 forces wc > 0, triggering hwc to deduce qa + qb + qc + 1 ≤ 2 (a contradiction since qa = 2); if qd = 0, then W = m + 1 and wb ≤ m likewise forces wc > 0, reaching the same contradiction via hwc. Hence qa ≤ 1.

    lines 20–31

      have ha1 : qa ≤ 1 := by
        by_contra hna
        have ha2 : qa = 2 := by omega
        have hbc0 : qb=0 ∧ qc=0 := by omega
        by_cases hd : 0 < qd
        · have hs := hsep hd
          have hw : 0 < wc := by omega
          have hh := hwc hw
          omega
        · have hw : 0 < wc := by omega
          have hh := hwc hw
          omega
  3. wc = 2

    Suppose for contradiction that wc ≠ 2. Since wc ≤ r = 2, this implies wc ≤ 1. Applying boundary_five_blocks_short_c_shore_arithmetic with wc ≤ 1 yields qa ≥ 2, contradicting qa ≤ 1. Hence wc = 2.

    lines 32–37

    uses boundary_five_blocks_short_c_shore_arithmetic

      have hc2 : wc=2 := by
        by_contra hn
        have hc1 : wc ≤ 1 := by omega
        have ha2 := boundary_five_blocks_short_c_shore_arithmetic m r qa qb qc qd wa wb wc wd Q W hm
          (by omega) hrc hqcapa hqcapb hqcapc hqcapd hQ hW ⟨i,hi⟩ hWe htotal hx hy hqa hqb hqc hqd hwa hwb hwc hwd hsep hc1
        omega
  4. qa = 0

    Suppose for contradiction that qa > 0. The hypothesis hqa then gives wa + wc + wd + 1 ≤ 2. But substituting wa = 0, wc = 2, and wd = 0 yields 0 + 2 + 0 + 1 = 3 ≤ 2, a contradiction. Thus qa = 0.

    lines 38–41

      have ha0 : qa=0 := by
        by_contra hn
        have hh := hqa (by omega)
        omega
  5. qc = 0

    Suppose for contradiction that qc > 0. Then hqc gives wa + wb + wc + 1 ≤ 2. Substituting wa = 0 and wc = 2 yields wb + 3 ≤ 2, which is impossible. Thus qc = 0.

    lines 42–45

      have hc0 : qc=0 := by
        by_contra hn
        have hh := hqc (by omega)
        omega
  6. qb ≤ 1

    Since wc = 2 > 0, hypothesis hwc yields qa + qb + qc + 1 ≤ 2. Substituting qa = 0 and qc = 0 simplifies this to qb + 1 ≤ 2, meaning qb ≤ 1.

    lines 46–48

      have hb1 : qb ≤ 1 := by
        have hh := hwc (by omega)
        omega
  7. 0 < qd

    Suppose for contradiction that qd = 0. Then Q = qa + qb + qc + qd = qb ≤ 1. Because Q is even, Q must be 0, so qb = 0. Then W = Q + W = m + 3. But W = wb + wc = wb + 2 ≤ m + 2 (since qb + wb ≤ m), which contradicts W = m + 3. Hence qd > 0.

    lines 49–51

      have hd : 0<qd := by
        by_contra hn
        omega
  8. qb = 1, concluding wc = 2 ∧ qa = 0 ∧ qb = 1

    Since qd > 0, the separator hypothesis hsep gives qd + wb + wd ≤ m, so qd + wb ≤ m. Together with the total sum Q + W = qb + (qd + wb) + 2 = m + 3, this implies qb ≥ 1. Combined with qb ≤ 1 from earlier, we have qb = 1. Together with wc = 2 and qa = 0, this completes the proof.

    lines 52–53

      have hs := hsep hd
      omega
boundary_five_blocks_short_c_shore_arithmetic
Under the five-block boundary assumptions, if the second shore contains at most one C vertex (wc ≤ 1), then the first shore must contain at least two A vertices (2 ≤ qa).

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_five_blocks_two_defect_shore_arithmetic    (m r qa qb qc qd wa wb wc wd Q W : ℕ)    (hm : 5 ≤ m) (hr : r = 2) (hrc : wc ≤ r)    (hqcapa : qa+wa ≤ 4) (hqcapb : qb+wb ≤ m)    (hqcapc : qc+wc ≤ 4) (hqcapd : qd+wd ≤ m)    (hQ : Q=qa+qb+qc+qd) (hW : W=wa+wb+wc+wd)    (hQe : Even Q) (hWe : Even W) (htotal : Q+W=m+3)    (hx : wa+wd+r ≤ 2) (hy : qa+qb+qc ≤ 2)    (hqa : 0<qa → wa+wc+wd+1 ≤ 2)    (hqb : 0<qb → wb+wc+wd+1+3 ≤ m)    (hqc : 0<qc → wa+wb+wc+1 ≤ 2)    (hqd : 0<qd → wa+wb+wd+3 ≤ m)    (hwa : 0<wa → qa+qc+qd+1 ≤ 2)    (hwb : 0<wb → qb+qc+qd+3 ≤ m)    (hwc : 0<wc → qa+qb+qc+1 ≤ 2)    (hwd : 0<wd → qa+qb+qd+1+3 ≤ m)    (hsep : 0<qd → qd+wb+wd ≤ m) : wc=2 ∧ qa=0 ∧ qb=1 := by  obtain ⟨i, hi⟩ := hQe  have hzero : wa=0 ∧ wd=0 := by omega  have ha1 : qa ≤ 1 := by    by_contra hna    have ha2 : qa = 2 := by omega    have hbc0 : qb=0 ∧ qc=0 := by omega    by_cases hd : 0 < qd    · have hs := hsep hd      have hw : 0 < wc := by omega      have hh := hwc hw      omega    · have hw : 0 < wc := by omega      have hh := hwc hw      omega  have hc2 : wc=2 := by    by_contra hn    have hc1 : wc ≤ 1 := by omega    have ha2 := boundary_five_blocks_short_c_shore_arithmetic m r qa qb qc qd wa wb wc wd Q W hm      (by omega) hrc hqcapa hqcapb hqcapc hqcapd hQ hW ⟨i,hi⟩ hWe htotal hx hy hqa hqb hqc hqd hwa hwb hwc hwd hsep hc1    omega  have ha0 : qa=0 := by    by_contra hn    have hh := hqa (by omega)    omega  have hc0 : qc=0 := by    by_contra hn    have hh := hqc (by omega)    omega  have hb1 : qb ≤ 1 := by    have hh := hwc (by omega)    omega  have hd : 0<qd := by    by_contra hn    omega  have hs := hsep hd  omega
See it in the graphDiscuss this resultChallenge it