four_vertex_shores_force_many_complement_walks
If a,b are at least four and a+b=d+1, their product is at least 4(d−3).
Statement
theorem four_vertex_shores_force_many_complement_walks
(d a b : ℕ) (ha : 4 ≤ a) (hb : 4 ≤ b)
(hs : a + b = d + 1) : 4 * (d - 3) ≤ a * b- Source
- Arithmetic step in the saturated-twin bridge-count route for OP-1957.
- Verified
- 20 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder. - TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or…
- LinearOrder.toTotalPreorderEvery
- Used by 3
- d11_large_bridge_family_forces_four_shoreA d=11 bridge-shore family with at least twenty external vertices must contain a four-vertex shore.
- saturated_twin_bridge_family_strict_quadratic_boundA nonempty even bridge-shore family satisfies 4|C|<(d−1)(d−2).
- saturated_twin_bridge_family_refined_quadratic_boundAn even saturated-twin bridge family satisfies the refined simultaneous incidence and walk bounds.
The proof, explained
The inequality is proved by working in the integers to avoid natural-number subtraction underflow. Since a, b ≥ 4, the product (a - 4)(b - 4) = ab - 4(a + b) + 16 is nonnegative; substituting a + b = d + 1 yields ab - 4(d - 3) ≥ 0, or 4(d - 3) ≤ ab. Finally, because a, b ≥ 4 implies d ≥ 7 ≥ 3, integer subtraction coincides with natural-number subtraction, allowing the inequality to be pulled back to ℕ.
3 ≤ d
Since a ≥ 4 and b ≥ 4, their sum satisfies d + 1 = a + b ≥ 8, which implies d ≥ 7 ≥ 3. Linear arithmetic over ℕ (`omega`) proves this directly from the hypotheses.
have hd3 : 3 ≤ d := by omega
(a - 4)(b - 4) ≥ 0 in the integers
The bounds 4 ≤ a and 4 ≤ b are cast to ℤ, giving a - 4 ≥ 0 and b - 4 ≥ 0 by linear arithmetic (`linarith`). Since both factors are nonnegative, their product (a - 4)(b - 4) is nonnegative by `mul_nonneg`.
uses
mul_nonneghave ha' : (4:ℤ) ≤ (a:ℤ) := by exact_mod_cast ha have hb' : (4:ℤ) ≤ (b:ℤ) := by exact_mod_cast hb have hnon : (0:ℤ) ≤ ((a:ℤ)-4)*((b:ℤ)-4) := by apply mul_nonneg <;> linarith
4(d - 3) ≤ ab in the integers
Casting the relation a + b = d + 1 to ℤ and expanding (a - 4)(b - 4) ≥ 0 gives ab - 4(a + b) + 16 ≥ 0. Substituting a + b = d + 1 transforms this into ab - 4(d + 1) + 16 = ab - 4(d - 3) ≥ 0, which rearranges to 4(d - 3) ≤ ab; the non-linear arithmetic tactic `nlinarith` verifies this deduction.
have hs' : (a:ℤ)+(b:ℤ) = (d:ℤ)+1 := by exact_mod_cast hs have hgoal : 4 * ((d:ℤ) - 3) ≤ (a:ℤ)*(b:ℤ) := by nlinarith
4(d - 3) ≤ ab in the natural numbers
Because 3 ≤ d, natural-number subtraction d - 3 coincides with integer subtraction via `Nat.cast_sub`. Pushing the integer coercion through the operations (`push_cast`) and rewriting with this equality matches the cast of 4(d - 3) ≤ ab to the integer inequality proved above, which then reflects back to ℕ (`exact_mod_cast`).
uses
Nat.cast_subhave hsub : ((d - 3 : ℕ) : ℤ) = (d:ℤ) - 3 := Nat.cast_sub hd3 have hmain : ((4*(d-3):ℕ):ℤ) ≤ ((a*b:ℕ):ℤ) := by push_cast rw [hsub] exact hgoal exact_mod_cast hmain
mul_nonneg- The product of two nonnegative numbers is nonnegative.
Nat.cast_sub- The cast of a difference of natural numbers n - m into an additive group with one equals the difference of their casts ↑n - ↑m, provided m ≤ n.
- The proof passes through the integers ℤ to prevent issues with truncated subtraction in ℕ; the condition 3 ≤ d is required solely to ensure that natural subtraction d - 3 agrees with integer subtraction.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem four_vertex_shores_force_many_complement_walks (d a b : ℕ) (ha : 4 ≤ a) (hb : 4 ≤ b) (hs : a + b = d + 1) : 4 * (d - 3) ≤ a * b := by have hd3 : 3 ≤ d := by omega have ha' : (4:ℤ) ≤ (a:ℤ) := by exact_mod_cast ha have hb' : (4:ℤ) ≤ (b:ℤ) := by exact_mod_cast hb have hnon : (0:ℤ) ≤ ((a:ℤ)-4)*((b:ℤ)-4) := by apply mul_nonneg <;> linarith have hs' : (a:ℤ)+(b:ℤ) = (d:ℤ)+1 := by exact_mod_cast hs have hgoal : 4 * ((d:ℤ) - 3) ≤ (a:ℤ)*(b:ℤ) := by nlinarith have hsub : ((d - 3 : ℕ) : ℤ) = (d:ℤ) - 3 := Nat.cast_sub hd3 have hmain : ((4*(d-3):ℕ):ℤ) ≤ ((a*b:ℕ):ℤ) := by push_cast rw [hsub] exact hgoal exact_mod_cast hmain