README / data /mock_calculus.ts
kaigiii's picture
Deploy Learn8 Demo Space
5c920e9
export const mockCalculusUnit = {
unitId: "calc-u1",
unitTitle: "Limits & Derivatives",
nodes: [
{
id: "calc-n1",
title: "Concept of Limits",
description: "Classify scenarios where limits exist or fail.",
type: "concept",
status: "available",
stages: [
{
stageId: "calc-s1",
topic: "Limit Existence",
module: "Instruction",
component: "TaxonomyMatrix",
skin: "Code",
config: {
data: {
buckets: ["Limit Exists", "Limit Does Not Exist"],
items: [
{ id: "limit1", content: "Left limit = 5, Right = 5" },
{ id: "limit2", content: "Left limit = 3, Right = -3 (Jump)" },
{ id: "limit3", content: "Approaches infinity (Asymptote)" },
{ id: "limit4", content: "Continuous polynomial" }
]
},
initialState: { assignments: {} }
},
validation: { type: "exact", condition: {} },
feedback: {
success: "Excellent classification! Limits require agreement from both sides.",
error: "Check the definitions of jumps and asymptotes.",
hint: "If left and right don't match, it doesn't exist."
}
}
]
},
{
id: "calc-n2",
title: "Derivative Rules",
description: "Match base functions to their derivatives.",
type: "exercise",
status: "locked",
stages: [
{
stageId: "calc-s2",
topic: "Basic Differentiation",
module: "Practice",
component: "PatternMatcher",
skin: "Scientific",
config: {
data: {
pairs: [
{ id: "diff1", left: "f(x) = x³", right: "f'(x) = 3x²" },
{ id: "diff2", left: "f(x) = sin(x)", right: "f'(x) = cos(x)" },
{ id: "diff3", left: "f(x) = eˣ", right: "f'(x) = eˣ" },
{ id: "diff4", left: "f(x) = ln(x)", right: "f'(x) = 1/x" }
]
},
initialState: {}
},
validation: { type: "exact", condition: {} },
feedback: {
success: "All matched! You master the basic power and transcendental rules.",
error: "Review your trig and exponential derivatives.",
hint: "The derivative of eˣ is special!"
}
}
]
},
{
id: "calc-n3",
title: "Squeeze Theorem",
description: "Apply the squeeze theorem to find limits.",
type: "concept",
status: "locked",
stages: [
{
stageId: "calc-s3",
topic: "Squeeze Theorem Application",
module: "Instruction",
component: "LogicChain",
skin: "Code",
config: {
data: { nodes: ["Find lower bound g(x)", "Find upper bound h(x)", "Show g(x) ≤ f(x) ≤ h(x)", "Evaluate lim g(x) = lim h(x)", "Conclude lim f(x)"] },
initialState: {}
},
validation: { type: "exact", condition: {} },
feedback: { success: "Perfect squeeze theorem steps!", error: "Review the theorem conditions.", hint: "Both bounds must converge to the same value." }
}
]
},
{
id: "calc-n4",
title: "Continuity",
description: "Determine where functions are continuous.",
type: "exercise",
status: "locked",
stages: [
{
stageId: "calc-s4",
topic: "Continuity Conditions",
module: "Practice",
component: "TaxonomyMatrix",
skin: "Code",
config: {
data: {
buckets: ["Continuous", "Discontinuous"],
items: [
{ id: "cont1", content: "f(a) is defined, lim = f(a)" },
{ id: "cont2", content: "Jump at x = 2" },
{ id: "cont3", content: "Removable hole at x = 0" },
{ id: "cont4", content: "Polynomial on all reals" }
]
},
initialState: { assignments: {} }
},
validation: { type: "exact", condition: {} },
feedback: { success: "Great continuity analysis!", error: "Check the three conditions.", hint: "All three conditions must hold." }
}
]
},
{
id: "calc-n5",
title: "Power Rule",
description: "Master the power rule for differentiation.",
type: "concept",
status: "locked",
stages: [
{
stageId: "calc-s5",
topic: "Power Rule Practice",
module: "Instruction",
component: "LogicChain",
skin: "Code",
config: {
data: { nodes: ["f(x) = xⁿ", "Bring down exponent", "Multiply by coefficient", "Reduce exponent by 1", "f'(x) = nxⁿ⁻¹"] },
initialState: {}
},
validation: { type: "exact", condition: {} },
feedback: { success: "Power rule mastered!", error: "Review the power rule steps.", hint: "d/dx[xⁿ] = nxⁿ⁻¹" }
}
]
},
{
id: "calc-n6",
title: "Product Rule",
description: "Apply the product rule to differentiate.",
type: "exercise",
status: "locked",
stages: [
{
stageId: "calc-s6",
topic: "Product Rule",
module: "Practice",
component: "LogicChain",
skin: "Scientific",
config: {
data: { nodes: ["Identify u and v", "Find u'", "Find v'", "Apply u'v + uv'", "Simplify"] },
initialState: {}
},
validation: { type: "exact", condition: {} },
feedback: { success: "Product rule applied correctly!", error: "Remember: (uv)' = u'v + uv'", hint: "Don't forget both terms." }
}
]
},
{
id: "calc-n7",
title: "Quotient Rule",
description: "Differentiate rational functions.",
type: "concept",
status: "locked",
stages: [
{
stageId: "calc-s7",
topic: "Quotient Rule",
module: "Instruction",
component: "LogicChain",
skin: "Code",
config: {
data: { nodes: ["Identify numerator u", "Identify denominator v", "Compute u'v - uv'", "Divide by v²", "Simplify"] },
initialState: {}
},
validation: { type: "exact", condition: {} },
feedback: { success: "Quotient rule nailed!", error: "Review: (u/v)' = (u'v - uv')/v²", hint: "Lo dHi minus Hi dLo over Lo Lo." }
}
]
},
{
id: "calc-n8",
title: "Chain Rule",
description: "Differentiate composite functions.",
type: "exercise",
status: "locked",
stages: [
{
stageId: "calc-s8",
topic: "Chain Rule",
module: "Practice",
component: "LogicChain",
skin: "Scientific",
config: {
data: { nodes: ["Identify outer function f", "Identify inner function g", "Differentiate f'(g(x))", "Multiply by g'(x)", "Final answer"] },
initialState: {}
},
validation: { type: "exact", condition: {} },
feedback: { success: "Chain rule mastered!", error: "Don't forget the inner derivative!", hint: "d/dx[f(g(x))] = f'(g(x))·g'(x)" }
}
]
},
{
id: "calc-n9",
title: "Implicit Differentiation",
description: "Differentiate implicitly defined functions.",
type: "concept",
status: "locked",
stages: [
{
stageId: "calc-s9",
topic: "Implicit Differentiation Steps",
module: "Instruction",
component: "LogicChain",
skin: "Code",
config: {
data: { nodes: ["Differentiate both sides", "Apply chain rule to y terms", "Collect dy/dx terms", "Factor out dy/dx", "Solve for dy/dx"] },
initialState: {}
},
validation: { type: "exact", condition: {} },
feedback: { success: "Implicit differentiation complete!", error: "Remember to treat y as a function of x.", hint: "Every y term needs dy/dx." }
}
]
},
{
id: "calc-n10",
title: "Related Rates",
description: "Solve related rates problems.",
type: "exercise",
status: "locked",
stages: [
{
stageId: "calc-s10",
topic: "Related Rates Strategy",
module: "Practice",
component: "LogicChain",
skin: "Scientific",
config: {
data: { nodes: ["Draw diagram", "Write equation relating variables", "Differentiate with respect to t", "Substitute known values", "Solve for unknown rate"] },
initialState: {}
},
validation: { type: "exact", condition: {} },
feedback: { success: "Related rates solved!", error: "Make sure to differentiate with respect to time.", hint: "Everything changes with time." }
}
]
},
{
id: "calc-n11",
title: "Trig Derivatives",
description: "Differentiate trigonometric functions.",
type: "concept",
status: "locked",
stages: [
{
stageId: "calc-s11",
topic: "Trig Function Derivatives",
module: "Instruction",
component: "TaxonomyMatrix",
skin: "Code",
config: {
data: {
buckets: ["Positive Cosine Family", "Negative Sine Family"],
items: [
{ id: "trig1", content: "d/dx[sin x] = cos x" },
{ id: "trig2", content: "d/dx[cos x] = -sin x" },
{ id: "trig3", content: "d/dx[tan x] = sec²x" },
{ id: "trig4", content: "d/dx[cot x] = -csc²x" }
]
},
initialState: { assignments: {} }
},
validation: { type: "exact", condition: {} },
feedback: { success: "Trig derivatives classified!", error: "Review co-function patterns.", hint: "Co-functions have negative derivatives." }
}
]
},
{
id: "calc-n12",
title: "Higher-Order Derivatives",
description: "Compute second and third derivatives.",
type: "exercise",
status: "locked",
stages: [
{
stageId: "calc-s12",
topic: "Higher-Order Derivatives",
module: "Practice",
component: "LogicChain",
skin: "Code",
config: {
data: { nodes: ["f(x)", "f'(x) — First derivative", "f''(x) — Second derivative", "f'''(x) — Third derivative"] },
initialState: {}
},
validation: { type: "exact", condition: {} },
feedback: { success: "Higher-order derivatives done!", error: "Just keep differentiating!", hint: "Differentiate the previous result." }
}
]
},
{
id: "calc-n13",
title: "L'Hôpital's Rule",
description: "Evaluate indeterminate limits.",
type: "concept",
status: "locked",
stages: [
{
stageId: "calc-s13",
topic: "L'Hôpital's Rule",
module: "Instruction",
component: "LogicChain",
skin: "Scientific",
config: {
data: { nodes: ["Check 0/0 or ∞/∞ form", "Differentiate numerator", "Differentiate denominator", "Re-evaluate limit", "Repeat if needed"] },
initialState: {}
},
validation: { type: "exact", condition: {} },
feedback: { success: "L'Hôpital's applied correctly!", error: "Only works for indeterminate forms.", hint: "Must be 0/0 or ∞/∞ first." }
}
]
},
{
id: "calc-n14",
title: "Mean Value Theorem",
description: "Understand and apply MVT.",
type: "exercise",
status: "locked",
stages: [
{
stageId: "calc-s14",
topic: "MVT Application",
module: "Practice",
component: "LogicChain",
skin: "Code",
config: {
data: { nodes: ["Verify continuity on [a,b]", "Verify differentiability on (a,b)", "Compute [f(b)-f(a)]/(b-a)", "Set f'(c) equal to slope", "Solve for c"] },
initialState: {}
},
validation: { type: "exact", condition: {} },
feedback: { success: "MVT applied perfectly!", error: "Check the theorem conditions.", hint: "There exists a c where the tangent equals the secant." }
}
]
},
{
id: "calc-n15",
title: "Final Challenge",
description: "Comprehensive limits & derivatives assessment.",
type: "challenge",
status: "locked",
stages: [
{
stageId: "calc-s15",
topic: "Comprehensive Review",
module: "Assessment",
component: "TaxonomyMatrix",
skin: "Code",
config: {
data: {
buckets: ["Differentiation Technique", "Limit Technique"],
items: [
{ id: "final1", content: "Chain Rule" },
{ id: "final2", content: "L'Hôpital's Rule" },
{ id: "final3", content: "Product Rule" },
{ id: "final4", content: "Squeeze Theorem" }
]
},
initialState: { assignments: {} }
},
validation: { type: "exact", condition: {} },
feedback: { success: "Congratulations! Calculus mastered!", error: "Review the course material.", hint: "Classify each technique by its primary use." }
}
]
}
]
};