跳到正文
The Lumenary
探奇小径可选 · 从不评分起点 Functions

The product, by its maps

本页尚未翻译成简体中文,因此以English显示。

帮助翻译 →
1

问题

Can you describe the set of pairs A×BA \times B without ever looking inside it — only by how functions go into it?

先动手做实验,再往下读。探索没有错误的方式。

2

实验

通过映射来认识积

选择映射 f : Z → A 和 g : Z → B。然后试着构造一个映射 h : Z → A × B,使它的投影恰好是 f 和 g。

f : Z → A

g : Z → B

⟨f, g⟩ : Z → A × B

p ↦ (红, 2) q ↦ (蓝, 2) r ↦ (红, 3)

轮到你了:点击格子来选择 h(p)、h(q)、h(r)。

A × B123
红
蓝
3

提示(如果你需要)

    4

    这是怎么回事

    这是怎么回事

    The product A×BA \times B comes with two projections, π1(a,b)=a\pi_1(a, b) = a and π2(a,b)=b\pi_2(a, b) = b. Given any set ZZ and any functions f:Z→Af : Z \to A and g:Z→Bg : Z \to B, there is a function

    ⟨f,g⟩:Z→A×B,z↦(f(z),g(z)),\langle f, g \rangle : Z \to A \times B, \qquad z \mapsto \big(f(z), g(z)\big),

    with π1∘⟨f,g⟩=f\pi_1 \circ \langle f, g \rangle = f and π2∘⟨f,g⟩=g\pi_2 \circ \langle f, g \rangle = g. The experiment shows more: it is the only such function. Any hh with π1∘h=f\pi_1 \circ h = f and π2∘h=g\pi_2 \circ h = g must send zz to the pair with first coordinate f(z)f(z) and second coordinate g(z)g(z) — that is, h=⟨f,g⟩h = \langle f, g \rangle.

    fst_comp_pairLean 4在此由基本事实证明已形式化验证
    /-- Following `pair f g` by the first projection gives back `f`. -/
    theorem fst_comp_pair (f : Z → A) (g : Z → B) : Prod.fst ∘ pair f g = f := rfl
    使用的公理: 未使用公理formal/Lumenary/Category.lean在 Lean 网页编辑器中试一试
    pair_uniqueLean 4在此由基本事实证明已形式化验证
    /-- **Universal property of the product, uniqueness half.** Any `h : Z → A × B` whose two
    coordinates are `f` and `g` *is* `pair f g`. Together with `fst_comp_pair` and
    `snd_comp_pair` (existence), this says: maps into `A × B` are the same thing as pairs of
    maps into `A` and into `B`. -/
    theorem pair_unique {f : Z → A} {g : Z → B} (h : Z → A × B)
        (hf : Prod.fst ∘ h = f) (hg : Prod.snd ∘ h = g) : h = pair f g := by
      funext z
      show h z = (f z, g z)
      rw [← hf, ← hg]
      -- The goal is now `h z = ((h z).1, (h z).2)`: every pair is built from its coordinates.
      rfl
    使用的公理: Quot.soundformal/Lumenary/Category.lean在 Lean 网页编辑器中试一试

    This "exists and is unique" statement is called the universal property of the product. It describes A×BA \times B entirely through its relationships with all other sets, without mentioning ordered pairs at all. In any category, an object with two arrows satisfying this property is called a product of AA and BB.

    The universal property pins the product down up to isomorphism: any two products of AA and BB are related by a unique isomorphism compatible with the projections — though they need not be literally equal. In the category of subsets of a set ordered by ⊆\subseteq, the product of AA and BB turns out to be A∩BA \cap B; in other categories products look different again. Universal properties like this one are the starting point for limits, adjunctions and the Yoneda lemma.

    已形式化验证 · 4 LeanAI 起草 · 等待人工审校
    5

    由此通向何处