AFTD Auto-Formalizing Theoretical Domains

op861_boolean_block_uniform_bound

theoremverified

A uniform bound on each block fiber yields a bound on the total number of good Boolean assignments by the outside-assignment count times the product of local bounds.

Statement

theorem op861_boolean_block_uniform_bound (β ι : Type) [Fintype β] [DecidableEq β]
    [DecidableEq ι] (J : Finset ι) (B : ι → Finset β)
    (Good : (β → Bool) → Prop) [DecidablePred Good]
    (P : ({t : β // t ∉ J.biUnion B} → Bool) →
      ∀ i : {i : ι // i ∈ J}, ({t : β // t ∈ B i.1} → Bool) → Prop)
    [∀ a i v, Decidable (P a i v)] (limit : ι → ℕ)
    (hcover : ∀ ω, Good ω → ∀ i : {i : ι // i ∈ J},
      P (fun t => ω t.1) i (fun t => ω t.1))
    (hlocal : ∀ a i, ((Finset.univ : Finset ({t : β // t ∈ B i.1} → Bool)).filter
      (P a i)).card ≤ limit i.1) :
    ((Finset.univ : Finset (β → Bool)).filter Good).card ≤
      Fintype.card ({t : β // t ∉ J.biUnion B} → Bool) *
        ∏ i : {i : ι // i ∈ J}, limit i.1
Source
Finite independent-block count for op861_disjoint_boolean_windows_count.
Verified
18 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • op861_boolean_block_product_boundFor Boolean assignments on a finite coordinate set and any family of block predicates depending on the assignment outside all blocks, the…
Used by 1

The proof, explained

The theorem is proved by first enlarging the set of good Boolean assignments to the set V of all assignments satisfying the local block conditions for every block in J. Applying the previously established block product bound (`op861_boolean_block_product_bound`) bounds the cardinality of V by a sum over outside assignments of a product of local fiber cardinalities. Each local fiber cardinality is then bounded by the uniform bound `limit(i)`, and summing this constant product over all outside assignments multiplies it by the total count of outside assignments.

  1. Define V as the set of Boolean assignments whose restrictions satisfy the block conditions P for all blocks in J.

    Working under classical logic (`classical`), we let V be the finite set of assignments ω : β → Bool such that for every block index i ∈ J, the restriction of ω to the block B(i) satisfies the predicate P with respect to the restriction of ω to coordinates outside the union of all blocks in J.

    lines 16–18

      classical
      let V : Finset (β → Bool) := Finset.univ.filter (fun ω =>
        ∀ i : {i : ι // i ∈ J}, P (fun t => ω t.1) i (fun t => ω t.1))
  2. Every good assignment belongs to V, so the set of good assignments is a subset of V.

    Let ω be an assignment satisfying Good. By hypothesis `hcover`, ω satisfies the predicate P on every block i ∈ J. Unfolding the definition of V and simplifying set membership using `Finset.mem_filter`, `Finset.mem_univ`, and `true_and`, we conclude that ω ∈ V.

    lines 19–23

    uses Finset.mem_filter, Finset.mem_univ, true_and

      have hsub : ((Finset.univ : Finset (β → Bool)).filter Good) ⊆ V := by
        intro ω hω
        dsimp [V]
        simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hω ⊢
        exact hcover ω hω
  3. The number of good assignments is bounded by the sum over outside assignments of the product of block fiber sizes.

    By subset inclusion and monotonicity of finite set cardinality (`Finset.card_le_card`), the number of good assignments is at most |V|. Applying the previously established block product bound `op861_boolean_block_product_bound`, |V| is bounded by the sum over all outside assignments a of the product over i ∈ J of the number of block assignments satisfying P(a, i, ·).

    lines 24–30

    uses op861_boolean_block_product_bound, Finset.card_le_card

      have hprod := op861_boolean_block_product_bound β ι J B P
      calc
        _ ≤ V.card := Finset.card_le_card hsub
        _ ≤ ∑ a : ({t : β // t ∉ J.biUnion B} → Bool),
            ∏ i : {i : ι // i ∈ J},
              ((Finset.univ : Finset ({t : β // t ∈ B i.1} → Bool)).filter (P a i)).card := by
          simpa [V] using hprod
  4. The sum of products of block fiber sizes is bounded by replacing each block factor with its uniform limit.

    We apply monotonicity of summation (`Finset.sum_le_sum`) and monotonicity of finite products (`Finset.prod_le_prod'`). For each outside assignment a and each block index i ∈ J, hypothesis `hlocal` bounds the number of satisfying block assignments by limit(i).

    lines 31–37

    uses Finset.sum_le_sum, Finset.prod_le_prod'

        _ ≤ ∑ _a : ({t : β // t ∉ J.biUnion B} → Bool),
            ∏ i : {i : ι // i ∈ J}, limit i.1 := by
          apply Finset.sum_le_sum
          intro a ha
          apply Finset.prod_le_prod'
          intro i hi
          convert hlocal a i using 1 <;> congr 1 <;> ext x <;> simp
  5. The sum of constant products over all outside assignments evaluates to the number of outside assignments times the product of the limits.

    Because the summand ∏ i, limit(i) does not depend on the outside assignment a, summing it over all functions from outside coordinates to Bool simply multiplies this constant product by the cardinality of that function space (Fintype.card). The `simp` tactic completes this arithmetic simplification.

    line 38

        _ = _ := by simp
Finset.mem_filter
An element belongs to a filtered finite set if and only if it belongs to the base set and satisfies the filtering predicate.
Finset.mem_univ
Every element of a finite type belongs to its universal finite set `Finset.univ`.
true_and
The proposition `True ∧ p` is logically equivalent to `p`.
op861_boolean_block_product_bound
The number of Boolean assignments satisfying the block predicates for all blocks in J is at most the sum over outside assignments of the product of the block-level fiber counts.
Finset.card_le_card
If a finite set s is a subset of t, then the cardinality of s is at most the cardinality of t.
Finset.sum_le_sum
A sum of terms over a finite set is bounded above by the sum of larger terms over the same set.
Finset.prod_le_prod'
A product of non-negative terms over a finite set is bounded above by the product of larger terms over the same set.

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

open scoped BigOperatorstheorem op861_boolean_block_uniform_bound (β ι : Type) [Fintype β] [DecidableEq β]    [DecidableEq ι] (J : Finset ι) (B : ι → Finset β)    (Good : (β → Bool) → Prop) [DecidablePred Good]    (P : ({t : β // t ∉ J.biUnion B} → Bool) →      ∀ i : {i : ι // i ∈ J}, ({t : β // t ∈ B i.1} → Bool) → Prop)    [∀ a i v, Decidable (P a i v)] (limit : ι → ℕ)    (hcover : ∀ ω, Good ω → ∀ i : {i : ι // i ∈ J},      P (fun t => ω t.1) i (fun t => ω t.1))    (hlocal : ∀ a i, ((Finset.univ : Finset ({t : β // t ∈ B i.1} → Bool)).filter      (P a i)).card ≤ limit i.1) :    ((Finset.univ : Finset (β → Bool)).filter Good).card ≤      Fintype.card ({t : β // t ∉ J.biUnion B} → Bool) *        ∏ i : {i : ι // i ∈ J}, limit i.1 := by  classical  let V : Finset (β → Bool) := Finset.univ.filter (fun ω =>    ∀ i : {i : ι // i ∈ J}, P (fun t => ω t.1) i (fun t => ω t.1))  have hsub : ((Finset.univ : Finset (β → Bool)).filter Good) ⊆ V := by    intro ω hω    dsimp [V]    simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hω ⊢    exact hcover ω hω  have hprod := op861_boolean_block_product_bound β ι J B P  calc    _ ≤ V.card := Finset.card_le_card hsub    _ ≤ ∑ a : ({t : β // t ∉ J.biUnion B} → Bool),        ∏ i : {i : ι // i ∈ J},          ((Finset.univ : Finset ({t : β // t ∈ B i.1} → Bool)).filter (P a i)).card := by      simpa [V] using hprod    _ ≤ ∑ _a : ({t : β // t ∉ J.biUnion B} → Bool),        ∏ i : {i : ι // i ∈ J}, limit i.1 := by      apply Finset.sum_le_sum      intro a ha      apply Finset.prod_le_prod'      intro i hi      convert hlocal a i using 1 <;> congr 1 <;> ext x <;> simp    _ = _ := by simp
See it in the graphDiscuss this resultChallenge it