AFTD Auto-Formalizing Theoretical Domains

op1957_four_shore_aggregate_representative_bounds

theoremverified

Four shore aggregate representative bounds.

Statement

theorem op1957_four_shore_aggregate_representative_bounds
    {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (F B : Fin 4 → Finset V) (E : Finset V) (x y : V)
    (forbid : Fin 4 → Fin 4) (L : ℕ)
    (hFdis : ∀ i l : Fin 4, i ≠ l → Disjoint (F i) (F l))
    (hEdis : ∀ i : Fin 4, Disjoint (F i) E)
    (hBdis : ∀ i l : Fin 4, i ≠ l → Disjoint (B i) (B l))
    (hBcover : (Finset.univ : Finset (Fin 4)).biUnion B = Finset.univ)
    (hEB : E ⊆ B 1) (hx : x ∈ B 0) (hy : y ∈ B 2)
    (hcross : ∀ i l : Fin 4, i ≠ l → ∀ a ∈ F i, ∀ b ∈ F l, G.Adj a b →
      (i=0 ∧ l=1 ∧ a=x ∧ b=y) ∨ (i=1 ∧ l=0 ∧ a=y ∧ b=x))
    (hEanti : ∀ i : Fin 4, ∀ a ∈ F i, ∀ w ∈ E, ¬ G.Adj a w)
    (hbf : ∀ b, b ≠ forbid b)
    (hforbid : ∀ b, ∀ a ∈ B b, ∀ w ∈ B (forbid b), ¬ G.Adj a w)
    (hblocks : ∀ b, (B b).card+(B (forbid b)).card=L)
    (hmin : ∀ b, 3 ≤ (B b).card)
    (hV : Fintype.card V=2*L)
    (hdegree : ∀ v, L+2 ≤ (G.neighborFinset v).card) :
    let g : Fin 4 → Fin 4 → ℕ := fun i b => (F i ∩ B b).card
    let tot : Fin 4 → ℕ := fun b => (∑ i : Fin 4, g i b) + (if b=1 then E.card else 0)
    ∀ j b : Fin 4,
      (if (j=0 ∧ b=0) ∨ (j=1 ∧ b=2) then 2 else 1) ≤ g j b →
      (∑ t ∈ (Finset.univ : Finset (Fin 4)).erase (forbid b), (tot t-g j t))+3 ≤ (B b).card
Source
OP-1957; positive-separator graph-to-count transfer.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
Used by 3

The proof, explained

The proof establishes the aggregate representative bound by reducing it to the previously proven budget inequality op1957_four_shore_representative_budget. It first checks an arithmetic decomposition of the vertex count |V| = 2L into block sizes, enabling the application of the budget theorem. It then decomposes the set differences of the shores and of the set E across the partitioning blocks, and finishes by interchanging the summations to match the theorem statement.

  1. Fix indices j and b in Fin 4 and assume the threshold lower bound on g j b = |F j ∩ B b|.

    Unfold the local definitions of g and tot, and assume the given representative count bound hcount for block b and shore j.

    lines 27–29

      classical
      dsimp only
      intro j b hcount
  2. The total number of vertices satisfies |V| = |B (forbid b)| + (L + |B b| - 1) + 1.

    Since |V| = 2L, |B b| + |B (forbid b)| = L, and |B b| ≥ 3, this identity is verified by linear integer arithmetic.

    lines 30–33

      have hs : Fintype.card V = (B (forbid b)).card+(L+(B b).card-1)+1 := by
        have hh := hblocks b
        have hm := hmin b
        omega
  3. The raw budget inequality holds: ∑_{i ≠ j} |F i \ B (forbid b)| + |E \ B (forbid b)| + 3 ≤ |B b|.

    Apply the existing budget theorem op1957_four_shore_representative_budget using the vertex count formula hs, the minimum block size, and the degree and edge-forbiddance assumptions.

    lines 34–36

    uses op1957_four_shore_representative_budget

      have hraw := op1957_four_shore_representative_budget G F B E x y
        hFdis hEdis hBdis hx hy hcross hEanti j b (forbid b) (hbf b) (hforbid b)
        L (hmin b) hs hdegree hcount
  4. Each shore difference |F i \ B (forbid b)| expands to the sum ∑_{t ≠ forbid b} |F i ∩ B t|, converting the first term into a double sum.

    Because the blocks B partition the vertex set V, the lemma op1957_four_block_sdiff_card_sum decomposes F i \ B (forbid b) into the disjoint pieces F i ∩ B t for t ≠ forbid b. Rewriting with this identity substitutes the double sum into the budget inequality.

    lines 37–40

    uses op1957_four_block_sdiff_card_sum

      have hdiff (i : Fin 4) : (F i \ B (forbid b)).card =
          ∑ t ∈ (Finset.univ : Finset (Fin 4)).erase (forbid b), (F i ∩ B t).card :=
        op1957_four_block_sdiff_card_sum B (F i) (forbid b) hBdis hBcover
      simp_rw [hdiff] at hraw
  5. The difference size |E \ B (forbid b)| equals 0 if forbid b = 1, and |E| otherwise.

    We distinguish cases on whether forbid b = 1. If forbid b = 1, then E ⊆ B 1 = B (forbid b), so E \ B (forbid b) = ∅ and its size is 0. If forbid b ≠ 1, then since B 1 and B (forbid b) are disjoint, E is disjoint from B (forbid b), which implies E \ B (forbid b) = E, of size |E|. Substituting this simplifies the second term of the budget inequality.

    lines 41–49

    uses Finset.sdiff_eq_empty_iff_subset.mpr, Finset.disjoint_of_subset_left, Ne.symm, Finset.sdiff_eq_self_of_disjoint

      have hediff : (E \ B (forbid b)).card = if forbid b=1 then 0 else E.card := by
        by_cases h : forbid b=1
        · have hsub : E ⊆ B (forbid b) := by simpa [h] using hEB
          have hh : E \ B (forbid b) = ∅ := Finset.sdiff_eq_empty_iff_subset.mpr hsub
          simp [h,hEB]
        · have hdis : Disjoint E (B (forbid b)) :=
            Finset.disjoint_of_subset_left hEB (hBdis 1 (forbid b) (Ne.symm h))
          simp [h,Finset.sdiff_eq_self_of_disjoint hdis]
      rw [hediff] at hraw
  6. The rewritten budget inequality matches the goal, completing the proof.

    The algebraic identity op1957_four_shore_other_counts_sum_identity interchanges the order of summation, showing that the desired LHS matches the transformed budget expression exactly.

    lines 50–53

    uses op1957_four_shore_other_counts_sum_identity

      have hsum := op1957_four_shore_other_counts_sum_identity
        (fun i t => (F i ∩ B t).card) E.card j (forbid b)
      rw [hsum]
      exact hraw
op1957_four_shore_representative_budget
Under the partition, degree, and edge conditions, if block b contains at least the threshold number of representatives from shore j, then the sum over all other shores i ≠ j of |F i \ B forbidden|, plus |E \ B forbidden|, plus 3, is at most |B b|.
op1957_four_block_sdiff_card_sum
For any subset W of vertices and block index forbidden, if the four blocks partition V, then |W \ B forbidden| is the sum of |W ∩ B t| over all t ≠ forbidden.
Finset.sdiff_eq_empty_iff_subset.mpr
If s ⊆ t, then s \ t = ∅.
Finset.disjoint_of_subset_left
If s ⊆ u and u is disjoint from t, then s is disjoint from t.
Ne.symm
Inequality is symmetric: if a ≠ b, then b ≠ a.
Finset.sdiff_eq_self_of_disjoint
If two finite sets s and t are disjoint, then s \ t = s.
op1957_four_shore_other_counts_sum_identity
For any count matrix g and constant eb, summing the column totals of g (plus eb in column 1) minus the j-th row entry over all columns t ≠ forbidden equals the sum over all other rows i ≠ j and columns t ≠ forbidden of g i t, plus eb if forbidden ≠ 1.

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 op1957_four_shore_aggregate_representative_bounds    {V : Type*} [Fintype V] [DecidableEq V]    (G : SimpleGraph V) [DecidableRel G.Adj]    (F B : Fin 4 → Finset V) (E : Finset V) (x y : V)    (forbid : Fin 4 → Fin 4) (L : ℕ)    (hFdis : ∀ i l : Fin 4, i ≠ l → Disjoint (F i) (F l))    (hEdis : ∀ i : Fin 4, Disjoint (F i) E)    (hBdis : ∀ i l : Fin 4, i ≠ l → Disjoint (B i) (B l))    (hBcover : (Finset.univ : Finset (Fin 4)).biUnion B = Finset.univ)    (hEB : E ⊆ B 1) (hx : x ∈ B 0) (hy : y ∈ B 2)    (hcross : ∀ i l : Fin 4, i ≠ l → ∀ a ∈ F i, ∀ b ∈ F l, G.Adj a b →      (i=0 ∧ l=1 ∧ a=x ∧ b=y) ∨ (i=1 ∧ l=0 ∧ a=y ∧ b=x))    (hEanti : ∀ i : Fin 4, ∀ a ∈ F i, ∀ w ∈ E, ¬ G.Adj a w)    (hbf : ∀ b, b ≠ forbid b)    (hforbid : ∀ b, ∀ a ∈ B b, ∀ w ∈ B (forbid b), ¬ G.Adj a w)    (hblocks : ∀ b, (B b).card+(B (forbid b)).card=L)    (hmin : ∀ b, 3 ≤ (B b).card)    (hV : Fintype.card V=2*L)    (hdegree : ∀ v, L+2 ≤ (G.neighborFinset v).card) :    let g : Fin 4 → Fin 4 → ℕ := fun i b => (F i ∩ B b).card    let tot : Fin 4 → ℕ := fun b => (∑ i : Fin 4, g i b) + (if b=1 then E.card else 0)    ∀ j b : Fin 4,      (if (j=0 ∧ b=0) ∨ (j=1 ∧ b=2) then 2 else 1) ≤ g j b →      (∑ t ∈ (Finset.univ : Finset (Fin 4)).erase (forbid b), (tot t-g j t))+3 ≤ (B b).card := by  classical  dsimp only  intro j b hcount  have hs : Fintype.card V = (B (forbid b)).card+(L+(B b).card-1)+1 := by    have hh := hblocks b    have hm := hmin b    omega  have hraw := op1957_four_shore_representative_budget G F B E x y    hFdis hEdis hBdis hx hy hcross hEanti j b (forbid b) (hbf b) (hforbid b)    L (hmin b) hs hdegree hcount  have hdiff (i : Fin 4) : (F i \ B (forbid b)).card =      ∑ t ∈ (Finset.univ : Finset (Fin 4)).erase (forbid b), (F i ∩ B t).card :=    op1957_four_block_sdiff_card_sum B (F i) (forbid b) hBdis hBcover  simp_rw [hdiff] at hraw  have hediff : (E \ B (forbid b)).card = if forbid b=1 then 0 else E.card := by    by_cases h : forbid b=1    · have hsub : E ⊆ B (forbid b) := by simpa [h] using hEB      have hh : E \ B (forbid b) = ∅ := Finset.sdiff_eq_empty_iff_subset.mpr hsub      simp [h,hEB]    · have hdis : Disjoint E (B (forbid b)) :=        Finset.disjoint_of_subset_left hEB (hBdis 1 (forbid b) (Ne.symm h))      simp [h,Finset.sdiff_eq_self_of_disjoint hdis]  rw [hediff] at hraw  have hsum := op1957_four_shore_other_counts_sum_identity    (fun i t => (F i ∩ B t).card) E.card j (forbid b)  rw [hsum]  exact hraw
See it in the graphDiscuss this resultChallenge it