{
  "$schema": "../../../schemas/mko-v0.4.schema.json",
  "schema_version": "mko-v0.4",
  "id": "mko-recurrence-relation",
  "semantic_family_id": "sf-recurrence-relation",
  "type": "definition",
  "version": "0.10.0",
  "language": "zh-Hant",
  "titles": {
    "zh-Hant": "遞迴關係"
  },
  "summary": {
    "zh-Hant": "order-r recurrence以明示initial values與total single-valued state update逐項決定sequence。"
  },
  "statement": {
    "zh-Hant": "令A_n=(a_{n-r+1},...,a_n)為order-r state vector；initial_values[j]=a_j，coefficients[j]乘a_{n-r+j}，新項為constant+sum_{j=0}^{r-1}coefficients[j]a_{n-r+j}。F先shift-left再append該new scalar term。必須明示order r、適用n≥r與全部r個初值。缺一初值、多值rule或未定義分母不得稱unique。有限生成只驗prefix，不證closed form、convergence或asymptotics。"
  },
  "formula": {
    "tex": "A_n=F(A_{n-1})",
    "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><msub><mi>A</mi><mi>n</mi></msub><mo>=</mo><mrow><mi>F</mi><mo>(</mo><msub><mi>A</mi><mrow><mi>n</mi><mo>−</mo><mn>1</mn></mrow></msub><mo>)</mo></mrow></mrow></math>",
    "semantic_ast": {
      "type": "equation",
      "lhs": {
        "type": "subscript",
        "base": {
          "type": "symbol",
          "name": "A",
          "glyph": "A"
        },
        "subscript": {
          "type": "symbol",
          "name": "n",
          "glyph": "n"
        }
      },
      "rhs": {
        "type": "function_call",
        "callee": {
          "type": "symbol",
          "name": "F",
          "glyph": "F"
        },
        "arguments": [
          {
            "type": "subscript",
            "base": {
              "type": "symbol",
              "name": "A",
              "glyph": "A"
            },
            "subscript": {
              "type": "subtraction",
              "left": {
                "type": "symbol",
                "name": "n",
                "glyph": "n"
              },
              "right": {
                "type": "number",
                "value": 1
              }
            }
          }
        ]
      }
    },
    "compiler": {
      "id": "ocme-formula-core",
      "version": "0.4.0",
      "source_sha256": "e5e8bf09e11196327f671af0d6b92e17b29a488e0b80f56c07aa782005e4aa58"
    }
  },
  "assumptions": [
    {
      "id": "a1",
      "zh-Hant": "正向families使用上述oldest-to-newest coefficient order的bounded exact integer linear recurrence及order-r state。"
    },
    {
      "id": "a2",
      "zh-Hant": "target index有限且所有中間值保持safe integer。"
    }
  ],
  "symbols": [
    {
      "token": "A_n",
      "role": "recurrence_state_vector",
      "role_zh": "包含最近r個scalar terms的遞迴state vector",
      "scope": "representative_formula"
    },
    {
      "token": "F",
      "role": "total_state_update_rule",
      "role_zh": "shift-left並append新項的全定義單值state更新規則",
      "scope": "representative_formula"
    }
  ],
  "dependencies": [
    {
      "id": "mko-sequence",
      "title_zh": "數列",
      "reason_zh": "indexed sequence。"
    },
    {
      "id": "mko-equation",
      "title_zh": "方程式",
      "reason_zh": "update equality。"
    },
    {
      "id": "mko-function-mapping",
      "title_zh": "函數與映射",
      "reason_zh": "total single-valued rule。"
    }
  ],
  "explanation": {
    "paragraphs_zh": [
      "order決定state width與所需initial count。",
      "coefficient array由oldest a_(n-r)到newest a_(n-1)對齊。",
      "forward generation shift-left後append新項，unique prefix不外推analytic behavior。"
    ],
    "common_misconception_zh": "倒置coefficient順序、order二只給一個初值便稱唯一，或由少數項猜closed form當證明。"
  },
  "proofs": [],
  "computational_companions": [],
  "verification": {
    "computational_status": "not_evaluated_no_computational_claim",
    "warning_zh": "只處理明示有限步exact integer models。",
    "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": "加入Catalan numbers與generating functions。"
  },
  "provenance": {
    "origin": "ocme_local_ai_materialization_candidate",
    "note_zh": "依 research/atlas-recurrence-relation.md 整理；2026-10-14 脈衝 R05（使用者手動接續 2026-11-10 工作序列；實際日期仍為 2026-10-14），英文及 Lean 依使用者指示延後。",
    "content_license": "CC-BY-SA-4.0",
    "code_license": "MIT",
    "created_at": "2026-10-14"
  }
}
