AFTD Auto-Formalizing Theoretical Domains

five_odd_saturated_small_shore_arithmetic_no_connectedness

theoremverified

The displayed nonnegative aggregate degree, parity, separator and criticality inequalities force the two listed small-shore count patterns, without any connectedness assumption on the endpoint groups.

Statement

theorem five_odd_saturated_small_shore_arithmetic_no_connectedness
    (k c m eb a b0 b1 b2 b3 c0 c1 c2 c3 d : ℕ)
    (hc : 7 ≤ c) (hkc : c ≤ k) (heb : m ≤ eb)
    (ha : 1 ≤ a ∧ a ≤ 2) (hc1 : 1 ≤ c1)
    (he2 : (c2 = 0 ∧ b2 = 0) ∨ 1 ≤ c2)
    (he3 : (c3 = 0 ∧ b3 = 0) ∨ 1 ≤ c3)
    (hodd0 : Odd (a+b0+c0+d)) (hodd1 : Odd (b1+c1))
    (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)
    (hsmall : c1+c2+c3 ≤ 3)
    (hrooty : a+b0+c0+b2+c2+b3+c3+eb+2 ≤ c)
    (hrepA : 2 ≤ a → c1+c2+c3 ≤ 2)
    (hrep0C : 1 ≤ c0 → b1+b2+b3+eb+c1+c2+c3+3 ≤ c)
    (hcutD : 1 ≤ d → d+b1+b2+b3+eb+c ≤ 2*k)
    (hrep1C : 2 ≤ c1 → a+b0+b2+b3+eb+c0+c2+c3+3 ≤ c)
    (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 ∧
        (if 1 ≤ b0 then 1 else 0) + (if 1 ≤ b1 then 1 else 0) +
        (if 1 ≤ b2 then 1 else 0) + (if 1 ≤ b3 then 1 else 0) + m ≤ 1))
    :
    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)))
Source
OP-1957; scalar arithmetic underlying the five-by-odd saturated small-shore reduction.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 4

The proof, explained

The proof analyzes a system of degree, separator, root, and criticality inequalities on small shores by combining case analysis with Presburger arithmetic. It first turns the conditional criticality hypothesis into a dichotomy according to whether the degree sum strictly falls below 2k or attains equality. Branching across this dichotomy and the vanishing or nonvanishing states of the endpoint pairs (c2, b2) and (c3, b3), it unpacks the odd parity conditions into explicit algebraic witnesses of the form 2t + 1. Automated linear integer arithmetic (`omega`) then eliminates all inconsistent assignments and confirms that only the two stated small-shore patterns with a = 1 are possible.

  1. The conditional criticality assumption resolves into a dichotomy: either m + b0 + b1 + b2 + b3 + eb + 6 ≤ 2k, or b0 + b1 + b2 + b3 + eb + 5 = 2k with m ≤ 1 and at most one of b0, b1, b2, b3, m positive.

    We perform a case split on whether b0 + b1 + b2 + b3 + eb + 5 < 2k. If strict inequality holds, the first implication in `hcrit` directly yields m + b0 + b1 + b2 + b3 + eb + 6 ≤ 2k. If not, the upper bound b0 + b1 + b2 + b3 + eb + 5 ≤ 2k from `hb` forces equality via linear arithmetic (`omega`), and the second implication in `hcrit` supplies the remaining bounds on m and the indicator sum. The raw hypothesis `hcrit` is then discarded as it is superseded by this dichotomy.

    lines 31–39

    uses Or.inl, Or.inr

      have hcritical : (m+b0+b1+b2+b3+eb+6 ≤ 2*k) ∨
          (b0+b1+b2+b3+eb+5 = 2*k ∧ m ≤ 1 ∧
            (if 1 ≤ b0 then 1 else 0) + (if 1 ≤ b1 then 1 else 0) +
            (if 1 ≤ b2 then 1 else 0) + (if 1 ≤ b3 then 1 else 0) + m ≤ 1) := by
        by_cases h : b0+b1+b2+b3+eb+5 < 2*k
        · exact Or.inl (hcrit.1 h)
        · have heq : b0+b1+b2+b3+eb+5 = 2*k := by omega
          exact Or.inr ⟨heq, hcrit.2 heq⟩
      clear hcrit
  2. The argument reduces to eight subgoals corresponding to the criticality dichotomy and the vanishing or nonvanishing of the endpoint pairs (c2, b2) and (c3, b3).

    We split on the dichotomy `hcritical` (the strictly smaller case `hpos` versus the saturated boundary case `hfull`). Across each branch, we further split on hypotheses `he2` and `he3`, which state that each endpoint pair (ci, bi) for i ∈ {2, 3} either vanishes entirely (ci = 0 and bi = 0) or satisfies ci ≥ 1. This generates 2 × 2 × 2 = 8 subgoals.

    lines 40–41

      rcases hcritical with hpos | hfull
      all_goals rcases he2 with h2 | h2 <;> rcases he3 with h3 | h3
  3. In each of the eight branches, the parity hypotheses are unpacked into explicit equations a + b0 + c0 + d = 2 * t0 + 1 and b1 + c1 = 2 * t1 + 1 for natural numbers t0 and t1.

    An integer n is odd if and only if n = 2t + 1 for some integer t. Unpacking `hodd0` and `hodd1` provides explicit witnesses t0 and t1 and their defining equations in every branch.

    lines 42–43

      all_goals obtain ⟨t0, ht0⟩ := hodd0
      all_goals obtain ⟨t1, ht1⟩ := hodd1
  4. The theorem holds in all branches: a = 1 and the parameters satisfy one of the two listed small-shore count patterns. automation

    In all eight subgoals, `simp_all` substitutes known zero values and simplifies the equations. Any remaining `if-then-else` indicator expressions are split into cases (`split_ifs`). Automated Presburger arithmetic (`omega`) then closes every subcase: all configurations violating the conclusion contradict the system of degree, cut, separator, and criticality bounds, while the consistent assignments uniquely satisfy a = 1 and one of the two specified small-shore patterns.

    lines 44–45

      all_goals simp_all
      all_goals first | omega | (split_ifs at * <;> omega)
