op_1870_pairwise_cap_card_identity
For any three mutually disjoint finite sets $A_0, A_1, A_2$, the sum of the cardinalities of their pairwise unions satisfies $2 (|A_0| + |A_1| + |A_2|) = |A_0 \cup A_1| + |A_0 \cup A_2| + |A_1 \cup A_2|$.
Statement
theorem op_1870_pairwise_cap_card_identity {α : Type*} [DecidableEq α] (A₀ A₁ A₂ : Finset α) (h01 : Disjoint A₀ A₁) (h02 : Disjoint A₀ A₂) (h12 : Disjoint A₁ A₂) : 2 * (A₀.card + A₁.card + A₂.card) = (A₀ ∪ A₁).card + (A₀ ∪ A₂).card + (A₁ ∪ A₂).card
- Source
- arXiv:2611.19543 Lemma 4
- Verified
- 18 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Used by 1
- op_1870_pairwise_cap_total_card_le_168For any three mutually disjoint finsets $A_0, A_1, A_2 \subseteq \mathbb{F}_3^6$, if each pairwise union $A_0 \cup A_1$, $A_0 \cup A_2$,…
Read back from the Lean
Let α be a type with decidable equality, and let A₀, A₁, and A₂ be finite subsets (Finset) of α. If A₀ and A₁ are disjoint, A₀ and A₂ are disjoint, and A₁ and A₂ are disjoint, then twice the sum of their cardinalities equals the sum of the cardinalities of their pairwise unions: 2 * (|A₀| + |A₁| + |A₂|) = |A₀ ∪ A₁| + |A₀ ∪ A₂| + |A₁ ∪ A₂|.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
Because the three finite sets are pairwise disjoint, the cardinality of each pairwise union is simply the sum of the cardinalities of its two constituent sets. Rewriting each union cardinality in this way expresses both sides purely in terms of $|A_0|$, $|A_1|$, and $|A_2|$. The identity then follows immediately from elementary ring arithmetic on $\mathbb{N}$.
The identity reduces to $2(|A_0| + |A_1| + |A_2|) = (|A_0| + |A_1|) + (|A_0| + |A_2|) + (|A_1| + |A_2|)$.
Because $A_0, A_1$, and $A_2$ are pairwise disjoint (by hypotheses $h01$, $h02$, and $h12$), we rewrite the cardinality of each union as the sum of the individual cardinalities using `Finset.card_union_of_disjoint`.
uses
Finset.card_union_of_disjointrw [Finset.card_union_of_disjoint h01, Finset.card_union_of_disjoint h02, Finset.card_union_of_disjoint h12]The equality holds. automation
Expanding both sides shows that each cardinality $|A_i|$ appears exactly twice, so the two sides are equal by commutative ring arithmetic.
ring
Finset.card_union_of_disjoint- If two finite sets are disjoint, the cardinality of their union is the sum of their cardinalities.
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.
/-- The sum of cardinalities of pairwise unions of three mutually disjoint sets is twice their total cardinality. -/theorem op_1870_pairwise_cap_card_identity {α : Type*} [DecidableEq α] (A₀ A₁ A₂ : Finset α) (h01 : Disjoint A₀ A₁) (h02 : Disjoint A₀ A₂) (h12 : Disjoint A₁ A₂) : 2 * (A₀.card + A₁.card + A₂.card) = (A₀ ∪ A₁).card + (A₀ ∪ A₂).card + (A₁ ∪ A₂).card := by rw [Finset.card_union_of_disjoint h01, Finset.card_union_of_disjoint h02, Finset.card_union_of_disjoint h12] ring