{
  "templateId": "calculus",
  "title": "미적분 풀이 단계 AST 패턴 (h3)",
  "gradeRange": ["h3"],
  "errorPatterns": [
    {
      "stepId": "power-rule",
      "label": "거듭제곱 미분법",
      "description": "xⁿ을 미분하면 nxⁿ⁻¹",
      "exampleInput":  "f(x) = x³",
      "expectedOutput": "f'(x) = 3x²",
      "canonicalForm":  "f'(x)=3x^2",
      "errorTag": "MC_DIFF_POWER_ERROR",
      "wrongExamples": ["f'(x) = x²", "f'(x) = 3x³", "f'(x) = 3"],
      "tokenPattern": ["f'","=","num","x","^","num"]
    },
    {
      "stepId": "chain-rule",
      "label": "합성함수 미분법 (연쇄법칙)",
      "description": "{f(g(x))}' = f'(g(x)) · g'(x)",
      "exampleInput":  "y = (x²+1)³",
      "expectedOutput": "y' = 3(x²+1)² · 2x",
      "canonicalForm":  "y'=6x(x^2+1)^2",
      "errorTag": "MC_CHAIN_RULE_ERROR",
      "wrongExamples": ["y' = 3(x²+1)²", "y' = 6x(x+1)²"],
      "tokenPattern": ["y'","=","num","(","x","^","num","+","num",")","^","num","*","num","x"]
    },
    {
      "stepId": "definite-integral",
      "label": "정적분 계산 (미적분의 기본정리)",
      "description": "∫[a→b]f(x)dx = F(b) - F(a)",
      "exampleInput":  "∫[0→2] 3x² dx",
      "expectedOutput": "[x³]₀² = 8 - 0 = 8",
      "canonicalForm":  "8",
      "errorTag": "MC_INTEGRAL_BOUND_ERROR",
      "wrongExamples": ["∫[0→2] 3x² = x³ = 8", "∫[0→2] 3x² = 6"],
      "tokenPattern": ["int","f","(","x",")","dx","=","F","(","b",")","-","F","(","a",")"]
    },
    {
      "stepId": "product-rule",
      "label": "곱의 미분법",
      "description": "(fg)' = f'g + fg'",
      "exampleInput":  "y = x·sin(x)",
      "expectedOutput": "y' = sin(x) + x·cos(x)",
      "canonicalForm":  "y'=sin(x)+x*cos(x)",
      "errorTag": "MC_PRODUCT_RULE_ERROR",
      "wrongExamples": ["y' = cos(x)", "y' = sin(x)·cos(x)"],
      "tokenPattern": ["y'","=","f'","g","+","f","g'"]
    },
    {
      "stepId": "limit-definition",
      "label": "극한의 정의 (ε-δ)·수렴 판별",
      "description": "lim_{x→a} f(x) = L 판별",
      "exampleInput":  "lim_{x→2} (x²-4)/(x-2)",
      "expectedOutput": "= lim_{x→2}(x+2) = 4",
      "canonicalForm":  "4",
      "errorTag": "MC_LIMIT_FACTOR_ERROR",
      "wrongExamples": ["0/0 (대입만 함)", "= x+2 = 4 (극한 기호 생략)"],
      "tokenPattern": ["lim","x","->","a","f","(","x",")","=","L"]
    }
  ],
  "difficultyWeights": { "lim": 2, "∫": 2, "d/dx": 2, "chain": 3, "product": 3 }
}
