逐步主鏈
S01 · definition
操作前
g\circ f
操作後
(g\circ f)(x)=g(f(x)),\ \ x\in D=\{x\in\mathrm{dom}(f)\mid f(x)\in\mathrm{dom}(g)\}條件:無
規則:mko_comp_def · 依賴:G3, mko_comp_def
葉節點依據:mko_comp_def + composition_def
依 MKO 寫出合成:先算內層 f(x),再把結果交給 g。記號 g∘f 中 g 寫在左邊,但求值時 f 先做;書寫順序與求值順序相反。因為 f 與 g 的定義域不同,只有使中間值 f(x) 落在 g 定義域內的 x 才是允許輸入。
S02 · equivalent
操作前
D=\{x\in\mathrm{dom}(f)\mid f(x)\in\mathrm{dom}(g)\}操作後
D=\{x\in\mathbb{R}\mid x-3\geq 0\}條件:無
規則:set_builder · 依賴:S01, G1, G2, set_builder
葉節點依據:set_builder + def_unfold
代入 dom(f)=ℝ、f(x)=x−3 與 dom(g)={u ∣ u≥0}:條件 f(x)∈dom(g) 就是 x−3≥0。兩種寫法對每個 x 給出同樣的條件,所以集合相同。
S03 · equivalent
操作前
x-3\geq 0
操作後
x\geq 3
條件:無
規則:L_shift3 · 依賴:S02, L_shift3
葉節點依據:L_shift3
依引理 L_shift3,x−3≥0 ⇔ x≥3。引理在 S03.1 證明。
S04 · equivalent
操作前
D=\{x\in\mathbb{R}\mid x-3\geq 0\}操作後
D=[3,\infty)
條件:無
規則:set_extensionality · 依賴:S02, S03, set_extensionality
葉節點依據:set_extensionality + set_builder
依 S03,集合條件 x−3≥0 可換成等價的 x≥3,所以 D={x∈ℝ ∣ x≥3}=[3,∞)。D 比 dom(f)=ℝ 小:f 能處理所有實數,但 g 只能接受非負的中間值。
S05 · implies
操作前
x\in D
操作後
(g\circ f)(x)=\sqrt{x-3},\ \ g\circ f:[3,\infty)\to\mathbb{R}條件:x\geq 3
規則:composition_def · 依賴:S01, S04, composition_def
葉節點依據:composition_def + function_def
對 x∈D,f(x)=x−3∈dom(g),所以 g(f(x))=√(x−3) 有定義。限制在 D 上,f 是 D→[0,∞) 的總函數,g 是 [0,∞)→ℝ 的總函數,中間型別相容,依 composition_def 得到總函數 g∘f:[3,∞)→ℝ。
S06 · implies
操作前
x=7
操作後
f(7)=7-3=4\in\mathrm{dom}(g),\ \ 7\in D條件:無
規則:numeric_evaluation · 依賴:G1, S04
葉節點依據:numeric_evaluation + set_builder
求 (g∘f)(7) 先做內層:f(7)=7−3=4。4≥0,所以 4∈dom(g),也就是 7∈D(與 7≥3 一致)。中間值的定義域檢查必須在套用 g 之前完成。
S07 · implies
操作前
g(4)
操作後
(g\circ f)(7)=g(4)=\sqrt{4}=\sqrt{2^2}=2條件:2\geq 0
規則:L_sqrt_sq · 依賴:S06, G2, L_sqrt_sq
葉節點依據:L_sqrt_sq + numeric_evaluation
外層:g(4)=√4。因 4=2² 且 2≥0,依引理 L_sqrt_sq,√4=2。所以 (g∘f)(7)=2。
S08 · implies
操作前
x=4
操作後
(g\circ f)(4)=g(f(4))=g(1)=\sqrt{1}=1條件:4\geq 3
規則:composition_def · 依賴:G1, G2, S04, L_sqrt_sq
葉節點依據:composition_def + L_sqrt_sq + numeric_evaluation
4≥3,所以 4∈D。內層 f(4)=4−3=1,因 1≥0,故 1 在 dom(g) 中;外層 g(1)=√1=√(1²)=1(L_sqrt_sq,1≥0)。所以 (g∘f)(4)=1。
S09 · implies
操作前
x=1
操作後
f(1)=-2\notin\mathrm{dom}(g),\ \text{so}\ 1\notin D\ \text{and}\ (g\circ f)(1)\ \text{is undefined}條件:無
規則:set_builder · 依賴:G1, G2, S04, sqrt_def
葉節點依據:set_builder + sqrt_def + order_basics + numeric_evaluation
1 屬於 dom(f)=ℝ,f(1)=1−3=−2。但 −2<0,不在 dom(g) 中;依 sqrt_def,負數在實數中沒有平方根,g(−2) 沒有定義。所以 1∉D,(g∘f)(1) 沒有定義。只看 1∈dom(f) 而略過中間值的檢查是錯的。
S10 · implies
操作前
f\circ g
操作後
\{x\in\mathrm{dom}(g)\mid g(x)\in\mathrm{dom}(f)\}=[0,\infty),\ \ (f\circ g)(x)=\sqrt{x}-3條件:無
規則:composition_def · 依賴:G1, G2, composition_def, set_builder
葉節點依據:composition_def + set_builder + function_def
另一個順序 f∘g:先 g 後 f。g 的每個值 √x 都是實數,而 dom(f)=ℝ,所以條件 g(x)∈dom(f) 對每個 x∈[0,∞) 都成立,允許集合就是 [0,∞)。g 的陪域 ℝ 正是 f 的定義域,中間型別相容,f∘g:[0,∞)→ℝ 是總函數合成,(f∘g)(x)=√x−3。
S11 · implies
操作前
x=4
操作後
(f\circ g)(4)=f(g(4))=f(2)=2-3=-1
條件:4\geq 0
規則:composition_def · 依賴:S10, L_sqrt_sq
葉節點依據:composition_def + L_sqrt_sq + numeric_evaluation
4∈[0,∞)。內層 g(4)=√4=2(S07),外層 f(2)=2−3=−1。所以 (f∘g)(4)=−1。
S12 · implies
操作前
(g\circ f)(4)=1,\ (f\circ g)(4)=-1
操作後
g\circ f\neq f\circ g
條件:無
規則:function_def · 依賴:S04, S08, S10, S11, function_def
葉節點依據:function_def + numeric_evaluation
兩個函數相等需要定義域相同且每點的值相同。這裡兩者的定義域就不同([3,∞) 與 [0,∞)),而且在兩者共同的輸入 4 上,值 1≠−1。所以 g∘f≠f∘g:合成一般不交換。
S13 · implies
操作前
f(4)\cdot g(4)
操作後
f(4)\cdot g(4)=1\cdot 2=2\neq 1=(g\circ f)(4)
條件:無
規則:numeric_evaluation · 依賴:G1, G2, S07, S08
葉節點依據:numeric_evaluation
函數值的乘積 f(4)·g(4)=1·2=2,而合成 (g∘f)(4)=1。兩者不同,所以 g(f(x)) 不能改寫成 f(x)g(x);合成是把一個函數的輸出當作另一個函數的輸入,不是乘法。
S14 · implies
操作前
S04,\ S07,\ S08,\ S09,\ S12,\ S13
操作後
D=[3,\infty);\ (g\circ f)(7)=2,\ (g\circ f)(4)=1,\ 1\notin D;\ g\circ f\neq f\circ g;\ \exists x\in D:\ g(f(x))\neq f(x)g(x)
條件:無
規則:and_intro_elim · 依賴:S04, S07, S08, S09, S12, S13
葉節點依據:and_intro_elim
目標 (1) 由 S04,(2) 由 S07 到 S09,(3) 由 S10 到 S12,(4) 由 S13 完成。