Documentation

Analysis.Section_3_5

Аналіз I, Розділ 3.5: Декартови добутки #

Я (прим. перекл. Терренс Тао) намагався зробити переклад якомога точнішим перефразуванням оригінального тексту. Коли є вибір між більш ідіоматичним підходом Lean та більш точним перекладом, я зазвичай обирав останній. Зокрема, будуть місця, де код Lean можна було б "підправити", щоб зробити його більш елегантним та ідіоматичним, але я свідомо уникав цього вибору.

Основні конструкції та результати цього розділу:

Підказки від попередніх користувачів #

Користувачі супровідного матеріалу, які виконали вправи в цьому розділі, можуть надсилати свої поради майбутнім користувачам цього розділу як PRи.

Визначення 3.5.1 (Впорядкована пара). Тут також можна було використати Object × Object для визначення OrderedPair.

Instances For
    theorem Chapter3.OrderedPair.ext_iff {inst✝ : SetTheory} {x y : OrderedPair} :
    x = y ↔ x.fst = y.fst ∧ x.snd = y.snd
    theorem Chapter3.OrderedPair.ext {inst✝ : SetTheory} {x y : OrderedPair} (fst : x.fst = y.fst) (snd : x.snd = y.snd) :
    x = y
    @[simp]
    theorem Chapter3.OrderedPair.eq [SetTheory] (x y x' y' : Object) :
    { fst := x, snd := y } = { fst := x', snd := y' } ↔ x = x' ∧ y = y'

    Визначення 3.5.1 (Впорядкована пара)

    Вспоміжна лема для Вправи 3.5.1

    Вправа 3.5.1, перша частина

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[reducible, inline]

      Технічна операція перетворююча об'єкт x та множину Y на множину {x} × Y, необхідна для визначення повного декартового добутку

      Equations
      Instances For
        @[simp]
        theorem Chapter3.SetTheory.Set.mem_slice [SetTheory] (x z : Object) (Y : Set) :
        z ∈ slice x Y ↔ ∃ (y : Y.toSubtype), z = OrderedPair.toObject { fst := x, snd := ↑y }
        @[reducible, inline]

        Визначення 3.5.4 (Декартовий добуток)

        Equations
        Instances For

          Цей екземпляр дозволяє використовувати позначення ×ˢ для декартового добутку.

          Equations
          @[simp]
          theorem Chapter3.SetTheory.Set.mem_cartesian [SetTheory] (z : Object) (X Y : Set) :
          z ∈ X ×ˢ Y ↔ ∃ (x : X.toSubtype) (y : Y.toSubtype), z = OrderedPair.toObject { fst := ↑x, snd := ↑y }
          @[reducible, inline]
          noncomputable abbrev Chapter3.SetTheory.Set.fst [SetTheory] {X Y : Set} (z : (X ×ˢ Y).toSubtype) :
          Equations
          Instances For
            @[reducible, inline]
            noncomputable abbrev Chapter3.SetTheory.Set.snd [SetTheory] {X Y : Set} (z : (X ×ˢ Y).toSubtype) :
            Equations
            Instances For
              theorem Chapter3.SetTheory.Set.pair_eq_fst_snd [SetTheory] {X Y : Set} (z : (X ×ˢ Y).toSubtype) :
              ↑z = OrderedPair.toObject { fst := ↑(fst z), snd := ↑(snd z) }

              Це надає OrderedPair докази того, що x ∈ X та y ∈ Y.

              Equations
              Instances For
                @[reducible, inline]
                noncomputable abbrev Chapter3.SetTheory.Set.prod_equiv_prod [SetTheory] (X Y : Set) :
                ↑{x : Object | x ∈ X ×ˢ Y} ≃ ↑({x : Object | x ∈ X} ×ˢ {x : Object | x ∈ Y})

                Зв’язки з добутком множин у Mathlib, який складається з пар Lean на кшталт (x, y), озброєних доказом того, що x належить лівій множині, а y — правій. Пари Lean на кшталт (x, y) подібні до нашого OrderedPair, але більш загальні.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[reducible, inline]

                  Приклад 3.5.5 / Вправа 3.6.5. Існує бієкція між X ×ˢ Y та Y ×ˢ X.

                  Equations
                  • X.prod_commutator Y = { toFun := sorry, invFun := sorry, left_inv := ⋯, right_inv := ⋯ }
                  Instances For
                    @[reducible, inline]
                    noncomputable abbrev Chapter3.SetTheory.Set.curry_equiv [SetTheory] {X Y Z : Set} :
                    (X.toSubtype → Y.toSubtype → Z.toSubtype) ≃ ((X ×ˢ Y).toSubtype → Z.toSubtype)

                    Приклад 3.5.5. Функцію двох змінних можна розглядати як функцію від пари.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      @[reducible, inline]
                      abbrev Chapter3.SetTheory.Set.tuple [SetTheory] {I : Set} {X : I.toSubtype → Set} (x : (i : I.toSubtype) → (X i).toSubtype) :

                      Визначення 3.5.6. Індексуюча множина I відіграє роль { i : 1 ≤ i ≤ n } у тексті. Див. Вправу 3.5.10 нижче для деяких зв’язків між цим поняттям і попереднім поняттям декартового добутку та впорядкованої пари.

                      Equations
                      Instances For
                        @[reducible, inline]

                        Визначення 3.5.6

                        Equations
                        Instances For
                          theorem Chapter3.SetTheory.Set.mem_iProd [SetTheory] {I : Set} {X : I.toSubtype → Set} (t : Object) :
                          t ∈ iProd X ↔ ∃ (x : (i : I.toSubtype) → (X i).toSubtype), t = tuple x

                          Визначення 3.5.6

                          theorem Chapter3.SetTheory.Set.tuple_mem_iProd [SetTheory] {I : Set} {X : I.toSubtype → Set} (x : (i : I.toSubtype) → (X i).toSubtype) :
                          @[simp]
                          theorem Chapter3.SetTheory.Set.tuple_inj [SetTheory] {I : Set} {X : I.toSubtype → Set} (x y : (i : I.toSubtype) → (X i).toSubtype) :
                          tuple x = tuple y ↔ x = y
                          @[reducible, inline]
                          noncomputable abbrev Chapter3.SetTheory.Set.prod_associator [SetTheory] (X Y Z : Set) :

                          Приклад 3.5.8. Існує бієкція між (X ×ˢ Y) ×ˢ Z та X ×ˢ (Y ×ˢ Z).

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            @[reducible, inline]

                            Вправа 3.5.10. Я підозрюю, що більшість еквівалентностей вимагатиме класичного міркування і будуть визначені неконструктивно, але буду радий дізнатися про контрприклади.

                            Equations
                            Instances For
                              @[reducible, inline]

                              Приклад 3.5.10

                              Equations
                              Instances For
                                @[reducible, inline]
                                noncomputable abbrev Chapter3.SetTheory.Set.iProd_of_const_equiv [SetTheory] (I X : Set) :
                                (iProd fun (x : I.toSubtype) => X).toSubtype ≃ (I.toSubtype → X.toSubtype)

                                Приклад 3.5.10

                                Equations
                                Instances For
                                  @[reducible, inline]
                                  noncomputable abbrev Chapter3.SetTheory.Set.iProd_equiv_prod [SetTheory] (X : {0, 1}.toSubtype → Set) :
                                  (iProd X).toSubtype ≃ (X ⟨0, ⋯⟩ ×ˢ X ⟨1, ⋯⟩).toSubtype

                                  Приклад 3.5.10

                                  Equations
                                  Instances For
                                    @[reducible, inline]
                                    noncomputable abbrev Chapter3.SetTheory.Set.iProd_equiv_prod_triple [SetTheory] (X : {0, 1, 2}.toSubtype → Set) :
                                    (iProd X).toSubtype ≃ (X ⟨0, ⋯⟩ ×ˢ X ⟨1, ⋯⟩ ×ˢ X ⟨2, ⋯⟩).toSubtype

                                    Приклад 3.5.10

                                    Equations
                                    Instances For
                                      @[reducible, inline]
                                      noncomputable abbrev Chapter3.SetTheory.Set.iProd_equiv_pi [SetTheory] (I : Set) (X : I.toSubtype → Set) :
                                      (iProd X).toSubtype ≃ ↑(Set.univ.pi fun (i : I.toSubtype) => {x : Object | x ∈ X i})

                                      Зв'язки із Mathlib-овським Set.pi

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        @[reducible, inline]

                                        Тут ми створюємо аналог Mathlib-івських типів Fin n в рамках теорії множин з Розділу 3, із рудиментарним API.

                                        Equations
                                        Instances For
                                          theorem Chapter3.SetTheory.Set.mem_Fin [SetTheory] (n : ℕ) (x : Object) :
                                          x ∈ Fin n ↔ ∃ m < n, x = ↑m
                                          @[reducible, inline]
                                          abbrev Chapter3.SetTheory.Set.Fin_mk [SetTheory] (n m : ℕ) (h : m < n) :
                                          Equations
                                          Instances For
                                            theorem Chapter3.SetTheory.Set.mem_Fin' [SetTheory] {n : ℕ} (x : (Fin n).toSubtype) :
                                            ∃ (m : ℕ) (h : m < n), x = Fin_mk n m h
                                            @[reducible, inline]
                                            noncomputable abbrev Chapter3.SetTheory.Set.Fin.toNat [SetTheory] {n : ℕ} (i : (Fin n).toSubtype) :
                                            Equations
                                            Instances For
                                              theorem Chapter3.SetTheory.Set.Fin.toNat_spec [SetTheory] {n : ℕ} (i : (Fin n).toSubtype) :
                                              ∃ (h : ↑i < n), i = Fin_mk n (↑i) h
                                              @[simp]
                                              theorem Chapter3.SetTheory.Set.Fin.coe_toNat [SetTheory] {n : ℕ} (i : (Fin n).toSubtype) :
                                              ↑↑i = ↑i
                                              @[simp]
                                              theorem Chapter3.SetTheory.Set.Fin.coe_inj [SetTheory] {n : ℕ} {i j : (Fin n).toSubtype} :
                                              i = j ↔ ↑i = ↑j
                                              @[simp]
                                              theorem Chapter3.SetTheory.Set.Fin.coe_eq_iff [SetTheory] {n : ℕ} (i : (Fin n).toSubtype) {j : ℕ} :
                                              ↑i = ↑j ↔ ↑i = j
                                              @[simp]
                                              theorem Chapter3.SetTheory.Set.Fin.coe_eq_iff' [SetTheory] {n m : ℕ} (i : (Fin n).toSubtype) (hi : ↑i ∈ Fin m) :
                                              ↑⟨↑i, hi⟩ = ↑i
                                              @[simp]
                                              theorem Chapter3.SetTheory.Set.Fin.toNat_mk [SetTheory] {n : ℕ} (m : ℕ) (h : m < n) :
                                              ↑(Fin_mk n m h) = m
                                              @[reducible, inline]
                                              abbrev Chapter3.SetTheory.Set.Fin_embed [SetTheory] (n N : ℕ) (h : n ≤ N) (i : (Fin n).toSubtype) :
                                              Equations
                                              Instances For
                                                @[reducible, inline]

                                                Зв'язки із Mathlib-овським Fin n

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  theorem Chapter3.SetTheory.Set.finite_choice [SetTheory] {n : ℕ} {X : (Fin n).toSubtype → Set} (h : ∀ (i : (Fin n).toSubtype), X i ≠ ∅) :

                                                  Лема 3.5.11 (зліченний вибір)

                                                  @[reducible, inline]

                                                  Вправа 3.5.1, друга частина (вимагає аксіоми регулярності)

                                                  Equations
                                                  Instances For
                                                    structure Chapter3.SetTheory.Set.Tuple [SetTheory] (n : ℕ) :
                                                    Type (max u_1 u_2)

                                                    Альтернативне визначення кортежу, використане у Вправі 3.5.2

                                                    Instances For
                                                      theorem Chapter3.SetTheory.Set.Tuple.ext [SetTheory] {n : ℕ} {t t' : Tuple n} (hX : t.X = t'.X) (hx : ∀ (n_1 : (Fin n).toSubtype), ↑(t.x n_1) = ↑(t'.x n_1)) :
                                                      t = t'

                                                      Користувацька лема екстенсіональності для Вправи 3.5.2. Додавання @[ext] до структури створило б лему, що вимагала б доведення t.x = t'.x, але ці функції мають різні типи, коли t.X ≠ t'.X. Ця лема обробляє цю частину.

                                                      theorem Chapter3.SetTheory.Set.Tuple.ext_iff [SetTheory] {n : ℕ} {t t' : Tuple n} :
                                                      t = t' ↔ t.X = t'.X ∧ ∀ (n_1 : (Fin n).toSubtype), ↑(t.x n_1) = ↑(t'.x n_1)
                                                      theorem Chapter3.SetTheory.Set.Tuple.eq [SetTheory] {n : ℕ} (t t' : Tuple n) :
                                                      t = t' ↔ ∀ (n_1 : (Fin n).toSubtype), ↑(t.x n_1) = ↑(t'.x n_1)

                                                      Вправа 3.5.2

                                                      @[reducible, inline]
                                                      noncomputable abbrev Chapter3.SetTheory.Set.iProd_equiv_tuples [SetTheory] (n : ℕ) (X : (Fin n).toSubtype → Set) :
                                                      (iProd X).toSubtype ≃ { t : Tuple n // ∀ (i : (Fin n).toSubtype), ↑(t.x i) ∈ X i }
                                                      Equations
                                                      Instances For

                                                        Вправа 3.5.3. Дух завдання полягає в тому, щоб уникнути прямих переписувань (які роблять усі ці твердження тривіальними), а натомість використовувати OrderedPair.eq або SetTheory.Set.tuple_inj

                                                        theorem Chapter3.OrderedPair.trans [SetTheory] {p q r : OrderedPair} (hpq : p = q) (hqr : q = r) :
                                                        p = r
                                                        theorem Chapter3.SetTheory.Set.tuple_refl [SetTheory] {I : Set} {X : I.toSubtype → Set} (a : (i : I.toSubtype) → (X i).toSubtype) :
                                                        theorem Chapter3.SetTheory.Set.tuple_symm [SetTheory] {I : Set} {X : I.toSubtype → Set} (a b : (i : I.toSubtype) → (X i).toSubtype) :
                                                        theorem Chapter3.SetTheory.Set.tuple_trans [SetTheory] {I : Set} {X : I.toSubtype → Set} {a b c : (i : I.toSubtype) → (X i).toSubtype} (hab : tuple a = tuple b) (hbc : tuple b = tuple c) :
                                                        theorem Chapter3.SetTheory.Set.prod_union [SetTheory] (A B C : Set) :
                                                        A ×ˢ (B ∪ C) = A ×ˢ B ∪ A ×ˢ C

                                                        Вправа 3.5.4

                                                        theorem Chapter3.SetTheory.Set.prod_inter [SetTheory] (A B C : Set) :
                                                        A ×ˢ (B ∩ C) = A ×ˢ B ∩ A ×ˢ C

                                                        Вправа 3.5.4

                                                        theorem Chapter3.SetTheory.Set.prod_diff [SetTheory] (A B C : Set) :
                                                        A ×ˢ (B \ C) = A ×ˢ B \ A ×ˢ C

                                                        Вправа 3.5.4

                                                        theorem Chapter3.SetTheory.Set.union_prod [SetTheory] (A B C : Set) :
                                                        (A ∪ B) ×ˢ C = A ×ˢ C ∪ B ×ˢ C

                                                        Вправа 3.5.4

                                                        theorem Chapter3.SetTheory.Set.inter_prod [SetTheory] (A B C : Set) :
                                                        (A ∩ B) ×ˢ C = A ×ˢ C ∩ B ×ˢ C

                                                        Вправа 3.5.4

                                                        theorem Chapter3.SetTheory.Set.diff_prod [SetTheory] (A B C : Set) :
                                                        (A \ B) ×ˢ C = A ×ˢ C \ A ×ˢ B

                                                        Вправа 3.5.4

                                                        theorem Chapter3.SetTheory.Set.inter_of_prod [SetTheory] (A B C D : Set) :
                                                        A ×ˢ B ∩ C ×ˢ D = (A ∩ C) ×ˢ (B ∩ D)

                                                        Вправа 3.5.5

                                                        def Chapter3.SetTheory.Set.union_of_prod [SetTheory] :
                                                        Decidable (∀ (A B C D : Set), A ×ˢ B ∪ C ×ˢ D = (A ∪ C) ×ˢ (B ∪ D))
                                                        Equations
                                                        Instances For
                                                          def Chapter3.SetTheory.Set.diff_of_prod [SetTheory] :
                                                          Decidable (∀ (A B C D : Set), A ×ˢ B \ C ×ˢ D = (A \ C) ×ˢ (B \ D))
                                                          Equations
                                                          Instances For
                                                            theorem Chapter3.SetTheory.Set.prod_subset_prod [SetTheory] {A B C D : Set} (hA : A ≠ ∅) (hB : B ≠ ∅) (hC : C ≠ ∅) (hD : D ≠ ∅) :
                                                            A ×ˢ B ⊆ C ×ˢ D ↔ A ⊆ C ∧ B ⊆ D

                                                            Вправа 3.5.6.

                                                            theorem Chapter3.SetTheory.Set.direct_sum [SetTheory] {X Y Z : Set} (f : Z.toSubtype → X.toSubtype) (g : Z.toSubtype → Y.toSubtype) :
                                                            ∃! h : Z.toSubtype → (X ×ˢ Y).toSubtype, fst ∘ h = f ∧ snd ∘ h = g

                                                            Вправа 3.5.7

                                                            @[simp]
                                                            theorem Chapter3.SetTheory.Set.iProd_empty_iff [SetTheory] {n : ℕ} {X : (Fin n).toSubtype → Set} :
                                                            iProd X = ∅ ↔ ∃ (i : (Fin n).toSubtype), X i = ∅

                                                            Вправа 3.5.8

                                                            theorem Chapter3.SetTheory.Set.iUnion_inter_iUnion [SetTheory] {I J : Set} (A : I.toSubtype → Set) (B : J.toSubtype → Set) :
                                                            I.iUnion A ∩ J.iUnion B = (I ×ˢ J).iUnion fun (p : (I ×ˢ J).toSubtype) => A (fst p) ∩ B (snd p)

                                                            Вправа 3.5.9

                                                            @[reducible, inline]
                                                            Equations
                                                            Instances For
                                                              theorem Chapter3.SetTheory.Set.graph_inj [SetTheory] {X Y : Set} (f f' : X.toSubtype → Y.toSubtype) :
                                                              graph f = graph f' ↔ f = f'

                                                              Вправа 3.5.10

                                                              theorem Chapter3.SetTheory.Set.is_graph [SetTheory] {X Y G : Set} (hG : G ⊆ X ×ˢ Y) (hvert : ∀ (x : X.toSubtype), ∃! y : Y.toSubtype, OrderedPair.toObject { fst := ↑x, snd := ↑y } ∈ G) :
                                                              theorem Chapter3.SetTheory.Set.powerset_axiom' [SetTheory] (X Y : Set) :
                                                              ∃! S : Set, ∀ (F : Object), F ∈ S ↔ ∃ (f : Y.toSubtype → X.toSubtype), ↑f = F

                                                              Вправа 3.5.11. Це тривіально випливає з SetTheory.Set.powerset_axiom, але вправа полягає у виведенні твердження з SetTheory.Set.exists_powerset.

                                                              theorem Chapter3.SetTheory.Set.recursion [SetTheory] (X : Set) (f : nat.toSubtype → X.toSubtype → X.toSubtype) (c : X.toSubtype) :
                                                              ∃! a : nat.toSubtype → X.toSubtype, a 0 = c ∧ ∀ (n : ℕ), a ↑(n + 1) = f (↑n) (a ↑n)

                                                              Вправа 3.5.12, з включеними помилками з веб-сайту

                                                              theorem Chapter3.SetTheory.Set.nat_unique [SetTheory] (nat' : Set) (zero : nat'.toSubtype) (succ : nat'.toSubtype → nat'.toSubtype) (succ_ne : ∀ (n : nat'.toSubtype), succ n ≠ zero) (succ_of_ne : ∀ (n m : nat'.toSubtype), n ≠ m → succ n ≠ succ m) (ind : ∀ (P : nat'.toSubtype → Prop), P zero → (∀ (n : nat'.toSubtype), P n → P (succ n)) → ∀ (n : nat'.toSubtype), P n) :
                                                              ∃! f : nat.toSubtype → nat'.toSubtype, Function.Bijective f ∧ f 0 = zero ∧ ∀ (n : nat.toSubtype) (n' : nat'.toSubtype), f n = n' ↔ f ↑(nat_equiv.symm n + 1) = succ n'

                                                              Вправа 3.5.13