four_by_five_defect_incidence_impossible
A relation between sets of sizes four and five cannot give each of the five vertices at least two neighbors while giving each of the four vertices at most two neighbors.
Statement
theorem four_by_five_defect_incidence_impossible {V : Type*} [DecidableEq V] (A C : Finset V) (R : V → V → Prop) [DecidableRel R] (hA : A.card = 4) (hC : C.card = 5) (hupper : ∀ a ∈ A, (C.filter (R a)).card ≤ 2) (hlower : ∀ c ∈ C, 2 ≤ (A.filter (fun a => R a c)).card) : False
- Source
- OP-1957: degree and incidence bounds for the size-five block route.
- Verified
- 22 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Used by 4
- minimally_k_extendable_five_odd_block_degree_bound_with_separatorFor every odd natural number c at least seven and every k at least c, let G be a connected minimally k-extendible graph on 4k vertices,…
- op1957_one_defect_impossible_minimalUnder the displayed five-by-odd block, degree, separator and minimality assumptions, every vertex of the five-vertex block has at least…
- boundary_five_blocks_minimal_no_full_crossIn the stated four-block partition with two five-vertex selected blocks, minimum degree at least 2k+2, the 2k separator property and…
- boundary_five_clique_blocks_full_cross_vertex_has_removable_edgeFor k at least five, consider a k-extendible graph on 4k vertices whose four disjoint clique blocks have sizes 5, 2k−5, 5, 2k−5, with the…
The proof, explained
The proof proceeds by double-counting the total number of incidences between A and C. Summing the degree lower bound of 2 over all five vertices in C shows there must be at least 10 incidences, whereas summing the degree upper bound of 2 over all four vertices in A shows there can be at most 8 incidences. Exchanging the order of summation equates these two counts, yielding the contradiction 10 ≤ 8.
The sum of in-degrees over C is at least 10, while the sum of out-degrees over A is at most 8.
Every vertex c ∈ C has at least 2 neighbors in A, so summing this lower bound over C using `Finset.sum_le_sum` gives ∑ c ∈ C, 2 ≤ ∑ c ∈ C, |{a ∈ A | R a c}|. Because |C| = 5, the left-hand sum evaluates to 2 · 5 = 10. Similarly, every vertex a ∈ A has at most 2 neighbors in C, so summing this upper bound over A using `Finset.sum_le_sum` gives ∑ a ∈ A, |{c ∈ C | R a c}| ≤ ∑ a ∈ A, 2. Because |A| = 4, the right-hand sum evaluates to 2 · 4 = 8.
uses
Finset.sum_le_sumclassical have hl : (∑ c ∈ C, (2 : ℕ)) ≤ ∑ c ∈ C, (A.filter (fun a => R a c)).card := Finset.sum_le_sum hlower have hu : (∑ a ∈ A, (C.filter (R a)).card) ≤ ∑ a ∈ A, (2 : ℕ) := Finset.sum_le_sum hupper have hl' : 10 ≤ ∑ c ∈ C, (A.filter (fun a => R a c)).card := by simpa [hC] using hl have hu' : (∑ a ∈ A, (C.filter (R a)).card) ≤ 8 := by simpa [hA] using hu
The sum of in-degrees over C equals the sum of out-degrees over A: ∑ c ∈ C, |{a ∈ A | R a c}| = ∑ a ∈ A, |{c ∈ C | R a c}|.
The cardinality of each neighborhood is rewritten as a sum of ones using `Finset.card_eq_sum_ones`, and then as a sum of indicator functions (if R a c then 1 else 0) using `Finset.sum_filter`. Exchanging the order of summation with `Finset.sum_comm` demonstrates that both sums count the total number of related pairs (a, c) ∈ A × C.
uses
Finset.card_eq_sum_ones,Finset.sum_filter,Finset.sum_commhave heq : (∑ c ∈ C, (A.filter (fun a => R a c)).card) = ∑ a ∈ A, (C.filter (R a)).card := by simp only [Finset.card_eq_sum_ones, Finset.sum_filter] exact Finset.sum_comm
A contradiction is reached.
Denoting the total number of incidences by S, the previous steps establish that 10 ≤ S and S ≤ 8. This implies 10 ≤ 8, which is an immediate arithmetic contradiction resolved by `omega`.
omega
Finset.sum_le_sum- If f(x) ≤ g(x) for all x in a finite set s, then ∑ x ∈ s, f(x) ≤ ∑ x ∈ s, g(x).
Finset.card_eq_sum_ones- The cardinality of a finite set s is equal to the sum of 1 over all elements of s.
Finset.sum_filter- The sum of a function over the elements of a finite set satisfying a predicate equals the sum over the entire set with terms where the predicate fails replaced by 0.
Finset.sum_comm- The order of summation in a double sum over two finite sets can be exchanged.
- Line 6 invokes `classical` to make all propositions decidable by default, which is a formal Lean requirement for filtering finite sets and rewriting with indicator functions, but has no counterpart on paper.
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_by_five_defect_incidence_impossible {V : Type*} [DecidableEq V] (A C : Finset V) (R : V → V → Prop) [DecidableRel R] (hA : A.card = 4) (hC : C.card = 5) (hupper : ∀ a ∈ A, (C.filter (R a)).card ≤ 2) (hlower : ∀ c ∈ C, 2 ≤ (A.filter (fun a => R a c)).card) : False := by classical have hl : (∑ c ∈ C, (2 : ℕ)) ≤ ∑ c ∈ C, (A.filter (fun a => R a c)).card := Finset.sum_le_sum hlower have hu : (∑ a ∈ A, (C.filter (R a)).card) ≤ ∑ a ∈ A, (2 : ℕ) := Finset.sum_le_sum hupper have hl' : 10 ≤ ∑ c ∈ C, (A.filter (fun a => R a c)).card := by simpa [hC] using hl have hu' : (∑ a ∈ A, (C.filter (R a)).card) ≤ 8 := by simpa [hA] using hu have heq : (∑ c ∈ C, (A.filter (fun a => R a c)).card) = ∑ a ∈ A, (C.filter (R a)).card := by simp only [Finset.card_eq_sum_ones, Finset.sum_filter] exact Finset.sum_comm omega