{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-area-01",
  "mko_id": "mko-area",
  "title": {
    "zh-Hant": "面積：半開矩形的交集、聯集與單位格重算",
    "en": "Area: intersection and union of half-open rectangles, recounted by unit cells"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-area-01",
    "source": {
      "mko_id": "mko-area",
      "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
      "sha256": "dd727d645461b67b46876e9fedc6a33242ba8cb9ef182cf6bd74290b45ac1b58",
      "english_sha256": "3c701b4dcaf9e9568dd937b5470cb18f890bd452abc9d2716d75a66401416371"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "numeric_evaluation",
      "order_basics",
      "set_operations_def",
      "cartesian_product_def",
      "finite_counting_basics"
    ],
    "goal": {
      "zh-Hant": "在等單位正交座標系中，設 A=[0,4)×[0,3)、B=[2,6)×[1,5)。求 A 與 B 的面積，求出交集 A∩B 及其面積，用包含排除求 A∪B 的面積，並以「不同單位格的個數」獨立重算。再設 C=[4,7)×[0,3)（與 A 只在 x=4 處相觸）與 Z=[3,3)×[0,5)（寬為零），求 A∩C、A∪C 的面積與 Z 的面積。",
      "en": "In an equal-unit orthonormal frame let A=[0,4)×[0,3) and B=[2,6)×[1,5). Find the areas of A and B, find the intersection A∩B and its area, find the area of A∪B by inclusion and exclusion, and recount it independently as the number of distinct unit cells. Then let C=[4,7)×[0,3) (touching A only at x=4) and Z=[3,3)×[0,5) (zero width), and find the areas of A∩C, A∪C and Z."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "框架與約定：等單位正交座標系；半開約定 [a,b)={x∈ℝ ∣ a≤x<b}；端點為整數；面積單位為所用長度單位的平方（MKO 假設 a1、a3）。",
          "en": "Frame and conventions: an equal-unit orthonormal frame; the half-open convention [a,b)={x∈ℝ ∣ a≤x<b}; integer endpoints; area is measured in the square of the chosen length unit (MKO assumptions a1, a3)."
        }
      },
      {
        "id": "G2",
        "statement": {
          "zh-Hant": "A=[0,4)×[0,3)，B=[2,6)×[1,5)。",
          "en": "A=[0,4)×[0,3) and B=[2,6)×[1,5)."
        }
      },
      {
        "id": "G3",
        "statement": {
          "zh-Hant": "C=[4,7)×[0,3)，Z=[3,3)×[0,5)。",
          "en": "C=[4,7)×[0,3) and Z=[3,3)×[0,5)."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "\\operatorname{area}([x_0,x_1)\\times[y_0,y_1))",
        "after_tex": "(x_1-x_0)(y_1-y_0)\\quad(x_0\\le x_1,\\ y_0\\le y_1)",
        "relation": "definition",
        "rule": "mko_area_def",
        "conditions": [
          "x_0\\le x_1",
          "y_0\\le y_1"
        ],
        "explanation": {
          "zh-Hant": "寫出 MKO 的受限模型：端點有序的半開矩形面積是寬乘高；單位格面積一，有限個不同單位格的聯集面積是格子個數；兩矩形聯集面積是兩面積之和減交集面積。面積以平方單位計，與周長不同。",
          "en": "State the MKO's restricted model: a half-open rectangle with ordered endpoints has area width times height; a unit cell has area one, and a finite union of distinct unit cells has area equal to their number; the area of the union of two rectangles is the sum of their areas minus the area of their intersection. Area is measured in square units and is not the perimeter."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "mko_area_def"
          ],
          "explanation": {
            "zh-Hant": "此步只寫出定義與 MKO 給定的兩個規則，不推出新事實；本稿不由測度論推導這些規則。",
            "en": "This step only states the definition and the two rules given by the MKO; it derives no new fact. This guide does not derive these rules from measure theory."
          }
        },
        "leaf_basis": "mko_area_def + def_unfold"
      },
      {
        "id": "S02",
        "uses": [
          "S01",
          "G2"
        ],
        "before_tex": "\\operatorname{area}(A)",
        "after_tex": "(4-0)(3-0)=12",
        "relation": "equivalent",
        "rule": "mko_area_def",
        "conditions": [
          "0\\le 4",
          "0\\le 3"
        ],
        "explanation": {
          "zh-Hant": "A=[0,4)×[0,3)，端點有序（0≤4、0≤3），所以 S01 的公式適用：寬 4−0=4，高 3−0=3，面積 4·3=12 平方單位。",
          "en": "A=[0,4)×[0,3) has ordered endpoints (0≤4, 0≤3), so the formula of S01 applies: width 4−0=4, height 3−0=3, area 4·3=12 square units."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "mko_area_def",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "精確整數計算（N1），兩邊是同一個數，雙向成立。",
            "en": "An exact integer computation (N1); both sides are the same number, so it holds both ways."
          }
        },
        "leaf_basis": "mko_area_def + numeric_evaluation"
      },
      {
        "id": "S03",
        "uses": [
          "S01",
          "G2"
        ],
        "before_tex": "\\operatorname{area}(B)",
        "after_tex": "(6-2)(5-1)=16",
        "relation": "equivalent",
        "rule": "mko_area_def",
        "conditions": [
          "2\\le 6",
          "1\\le 5"
        ],
        "explanation": {
          "zh-Hant": "B=[2,6)×[1,5)：寬 6−2=4，高 5−1=4，面積 16 平方單位。寬是右端點減左端點，不是右端點本身。",
          "en": "B=[2,6)×[1,5): width 6−2=4, height 5−1=4, area 16 square units. The width is the right endpoint minus the left endpoint, not the right endpoint itself."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "mko_area_def",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "精確整數計算（N2），雙向成立。",
            "en": "An exact integer computation (N2), two-way."
          }
        },
        "leaf_basis": "mko_area_def + numeric_evaluation"
      },
      {
        "id": "S04",
        "uses": [
          "G2",
          "L_interval_cap"
        ],
        "before_tex": "[0,4)\\cap[2,6)",
        "after_tex": "[\\max(0,2),\\ \\min(4,6))=[2,4)",
        "relation": "equivalent",
        "rule": "L_interval_cap",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依引理 L_interval_cap（a₀=0、a₁=4、b₀=2、b₁=6）：兩個 x 區間的交集是 [max(0,2), min(4,6))=[2,4)。引理在 S04.1 到 S04.3 證明。",
          "en": "By Lemma L_interval_cap (a₀=0, a₁=4, b₀=2, b₁=6) the intersection of the two x-intervals is [max(0,2), min(4,6))=[2,4). The lemma is proved in S04.1 to S04.3."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "L_interval_cap",
            "set_extensionality"
          ],
          "explanation": {
            "zh-Hant": "引理給出兩集合有相同元素（雙向），依集合外延性兩者相等。",
            "en": "The lemma shows that the two sets have the same elements (both directions), so they are equal by extensionality."
          }
        },
        "leaf_basis": "L_interval_cap + numeric_evaluation"
      },
      {
        "id": "S04.1",
        "uses": [
          "set_operations_def",
          "G1"
        ],
        "before_tex": "x\\in[a_0,a_1)\\cap[b_0,b_1)",
        "after_tex": "(a_0\\le x\\ \\land\\ b_0\\le x)\\ \\land\\ (x<a_1\\ \\land\\ x<b_1)",
        "relation": "equivalent",
        "rule": "set_operations_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依交集定義，x 屬於交集 ⇔ x∈[a₀,a₁) 且 x∈[b₀,b₁)。依半開約定（G1），每個成員關係是兩個不等式。四個合取項重新分組：兩個下界條件放一起，兩個上界條件放一起；合取可交換、可結合，所以真假不變。",
          "en": "By the definition of intersection, x lies in the intersection ⇔ x∈[a₀,a₁) and x∈[b₀,b₁). By the half-open convention (G1) each membership is a pair of inequalities. Regroup the four conjuncts, putting the two lower-bound conditions together and the two upper-bound conditions together; conjunction is commutative and associative, so the truth value is unchanged."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "set_operations_def",
            "and_intro_elim"
          ],
          "explanation": {
            "zh-Hant": "交集定義與重新分組都是雙向的。",
            "en": "The definition of intersection and the regrouping are both two-way."
          }
        },
        "leaf_basis": "set_operations_def + and_intro_elim"
      },
      {
        "id": "S04.2",
        "uses": [
          "S04.1",
          "max_min_def"
        ],
        "before_tex": "a_0\\le x\\ \\land\\ b_0\\le x",
        "after_tex": "\\max(a_0,b_0)\\le x",
        "relation": "equivalent",
        "rule": "case_analysis",
        "conditions": [],
        "explanation": {
          "zh-Hant": "分兩種情況（依三分律涵蓋全部）。情況 a₀≥b₀：max(a₀,b₀)=a₀。正向：由 a₀≤x 直接得到。反向：a₀≤x，且 b₀≤a₀≤x，依傳遞得 b₀≤x。情況 a₀<b₀：max(a₀,b₀)=b₀，角色互換，同理。",
          "en": "Split into two cases (covering everything by trichotomy). Case a₀≥b₀: max(a₀,b₀)=a₀. Forward: a₀≤x gives it directly. Backward: a₀≤x, and b₀≤a₀≤x gives b₀≤x by transitivity. Case a₀<b₀: max(a₀,b₀)=b₀ and the roles exchange, with the same argument."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "max_min_def",
            "order_basics",
            "case_analysis"
          ],
          "explanation": {
            "zh-Hant": "每種情況兩個方向都已說明；兩種情況涵蓋所有 a₀、b₀。",
            "en": "Both directions are argued in each case, and the two cases cover all a₀, b₀."
          }
        },
        "leaf_basis": "case_analysis + max_min_def + order_basics"
      },
      {
        "id": "S04.3",
        "uses": [
          "S04.1",
          "S04.2",
          "max_min_def"
        ],
        "before_tex": "x<a_1\\ \\land\\ x<b_1",
        "after_tex": "x<\\min(a_1,b_1)",
        "relation": "equivalent",
        "rule": "case_analysis",
        "conditions": [],
        "explanation": {
          "zh-Hant": "情況 a₁≤b₁：min(a₁,b₁)=a₁。正向直接成立；反向：x<a₁≤b₁ 給出 x<b₁。情況 a₁>b₁：min=b₁，同理。結合 S04.1、S04.2：x∈[a₀,a₁)∩[b₀,b₁) ⇔ max(a₀,b₀)≤x<min(a₁,b₁) ⇔ x∈[max(a₀,b₀), min(a₁,b₁))。若 max(a₀,b₀)≥min(a₁,b₁)，沒有 x 同時滿足兩個不等式，交集為空。S04.1 到 S04.3 合起來證得引理 L_interval_cap。",
          "en": "Case a₁≤b₁: min(a₁,b₁)=a₁. Forward is immediate; backward: x<a₁≤b₁ gives x<b₁. Case a₁>b₁: min=b₁, the same. Combining with S04.1 and S04.2: x∈[a₀,a₁)∩[b₀,b₁) ⇔ max(a₀,b₀)≤x<min(a₁,b₁) ⇔ x∈[max(a₀,b₀), min(a₁,b₁)). If max(a₀,b₀)≥min(a₁,b₁), no x satisfies both inequalities and the intersection is empty. S04.1 to S04.3 together prove Lemma L_interval_cap."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "max_min_def",
            "order_basics",
            "case_analysis"
          ],
          "explanation": {
            "zh-Hant": "與 S04.2 相同的雙向論證，只是換成上界與嚴格不等式。",
            "en": "The same two-way argument as in S04.2, with upper bounds and strict inequalities."
          }
        },
        "leaf_basis": "case_analysis + max_min_def + order_basics"
      },
      {
        "id": "S05",
        "uses": [
          "G2",
          "L_interval_cap"
        ],
        "before_tex": "[0,3)\\cap[1,5)",
        "after_tex": "[\\max(0,1),\\ \\min(3,5))=[1,3)",
        "relation": "equivalent",
        "rule": "L_interval_cap",
        "conditions": [],
        "explanation": {
          "zh-Hant": "對 y 區間用同一引理（a₀=0、a₁=3、b₀=1、b₁=5）：交集是 [1,3)。",
          "en": "Apply the same lemma to the y-intervals (a₀=0, a₁=3, b₀=1, b₁=5): the intersection is [1,3)."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "L_interval_cap",
            "set_extensionality"
          ],
          "explanation": {
            "zh-Hant": "與 S04 相同，雙向成立。",
            "en": "As in S04, two-way."
          }
        },
        "leaf_basis": "L_interval_cap + numeric_evaluation"
      },
      {
        "id": "S06",
        "uses": [
          "S04",
          "S05",
          "G2"
        ],
        "before_tex": "A\\cap B",
        "after_tex": "([0,4)\\cap[2,6))\\times([0,3)\\cap[1,5))=[2,4)\\times[1,3)",
        "relation": "equivalent",
        "rule": "cartesian_product_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "(x,y)∈A∩B ⇔ (x∈[0,4) 且 y∈[0,3)) 且 (x∈[2,6) 且 y∈[1,5)) ⇔ x∈[0,4)∩[2,6) 且 y∈[0,3)∩[1,5)。所以兩矩形的交集仍是矩形，各邊是對應區間的交集；代入 S04、S05 得 [2,4)×[1,3)。",
          "en": "(x,y)∈A∩B ⇔ (x∈[0,4) and y∈[0,3)) and (x∈[2,6) and y∈[1,5)) ⇔ x∈[0,4)∩[2,6) and y∈[0,3)∩[1,5). So the intersection of two rectangles is again a rectangle whose sides are the intersections of the corresponding intervals; substituting S04 and S05 gives [2,4)×[1,3)."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "cartesian_product_def",
            "set_operations_def",
            "and_intro_elim"
          ],
          "explanation": {
            "zh-Hant": "每一個 ⇔ 都是定義展開或合取的重新分組，雙向成立。",
            "en": "Each ⇔ is an unfolding of a definition or a regrouping of conjunctions, so it is two-way."
          }
        },
        "leaf_basis": "cartesian_product_def + set_operations_def + and_intro_elim"
      },
      {
        "id": "S07",
        "uses": [
          "S01",
          "S06"
        ],
        "before_tex": "\\operatorname{area}(A\\cap B)",
        "after_tex": "\\max(0,4-2)\\cdot\\max(0,3-1)=2\\cdot 2=4",
        "relation": "equivalent",
        "rule": "mko_area_def",
        "conditions": [
          "2\\le 4",
          "1\\le 3"
        ],
        "explanation": {
          "zh-Hant": "依 MKO 假設 a2，交集寬為 max(0, min(上界)−max(下界))=max(0,4−2)=2，高為 max(0,3−1)=2。外層的 max(0, ·) 保證交集為空時寬為 0，而不是負數。這裡 2≤4、1≤3，[2,4)×[1,3) 是端點有序的矩形，面積 4。",
          "en": "By MKO assumption a2 the width of the intersection is max(0, min(upper endpoints)−max(lower endpoints))=max(0,4−2)=2 and the height is max(0,3−1)=2. The outer max(0, ·) makes the width 0 rather than negative when the intersection is empty. Here 2≤4 and 1≤3, so [2,4)×[1,3) is a rectangle with ordered endpoints and area 4."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "mko_area_def",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "精確計算（N7 到 N9），雙向成立。",
            "en": "Exact computation (N7 to N9), two-way."
          }
        },
        "leaf_basis": "mko_area_def + max_min_def + numeric_evaluation"
      },
      {
        "id": "S08",
        "uses": [
          "S02",
          "S03",
          "S07",
          "mko_area_def"
        ],
        "before_tex": "\\operatorname{area}(A\\cup B)",
        "after_tex": "12+16-4=24",
        "relation": "theorem_application",
        "rule": "mko_area_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依 MKO 的兩矩形包含排除：area(A∪B)=area(A)+area(B)−area(A∩B)=12+16−4=24。交集同時被算在 A 與 B 裡，所以要扣回一次；直接相加 28 會重算交集。",
          "en": "By the MKO's inclusion and exclusion for two rectangles: area(A∪B)=area(A)+area(B)−area(A∩B)=12+16−4=24. The intersection is counted in both A and B, so it is subtracted once; adding directly to get 28 would count it twice."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S02",
            "S03",
            "S07",
            "mko_area_def"
          ],
          "explanation": {
            "zh-Hant": "使用的是 MKO 陳述中的公式（cited），本稿未由測度推導；S09 到 S11 以單位格計數對本例獨立重算。",
            "en": "The formula used is the one in the MKO statement (cited) and is not derived here from a measure; S09 to S11 recount this example independently by unit cells."
          }
        },
        "leaf_basis": "mko_area_def + numeric_evaluation"
      },
      {
        "id": "S09",
        "uses": [
          "G1",
          "G2",
          "cell_decomp"
        ],
        "before_tex": "A,\\ B",
        "after_tex": "A=\\bigcup_{0\\le i\\le 3,\\ 0\\le j\\le 2}Q_{i,j},\\quad B=\\bigcup_{2\\le i\\le 5,\\ 1\\le j\\le 4}Q_{i,j}",
        "relation": "equivalent",
        "rule": "cell_decomp",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依 cell_decomp，[0,4) 是 i=0,1,2,3 的 [i,i+1) 之聯集，[0,3) 是 j=0,1,2 的 [j,j+1) 之聯集；兩個聯集的笛卡兒積是各對的積之聯集，所以 A 是 4·3=12 個單位格 Q_{i,j} 的聯集。同理 B 是 i∈{2,3,4,5}、j∈{1,2,3,4} 的 16 個單位格。半開約定使不同單位格兩兩不交：每個點只在 (⌊x⌋,⌊y⌋) 那一格。",
          "en": "By cell_decomp, [0,4) is the union of [i,i+1) for i=0,1,2,3 and [0,3) is the union of [j,j+1) for j=0,1,2; the Cartesian product of two unions is the union of the products of the pairs, so A is the union of 4·3=12 unit cells Q_{i,j}. Likewise B is the union of the 16 cells with i∈{2,3,4,5} and j∈{1,2,3,4}. The half-open convention makes distinct cells pairwise disjoint: each point lies only in the cell (⌊x⌋,⌊y⌋)."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "cell_decomp",
            "cartesian_product_def",
            "set_extensionality"
          ],
          "explanation": {
            "zh-Hant": "每點屬於 A 當且僅當它屬於所列某一格，兩集合相等，雙向成立。",
            "en": "A point is in A exactly when it is in one of the listed cells, so the sets are equal, two-way."
          }
        },
        "leaf_basis": "cell_decomp + cartesian_product_def + finite_counting_basics"
      },
      {
        "id": "S10",
        "uses": [
          "S09",
          "set_operations_def"
        ],
        "before_tex": "A\\cup B",
        "after_tex": "\\bigcup_{(i,j)\\in I_A\\cup I_B}Q_{i,j}",
        "relation": "equivalent",
        "rule": "set_operations_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "記 I_A、I_B 為 A、B 的格子指標集合。點在 A∪B ⇔ 它在某個 (i,j)∈I_A 的格子或某個 (i,j)∈I_B 的格子中 ⇔ 它在某個 (i,j)∈I_A∪I_B 的格子中。指標以集合合併，同一格（例如 Q_{2,1}）出現在兩邊也只算一次（MKO 假設 a3：按座標去重）。",
          "en": "Let I_A and I_B be the index sets of the cells of A and B. A point is in A∪B ⇔ it is in a cell with (i,j)∈I_A or in one with (i,j)∈I_B ⇔ it is in a cell with (i,j)∈I_A∪I_B. Indices are merged as a set, so a cell appearing on both sides (for example Q_{2,1}) counts once (MKO assumption a3: deduplicate by coordinates)."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "set_operations_def",
            "set_extensionality"
          ],
          "explanation": {
            "zh-Hant": "聯集定義是雙向的。",
            "en": "The definition of union is two-way."
          }
        },
        "leaf_basis": "set_operations_def + set_extensionality"
      },
      {
        "id": "S11",
        "uses": [
          "S10",
          "S09",
          "finite_counting_basics",
          "mko_area_def"
        ],
        "before_tex": "|I_A\\cup I_B|",
        "after_tex": "4+6+6+4+4=24",
        "relation": "equivalent",
        "rule": "finite_counting_basics",
        "conditions": [],
        "explanation": {
          "zh-Hant": "逐列（固定 j）數不同的 i：j=0 只有 A，i∈{0,1,2,3}，4 格；j=1 時 A 給 {0,1,2,3}、B 給 {2,3,4,5}，合併為 {0,1,2,3,4,5}，6 格；j=2 同樣 6 格；j=3 只有 B，{2,3,4,5}，4 格；j=4 也是 4 格。不同列互斥，所以個數相加（finite_counting_basics）得 24。依 MKO，不同單位格聯集的面積等於格數，所以 area(A∪B)=24，與 S08 一致。",
          "en": "Count the distinct i row by row (fixed j): for j=0 only A contributes, i∈{0,1,2,3}, 4 cells; for j=1, A gives {0,1,2,3} and B gives {2,3,4,5}, merging to {0,1,2,3,4,5}, 6 cells; j=2 likewise 6 cells; j=3 only B, {2,3,4,5}, 4 cells; j=4 also 4 cells. Different rows are disjoint, so the counts add (finite_counting_basics) to 24. By the MKO the area of a union of distinct unit cells is their number, so area(A∪B)=24, in agreement with S08."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "finite_counting_basics",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "逐列計數是把集合分成互斥部分後的精確計數（N13）；它與 S08 用的是不同方法，兩者一致。",
            "en": "The row count is an exact count after splitting the set into disjoint parts (N13); it uses a different method from S08, and the two agree."
          }
        },
        "leaf_basis": "finite_counting_basics + mko_area_def + numeric_evaluation"
      },
      {
        "id": "S12",
        "uses": [
          "G3",
          "L_interval_cap",
          "S01",
          "S02"
        ],
        "before_tex": "A\\cap C,\\ C=[4,7)\\times[0,3)",
        "after_tex": "[\\max(0,4),\\min(4,7))=[4,4)=\\varnothing,\\ \\operatorname{area}(A\\cup C)=12+9-0=21",
        "relation": "implies",
        "rule": "L_interval_cap",
        "conditions": [],
        "explanation": {
          "zh-Hant": "x 方向：[0,4)∩[4,7)=[max(0,4), min(4,7))=[4,4)，沒有 x 滿足 4≤x<4，是空集；所以 A∩C=∅，寬 max(0,4−4)=0，交集面積 0。C 的面積是 (7−4)(3−0)=9，故 area(A∪C)=12+9−0=21。例如點 (4,1)∈C，但 4∉[0,4)，所以 (4,1)∉A：只觸邊的兩個半開矩形沒有共同點。",
          "en": "In the x-direction: [0,4)∩[4,7)=[max(0,4), min(4,7))=[4,4), and no x satisfies 4≤x<4, so it is empty; hence A∩C=∅, width max(0,4−4)=0 and intersection area 0. The area of C is (7−4)(3−0)=9, so area(A∪C)=12+9−0=21. For example (4,1)∈C but 4∉[0,4), so (4,1)∉A: two half-open rectangles that merely touch share no point."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "L_interval_cap",
            "mko_area_def",
            "S02"
          ],
          "explanation": {
            "zh-Hant": "依賴引理與 MKO 的包含排除；只宣稱這一對矩形的結果。",
            "en": "It relies on the lemma and the MKO's inclusion and exclusion; it claims the result for this pair only."
          }
        },
        "leaf_basis": "L_interval_cap + mko_area_def + numeric_evaluation"
      },
      {
        "id": "S13",
        "uses": [
          "G1",
          "G3",
          "S01",
          "S02"
        ],
        "before_tex": "Z=[3,3)\\times[0,5)",
        "after_tex": "Z=\\varnothing,\\ \\operatorname{area}(Z)=(3-3)(5-0)=0,\\ \\operatorname{area}(A\\cup Z)=12",
        "relation": "implies",
        "rule": "mko_area_def",
        "conditions": [
          "3\\le 3"
        ],
        "explanation": {
          "zh-Hant": "依半開約定，[3,3) 需要 3≤x<3，沒有這樣的 x，所以 [3,3)=∅，Z=∅×[0,5)=∅。公式也給 (3−3)(5−0)=0·5=0（mul_zero）。A∪Z=A∪∅=A，面積仍是 12。高為 5 不會讓空矩形有面積（MKO：任一邊長零時矩形為空、面積零）。",
          "en": "By the half-open convention, [3,3) needs 3≤x<3, which no x satisfies, so [3,3)=∅ and Z=∅×[0,5)=∅. The formula also gives (3−3)(5−0)=0·5=0 (mul_zero). A∪Z=A∪∅=A, whose area is still 12. A height of 5 does not give the empty rectangle any area (MKO: zero width or height makes the rectangle empty, with area zero)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "mko_area_def",
            "mul_zero"
          ],
          "explanation": {
            "zh-Hant": "空集合與零面積兩件事分別由半開約定與公式得到，互相印證。",
            "en": "Emptiness and zero area come separately from the half-open convention and from the formula, and they confirm each other."
          }
        },
        "leaf_basis": "mko_area_def + mul_zero + set_operations_def"
      },
      {
        "id": "S14",
        "uses": [
          "S02",
          "S03",
          "S07",
          "S08",
          "S11",
          "S12",
          "S13"
        ],
        "before_tex": "\\text{tasks of the goal}",
        "after_tex": "\\operatorname{area}(A\\cup B)=24,\\ \\operatorname{area}(A\\cup C)=21,\\ \\operatorname{area}(Z)=0",
        "relation": "implies",
        "rule": "and_intro_elim",
        "conditions": [],
        "explanation": {
          "zh-Hant": "合併：area(A)=12、area(B)=16、A∩B=[2,4)×[1,3) 面積 4、area(A∪B)=24（包含排除與單位格計數一致）、A∩C=∅ 且 area(A∪C)=21、area(Z)=0。所有面積答案的單位都是長度單位的平方。",
          "en": "Combine: area(A)=12, area(B)=16, A∩B=[2,4)×[1,3) with area 4, area(A∪B)=24 (inclusion and exclusion and the cell count agree), A∩C=∅ and area(A∪C)=21, area(Z)=0. Every area value is in square units."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S02",
            "S03",
            "S07",
            "S08",
            "S11",
            "S12",
            "S13"
          ],
          "explanation": {
            "zh-Hant": "目標 G：題目要求的各個面積。足夠條件 H：S02 到 S13 的結論；H⇒G 只用合取。H 由 G1 到 G3 正向推出，沒有把 G 當作前提。",
            "en": "Goal G: the areas asked for. Sufficient condition H: the conclusions of S02 to S13; H⇒G uses only conjunction. H is derived forwards from G1 to G3; G is never used as a premise."
          }
        },
        "leaf_basis": "and_intro_elim"
      }
    ],
    "result": {
      "zh-Hant": "area(A)=12，area(B)=16，A∩B=[2,4)×[1,3) 面積 4，area(A∪B)=12+16−4=24，並由 24 個不同單位格獨立重算確認。只觸邊的 C 與 A 交集為空，area(A∪C)=21；寬為零的 Z 是空集，面積 0。單位為平方單位。",
      "en": "area(A)=12, area(B)=16, A∩B=[2,4)×[1,3) with area 4, and area(A∪B)=12+16−4=24, confirmed independently by 24 distinct unit cells. C merely touches A, so A∩C=∅ and area(A∪C)=21; Z has zero width, is empty and has area 0. Units are square units."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "area(A∪B)=12+16=28",
          "en": "area(A∪B)=12+16=28"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "交集 [2,4)×[1,3) 面積 4 被算兩次；正確值 24。",
          "en": "The intersection [2,4)×[1,3) of area 4 is counted twice; the correct value is 24."
        }
      },
      {
        "claim": {
          "zh-Hant": "Z=[3,3)×[0,5) 的高是 5，所以面積是 5",
          "en": "Z=[3,3)×[0,5) has height 5, so its area is 5"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "寬 3−3=0，Z 是空集，面積 0·5=0。",
          "en": "The width is 3−3=0, Z is empty, and its area is 0·5=0."
        }
      },
      {
        "claim": {
          "zh-Hant": "A 與 C 沿 x=4 重疊，所以 area(A∪C)<21",
          "en": "A and C overlap along x=4, so area(A∪C)<21"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "4∉[0,4)，A∩C=∅；area(A∪C)=12+9=21。",
          "en": "4∉[0,4), so A∩C=∅ and area(A∪C)=12+9=21."
        }
      },
      {
        "claim": {
          "zh-Hant": "A 的面積是 2(4+3)=14",
          "en": "The area of A is 2(4+3)=14"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "14 是周長；面積是 4·3=12（MKO：矩形的幾何量不是周長）。",
          "en": "14 is the perimeter; the area is 4·3=12 (MKO: the area of a rectangle is not its perimeter)."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "numeric_evaluation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "明確整數或有理數算式的精確求值；可以獨立重算。",
          "en": "Exact evaluation of an explicit integer or rational expression; independently recomputable."
        }
      },
      {
        "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": "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": "cartesian_product_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "笛卡兒積：A×B 是所有有序對 (a,b)（a∈A、b∈B）的集合；(a,b)=(c,d) ⇔ a=c 且 b=d。",
          "en": "Cartesian product: A×B is the set of ordered pairs (a,b) with a∈A and b∈B; (a,b)=(c,d) ⇔ a=c and b=d."
        }
      },
      {
        "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": "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": "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": "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": "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": "mul_zero",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "乘以零：u·0=0。理由：u·0=u·(0+0)=u·0+u·0，兩邊同減 u·0 得 0=u·0。",
          "en": "Multiplying by zero: u·0=0. Reason: u·0=u·(0+0)=u·0+u·0; subtracting u·0 from both sides gives 0=u·0."
        }
      },
      {
        "id": "mko_area_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-area",
          "sha256": "dd727d645461b67b46876e9fedc6a33242ba8cb9ef182cf6bd74290b45ac1b58",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "在等單位正交座標系，半開矩形 [x0,x1)×[y0,y1)（x0≤x1、y0≤y1）面積為 (x1−x0)(y1−y0)。任一邊長零時矩形為空、面積零。整數單位格 [i,i+1)×[j,j+1) 面積一，有限聯集面積為不同格子的個數；兩矩形聯集面積為各面積和減交集面積。",
          "en": "In an equal-unit orthonormal frame, a half-open rectangle [x0,x1)×[y0,y1) with x0≤x1 and y0≤y1 has area (x1−x0)(y1−y0). Zero width or height makes it empty, with area zero. An integer unit cell [i,i+1)×[j,j+1) has area one, and a finite union of distinct such cells has area equal to their count. For two such rectangles, area(A∪B)=area(A)+area(B)−area(A∩B)."
        }
      },
      {
        "id": "max_min_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "max(u,v)：u≥v 時為 u，否則為 v；min(u,v)：u≤v 時為 u，否則為 v。",
          "en": "max(u,v) is u if u≥v and v otherwise; min(u,v) is u if u≤v and v otherwise."
        }
      },
      {
        "id": "cell_decomp",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "對整數 a≤b，[a,b) 是 b−a 個兩兩不交的單位區間 [i,i+1)（i 從 a 到 b−1）的聯集；每個 x∈[a,b) 恰屬於 i=⌊x⌋ 的那一個。",
          "en": "For integers a≤b, [a,b) is the union of the b−a pairwise disjoint unit intervals [i,i+1) with i running from a to b−1; each x∈[a,b) lies in exactly the one with i=⌊x⌋."
        }
      },
      {
        "id": "L_interval_cap",
        "kind": "lemma",
        "proved_in": [
          "S04.1",
          "S04.2",
          "S04.3"
        ],
        "statement": {
          "zh-Hant": "對實數 a₀、a₁、b₀、b₁：[a₀,a₁)∩[b₀,b₁)=[max(a₀,b₀), min(a₁,b₁))；當 max(a₀,b₀)≥min(a₁,b₁) 時右邊為空集。",
          "en": "For reals a₀, a₁, b₀, b₁: [a₀,a₁)∩[b₀,b₁)=[max(a₀,b₀), min(a₁,b₁)); when max(a₀,b₀)≥min(a₁,b₁) the right side is empty."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N1",
        "step": "S02",
        "lhs": "(4-0)*(3-0)",
        "rhs": "12"
      },
      {
        "id": "N2",
        "step": "S03",
        "lhs": "(6-2)*(5-1)",
        "rhs": "16"
      },
      {
        "id": "N3",
        "step": "S04",
        "lhs": "max(0,2)",
        "rhs": "2"
      },
      {
        "id": "N4",
        "step": "S04",
        "lhs": "min(4,6)",
        "rhs": "4"
      },
      {
        "id": "N5",
        "step": "S05",
        "lhs": "max(0,1)",
        "rhs": "1"
      },
      {
        "id": "N6",
        "step": "S05",
        "lhs": "min(3,5)",
        "rhs": "3"
      },
      {
        "id": "N7",
        "step": "S07",
        "lhs": "max(0,min(4,6)-max(0,2))",
        "rhs": "2"
      },
      {
        "id": "N8",
        "step": "S07",
        "lhs": "max(0,min(3,5)-max(0,1))",
        "rhs": "2"
      },
      {
        "id": "N9",
        "step": "S07",
        "lhs": "2*2",
        "rhs": "4"
      },
      {
        "id": "N10",
        "step": "S08",
        "lhs": "12+16-4",
        "rhs": "24"
      },
      {
        "id": "N11",
        "step": "S09",
        "lhs": "4*3",
        "rhs": "12"
      },
      {
        "id": "N12",
        "step": "S09",
        "lhs": "4*4",
        "rhs": "16"
      },
      {
        "id": "N13",
        "step": "S11",
        "lhs": "4+6+6+4+4",
        "rhs": "24"
      },
      {
        "id": "N14",
        "lhs": "12+16",
        "relation": "!=",
        "rhs": "24"
      },
      {
        "id": "N15",
        "step": "S12",
        "lhs": "max(0,min(4,7)-max(0,4))",
        "rhs": "0"
      },
      {
        "id": "N16",
        "step": "S12",
        "lhs": "(7-4)*(3-0)",
        "rhs": "9"
      },
      {
        "id": "N17",
        "step": "S12",
        "lhs": "12+9-0",
        "rhs": "21"
      },
      {
        "id": "N18",
        "step": "S13",
        "lhs": "(3-3)*(5-0)",
        "rhs": "0"
      },
      {
        "id": "N19",
        "lhs": "2*(4+3)",
        "relation": "!=",
        "rhs": "4*3"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "只在 MKO 的受限模型內：整數端點的半開矩形與有限個單位格的聯集。完整證明兩個半開區間的交集公式；矩形面積公式與兩矩形的包含排除取自 MKO 陳述（cited），並以單位格計數對本例獨立重算。不處理一般曲面、可測集、積分或面積的存在性，也不做 Lean 的 box volume 橋接；不改動 canonical MKO 或英文 edition。",
      "en": "Stays inside the MKO's restricted model: half-open rectangles with integer endpoints and finite unions of unit cells. It fully proves the intersection formula for two half-open intervals; the rectangle area formula and inclusion and exclusion for two rectangles are taken from the MKO statement (cited) and are recounted independently for this example by counting unit cells. It does not treat general surfaces, measurable sets, integrals or the existence of area, and does not build the Lean box-volume bridge; it does not change the canonical MKO or its English edition."
    },
    "md_symbols": [
      [
        "[a,b)",
        "半開區間 {x ∣ a≤x<b}",
        "the half-open interval {x ∣ a≤x<b}"
      ],
      [
        "[x_0,x_1)\\times[y_0,y_1)",
        "半開矩形",
        "a half-open rectangle"
      ],
      [
        "\\operatorname{area}(S)",
        "S 的面積（平方單位）",
        "the area of S (square units)"
      ],
      [
        "Q_{i,j}",
        "單位格 [i,i+1)×[j,j+1)",
        "the unit cell [i,i+1)×[j,j+1)"
      ],
      [
        "\\max,\\ \\min",
        "兩數中較大、較小者",
        "the larger and the smaller of two numbers"
      ]
    ],
    "md_error_controls": [
      {
        "title": "聯集不能直接相加 / Areas of a union do not simply add",
        "zh": "MKO 指出的誤解是聯集直接相加。12+16=28 把 A∩B 的 4 個單位格算了兩次；扣回一次得 24，與 S11 逐格計數一致。只有在交集面積為零時（如 A 與 C）才可以直接相加。",
        "en": "The misconception the MKO names is adding areas of a union directly. 12+16=28 counts the 4 unit cells of A∩B twice; subtracting them once gives 24, which matches the cell count in S11. Areas may be added directly only when the intersection has area zero (as for A and C)."
      },
      {
        "title": "重複列出的格子不增加面積 / A cell listed twice adds no area",
        "zh": "Q_{2,1} 同時是 A 與 B 的格子。把 A 的格子與 B 的格子串在一起數會得到 28 筆，但不同格子只有 24 個。面積數的是不同格子（按座標去重），不是列表長度。",
        "en": "Q_{2,1} is a cell of both A and B. Concatenating the cell lists of A and B gives 28 entries, but there are only 24 distinct cells. Area counts distinct cells (deduplicated by coordinates), not the length of a list."
      },
      {
        "title": "零寬矩形沒有面積 / A zero-width rectangle has no area",
        "zh": "Z=[3,3)×[0,5) 的高是 5，但寬是 0，依半開約定它是空集，面積 0（S13）。不能因為某一邊非零就認為它有面積。",
        "en": "Z=[3,3)×[0,5) has height 5 but width 0; by the half-open convention it is empty and has area 0 (S13). A nonzero side does not give it area."
      }
    ],
    "md_open_items": [
      {
        "zh-Hant": "兩矩形的包含排除與「不同單位格聯集的面積等於格數」取自 MKO 陳述，本稿未由測度論推導；S11 的逐格計數只對本例獨立重算。",
        "en": "Inclusion and exclusion for two rectangles and 'the area of a union of distinct unit cells is their number' are taken from the MKO statement and are not derived from measure theory here; the cell count in S11 recounts this example only."
      },
      {
        "zh-Hant": "cell_decomp（以 ⌊x⌋ 把半開整數區間分成單位區間）作為前提使用，未在本稿證明。",
        "en": "cell_decomp (splitting a half-open integer interval into unit intervals by ⌊x⌋) is used as a prerequisite and is not proved here."
      },
      {
        "zh-Hant": "MKO 的 formal next（二維 box volume 與有限聯集的橋接）未做。",
        "en": "The MKO's formal next step (bridging two-dimensional box volume and finite unions) is not done."
      }
    ]
  },
  "revision": {
    "id": "production-20261019-adopted-96",
    "source_commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
    "adopted_source_sha256": "a9b6c38256eea19aea8f38f8d048fc60c5a5f118b7ee4a69a04bbba708a98e73",
    "original_source_sha256": "a9b6c38256eea19aea8f38f8d048fc60c5a5f118b7ee4a69a04bbba708a98e73",
    "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."
  }
}
