op861_boolean_block_uniform_bound
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
- op861_disjoint_boolean_windows_countFor a finite Boolean coordinate set, pairwise disjoint coordinate blocks, and integer offsets depending only on coordinates outside all…
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.
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.
classical let V : Finset (β → Bool) := Finset.univ.filter (fun ω => ∀ i : {i : ι // i ∈ J}, P (fun t => ω t.1) i (fun t => ω t.1))
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.
uses
Finset.mem_filter,Finset.mem_univ,true_andhave 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ω
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, ·).
uses
op861_boolean_block_product_bound,Finset.card_le_cardhave 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
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).
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 <;> simpThe 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.
_ = _ := 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.
- In step 4 (line 37), the tactic sequence `convert hlocal a i using 1 <;> congr 1 <;> ext x <;> simp` is used purely to align minor definitional and type-class details between the goal and hypothesis `hlocal`, a formal artifact that has no counterpart in a mathematical 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.
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