AFTD Auto-Formalizing Theoretical Domains

saturated_small_shore_odd_pool_at_most_half

theoremverified

Under the displayed small-shore patterns, counts, degree and separator inequalities, and the proposed large-pool count condition, the B-only group count is at most k/2.

Statement

theorem saturated_small_shore_odd_pool_at_most_half
    (k c m eb a b0 b1 b2 b3 c0 c1 c2 c3 d : ℕ)
    (hc : 7 ≤ c) (hkc : c ≤ k) (heb : m ≤ eb)
    (hpat : a=1 ∧ ((c1=3 ∧ c2+c3=0 ∧ b0+c0+b2+c2+b3+c3+eb+4=c) ∨
      (c1=1 ∧ c2+c3=2 ∧ (1 ≤ c2 → c2=1 ∧ b2+c2=1) ∧
        (1 ≤ c3 → c3=1 ∧ b3+c3=1))))
    (he2 : (c2=0 ∧ b2=0) ∨ 1 ≤ c2)
    (he3 : (c3=0 ∧ b3=0) ∨ 1 ≤ c3)
    (hs : m + (if 1 ≤ c2 then 1 else 0) + (if 1 ≤ c3 then 1 else 0) + 1 ≤ c)
    (hb : b0+b1+b2+b3+eb+5 ≤ 2*k)
    (htotal : a+b0+b1+b2+b3+eb+c0+c1+c2+c3+d+m+
      (if 1 ≤ c2 then 1 else 0) + (if 1 ≤ c3 then 1 else 0) = 2*k)
    (hrep0C : 1 ≤ c0 → b1+b2+b3+eb+c1+c2+c3+3 ≤ c)
    (hcutD : 1 ≤ d → d+b1+b2+b3+eb+c ≤ 2*k)
    (hrep2C : 1 ≤ c2 → a+b0+b1+b3+eb+c0+c1+c3+3 ≤ c)
    (hrep3C : 1 ≤ c3 → a+b0+b1+b2+eb+c0+c1+c2+3 ≤ c)
    (hcrit : (b0+b1+b2+b3+eb+5 < 2*k →
        m+b0+b1+b2+b3+eb+6 ≤ 2*k) ∧
      (b0+b1+b2+b3+eb+5 = 2*k → m ≤ 1))
    (hnew : k < 2*m → m+5 ≤
      (if 1 ≤ c2 then 1 else 0) + (if 1 ≤ c3 then 1 else 0) + eb+a) :
    2*m ≤ k
Source
OP-1957; arithmetic consequence of the proposed large-independent-set count inequality.
Verified
26 Nov 2026
Axioms
Quot.soundpropext

The proof, explained

