Documentation

Books.IntroductiontoRealAnalysisVolumeI_JiriLebl_2025.Chapters.Chap00.section03_part5

def sameCardinality (A : Type u) (B : Type v) :

Definition 0.3.26: Sets A and B have the same cardinality when there exists a bijection f : A → B. The cardinality |A| is the equivalence class of all sets with the same cardinality as A.

Equations
Instances For

    The book's notion of equal cardinalities matches mathlib's equality of cardinals.

    def cardinalityClass (A : Type u) :

    The cardinality class of a set A is the collection of all sets bijective to A.

    Equations
    Instances For
      @[reducible, inline]
      abbrev cardinality (A : Type u) :

      The book's cardinality |A| corresponds to the mathlib cardinal Cardinal.mk A.

      Equations
      Instances For
        def elementCollectionCardEq {α : Type u} (A : Set α) (n : ) :

        Definition 0.3.27: A set has cardinality n when it is in bijection with {1, 2, …, n} (or is empty when n = 0); such sets are called finite. A set is infinite if it is not finite.

        Equations
        Instances For
          @[reducible, inline]
          abbrev finiteElementCollection {α : Type u} (A : Set α) :

          The book's notion of a finite set: it has the same cardinality as some {1, …, n}.

          Equations
          Instances For

            The book's finite sets correspond to mathlib's Set.Finite.

            @[reducible, inline]
            abbrev infiniteElementCollection {α : Type u} (A : Set α) :

            The book's infinite sets are those that are not finite.

            Equations
            Instances For

              The book's infinite sets correspond to mathlib's Set.Infinite.

              def cardinalLe (A : Type u) (B : Type v) :

              Definition 0.3.28: We write |A| ≤ |B| if there is an injection from A to B; |A| = |B| when the two have the same cardinality; |A| < |B| when |A| ≤ |B| but the cardinalities are not equal.

              Equations
              Instances For

                The book's |A| ≤ |B| corresponds to the cardinal inequality of Cardinal.mk.

                def cardinalLt (A : Type u) (B : Type v) :

                The book's strict cardinal inequality |A| < |B| means |A| ≤ |B| but not equal.

                Equations
                Instances For

                  The book's |A| < |B| matches the strict inequality of cardinals.

                  Definition 0.3.29: A set is countably infinite if its cardinality equals that of the natural numbers; it is countable if it is finite or countably infinite; otherwise it is uncountable.

                  Equations
                  Instances For

                    Example 0.3.30: The set E of even natural numbers has the same cardinality as ; the bijection is given by n ↦ 2n.

                    Equations
                    Instances For

                      The map n ↦ 2n is a bijection from onto the even naturals.

                      An explicit equivalence between and the even naturals.

                      Example 0.3.31: The Cartesian product ℕ × ℕ is countably infinite, for example via the diagonal enumeration (1,1), (1,2), (2,1), (1,3), (2,2), (3,1), ….

                      ℚ is denumerable, so we can pick an explicit equivalence with ℕ.

                      Example 0.3.32: The set of rational numbers is countable (in fact countably infinite), e.g., by enumerating positive fractions in a grid and then inserting 0 and their negatives.

                      @[reducible, inline]
                      abbrev powerSetElementCollection {α : Type u} (A : Set α) :
                      Set (Set α)

                      Definition 0.3.33: The power set 𝒫(A) of a set A is the set of all subsets of A.

                      Equations
                      Instances For

                        The book's power set of A is mathlib's 𝒫 A.

                        Membership in the power set means being a subset.

                        Theorem 0.3.34 (Cantor). For any set A, the cardinality of A is strictly less than the cardinality of its power set 𝒫 A; in particular there is no surjection from A onto 𝒫 A.