five_odd_mixed_witness_incidence_impossible
For a four-element first set and an opposite set C of any size at least seven, the displayed row, column and separator budgets prevent the four listed large- and small-witness patterns from covering all vertices of C other than p and q.
Statement
theorem five_odd_mixed_witness_incidence_impossible {V : Type*} [DecidableEq V] (A B C : Finset V) (R S T : V → V → Prop) [DecidableRel R] [DecidableRel S] [DecidableRel T] (hA : A.card=4) (hC : 7 ≤ C.card) (p q : V) (hp : p ∈ C) (hq : q ∈ C) (hpq : p ≠ q) (hTsymm : ∀ u v, T u v → T v u) (hArow : ∀ a ∈ A, (C.filter (R a)).card ≤ 2) (hCbudget : ∀ c ∈ C, (A.filter (fun a => R a c)).card + (B.filter (fun b => S b c)).card + ((C.erase c).filter (T c)).card + (if c=p ∨ c=q then 1 else 0) ≤ C.card-3) (hcut : ∀ U ⊆ B, ∀ W ⊆ C, U.Nonempty → W.Nonempty → (∀ b ∈ U, ∀ c ∈ W, S b c) → U.card+W.card ≤ C.card) (hpatterns : ∀ y ∈ C \ {p,q}, (∃ r ∈ ({p,q} : Finset V), ∃ U ⊆ A, U.card=2 ∧ ∀ a ∈ U, R a y ∧ R a r) ∨ (∀ a ∈ A, R a y) ∨ (¬ T p q ∧ (¬ T y p ∨ ¬ T y q) ∧ ∃ U ⊆ B, ∃ Z ⊆ (C \ {p,q,y}), U.card+Z.card=C.card-4 ∧ (∀ b ∈ U, S b p ∧ S b q ∧ S b y) ∧ (∀ z ∈ Z, T z p ∧ T z q ∧ T z y)) ∨ (T p q ∧ T y p ∧ T y q)) : False
- Source
- OP-1957: general mixed forced-witness incidence reduction in the saturated five-by-odd boundary.
- Verified
- 24 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Used by 2
- boundary_five_odd_saturated_two_defect_has_removable_cross_edgeFor every odd c at least seven with c≤k, in the displayed five-by-c four-block graph with the explicit degree, separator, B-block…
- boundary_five_odd_saturated_patterns_impossibleThe degree, separator and four-block hypotheses rule out the listed mixed essential-edge witness pattern holding at every opposite-block…
The proof, explained
The proof partitions the set of opposite vertices C \ {p, q} into a set L of vertices with large A-degrees and a remainder W. An incidence double-counting bound limits |L| ≤ 4, leaving W non-empty. A case split on whether T p q holds shows that if T p q holds, the T-neighborhoods of p and q contain W, severely restricting the A-degrees of p and q and forcing |L| ≤ 2, which contradicts the size budget. If ¬ T p q holds, small witnesses saturate the budgets at p and q, forcing their T-neighborhoods to be empty and producing a large biclique between B and {p, q} ∪ W that violates the bipartite cut condition.
(Helper Lemma in1158_incidence_card_bound) If |A| = 4, L ⊆ C, each a ∈ A has at most 2 neighbors in C, and each y ∈ L has at least d neighbors in A, then d * |L| ≤ 8.
Double counting the incidences between A and L: summing the column degrees gives d * |L| ≤ ∑_{y ∈ L} deg_A(y). Exchanging the summation order via Finset.sum_comm gives the sum of row degrees ∑_{a ∈ A} deg_L(a), which is bounded by 2 * |A| = 8 since each row has degree at most 2 in C. Combining these inequalities yields d * |L| ≤ 8.
uses
Finset.sum_le_sum,Finset.filter_subset_filter,Finset.card_le_card,Finset.card_eq_sum_ones,Finset.sum_filter,Finset.sum_comm,mul_commclassical have hl : (∑ y ∈ L, d) ≤ ∑ y ∈ L, (A.filter (fun a => R a y)).card := Finset.sum_le_sum hcol have hu : (∑ a ∈ A, (L.filter (R a)).card) ≤ ∑ a ∈ A, (2:ℕ) := by apply Finset.sum_le_sum intro a ha have hs : L.filter (R a) ⊆ C.filter (R a) := Finset.filter_subset_filter _ hLC exact (Finset.card_le_card hs).trans (hrow a ha) have heq : (∑ y ∈ L, (A.filter (fun a => R a y)).card) = ∑ a ∈ A, (L.filter (R a)).card := by simp only [Finset.card_eq_sum_ones, Finset.sum_filter] exact Finset.sum_comm have hl' : d * L.card ≤ ∑ y ∈ L, (A.filter (fun a => R a y)).card := by simpa [mul_comm] using hl have hu' : (∑ a ∈ A, (L.filter (R a)).card) ≤ 8 := by simpa [hA] using hu omega
(Helper Lemma in1158_saturated_two_sets) If U ⊆ B and Z ⊆ D satisfy |U| + |Z| = c - 4 and r + |B| + |D| + 1 ≤ c - 3 with c ≥ 7, then r = 0, U = B, and Z = D.
Since |U| ≤ |B| and |Z| ≤ |D|, we have r + (|U| + |Z|) + 1 ≤ r + |B| + |D| + 1 ≤ c - 3. Substituting |U| + |Z| = c - 4 gives r + c - 3 ≤ c - 3, which forces r = 0, |B| ≤ |U|, and |D| ≤ |Z|. By subset inclusion with matching cardinalities, U = B and Z = D.
uses
Finset.card_le_card,Finset.eq_of_subset_of_card_lehave hUB := Finset.card_le_card hU have hZD := Finset.card_le_card hZ have hr : r=0 := by omega have hUB' : B.card ≤ U.card := by omega have hZD' : D.card ≤ Z.card := by omega exact ⟨hr, Finset.eq_of_subset_of_card_le hU hUB', Finset.eq_of_subset_of_card_le hZ hZD'⟩
Partition C \ {p, q} into L (vertices with large R-neighborhoods in A) and W (remaining vertices), showing |W| + |L| = |C| - 2 and p, q ∉ W.
We define Y = C \ {p, q}, which has size |C| - 2 since p ≠ q ∈ C. We define L as the subset of vertices in Y satisfying either of the first two witness patterns (sharing at least 2 neighbors in A with p or q, or being complete to A). Then W is defined as Y \ L, which by subset subtraction satisfies |W| + |L| = |Y| = |C| - 2. By definition of Y, neither p nor q is in W.
uses
Finset.card_sdiff_of_subset,Finset.card_le_card,Finset.filter_subset,Finset.sdiff_subsetclassical let Y : Finset V := C \ {p,q} let Large : V → Prop := fun y => (∃ r ∈ ({p,q} : Finset V), ∃ U ⊆ A, U.card=2 ∧ ∀ a ∈ U, R a y ∧ R a r) ∨ (∀ a ∈ A, R a y) let L : Finset V := Y.filter Large let W : Finset V := Y \ L have hpair : ({p,q} : Finset V) ⊆ C := by intro x hx simp only [Finset.mem_insert,Finset.mem_singleton] at hx rcases hx with rfl|rfl · exact hp · exact hq have hYcard : Y.card+2=C.card := by dsimp only [Y] rw [Finset.card_sdiff_of_subset hpair] have hpqcard : ({p,q} : Finset V).card=2 := by simp [hpq] rw [hpqcard] have := Finset.card_le_card hpair rw [hpqcard] at this omega have hLY : L ⊆ Y := Finset.filter_subset _ _ have hYC : Y ⊆ C := Finset.sdiff_subset have hLC : L ⊆ C := hLY.trans hYC have hWcard : W.card+L.card=Y.card := by dsimp only [W] rw [Finset.card_sdiff_of_subset hLY] have := Finset.card_le_card hLY omega have hWsub : W ⊆ Y := Finset.sdiff_subset have hWnotp : p ∉ W := by intro h have hy := hWsub h simp [Y] at hy have hWnotq : q ∉ W := by intro h have hy := hWsub h simp [Y] at hy
Every vertex in L has degree at least 2 in A, which bounds |L| ≤ 4 and gives |W| ≥ |C| - 6 ≥ 1, so W is non-empty.
By definition of the large predicate, every y ∈ L has at least 2 neighbors in A. Applying the incidence card bound lemma in1158_incidence_card_bound with d = 2 and row bound 2 across |A| = 4 yields 2 * |L| ≤ 8, so |L| ≤ 4. Consequently, |W| = |C| - 2 - |L| ≥ |C| - 6 ≥ 1 since |C| ≥ 7, ensuring W is non-empty.
uses
Finset.card_le_card,in1158_incidence_card_boundhave hLcol : ∀ y ∈ L, 2 ≤ (A.filter (fun a => R a y)).card := by intro y hy have hlarge : Large y := (Finset.mem_filter.mp hy).2 rcases hlarge with ⟨r,hr,U,hUA,hcard,hR⟩ | hall · have hsub : U ⊆ A.filter (fun a => R a y) := by intro a ha exact Finset.mem_filter.mpr ⟨hUA ha,(hR a ha).1⟩ have hh := Finset.card_le_card hsub omega · have hfil : A.filter (fun a => R a y) = A := Finset.filter_eq_self.mpr hall rw [hfil,hA] omega have hLcard : L.card ≤ 4 := by have hh := in1158_incidence_card_bound A C L R hA hLC hArow 2 hLcol omega have hWlower : C.card-6 ≤ W.card := by omega have hWnonempty : W.Nonempty := Finset.card_pos.mp (by omega)
Every vertex in W satisfies either the small witness pattern (pattern 3) or the triangle pattern (pattern 4).
Each y ∈ W belongs to C \ {p, q} and not to L, ruling out the first two witness patterns. Therefore, by the four-pattern hypothesis, y must satisfy pattern 3 (bipartite saturation with U ⊆ B and Z ⊆ C \ {p, q, y}) or pattern 4 (a T-triangle with p and q).
uses
False.elim,Or.inl,Or.inrhave hWmem : ∀ y ∈ W, y ∈ C ∧ y ≠ p ∧ y ≠ q := by intro y hy have h := Finset.mem_sdiff.mp (hWsub hy) have hn : y ≠ p ∧ y ≠ q := by simpa using h.2 exact ⟨h.1,hn⟩ have hWpattern : ∀ y ∈ W, (¬ T p q ∧ (¬ T y p ∨ ¬ T y q) ∧ ∃ U ⊆ B, ∃ Z ⊆ (C \ {p,q,y}), U.card+Z.card=C.card-4 ∧ (∀ b ∈ U, S b p ∧ S b q ∧ S b y) ∧ (∀ z ∈ Z, T z p ∧ T z q ∧ T z y)) ∨ (T p q ∧ T y p ∧ T y q) := by intro y hy have hyY : y ∈ Y := hWsub hy have hnL : y ∉ L := (Finset.mem_sdiff.mp hy).2 have hnlarge : ¬ Large y := by intro hh exact hnL (Finset.mem_filter.mpr ⟨hyY,hh⟩) have ht := hpatterns y hyY rcases ht with h1 | h2 | h3 | h4 · exact False.elim (hnlarge (Or.inl h1)) · exact False.elim (hnlarge (Or.inr h2)) · exact Or.inl h3 · exact Or.inr h4
Assuming T p q, the T-neighborhoods of p and q in C each contain {q} ∪ W and {p} ∪ W respectively, giving size at least |W| + 1.
If T p q holds, pattern 3 is ruled out for all y ∈ W (as it requires ¬ T p q). Hence all y ∈ W satisfy pattern 4 (T y p and T y q), which by symmetry of T gives T p y and T q y. Since q ∉ W and p ≠ q, the set insert q W is contained in the T-neighborhood of p in C \ {p}, giving cardinality at least |W| + 1. Symmetrically, the T-neighborhood of q has cardinality at least |W| + 1.
uses
False.elim,Finset.card_le_cardby_cases hT : T p q · have hWp : ∀ y ∈ W, T p y := by intro y hy rcases hWpattern y hy with h3|h4 · exact False.elim (h3.1 hT) · exact hTsymm _ _ h4.2.1 have hWq : ∀ y ∈ W, T q y := by intro y hy rcases hWpattern y hy with h3|h4 · exact False.elim (h3.1 hT) · exact hTsymm _ _ h4.2.2 have hpSet : insert q W ⊆ (C.erase p).filter (T p) := by intro y hy rcases Finset.mem_insert.mp hy with rfl | hy · exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hpq.symm,hq⟩,hT⟩ · have hm := hWmem y hy exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hm.2.1,hm.1⟩,hWp y hy⟩ have hqSet : insert p W ⊆ (C.erase q).filter (T q) := by intro y hy rcases Finset.mem_insert.mp hy with rfl | hy · exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hpq,hp⟩,hTsymm _ _ hT⟩ · have hm := hWmem y hy exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hm.2.2,hm.1⟩,hWq y hy⟩ have hpTcard : W.card+1 ≤ ((C.erase p).filter (T p)).card := by have hh := Finset.card_le_card hpSet simpa [hWnotq] using hh have hqTcard : W.card+1 ≤ ((C.erase q).filter (T q)).card := by have hh := Finset.card_le_card hqSet simpa [hWnotp] using hh
Under T p q, the budget at p and q forces their R-degrees in A to be at most 1, forcing |L| ≤ 2 and |W| ≥ |C| - 4, contradicting |W| ≤ |C| - 5.
The budget constraint at p gives |R_A(p)| + (|W| + 1) + 1 ≤ |C| - 3. Combined with |W| ≥ |C| - 6, this forces |R_A(p)| ≤ 1 and |W| ≤ |C| - 5; symmetrically |R_A(q)| ≤ 1. But pattern 1 for any y ∈ L requires sharing 2 neighbors in A with p or q, impossible since their degrees in A are at most 1. Thus every y ∈ L must have degree 4 in A. By in1158_incidence_card_bound with d = 4, 4 * |L| ≤ 8, so |L| ≤ 2. Then |W| = |C| - 2 - |L| ≥ |C| - 4, contradicting |W| ≤ |C| - 5.
uses
true_or,if_true,or_true,Finset.card_le_card,in1158_incidence_card_boundhave hpR : (A.filter (fun a => R a p)).card ≤ 1 := by have hh := hCbudget p hp simp only [true_or,if_true] at hh omega have hqR : (A.filter (fun a => R a q)).card ≤ 1 := by have hh := hCbudget q hq simp only [or_true,if_true] at hh omega have hWupper : W.card ≤ C.card-5 := by have hh := hCbudget p hp simp only [true_or,if_true] at hh omega have hpqR : ∀ r ∈ ({p,q} : Finset V), (A.filter (fun a => R a r)).card ≤ 1 := by intro r hr simp only [Finset.mem_insert,Finset.mem_singleton] at hr rcases hr with rfl|rfl · exact hpR · exact hqR have hLall : ∀ y ∈ L, ∀ a ∈ A, R a y := by intro y hy have hlarge := (Finset.mem_filter.mp hy).2 rcases hlarge with ⟨r,hr,U,hUA,hcard,hR⟩ | hall · have hsub : U ⊆ A.filter (fun a => R a r) := by intro a ha exact Finset.mem_filter.mpr ⟨hUA ha,(hR a ha).2⟩ have h1 := Finset.card_le_card hsub have h2 := hpqR r hr omega · exact hall have hL4 : ∀ y ∈ L, 4 ≤ (A.filter (fun a => R a y)).card := by intro y hy have hfil : A.filter (fun a => R a y) = A := Finset.filter_eq_self.mpr (hLall y hy) rw [hfil,hA] have hLtwo : L.card ≤ 2 := by have hh := in1158_incidence_card_bound A C L R hA hLC hArow 4 hL4 omega omega
Assuming ¬ T p q, every y ∈ W satisfies pattern 3, and the budget saturation lemma forces the witness sets to equal B_p and D_p, with zero R-degree at p and q.
When ¬ T p q, pattern 4 is impossible, so every y ∈ W satisfies pattern 3 with witnesses U ⊆ B and Z ⊆ C \ {p, q, y} of total size |C| - 4. These witnesses are subsets of B_p and D_p = (C \ {p}) ∩ T(p). The budget at p is |R_A(p)| + |B_p| + |D_p| + 1 ≤ |C| - 3. Applying in1158_saturated_two_sets forces U = B_p, Z = D_p, and |R_A(p)| = 0. The same argument at q gives |R_A(q)| = 0.
uses
true_or,if_true,or_true,in1158_saturated_two_sets,False.elim· let Bp : Finset V := B.filter (fun b => S b p) let Dp : Finset V := (C.erase p).filter (T p) let Bq : Finset V := B.filter (fun b => S b q) let Dq : Finset V := (C.erase q).filter (T q) have hsaturation : ∀ y ∈ W, ∃ U ⊆ B, ∃ Z ⊆ (C \ {p,q,y}), U.card+Z.card=C.card-4 ∧ (∀ b ∈ U, S b p ∧ S b q ∧ S b y) ∧ (∀ z ∈ Z, T z p ∧ T z q ∧ T z y) ∧ U=Bp ∧ Z=Dp ∧ (A.filter (fun a => R a p)).card=0 ∧ (A.filter (fun a => R a q)).card=0 := by intro y hy rcases hWpattern y hy with hsmall|hsmall · rcases hsmall with ⟨_,_,U,hUB,Z,hZ,hsize,hSU,hTZ⟩ have hUBp : U ⊆ Bp := by intro b hb exact Finset.mem_filter.mpr ⟨hUB hb,(hSU b hb).1⟩ have hUBq : U ⊆ Bq := by intro b hb exact Finset.mem_filter.mpr ⟨hUB hb,(hSU b hb).2.1⟩ have hZp : Z ⊆ Dp := by intro z hz have hz0 := Finset.mem_sdiff.mp (hZ hz) have hzn : z ≠ p := by intro he apply hz0.2 simp [he] exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hzn,hz0.1⟩, hTsymm _ _ (hTZ z hz).1⟩ have hZq : Z ⊆ Dq := by intro z hz have hz0 := Finset.mem_sdiff.mp (hZ hz) have hzn : z ≠ q := by intro he apply hz0.2 simp [he] exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hzn,hz0.1⟩, hTsymm _ _ (hTZ z hz).2.1⟩ have hbp : (A.filter (fun a => R a p)).card + Bp.card + Dp.card + 1 ≤ C.card-3 := by have hh := hCbudget p hp simpa only [true_or,if_true] using hh have hbq : (A.filter (fun a => R a q)).card + Bq.card + Dq.card + 1 ≤ C.card-3 := by have hh := hCbudget q hq simpa only [or_true,if_true] using hh have hpSat := in1158_saturated_two_sets U Bp Z Dp C.card (A.filter (fun a => R a p)).card hC hUBp hZp hsize hbp have hqSat := in1158_saturated_two_sets U Bq Z Dq C.card (A.filter (fun a => R a q)).card hC hUBq hZq hsize hbq exact ⟨U,hUB,Z,hZ,hsize,hSU,hTZ,hpSat.2.1,hpSat.2.2,hpSat.1,hqSat.1⟩ · exact False.elim (hT hsmall.1)
Zero R-degree at p and q rules out pattern 1 for all vertices in L, forcing |L| ≤ 2 and |W| ≥ |C| - 4.
Fixing a witness y_0 ∈ W, we have |R_A(p)| = 0 and |R_A(q)| = 0. Because neither p nor q has any neighbors in A, pattern 1 is impossible for any y ∈ L, so every y ∈ L has degree 4 in A. Applying in1158_incidence_card_bound with d = 4 yields |L| ≤ 2, which gives |W| = |C| - 2 - |L| ≥ |C| - 4.
uses
Finset.card_le_card,in1158_incidence_card_boundobtain ⟨y0,hy0⟩ := hWnonempty obtain ⟨U0,hU0,Z0,hZ0,hsize0,hSU0,hTZ0,hUeq0,hZeq0,hRp0,hRq0⟩ := hsaturation y0 hy0 have hpqR : ∀ r ∈ ({p,q} : Finset V), (A.filter (fun a => R a r)).card = 0 := by intro r hr simp only [Finset.mem_insert,Finset.mem_singleton] at hr rcases hr with rfl|rfl · exact hRp0 · exact hRq0 have hLall : ∀ y ∈ L, ∀ a ∈ A, R a y := by intro y hy have hlarge := (Finset.mem_filter.mp hy).2 rcases hlarge with ⟨r,hr,U,hUA,hcard,hR⟩ | hall · have hsub : U ⊆ A.filter (fun a => R a r) := by intro a ha exact Finset.mem_filter.mpr ⟨hUA ha,(hR a ha).2⟩ have h1 := Finset.card_le_card hsub have h2 := hpqR r hr omega · exact hall have hL4 : ∀ y ∈ L, 4 ≤ (A.filter (fun a => R a y)).card := by intro y hy have hfil : A.filter (fun a => R a y) = A := Finset.filter_eq_self.mpr (hLall y hy) rw [hfil,hA] have hLtwo : L.card ≤ 2 := by have hh := in1158_incidence_card_bound A C L R hA hLC hArow 4 hL4 omega have hWlower' : C.card-4 ≤ W.card := by omega
The T-neighborhood D_p is empty.
Suppose for contradiction that some z ∈ D_p. Then z ∈ Z_0 ⊆ C \ {p, q}. If z ∈ W, its own saturation witness Z_z = D_p would contain z, contradicting z ∉ Z_z. Thus z ∈ L, so z has degree 4 in A. Furthermore, z ∈ Z_y for every y ∈ W, so T z y holds for all y ∈ W, as well as T z p and T z q. Thus {p, q} ∪ W is contained in the T-neighborhood of z, which therefore has size at least |W| + 2 ≥ |C| - 2. The budget at z then gives 4 + (|C| - 2) ≤ |C| - 3, i.e., |C| + 2 ≤ |C| - 3, a contradiction. Thus D_p = ∅.
uses
Finset.card_le_cardhave hDempty : Dp = ∅ := by by_contra hne obtain ⟨z,hz⟩ := Finset.nonempty_iff_ne_empty.mpr hne have hzZ0 : z ∈ Z0 := by rw [hZeq0]; exact hz have hzsrc := Finset.mem_sdiff.mp (hZ0 hzZ0) have hznp : z ≠ p := by intro he apply hzsrc.2 simp [he] have hznq : z ≠ q := by intro he apply hzsrc.2 simp [he] have hzY : z ∈ Y := by apply Finset.mem_sdiff.mpr exact ⟨hzsrc.1, by simpa [hznp,hznq]⟩ have hznW : z ∉ W := by intro hzW obtain ⟨Uz,hUz,Zz,hZz,hsz,hSUz,hTZz,hUeqz,hZeqz,hRpz,hRqz⟩ := hsaturation z hzW have hzZz : z ∈ Zz := by rw [hZeqz]; exact hz have hh := Finset.mem_sdiff.mp (hZz hzZz) apply hh.2 simp have hzL : z ∈ L := by by_contra hn exact hznW (Finset.mem_sdiff.mpr ⟨hzY,hn⟩) have hzR : (A.filter (fun a => R a z)).card=4 := by have hfil : A.filter (fun a => R a z) = A := Finset.filter_eq_self.mpr (hLall z hzL) rw [hfil,hA] have hzWp : ∀ y ∈ W, T z y := by intro y hy obtain ⟨Uy,hUy,Zy,hZy,hsz,hSUy,hTZy,hUeqy,hZeqy,hRpy,hRqy⟩ := hsaturation y hy have hzZy : z ∈ Zy := by rw [hZeqy]; exact hz exact (hTZy z hzZy).2.2 have hzSet : insert p (insert q W) ⊆ (C.erase z).filter (T z) := by intro y hy simp only [Finset.mem_insert] at hy rcases hy with rfl|rfl|hy · exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hznp.symm,hp⟩,(hTZ0 z hzZ0).1⟩ · exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hznq.symm,hq⟩,(hTZ0 z hzZ0).2.1⟩ · have hm := hWmem y hy have hyz : y ≠ z := by intro he; subst y; exact hznW hy exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hyz,hm.1⟩,hzWp y hy⟩ have hzTcard : W.card+2 ≤ ((C.erase z).filter (T z)).card := by have hh := Finset.card_le_card hzSet have hh' : W.card+1 < ((C.erase z).filter (T z)).card := by simpa [hWnotp,hWnotq,hpq,hpq.symm] using hh omega have hbz := hCbudget z hzsrc.1 omega
Since D_p is empty, B_p of size |C| - 4 is complete to {p, q} ∪ W under S, violating the cut condition and finishing the proof.
Since D_p = ∅, the saturation size equation gives |B_p| = |C| - 4 ≥ 3. For Q = insert p (insert q W), every b ∈ B_p is S-connected to p (by definition of B_p), to q (since B_p = U_0 is S-connected to q), and to every y ∈ W (since B_p = U_y is S-connected to y). The cut condition then requires |B_p| + |Q| ≤ |C|. But |Q| = |W| + 2 ≥ |C| - 2, giving (|C| - 4) + (|C| - 2) ≤ |C|, which implies |C| ≤ 6, contradicting |C| ≥ 7.
uses
Finset.filter_subset,Finset.mem_insert_selfhave hBpCard : Bp.card = C.card-4 := by rw [hUeq0,hZeq0,hDempty] at hsize0 simpa using hsize0 have hBpSub : Bp ⊆ B := Finset.filter_subset _ _ have hBpNonempty : Bp.Nonempty := Finset.card_pos.mp (by omega) let Q : Finset V := insert p (insert q W) have hQsub : Q ⊆ C := by intro y hy simp only [Q,Finset.mem_insert] at hy rcases hy with rfl|rfl|hy · exact hp · exact hq · exact (hWmem y hy).1 have hQnonempty : Q.Nonempty := by exact ⟨p,Finset.mem_insert_self _ _⟩ have hcross : ∀ b ∈ Bp, ∀ y ∈ Q, S b y := by intro b hb y hy simp only [Q,Finset.mem_insert] at hy rcases hy with rfl|rfl|hy · exact (Finset.mem_filter.mp hb).2 · have hb0 : b ∈ U0 := by rw [hUeq0]; exact hb exact (hSU0 b hb0).2.1 · obtain ⟨Uy,hUy,Zy,hZy,hsz,hSUy,hTZy,hUeqy,hZeqy,hRpy,hRqy⟩ := hsaturation y hy have hby : b ∈ Uy := by rw [hUeqy]; exact hb exact (hSUy b hby).2.2 have hcut' := hcut Bp hBpSub Q hQsub hBpNonempty hQnonempty hcross have hQcard : Q.card=W.card+2 := by simp [Q,hWnotp,hWnotq,hpq,hpq.symm] rw [hBpCard,hQcard] at hcut' omega
Finset.sum_le_sum- If f(i) ≤ g(i) for all i ∈ s, then ∑ i ∈ s, f(i) ≤ ∑ i ∈ s, g(i).
Finset.filter_subset_filter- If s ⊆ t, then {x ∈ s | p x} ⊆ {x ∈ t | p x}.
Finset.card_eq_sum_ones- The cardinality of a finite set s equals ∑ x ∈ s, 1.
Finset.sum_filter- The sum of f over a filtered set equals the sum over the ambient set of (if p x then f x else 0).
Finset.sum_comm- Exchanging the order of summation in a double sum over finite sets preserves the sum.
mul_comm- Multiplication in a commutative structure satisfies a * b = b * a.
Finset.eq_of_subset_of_card_le- If s ⊆ t and |t| ≤ |s|, then s = t.
Finset.card_sdiff_of_subset- For finite sets s ⊆ t, the cardinality of the difference is |t \ s| = |t| - |s|.
Finset.card_le_card- If s ⊆ t for finite sets, then |s| ≤ |t|.
Finset.filter_subset- Filtering a finite set by a predicate produces a subset of the original set.
Finset.sdiff_subset- The set difference s \ t is a subset of s.
in1158_incidence_card_bound- In an incidence relation R between a set A of size 4 and L ⊆ C, if every a ∈ A has degree at most 2 in C and every y ∈ L has degree at least d in A, then d * |L| ≤ 8.
False.elim- From False, any proposition follows.
Or.inl- From a proof of P, deduce P ∨ Q.
Or.inr- From a proof of Q, deduce P ∨ Q.
true_or- True ∨ P is equivalent to True.
if_true- An if-then-else expression whose condition is True simplifies to the first branch.
or_true- P ∨ True is equivalent to True.
in1158_saturated_two_sets- For U ⊆ B and Z ⊆ D with |U| + |Z| = c - 4, if r + |B| + |D| + 1 ≤ c - 3 with c ≥ 7, then r = 0, U = B, and Z = D.
Finset.mem_insert_self- An element a is an element of insert a s.
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.
set_option maxHeartbeats 3000000lemma in1158_incidence_card_bound {V : Type*} [DecidableEq V] (A C L : Finset V) (R : V → V → Prop) [DecidableRel R] (hA : A.card = 4) (hLC : L ⊆ C) (hrow : ∀ a ∈ A, (C.filter (R a)).card ≤ 2) (d : ℕ) (hcol : ∀ y ∈ L, d ≤ (A.filter (fun a => R a y)).card) : d * L.card ≤ 8 := by classical have hl : (∑ y ∈ L, d) ≤ ∑ y ∈ L, (A.filter (fun a => R a y)).card := Finset.sum_le_sum hcol have hu : (∑ a ∈ A, (L.filter (R a)).card) ≤ ∑ a ∈ A, (2:ℕ) := by apply Finset.sum_le_sum intro a ha have hs : L.filter (R a) ⊆ C.filter (R a) := Finset.filter_subset_filter _ hLC exact (Finset.card_le_card hs).trans (hrow a ha) have heq : (∑ y ∈ L, (A.filter (fun a => R a y)).card) = ∑ a ∈ A, (L.filter (R a)).card := by simp only [Finset.card_eq_sum_ones, Finset.sum_filter] exact Finset.sum_comm have hl' : d * L.card ≤ ∑ y ∈ L, (A.filter (fun a => R a y)).card := by simpa [mul_comm] using hl have hu' : (∑ a ∈ A, (L.filter (R a)).card) ≤ 8 := by simpa [hA] using hu omegalemma in1158_saturated_two_sets {V : Type*} [DecidableEq V] (U B Z D : Finset V) (c r : ℕ) (hc : 7 ≤ c) (hU : U ⊆ B) (hZ : Z ⊆ D) (hsize : U.card + Z.card = c-4) (hbudget : r + B.card + D.card + 1 ≤ c-3) : r=0 ∧ U=B ∧ Z=D := by have hUB := Finset.card_le_card hU have hZD := Finset.card_le_card hZ have hr : r=0 := by omega have hUB' : B.card ≤ U.card := by omega have hZD' : D.card ≤ Z.card := by omega exact ⟨hr, Finset.eq_of_subset_of_card_le hU hUB', Finset.eq_of_subset_of_card_le hZ hZD'⟩theorem five_odd_mixed_witness_incidence_impossible {V : Type*} [DecidableEq V] (A B C : Finset V) (R S T : V → V → Prop) [DecidableRel R] [DecidableRel S] [DecidableRel T] (hA : A.card=4) (hC : 7 ≤ C.card) (p q : V) (hp : p ∈ C) (hq : q ∈ C) (hpq : p ≠ q) (hTsymm : ∀ u v, T u v → T v u) (hArow : ∀ a ∈ A, (C.filter (R a)).card ≤ 2) (hCbudget : ∀ c ∈ C, (A.filter (fun a => R a c)).card + (B.filter (fun b => S b c)).card + ((C.erase c).filter (T c)).card + (if c=p ∨ c=q then 1 else 0) ≤ C.card-3) (hcut : ∀ U ⊆ B, ∀ W ⊆ C, U.Nonempty → W.Nonempty → (∀ b ∈ U, ∀ c ∈ W, S b c) → U.card+W.card ≤ C.card) (hpatterns : ∀ y ∈ C \ {p,q}, (∃ r ∈ ({p,q} : Finset V), ∃ U ⊆ A, U.card=2 ∧ ∀ a ∈ U, R a y ∧ R a r) ∨ (∀ a ∈ A, R a y) ∨ (¬ T p q ∧ (¬ T y p ∨ ¬ T y q) ∧ ∃ U ⊆ B, ∃ Z ⊆ (C \ {p,q,y}), U.card+Z.card=C.card-4 ∧ (∀ b ∈ U, S b p ∧ S b q ∧ S b y) ∧ (∀ z ∈ Z, T z p ∧ T z q ∧ T z y)) ∨ (T p q ∧ T y p ∧ T y q)) : False := by classical let Y : Finset V := C \ {p,q} let Large : V → Prop := fun y => (∃ r ∈ ({p,q} : Finset V), ∃ U ⊆ A, U.card=2 ∧ ∀ a ∈ U, R a y ∧ R a r) ∨ (∀ a ∈ A, R a y) let L : Finset V := Y.filter Large let W : Finset V := Y \ L have hpair : ({p,q} : Finset V) ⊆ C := by intro x hx simp only [Finset.mem_insert,Finset.mem_singleton] at hx rcases hx with rfl|rfl · exact hp · exact hq have hYcard : Y.card+2=C.card := by dsimp only [Y] rw [Finset.card_sdiff_of_subset hpair] have hpqcard : ({p,q} : Finset V).card=2 := by simp [hpq] rw [hpqcard] have := Finset.card_le_card hpair rw [hpqcard] at this omega have hLY : L ⊆ Y := Finset.filter_subset _ _ have hYC : Y ⊆ C := Finset.sdiff_subset have hLC : L ⊆ C := hLY.trans hYC have hWcard : W.card+L.card=Y.card := by dsimp only [W] rw [Finset.card_sdiff_of_subset hLY] have := Finset.card_le_card hLY omega have hWsub : W ⊆ Y := Finset.sdiff_subset have hWnotp : p ∉ W := by intro h have hy := hWsub h simp [Y] at hy have hWnotq : q ∉ W := by intro h have hy := hWsub h simp [Y] at hy have hLcol : ∀ y ∈ L, 2 ≤ (A.filter (fun a => R a y)).card := by intro y hy have hlarge : Large y := (Finset.mem_filter.mp hy).2 rcases hlarge with ⟨r,hr,U,hUA,hcard,hR⟩ | hall · have hsub : U ⊆ A.filter (fun a => R a y) := by intro a ha exact Finset.mem_filter.mpr ⟨hUA ha,(hR a ha).1⟩ have hh := Finset.card_le_card hsub omega · have hfil : A.filter (fun a => R a y) = A := Finset.filter_eq_self.mpr hall rw [hfil,hA] omega have hLcard : L.card ≤ 4 := by have hh := in1158_incidence_card_bound A C L R hA hLC hArow 2 hLcol omega have hWlower : C.card-6 ≤ W.card := by omega have hWnonempty : W.Nonempty := Finset.card_pos.mp (by omega) have hWmem : ∀ y ∈ W, y ∈ C ∧ y ≠ p ∧ y ≠ q := by intro y hy have h := Finset.mem_sdiff.mp (hWsub hy) have hn : y ≠ p ∧ y ≠ q := by simpa using h.2 exact ⟨h.1,hn⟩ have hWpattern : ∀ y ∈ W, (¬ T p q ∧ (¬ T y p ∨ ¬ T y q) ∧ ∃ U ⊆ B, ∃ Z ⊆ (C \ {p,q,y}), U.card+Z.card=C.card-4 ∧ (∀ b ∈ U, S b p ∧ S b q ∧ S b y) ∧ (∀ z ∈ Z, T z p ∧ T z q ∧ T z y)) ∨ (T p q ∧ T y p ∧ T y q) := by intro y hy have hyY : y ∈ Y := hWsub hy have hnL : y ∉ L := (Finset.mem_sdiff.mp hy).2 have hnlarge : ¬ Large y := by intro hh exact hnL (Finset.mem_filter.mpr ⟨hyY,hh⟩) have ht := hpatterns y hyY rcases ht with h1 | h2 | h3 | h4 · exact False.elim (hnlarge (Or.inl h1)) · exact False.elim (hnlarge (Or.inr h2)) · exact Or.inl h3 · exact Or.inr h4 by_cases hT : T p q · have hWp : ∀ y ∈ W, T p y := by intro y hy rcases hWpattern y hy with h3|h4 · exact False.elim (h3.1 hT) · exact hTsymm _ _ h4.2.1 have hWq : ∀ y ∈ W, T q y := by intro y hy rcases hWpattern y hy with h3|h4 · exact False.elim (h3.1 hT) · exact hTsymm _ _ h4.2.2 have hpSet : insert q W ⊆ (C.erase p).filter (T p) := by intro y hy rcases Finset.mem_insert.mp hy with rfl | hy · exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hpq.symm,hq⟩,hT⟩ · have hm := hWmem y hy exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hm.2.1,hm.1⟩,hWp y hy⟩ have hqSet : insert p W ⊆ (C.erase q).filter (T q) := by intro y hy rcases Finset.mem_insert.mp hy with rfl | hy · exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hpq,hp⟩,hTsymm _ _ hT⟩ · have hm := hWmem y hy exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hm.2.2,hm.1⟩,hWq y hy⟩ have hpTcard : W.card+1 ≤ ((C.erase p).filter (T p)).card := by have hh := Finset.card_le_card hpSet simpa [hWnotq] using hh have hqTcard : W.card+1 ≤ ((C.erase q).filter (T q)).card := by have hh := Finset.card_le_card hqSet simpa [hWnotp] using hh have hpR : (A.filter (fun a => R a p)).card ≤ 1 := by have hh := hCbudget p hp simp only [true_or,if_true] at hh omega have hqR : (A.filter (fun a => R a q)).card ≤ 1 := by have hh := hCbudget q hq simp only [or_true,if_true] at hh omega have hWupper : W.card ≤ C.card-5 := by have hh := hCbudget p hp simp only [true_or,if_true] at hh omega have hpqR : ∀ r ∈ ({p,q} : Finset V), (A.filter (fun a => R a r)).card ≤ 1 := by intro r hr simp only [Finset.mem_insert,Finset.mem_singleton] at hr rcases hr with rfl|rfl · exact hpR · exact hqR have hLall : ∀ y ∈ L, ∀ a ∈ A, R a y := by intro y hy have hlarge := (Finset.mem_filter.mp hy).2 rcases hlarge with ⟨r,hr,U,hUA,hcard,hR⟩ | hall · have hsub : U ⊆ A.filter (fun a => R a r) := by intro a ha exact Finset.mem_filter.mpr ⟨hUA ha,(hR a ha).2⟩ have h1 := Finset.card_le_card hsub have h2 := hpqR r hr omega · exact hall have hL4 : ∀ y ∈ L, 4 ≤ (A.filter (fun a => R a y)).card := by intro y hy have hfil : A.filter (fun a => R a y) = A := Finset.filter_eq_self.mpr (hLall y hy) rw [hfil,hA] have hLtwo : L.card ≤ 2 := by have hh := in1158_incidence_card_bound A C L R hA hLC hArow 4 hL4 omega omega · let Bp : Finset V := B.filter (fun b => S b p) let Dp : Finset V := (C.erase p).filter (T p) let Bq : Finset V := B.filter (fun b => S b q) let Dq : Finset V := (C.erase q).filter (T q) have hsaturation : ∀ y ∈ W, ∃ U ⊆ B, ∃ Z ⊆ (C \ {p,q,y}), U.card+Z.card=C.card-4 ∧ (∀ b ∈ U, S b p ∧ S b q ∧ S b y) ∧ (∀ z ∈ Z, T z p ∧ T z q ∧ T z y) ∧ U=Bp ∧ Z=Dp ∧ (A.filter (fun a => R a p)).card=0 ∧ (A.filter (fun a => R a q)).card=0 := by intro y hy rcases hWpattern y hy with hsmall|hsmall · rcases hsmall with ⟨_,_,U,hUB,Z,hZ,hsize,hSU,hTZ⟩ have hUBp : U ⊆ Bp := by intro b hb exact Finset.mem_filter.mpr ⟨hUB hb,(hSU b hb).1⟩ have hUBq : U ⊆ Bq := by intro b hb exact Finset.mem_filter.mpr ⟨hUB hb,(hSU b hb).2.1⟩ have hZp : Z ⊆ Dp := by intro z hz have hz0 := Finset.mem_sdiff.mp (hZ hz) have hzn : z ≠ p := by intro he apply hz0.2 simp [he] exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hzn,hz0.1⟩, hTsymm _ _ (hTZ z hz).1⟩ have hZq : Z ⊆ Dq := by intro z hz have hz0 := Finset.mem_sdiff.mp (hZ hz) have hzn : z ≠ q := by intro he apply hz0.2 simp [he] exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hzn,hz0.1⟩, hTsymm _ _ (hTZ z hz).2.1⟩ have hbp : (A.filter (fun a => R a p)).card + Bp.card + Dp.card + 1 ≤ C.card-3 := by have hh := hCbudget p hp simpa only [true_or,if_true] using hh have hbq : (A.filter (fun a => R a q)).card + Bq.card + Dq.card + 1 ≤ C.card-3 := by have hh := hCbudget q hq simpa only [or_true,if_true] using hh have hpSat := in1158_saturated_two_sets U Bp Z Dp C.card (A.filter (fun a => R a p)).card hC hUBp hZp hsize hbp have hqSat := in1158_saturated_two_sets U Bq Z Dq C.card (A.filter (fun a => R a q)).card hC hUBq hZq hsize hbq exact ⟨U,hUB,Z,hZ,hsize,hSU,hTZ,hpSat.2.1,hpSat.2.2,hpSat.1,hqSat.1⟩ · exact False.elim (hT hsmall.1) obtain ⟨y0,hy0⟩ := hWnonempty obtain ⟨U0,hU0,Z0,hZ0,hsize0,hSU0,hTZ0,hUeq0,hZeq0,hRp0,hRq0⟩ := hsaturation y0 hy0 have hpqR : ∀ r ∈ ({p,q} : Finset V), (A.filter (fun a => R a r)).card = 0 := by intro r hr simp only [Finset.mem_insert,Finset.mem_singleton] at hr rcases hr with rfl|rfl · exact hRp0 · exact hRq0 have hLall : ∀ y ∈ L, ∀ a ∈ A, R a y := by intro y hy have hlarge := (Finset.mem_filter.mp hy).2 rcases hlarge with ⟨r,hr,U,hUA,hcard,hR⟩ | hall · have hsub : U ⊆ A.filter (fun a => R a r) := by intro a ha exact Finset.mem_filter.mpr ⟨hUA ha,(hR a ha).2⟩ have h1 := Finset.card_le_card hsub have h2 := hpqR r hr omega · exact hall have hL4 : ∀ y ∈ L, 4 ≤ (A.filter (fun a => R a y)).card := by intro y hy have hfil : A.filter (fun a => R a y) = A := Finset.filter_eq_self.mpr (hLall y hy) rw [hfil,hA] have hLtwo : L.card ≤ 2 := by have hh := in1158_incidence_card_bound A C L R hA hLC hArow 4 hL4 omega have hWlower' : C.card-4 ≤ W.card := by omega have hDempty : Dp = ∅ := by by_contra hne obtain ⟨z,hz⟩ := Finset.nonempty_iff_ne_empty.mpr hne have hzZ0 : z ∈ Z0 := by rw [hZeq0]; exact hz have hzsrc := Finset.mem_sdiff.mp (hZ0 hzZ0) have hznp : z ≠ p := by intro he apply hzsrc.2 simp [he] have hznq : z ≠ q := by intro he apply hzsrc.2 simp [he] have hzY : z ∈ Y := by apply Finset.mem_sdiff.mpr exact ⟨hzsrc.1, by simpa [hznp,hznq]⟩ have hznW : z ∉ W := by intro hzW obtain ⟨Uz,hUz,Zz,hZz,hsz,hSUz,hTZz,hUeqz,hZeqz,hRpz,hRqz⟩ := hsaturation z hzW have hzZz : z ∈ Zz := by rw [hZeqz]; exact hz have hh := Finset.mem_sdiff.mp (hZz hzZz) apply hh.2 simp have hzL : z ∈ L := by by_contra hn exact hznW (Finset.mem_sdiff.mpr ⟨hzY,hn⟩) have hzR : (A.filter (fun a => R a z)).card=4 := by have hfil : A.filter (fun a => R a z) = A := Finset.filter_eq_self.mpr (hLall z hzL) rw [hfil,hA] have hzWp : ∀ y ∈ W, T z y := by intro y hy obtain ⟨Uy,hUy,Zy,hZy,hsz,hSUy,hTZy,hUeqy,hZeqy,hRpy,hRqy⟩ := hsaturation y hy have hzZy : z ∈ Zy := by rw [hZeqy]; exact hz exact (hTZy z hzZy).2.2 have hzSet : insert p (insert q W) ⊆ (C.erase z).filter (T z) := by intro y hy simp only [Finset.mem_insert] at hy rcases hy with rfl|rfl|hy · exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hznp.symm,hp⟩,(hTZ0 z hzZ0).1⟩ · exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hznq.symm,hq⟩,(hTZ0 z hzZ0).2.1⟩ · have hm := hWmem y hy have hyz : y ≠ z := by intro he; subst y; exact hznW hy exact Finset.mem_filter.mpr ⟨Finset.mem_erase.mpr ⟨hyz,hm.1⟩,hzWp y hy⟩ have hzTcard : W.card+2 ≤ ((C.erase z).filter (T z)).card := by have hh := Finset.card_le_card hzSet have hh' : W.card+1 < ((C.erase z).filter (T z)).card := by simpa [hWnotp,hWnotq,hpq,hpq.symm] using hh omega have hbz := hCbudget z hzsrc.1 omega have hBpCard : Bp.card = C.card-4 := by rw [hUeq0,hZeq0,hDempty] at hsize0 simpa using hsize0 have hBpSub : Bp ⊆ B := Finset.filter_subset _ _ have hBpNonempty : Bp.Nonempty := Finset.card_pos.mp (by omega) let Q : Finset V := insert p (insert q W) have hQsub : Q ⊆ C := by intro y hy simp only [Q,Finset.mem_insert] at hy rcases hy with rfl|rfl|hy · exact hp · exact hq · exact (hWmem y hy).1 have hQnonempty : Q.Nonempty := by exact ⟨p,Finset.mem_insert_self _ _⟩ have hcross : ∀ b ∈ Bp, ∀ y ∈ Q, S b y := by intro b hb y hy simp only [Q,Finset.mem_insert] at hy rcases hy with rfl|rfl|hy · exact (Finset.mem_filter.mp hb).2 · have hb0 : b ∈ U0 := by rw [hUeq0]; exact hb exact (hSU0 b hb0).2.1 · obtain ⟨Uy,hUy,Zy,hZy,hsz,hSUy,hTZy,hUeqy,hZeqy,hRpy,hRqy⟩ := hsaturation y hy have hby : b ∈ Uy := by rw [hUeqy]; exact hb exact (hSUy b hby).2.2 have hcut' := hcut Bp hBpSub Q hQsub hBpNonempty hQnonempty hcross have hQcard : Q.card=W.card+2 := by simp [Q,hWnotp,hWnotq,hpq,hpq.symm] rw [hBpCard,hQcard] at hcut' omega