op874_permutation_disjoint_cover
Let A and B be disjoint subsets of a finite set and let σ be a permutation. If every element v is in A or its image σ(v) is in B, then A and B cover the entire set.
Statement
theorem op874_permutation_disjoint_cover {V : Type*} [Fintype V] [DecidableEq V] (σ : V ≃ V) (A B : Finset V) (hdis : Disjoint A B) (hcover : ∀ v, v ∈ A ∨ σ v ∈ B) : ∀ v, v ∈ A ∨ v ∈ B
- Source
- Cycle-interface counting for OP-874, based on the local-state criterion in arXiv:2610.41950.
- Verified
- 28 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Used by 1
- op874_cycle_common_hidden_color_exposedLet σ be a permutation of a finite set of vertices, and suppose each vertex has a unique marked one of three ports, numbered outside,…
The proof, explained
The proof uses a counting argument on the cardinalities of the sets. By pulling B back along the permutation σ to define B' = σ⁻¹(B), the hypothesis implies that A ∪ B' covers the entire universe V, which gives |V| ≤ |A| + |B'| = |A| + |B|. Since A and B are disjoint, |A ∪ B| = |A| + |B|, forcing the size of A ∪ B to equal |V|. Because a subset of a finite set with full cardinality must be the entire set, A ∪ B = V, so every element belongs to A or B.
Define the pullback B' = σ⁻¹(B) so that v ∈ B' if and only if σ(v) ∈ B.
We define B' as the image of B under the inverse permutation σ⁻¹. Since σ⁻¹ is the inverse bijection of σ, an element v belongs to B' precisely when σ(v) ∈ B.
let B' : Finset V := B.map σ.symm.toEmbedding have hmem (v : V) : v ∈ B' ↔ σ v ∈ B := by simp [B']
The union A ∪ B' covers the entire set V.
By extensionality, it suffices to show that every element v ∈ V belongs to A ∪ B'. By the hypothesis hcover, every element v satisfies v ∈ A or σ(v) ∈ B. Since σ(v) ∈ B is equivalent to v ∈ B', it follows that v ∈ A ∪ B' for every v.
uses
Finset.mem_union,Finset.mem_univ,iff_truehave hunion : A ∪ B' = Finset.univ := by ext v simp only [Finset.mem_union, Finset.mem_univ, iff_true] exact (hcover v).imp_right (fun h => (hmem v).2 h)
The total number of elements |V| is at most |A| + |B|.
Since A ∪ B' = V, the cardinality |V| equals |A ∪ B'|. By subadditivity of cardinality, |A ∪ B'| ≤ |A| + |B'|. Moreover, because σ⁻¹ is a bijection, |B'| = |B|, yielding |V| ≤ |A| + |B|.
uses
Finset.card_univ,Finset.card_union_lehave hge : Fintype.card V ≤ A.card + B.card := by calc Fintype.card V = (A ∪ B').card := by rw [hunion, Finset.card_univ] _ ≤ A.card + B'.card := Finset.card_union_le _ _ _ = A.card + B.card := by simp [B']
The union A ∪ B has cardinality equal to |V|.
Any subset of V has cardinality at most |V|, so |A ∪ B| ≤ |V|. Furthermore, because A and B are disjoint, |A ∪ B| = |A| + |B|. Combining |A| + |B| ≤ |V| with the previously established |V| ≤ |A| + |B| forces |A ∪ B| = |V|.
uses
Finset.card_le_univ,Finset.card_union_of_disjointhave hle : (A ∪ B).card ≤ Fintype.card V := Finset.card_le_univ _ have heq : (A ∪ B).card = Fintype.card V := by rw [Finset.card_union_of_disjoint hdis] rw [Finset.card_union_of_disjoint hdis] at hle omega
The sets A and B cover V: every v ∈ V is in A or in B.
A subset of a finite type whose cardinality matches the type's cardinality is the universal set, so A ∪ B = V. Therefore, every element v ∈ V belongs to A ∪ B, which means v ∈ A or v ∈ B.
uses
Finset.eq_univ_of_card,Finset.mem_univ,Finset.mem_unionhave hall : A ∪ B = Finset.univ := Finset.eq_univ_of_card _ heq intro v have hv : v ∈ A ∪ B := by rw [hall]; exact Finset.mem_univ _ simpa only [Finset.mem_union] using hv
Finset.card_le_univ- The cardinality of any finite subset is at most the cardinality of the ambient finite type.
Finset.card_union_le- The cardinality of the union of two finite sets is at most the sum of their individual cardinalities.
Finset.card_union_of_disjoint- The cardinality of the union of two disjoint finite sets is the sum of their individual cardinalities.
Finset.card_univ- The cardinality of the universal finset of a type equals the cardinality of that type.
Finset.eq_univ_of_card- A finite subset whose cardinality equals the cardinality of the ambient type is equal to the universal set.
Finset.mem_union- The elements of the union of two finite sets are those in the first set or the second set.
Finset.mem_univ- Every element of a finite type belongs to the universal finset Finset.univ.
iff_true- A proposition p being equivalent to True is logically equivalent to p itself.
- In line 16, the equality between |B'| and |B| is discharged automatically by simp, which applies the fact that mapping along an embedding preserves cardinality.
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.
theorem op874_permutation_disjoint_cover {V : Type*} [Fintype V] [DecidableEq V] (σ : V ≃ V) (A B : Finset V) (hdis : Disjoint A B) (hcover : ∀ v, v ∈ A ∨ σ v ∈ B) : ∀ v, v ∈ A ∨ v ∈ B := by let B' : Finset V := B.map σ.symm.toEmbedding have hmem (v : V) : v ∈ B' ↔ σ v ∈ B := by simp [B'] have hunion : A ∪ B' = Finset.univ := by ext v simp only [Finset.mem_union, Finset.mem_univ, iff_true] exact (hcover v).imp_right (fun h => (hmem v).2 h) have hge : Fintype.card V ≤ A.card + B.card := by calc Fintype.card V = (A ∪ B').card := by rw [hunion, Finset.card_univ] _ ≤ A.card + B'.card := Finset.card_union_le _ _ _ = A.card + B.card := by simp [B'] have hle : (A ∪ B).card ≤ Fintype.card V := Finset.card_le_univ _ have heq : (A ∪ B).card = Fintype.card V := by rw [Finset.card_union_of_disjoint hdis] rw [Finset.card_union_of_disjoint hdis] at hle omega have hall : A ∪ B = Finset.univ := Finset.eq_univ_of_card _ heq intro v have hv : v ∈ A ∪ B := by rw [hall]; exact Finset.mem_univ _ simpa only [Finset.mem_union] using hv