{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-asymptotic-resource-bound-01",
  "mko_id": "mko-asymptotic-resource-bound",
  "title": {
    "zh-Hant": "漸近資源界：證明 3n²+5n+2∈Θ(n²) 並排除 Θ(n)",
    "en": "Asymptotic resource bounds: proving 3n²+5n+2∈Θ(n²) and ruling out Θ(n)"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-asymptotic-resource-bound-01",
    "source": {
      "mko_id": "mko-asymptotic-resource-bound",
      "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
      "sha256": "2b5dc69aebd1ca2d1e4c3c4bb10e9c0c889c653d311aebba7e59d53def35d42e",
      "english_sha256": "9efe714ae882b4c30cff9d151ada3de59893c982eddf24b68e74196cb3c2bc29"
    },
    "mode": "theorem_proof",
    "audience_prerequisites": [
      "order_basics",
      "distributive",
      "numeric_evaluation",
      "archimedean",
      "square_nonneg"
    ],
    "goal": {
      "zh-Hant": "設成本函數 f(n)=3n²+5n+2（n 從 0 起），比較函數 g(n)=n² 與 h(n)=n。以明示的全尾段 witness 證明 f∈O(g)（c=10、N=1）、f∈Ω(g)（c=3、N=0），故 f∈Θ(g)；說明 N=0 對 O 不可行、c=3 對 O 不可行、另一組 witness c=4、N=6 也可行；再證明 f∉O(h)，因此 f∈Ω(h) 但 f∉Θ(h)。",
      "en": "Let the cost function be f(n)=3n²+5n+2 (n starting at 0), with comparison functions g(n)=n² and h(n)=n. With explicit full-tail witnesses prove f∈O(g) (c=10, N=1) and f∈Ω(g) (c=3, N=0), hence f∈Θ(g); show that N=0 cannot work for O, that c=3 cannot work for O, and that another witness c=4, N=6 also works; then prove f∉O(h), so f∈Ω(h) but f∉Θ(h)."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "輸入大小 n 取遍從 0 起的自然數（MKO 假設 a1）。",
          "en": "The input size n ranges over the natural numbers starting at 0 (MKO assumption a1)."
        }
      },
      {
        "id": "G2",
        "statement": {
          "zh-Hant": "成本函數 f(n)=3n²+5n+2 由題目宣告：它是在一個已固定的成本模型與輸入大小下，所計的基本操作數；係數 3、5、2 非負。",
          "en": "The cost function f(n)=3n²+5n+2 is declared by the exercise: it is the number of basic operations counted under a fixed cost model and input size; the coefficients 3, 5, 2 are nonnegative."
        }
      },
      {
        "id": "G3",
        "statement": {
          "zh-Hant": "比較函數 g(n)=n² 與 h(n)=n。",
          "en": "Comparison functions g(n)=n² and h(n)=n."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1",
          "G2",
          "G3"
        ],
        "before_tex": "f(n)=3n^2+5n+2,\\ g(n)=n^2,\\ h(n)=n",
        "after_tex": "f(n)>0,\\ g(n)\\ge 0,\\ h(n)\\ge 0\\ \\text{for all}\\ n\\ge 0",
        "relation": "definition",
        "rule": "def_intro",
        "conditions": [
          "n\\in\\mathbb{N}"
        ],
        "explanation": {
          "zh-Hant": "命名三個函數並確認 MKO 要求的非負性：n≥0 時 n²≥0，所以 3n²≥0、5n≥0，再加上 2>0 得 f(n)>0；g(n)=n²≥0；h(n)=n≥0。成本模型與輸入大小已隨 f 宣告（G2），之後只比較這個宣告下的函數。",
          "en": "Name the three functions and confirm the nonnegativity the MKO requires: for n≥0, n²≥0, so 3n²≥0 and 5n≥0, and adding 2>0 gives f(n)>0; g(n)=n²≥0; h(n)=n≥0. The cost model and input size were declared with f (G2), and only functions under this declaration are compared."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "G2",
            "square_nonneg",
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "非負性是使用 O、Ω、Θ 定義的前提；不同成本模型會給出不同的 f，不在本稿比較範圍。",
            "en": "Nonnegativity is a precondition for using the definitions of O, Ω, Θ; a different cost model would give a different f, which is outside this comparison."
          }
        },
        "leaf_basis": "def_intro + square_nonneg + order_basics"
      },
      {
        "id": "S02",
        "uses": [
          "S01",
          "mko_asymptotic_def"
        ],
        "before_tex": "f\\in O(g)",
        "after_tex": "\\exists c>0\\ \\exists N\\in\\mathbb{N}\\ \\forall n\\ge N,\\ f(n)\\le c\\,g(n)",
        "relation": "equivalent",
        "rule": "def_unfold",
        "conditions": [],
        "explanation": {
          "zh-Hant": "展開大 O 的定義：要找到一對 witness (c,N)，使從 N 起的整個尾段都滿足 f(n)≤c·g(n)。量詞順序是「存在 c、N，對所有 n」：c 與 N 不可依賴 n。Ω 的定義把 ≤ 換成 ≥，Θ 要求兩者都成立。",
          "en": "Unfold the definition of big O: find a witness pair (c,N) such that the whole tail from N on satisfies f(n)≤c·g(n). The quantifier order is 'there exist c and N such that for all n': c and N may not depend on n. The definition of Ω replaces ≤ by ≥, and Θ requires both."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "mko_asymptotic_def",
            "def_unfold"
          ],
          "explanation": {
            "zh-Hant": "展開與折回定義互為反向。在 n≥1 的範圍，若改成『對每個 n 存在可依 n 改變的 c』，可逐點取 c=f(n)/g(n)，這不提供統一的尾段界；n=0 則因 g(0)=0、f(0)=2，連逐點界也失敗。",
            "en": "Unfolding and folding the definition are inverse moves. For n≥1, replacing the uniform constant by a c that may depend on n allows the pointwise choice c=f(n)/g(n), which provides no uniform tail bound. At n=0 even a pointwise bound fails because g(0)=0 and f(0)=2."
          }
        },
        "leaf_basis": "def_unfold + mko_asymptotic_def"
      },
      {
        "id": "S03",
        "uses": [
          "G1"
        ],
        "before_tex": "n\\in\\mathbb{N},\\ n\\ge 1",
        "after_tex": "1\\le n\\le n^2",
        "relation": "theorem_application",
        "rule": "L_n_le_nsq",
        "conditions": [
          "n\\ge 1"
        ],
        "explanation": {
          "zh-Hant": "套用引理 L_n_le_nsq（在 S03.1、S03.2 證明）：n≥1 時 1≤n≤n²。這讓低次項 5n 與常數 2 都能用 n² 控制。",
          "en": "Apply Lemma L_n_le_nsq (proved in S03.1 and S03.2): for n≥1, 1≤n≤n². This lets the lower-order term 5n and the constant 2 be controlled by n²."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "L_n_le_nsq"
          ],
          "explanation": {
            "zh-Hant": "需要 n≥1；n=0 時 1≤n² 不成立（0²=0），這正是 S07 中門檻不能取 0 的原因。",
            "en": "It needs n≥1; at n=0, 1≤n² fails (0²=0), which is exactly why the threshold cannot be 0 in S07."
          }
        },
        "leaf_basis": "order_basics + distributive"
      },
      {
        "id": "S03.1",
        "uses": [
          "order_basics",
          "distributive"
        ],
        "before_tex": "n\\ge 1",
        "after_tex": "n^2-n=n(n-1)\\ge 0,\\ \\text{so}\\ n\\le n^2",
        "relation": "implies",
        "rule": "order_basics",
        "conditions": [
          "n\\ge 1"
        ],
        "explanation": {
          "zh-Hant": "n≥1 給出 n−1≥0 且 n≥0。兩個非負數相乘仍非負（由 0≤n−1 乘以 n≥0），所以 n(n−1)≥0。依分配律 n(n−1)=n²−n，故 n²−n≥0，兩邊加 n 得 n≤n²。",
          "en": "n≥1 gives n−1≥0 and n≥0. The product of two nonnegative numbers is nonnegative (multiply 0≤n−1 by n≥0), so n(n−1)≥0. By distributivity n(n−1)=n²−n, so n²−n≥0, and adding n to both sides gives n≤n²."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "order_basics",
            "distributive"
          ],
          "explanation": {
            "zh-Hant": "次序的乘法規則需要乘數非負；這裡 n≥0。",
            "en": "The multiplication rule for order needs a nonnegative multiplier; here n≥0."
          }
        },
        "leaf_basis": "order_basics + distributive + add_inverse"
      },
      {
        "id": "S03.2",
        "uses": [
          "S03.1",
          "order_basics"
        ],
        "before_tex": "1\\le n,\\ n\\le n^2",
        "after_tex": "1\\le n\\le n^2",
        "relation": "implies",
        "rule": "order_basics",
        "conditions": [],
        "explanation": {
          "zh-Hant": "把假設 1≤n 與 S03.1 的 n≤n² 串起來，依傳遞得 1≤n≤n²，特別地 1≤n²。S03.1 與 S03.2 合起來證得 L_n_le_nsq。",
          "en": "Chain the hypothesis 1≤n with n≤n² from S03.1; transitivity gives 1≤n≤n², in particular 1≤n². S03.1 and S03.2 together prove L_n_le_nsq."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S03.1",
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "只用到次序的傳遞。",
            "en": "Only transitivity of order is used."
          }
        },
        "leaf_basis": "order_basics"
      },
      {
        "id": "S04",
        "uses": [
          "S03"
        ],
        "before_tex": "n\\le n^2,\\ 1\\le n^2\\ (n\\ge 1)",
        "after_tex": "5n\\le 5n^2,\\ 2\\le 2n^2\\ (n\\ge 1)",
        "relation": "implies",
        "rule": "order_basics",
        "conditions": [
          "n\\ge 1",
          "5>0,\\ 2>0"
        ],
        "explanation": {
          "zh-Hant": "把 n≤n² 兩邊乘以正數 5，把 1≤n² 兩邊乘以正數 2；乘以正數保持不等式方向。",
          "en": "Multiply both sides of n≤n² by the positive number 5, and both sides of 1≤n² by the positive number 2; multiplying by a positive number preserves the direction of an inequality."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S03",
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "需要乘數為正；若乘以負數方向會反轉。",
            "en": "It needs a positive multiplier; multiplying by a negative number would reverse the direction."
          }
        },
        "leaf_basis": "order_basics"
      },
      {
        "id": "S05",
        "uses": [
          "S04"
        ],
        "before_tex": "f(n)=3n^2+5n+2",
        "after_tex": "f(n)\\le 3n^2+5n^2+2n^2=10n^2\\quad(n\\ge 1)",
        "relation": "implies",
        "rule": "order_basics",
        "conditions": [
          "n\\ge 1"
        ],
        "explanation": {
          "zh-Hant": "把 S04 的兩個不等式與 3n²=3n² 相加（不等式同向相加），得 f(n)≤10n²，對每個 n≥1 成立。等價地，10n²−f(n)=5n(n−1)+2(n²−1)，兩項在 n≥1 時都非負（N1 以多項式恆等式核對）。",
          "en": "Add the two inequalities of S04 to 3n²=3n² (inequalities in the same direction add), giving f(n)≤10n² for every n≥1. Equivalently, 10n²−f(n)=5n(n−1)+2(n²−1), and both terms are nonnegative for n≥1 (N1 checks this as a polynomial identity)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S04",
            "order_basics",
            "distributive"
          ],
          "explanation": {
            "zh-Hant": "相加需要每個不等式都在同一個 n 上、同一方向成立；只對 n≥1 宣稱。",
            "en": "Adding requires each inequality to hold at the same n in the same direction; the claim is only for n≥1."
          }
        },
        "leaf_basis": "order_basics + distributive + add_assoc"
      },
      {
        "id": "S06",
        "uses": [
          "S05",
          "S02"
        ],
        "before_tex": "\\forall n\\ge 1,\\ f(n)\\le 10\\,g(n)",
        "after_tex": "f\\in O(g)\\ \\text{with witness}\\ (c,N)=(10,1)",
        "relation": "implies",
        "rule": "exists_intro",
        "conditions": [
          "10>0"
        ],
        "explanation": {
          "zh-Hant": "S05 對任意 n≥1 證明，沒有額外假設，所以依全稱推廣對整個尾段 n≥1 成立。取 c=10>0、N=1，依 ∃引入與 S02 的等價，f∈O(g)。",
          "en": "S05 was proved for an arbitrary n≥1 with no extra assumption, so by generalization it holds on the whole tail n≥1. Take c=10>0 and N=1; by ∃-introduction and the equivalence of S02, f∈O(g)."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S02",
            "S05",
            "exists_intro",
            "forall_intro"
          ],
          "explanation": {
            "zh-Hant": "目標 f∈O(g)；足夠條件是找到一對全尾段 witness，由 S05 正向證得。",
            "en": "Goal f∈O(g); a sufficient condition is one full-tail witness pair, proved forwards in S05."
          }
        },
        "leaf_basis": "exists_intro + forall_intro"
      },
      {
        "id": "S07",
        "uses": [
          "G2",
          "G3"
        ],
        "before_tex": "n=0",
        "after_tex": "f(0)=2>0=c\\cdot g(0)\\ \\text{for every}\\ c>0",
        "relation": "implies",
        "rule": "numeric_evaluation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "門檻的作用：f(0)=2，而 g(0)=0，所以對任何 c>0 都有 f(0)>c·g(0)。因此任何以 N=0 為門檻的 O witness 都不存在；N=1 把這個有限前綴排除在外。MKO 所說「有限前綴被吸收到 witness 中」就是這個意思。",
          "en": "The role of the threshold: f(0)=2 while g(0)=0, so f(0)>c·g(0) for every c>0. Hence no O witness with threshold N=0 exists; N=1 excludes this finite prefix. This is what the MKO means by finite prefixes being absorbed into the witness."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G2",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "這是一個點的精確計算（N2），對所有 c 都成立因為右邊是 0。它不影響 f∈O(g) 的結論。",
            "en": "This is an exact computation at one point (N2), valid for every c because the right side is 0. It does not affect the conclusion f∈O(g)."
          }
        },
        "leaf_basis": "numeric_evaluation + mul_zero"
      },
      {
        "id": "S08",
        "uses": [
          "S01",
          "mko_asymptotic_def"
        ],
        "before_tex": "f(n)-3g(n)=5n+2",
        "after_tex": "f(n)\\ge 3\\,g(n)\\ \\forall n\\ge 0\\ \\Rightarrow\\ f\\in\\Omega(g)\\ \\text{with}\\ (c,N)=(3,0)",
        "relation": "implies",
        "rule": "exists_intro",
        "conditions": [
          "n\\ge 0"
        ],
        "explanation": {
          "zh-Hant": "展開 Ω：需要 c>0、N 使 n≥N 時 f(n)≥c·g(n)。計算 f(n)−3n²=5n+2，n≥0 時它 ≥2>0，所以 f(n)≥3g(n) 對所有 n≥0 成立。取 c=3、N=0，得 f∈Ω(g)。下界的 witness 可以從 0 起，因為 g(0)=0 不構成障礙。",
          "en": "Unfold Ω: we need c>0 and N with f(n)≥c·g(n) for n≥N. Compute f(n)−3n²=5n+2, which is at least 2>0 for n≥0, so f(n)≥3g(n) for all n≥0. Taking c=3 and N=0 gives f∈Ω(g). The lower-bound witness can start at 0 because g(0)=0 is no obstacle."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "mko_asymptotic_def",
            "exists_intro",
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "需要 5n+2≥0，由 n≥0 得到（N3 以多項式恆等式核對差式）。",
            "en": "It needs 5n+2≥0, which follows from n≥0 (N3 checks the difference as a polynomial identity)."
          }
        },
        "leaf_basis": "exists_intro + order_basics + def_unfold"
      },
      {
        "id": "S09",
        "uses": [
          "S06",
          "S08",
          "mko_asymptotic_def"
        ],
        "before_tex": "f\\in O(g),\\ f\\in\\Omega(g)",
        "after_tex": "f\\in\\Theta(g)=\\Theta(n^2)",
        "relation": "implies",
        "rule": "and_intro_elim",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依 MKO 定義，Θ 要求 O 與 Ω 同時成立。兩者分別由 S06 與 S08 證得，所以 f∈Θ(n²)。兩個 witness 不必相同：上界用 (10,1)，下界用 (3,0)。",
          "en": "By the MKO definition, Θ requires both O and Ω. These were proved in S06 and S08, so f∈Θ(n²). The two witnesses need not coincide: the upper bound uses (10,1) and the lower bound uses (3,0)."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S06",
            "S08",
            "and_intro_elim",
            "mko_asymptotic_def"
          ],
          "explanation": {
            "zh-Hant": "目標 Θ；依定義充要條件是 O 與 Ω 的合取，兩者都已正向證明。",
            "en": "Goal Θ; by definition the conjunction of O and Ω is necessary and sufficient, and both were proved forwards."
          }
        },
        "leaf_basis": "and_intro_elim + mko_asymptotic_def"
      },
      {
        "id": "S10",
        "uses": [
          "S02"
        ],
        "before_tex": "4n^2-f(n)=n^2-5n-2=n(n-5)-2",
        "after_tex": "n\\ge 6\\Rightarrow 4n^2-f(n)\\ge 4>0;\\quad n=5:\\ f(5)=102>100=4\\cdot 25",
        "relation": "implies",
        "rule": "exists_intro",
        "conditions": [
          "n\\ge 6"
        ],
        "explanation": {
          "zh-Hant": "另一組 witness：c=4、N=6。4n²−f(n)=n²−5n−2=n(n−5)−2（N4 核對恆等式）。子步 S10.1 證明 n≥6 時它 ≥4。所以 (4,6) 也是 O 的 witness。但 n=5 時 f(5)=102>100：用較小的 c，就需要較大的 N。witness 不唯一，有限個例外點由 N 吸收。",
          "en": "Another witness: c=4, N=6. 4n²−f(n)=n²−5n−2=n(n−5)−2 (N4 checks the identity). Sub-step S10.1 proves it is at least 4 for n≥6. So (4,6) is also an O witness. But at n=5, f(5)=102>100: a smaller c needs a larger N. Witnesses are not unique, and finitely many exceptions are absorbed by N."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S02",
            "exists_intro",
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "全尾段由 S10.1 的證明保證；N6 在 6 到 60 上的核對只是有限觀察，不取代證明。",
            "en": "The full tail is guaranteed by the proof in S10.1; N6, which checks n from 6 to 60, is a finite observation only and does not replace the proof."
          }
        },
        "leaf_basis": "exists_intro + order_basics + distributive"
      },
      {
        "id": "S10.1",
        "uses": [
          "order_basics"
        ],
        "before_tex": "n\\ge 6",
        "after_tex": "n-5\\ge 1,\\ n(n-5)\\ge n\\ge 6,\\ n(n-5)-2\\ge 4",
        "relation": "implies",
        "rule": "order_basics",
        "conditions": [
          "n\\ge 6"
        ],
        "explanation": {
          "zh-Hant": "n≥6 給出 n−5≥1。把 n−5≥1 兩邊乘以正數 n，得 n(n−5)≥n≥6。兩邊減 2，得 n(n−5)−2≥4>0。",
          "en": "n≥6 gives n−5≥1. Multiplying n−5≥1 by the positive number n gives n(n−5)≥n≥6. Subtracting 2 gives n(n−5)−2≥4>0."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "乘數 n 為正；結論對每個 n≥6 都成立，不依賴數值核對。",
            "en": "The multiplier n is positive; the conclusion holds for every n≥6 without relying on numeric checks."
          }
        },
        "leaf_basis": "order_basics"
      },
      {
        "id": "S11",
        "uses": [
          "S08"
        ],
        "before_tex": "f(n)-3n^2=5n+2>0\\ \\forall n",
        "after_tex": "\\neg\\exists N\\ \\forall n\\ge N,\\ f(n)\\le 3\\,g(n)",
        "relation": "implies",
        "rule": "quantifier_negation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "對每個 n，f(n)−3n²=5n+2≥2>0，所以 f(n)≤3g(n) 從不成立。無論 N 取多大，n=N 就是反例，所以 c=3 不能作為 O 的常數。定義只要求「存在某個 c」，不是「每個 c 都行」；常數因子要由 witness 吸收，但不能任意小。",
          "en": "For every n, f(n)−3n²=5n+2≥2>0, so f(n)≤3g(n) never holds. However large N is, n=N is a counterexample, so c=3 cannot serve as the O constant. The definition asks for some c, not every c; constant factors are absorbed into the witness, but not arbitrarily small ones."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S08",
            "quantifier_negation"
          ],
          "explanation": {
            "zh-Hant": "這只否定 c=3，不否定 f∈O(g)，後者已由 c=10 證得。",
            "en": "This refutes only c=3, not f∈O(g), which was proved with c=10."
          }
        },
        "leaf_basis": "quantifier_negation + order_basics"
      },
      {
        "id": "S12",
        "uses": [
          "S02",
          "G3"
        ],
        "before_tex": "\\text{assume}\\ \\exists c>0\\ \\exists N\\ \\forall n\\ge N,\\ f(n)\\le c\\,n",
        "after_tex": "\\text{contradiction, so}\\ f\\notin O(h)",
        "relation": "implies",
        "rule": "contradiction",
        "conditions": [],
        "explanation": {
          "zh-Hant": "反證：假設有 witness (c,N) 使 n≥N 時 f(n)≤c·n。S12.1 構造一個 n≥N 且 n>c；S12.2 證明此 n 滿足 f(n)>c·n，與假設矛盾。所以沒有任何 witness，f∉O(n)。",
          "en": "By contradiction: suppose a witness (c,N) gives f(n)≤c·n for n≥N. S12.1 constructs an n with n≥N and n>c; S12.2 shows this n satisfies f(n)>c·n, contradicting the assumption. So no witness exists and f∉O(n)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S02",
            "contradiction",
            "archimedean"
          ],
          "explanation": {
            "zh-Hant": "反證針對任意的 (c,N)，所以否定的是存在命題本身，不只是某一組 witness。",
            "en": "The argument handles an arbitrary (c,N), so it refutes the existential statement itself, not just one witness pair."
          }
        },
        "leaf_basis": "contradiction + archimedean + order_basics"
      },
      {
        "id": "S12.1",
        "uses": [
          "archimedean"
        ],
        "before_tex": "c>0,\\ N\\in\\mathbb{N}",
        "after_tex": "n=\\max(n_0,N,1)\\ \\text{with}\\ n_0>c:\\ n\\ge N,\\ n>c,\\ n\\ge 1",
        "relation": "implies",
        "rule": "archimedean",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依阿基米德性質，存在自然數 n0>c。令 n=max(n0,N,1)，則 n≥N、n≥n0>c，且 n≥1>0。",
          "en": "By the Archimedean property there is a natural number n0>c. Let n=max(n0,N,1); then n≥N, n≥n0>c, and n≥1>0."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "archimedean",
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "n 依賴於 c 與 N，這在反證中是允許的：我們只需對給定的 witness 找一個反例點。",
            "en": "n depends on c and N, which is allowed in the contradiction: we only need one counterexample point for the given witness."
          }
        },
        "leaf_basis": "archimedean + order_basics"
      },
      {
        "id": "S12.2",
        "uses": [
          "S12.1",
          "S03",
          "order_basics"
        ],
        "before_tex": "n>c,\\ n\\ge 1",
        "after_tex": "f(n)\\ge 3n^2\\ge n^2=n\\cdot n>c\\cdot n",
        "relation": "implies",
        "rule": "order_basics",
        "conditions": [],
        "explanation": {
          "zh-Hant": "f(n)=3n²+5n+2≥3n²≥n²（因 5n+2≥0 與 2n²≥0）。由 c<n 兩邊乘以正數 n 得 c·n<n·n=n²。串起來 f(n)>c·n。但 n≥N，假設給 f(n)≤c·n，矛盾。",
          "en": "f(n)=3n²+5n+2≥3n²≥n² (since 5n+2≥0 and 2n²≥0). Multiplying c<n by the positive number n gives c·n<n·n=n². Chaining, f(n)>c·n. But n≥N, so the assumption gives f(n)≤c·n, a contradiction."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S12.1",
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "關鍵是乘數 n 為正（n≥1）；N9 以 c=50、n=51 作一個數值例示，只是例子。",
            "en": "The key is that the multiplier n is positive (n≥1); N9 gives one numeric illustration with c=50, n=51, which is only an example."
          }
        },
        "leaf_basis": "order_basics + square_nonneg"
      },
      {
        "id": "S13",
        "uses": [
          "S12",
          "S01",
          "mko_asymptotic_def"
        ],
        "before_tex": "f(n)\\ge 5n\\ge n\\ (n\\ge 0),\\ f\\notin O(h)",
        "after_tex": "f\\in\\Omega(n),\\ f\\notin O(n),\\ f\\notin\\Theta(n)",
        "relation": "implies",
        "rule": "and_intro_elim",
        "conditions": [],
        "explanation": {
          "zh-Hant": "n≥0 時 f(n)=3n²+5n+2≥5n≥n，所以 (c,N)=(1,0) 是 Ω(n) 的 witness，f∈Ω(n)。但 S12 已證 f∉O(n)。Θ(n) 要求兩者兼具，所以 f∉Θ(n)。這說明 O、Ω、Θ 不能互換：同一個 f 對 n 有下界卻沒有上界。",
          "en": "For n≥0, f(n)=3n²+5n+2≥5n≥n, so (c,N)=(1,0) is an Ω(n) witness and f∈Ω(n). But S12 showed f∉O(n). Θ(n) needs both, so f∉Θ(n). This shows that O, Ω and Θ are not interchangeable: the same f has n as a lower bound but not as an upper bound."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S12",
            "mko_asymptotic_def",
            "and_intro_elim"
          ],
          "explanation": {
            "zh-Hant": "f∉Θ(n) 由合取的一部分不成立得到；f∈Ω(n) 有明示 witness。",
            "en": "f∉Θ(n) follows because one conjunct fails; f∈Ω(n) has an explicit witness."
          }
        },
        "leaf_basis": "and_intro_elim + exists_intro + order_basics"
      }
    ],
    "result": {
      "zh-Hant": "在宣告的成本模型下，f(n)=3n²+5n+2 滿足 f∈O(n²)（witness (10,1)，或 (4,6)）與 f∈Ω(n²)（witness (3,0)），所以 f∈Θ(n²)。門檻 N=0 與常數 c=3 都不能作為 O 的 witness。f∈Ω(n) 但 f∉O(n)，所以 f∉Θ(n)。",
      "en": "Under the declared cost model, f(n)=3n²+5n+2 satisfies f∈O(n²) (witness (10,1), or (4,6)) and f∈Ω(n²) (witness (3,0)), so f∈Θ(n²). Neither the threshold N=0 nor the constant c=3 can serve in an O witness. f∈Ω(n) but f∉O(n), so f∉Θ(n)."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "對每個 n 都有 f(n)>3n²，所以 f∉O(n²)",
          "en": "f(n)>3n² for every n, so f∉O(n²)"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "定義只需要某個 c；c=10、N=1 可行（S06）。",
          "en": "The definition needs only some c; c=10, N=1 works (S06)."
        }
      },
      {
        "claim": {
          "zh-Hant": "f∈O(n²) 可以取門檻 N=0",
          "en": "f∈O(n²) can be witnessed with threshold N=0"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "f(0)=2>0=c·0 對每個 c>0 都成立，N=0 不可能。",
          "en": "f(0)=2>0=c·0 for every c>0, so N=0 is impossible."
        }
      },
      {
        "claim": {
          "zh-Hant": "n²≤100n 對 n=1 到 100 都成立，所以 n²∈O(n)",
          "en": "n²≤100n for n=1 to 100, so n²∈O(n)"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "n=101 時 10201>10100；S12 的論證證明 n²∉O(n)。",
          "en": "At n=101, 10201>10100; the argument of S12 proves n²∉O(n)."
        }
      },
      {
        "claim": {
          "zh-Hant": "f∈Ω(n)，所以 f∈Θ(n)",
          "en": "f∈Ω(n), so f∈Θ(n)"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "Θ 還需要 f∈O(n)，而 S12 證明 f∉O(n)。",
          "en": "Θ also needs f∈O(n), and S12 proves f∉O(n)."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "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": "distributive",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "分配律：u(v+w)=uv+uw；配合乘法交換律也有 (v+w)u=vu+wu。",
          "en": "Distributivity: u(v+w)=uv+uw; with commutativity also (v+w)u=vu+wu."
        }
      },
      {
        "id": "numeric_evaluation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "明確整數或有理數算式的精確求值；可以獨立重算。",
          "en": "Exact evaluation of an explicit integer or rational expression; independently recomputable."
        }
      },
      {
        "id": "archimedean",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "阿基米德性質：對任意實數 x，存在自然數 n>x；因此對任意 ε>0，存在 n 使 1/n<ε。",
          "en": "Archimedean property: for every real x there is a natural number n>x; hence for every ε>0 there is n with 1/n<ε."
        }
      },
      {
        "id": "square_nonneg",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "實數平方非負：對所有實數 u，u²≥0，且 u²=0 ⇔ u=0。",
          "en": "Squares are nonnegative: for every real u, u²≥0, and u²=0 ⇔ u=0."
        }
      },
      {
        "id": "def_intro",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "引入定義：可為一個命題、式子或物件取名；之後名稱與被定義者可互相替換。",
          "en": "Introducing a definition: a statement, expression or object may be given a name, after which the name and what it stands for are interchangeable."
        }
      },
      {
        "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": "add_inverse",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "加法反元素：每個 u 都有 −u，使 u+(−u)=0；u−v 定義為 u+(−v)。",
          "en": "Additive inverse: every u has −u with u+(−u)=0; u−v means u+(−v)."
        }
      },
      {
        "id": "add_assoc",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "加法結合律：(u+v)+w=u+(v+w)。",
          "en": "Associativity of addition: (u+v)+w=u+(v+w)."
        }
      },
      {
        "id": "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": "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": "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": "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": "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": "contradiction",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "反證法：若假設 ¬P 推出矛盾（某命題與其否定同時成立），則 P 成立。",
          "en": "Proof by contradiction: if assuming ¬P leads to a contradiction (a statement and its negation both hold), then P holds."
        }
      },
      {
        "id": "mko_asymptotic_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-asymptotic-resource-bound",
          "sha256": "2b5dc69aebd1ca2d1e4c3c4bb10e9c0c889c653d311aebba7e59d53def35d42e",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "對非負函數 f,g:N→R，f∈O(g) 表示存在 c>0、N，使所有 n≥N 均有 f(n)≤c·g(n)；f∈Ω(g) 表示存在 c>0、N，使所有 n≥N 均有 f(n)≥c·g(n)；f∈Θ(g) 表示兩者同時成立。輸入大小與成本模型是聲明的一部分。",
          "en": "For nonnegative functions f,g:N→R, f∈O(g) means that some c>0 and threshold N satisfy f(n)≤c·g(n) for every n≥N; f∈Ω(g) means that some c>0 and N satisfy f(n)≥c·g(n) for every n≥N; f∈Θ(g) requires both. Input size and cost model are part of the claim."
        }
      },
      {
        "id": "L_n_le_nsq",
        "kind": "lemma",
        "proved_in": [
          "S03.1",
          "S03.2"
        ],
        "statement": {
          "zh-Hant": "對每個自然數 n≥1：1≤n≤n²。",
          "en": "For every natural number n≥1: 1≤n≤n²."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N1",
        "step": "S05",
        "vars": [
          "n"
        ],
        "degree": 2,
        "lhs": "10*n**2-(3*n**2+5*n+2)",
        "rhs": "5*n*(n-1)+2*(n**2-1)"
      },
      {
        "id": "N2",
        "step": "S07",
        "lhs": "3*0**2+5*0+2",
        "rhs": "2"
      },
      {
        "id": "N3",
        "step": "S08",
        "vars": [
          "n"
        ],
        "degree": 2,
        "lhs": "(3*n**2+5*n+2)-3*n**2",
        "rhs": "5*n+2"
      },
      {
        "id": "N4",
        "step": "S10",
        "vars": [
          "n"
        ],
        "degree": 2,
        "lhs": "4*n**2-(3*n**2+5*n+2)",
        "rhs": "n*(n-5)-2"
      },
      {
        "id": "N5",
        "step": "S10",
        "lhs": "3*5**2+5*5+2",
        "relation": ">",
        "rhs": "4*5**2"
      },
      {
        "id": "N6",
        "step": "S10",
        "vars": [
          "n"
        ],
        "range": [
          6,
          60
        ],
        "lhs": "3*n**2+5*n+2",
        "relation": "<=",
        "rhs": "4*n**2"
      },
      {
        "id": "N7",
        "vars": [
          "n"
        ],
        "range": [
          1,
          100
        ],
        "lhs": "n**2",
        "relation": "<=",
        "rhs": "100*n"
      },
      {
        "id": "N8",
        "lhs": "101**2",
        "relation": ">",
        "rhs": "100*101"
      },
      {
        "id": "N9",
        "step": "S12.2",
        "lhs": "3*51**2+5*51+2",
        "relation": ">",
        "rhs": "50*51"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "在 MKO 範圍內工作：n 為從 0 起的自然數，函數族與非負係數由題目明示（假設 a1）；每個漸近結論都給出全尾段 witness 並證明，有限數值核對只作觀察（假設 a2）。輸入大小與成本模型視為 f 的宣告的一部分；不討論特定算法如何得到 f，不使用一般多項式定理，不改動 canonical MKO 或英文 edition。",
      "en": "Works inside the MKO's scope: n ranges over the natural numbers starting at 0, and the function family and nonnegative coefficients are stated by the exercise (assumption a1); every asymptotic conclusion comes with a full-tail witness and a proof, and finite numeric checks are observations only (assumption a2). Input size and cost model are taken as part of the declaration of f; how a particular algorithm yields f is not discussed, no general polynomial theorem is used, and the canonical MKO and its English edition are not changed."
    },
    "md_symbols": [
      [
        "f(n)=3n^2+5n+2",
        "宣告的成本函數",
        "the declared cost function"
      ],
      [
        "g(n)=n^2,\\ h(n)=n",
        "比較函數",
        "the comparison functions"
      ],
      [
        "O(g),\\ \\Omega(g),\\ \\Theta(g)",
        "上界、下界、同階的函數集合",
        "the function classes for asymptotic upper bounds, lower bounds and tight bounds"
      ],
      [
        "(c,N)",
        "witness：常數 c>0 與門檻 N",
        "a witness: a constant c>0 and a threshold N"
      ],
      [
        "n\\ge N",
        "全尾段：所有不小於 N 的 n",
        "the full tail: every n at least N"
      ]
    ],
    "md_error_controls": [
      {
        "title": "有限 benchmark 不證明漸近關係 / Finite benchmarks do not prove asymptotic relations",
        "zh": "MKO 指出的誤解是用幾個 benchmark 點證明漸近關係。n²≤100n 在 n=1 到 100 都成立（N7，有限核對），看起來像 n²∈O(n)；但 n=101 時 10201>10100（N8），而 S12 的論證（把 f 換成 n²）證明 n²∉O(n)。有限觀察只能提示，不能證明全尾段性質。",
        "en": "The misconception identified in the MKO is proving an asymptotic relation from a few benchmark points. n²≤100n holds for n=1 to 100 (N7, a finite check), which looks like n²∈O(n); but at n=101, 10201>10100 (N8), and the argument of S12 (with f replaced by n²) proves n²∉O(n). Finite observations can suggest, never prove, a full-tail property."
      },
      {
        "title": "O、Ω、Θ 不可互換 / O, Ω and Θ are not interchangeable",
        "zh": "f∈Ω(n) 但 f∉O(n)，所以 f∉Θ(n)（S13）。把「f 是 O(n²)」說成「f 是 Θ(n²)」需要另外證明下界（S08）；把 Ω 當 O 用會把下界誤當上界。",
        "en": "f∈Ω(n) but f∉O(n), so f∉Θ(n) (S13). Saying 'f is Θ(n²)' instead of 'f is O(n²)' requires a separate lower-bound proof (S08); using Ω as if it were O mistakes a lower bound for an upper bound."
      },
      {
        "title": "大 O 不是等號 / Big O is not an equation",
        "zh": "O(g) 是一個函數集合，f∈O(g) 是成員關係。n∈O(n²)（由 S03 的 n≤n²）且 n²∈O(n²)，但 n≠n²；把 f=O(g) 當等式而在兩邊做代數運算或反向閱讀都是錯的。",
        "en": "O(g) is a set of functions and f∈O(g) is membership. n∈O(n²) (from n≤n² in S03) and n²∈O(n²), yet n≠n²; treating f=O(g) as an equation and manipulating or reversing it is wrong."
      }
    ],
    "md_open_items": [
      {
        "zh-Hant": "MKO 第二段的一般敘述（非負係數多項式的 Θ 次數由最高非零次決定）未在此一般地證明；本稿只處理一個明示的二次式。與標準 asymptotic predicates 及 eventually filter 的綁定（MKO formal next）未建立。",
        "en": "The general statement in MKO paragraph 2 (the Θ degree of a polynomial with nonnegative coefficients is its highest nonzero degree) is not proved in general here; this guide treats one explicit quadratic. The binding to standard asymptotic predicates and the eventually filter (MKO formal next) is not built."
      }
    ]
  },
  "revision": {
    "id": "production-20261019-adopted-96",
    "source_commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
    "adopted_source_sha256": "7a11383e169a5fc2b0f70944b4267fe3da8b99b70a214469a16c5494bb46cd15",
    "original_source_sha256": "7a11383e169a5fc2b0f70944b4267fe3da8b99b70a214469a16c5494bb46cd15",
    "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.",
    "english_binding_revision": {
      "id": "edition-symbol-bindings-20261101",
      "path": "content/edition-symbol-bindings-20261101/revision.json",
      "sha256": "e9b4c69f2c4732074c37abb624c8ab8a70afc3645c12bf9df2268ef650ad7b6c"
    }
  }
}