The theorem is proved by contradiction, assuming 2m > k. The argument splits into two cases based on the small-shore configuration pattern `hpat`. In each case, the components a, c_i, and b_i are uniquely determined, the cut inequality forces the defect count d to 0, and the separator inequalities combined with the pool count bound m ≤ eb yield an arithmetic impossibility.

  1. Assume for contradiction that 2m > k, yielding an upper bound on m + 5.

    We assume for contradiction that 2m > k, so k < 2m. Applying the pool condition `hnew` gives m + 5 ≤ (if 1 ≤ c2 then 1 else 0) + (if 1 ≤ c3 then 1 else 0) + eb + a.

    lines 25–27

      by_contra hn
      have hm : k < 2*m := by omega
      have hnew' := hnew hm
  2. In Case 1 of the pattern where c1 = 3 and c2 + c3 = 0, the components satisfy a = 1 and c2 = c3 = b2 = b3 = 0, simplifying the system.

    We case-split on `hpat`. In the first case, a = 1, c1 = 3, c2 + c3 = 0, and b0 + c0 + b2 + c2 + b3 + c3 + eb + 4 = c. Since c2 and c3 are natural numbers, c2 + c3 = 0 forces c2 = 0 and c3 = 0. By hypotheses `he2` and `he3`, having c2 = 0 and c3 = 0 forces b2 = 0 and b3 = 0. Substituting these values simplifies the pool inequality to m + 4 ≤ eb, the total sum to b0 + b1 + eb + c0 + d + m + 4 = 2k, and the formula for c to b0 + c0 + eb + 4 = c.

    lines 28–34

      rcases hpat with ⟨ha,hpat | hpat⟩
      · obtain ⟨hc1,hc23,heq⟩ := hpat
        have hc2 : c2=0 := by omega
        have hc3 : c3=0 := by omega
        have hb2 : b2=0 := by rcases he2 with h | h <;> omega
        have hb3 : b3=0 := by rcases he3 with h | h <;> omega
        simp [ha,hc1,hc2,hc3,hb2,hb3] at hnew' htotal hb hs hrep0C hcutD hcrit heq
  3. In Case 1, the defect parameter d must be 0.

    Suppose for contradiction that d ≥ 1. The cut inequality `hcutD` gives d + b1 + eb + c ≤ 2k. Substituting c = b0 + c0 + eb + 4 and comparing with the total sum 2k = b0 + b1 + eb + c0 + d + m + 4 forces eb ≤ m, which contradicts m + 4 ≤ eb. Hence d = 0.

    lines 35–38

        have hd : d=0 := by
          by_contra hh
          have hx := hcutD (by omega)
          omega
  4. In Case 1, the bound b0 + b1 + eb + 5 < 2k holds strictly, which implies m + b0 + b1 + eb + 6 ≤ 2k.

    By hypothesis `hb`, b0 + b1 + eb + 5 ≤ 2k. If equality held, the criticality hypothesis `hcrit` would give m ≤ 1. But then k < 2m ≤ 2, contradicting k ≥ c ≥ 7. Thus the inequality is strict: b0 + b1 + eb + 5 < 2k. Applying the first branch of `hcrit` then yields m + b0 + b1 + eb + 6 ≤ 2k.

    lines 39–43

        have hless : b0+b1+eb+5 < 2*k := by
          by_contra hh
          have hx := hcrit.2 (by omega)
          omega
        have hcritical := hcrit.1 hless
  5. In Case 1, c0 ≥ 1, and the separator condition for c0 produces a contradiction, closing Case 1.

    Comparing the total sum 2k = b0 + b1 + eb + c0 + m + 4 (with d = 0) with the critical bound m + b0 + b1 + eb + 6 ≤ 2k forces c0 ≥ 2 ≥ 1. The separator condition `hrep0C` then applies to give b1 + eb + 6 ≤ c. Combining this with c = b0 + c0 + eb + 4 and c ≤ k contradicts the total sum, which linear arithmetic (`omega`) verifies.

    lines 44–46

        have hc0 : 1 ≤ c0 := by omega
        have hrep := hrep0C hc0
        omega
  6. In Case 2 of the pattern, c2 = c3 = 1 and b2 = b3 = 0.

    The second pattern branch gives c1 = 1, c2 + c3 = 2, and conditional bounds for c2 and c3. If c2 = 0, then c3 = 2 ≥ 1, which by the pattern condition forces c3 = 1, a contradiction; hence c2 ≥ 1. Symmetrically, if c3 = 0, then c2 = 2 ≥ 1 forces c2 = 1, a contradiction; hence c3 ≥ 1. Given 1 ≤ c2 and 1 ≤ c3, the pattern conditions yield c2 = 1, b2 + c2 = 1 (so b2 = 0), c3 = 1, and b3 + c3 = 1 (so b3 = 0).

    lines 47–60

      · obtain ⟨hc1,hc23,hc2,hc3⟩ := hpat
        have hc2p : 1 ≤ c2 := by
          by_contra hn2
          have h3 : 1 ≤ c3 := by omega
          have hh := hc3 h3
          omega
        have hc3p : 1 ≤ c3 := by
          by_contra hn3
          have hh := hc2 hc2p
          omega
        obtain ⟨hc2eq,hb2eq⟩ := hc2 hc2p
        obtain ⟨hc3eq,hb3eq⟩ := hc3 hc3p
        have hb2 : b2=0 := by omega
        have hb3 : b3=0 := by omega
  7. In Case 2, the separator condition for c2 applies, and substituting the known parameters simplifies the system.

    Because c2 ≥ 1, the separator inequality `hrep2C` gives a + b0 + b1 + b3 + eb + c0 + c1 + c3 + 3 ≤ c. Substituting a = 1, c1 = 1, c2 = 1, c3 = 1, b2 = 0, and b3 = 0 simplifies this bound to b0 + b1 + eb + c0 + 6 ≤ c, the total sum to b0 + b1 + eb + c0 + d + m + 6 = 2k, and the pool bound to m + 2 ≤ eb.

    lines 61–62

        have hr := hrep2C hc2p
        simp [ha,hc1,hc2eq,hc3eq,hb2,hb3] at hnew' htotal hs hcutD hr
  8. In Case 2, the parameter d must be 0.

    Suppose for contradiction that d ≥ 1. The cut inequality `hcutD` gives d + b1 + eb + c ≤ 2k. Combining this with c ≥ b0 + b1 + eb + c0 + 6 and the total sum 2k = b0 + b1 + eb + c0 + d + m + 6 forces eb ≤ m, which contradicts m + 2 ≤ eb. Hence d = 0.

    lines 63–66

        have hd : d=0 := by
          by_contra hh
          have hx := hcutD (by omega)
          omega
  9. In Case 2, the system of inequalities produces a final contradiction, completing the proof.

    With d = 0, the total sum is 2k = (b0 + b1 + eb + c0 + 6) + m ≤ c + m ≤ k + m, which implies k ≤ m. However, the separator bound also gives eb + 6 ≤ b0 + b1 + eb + c0 + 6 ≤ c ≤ k. Combining eb + 6 ≤ k ≤ m with m ≤ eb gives eb + 6 ≤ eb, an impossibility (6 ≤ 0), which linear arithmetic (`omega`) detects.

    line 67

        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

