Documentation

Books.IntroductiontoRealAnalysisVolumeI_JiriLebl_2025.Chapters.Chap00.section03_part4

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

Definition 0.3.19: For a set A, a binary relation on A is a subset R ⊆ A × A of ordered pairs where the relation is said to hold; we write a R b instead of (a, b) ∈ R.

Equations
Instances For

    The book's binary relations on a set A correspond to mathlib relations on the subtype of A.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Example 0.3.20: On the finite set A = {1,2,3} the relation < corresponds to the set of pairs {(1,2), (1,3), (2,3)}, so 1 < 2 holds but 3 < 1 does not. The relation = is given by {(1,1), (2,2), (3,3)}. Any subset of A × A is a relation; for example † = {(1,2), (2,1), (2,3), (3,1)} satisfies 1 † 2 and 3 † 1 but not 1 † 3.

      Equations
      Instances For
        Equations
        Instances For
          Equations
          Instances For
            Equations
            Instances For
              @[reducible, inline]
              abbrev ReflexiveRelationOn {α : Type u} (A : Set α) (R : Subtype ASubtype AProp) :

              Definition 0.3.21: A relation R on a set A is (i) reflexive if a R a for all a ∈ A; (ii) symmetric if a R b implies b R a; (iii) transitive if a R b and b R c imply a R c. A relation that is reflexive, symmetric, and transitive is an equivalence relation.

              Equations
              Instances For
                theorem reflexiveRelationOn_iff {α : Type u} (A : Set α) (R : Subtype ASubtype AProp) :

                The book's reflexive relation on A is mathlib's Reflexive predicate on the underlying relation on Subtype A.

                @[reducible, inline]
                abbrev SymmetricRelationOn {α : Type u} (A : Set α) (R : Subtype ASubtype AProp) :

                The book's symmetric relation on A is mathlib's Symmetric predicate on the underlying relation on Subtype A.

                Equations
                Instances For
                  theorem symmetricRelationOn_iff {α : Type u} (A : Set α) (R : Subtype ASubtype AProp) :
                  @[reducible, inline]
                  abbrev TransitiveRelationOn {α : Type u} (A : Set α) (R : Subtype ASubtype AProp) :

                  The book's transitive relation on A is mathlib's Transitive predicate on the underlying relation on Subtype A.

                  Equations
                  Instances For
                    theorem transitiveRelationOn_iff {α : Type u} (A : Set α) (R : Subtype ASubtype AProp) :
                    @[reducible, inline]
                    abbrev equivalenceRelationOn {α : Type u} (A : Set α) (R : Subtype ASubtype AProp) :

                    The book's notion of equivalence relation collects reflexivity, symmetry, and transitivity.

                    Equations
                    Instances For

                      The book's equivalence relations on A coincide with mathlib's Equivalence structure for relations on Subtype A.

                      Example 0.3.22: On A = {1,2,3}, the usual < is transitive but neither reflexive nor symmetric. The relation (restricted to A) given by {(1,1),(1,2),(1,3),(2,2),(2,3),(3,3)} is reflexive and transitive but not symmetric. The relation with pairs {(1,1),(1,2),(2,1),(2,2),(3,3)} is an equivalence relation.

                      Equations
                      Instances For
                        Equations
                        Instances For

                          Any element of finiteExampleSet is at most 2 or equal to 3.

                          def equivalenceClass {α : Type u} (A : Set α) (R : Subtype ASubtype AProp) (a : Subtype A) :

                          Definition 0.3.23: For a set A with an equivalence relation R and an element a ∈ A, the equivalence class of a, denoted [a], is the set { x ∈ A | a R x }.

                          Equations
                          Instances For
                            theorem equivalenceClass_eq_setoid_r {α : Type u} (A : Set α) (R : Subtype ASubtype AProp) (hR : Equivalence R) (a : Subtype A) :
                            equivalenceClass A R a = {x : Subtype A | { r := R, iseqv := hR } a x}

                            The book's equivalence class agrees with the class coming from the Setoid built from the equivalence relation R on A.

                            theorem equivalenceClass_unique {α : Type u} (A : Set α) (R : Subtype ASubtype AProp) (hR : Equivalence R) (a : Subtype A) :

                            Proposition 0.3.24: If R is an equivalence relation on A, then every a ∈ A lies in exactly one equivalence class. Moreover, a R b if and only if [a] = [b].

                            Example 0.3.25: Rational numbers can be presented as equivalence classes of pairs (a, b) with a ∈ ℤ and a positive b ∈ ℕ under the relation (a, b) ∼ (c, d) when a * d = b * c. The class of (a, b) is typically written a / b.

                            Equations
                            Instances For
                              def ratPairRel (p q : RatPair) :
                              Equations
                              Instances For

                                The relation used to define rationals as pairs is an equivalence relation.

                                The setoid of rational-number representatives as pairs of an integer and a natural number with positive denominator.

                                Equations
                                Instances For
                                  @[reducible, inline]

                                  Rational numbers as the quotient of integer–natural pairs by the relation (a, b) ∼ (c, d) when a * d = b * c.

                                  Equations
                                  Instances For

                                    Interpret a numerator–denominator pair as a rational number.

                                    Equations
                                    Instances For

                                      Cross-multiplication characterizes when two pairs represent the same rational.

                                      The quotient of integer–natural pairs is equivalent to mathlib's rationals .

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For