Documentation

Mathlib.Data.Set.PowersetCard

Combinations #

Combinations in a type are finite subsets of given cardinality.

def Set.powersetCard (α : Type u_1) (n : ℕ) :
Set (Finset α)

The type of combinations of n elements of a type α.

See also Finset.powersetCard.

Equations
Instances For
    @[simp]
    theorem Set.powersetCard.mem_iff {α : Type u_1} {n : ℕ} {s : Finset α} :
    @[simp]
    theorem Set.powersetCard.coe_coe {α : Type u_1} {n : ℕ} {s : ↑(powersetCard α n)} :
    ↑↑s = ↑s
    theorem Set.powersetCard.mem_coe_iff {α : Type u_1} {n : ℕ} {s : ↑(powersetCard α n)} {a : α} :
    a ∈ ↑s ↔ a ∈ s
    @[simp]
    theorem Set.powersetCard.card_eq {α : Type u_1} {n : ℕ} (s : ↑(powersetCard α n)) :
    (↑s).card = n
    @[simp]
    theorem Set.powersetCard.ncard_eq {α : Type u_1} {n : ℕ} (s : ↑(powersetCard α n)) :
    (↑s).ncard = n
    theorem Set.powersetCard.coe_nonempty_iff {α : Type u_1} {n : ℕ} {s : ↑(powersetCard α n)} :
    (↑s).Nonempty ↔ 1 ≤ n
    theorem Set.powersetCard.coe_nontrivial_iff {α : Type u_1} {n : ℕ} {s : ↑(powersetCard α n)} :
    (↑s).Nontrivial ↔ 1 < n
    theorem Set.powersetCard.eq_iff_subset {α : Type u_1} {n : ℕ} {s t : ↑(powersetCard α n)} :
    s = t ↔ ↑s ⊆ ↑t
    theorem Set.powersetCard.exists_mem_notMem {α : Type u_1} {n : ℕ} (hn : 1 ≤ n) (hα : ↑n < ENat.card α) {a b : α} (hab : a ≠ b) :
    ∃ (s : ↑(powersetCard α n)), a ∈ s ∧ b ∉ s
    theorem Set.powersetCard.exists_mem_notMem_iff_ne {α : Type u_1} {n : ℕ} (s t : ↑(powersetCard α n)) :
    s ≠ t ↔ ∃ a ∈ s, a ∉ t
    def Set.powersetCard.map {α : Type u_1} (n : ℕ) {β : Type u_2} (f : α ↪ β) (s : ↑(powersetCard α n)) :
    ↑(powersetCard β n)

    The map powersetCard α n → powersetCard β n induced by embedding f : α ↪ β.

    Equations
    Instances For
      theorem Set.powersetCard.mem_map_iff_mem_range {α : Type u_1} (n : ℕ) {β : Type u_2} (f : α ↪ β) (s : ↑(powersetCard α n)) (b : β) :
      b ∈ map n f s ↔ b ∈ ⇑f '' ↑s
      @[simp]
      theorem Set.powersetCard.coe_map {α : Type u_1} (n : ℕ) {β : Type u_2} (f : α ↪ β) (s : ↑(powersetCard α n)) :
      ↑(map n f s) = ⇑f '' ↑s
      @[simp]
      theorem Set.powersetCard.val_map {α : Type u_1} (n : ℕ) {β : Type u_2} (f : α ↪ β) (s : ↑(powersetCard α n)) :
      ↑(map n f s) = Finset.map f ↑s
      def Set.powersetCard.ofCard {α : Type u_1} {n : ℕ} {s : Finset α} (s_card : s.card = n) :
      ↑(powersetCard α n)

      The coercion of a finite set to its corresponding element of Set.powersetCard.

      Equations
      Instances For
        @[simp]
        theorem Set.powersetCard.val_ofCard {α : Type u_1} {n : ℕ} {s : Finset α} (s_card : s.card = n) :
        ↑(ofCard s_card) = s
        @[simp]
        theorem Set.powersetCard.ofCard_coe {α : Type u_1} {n : ℕ} {s : ↑(powersetCard α n)} (h : (↑s).card = n) :
        ofCard h = s
        noncomputable def Set.powersetCard.ofSingleton {α : Type u_1} :
        α ≃ ↑(powersetCard α 1)

        The equivalence sending a : α to the singleton {a}.

        Equations
        Instances For
          def Set.powersetCard.ofFinEmb (n : ℕ) (β : Type u_2) (f : Fin n ↪ β) :
          ↑(powersetCard β n)

          The image of an embedding f : Fin n ↪ β as an element of powersetCard β n.

          Equations
          Instances For
            @[simp]
            theorem Set.powersetCard.mem_ofFinEmb_iff_mem_range (n : ℕ) (β : Type u_2) (f : Fin n ↪ β) (b : β) :
            b ∈ ofFinEmb n β f ↔ b ∈ range ⇑f
            @[simp]
            theorem Set.powersetCard.coe_ofFinEmb (n : ℕ) (β : Type u_2) (f : Fin n ↪ β) :
            ↑(ofFinEmb n β f) = range ⇑f
            @[simp]
            theorem Set.powersetCard.val_ofFinEmb (n : ℕ) (β : Type u_2) (f : Fin n ↪ β) :
            def Set.powersetCard.compl {α : Type u_1} {n : ℕ} [DecidableEq α] [Fintype α] {m : ℕ} (hm : m + n = Fintype.card α) :
            ↑(powersetCard α n) ≃ ↑(powersetCard α m)

            Complement of Finsets as an equivalence on Set.powersetCard.

            Equations
            Instances For
              @[simp]
              theorem Set.powersetCard.coe_compl {α : Type u_1} {n : ℕ} [DecidableEq α] [Fintype α] {m : ℕ} {hm : m + n = Fintype.card α} {s : ↑(powersetCard α n)} :
              ↑((compl hm) s) = (↑s)ᶜ
              @[simp]
              theorem Set.powersetCard.mem_compl {α : Type u_1} {n : ℕ} [DecidableEq α] [Fintype α] {m : ℕ} {hm : m + n = Fintype.card α} {s : ↑(powersetCard α n)} {a : α} :
              a ∈ (compl hm) s ↔ a ∉ s
              theorem Set.powersetCard.compl_symm {α : Type u_1} {n : ℕ} [DecidableEq α] [Fintype α] {m : ℕ} {hm : m + n = Fintype.card α} :
              (compl hm).symm = compl ⋯
              def Set.powersetCard.disjUnion {α : Type u_1} {n m : ℕ} {s : ↑(powersetCard α m)} {t : ↑(powersetCard α n)} (hst : Disjoint ↑s ↑t) :
              ↑(powersetCard α (m + n))

              The disjoint union of two powersetCards.

              Equations
              Instances For
                @[simp]
                theorem Set.powersetCard.coe_disjUnion {α : Type u_1} {n m : ℕ} {s : ↑(powersetCard α m)} {t : ↑(powersetCard α n)} {hst : Disjoint ↑s ↑t} :
                ↑(disjUnion hst) = (↑s).disjUnion (↑t) hst
                @[simp]
                theorem Set.powersetCard.mem_disjUnion {α : Type u_1} {n m : ℕ} {s : ↑(powersetCard α m)} {t : ↑(powersetCard α n)} {hst : Disjoint ↑s ↑t} {a : α} :
                a ∈ disjUnion hst ↔ a ∈ s ∨ a ∈ t
                @[implicit_reducible]
                Equations
                theorem Set.powersetCard.exist_mem_powersetCard_of_inf (α : Type u_1) (n : ℕ) (h : 0 < n) [Infinite α] (a : α) :
                ∃ s ∈ powersetCard α n, a ∈ s
                instance Set.powersetCard.instInfinite (α : Type u_1) (n : ℕ) [NeZero n] [Infinite α] :
                theorem Set.powersetCard.card (α : Type u_1) (n : ℕ) :
                theorem Set.powersetCard.nontrivial {α : Type u_1} {n : ℕ} (h1 : 0 < n) (h2 : ↑n < ENat.card α) :

                If 0 < n < ENat.card α, then powersetCard α n is nontrivial.

                theorem Set.powersetCard.nontrivial' {α : Type u_1} {n : ℕ} (h1 : 0 < n) (h2 : n < Nat.card α) :

                A variant of Set.powersetCard.nontrivial that uses Nat.card.

                @[simp]
                theorem Set.powersetCard.eq_empty_iff {α : Type u_1} {n : ℕ} [Finite α] :
                theorem Set.powersetCard.nontrivial_iff {α : Type u_1} {n : ℕ} [Finite α] :
                def Set.powersetCard.prodEquiv {α : Type u_1} :
                (n : ℕ) × ↑(powersetCard α n) ≃ Finset α

                The bijection between the product of (n : ℕ) and the finsets of α of cardinality n and Finset α.

                Equations
                Instances For
                  @[simp]
                  theorem Set.powersetCard.prodEquiv_apply {α : Type u_1} (x : (n : ℕ) × ↑(powersetCard α n)) :
                  prodEquiv x = ↑x.snd