{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-domain-codomain-range-01",
  "mko_id": "mko-domain-codomain-range",
  "title": {
    "zh-Hant": "定義域、陪域與值域：有限表格與 h(x)=x²+1 的值域",
    "en": "Domain, codomain and range: a finite table and the range of h(x)=x²+1"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-domain-codomain-range-01",
    "source": {
      "mko_id": "mko-domain-codomain-range",
      "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
      "sha256": "94e55c31535caafd763f4e1f805a7da15848c153c844351ec087944dea68d451",
      "english_sha256": "1e8e497051747d1f535313e0ce98ad171f6ab459c72f0d46af1d1592c667bb58"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "function_def",
      "image_preimage_def",
      "set_extensionality",
      "subset_def",
      "square_nonneg",
      "sqrt_def",
      "order_basics",
      "numeric_evaluation"
    ],
    "goal": {
      "zh-Hant": "(1) 設 A={−1,0,1,2}、B={0,1,2,3,4,5}、f(x)=x²+1：驗證 f:A→B 是總函數，求值域 f[A]，並說明 f[A]⊆B 但 f[A]≠B；(2) 說明輸出落在宣告陪域外或漏掉輸入的資料不是本條目的總函數；(3) 對 h:ℝ→ℝ、h(x)=x²+1，證明值域是 [1,∞)，不等於陪域 ℝ。",
      "en": "(1) With A={−1,0,1,2}, B={0,1,2,3,4,5} and f(x)=x²+1: verify that f:A→B is a total function, find the range f[A], and show f[A]⊆B but f[A]≠B; (2) explain why data with an output outside the declared codomain, or with a missing input, is not a total function in the sense of this entry; (3) for h:ℝ→ℝ, h(x)=x²+1, prove that the range is [1,∞), which differs from the codomain ℝ."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "A={−1,0,1,2}，B={0,1,2,3,4,5}，對 x∈A 令 f(x)=x²+1；宣告的函數是 f:A→B。",
          "en": "A={−1,0,1,2}, B={0,1,2,3,4,5}, and f(x)=x²+1 for x∈A; the declared function is f:A→B."
        }
      },
      {
        "id": "G2",
        "statement": {
          "zh-Hant": "h:ℝ→ℝ，h(x)=x²+1。",
          "en": "h:ℝ→ℝ with h(x)=x²+1."
        }
      },
      {
        "id": "G3",
        "statement": {
          "zh-Hant": "函數資料包含定義域、陪域與對應規則三者（MKO 假設 a1：A、B 已明示）。",
          "en": "The defining data of a function are its domain, codomain and rule (MKO assumption a1: A and B are stated explicitly)."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G3",
          "mko_dcr_def"
        ],
        "before_tex": "f:A\\to B",
        "after_tex": "\\text{domain}\\ A,\\ \\text{codomain}\\ B,\\ f[A]=\\{f(x)\\mid x\\in A\\}",
        "relation": "definition",
        "rule": "mko_dcr_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依 MKO：定義域 A 是允許的全部輸入，陪域 B 是宣告的輸出集合，值域 f[A] 只收集實際出現的輸出。三者是不同的東西：A、B 是宣告的一部分，f[A] 要計算出來。",
          "en": "By the MKO: the domain A is the set of all permitted inputs, the codomain B is the declared output set, and the range f[A] collects only the outputs that actually occur. These are three different things: A and B are part of the declaration, while f[A] has to be computed."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G3",
            "mko_dcr_def"
          ],
          "explanation": {
            "zh-Hant": "此步只寫出定義，不推出新事實。",
            "en": "This step only states the definitions and derives no new fact."
          }
        },
        "leaf_basis": "mko_dcr_def + image_preimage_def"
      },
      {
        "id": "S02",
        "uses": [
          "G1"
        ],
        "before_tex": "f(x)=x^2+1,\\ x\\in A",
        "after_tex": "f(-1)=2,\\ f(0)=1,\\ f(1)=2,\\ f(2)=5",
        "relation": "implies",
        "rule": "numeric_evaluation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "逐一計算 A 的四個輸入：(−1)²+1=2，0²+1=1，1²+1=2，2²+1=5。每個輸入代入規則恰得一個數。",
          "en": "Compute each of the four inputs of A: (−1)²+1=2, 0²+1=1, 1²+1=2, 2²+1=5. Each input substituted into the rule gives exactly one number."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "四個值可獨立重算（N1 到 N4）；A 的每個元素都算到，沒有遺漏。",
            "en": "The four values can be recomputed independently (N1 to N4); every element of A is covered."
          }
        },
        "leaf_basis": "numeric_evaluation + power_laws"
      },
      {
        "id": "S03",
        "uses": [
          "G1",
          "S02",
          "function_def"
        ],
        "before_tex": "f(-1)=2,\\ f(0)=1,\\ f(1)=2,\\ f(2)=5",
        "after_tex": "f:A\\to B\\ \\text{is a total function}",
        "relation": "implies",
        "rule": "function_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "總函數要求：A 的每個輸入都有輸出、每個輸入恰有一個輸出、輸出都在 B 中。S02 對四個輸入各給出一個值；2、1、2、5 都屬於 B={0,1,2,3,4,5}。所以 f:A→B 是總函數。",
          "en": "A total function needs: every input of A has an output, each input has exactly one output, and every output lies in B. S02 gives one value for each of the four inputs, and 2, 1, 2, 5 all belong to B={0,1,2,3,4,5}. So f:A→B is a total function."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S02",
            "function_def"
          ],
          "explanation": {
            "zh-Hant": "三個條件都必須逐輸入核對；S07、S08 是各缺一個條件的非實例。",
            "en": "All three conditions must be checked input by input; S07 and S08 are non-examples that each miss one condition."
          }
        },
        "leaf_basis": "function_def + set_builder"
      },
      {
        "id": "S04",
        "uses": [
          "S01",
          "S02",
          "set_extensionality"
        ],
        "before_tex": "f[A]=\\{f(-1),f(0),f(1),f(2)\\}",
        "after_tex": "f[A]=\\{2,1,2,5\\}=\\{1,2,5\\}",
        "relation": "equivalent",
        "rule": "set_extensionality",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依定義，值域是所有 f(x)（x∈A）組成的集合。代入 S02 的值得 {2,1,2,5}。集合只看有哪些元素，重複的 2 只算一次，順序也不重要，所以 f[A]={1,2,5}，有 3 個元素。",
          "en": "By definition the range is the set of all f(x) with x∈A. Substituting the values of S02 gives {2,1,2,5}. A set is determined by its elements, so the repeated 2 counts once and order is irrelevant: f[A]={1,2,5}, with 3 elements."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "set_extensionality",
            "image_preimage_def"
          ],
          "explanation": {
            "zh-Hant": "兩邊有相同的元素，依外延原則是同一個集合，雙向成立。",
            "en": "Both sides have the same elements, so by extensionality they are the same set, in both directions."
          }
        },
        "leaf_basis": "set_extensionality + image_preimage_def + eq_replace"
      },
      {
        "id": "S05",
        "uses": [
          "S03",
          "S04",
          "L_range_sub"
        ],
        "before_tex": "f[A]=\\{1,2,5\\}",
        "after_tex": "f[A]\\subseteq B",
        "relation": "theorem_application",
        "rule": "L_range_sub",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依引理 L_range_sub，總函數的值域一定是陪域的子集合；本例也可直接看到 1、2、5 都在 B 中。",
          "en": "By Lemma L_range_sub the range of a total function is always a subset of its codomain; here one can also see directly that 1, 2 and 5 are in B."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "L_range_sub",
            "S03"
          ],
          "explanation": {
            "zh-Hant": "引理需要 f 真的是 A→B 的總函數（S03）。只宣稱包含，不宣稱相等。",
            "en": "The lemma needs f to really be a total function A→B (S03). Only inclusion is claimed, not equality."
          }
        },
        "leaf_basis": "L_range_sub + subset_def"
      },
      {
        "id": "S05.1",
        "uses": [
          "image_preimage_def",
          "function_def",
          "subset_def"
        ],
        "before_tex": "y\\in f[A]",
        "after_tex": "y\\in B",
        "relation": "implies",
        "rule": "subset_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "任取 y∈f[A]。依值域的定義，存在 x∈A 使 y=f(x)（取這個 x 為新名字）。f 是 A→B 的總函數，所以 f(x)∈B，因此 y∈B。y 是任意的，依子集定義 f[A]⊆B。此子步證得引理 L_range_sub。",
          "en": "Take any y∈f[A]. By the definition of the range there is x∈A with y=f(x) (name it with a fresh letter). Since f is a total function A→B, f(x)∈B, hence y∈B. As y was arbitrary, f[A]⊆B by the definition of subset. This sub-step proves Lemma L_range_sub."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "image_preimage_def",
            "function_def",
            "subset_def",
            "exists_elim"
          ],
          "explanation": {
            "zh-Hant": "只用到「輸出必須在陪域中」這一條；若允許輸出落在 B 外（如 S07），結論就失效。",
            "en": "Only the condition 'outputs must lie in the codomain' is used; if outputs outside B were allowed (as in S07), the conclusion would fail."
          }
        },
        "leaf_basis": "image_preimage_def + function_def + subset_def + exists_elim + forall_intro"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S04"
        ],
        "before_tex": "f[A]=\\{1,2,5\\},\\ B=\\{0,1,2,3,4,5\\}",
        "after_tex": "0\\in B\\setminus f[A],\\ \\text{so}\\ f[A]\\neq B;\\ B\\setminus f[A]=\\{0,3,4\\}",
        "relation": "implies",
        "rule": "set_extensionality",
        "conditions": [],
        "explanation": {
          "zh-Hant": "0 屬於 B，但 0 不是 1、2、5 中的任何一個，所以 0∉f[A]。兩個集合元素不同，依外延原則 f[A]≠B。同理 3、4 也在 B 中而不在值域中：B∖f[A]={0,3,4}。這就是 MKO 所說「值域未必等於 B」。",
          "en": "0 belongs to B but is none of 1, 2, 5, so 0∉f[A]. The two sets have different elements, so by extensionality f[A]≠B. Likewise 3 and 4 lie in B but not in the range: B∖f[A]={0,3,4}. This is the MKO's point that the range need not equal B."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S04",
            "set_extensionality",
            "set_operations_def"
          ],
          "explanation": {
            "zh-Hant": "證明不相等只需一個在 B 中而不在 f[A] 中的元素；這裡是 0。",
            "en": "Inequality needs only one element of B outside f[A]; here it is 0."
          }
        },
        "leaf_basis": "set_extensionality + set_operations_def"
      },
      {
        "id": "S07",
        "uses": [
          "S02",
          "function_def"
        ],
        "before_tex": "\\text{rule}\\ x^2+1\\ \\text{declared as}\\ A\\to B'=\\{0,1,2,3,4\\}",
        "after_tex": "f(2)=5\\notin B':\\ \\text{not a total function}\\ A\\to B'",
        "relation": "implies",
        "rule": "function_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "非實例一：同一規則若宣告陪域為 B′={0,1,2,3,4}，則輸入 2 的輸出 5 不在 B′ 中，違反「輸出必須落在陪域」，所以這份宣告不是總函數 A→B′。不能為了遷就輸出而事後擴大或忽略陪域。",
          "en": "Non-example one: if the same rule is declared with codomain B′={0,1,2,3,4}, the input 2 has output 5∉B′, violating 'outputs lie in the codomain', so this declaration is not a total function A→B′. The codomain may not be enlarged or ignored after the fact to accommodate an output."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S02",
            "function_def"
          ],
          "explanation": {
            "zh-Hant": "只需一個輸出落在宣告陪域外就足以否定；N5 核對 5>4。",
            "en": "One output outside the declared codomain is enough to refute it; N5 checks 5>4."
          }
        },
        "leaf_basis": "function_def + numeric_evaluation"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "function_def"
        ],
        "before_tex": "\\text{table}\\ \\{(-1,2),(0,1),(1,2)\\}\\ \\text{claimed as a function on}\\ A",
        "after_tex": "2\\in A\\ \\text{has no output: not total on}\\ A",
        "relation": "implies",
        "rule": "function_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "非實例二：只列出 −1、0、1 三個輸入的表格，被宣稱為 A 上的函數。但 2∈A 沒有輸出，違反「A 的每個輸入都有輸出」。用這張表算出的 {1,2} 不是 f[A]；它漏掉了 5。MKO 指出，不能以有未定義輸入的表格計算宣稱的總函數的值域。",
          "en": "Non-example two: a table listing only the inputs −1, 0 and 1 is claimed to be a function on A. But 2∈A has no output, violating 'every input of A has an output'. The set {1,2} read off this table is not f[A]; it misses 5. As the MKO says, the range of a claimed total function may not be computed from a table with undefined inputs."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "function_def",
            "G1"
          ],
          "explanation": {
            "zh-Hant": "只需一個沒有輸出的輸入就足以否定總函數。",
            "en": "A single input without an output suffices to refute totality."
          }
        },
        "leaf_basis": "function_def"
      },
      {
        "id": "S09",
        "uses": [
          "S02",
          "S04",
          "function_def"
        ],
        "before_tex": "f_C:A\\to C=\\{1,2,5\\},\\ f_C(x)=x^2+1",
        "after_tex": "f_C\\neq f\\ \\text{as function data},\\ f_C[A]=\\{1,2,5\\}=C",
        "relation": "implies",
        "rule": "function_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "同樣的規則改宣告陪域 C={1,2,5}：每個輸出 1、2、5 都在 C 中，所以 f_C:A→C 是總函數。依 function_def，兩個函數相等需要定義域、陪域都相同，而 B≠C，所以 f_C 與 f 是不同的函數資料，儘管值域都是 {1,2,5}。對 f_C 而言值域等於陪域（滿射），對 f 則不是。",
          "en": "Declare the same rule with codomain C={1,2,5}: every output 1, 2, 5 lies in C, so f_C:A→C is a total function. By function_def, equal functions need the same domain and codomain, and B≠C, so f_C and f have different defining data, although both have range {1,2,5}. For f_C the range equals the codomain (it is surjective); for f it does not."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "function_def",
            "S04",
            "injective_surjective_def"
          ],
          "explanation": {
            "zh-Hant": "結論依賴陪域是函數資料的一部分；只看輸出表無法判定陪域（MKO 第二段）。",
            "en": "The conclusion depends on the codomain being part of a function's defining data; the codomain cannot be read off an output table (second paragraph of the MKO)."
          }
        },
        "leaf_basis": "function_def + injective_surjective_def"
      },
      {
        "id": "S10",
        "uses": [
          "G2",
          "square_nonneg",
          "L_shift"
        ],
        "before_tex": "x\\in\\mathbb{R}",
        "after_tex": "h(x)=x^2+1\\geq 1,\\ \\text{so}\\ h[\\mathbb{R}]\\subseteq[1,\\infty)",
        "relation": "implies",
        "rule": "L_shift",
        "conditions": [],
        "explanation": {
          "zh-Hant": "h 在每個實數都有唯一的實數值 x²+1，所以 h:ℝ→ℝ 是總函數。任取 x∈ℝ：依 square_nonneg，x²≥0；依引理 L_shift（u=x²），x²+1≥1。所以每個輸出都在 [1,∞) 中，即 h[ℝ]⊆[1,∞)。",
          "en": "h has a unique real value x²+1 at every real x, so h:ℝ→ℝ is a total function. Take any x∈ℝ: by square_nonneg, x²≥0, and by Lemma L_shift with u=x², x²+1≥1. So every output lies in [1,∞), that is h[ℝ]⊆[1,∞)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "square_nonneg",
            "L_shift",
            "subset_def"
          ],
          "explanation": {
            "zh-Hant": "這是 ⊆ 方向；⊇ 方向（每個 y≥1 都被取到）另需 S11、S12。",
            "en": "This is the ⊆ direction; the ⊇ direction (every y≥1 is attained) needs S11 and S12."
          }
        },
        "leaf_basis": "square_nonneg + L_shift + subset_def + forall_intro"
      },
      {
        "id": "S10.1",
        "uses": [
          "order_basics"
        ],
        "before_tex": "u\\geq 0",
        "after_tex": "u+1\\geq 1",
        "relation": "equivalent",
        "rule": "order_basics",
        "conditions": [],
        "explanation": {
          "zh-Hant": "⇒：兩邊同加 1（u>0 時嚴格不等號保持，u=0 時得 1=1）。⇐：兩邊同加 −1，(u+1)+(−1)=u，1+(−1)=0。此子步證得引理 L_shift。",
          "en": "⇒: add 1 to both sides (a strict inequality is kept when u>0, and u=0 gives 1=1). ⇐: add −1 to both sides, using (u+1)+(−1)=u and 1+(−1)=0. This sub-step proves Lemma L_shift."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "order_basics",
            "add_inverse"
          ],
          "explanation": {
            "zh-Hant": "加 1 與加 −1 互為反運算，對任何實數都可做，所以雙向成立（N9）。",
            "en": "Adding 1 and adding −1 undo each other and are possible for every real, so the step holds both ways (N9)."
          }
        },
        "leaf_basis": "order_basics + add_inverse + add_assoc + add_zero"
      },
      {
        "id": "S11",
        "uses": [
          "L_shift",
          "sqrt_def",
          "interval_def"
        ],
        "before_tex": "y\\in[1,\\infty)",
        "after_tex": "y-1\\geq 0,\\ \\ t=\\sqrt{y-1}\\in\\mathbb{R},\\ \\ t^2=y-1",
        "relation": "implies",
        "rule": "sqrt_def",
        "conditions": [
          "y-1\\geq 0"
        ],
        "explanation": {
          "zh-Hant": "任取 y∈[1,∞)，即 y≥1。依 L_shift（u=y−1，且 (y−1)+1=y），y−1≥0。非負實數有主平方根，所以 t=√(y−1) 是實數且 t²=y−1。",
          "en": "Take any y∈[1,∞), that is y≥1. By L_shift with u=y−1, using (y−1)+1=y, we get y−1≥0. A nonnegative real has a principal square root, so t=√(y−1) is a real number with t²=y−1."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "L_shift",
            "sqrt_def"
          ],
          "explanation": {
            "zh-Hant": "開平方需要 y−1≥0；若 y<1，y−1<0 在實數中沒有平方根，這正對應 y 不在值域中。",
            "en": "Taking the square root needs y−1≥0; if y<1 then y−1<0 has no real square root, which matches y not being in the range."
          }
        },
        "leaf_basis": "sqrt_def + L_shift + interval_def"
      },
      {
        "id": "S12",
        "uses": [
          "G2",
          "S11",
          "image_preimage_def"
        ],
        "before_tex": "t^2=y-1",
        "after_tex": "h(t)=(y-1)+1=y,\\ \\text{so}\\ y\\in h[\\mathbb{R}]",
        "relation": "implies",
        "rule": "image_preimage_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "h(t)=t²+1=(y−1)+1=y。t 是實數，所以 y 是某個輸入的輸出，依值域定義 y∈h[ℝ]。y 是 [1,∞) 中任意的元素，所以 [1,∞)⊆h[ℝ]。例如 y=10 時 t=√9=3，h(3)=10。",
          "en": "h(t)=t²+1=(y−1)+1=y. Since t is real, y is the output of some input, so y∈h[ℝ] by the definition of the range. As y was an arbitrary element of [1,∞), [1,∞)⊆h[ℝ]. For example y=10 gives t=√9=3 and h(3)=10."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S11",
            "image_preimage_def",
            "exists_intro",
            "forall_intro"
          ],
          "explanation": {
            "zh-Hant": "每個 y 只需找到一個輸入；不宣稱輸入唯一（−t 也給出 y）。",
            "en": "Each y needs only one input; the input is not claimed to be unique (−t also gives y)."
          }
        },
        "leaf_basis": "image_preimage_def + exists_intro + forall_intro + eq_replace"
      },
      {
        "id": "S13",
        "uses": [
          "S10",
          "S12",
          "set_extensionality"
        ],
        "before_tex": "h[\\mathbb{R}]\\subseteq[1,\\infty),\\ [1,\\infty)\\subseteq h[\\mathbb{R}]",
        "after_tex": "h[\\mathbb{R}]=[1,\\infty)",
        "relation": "implies",
        "rule": "set_extensionality",
        "conditions": [],
        "explanation": {
          "zh-Hant": "兩個方向的包含都已證明（S10、S12），依外延原則 h[ℝ]=[1,∞)。",
          "en": "Both inclusions are proved (S10, S12), so by extensionality h[ℝ]=[1,∞)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S10",
            "S12",
            "set_extensionality"
          ],
          "explanation": {
            "zh-Hant": "集合相等需要兩個方向；只有 S10 只能說值域包含於 [1,∞)。",
            "en": "Set equality needs both directions; S10 alone would show only that the range is contained in [1,∞)."
          }
        },
        "leaf_basis": "set_extensionality"
      },
      {
        "id": "S14",
        "uses": [
          "S13",
          "interval_def"
        ],
        "before_tex": "h[\\mathbb{R}]=[1,\\infty)",
        "after_tex": "0\\in\\mathbb{R}\\setminus h[\\mathbb{R}],\\ \\text{so}\\ h[\\mathbb{R}]\\neq\\mathbb{R}",
        "relation": "implies",
        "rule": "set_extensionality",
        "conditions": [],
        "explanation": {
          "zh-Hant": "0 是實數，但 0<1，所以 0∉[1,∞)=h[ℝ]；也就是方程 x²+1=0 沒有實數解。陪域 ℝ 與值域 [1,∞) 元素不同，所以不相等：宣告的陪域 ℝ 並不是實際輸出的集合。",
          "en": "0 is real but 0<1, so 0∉[1,∞)=h[ℝ]; that is, x²+1=0 has no real solution. The codomain ℝ and the range [1,∞) have different elements, so they are not equal: the declared codomain ℝ is not the set of actual outputs."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S13",
            "interval_def",
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "一個在陪域中而不在值域中的元素就足以說明兩者不等。",
            "en": "One element in the codomain but not in the range suffices to show they differ."
          }
        },
        "leaf_basis": "set_extensionality + interval_def + order_basics"
      },
      {
        "id": "S15",
        "uses": [
          "S03",
          "S04",
          "S05",
          "S06",
          "S07",
          "S08",
          "S13",
          "S14"
        ],
        "before_tex": "S03\\ \\text{to}\\ S08,\\ S13,\\ S14",
        "after_tex": "f[A]=\\{1,2,5\\}\\subsetneq B;\\ \\ h[\\mathbb{R}]=[1,\\infty)\\neq\\mathbb{R}",
        "relation": "implies",
        "rule": "and_intro_elim",
        "conditions": [],
        "explanation": {
          "zh-Hant": "目標 (1) 由 S03 到 S06 完成，(2) 由 S07、S08 完成，(3) 由 S13、S14 完成。",
          "en": "Goal (1) is completed by S03 to S06, goal (2) by S07 and S08, and goal (3) by S13 and S14."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S03",
            "S04",
            "S05",
            "S06",
            "S07",
            "S08",
            "S13",
            "S14",
            "and_intro_elim"
          ],
          "explanation": {
            "zh-Hant": "目標 G：(1) 到 (3)。足夠條件 H：所列各步成立；H⇒G 由合取引入。H 由定義、引理與計算正向證成，沒有把 G 當作前提。",
            "en": "Goal G: (1) to (3). Sufficient condition H: the listed steps hold; H⇒G by conjunction introduction. H is proved forwards from the definitions, lemmas and computation; G is never used as a premise."
          }
        },
        "leaf_basis": "and_intro_elim"
      }
    ],
    "result": {
      "zh-Hant": "f:A→B（A={−1,0,1,2}、B={0,1,2,3,4,5}、f(x)=x²+1）是總函數，值域 f[A]={1,2,5}⊆B，但 0、3、4 不在值域中，所以 f[A]≠B。輸出 5 落在 {0,1,2,3,4} 外、或漏掉輸入 2 的資料，都不是本條目的總函數。h:ℝ→ℝ、h(x)=x²+1 的值域是 [1,∞)，不等於陪域 ℝ。",
      "en": "f:A→B with A={−1,0,1,2}, B={0,1,2,3,4,5} and f(x)=x²+1 is a total function with range f[A]={1,2,5}⊆B, but 0, 3 and 4 are not in the range, so f[A]≠B. Data with output 5 outside {0,1,2,3,4}, or missing the input 2, is not a total function in this entry's sense. The range of h:ℝ→ℝ, h(x)=x²+1, is [1,∞), which is not the codomain ℝ."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "f:A→B 的值域是 B={0,1,2,3,4,5}",
          "en": "The range of f:A→B is B={0,1,2,3,4,5}"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "f[A]={1,2,5}；0、3、4 不是任何輸入的輸出。",
          "en": "f[A]={1,2,5}; 0, 3 and 4 are not outputs of any input."
        }
      },
      {
        "claim": {
          "zh-Hant": "h:ℝ→ℝ、h(x)=x²+1 的值域是 ℝ",
          "en": "The range of h:ℝ→ℝ, h(x)=x²+1, is ℝ"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "x²+1≥1，所以 0 不在值域中；值域是 [1,∞)。",
          "en": "x²+1≥1, so 0 is not in the range; the range is [1,∞)."
        }
      },
      {
        "claim": {
          "zh-Hant": "只列 −1、0、1 的表格是 A 上的總函數，值域為 {1,2}",
          "en": "The table listing only −1, 0, 1 is a total function on A with range {1,2}"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "2∈A 沒有輸出；真正的 f[A] 還含 5。",
          "en": "2∈A has no output; the true f[A] also contains 5."
        }
      },
      {
        "claim": {
          "zh-Hant": "規則 x²+1 可宣告為 A→{0,1,2,3,4} 的總函數",
          "en": "The rule x²+1 can be declared as a total function A→{0,1,2,3,4}"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "f(2)=5 不在 {0,1,2,3,4} 中。",
          "en": "f(2)=5 is not in {0,1,2,3,4}."
        }
      },
      {
        "claim": {
          "zh-Hant": "值域 {2,1,2,5} 有四個元素",
          "en": "The range {2,1,2,5} has four elements"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "重複輸出只算一次；f[A]={1,2,5} 有 3 個元素。",
          "en": "Repeated outputs count once; f[A]={1,2,5} has 3 elements."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "function_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "函數：f:A→B 對每個 a∈A 指定恰好一個 f(a)∈B。兩函數相等 ⇔ 定義域、對應域相同且對每個 a 都有相同值。",
          "en": "Function: f:A→B assigns to each a∈A exactly one f(a)∈B. Two functions are equal ⇔ they have the same domain and codomain and agree at every a."
        }
      },
      {
        "id": "image_preimage_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "像與原像：f(S)={f(a) ∣ a∈S}；f⁻¹(T)={a∈A ∣ f(a)∈T}。原像記號不預設 f 有反函數。",
          "en": "Image and preimage: f(S)={f(a) ∣ a∈S}; f⁻¹(T)={a∈A ∣ f(a)∈T}. The preimage notation does not presuppose that f has an inverse."
        }
      },
      {
        "id": "set_extensionality",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "集合相等：A=B 當且僅當 A⊆B 且 B⊆A，即兩者有相同元素。",
          "en": "Set equality: A=B if and only if A⊆B and B⊆A, i.e. they have the same elements."
        }
      },
      {
        "id": "subset_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "子集：A⊆B 表示 A 的每個元素都是 B 的元素，即 ∀x (x∈A⇒x∈B)。",
          "en": "Subset: A⊆B means every element of A is an element of B, i.e. ∀x (x∈A⇒x∈B)."
        }
      },
      {
        "id": "square_nonneg",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "實數平方非負：對所有實數 u，u²≥0，且 u²=0 ⇔ u=0。",
          "en": "Squares are nonnegative: for every real u, u²≥0, and u²=0 ⇔ u=0."
        }
      },
      {
        "id": "sqrt_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "主平方根：對 a≥0，√a 是唯一滿足 b≥0 且 b²=a 的實數 b。負數在實數中沒有平方根。",
          "en": "Principal square root: for a≥0, √a is the unique real b with b≥0 and b²=a. Negative numbers have no real square root."
        }
      },
      {
        "id": "order_basics",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "實數的序：任兩數恰有 u<v、u=v、u>v 之一；u<v 且 v<w 推出 u<w；u<v 推出 u+w<v+w；u<v 且 w>0 推出 uw<vw；u<v 且 w<0 推出 uw>vw。",
          "en": "Order of the reals: exactly one of u<v, u=v, u>v holds; u<v and v<w give u<w; u<v gives u+w<v+w; u<v and w>0 give uw<vw; u<v and w<0 give uw>vw."
        }
      },
      {
        "id": "numeric_evaluation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "明確整數或有理數算式的精確求值；可以獨立重算。",
          "en": "Exact evaluation of an explicit integer or rational expression; independently recomputable."
        }
      },
      {
        "id": "power_laws",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "整數指數律（底數非零或指數為正整數）：a^m·a^n=a^{m+n}，(a^m)^n=a^{mn}，(ab)^n=a^n b^n，a^0=1。",
          "en": "Integer exponent laws (base nonzero, or exponents positive integers): a^m·a^n=a^{m+n}, (a^m)^n=a^{mn}, (ab)^n=a^n b^n, a^0=1."
        }
      },
      {
        "id": "set_builder",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "集合建構式：x∈{y∈A ∣ P(y)} 當且僅當 x∈A 且 P(x)。",
          "en": "Set-builder notation: x∈{y∈A ∣ P(y)} if and only if x∈A and P(x)."
        }
      },
      {
        "id": "eq_replace",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "等值代換：命題中的一個式子可換成與它相等的式子，命題的真假不變。",
          "en": "Replacement of equals: an expression inside a statement may be replaced by an equal expression without changing whether the statement is true."
        }
      },
      {
        "id": "exists_elim",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "∃消去：由 ∃x∈D, P(x)，可取一個新名字 a 表示某個滿足 P(a) 的元素；只要最後結論不含 a，就可用 a 推理。",
          "en": "∃-elimination: from ∃x∈D, P(x) we may name some element a with P(a) by a fresh name; reasoning with a is allowed as long as the final conclusion does not mention a."
        }
      },
      {
        "id": "forall_intro",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "∀引入（全稱推廣）：若某命題對一個「任意的」元素 x 證成，而證明沒有對 x 加任何額外假設，則它對論域中所有 x 成立。",
          "en": "∀-introduction (generalization): if a statement is proved for an arbitrary element x, with no extra assumption on x, it holds for every x in the domain."
        }
      },
      {
        "id": "set_operations_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "集合運算：x∈A∪B ⇔ x∈A 或 x∈B；x∈A∩B ⇔ x∈A 且 x∈B；x∈A∖B ⇔ x∈A 且 x∉B；在全集 U 中 Aᶜ=U∖A。",
          "en": "Set operations: x∈A∪B ⇔ x∈A or x∈B; x∈A∩B ⇔ x∈A and x∈B; x∈A∖B ⇔ x∈A and x∉B; in a universe U, Aᶜ=U∖A."
        }
      },
      {
        "id": "injective_surjective_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "單射：f(a)=f(a′) ⇒ a=a′。滿射：每個 b∈B 都有 a∈A 使 f(a)=b。雙射：既單又滿，此時有唯一反函數 f⁻¹ 使 f⁻¹∘f=id_A、f∘f⁻¹=id_B。",
          "en": "Injective: f(a)=f(a′) ⇒ a=a′. Surjective: every b∈B has some a∈A with f(a)=b. Bijective: both; then there is a unique inverse f⁻¹ with f⁻¹∘f=id_A and f∘f⁻¹=id_B."
        }
      },
      {
        "id": "add_inverse",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "加法反元素：每個 u 都有 −u，使 u+(−u)=0；u−v 定義為 u+(−v)。",
          "en": "Additive inverse: every u has −u with u+(−u)=0; u−v means u+(−v)."
        }
      },
      {
        "id": "add_assoc",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "加法結合律：(u+v)+w=u+(v+w)。",
          "en": "Associativity of addition: (u+v)+w=u+(v+w)."
        }
      },
      {
        "id": "add_zero",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "加法單位元：u+0=u。",
          "en": "Additive identity: u+0=u."
        }
      },
      {
        "id": "exists_intro",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "∃引入：若找到 a∈D 使 P(a) 成立，則 ∃x∈D, P(x)。",
          "en": "∃-introduction: if some a∈D satisfies P(a), then ∃x∈D, P(x)."
        }
      },
      {
        "id": "and_intro_elim",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "合取：由 P 與 Q 得 P∧Q；由 P∧Q 可分別得 P 與 Q。",
          "en": "Conjunction: from P and Q infer P∧Q; from P∧Q infer P and infer Q."
        }
      },
      {
        "id": "mko_dcr_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-domain-codomain-range",
          "sha256": "94e55c31535caafd763f4e1f805a7da15848c153c844351ec087944dea68d451",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "對總函數 f:A→B，A 是允許的全部輸入，B 是宣告的輸出集合；值域 f[A]={f(x):x∈A} 是 B 的子集合，未必等於 B。",
          "en": "For a total function f:A→B, A is the set of all permitted inputs and B is the declared output set. The range f[A]={f(x):x∈A} is a subset of B and need not equal B."
        }
      },
      {
        "id": "interval_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "[1,∞)={y∈ℝ ∣ y≥1}。",
          "en": "[1,∞)={y∈ℝ ∣ y≥1}."
        }
      },
      {
        "id": "L_range_sub",
        "kind": "lemma",
        "proved_in": [
          "S05.1"
        ],
        "statement": {
          "zh-Hant": "對任何總函數 f:A→B，f[A]⊆B。",
          "en": "For every total function f:A→B, f[A]⊆B."
        }
      },
      {
        "id": "L_shift",
        "kind": "lemma",
        "proved_in": [
          "S10.1"
        ],
        "statement": {
          "zh-Hant": "對實數 u：u≥0 ⇔ u+1≥1。",
          "en": "For a real u: u≥0 ⇔ u+1≥1."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N1",
        "step": "S02",
        "lhs": "(-1)**2+1",
        "rhs": "2"
      },
      {
        "id": "N2",
        "step": "S02",
        "lhs": "0**2+1",
        "rhs": "1"
      },
      {
        "id": "N3",
        "step": "S02",
        "lhs": "1**2+1",
        "rhs": "2"
      },
      {
        "id": "N4",
        "step": "S02",
        "lhs": "2**2+1",
        "rhs": "5"
      },
      {
        "id": "N5",
        "step": "S07",
        "lhs": "2**2+1",
        "relation": ">",
        "rhs": "4"
      },
      {
        "id": "N6",
        "step": "S10",
        "vars": [
          "x"
        ],
        "range": [
          -20,
          20
        ],
        "lhs": "x**2+1",
        "relation": ">=",
        "rhs": "1"
      },
      {
        "id": "N7",
        "step": "S12",
        "vars": [
          "y"
        ],
        "degree": 1,
        "lhs": "(y-1)+1",
        "rhs": "y"
      },
      {
        "id": "N8",
        "step": "S14",
        "lhs": "0",
        "relation": "<",
        "rhs": "1"
      },
      {
        "id": "N9",
        "step": "S10.1",
        "vars": [
          "u"
        ],
        "degree": 1,
        "lhs": "(u+1)-1",
        "rhs": "u"
      },
      {
        "id": "N10",
        "step": "S12",
        "lhs": "3**2+1",
        "rhs": "10"
      },
      {
        "id": "N11",
        "step": "S12",
        "lhs": "3**2",
        "rhs": "10-1"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "在 MKO 的範圍內：明示 A、B 的總函數（假設 a1）。實數部分只用平方非負與主平方根的存在。不處理部分函數、反函數、集合論基礎或一般的值域求法；不改動 canonical MKO 或英文 edition。",
      "en": "Inside the MKO's scope: total functions with explicitly stated A and B (assumption a1). The real part uses only that squares are nonnegative and that principal square roots exist. It does not treat partial functions, inverse functions, set-theoretic foundations or general methods for finding ranges, and does not change the canonical MKO or its English edition."
    },
    "md_symbols": [
      [
        "A,\\ B",
        "定義域與陪域",
        "domain and codomain"
      ],
      [
        "f[A]",
        "值域 {f(x) ∣ x∈A}",
        "the range {f(x) ∣ x∈A}"
      ],
      [
        "h",
        "實函數 h(x)=x²+1",
        "the real function h(x)=x²+1"
      ],
      [
        "[1,\\infty)",
        "{y∈ℝ ∣ y≥1}",
        "{y∈ℝ ∣ y≥1}"
      ],
      [
        "\\sqrt{u}",
        "u≥0 的主平方根",
        "the principal square root of u≥0"
      ]
    ],
    "md_error_controls": [
      {
        "title": "陪域不是值域 / The codomain is not the range",
        "zh": "MKO 指出的第一個誤解是把陪域當成實際值域。f 的陪域 B 有 6 個元素，值域只有 {1,2,5}；h 的陪域是 ℝ，值域卻是 [1,∞)。陪域是宣告「輸出必須落在哪裡」，值域要從實際輸出算出來，兩者只有在滿射時才相等。",
        "en": "The first mistake named by the MKO is taking the codomain to be the actual range. The codomain B of f has 6 elements, but the range is only {1,2,5}; the codomain of h is ℝ, but the range is [1,∞). The codomain declares where outputs must land; the range is computed from the actual outputs, and the two coincide only for a surjection."
      },
      {
        "title": "先確認是總函數，再談值域 / Check totality before computing a range",
        "zh": "MKO 指出的第二個誤解是以有未定義輸入的表格計算宣稱的總函數的值域。漏掉輸入 2 的表格會給出 {1,2}，少了 5；輸出 5 落在宣告的 {0,1,2,3,4} 之外，則那份宣告根本不是函數。先逐輸入核對三個條件（S03），值域才有意義。",
        "en": "The second mistake named by the MKO is computing the range of a claimed total function from a table with undefined inputs. A table missing the input 2 gives {1,2} and loses 5; an output 5 outside the declared {0,1,2,3,4} means the declaration is not a function at all. Check the three conditions input by input first (S03); only then does the range make sense."
      },
      {
        "title": "同樣的對應、不同的陪域是不同的函數資料 / Changing the codomain changes the function's defining data",
        "zh": "f:A→B 與 f_C:A→{1,2,5} 對每個輸入給出相同的值，值域也相同，但陪域不同，所以是不同的函數資料；前者不是滿射，後者是。只看輸出表無法得知陪域（MKO 第二段）。",
        "en": "f:A→B and f_C:A→{1,2,5} give the same value at every input and have the same range, but their codomains differ, so they have different defining data; the first is not surjective and the second is. The codomain cannot be read off an output table (second paragraph of the MKO)."
      }
    ],
    "md_open_items": [
      {
        "zh-Hant": "N6 是 x 從 −20 到 20 的整數點上的有限核對，只支持這些點；一般結論 x²+1≥1 來自 S10 的論證。",
        "en": "N6 is a finite check at the integers x from −20 to 20 and supports only those points; the general fact x²+1≥1 comes from the argument of S10."
      }
    ]
  },
  "revision": {
    "id": "production-20261019-adopted-96",
    "source_commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
    "adopted_source_sha256": "8bda61e820ecd87d075b98c8407ebfb669c073e33b1825b598e48d1e4176933c",
    "original_source_sha256": "8bda61e820ecd87d075b98c8407ebfb669c073e33b1825b598e48d1e4176933c",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "independent_AI_concurrence": "NOT_MEASURED",
    "issue_ids": [],
    "scope": "Owner-adopted natural-language teaching guide; not a formal proof, canonical MKO rewrite or evidence-status promotion."
  }
}