set_option maxHeartbeats 2000000theorem saturated_small_shore_odd_pool_at_most_half    (k c m eb a b0 b1 b2 b3 c0 c1 c2 c3 d : ℕ)    (hc : 7 ≤ c) (hkc : c ≤ k) (heb : m ≤ eb)    (hpat : a=1 ∧ ((c1=3 ∧ c2+c3=0 ∧ b0+c0+b2+c2+b3+c3+eb+4=c) ∨      (c1=1 ∧ c2+c3=2 ∧ (1 ≤ c2 → c2=1 ∧ b2+c2=1) ∧        (1 ≤ c3 → c3=1 ∧ b3+c3=1))))    (he2 : (c2=0 ∧ b2=0) ∨ 1 ≤ c2)    (he3 : (c3=0 ∧ b3=0) ∨ 1 ≤ c3)    (hs : m + (if 1 ≤ c2 then 1 else 0) + (if 1 ≤ c3 then 1 else 0) + 1 ≤ c)    (hb : b0+b1+b2+b3+eb+5 ≤ 2*k)    (htotal : a+b0+b1+b2+b3+eb+c0+c1+c2+c3+d+m+      (if 1 ≤ c2 then 1 else 0) + (if 1 ≤ c3 then 1 else 0) = 2*k)    (hrep0C : 1 ≤ c0 → b1+b2+b3+eb+c1+c2+c3+3 ≤ c)    (hcutD : 1 ≤ d → d+b1+b2+b3+eb+c ≤ 2*k)    (hrep2C : 1 ≤ c2 → a+b0+b1+b3+eb+c0+c1+c3+3 ≤ c)    (hrep3C : 1 ≤ c3 → a+b0+b1+b2+eb+c0+c1+c2+3 ≤ c)    (hcrit : (b0+b1+b2+b3+eb+5 < 2*k →        m+b0+b1+b2+b3+eb+6 ≤ 2*k) ∧      (b0+b1+b2+b3+eb+5 = 2*k → m ≤ 1))    (hnew : k < 2*m → m+5 ≤      (if 1 ≤ c2 then 1 else 0) + (if 1 ≤ c3 then 1 else 0) + eb+a) :    2*m ≤ k := by  by_contra hn  have hm : k < 2*m := by omega  have hnew' := hnew hm  rcases hpat with ⟨ha,hpat | hpat⟩  · obtain ⟨hc1,hc23,heq⟩ := hpat    have hc2 : c2=0 := by omega    have hc3 : c3=0 := by omega    have hb2 : b2=0 := by rcases he2 with h | h <;> omega    have hb3 : b3=0 := by rcases he3 with h | h <;> omega    simp [ha,hc1,hc2,hc3,hb2,hb3] at hnew' htotal hb hs hrep0C hcutD hcrit heq    have hd : d=0 := by      by_contra hh      have hx := hcutD (by omega)      omega    have hless : b0+b1+eb+5 < 2*k := by      by_contra hh      have hx := hcrit.2 (by omega)      omega    have hcritical := hcrit.1 hless    have hc0 : 1 ≤ c0 := by omega    have hrep := hrep0C hc0    omega  · obtain ⟨hc1,hc23,hc2,hc3⟩ := hpat    have hc2p : 1 ≤ c2 := by      by_contra hn2      have h3 : 1 ≤ c3 := by omega      have hh := hc3 h3      omega    have hc3p : 1 ≤ c3 := by      by_contra hn3      have hh := hc2 hc2p      omega    obtain ⟨hc2eq,hb2eq⟩ := hc2 hc2p    obtain ⟨hc3eq,hb3eq⟩ := hc3 hc3p    have hb2 : b2=0 := by omega    have hb3 : b3=0 := by omega    have hr := hrep2C hc2p    simp [ha,hc1,hc2eq,hc3eq,hb2,hb3] at hnew' htotal hs hcutD hr    have hd : d=0 := by      by_contra hh      have hx := hcutD (by omega)      omega    omega
See it in the graphDiscuss this resultChallenge it