Or.inl
Given a proof of proposition P, produces a proof of the disjunction P ∨ Q.
Or.inr
Given a proof of proposition Q, produces a proof of the disjunction P ∨ Q.

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 five_odd_saturated_small_shore_arithmetic_no_connectedness    (k c m eb a b0 b1 b2 b3 c0 c1 c2 c3 d : ℕ)    (hc : 7 ≤ c) (hkc : c ≤ k) (heb : m ≤ eb)    (ha : 1 ≤ a ∧ a ≤ 2) (hc1 : 1 ≤ c1)    (he2 : (c2 = 0 ∧ b2 = 0) ∨ 1 ≤ c2)    (he3 : (c3 = 0 ∧ b3 = 0) ∨ 1 ≤ c3)    (hodd0 : Odd (a+b0+c0+d)) (hodd1 : Odd (b1+c1))    (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)    (hsmall : c1+c2+c3 ≤ 3)    (hrooty : a+b0+c0+b2+c2+b3+c3+eb+2 ≤ c)    (hrepA : 2 ≤ a → c1+c2+c3 ≤ 2)    (hrep0C : 1 ≤ c0 → b1+b2+b3+eb+c1+c2+c3+3 ≤ c)    (hcutD : 1 ≤ d → d+b1+b2+b3+eb+c ≤ 2*k)    (hrep1C : 2 ≤ c1 → a+b0+b2+b3+eb+c0+c2+c3+3 ≤ c)    (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 ∧        (if 1 ≤ b0 then 1 else 0) + (if 1 ≤ b1 then 1 else 0) +        (if 1 ≤ b2 then 1 else 0) + (if 1 ≤ b3 then 1 else 0) + m ≤ 1))    :    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))) := by  have hcritical : (m+b0+b1+b2+b3+eb+6 ≤ 2*k) ∨      (b0+b1+b2+b3+eb+5 = 2*k ∧ m ≤ 1 ∧        (if 1 ≤ b0 then 1 else 0) + (if 1 ≤ b1 then 1 else 0) +        (if 1 ≤ b2 then 1 else 0) + (if 1 ≤ b3 then 1 else 0) + m ≤ 1) := by    by_cases h : b0+b1+b2+b3+eb+5 < 2*k    · exact Or.inl (hcrit.1 h)    · have heq : b0+b1+b2+b3+eb+5 = 2*k := by omega      exact Or.inr ⟨heq, hcrit.2 heq⟩  clear hcrit  rcases hcritical with hpos | hfull  all_goals rcases he2 with h2 | h2 <;> rcases he3 with h3 | h3  all_goals obtain ⟨t0, ht0⟩ := hodd0  all_goals obtain ⟨t1, ht1⟩ := hodd1  all_goals simp_all  all_goals first | omega | (split_ifs at * <;> omega)
See it in the graphDiscuss this resultChallenge it