{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-topological-continuity-01",
  "mko_id": "mko-topological-continuity",
  "title": {
    "zh-Hant": "拓撲連續映射：在有限空間中用逆像判定連續，並與開映射區分",
    "en": "Continuous maps between topological spaces: deciding continuity by preimages in finite spaces and separating it from openness"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-topological-continuity-01",
    "source": {
      "mko_id": "mko-topological-continuity",
      "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
      "sha256": "559fd18172a255b51e3254df6aeeb3ac6e1121e20bded6913c4cd34f3f1484b4",
      "english_sha256": "65994d02d53ec337b00d25dfa2fe2c05544fdad899b8343e0318ac1618409268"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "image_preimage_def",
      "function_def",
      "composition_def",
      "set_builder",
      "subset_def"
    ],
    "goal": {
      "zh-Hant": "設 X={1,2,3}，τX={∅,{1},{1,2},X}；Y={a,b}，τY={∅,{a},Y}。對三個以完整表格給出的映射 f（1↦a、2↦a、3↦b）、g（1↦a、2↦b、3↦a）、c（全部 ↦b），用逆像條件判定是否連續，並判定是否為開映射；證明連續映射的合成仍連續並以 q:Y→Z 驗證；最後數出 X→Y 的全部連續映射。",
      "en": "Let X={1,2,3} with τX={∅,{1},{1,2},X}, and Y={a,b} with τY={∅,{a},Y}. For three maps given by complete tables, f (1↦a, 2↦a, 3↦b), g (1↦a, 2↦b, 3↦a) and c (everything ↦b), decide continuity by the preimage condition and decide whether each is an open map; prove that a composite of continuous maps is continuous and check it with q:Y→Z; finally count all continuous maps X→Y."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "來源空間：X={1,2,3}，τX={∅,{1},{1,2},X}（MKO 假設 a1）。",
          "en": "Source space: X={1,2,3}, τX={∅,{1},{1,2},X} (MKO assumption a1)."
        }
      },
      {
        "id": "G2",
        "statement": {
          "zh-Hant": "目標空間：Y={a,b}，τY={∅,{a},Y}（MKO 假設 a1）。",
          "en": "Target space: Y={a,b}, τY={∅,{a},Y} (MKO assumption a1)."
        }
      },
      {
        "id": "G3",
        "statement": {
          "zh-Hant": "映射以完整總表給出（MKO 假設 a2）：f(1)=a、f(2)=a、f(3)=b；g(1)=a、g(2)=b、g(3)=a；c(1)=c(2)=c(3)=b。",
          "en": "Maps given by complete total tables (MKO assumption a2): f(1)=a, f(2)=a, f(3)=b; g(1)=a, g(2)=b, g(3)=a; c(1)=c(2)=c(3)=b."
        }
      },
      {
        "id": "G4",
        "statement": {
          "zh-Hant": "第三個空間 Z={0,1}，τZ={∅,{0},Z}，以及映射 q:Y→Z，q(a)=0、q(b)=1。",
          "en": "A third space Z={0,1} with τZ={∅,{0},Z}, and the map q:Y→Z with q(a)=0, q(b)=1."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1",
          "G2",
          "G4"
        ],
        "before_tex": "\\tau_X,\\ \\tau_Y,\\ \\tau_Z",
        "after_tex": "\\text{each is a topology on}\\ X,\\ Y,\\ Z",
        "relation": "theorem_application",
        "rule": "L_chain",
        "conditions": [
          "\\varnothing\\subseteq\\{1\\}\\subseteq\\{1,2\\}\\subseteq X",
          "\\varnothing\\subseteq\\{a\\}\\subseteq Y",
          "\\varnothing\\subseteq\\{0\\}\\subseteq Z"
        ],
        "explanation": {
          "zh-Hant": "三個族都是有限的、含空集與全集，而且成員排成一條包含鏈：∅⊆{1}⊆{1,2}⊆X，∅⊆{a}⊆Y，∅⊆{0}⊆Z。依引理 L_chain（在 S01.1 證明），三者都是拓撲。連續性的定義需要兩端都是拓撲空間，所以先確認這點。",
          "en": "All three families are finite, contain the empty set and the whole set, and their members form an inclusion chain: ∅⊆{1}⊆{1,2}⊆X, ∅⊆{a}⊆Y, ∅⊆{0}⊆Z. By Lemma L_chain (proved in S01.1) all three are topologies. The definition of continuity needs topological spaces at both ends, so this is checked first."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "G2",
            "G4",
            "L_chain"
          ],
          "explanation": {
            "zh-Hant": "需要三個族的完整列表與鏈條件；不是每個有限族都是拓撲，鏈只是一個充分條件。",
            "en": "It needs the complete lists of the three families and the chain condition; not every finite family is a topology, and being a chain is only a sufficient condition."
          }
        },
        "leaf_basis": "topology_def + subset_def"
      },
      {
        "id": "S01.1",
        "uses": [
          "nat_induction",
          "set_operations_def",
          "subset_def"
        ],
        "before_tex": "\\mathcal{F}\\ \\text{a finite chain},\\ \\varnothing,S\\in\\mathcal{F},\\ F\\subseteq\\mathcal{F}",
        "after_tex": "\\textstyle\\bigcup F\\in\\mathcal{F},\\ \\bigcap F\\in\\mathcal{F}",
        "relation": "implies",
        "rule": "nat_induction",
        "conditions": [],
        "explanation": {
          "zh-Hant": "族有限，所以每個子族 F 有限。F 為空時，∪F=∅ 與 ∩F=S 都在族中。F 非空時，對成員數歸納可知有限的全序子族有最大成員 M 與最小成員 m（新加入的成員與舊的最大、最小者可比較）。所有成員都包含於 M，且都包含 m，所以 ∪F=M、∩F=m，都在族中。故族對每個子族的聯集與交集封閉，是拓撲，證得 L_chain。",
          "en": "The family is finite, so every subfamily F is finite. If F is empty, ∪F=∅ and ∩F=S are in the family. If F is nonempty, induction on the number of members shows a finite chain has a largest member M and a smallest member m (a newly added member is comparable with the old largest and smallest). Every member is contained in M and contains m, so ∪F=M and ∩F=m, both in the family. Hence the family is closed under unions and intersections of every subfamily and is a topology, proving L_chain."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "nat_induction",
            "set_operations_def",
            "subset_def",
            "mko_topological_space_def"
          ],
          "explanation": {
            "zh-Hant": "需要有限性（最大最小元存在）與可比較性；兩者缺一，結論可能失敗。",
            "en": "It needs finiteness (so that largest and smallest members exist) and comparability; without either the conclusion can fail."
          }
        },
        "leaf_basis": "nat_induction + set_operations_def + subset_def"
      },
      {
        "id": "S02",
        "uses": [
          "S01",
          "G2",
          "mko_topological_continuity_def"
        ],
        "before_tex": "h:X\\to Y\\ \\text{continuous}",
        "after_tex": "h^{-1}[\\varnothing]\\in\\tau_X\\ \\wedge\\ h^{-1}[\\{a\\}]\\in\\tau_X\\ \\wedge\\ h^{-1}[Y]\\in\\tau_X",
        "relation": "equivalent",
        "rule": "finite_exhaustion",
        "conditions": [
          "\\tau_Y=\\{\\varnothing,\\{a\\},Y\\}"
        ],
        "explanation": {
          "zh-Hant": "展開 MKO 定義：h 連續當且僅當對每個 V∈τY，h⁻¹[V]∈τX。τY 只有三個成員，所以這個全稱條件等價於三個成員條件的合取。判定連續必須檢查目標的每一個開集，不能只抽查一個。",
          "en": "Unfold the MKO definition: h is continuous exactly when h⁻¹[V]∈τX for every V∈τY. τY has only three members, so the universal condition is equivalent to the conjunction of three membership conditions. Deciding continuity requires checking every open set of the target, not a sample."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "mko_topological_continuity_def",
            "finite_exhaustion"
          ],
          "explanation": {
            "zh-Hant": "有限全稱與合取互相等價，兩向都成立。條件是逆像屬於 τX，不是像屬於 τY。",
            "en": "A finite universal statement and the conjunction are equivalent both ways. The condition is about preimages lying in τX, not images lying in τY."
          }
        },
        "leaf_basis": "def_unfold + finite_exhaustion"
      },
      {
        "id": "S03",
        "uses": [
          "S02",
          "G1"
        ],
        "before_tex": "h^{-1}[\\varnothing]\\in\\tau_X\\wedge h^{-1}[\\{a\\}]\\in\\tau_X\\wedge h^{-1}[Y]\\in\\tau_X",
        "after_tex": "h\\ \\text{continuous}\\iff h^{-1}[\\{a\\}]\\in\\tau_X",
        "relation": "equivalent",
        "rule": "L_trivial_preimage",
        "conditions": [
          "h\\ \\text{total}"
        ],
        "explanation": {
          "zh-Hant": "依引理 L_trivial_preimage（在 S03.1 證明），任何總映射都有 h⁻¹[∅]=∅∈τX 與 h⁻¹[Y]=X∈τX，所以這兩個條件自動成立。唯一有資訊量的是 V={a}：h 連續當且僅當 h⁻¹[{a}]∈τX。這也說明為什麼只查 ∅ 或 Y 永遠查不出不連續。",
          "en": "By Lemma L_trivial_preimage (proved in S03.1), every total map has h⁻¹[∅]=∅∈τX and h⁻¹[Y]=X∈τX, so these two conditions hold automatically. The only informative one is V={a}: h is continuous exactly when h⁻¹[{a}]∈τX. This also explains why checking only ∅ or Y can never detect discontinuity."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "L_trivial_preimage",
            "mko_topological_space_def"
          ],
          "explanation": {
            "zh-Hant": "把兩個恆真的合取項去掉不改變真假，兩向成立；需要 ∅、X∈τX。",
            "en": "Dropping two always-true conjuncts does not change truth, so both directions hold; it needs ∅, X∈τX."
          }
        },
        "leaf_basis": "and_intro_elim + image_preimage_def + topology_def"
      },
      {
        "id": "S03.1",
        "uses": [
          "image_preimage_def",
          "function_def"
        ],
        "before_tex": "x\\in h^{-1}[\\varnothing],\\ x\\in h^{-1}[Y]",
        "after_tex": "h^{-1}[\\varnothing]=\\varnothing,\\ h^{-1}[Y]=X",
        "relation": "implies",
        "rule": "image_preimage_def",
        "conditions": [
          "h\\ \\text{total}"
        ],
        "explanation": {
          "zh-Hant": "x∈h⁻¹[∅] 表示 h(x)∈∅，對任何 x 都不成立，所以 h⁻¹[∅]=∅。x∈h⁻¹[Y] 表示 h(x)∈Y；因為 h 是總映射，每個 x∈X 都有 h(x)∈Y，所以 h⁻¹[Y]=X。證得 L_trivial_preimage。",
          "en": "x∈h⁻¹[∅] means h(x)∈∅, which holds for no x, so h⁻¹[∅]=∅. x∈h⁻¹[Y] means h(x)∈Y; since h is total, every x∈X has h(x)∈Y, so h⁻¹[Y]=X. This proves L_trivial_preimage."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "image_preimage_def",
            "function_def"
          ],
          "explanation": {
            "zh-Hant": "第二個等式需要 h 是總映射；若某些 x 沒有值，h⁻¹[Y] 會小於 X。",
            "en": "The second equality needs h to be total; if some x had no value, h⁻¹[Y] would be smaller than X."
          }
        },
        "leaf_basis": "image_preimage_def + function_def + set_extensionality"
      },
      {
        "id": "S04",
        "uses": [
          "G3"
        ],
        "before_tex": "f^{-1}[\\{a\\}]=\\{x\\in X\\mid f(x)=a\\}",
        "after_tex": "f^{-1}[\\{a\\}]=\\{1,2\\}",
        "relation": "implies",
        "rule": "image_preimage_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "逐列掃描 f 的完整表：f(1)=a 收入、f(2)=a 收入、f(3)=b 不收。逆像要收集所有映到 a 的來源元素，不能只找一個。",
          "en": "Scan every row of f's complete table: f(1)=a is collected, f(2)=a is collected, f(3)=b is not. The preimage must collect every source element mapping to a, not just one."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G3",
            "image_preimage_def",
            "set_builder"
          ],
          "explanation": {
            "zh-Hant": "需要完整表的三列都檢查過；漏掉一列就可能得到錯誤的逆像。",
            "en": "All three rows of the complete table must be checked; missing a row could give a wrong preimage."
          }
        },
        "leaf_basis": "image_preimage_def + set_builder"
      },
      {
        "id": "S05",
        "uses": [
          "S03",
          "S04",
          "G1",
          "G3",
          "open_map_def"
        ],
        "before_tex": "f^{-1}[\\{a\\}]=\\{1,2\\}",
        "after_tex": "\\{1,2\\}\\in\\tau_X\\ \\Rightarrow\\ f\\ \\text{continuous};\\quad f\\ \\text{is an open map}",
        "relation": "implies",
        "rule": "mko_topological_continuity_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "{1,2} 是 τX 的成員，依 S03 的等價，f 連續。三個開集的逆像分別是 ∅、{1,2}、X，全在 τX 中。 另對全部四個來源開集逐一取像：f[∅]=∅、f[{1}]={a}、f[{1,2}]={a}、f[X]=Y；四個像都屬於 τY，依開映射定義，f 也是開映射。",
          "en": "{1,2} is a member of τX, so by the equivalence of S03, f is continuous. The preimages of the three open sets are ∅, {1,2} and X, all in τX. Also take images of all four source open sets: f[∅]=∅, f[{1}]={a}, f[{1,2}]={a}, and f[X]=Y. All four images belong to τY, so f is also an open map by definition."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S03",
            "S04",
            "G1",
            "G3",
            "open_map_def"
          ],
          "explanation": {
            "zh-Hant": "目標：f 連續。依 S03 足夠且必要的條件是 f⁻¹[{a}]∈τX，由 S04 與 τX 的列表正向得到。 開映射部分另以 G3 的完整映射表驗全部四個來源開集之像，依 open_map_def 得證。",
            "en": "Goal: f is continuous. By S03 the necessary and sufficient condition is f⁻¹[{a}]∈τX, obtained forwards from S04 and the list of τX. The open-map part is separately established from the complete table G3 by checking images of all four source open sets, using open_map_def."
          }
        },
        "leaf_basis": "mko_topological_continuity_def + and_intro_elim + open_map_def"
      },
      {
        "id": "S06",
        "uses": [
          "G3"
        ],
        "before_tex": "g^{-1}[\\{a\\}]=\\{x\\in X\\mid g(x)=a\\}",
        "after_tex": "g^{-1}[\\{a\\}]=\\{1,3\\}",
        "relation": "implies",
        "rule": "image_preimage_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "掃描 g 的表：g(1)=a 收入、g(2)=b 不收、g(3)=a 收入，得 {1,3}。",
          "en": "Scan g's table: g(1)=a collected, g(2)=b not, g(3)=a collected, giving {1,3}."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G3",
            "image_preimage_def"
          ],
          "explanation": {
            "zh-Hant": "三列都已檢查。",
            "en": "All three rows are checked."
          }
        },
        "leaf_basis": "image_preimage_def + set_builder"
      },
      {
        "id": "S07",
        "uses": [
          "S03",
          "S06",
          "G1"
        ],
        "before_tex": "g^{-1}[\\{a\\}]=\\{1,3\\}",
        "after_tex": "\\{1,3\\}\\notin\\tau_X\\ \\Rightarrow\\ g\\ \\text{not continuous}",
        "relation": "implies",
        "rule": "quantifier_negation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "{1,3} 不等於 τX 的四個成員中的任何一個，所以不是開集。開集 {a} 的逆像不開，依量詞否定，「對每個 V∈τY 逆像都開」不成立，g 不連續。",
          "en": "{1,3} equals none of the four members of τX, so it is not open. The open set {a} has a non-open preimage, so by quantifier negation 'every V∈τY has an open preimage' fails, and g is not continuous."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S06",
            "G1",
            "quantifier_negation",
            "finite_exhaustion"
          ],
          "explanation": {
            "zh-Hant": "一個反例 V={a} 就足以否定全稱條件；判定 {1,3}∉τX 需要與四個成員逐一比較。",
            "en": "One counterexample V={a} suffices to refute the universal condition; deciding {1,3}∉τX requires comparing with each of the four members."
          }
        },
        "leaf_basis": "quantifier_negation + finite_exhaustion"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "G2",
          "G3"
        ],
        "before_tex": "g[U]\\ \\text{for}\\ U\\in\\tau_X",
        "after_tex": "g[\\varnothing]=\\varnothing,\\ g[\\{1\\}]=\\{a\\},\\ g[\\{1,2\\}]=Y,\\ g[X]=Y\\ \\in\\tau_Y",
        "relation": "implies",
        "rule": "open_map_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "計算 g 對每個來源開集的像：∅ 的像是 ∅；{1} 的像是 {a}；{1,2} 的像是 {a,b}=Y；X 的像是 {a,b}=Y。四個像都在 τY，所以 g 是開映射。但 S07 已證 g 不連續：開集的像為開，不等於連續（MKO 第三段）。",
          "en": "Compute the image under g of every open set of the source: the image of ∅ is ∅; of {1} is {a}; of {1,2} is {a,b}=Y; of X is {a,b}=Y. All four images are in τY, so g is an open map. But S07 showed g is not continuous: open sets having open images is not continuity (MKO paragraph 3)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G3",
            "open_map_def",
            "image_preimage_def"
          ],
          "explanation": {
            "zh-Hant": "開映射也是對所有來源開集的全稱條件，四個都已檢查。此步不宣稱開映射與連續有任何蘊含關係。",
            "en": "Being an open map is also a universal condition over all source open sets, and all four are checked. This step claims no implication between openness and continuity."
          }
        },
        "leaf_basis": "open_map_def + image_preimage_def + finite_exhaustion"
      },
      {
        "id": "S09",
        "uses": [
          "S03",
          "G3",
          "G1"
        ],
        "before_tex": "c^{-1}[\\{a\\}]=\\{x\\mid c(x)=a\\}",
        "after_tex": "c^{-1}[\\{a\\}]=\\varnothing\\in\\tau_X\\ \\Rightarrow\\ c\\ \\text{continuous}",
        "relation": "implies",
        "rule": "mko_topological_continuity_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "c 把每個點送到 b，沒有點映到 a，所以 c⁻¹[{a}]=∅∈τX。依 S03，c 連續。逆像不需要 c 有反函數：c 不是單射，c⁻¹[{a}] 仍是定義良好的集合。",
          "en": "c sends every point to b and no point to a, so c⁻¹[{a}]=∅∈τX. By S03, c is continuous. A preimage does not need c to have an inverse: c is not injective, yet c⁻¹[{a}] is a well-defined set."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S03",
            "G3",
            "image_preimage_def"
          ],
          "explanation": {
            "zh-Hant": "逆像記號不預設反函數存在（image_preimage_def）；結論只需 ∅∈τX。",
            "en": "Preimage notation does not presuppose an inverse (image_preimage_def); the conclusion needs only ∅∈τX."
          }
        },
        "leaf_basis": "image_preimage_def + mko_topological_continuity_def"
      },
      {
        "id": "S10",
        "uses": [
          "G1",
          "G2",
          "G3"
        ],
        "before_tex": "c[X]",
        "after_tex": "c[X]=\\{b\\}\\notin\\tau_Y\\ \\Rightarrow\\ c\\ \\text{not open}",
        "relation": "implies",
        "rule": "quantifier_negation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "X 是開集，其像 c[X]={b} 不在 τY={∅,{a},Y} 中，所以 c 不是開映射。c 連續但不開；與 S07、S08 的 g 合起來，連續與開映射兩個方向都互不蘊含。",
          "en": "X is open, and its image c[X]={b} is not in τY={∅,{a},Y}, so c is not an open map. c is continuous but not open; together with g from S07 and S08, neither of continuity and openness implies the other."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G2",
            "open_map_def",
            "quantifier_negation"
          ],
          "explanation": {
            "zh-Hant": "一個來源開集的像不開就足以否定開映射。",
            "en": "One source open set with a non-open image suffices to refute openness."
          }
        },
        "leaf_basis": "quantifier_negation + open_map_def + image_preimage_def"
      },
      {
        "id": "S11",
        "uses": [
          "mko_topological_continuity_def"
        ],
        "before_tex": "h:X\\to Y,\\ k:Y\\to Z\\ \\text{continuous},\\ W\\in\\tau_Z",
        "after_tex": "(k\\circ h)^{-1}[W]=h^{-1}[k^{-1}[W]]\\in\\tau_X\\ \\Rightarrow\\ k\\circ h\\ \\text{continuous}",
        "relation": "theorem_application",
        "rule": "L_comp_preimage",
        "conditions": [],
        "explanation": {
          "zh-Hant": "設 h、k 連續，W∈τZ。依引理 L_comp_preimage（在 S11.1 證明），(k∘h)⁻¹[W]=h⁻¹[k⁻¹[W]]。k 連續給 k⁻¹[W]∈τY，h 連續再給 h⁻¹[k⁻¹[W]]∈τX。W 是任意開集，所以 k∘h 連續。這對任何拓撲空間都成立，不限於有限情形。",
          "en": "Let h and k be continuous and W∈τZ. By Lemma L_comp_preimage (proved in S11.1), (k∘h)⁻¹[W]=h⁻¹[k⁻¹[W]]. Continuity of k gives k⁻¹[W]∈τY, and continuity of h then gives h⁻¹[k⁻¹[W]]∈τX. W was an arbitrary open set, so k∘h is continuous. This holds for all topological spaces, not only finite ones."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "L_comp_preimage",
            "mko_topological_continuity_def",
            "forall_intro"
          ],
          "explanation": {
            "zh-Hant": "需要兩個映射都連續；不宣稱反向（k∘h 連續不推出 h 或 k 連續）。",
            "en": "It needs both maps to be continuous; the converse (k∘h continuous implies h or k continuous) is not claimed."
          }
        },
        "leaf_basis": "composition_def + image_preimage_def + forall_intro"
      },
      {
        "id": "S11.1",
        "uses": [
          "composition_def",
          "image_preimage_def"
        ],
        "before_tex": "x\\in(k\\circ h)^{-1}[W]",
        "after_tex": "x\\in h^{-1}[k^{-1}[W]]",
        "relation": "equivalent",
        "rule": "image_preimage_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "x∈(k∘h)⁻¹[W] ⇔ (k∘h)(x)∈W ⇔ k(h(x))∈W ⇔ h(x)∈k⁻¹[W] ⇔ x∈h⁻¹[k⁻¹[W]]。每一步都是定義的展開，依集合外延性兩集合相等，證得 L_comp_preimage。",
          "en": "x∈(k∘h)⁻¹[W] ⇔ (k∘h)(x)∈W ⇔ k(h(x))∈W ⇔ h(x)∈k⁻¹[W] ⇔ x∈h⁻¹[k⁻¹[W]]. Each move unfolds a definition, so by extensionality the two sets are equal, proving L_comp_preimage."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "composition_def",
            "image_preimage_def",
            "set_extensionality"
          ],
          "explanation": {
            "zh-Hant": "每一步都是定義的等價改寫，兩向成立。注意逆像的順序是先 k 後 h，與合成順序相反。",
            "en": "Each move is an equivalent rewriting by definition, valid both ways. Note the order: first k, then h, the reverse of the composition order."
          }
        },
        "leaf_basis": "composition_def + image_preimage_def + set_extensionality"
      },
      {
        "id": "S12",
        "uses": [
          "S11",
          "S05",
          "G4",
          "G3"
        ],
        "before_tex": "q^{-1}[\\{0\\}]=\\{a\\}\\in\\tau_Y,\\ f\\ \\text{continuous}",
        "after_tex": "(q\\circ f)^{-1}[\\{0\\}]=f^{-1}[\\{a\\}]=\\{1,2\\}\\in\\tau_X",
        "relation": "implies",
        "rule": "forall_elim",
        "conditions": [],
        "explanation": {
          "zh-Hant": "q 連續：q⁻¹[{0}]={a}∈τY，另兩個逆像依 L_trivial_preimage 自動是開集。依 S11，q∘f 連續，且 (q∘f)⁻¹[{0}]=f⁻¹[q⁻¹[{0}]]=f⁻¹[{a}]={1,2}。直接重算：q∘f 把 1、2 送到 0，把 3 送到 1，所以 (q∘f)⁻¹[{0}]={1,2}∈τX。兩種算法一致。",
          "en": "q is continuous: q⁻¹[{0}]={a}∈τY, and the other two preimages are open automatically by L_trivial_preimage. By S11, q∘f is continuous, and (q∘f)⁻¹[{0}]=f⁻¹[q⁻¹[{0}]]=f⁻¹[{a}]={1,2}. Recomputing directly: q∘f sends 1 and 2 to 0 and 3 to 1, so (q∘f)⁻¹[{0}]={1,2}∈τX. The two computations agree."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S11",
            "S05",
            "G4",
            "L_trivial_preimage"
          ],
          "explanation": {
            "zh-Hant": "這是一般結論的一個實例並附直接重算；一個實例不能反過來證明一般結論。",
            "en": "This is one instance of the general result with a direct recomputation; one instance cannot prove the general result in reverse."
          }
        },
        "leaf_basis": "forall_elim + composition_def + image_preimage_def"
      },
      {
        "id": "S13",
        "uses": [
          "S03",
          "G1"
        ],
        "before_tex": "h\\mapsto A_h=h^{-1}[\\{a\\}]\\ \\text{for}\\ h:X\\to Y",
        "after_tex": "\\#\\{h:X\\to Y\\}=2^3=8,\\ \\#\\{h\\ \\text{continuous}\\}=|\\tau_X|=4",
        "relation": "implies",
        "rule": "injective_surjective_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "每個映射 h:X→Y 由集合 A_h=h⁻¹[{a}] 唯一決定（x∈A_h 時 h(x)=a，否則 h(x)=b），反之每個子集 A⊆X 都給出一個映射，所以 h↦A_h 是映射與子集之間的雙射，共 2^3=8 個映射。依 S03，h 連續當且僅當 A_h∈τX，所以恰有 |τX|=4 個連續映射：A=∅（即 c）、A={1}、A={1,2}（即 f）、A=X（常值 a）。g 對應 A={1,3}，不在其中。",
          "en": "Each map h:X→Y is determined by the set A_h=h⁻¹[{a}] (h(x)=a when x∈A_h and h(x)=b otherwise), and every subset A⊆X gives a map, so h↦A_h is a bijection between maps and subsets, giving 2^3=8 maps. By S03, h is continuous exactly when A_h∈τX, so there are exactly |τX|=4 continuous maps: A=∅ (that is c), A={1}, A={1,2} (that is f), A=X (constant a). g corresponds to A={1,3}, which is not among them."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S03",
            "injective_surjective_def",
            "finite_counting_basics"
          ],
          "explanation": {
            "zh-Hant": "計數依賴雙射與 S03 的等價；這是完整列舉，不是抽樣（N1、N2、N3）。",
            "en": "The count rests on the bijection and the equivalence of S03; it is a complete enumeration, not a sample (N1, N2, N3)."
          }
        },
        "leaf_basis": "injective_surjective_def + finite_counting_basics + numeric_evaluation"
      }
    ],
    "result": {
      "zh-Hant": "f 連續且為開映射（全部來源開集的像為 ∅、{a}、{a}、Y；f⁻¹[{a}]={1,2}∈τX）；g 不連續（g⁻¹[{a}]={1,3}∉τX），但 g 是開映射；c 連續（c⁻¹[{a}]=∅），但 c 不是開映射（c[X]={b}∉τY）。連續映射的合成仍連續，q∘f 為例。X→Y 共 8 個映射，其中恰有 4 個連續。",
      "en": "f is continuous and an open map (the images of all source open sets are ∅, {a}, {a}, Y; f⁻¹[{a}]={1,2}∈τX); g is not continuous (g⁻¹[{a}]={1,3}∉τX), yet g is an open map; c is continuous (c⁻¹[{a}]=∅) but not an open map (c[X]={b}∉τY). Composites of continuous maps are continuous, with q∘f as an example. Of the 8 maps X→Y, exactly 4 are continuous."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "g 把每個開集映成開集，所以 g 連續",
          "en": "g maps every open set to an open set, so g is continuous"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "g⁻¹[{a}]={1,3}∉τX。",
          "en": "g⁻¹[{a}]={1,3}∉τX."
        }
      },
      {
        "claim": {
          "zh-Hant": "g⁻¹[∅]=∅ 與 g⁻¹[Y]=X 都是開集，所以 g 連續",
          "en": "g⁻¹[∅]=∅ and g⁻¹[Y]=X are open, so g is continuous"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "這兩個逆像對任何總映射都開；必須檢查 {a}，而 g⁻¹[{a}]={1,3} 不開。",
          "en": "These two preimages are open for every total map; {a} must be checked, and g⁻¹[{a}]={1,3} is not open."
        }
      },
      {
        "claim": {
          "zh-Hant": "c 連續，所以 c 把開集映成開集",
          "en": "c is continuous, so c maps open sets to open sets"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "c[X]={b}∉τY。",
          "en": "c[X]={b}∉τY."
        }
      },
      {
        "claim": {
          "zh-Hant": "c 不是單射，c⁻¹ 不存在，所以無法判定 c 是否連續",
          "en": "c is not injective, so c⁻¹ does not exist and the continuity of c cannot be decided"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "逆像不需要反函數：c⁻¹[{a}]=∅∈τX，c 連續。",
          "en": "Preimages do not need an inverse: c⁻¹[{a}]=∅∈τX, so c is continuous."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "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": "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": "composition_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "合成：對 f:A→B 與 g:B→C，g∘f:A→C 定義為 (g∘f)(a)=g(f(a))。",
          "en": "Composition: for f:A→B and g:B→C, g∘f:A→C is defined by (g∘f)(a)=g(f(a))."
        }
      },
      {
        "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": "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": "topology_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "拓撲：X 上的開集族 τ 包含 ∅ 與 X，對任意聯集與有限交集封閉。",
          "en": "Topology: a family τ of open subsets of X containing ∅ and X, closed under arbitrary unions and finite intersections."
        }
      },
      {
        "id": "nat_induction",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "數學歸納原理：對從 n₀ 起的命題族 P(n)，若 P(n₀) 成立，且對每個 n≥n₀ 都有 P(n)⇒P(n+1)，則所有 n≥n₀ 都有 P(n)。",
          "en": "Principle of induction: for a family P(n) starting at n₀, if P(n₀) holds and P(n)⇒P(n+1) for every n≥n₀, then P(n) holds for every n≥n₀."
        }
      },
      {
        "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": "def_unfold",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "展開定義：把一個已定義的詞換成它的定義內容（或反向收回），命題的真假不變。",
          "en": "Unfolding a definition: replacing a defined term by its definition (or folding it back) does not change whether a statement is true."
        }
      },
      {
        "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": "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": "quantifier_negation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "量詞否定：¬(∀x, P(x)) 等價於 ∃x, ¬P(x)；¬(∃x, P(x)) 等價於 ∀x, ¬P(x)。",
          "en": "Negating quantifiers: ¬(∀x, P(x)) is equivalent to ∃x, ¬P(x), and ¬(∃x, P(x)) is equivalent to ∀x, ¬P(x)."
        }
      },
      {
        "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": "forall_elim",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "∀消去（代入特例）：若 ∀x∈D, P(x) 成立且 a∈D，則 P(a) 成立。",
          "en": "∀-elimination (instantiation): if ∀x∈D, P(x) holds and a∈D, then P(a) holds."
        }
      },
      {
        "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": "finite_counting_basics",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "有限計數：互斥有限集合 A、B 有 |A∪B|=|A|+|B|；|A×B|=|A|·|B|；有限集之間存在雙射 ⇔ 元素個數相同。",
          "en": "Finite counting: for disjoint finite sets A, B, |A∪B|=|A|+|B|; |A×B|=|A|·|B|; there is a bijection between finite sets ⇔ they have the same number of elements."
        }
      },
      {
        "id": "numeric_evaluation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "明確整數或有理數算式的精確求值；可以獨立重算。",
          "en": "Exact evaluation of an explicit integer or rational expression; independently recomputable."
        }
      },
      {
        "id": "mko_topological_continuity_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-topological-continuity",
          "sha256": "559fd18172a255b51e3254df6aeeb3ac6e1121e20bded6913c4cd34f3f1484b4",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "給定拓撲空間 (X,τX)、(Y,τY) 與總映射 f:X→Y，f 連續當且僅當對每個 V∈τY，逆像 f⁻¹[V]∈τX。這是逆像條件，不要求開集的像為開。",
          "en": "For topological spaces (X,τX), (Y,τY) and a total map f:X→Y, f is continuous exactly when f⁻¹[V]∈τX for every V∈τY. This is a preimage condition; it does not require images of open sets to be open."
        }
      },
      {
        "id": "mko_topological_space_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-topological-space",
          "sha256": "95f78b4f323b3139dd05068842f7209ac33b39b3d86feb5b73e0eb8849cdb43d",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "X 上的拓撲是子集合族 τ⊆P(X)，滿足 ∅∈τ、X∈τ、任意子族的聯集在 τ、任意有限子族的交集在 τ（空族聯集為 ∅，空族交集為 X）。",
          "en": "A topology on X is a family τ⊆P(X) with ∅∈τ, X∈τ, unions of all subfamilies in τ and intersections of all finite subfamilies in τ (the empty union is ∅ and the empty intersection is X)."
        }
      },
      {
        "id": "open_map_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "映射 h:X→Y 稱為開映射，若對每個 U∈τX，像 h[U]∈τY。",
          "en": "A map h:X→Y is an open map if h[U]∈τY for every U∈τX."
        }
      },
      {
        "id": "finite_exhaustion",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "對明示列出的有限集合 D，∀V∈D, Q(V) 等價於 Q 對每個列出元素都成立的合取；只檢查部分元素不足以證明它，一個不成立的元素就否定它。",
          "en": "For an explicitly listed finite set D, ∀V∈D, Q(V) is equivalent to the conjunction of Q over the listed elements; checking only some elements does not prove it, and one failing element refutes it."
        }
      },
      {
        "id": "L_chain",
        "kind": "lemma",
        "proved_in": [
          "S01.1"
        ],
        "statement": {
          "zh-Hant": "若集合 S 的一個有限子集合族含 ∅ 與 S，且任兩個成員都可用 ⊆ 比較（全序），則它是 S 上的拓撲。",
          "en": "If a finite family of subsets of a set S contains ∅ and S and any two members are comparable under ⊆ (a chain), then it is a topology on S."
        }
      },
      {
        "id": "L_trivial_preimage",
        "kind": "lemma",
        "proved_in": [
          "S03.1"
        ],
        "statement": {
          "zh-Hant": "對每個總映射 h:X→Y，h⁻¹[∅]=∅ 且 h⁻¹[Y]=X。",
          "en": "For every total map h:X→Y, h⁻¹[∅]=∅ and h⁻¹[Y]=X."
        }
      },
      {
        "id": "L_comp_preimage",
        "kind": "lemma",
        "proved_in": [
          "S11.1"
        ],
        "statement": {
          "zh-Hant": "對 h:X→Y、k:Y→Z 與 W⊆Z，(k∘h)⁻¹[W]=h⁻¹[k⁻¹[W]]。",
          "en": "For h:X→Y, k:Y→Z and W⊆Z, (k∘h)⁻¹[W]=h⁻¹[k⁻¹[W]]."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N1",
        "step": "S13",
        "lhs": "2**3",
        "rhs": "8"
      },
      {
        "id": "N2",
        "step": "S13",
        "lhs": "1+1+1+1",
        "rhs": "4"
      },
      {
        "id": "N3",
        "step": "S13",
        "lhs": "2**3-4",
        "rhs": "4"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "在 MKO 範圍內工作：兩個底集合與拓撲固定（假設 a1），映射以完整總表給出，逆像收集所有映入目標子集的來源元素（假設 a2）。具體映射分類與計數只處理明示的有限拓撲；合成連續的一般引理則對任意拓撲空間證明，不使用有限性；不處理實函數的 ε-δ 連續、子空間或孤立點語義橋，不改動 canonical MKO 或英文 edition。",
      "en": "Works inside the MKO's scope: both underlying sets and topologies are fixed (assumption a1), maps are given by complete total tables, and a preimage collects every source element mapping into the target subset (assumption a2). The concrete map classification and count use the stated finite topologies; the general composition-continuity theorem is proved for arbitrary topological spaces without finiteness; the ε-δ continuity of real functions, subspaces and the isolated-point bridge are not, and the canonical MKO and its English edition are not changed."
    },
    "md_symbols": [
      [
        "(X,\\tau_X)",
        "來源空間 X={1,2,3}",
        "the source space X={1,2,3}"
      ],
      [
        "(Y,\\tau_Y)",
        "目標空間 Y={a,b}",
        "the target space Y={a,b}"
      ],
      [
        "h^{-1}[V]",
        "V 在 h 下的逆像 {x∈X ∣ h(x)∈V}",
        "the preimage of V under h, {x∈X ∣ h(x)∈V}"
      ],
      [
        "h[U]",
        "U 在 h 下的像 {h(x) ∣ x∈U}",
        "the image of U under h, {h(x) ∣ x∈U}"
      ],
      [
        "f,g,c",
        "三個待判定的映射",
        "the three maps to be classified"
      ],
      [
        "q:Y\\to Z",
        "用來驗證合成的第二個映射",
        "the second map used to check composition"
      ]
    ],
    "md_error_controls": [
      {
        "title": "開集的像為開不是連續 / Sending open sets to open sets is not the definition of continuity",
        "zh": "MKO 指出的誤解是把「開集的像為開」當作連續的定義。g 把每個開集映成開集，卻不連續（S07、S08）；c 連續卻把開集 X 映成不開的 {b}（S09、S10）。連續性只看逆像。",
        "en": "The misconception identified in the MKO is taking 'images of open sets are open' as the definition of continuity. g maps every open set to an open set yet is not continuous (S07, S08); c is continuous yet maps the open set X to the non-open set {b} (S09, S10). Continuity is about preimages only."
      },
      {
        "title": "只抽查一個開集不夠 / Checking one open set is not enough",
        "zh": "∅ 與 Y 的逆像對任何總映射都是開集（S03），所以只查它們永遠會「通過」；g 正是如此。必須檢查 τY 的每一個成員，關鍵的是 {a}。",
        "en": "The preimages of ∅ and Y are open for every total map (S03), so checking only them always 'passes'; that is exactly what happens for g. Every member of τY must be checked, and the decisive one is {a}."
      },
      {
        "title": "逆像不需要反函數 / Preimages do not need an inverse",
        "zh": "c 不是單射，沒有反函數，但 c⁻¹[{a}]=∅ 與 c⁻¹[{b}]=X 都是定義良好的集合。把 f⁻¹ 讀成反函數會讓人誤以為非單射映射無法判定連續。",
        "en": "c is not injective and has no inverse, yet c⁻¹[{a}]=∅ and c⁻¹[{b}]=X are well-defined sets. Reading f⁻¹ as an inverse function would wrongly suggest that continuity of non-injective maps cannot be decided."
      }
    ],
    "md_open_items": [
      {
        "zh-Hant": "與 Mathlib Continuous 的開集逆像定義、實函數 ε-δ 連續、子空間與孤立點的語義橋（MKO formal next）未在此建立。",
        "en": "The bridge to Mathlib's Continuous (open-preimage definition), to ε-δ continuity of real functions, and to subspaces and isolated points (MKO formal next) is not built here."
      }
    ]
  },
  "revision": {
    "id": "production-20261019-adopted-96",
    "source_commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
    "adopted_source_sha256": "b117526fa854e48680a3b666c42aa17e7e65e805f5d983e78d1584911010c82d",
    "original_source_sha256": "6d48e6785097f15248cf83e69efa2ae7a0fd26ea5e6dd4144f0d3eb785992398",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "independent_AI_concurrence": "NOT_MEASURED",
    "issue_ids": [
      "BR-M035"
    ],
    "scope": "Owner-adopted natural-language teaching guide; not a formal proof, canonical MKO rewrite or evidence-status promotion."
  }
}
