Documentation

Mathlib.Logic.Equiv.Finset

Encodable and Denumerable instances for Finset #

@[implicit_reducible]
instance Finset.encodable {α : Type u_1} [Encodable α] :

If α is encodable, then so is Finset α.

def Encodable.sortedUniv (α : Type u_1) [Fintype α] [Encodable α] :
List α

The elements of a Fintype as a sorted list.

Instances For
    @[simp]
    theorem Encodable.mem_sortedUniv {α : Type u_1} [Fintype α] [Encodable α] (x : α) :
    x sortedUniv α
    @[simp]
    theorem Encodable.length_sortedUniv (α : Type u_1) [Fintype α] [Encodable α] :
    (sortedUniv α).length = Fintype.card α
    @[simp]
    theorem Encodable.sortedUniv_nodup (α : Type u_1) [Fintype α] [Encodable α] :
    (sortedUniv α).Nodup
    @[simp]
    theorem Encodable.sortedUniv_toFinset (α : Type u_1) [Fintype α] [Encodable α] [DecidableEq α] :
    def Encodable.fintypeEquivFin {α : Type u_1} [Fintype α] [Encodable α] :
    α Fin (Fintype.card α)

    An encodable Fintype is equivalent to the same size Fin.

    Instances For
      def Denumerable.lower' :
      List List

      Outputs the list of differences minus one of the input list, that is lower' [a₁, a₂, a₃, ...] n = [a₁ - n, a₂ - a₁ - 1, a₃ - a₂ - 1, ...].

      Instances For
        def Denumerable.raise' :
        List List

        Outputs the list of partial sums plus one of the input list, that is raise [a₁, a₂, a₃, ...] n = [n + a₁, n + a₁ + a₂ + 1, n + a₁ + a₂ + a₃ + 2, ...]. Adding one each time ensures the elements are distinct.

        Instances For
          theorem Denumerable.lower_raise' (l : List ) (n : ) :
          lower' (raise' l n) n = l
          theorem Denumerable.raise_lower' {l : List } {n : } :
          (∀ ml, n m)l.SortedLTraise' (lower' l n) n = l
          theorem Denumerable.isChain_raise' (l : List ) (n : ) :
          List.IsChain (fun (x1 x2 : ) => x1 < x2) (raise' l n)
          theorem Denumerable.isChain_cons_raise' (l : List ) (m : ) :
          List.IsChain (fun (x1 x2 : ) => x1 < x2) (m :: raise' l (m + 1))
          theorem Denumerable.isChain_cons_raise'_of_lt (l : List ) {m n : } (h : m < n) :
          List.IsChain (fun (x1 x2 : ) => x1 < x2) (m :: raise' l n)
          theorem Denumerable.raise'_sorted (l : List ) (n : ) :

          raise' l n is a strictly increasing sequence.

          def Denumerable.raise'Finset (l : List ) (n : ) :
          Finset

          Makes raise' l n into a finset. Elements are distinct thanks to raise'_sorted.

          Instances For
            @[implicit_reducible]
            instance Denumerable.finset {α : Type u_1} [Denumerable α] :

            If α is denumerable, then so is Finset α. Warning: this is not the same encoding as used in Finset.encodable.