{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-set-membership-01",
  "mko_id": "mko-set-membership",
  "title": {
    "zh-Hant": "集合隸屬：x∈A 是命題，並與 ⊆、= 及程式的成員測試區分",
    "en": "Set membership: x∈A is a proposition, kept apart from ⊆, = and a program's membership test"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-set-membership-01",
    "source": {
      "mko_id": "mko-set-membership",
      "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
      "sha256": "2a438aa79c23e6d37869e1e63eb48420bcf2f114f44b58fe5bea386076b4f0db",
      "english_sha256": "3c93982fdf37b764e4dcea079fba39532642656286a8cfbae67470b6274a4e38"
    },
    "mode": "definition_walkthrough",
    "audience_prerequisites": [
      "subset_def",
      "set_extensionality",
      "set_builder",
      "divides_def",
      "order_basics",
      "numeric_evaluation"
    ],
    "goal": {
      "zh-Hant": "在型別化語境中，設 A={1,2,3}、B={1,2}、𝓕={{1,2},{3}}（元素是整數集合的集合）、E={n∈ℤ ∣ 2∣n}。判定下列命題的真假並給出理由：2∈A；4∈A；B⊆A；A⊆B；B∈𝓕；{1}∈𝓕；1000000∈E；7∈E。並說明 1∈B 與 B∈𝓕 為何不給出 1∈𝓕，以及程式語言的成員測試為何不能取代集合隸屬的語義。",
      "en": "In a typed context let A={1,2,3}, B={1,2}, 𝓕={{1,2},{3}} (a set whose elements are sets of integers) and E={n∈ℤ ∣ 2∣n}. Decide with reasons whether each holds: 2∈A; 4∈A; B⊆A; A⊆B; B∈𝓕; {1}∈𝓕; 1000000∈E; 7∈E. Also explain why 1∈B and B∈𝓕 do not give 1∈𝓕, and why a programming language's membership test cannot replace the semantics of set membership."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "型別化語境：對象是整數；A、B、E 是整數的集合；𝓕 是整數集合的集合。x∈S 只在 x 的型別與 S 的元素型別相同時才是良構命題。列舉記號：x∈{a,b,c} ⇔ x=a ∨ x=b ∨ x=c（兩個或一個元素時同理）；對集合的列舉同樣適用，此時等號是集合相等。",
          "en": "Typed context: the objects are integers; A, B and E are sets of integers; 𝓕 is a set of sets of integers. x∈S is a well-formed proposition only when the type of x is the element type of S. List notation: x∈{a,b,c} ⇔ x=a ∨ x=b ∨ x=c (likewise with two elements or one); the same applies to a list of sets, where = is set equality."
        }
      },
      {
        "id": "G2",
        "statement": {
          "zh-Hant": "A={1,2,3}，B={1,2}，𝓕={{1,2},{3}}，E={n∈ℤ ∣ 2∣n}。",
          "en": "A={1,2,3}, B={1,2}, 𝓕={{1,2},{3}} and E={n∈ℤ ∣ 2∣n}."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1",
          "G2"
        ],
        "before_tex": "x,\\ A",
        "after_tex": "x\\in A\\ \\text{is a proposition: }x\\ \\text{is an element of}\\ A",
        "relation": "definition",
        "rule": "mko_member",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依 MKO，給定集合 A 與對象 x，x∈A 是一個命題：它斷言 x 是 A 的元素，可能為真也可能為假。它不表示 x 等於 A，也不表示 x 是 A 的子集合。MKO 也記錄：在目前的 Lean 映射中，Set α 表示為 α→Prop，所以 x∈A 與「A x」在定義上等價；也就是說，集合由「對每個 x 給出一個命題」決定。本稿不執行 Lean，只採用這個觀點。",
          "en": "By the MKO, given a set A and an object x, x∈A is a proposition: it asserts that x is an element of A and may be true or false. It does not say that x equals A, nor that x is a subset of A. The MKO also notes that in the current Lean mapping Set α is represented as α→Prop, so x∈A and 'A x' are definitionally equivalent; that is, a set is determined by giving a proposition for each x. This guide does not run Lean and only adopts this viewpoint."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "G2",
            "mko_member"
          ],
          "explanation": {
            "zh-Hant": "此步只寫出定義與型別，不推出新事實。",
            "en": "This step only states the definition and the types and derives no new fact."
          }
        },
        "leaf_basis": "mko_member + list_set"
      },
      {
        "id": "S02",
        "uses": [
          "S01",
          "G2",
          "list_set"
        ],
        "before_tex": "2\\in A",
        "after_tex": "2=1\\lor 2=2\\lor 2=3:\\ \\text{true, since}\\ 2=2",
        "relation": "implies",
        "rule": "list_set",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依列舉記號，2∈A ⇔ 2=1 ∨ 2=2 ∨ 2=3。第二支 2=2 依等號的反身性成立，所以析取為真，2∈A 為真。",
          "en": "By list notation, 2∈A ⇔ 2=1 ∨ 2=2 ∨ 2=3. The second disjunct 2=2 holds by reflexivity of equality, so the disjunction is true and 2∈A is true."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "list_set",
            "eq_refl_symm_trans"
          ],
          "explanation": {
            "zh-Hant": "析取只需一支為真。",
            "en": "A disjunction needs only one true disjunct."
          }
        },
        "leaf_basis": "list_set + eq_refl_symm_trans"
      },
      {
        "id": "S03",
        "uses": [
          "G2",
          "list_set"
        ],
        "before_tex": "4\\in A",
        "after_tex": "4\\neq 1\\land 4\\neq 2\\land 4\\neq 3,\\ \\text{so}\\ 4\\notin A",
        "relation": "implies",
        "rule": "de_morgan_logic",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依列舉記號 4∈A ⇔ 4=1 ∨ 4=2 ∨ 4=3。三個等式都不成立，依德摩根律 ¬(4=1∨4=2∨4=3) ⇔ 4≠1∧4≠2∧4≠3，所以 4∉A。「4∈A」仍是一個命題，只是假的。",
          "en": "By list notation 4∈A ⇔ 4=1 ∨ 4=2 ∨ 4=3. None of the three equations holds, and by De Morgan ¬(4=1∨4=2∨4=3) ⇔ 4≠1∧4≠2∧4≠3, so 4∉A. '4∈A' is still a proposition, just a false one."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "list_set",
            "de_morgan_logic",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "要否定析取，必須每一支都不成立（N1 到 N3）。",
            "en": "To deny a disjunction every disjunct must fail (N1 to N3)."
          }
        },
        "leaf_basis": "de_morgan_logic + list_set + numeric_evaluation"
      },
      {
        "id": "S04",
        "uses": [
          "G2"
        ],
        "before_tex": "B\\subseteq A",
        "after_tex": "\\forall x\\,(x\\in B\\Rightarrow x\\in A)",
        "relation": "equivalent",
        "rule": "subset_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依子集定義展開：B⊆A 表示 B 的每個元素都是 A 的元素。注意 ⊆ 談的是 B 的元素，∈ 談的是單一對象。",
          "en": "Unfold by the definition of subset: B⊆A means every element of B is an element of A. Note that ⊆ speaks about the elements of B, while ∈ speaks about a single object."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "subset_def"
          ],
          "explanation": {
            "zh-Hant": "展開與收回定義是雙向的。",
            "en": "Unfolding and folding a definition are two-way."
          }
        },
        "leaf_basis": "subset_def + def_unfold"
      },
      {
        "id": "S05",
        "uses": [
          "S04",
          "G2",
          "list_set"
        ],
        "before_tex": "x\\in B\\ (x\\ \\text{arbitrary})",
        "after_tex": "x=1\\ \\lor\\ x=2",
        "relation": "case_split",
        "rule": "list_set",
        "conditions": [],
        "explanation": {
          "zh-Hant": "任取整數 x 並暫時假設 x∈B。依列舉記號 x=1 或 x=2，兩支涵蓋 x∈B 的所有可能，在 S05.1、S05.2 處理。",
          "en": "Take an arbitrary integer x and temporarily assume x∈B. By list notation x=1 or x=2; the two branches cover every way x can be in B and are handled in S05.1 and S05.2."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "list_set",
            "imp_intro"
          ],
          "explanation": {
            "zh-Hant": "列舉記號給出完整的分支；暫時假設在 S06 釋放。",
            "en": "List notation gives exhaustive branches; the temporary assumption is discharged in S06."
          }
        },
        "leaf_basis": "list_set + case_analysis"
      },
      {
        "id": "S05.1",
        "uses": [
          "S05",
          "list_set"
        ],
        "before_tex": "x=1",
        "after_tex": "x\\in A\\ \\ (1=1)",
        "relation": "implies",
        "rule": "list_set",
        "conditions": [],
        "explanation": {
          "zh-Hant": "若 x=1，則 x∈A ⇔ 1=1 ∨ 1=2 ∨ 1=3，第一支成立，所以 x∈A。",
          "en": "If x=1, then x∈A ⇔ 1=1 ∨ 1=2 ∨ 1=3, whose first disjunct holds, so x∈A."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "list_set",
            "eq_replace"
          ],
          "explanation": {
            "zh-Hant": "用 x=1 代換後只需一支為真。",
            "en": "After replacing x by 1, one true disjunct suffices."
          }
        },
        "leaf_basis": "list_set + eq_replace"
      },
      {
        "id": "S05.2",
        "uses": [
          "S05",
          "list_set"
        ],
        "before_tex": "x=2",
        "after_tex": "x\\in A\\ \\ (2=2)",
        "relation": "implies",
        "rule": "list_set",
        "conditions": [],
        "explanation": {
          "zh-Hant": "若 x=2，依 S02，x∈A。",
          "en": "If x=2, then x∈A by S02."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "list_set",
            "S02",
            "eq_replace"
          ],
          "explanation": {
            "zh-Hant": "直接引用 S02。",
            "en": "This reuses S02 directly."
          }
        },
        "leaf_basis": "list_set + eq_replace"
      },
      {
        "id": "S06",
        "uses": [
          "S04",
          "S05",
          "S05.1",
          "S05.2"
        ],
        "before_tex": "x\\in B\\Rightarrow x\\in A\\ \\text{for arbitrary}\\ x",
        "after_tex": "B\\subseteq A",
        "relation": "implies",
        "rule": "forall_intro",
        "conditions": [],
        "explanation": {
          "zh-Hant": "兩支都推出 x∈A，依分情況論證，在假設 x∈B 下得 x∈A；釋放假設得 x∈B ⇒ x∈A。x 是任取的，依全稱推廣與 S04，B⊆A。",
          "en": "Both branches give x∈A, so by cases x∈A under the assumption x∈B; discharging it gives x∈B ⇒ x∈A. As x was arbitrary, generalization and S04 give B⊆A."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S04",
            "S05",
            "case_analysis",
            "imp_intro",
            "forall_intro"
          ],
          "explanation": {
            "zh-Hant": "目標 G：B⊆A。足夠條件 H：∀x (x∈B⇒x∈A)；H⇒G 由 S04。H 由 S05 及其子步正向證成。",
            "en": "Goal G: B⊆A. Sufficient condition H: ∀x (x∈B⇒x∈A); H⇒G by S04. H is proved forwards in S05 and its sub-steps."
          }
        },
        "leaf_basis": "case_analysis + imp_intro + forall_intro"
      },
      {
        "id": "S07",
        "uses": [
          "G2",
          "list_set"
        ],
        "before_tex": "3\\in A,\\ 3\\notin B",
        "after_tex": "A\\not\\subseteq B",
        "relation": "implies",
        "rule": "quantifier_negation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "3∈A（第三支 3=3）；3∈B ⇔ 3=1 ∨ 3=2，兩者都不成立，所以 3∉B。於是 ∃x (x∈A ∧ x∉B)，依量詞否定 ¬∀x (x∈A ⇒ x∈B)，即 A⊄B。⊆ 不是對稱的。",
          "en": "3∈A (third disjunct 3=3); 3∈B ⇔ 3=1 ∨ 3=2, and neither holds, so 3∉B. Hence ∃x (x∈A ∧ x∉B), and by negation of quantifiers ¬∀x (x∈A ⇒ x∈B), that is A⊄B. ⊆ is not symmetric."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "list_set",
            "quantifier_negation",
            "exists_intro"
          ],
          "explanation": {
            "zh-Hant": "一個反例就足以否定子集關係。",
            "en": "One counterexample is enough to refute inclusion."
          }
        },
        "leaf_basis": "quantifier_negation + exists_intro + list_set + numeric_evaluation"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "G2",
          "list_set"
        ],
        "before_tex": "B\\in\\mathcal{F}",
        "after_tex": "B=\\{1,2\\}\\lor B=\\{3\\}:\\ \\text{true}",
        "relation": "implies",
        "rule": "list_set",
        "conditions": [],
        "explanation": {
          "zh-Hant": "𝓕 的元素是整數的集合，B 也是整數的集合，所以 B∈𝓕 是良構命題。依列舉記號，B∈𝓕 ⇔ B={1,2} ∨ B={3}；B 就是 {1,2}（等號的反身性），所以 B∈𝓕 為真。這是 B 作為一個整體是 𝓕 的元素，與 B⊆A（B 的每個元素都在 A 中）是不同的關係。",
          "en": "The elements of 𝓕 are sets of integers and B is a set of integers, so B∈𝓕 is well formed. By list notation, B∈𝓕 ⇔ B={1,2} ∨ B={3}; B is {1,2} (reflexivity of equality), so B∈𝓕 is true. Here B as a whole is an element of 𝓕, a different relation from B⊆A (every element of B lies in A)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "list_set",
            "typed_membership",
            "eq_refl_symm_trans"
          ],
          "explanation": {
            "zh-Hant": "需要型別相符（B 是整數集合）與一支為真。",
            "en": "It needs matching types (B is a set of integers) and one true disjunct."
          }
        },
        "leaf_basis": "list_set + typed_membership + eq_refl_symm_trans"
      },
      {
        "id": "S09",
        "uses": [
          "G2",
          "list_set",
          "set_extensionality"
        ],
        "before_tex": "\\{1\\}\\in\\mathcal{F}",
        "after_tex": "\\{1\\}\\neq\\{1,2\\},\\ \\{1\\}\\neq\\{3\\},\\ \\text{so}\\ \\{1\\}\\notin\\mathcal{F}",
        "relation": "implies",
        "rule": "set_extensionality",
        "conditions": [],
        "explanation": {
          "zh-Hant": "{1}∈𝓕 ⇔ {1}={1,2} ∨ {1}={3}。2∈{1,2} 而 2∉{1}（2≠1），依外延性 {1}≠{1,2}；1∈{1} 而 1∉{3}（1≠3），所以 {1}≠{3}。兩支都假，{1}∉𝓕。可是 {1}⊆B 而且 B∈𝓕：隸屬於 𝓕 不會傳給子集合。",
          "en": "{1}∈𝓕 ⇔ {1}={1,2} ∨ {1}={3}. 2∈{1,2} but 2∉{1} (2≠1), so by extensionality {1}≠{1,2}; 1∈{1} but 1∉{3} (1≠3), so {1}≠{3}. Both disjuncts fail and {1}∉𝓕. Yet {1}⊆B and B∈𝓕: membership in 𝓕 is not passed on to subsets."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "set_extensionality",
            "list_set",
            "de_morgan_logic"
          ],
          "explanation": {
            "zh-Hant": "每個集合不等式各需一個只屬於一邊的元素；兩支都否定後析取為假。",
            "en": "Each set inequality needs one element in one set only; with both disjuncts denied, the disjunction is false."
          }
        },
        "leaf_basis": "set_extensionality + list_set + de_morgan_logic + numeric_evaluation"
      },
      {
        "id": "S10",
        "uses": [
          "S08",
          "G1",
          "typed_membership"
        ],
        "before_tex": "1\\in B,\\ B\\in\\mathcal{F}",
        "after_tex": "1\\in\\mathcal{F}\\ \\text{is not a true statement}",
        "relation": "implies",
        "rule": "typed_membership",
        "conditions": [],
        "explanation": {
          "zh-Hant": "1∈B 為真（第一支 1=1），B∈𝓕 為真（S08）。但 𝓕 的元素是整數的集合，1 是整數，依 typed_membership，「1∈𝓕」在型別化的讀法中不是良構命題，更不是真命題；若改用不分型別的讀法，它表示 1={1,2} 或 1={3}，在把整數與這兩個集合視為不同對象時也不成立。所以 ∈ 沒有傳遞性：x∈B 與 B∈𝓕 不推出 x∈𝓕。",
          "en": "1∈B is true (first disjunct 1=1) and B∈𝓕 is true (S08). But the elements of 𝓕 are sets of integers and 1 is an integer, so by typed_membership '1∈𝓕' is not well formed in the typed reading, let alone true; in an untyped reading it would say 1={1,2} or 1={3}, which also fails when integers are treated as objects different from these two sets. So ∈ is not transitive: x∈B and B∈𝓕 do not give x∈𝓕."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "typed_membership",
            "S08"
          ],
          "explanation": {
            "zh-Hant": "結論依賴型別區分；不分型別時的判定另需數的編碼，本稿不處理。",
            "en": "The conclusion depends on the type distinction; an untyped verdict would need a coding of numbers, which this guide does not treat."
          }
        },
        "leaf_basis": "typed_membership"
      },
      {
        "id": "S11",
        "uses": [
          "G2",
          "set_builder",
          "divides_def"
        ],
        "before_tex": "1000000\\in E",
        "after_tex": "1000000=2\\cdot 500000,\\ \\text{so}\\ 1000000\\in E",
        "relation": "implies",
        "rule": "set_builder",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依建構式，1000000∈E ⇔ 1000000∈ℤ 且 2∣1000000。1000000=2·500000，500000 是整數，所以 2∣1000000，1000000∈E 為真。這個判定只用 E 的定義條件，不需要把 E 的元素列出或存放在任何容器裡。",
          "en": "By set-builder notation, 1000000∈E ⇔ 1000000∈ℤ and 2∣1000000. 1000000=2·500000 with 500000 an integer, so 2∣1000000 and 1000000∈E is true. The verdict uses only the defining condition of E; nothing needs to be listed or stored in a container."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "set_builder",
            "divides_def",
            "exists_intro",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "需要一個整數見證 500000（N8）。",
            "en": "One integer witness, 500000, is needed (N8)."
          }
        },
        "leaf_basis": "set_builder + divides_def + exists_intro + numeric_evaluation"
      },
      {
        "id": "S12",
        "uses": [
          "G2"
        ],
        "before_tex": "k\\in\\mathbb{Z}\\ \\text{with}\\ 2k=7\\ ?",
        "after_tex": "k\\le 3\\ \\lor\\ k\\ge 4",
        "relation": "case_split",
        "rule": "int_no_gap",
        "conditions": [
          "k\\in\\mathbb{Z}"
        ],
        "explanation": {
          "zh-Hant": "7∈E 需要 2∣7，即整數 k 使 7=2k。依 int_no_gap（m=3），每個整數 k 滿足 k≤3 或 k≥4，兩支在 S12.1、S12.2 處理。",
          "en": "7∈E needs 2∣7, that is an integer k with 7=2k. By int_no_gap (m=3) every integer k satisfies k≤3 or k≥4; the branches are handled in S12.1 and S12.2."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "int_no_gap"
          ],
          "explanation": {
            "zh-Hant": "兩支涵蓋全部整數。",
            "en": "The two branches cover every integer."
          }
        },
        "leaf_basis": "int_no_gap + case_analysis"
      },
      {
        "id": "S12.1",
        "uses": [
          "S12"
        ],
        "before_tex": "k\\le 3",
        "after_tex": "2k\\le 6<7,\\ \\text{so}\\ 2k\\neq 7",
        "relation": "implies",
        "rule": "order_basics",
        "conditions": [
          "2>0"
        ],
        "explanation": {
          "zh-Hant": "若 k<3，乘以正數 2 得 2k<6；若 k=3，2k=6。所以 2k≤6<7，2k≠7。",
          "en": "If k<3, multiplying by the positive number 2 gives 2k<6; if k=3, 2k=6. So 2k≤6<7 and 2k≠7."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "order_basics",
            "two_nonzero"
          ],
          "explanation": {
            "zh-Hant": "用到 2>0；不宣稱反向。",
            "en": "2>0 is used; no converse is claimed."
          }
        },
        "leaf_basis": "order_basics + numeric_evaluation"
      },
      {
        "id": "S12.2",
        "uses": [
          "S12"
        ],
        "before_tex": "k\\ge 4",
        "after_tex": "2k\\ge 8>7,\\ \\text{so}\\ 2k\\neq 7",
        "relation": "implies",
        "rule": "order_basics",
        "conditions": [
          "2>0"
        ],
        "explanation": {
          "zh-Hant": "若 k>4，乘以 2 得 2k>8；若 k=4，2k=8。所以 2k≥8>7，2k≠7。",
          "en": "If k>4, multiplying by 2 gives 2k>8; if k=4, 2k=8. So 2k≥8>7 and 2k≠7."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "同 S12.1。",
            "en": "As in S12.1."
          }
        },
        "leaf_basis": "order_basics + numeric_evaluation"
      },
      {
        "id": "S13",
        "uses": [
          "S12",
          "S12.1",
          "S12.2",
          "G2",
          "set_builder"
        ],
        "before_tex": "\\forall k\\in\\mathbb{Z}:\\ 2k\\neq 7",
        "after_tex": "7\\notin E",
        "relation": "implies",
        "rule": "case_analysis",
        "conditions": [],
        "explanation": {
          "zh-Hant": "兩支都得 2k≠7，所以沒有整數 k 使 7=2k，即 2∤7；依建構式 7∈E ⇔ 2∣7，因此 7∉E。「7∈E」是一個假的命題。",
          "en": "Both branches give 2k≠7, so no integer k has 7=2k, that is 2∤7; by set-builder notation 7∈E ⇔ 2∣7, hence 7∉E. '7∈E' is a false proposition."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S12",
            "case_analysis",
            "set_builder",
            "divides_def"
          ],
          "explanation": {
            "zh-Hant": "需要兩支涵蓋全部整數（S12）。",
            "en": "The two branches must cover every integer (S12)."
          }
        },
        "leaf_basis": "case_analysis + set_builder + divides_def"
      },
      {
        "id": "S14",
        "uses": [
          "python_in",
          "list_set"
        ],
        "before_tex": "\\text{Python: }'12'\\ \\text{in}\\ '123'",
        "after_tex": "\\text{True (substring test), while}\\ '12'\\notin\\{'1','2','3'\\}",
        "relation": "implies",
        "rule": "python_in",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依引用的 Python 語言參考（python_in），對字串而言 x in y 是子字串測試，所以 '12' in '123' 為 True。若把 '123' 的三個字元看成由單字元字串組成的集合 {'1','2','3'}，則 '12'∈{'1','2','3'} ⇔ '12'='1' ∨ '12'='2' ∨ '12'='3'；'12' 有兩個字元，與三個單字元字串都不相等，所以這是假命題。同一個「in」在程式中檢查的是另一種關係；MKO 提醒不要把程式容器的成員測試當作集合隸屬的全部語義。",
          "en": "By the cited Python Language Reference (python_in), for strings x in y is a substring test, so '12' in '123' is True. If the three characters of '123' are taken as the set of one-character strings {'1','2','3'}, then '12'∈{'1','2','3'} ⇔ '12'='1' ∨ '12'='2' ∨ '12'='3'; '12' has two characters and equals none of the three one-character strings, so this is a false proposition. The program's 'in' tests a different relation; the MKO warns against taking a program container's membership test as the whole semantics of set membership."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "python_in",
            "list_set"
          ],
          "explanation": {
            "zh-Hant": "程式行為來自引用的語言參考（citation_verified，本稿沒有執行程式）；集合一側只用列舉記號。不宣稱所有程式語言或所有容器型別都如此。",
            "en": "The program behaviour comes from the cited language reference (citation_verified; no program was run for this guide); the set side uses only list notation. It is not claimed that every language or container type behaves this way."
          }
        },
        "leaf_basis": "python_in + list_set"
      },
      {
        "id": "S15",
        "uses": [
          "S02",
          "S03",
          "S06",
          "S07",
          "S08",
          "S09",
          "S10",
          "S11",
          "S13",
          "S14"
        ],
        "before_tex": "\\text{verdicts of S02 to S14}",
        "after_tex": "2\\in A,\\ 4\\notin A,\\ B\\subseteq A,\\ A\\not\\subseteq B,\\ B\\in\\mathcal{F},\\ \\{1\\}\\notin\\mathcal{F},\\ 1000000\\in E,\\ 7\\notin E",
        "relation": "implies",
        "rule": "and_intro_elim",
        "conditions": [],
        "explanation": {
          "zh-Hant": "合起來：2∈A 真、4∈A 假、B⊆A 真、A⊆B 假、B∈𝓕 真、{1}∈𝓕 假、1000000∈E 真、7∈E 假；1∈B 與 B∈𝓕 不給出 1∈𝓕；程式的字串成員測試與集合隸屬是不同關係。",
          "en": "Together: 2∈A true, 4∈A false, B⊆A true, A⊆B false, B∈𝓕 true, {1}∈𝓕 false, 1000000∈E true, 7∈E false; 1∈B and B∈𝓕 do not give 1∈𝓕; a program's string membership test and set membership are different relations."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S02",
            "S03",
            "S06",
            "S07",
            "S08",
            "S09",
            "S10",
            "S11",
            "S13",
            "S14",
            "and_intro_elim"
          ],
          "explanation": {
            "zh-Hant": "目標 G：題目要求的各項判定與說明。足夠條件 H：所列各步結論；H⇒G 只是並列。H 由 G1、G2 與引用規則正向證成，沒有把 G 當作前提。",
            "en": "Goal G: the verdicts and explanations asked for. Sufficient condition H: the conclusions of the listed steps; H⇒G just lists them. H is proved forwards from G1, G2 and the cited rule; G is never used as a premise."
          }
        },
        "leaf_basis": "and_intro_elim"
      }
    ],
    "result": {
      "zh-Hant": "2∈A 為真，4∈A 為假（仍是命題）；B⊆A 為真而 A⊆B 為假（3∈A、3∉B）；B∈𝓕 為真，{1}∈𝓕 為假，儘管 {1}⊆B；1000000∈E 為真（1000000=2·500000），7∈E 為假。1∈B 與 B∈𝓕 不推出 1∈𝓕，因為 ∈ 沒有傳遞性，而且在型別化語境中「1∈𝓕」不是良構命題。Python 的 '12' in '123' 為 True 是子字串測試，而 '12'∈{'1','2','3'} 為假：程式的成員測試不是集合隸屬的語義。",
      "en": "2∈A is true and 4∈A is false (still a proposition); B⊆A is true and A⊆B is false (3∈A, 3∉B); B∈𝓕 is true and {1}∈𝓕 is false although {1}⊆B; 1000000∈E is true (1000000=2·500000) and 7∈E is false. 1∈B and B∈𝓕 do not give 1∈𝓕, because ∈ is not transitive and in the typed context '1∈𝓕' is not even well formed. Python's '12' in '123' is True as a substring test, while '12'∈{'1','2','3'} is false: a program's membership test is not the semantics of set membership."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "因為 B⊆A，所以 B∈A",
          "en": "Since B⊆A, B∈A"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "A 的元素是 1、2、3 這些整數；B 是集合，不是其中任何一個（在型別化讀法中 B∈A 甚至不是良構的）。",
          "en": "The elements of A are the integers 1, 2, 3; B is a set and is none of them (in the typed reading B∈A is not even well formed)."
        }
      },
      {
        "claim": {
          "zh-Hant": "1∈B 且 B∈𝓕，所以 1∈𝓕",
          "en": "1∈B and B∈𝓕, so 1∈𝓕"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "∈ 沒有傳遞性；𝓕 的元素是集合 {1,2} 與 {3}，1 不是其中之一（S10）。",
          "en": "∈ is not transitive; the elements of 𝓕 are the sets {1,2} and {3}, and 1 is neither (S10)."
        }
      },
      {
        "claim": {
          "zh-Hant": "{1}⊆{1,2} 且 {1,2}∈𝓕，所以 {1}∈𝓕",
          "en": "{1}⊆{1,2} and {1,2}∈𝓕, so {1}∈𝓕"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "{1} 不等於 {1,2} 也不等於 {3}（S09）。",
          "en": "{1} equals neither {1,2} nor {3} (S09)."
        }
      },
      {
        "claim": {
          "zh-Hant": "Python 中 '12' in '123' 為 True，所以作為集合 '12'∈{'1','2','3'}",
          "en": "In Python '12' in '123' is True, so as sets '12'∈{'1','2','3'}"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "字串的 in 是子字串測試；'12' 不等於任何一個單字元字串（S14）。",
          "en": "in on strings is a substring test; '12' equals none of the one-character strings (S14)."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "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": "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": "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": "divides_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "整除：對整數 a、b，a∣b 表示存在整數 k 使 b=ak。",
          "en": "Divisibility: for integers a, b, a∣b means there is an integer k with b=ak."
        }
      },
      {
        "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": "eq_refl_symm_trans",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "等號的性質：u=u；若 u=v 則 v=u；若 u=v 且 v=w 則 u=w。",
          "en": "Properties of equality: u=u; if u=v then v=u; if u=v and v=w then u=w."
        }
      },
      {
        "id": "de_morgan_logic",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "邏輯的德摩根律：¬(P∧Q) ⇔ ¬P∨¬Q；¬(P∨Q) ⇔ ¬P∧¬Q。",
          "en": "De Morgan's laws for logic: ¬(P∧Q) ⇔ ¬P∨¬Q and ¬(P∨Q) ⇔ ¬P∧¬Q."
        }
      },
      {
        "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": "case_analysis",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "分情況論證：若 P∨Q 成立，且 P⇒R、Q⇒R 都已證，則 R 成立。所有情況必須涵蓋全部可能。",
          "en": "Proof by cases: if P∨Q holds and both P⇒R and Q⇒R are proved, then R holds. The cases must cover every possibility."
        }
      },
      {
        "id": "imp_intro",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "→引入（釋放假設）：若在暫時假設 P 的作用域中推出 Q，則得到 P⇒Q；此後 P 不再可當作已知使用。",
          "en": "→-introduction (discharging a hypothesis): if Q is derived inside a scope that temporarily assumes P, then P⇒Q follows, and P may no longer be used as known."
        }
      },
      {
        "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": "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": "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": "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": "two_nonzero",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "實數中 0<1，故 0<1+1=2，所以 2≠0。",
          "en": "In the reals 0<1, hence 0<1+1=2, so 2≠0."
        }
      },
      {
        "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_member",
        "kind": "cited",
        "source": {
          "mko_id": "mko-set-membership",
          "sha256": "2a438aa79c23e6d37869e1e63eb48420bcf2f114f44b58fe5bea386076b4f0db",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "給定集合 A 與對象 x，x∈A 是一個命題，表示 x 是 A 的元素。",
          "en": "Given a set A and an object x, x∈A is a proposition stating that x is an element of A."
        }
      },
      {
        "id": "list_set",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "列舉式集合：x∈{a,b,c} ⇔ x=a ∨ x=b ∨ x=c；兩個或一個元素時同理。",
          "en": "List notation: x∈{a,b,c} ⇔ x=a ∨ x=b ∨ x=c; likewise with two elements or one."
        }
      },
      {
        "id": "typed_membership",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "型別化的隸屬：x∈S 只在 x 的型別是 S 的元素型別時才是良構命題；整數不是整數的集合，整數的集合也不是整數。",
          "en": "Typed membership: x∈S is a well-formed proposition only when the type of x is the element type of S; an integer is not a set of integers, and a set of integers is not an integer."
        }
      },
      {
        "id": "int_no_gap",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "整數沒有空隙：對整數 k 與 m，必有 k≤m 或 k≥m+1。",
          "en": "No gaps in the integers: for integers k and m, k≤m or k≥m+1."
        }
      },
      {
        "id": "python_in",
        "kind": "cited",
        "source": {
          "reference": "Python Software Foundation, Python Language Reference, Section 6.10.2 Membership test operations",
          "original_reference": "Python Software Foundation, The Python Language Reference (Python 3), section 'Membership test operations'",
          "url": "https://docs.python.org/3/reference/expressions.html#membership-test-operations",
          "locator": "String and bytes membership paragraph",
          "checked_date": "2026-10-19",
          "verification": "original_verified",
          "verification_note": "Only string substring membership is used in this guide."
        },
        "needs_citation": false,
        "statement": {
          "zh-Hant": "對字串型別，x in y 為 True 當且僅當 x 是 y 的子字串；因此 '12' in '123' 的值為 True。",
          "en": "For the string type, x in y is True if and only if x is a substring of y; hence '12' in '123' evaluates to True."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N1",
        "step": "S03",
        "lhs": "4",
        "relation": "!=",
        "rhs": "1"
      },
      {
        "id": "N2",
        "step": "S03",
        "lhs": "4",
        "relation": "!=",
        "rhs": "2"
      },
      {
        "id": "N3",
        "step": "S03",
        "lhs": "4",
        "relation": "!=",
        "rhs": "3"
      },
      {
        "id": "N4",
        "step": "S07",
        "lhs": "3",
        "relation": "!=",
        "rhs": "1"
      },
      {
        "id": "N5",
        "step": "S07",
        "lhs": "3",
        "relation": "!=",
        "rhs": "2"
      },
      {
        "id": "N6",
        "step": "S09",
        "lhs": "2",
        "relation": "!=",
        "rhs": "1"
      },
      {
        "id": "N7",
        "step": "S09",
        "lhs": "1",
        "relation": "!=",
        "rhs": "3"
      },
      {
        "id": "N8",
        "step": "S11",
        "lhs": "2*500000",
        "rhs": "1000000"
      },
      {
        "id": "N9",
        "step": "S12.1",
        "lhs": "2*3",
        "relation": "<",
        "rhs": "7"
      },
      {
        "id": "N10",
        "step": "S12.2",
        "lhs": "2*4",
        "relation": ">",
        "rhs": "7"
      },
      {
        "id": "N11",
        "step": "S13",
        "lhs": "7 % 2",
        "rhs": "1"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "依 MKO：給定集合 A 與對象 x，x∈A 是一個命題，表示 x 是 A 的元素。在型別化語境中處理整數的集合與整數集合的集合，只用列舉式與建構式集合。不建立集合論公理，不展開 Lean 映射的細節（MKO 第三段只作說明）；不改動 canonical MKO 或英文 edition。",
      "en": "Follows the MKO: given a set A and an object x, x∈A is a proposition stating that x is an element of A. Works in a typed context with sets of integers and a set of sets of integers, using only list and set-builder notation. It does not set up axioms of set theory or the details of the Lean mapping (the MKO's third paragraph serves only as context), and does not change the canonical MKO or its English edition."
    },
    "md_symbols": [
      [
        "x\\in A",
        "x 是 A 的元素（一個命題）",
        "x is an element of A (a proposition)"
      ],
      [
        "B\\subseteq A",
        "B 的每個元素都是 A 的元素",
        "every element of B is an element of A"
      ],
      [
        "\\mathcal{F}",
        "元素是整數集合的集合",
        "a set whose elements are sets of integers"
      ],
      [
        "E=\\{n\\in\\mathbb{Z}\\mid 2\\mid n\\}",
        "以條件給出的偶數集合",
        "the set of even integers, given by a condition"
      ],
      [
        "\\{1\\}",
        "只含 1 的集合",
        "the set whose only element is 1"
      ]
    ],
    "md_error_controls": [
      {
        "title": "隸屬與子集合是兩種關係 / Membership and inclusion are different relations",
        "zh": "MKO 指出常見誤解是混淆 x∈A 與 B⊆A。本稿中 B⊆A（S06）但 B 不是 A 的元素；B∈𝓕（S08）而 {1}⊆B，{1} 卻不是 𝓕 的元素（S09）；1∈B、B∈𝓕 也不推出 1∈𝓕（S10）。∈ 連接一個對象與一個集合，⊆ 連接兩個同型別的集合，兩者的推理規則不同。",
        "en": "The MKO names the mistake of confusing x∈A with B⊆A. Here B⊆A (S06) but B is not an element of A; B∈𝓕 (S08) and {1}⊆B, yet {1} is not an element of 𝓕 (S09); and 1∈B, B∈𝓕 do not give 1∈𝓕 (S10). ∈ relates an object to a set, ⊆ relates two sets of the same type, and their inference rules differ."
      },
      {
        "title": "程式的成員測試不是集合語義 / A program's membership test is not set semantics",
        "zh": "MKO 的另一個誤解是把程式容器的成員測試當作所有集合論語義。依引用的 Python 參考，字串的 in 是子字串測試，'12' in '123' 為 True，但作為集合 '12'∈{'1','2','3'} 為假（S14）。用程式核對集合命題前，必須先確認該運算子的語義與 ∈ 一致。",
        "en": "Another mistake identified in the MKO is treating a program container's membership test as the whole of set semantics. By the cited Python reference, in on strings is a substring test and '12' in '123' is True, whereas the set-membership statement '12'∈{'1','2','3'} is false (S14). Before checking a set statement with a program, confirm that the operator's semantics agree with ∈."
      },
      {
        "title": "x∈A 是命題，可以為假 / x∈A is a proposition and can be false",
        "zh": "4∈A 與 7∈E 都是假的命題（S03、S13），它們仍是命題。E 以條件給出，判定 1000000∈E 只需檢查條件（S11），不必把 E 的元素列出或存放：集合不必依靠實際的容器而存在（MKO 第一段）。",
        "en": "4∈A and 7∈E are false propositions (S03, S13), and they are still propositions. E is given by a condition, so deciding 1000000∈E only requires checking the condition (S11), without listing or storing its elements: a set need not rely on a physical container to exist (the MKO's first paragraph)."
      }
    ],
    "md_open_items": [
      {
        "zh-Hant": "python_in 的字串成員測試語義已核對 Python 官方語言參考；這是文件核查，不宣稱稿件中的程式已實際執行。",
        "en": "The string-membership semantics of python_in have been checked against the official Python Language Reference. This is documentation verification, not a claim that the program in the guide was executed."
      },
      {
        "zh-Hant": "本稿以型別化語境為前提（typed_membership）；不分型別的集合論中 1∈𝓕 的判定依賴數的編碼，本稿不處理。",
        "en": "This guide presupposes a typed context (typed_membership); in untyped set theory the verdict on 1∈𝓕 depends on how numbers are coded, which is not treated here."
      }
    ]
  },
  "revision": {
    "id": "production-20261019-adopted-96",
    "source_commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
    "adopted_source_sha256": "6dd4b8c91e6e6cf5db9b127bce6c4343aa4499b9a88cd0668513c03caa224cfb",
    "original_source_sha256": "6dd4b8c91e6e6cf5db9b127bce6c4343aa4499b9a88cd0668513c03caa224cfb",
    "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."
  }
}
