AFTD Auto-Formalizing Theoretical Domains

op874_permutation_disjoint_cover

theoremverified

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

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.

  1. 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.

    lines 5–7

      let B' : Finset V := B.map σ.symm.toEmbedding
      have hmem (v : V) : v ∈ B' ↔ σ v ∈ B := by
        simp [B']
  2. 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.

    lines 8–11

    uses Finset.mem_union, Finset.mem_univ, iff_true

      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)
  3. 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|.

    lines 12–16

    uses Finset.card_univ, Finset.card_union_le

      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']
  4. 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|.

    lines 17–21

    uses Finset.card_le_univ, Finset.card_union_of_disjoint

      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
  5. 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.

    lines 22–25

    uses Finset.eq_univ_of_card, Finset.mem_univ, Finset.mem_union

      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
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.

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

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
See it in the graphDiscuss this resultChallenge it