Documentation

Mathlib.Logic.Equiv.Finset

Encodable and Denumerable instances for Finset #

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

If α is encodable, then so is Finset α.

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

    The elements of a Fintype as a sorted list.

    Equations
      Instances For
        @[simp]
        theorem Encodable.mem_sortedUniv {α : Type u_1} [Fintype α] [Encodable α] (x : α) :
        @[simp]

        An encodable Fintype is equivalent to the same size Fin.

        Equations
          Instances For

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

            Equations
              Instances For

                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.

                Equations
                  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)List.Sorted (fun (x1 x2 : ) => x1 < x2) lraise' (lower' l n) n = l
                    theorem Denumerable.raise'_chain (l : List ) {m n : } :
                    m < nList.Chain (fun (x1 x2 : ) => x1 < x2) m (raise' l n)
                    theorem Denumerable.raise'_sorted (l : List ) (n : ) :
                    List.Sorted (fun (x1 x2 : ) => x1 < x2) (raise' l n)

                    raise' l n is a strictly increasing sequence.

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

                    Equations
                      Instances For
                        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.

                        Equations