{
  "$schema":"../../../schemas/mko-v0.4.schema.json","schema_version":"mko-v0.4","id":"mko-factorial","semantic_family_id":"sf-factorial","type":"definition","version":"0.10.0","language":"zh-Hant",
  "titles":{"zh-Hant":"階乘","en":"Factorial"},
  "summary":{"zh-Hant":"自然數 n 的階乘由 0!=1 與後繼遞迴式定義，等於 1 到 n 的正整數乘積。"},
  "statement":{"zh-Hant":"函數 F:N→N 由 F(0)=1 與 F(n+1)=(n+1)F(n) 唯一遞迴決定；慣用記號為 n!。"},
  "formula":{"tex":"F(n)","mathml":"<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mi>F</mi><mo>(</mo><mi>n</mi><mo>)</mo></mrow></math>","semantic_ast":{"type":"function_call","callee":{"type":"symbol","name":"F","glyph":"F"},"arguments":[{"type":"symbol","name":"n","glyph":"n"}]},"compiler":{"id":"ocme-formula-core","version":"0.4.0","source_sha256":"403096591283e1216d0b14eac834f60fed4c492a1158e40d2a713c14f8a47298"}},
  "assumptions":[{"id":"a1","zh-Hant":"n 是自然數，且自然數包含 0。"}],
  "symbols":[{"token":"F","role":"factorial_function","role_zh":"階乘函數的代表記號","scope":"representative_formula"},{"token":"n","role":"natural_input","role_zh":"自然數輸入","scope":"definition"},{"token":"!","role":"factorial_notation","role_zh":"階乘慣用後綴記號","scope":"explanation"}],
  "dependencies":[{"id":"mko-natural-number","title_zh":"自然數","reason_zh":"階乘的輸入與輸出均為自然數。"},{"id":"mko-arithmetic-operations","title_zh":"四則運算","reason_zh":"後繼遞迴與有限乘積使用自然數乘法。"}],
  "explanation":{"paragraphs_zh":["0! 定義為 1。對自然數 n，(n+1)!=(n+1)·n!；因此 n>0 時，n!=1·2·…·n。","階乘成長很快，精確計算應使用任意精度整數，不應以浮點近似冒充精確值。","階乘會出現在排列計數中，但『n! 計數 n 元集合的排列』是另需證明的定理，不是遞迴定義本身。"],"common_misconception_zh":"常見誤解是把 0! 當成 0、把 n! 當成 n 倍，或用超出安全整數範圍的浮點值冒充精確結果。"},
  "proofs":[],"computational_companions":[],
  "verification":{"computational_status":"not_evaluated_no_computational_claim","warning_zh":"BigInt 可重算有限自然數的階乘值與遞迴見證，但不構成排列計數、整除性或漸近定理的證明。","evidence_refs":[],"producers":[{"id":"lean-mathlib","adapter":"formal_system","config_path":"formal/lean/lakefile.toml","status":"configured"}]},
  "formalization":{"status":"not_formalized","target_systems":["Lean 4","Mathlib"],"next_obligation_zh":"綁定 Nat.factorial、factorial_zero、factorial_succ 與本 MKO 的自然數慣例。"},
  "provenance":{"origin":"ocme_local_ai_materialization_candidate","note_zh":"依 research/atlas-factorial.md 整理；待人工與形式化審查。","content_license":"CC-BY-SA-4.0","code_license":"MIT","created_at":"2026-09-26"}
}
