People mountain people sea
P = {🧕,👩⚕️,👷,💂♀️,🕵️♂️,👨🌾,👩🍳,…}
belongs to (∈)
|
Z | M | S | G |
---|---|---|---|
姓 | 名 | surname | given name |
王 | 八旦 | Wong | Eight Eggs |
李 | 崔牛 | Li | Tsui Ngau |
牛 | 柏葉 | Ngau | Albert |
丁 | 一叮 | Ting | One |
李 | 鹵味 | Lee | Braised Dishes |
李 | 老竇 | Li | Lo Dull |
黃 | 土地 | Wong | Land |
李 | 老表 | Li | Low Bill |
李 | 腦細 | Lee | Old boss |
袁 | 尼姑 | Yuen | Nun |
容 | 海龜 | Yung | Hoi Kwai |
李 | 老友 | Lee | No Friend |
李 | 老板 | Lee | Low Ban |
任 | 何人 | Yam | Ho Yan |
歐陽 | 李 | Au Yeung | Lee |
容 | 海歸 | Yung | Hoi Kwai |
楊 | 祖 | Yeung | Joe |
麥 | 麥宋 | Mak | Mac Delivery |
狄 | 狄尼 | Dick | Disney |
Goal: To write a set of all persons with surname “李”
List:
L = {(李,崔牛), (李,鹵味), (李,老竇), (李,老表), (李,腦細), (李,老友), (李,老板)}
Condition:
L = {🏃♂️ ∈ P | 🏃♂️ with surname “李”}
ordered pair: (a,b)
(歐陽,李) ≠ (李,歐陽)
subset (⊆/⊂): L ⊆ P
L is contained in P.
ℹ️ I prefer using ‘⊆’.
superset (⊇/⊃): P ⊇ L
empty set (∅): a set that has no element.
Example: Save (Ctrl + S)
Ctrl | S | Ctrl + S |
---|---|---|
✓ | ✓ | ✓ |
✓ | ✗ | ✗ |
✗ | ✓ | ✗ |
✗ | ✗ | ✗ |
p | q | p ∧ q |
---|---|---|
T | T | T |
T | F | F |
F | T | F |
F | F | F |
Example: digit key (e.g. 1 in numpad or above alphabets)
numpad 1 | alphabet 1 | enter 1 |
---|---|---|
✓ | ✓ | ✓ |
✓ | ✗ | ✓ |
✗ | ✓ | ✓ |
✗ | ✗ | ✗ |
p | q | p ∨ q |
---|---|---|
T | T | T |
T | F | T |
F | T | T |
F | F | F |
entered Univ through JUPAS | attended secondary school | entered Univ through JUPAS ⟹ attended secondary school | example |
---|---|---|---|
✓ | ✓ | ✓ | me |
✓ | ✗ | ✗ | who? |
✗ | ✓ | ✓ | IB, GCE A Level |
✗ | ✗ | ✓ | 沈詩鈞 |
Promise: win Mark Six (六合彩) ⟹ treat you to dinner in a seafood restaurant
P | bought Mark Six? | bill on me? | promise kept? |
---|---|---|---|
👩🍳 | ✓ | ✓ | ✓ |
👮 | ✓ | ✗ | ✗ |
👨🌾 | ✗ | ✓ | ✓ |
👨💻 | ✗ | ✗ | ✓ |
👨💻: I don’t buy Mark Six, so I don’t have to spring for your dinner. 😛
set of persons who kept their promise = {🏃♂️ ∈ P | 🏃♂️ kept his/her promise} = {👩🍳, 👨🌾, 👨💻}
p | q | p ⟹ q |
---|---|---|
T | T | T |
T | F | F |
F | T | T |
F | F | T |
Recall:
Example: solve Sudoku (數獨) by guessing.
|
|
|
A function f: A → B is a subset of A × B such that
right-unique (用情專一) 🧑❤🦸♀️ ∧ 🧑❤🦹 ⇒ 🦸♀️ = 🦹 ∀ a ∈ A, ∀ b ∈ B, ∀ b’ ∈ B, ((a,b) ∈ f ∧ (a,b’) ∈ f) ⟹ b = b’ |
|
total (冇單身狗) ∀ 🧑 ∈ A, ∃ 👩 ∈ B : 🧑❤👩 ∀ a ∈ A, ∃ b ∈ B : (a,b) ∈ f |
The domain of f is A.
In the picture,
injective function (女版用情專一) 👩💻❤👩 ∧ 👷❤👩 ⇒ 👩💻 = 👷 ∀ a ∈ A, ∀ a’ ∈ A, ∀ b ∈ B, ((a,b) ∈ f ∧ (a’,b) ∈ f) ⟹ a = a’ 📝 To prove that a function f is injective, we assume that f(a) = f(a’), then we show that a = a’. |
|
surjective function (冇單身狗乸) ∀ 👩 ∈ B, ∃ 🧑 ∈ A : 🧑❤👩 ∀ b ∈ B, ∃ a ∈ A : (a,b) ∈ f 📝 To prove that a function f is surjective, we pick an arbitrary element b in the codomain B, then we try to find an element a in the domain A such that f(a) = b. |
A function is bijective is it is both injective and surjective.
surjective function (冇單身狗乸)
Given 👩 ∈ B. You can find a 🧑 ∈ A so that 🧑❤👩.
injective function (女版用情專一)
You can’t have two different 🧑 & 👦 such that 🧑❤👩 & 👦❤👩. They must been the same person. (represented by 🧑)
If we have a bijective function f : A → B defined by f : 🧑 ↦ 👩, then we can define an inverse function f⁻¹ : 👩 ↦ 🧑.
Space, Right Arrow or swipe left to move to next slide, click help below for more details
Comments and critiques
Field medalist Shing-Tung Yau (丘成桐) has emphasized the importance of asking good questions (not in the textbook).