symbolic-computation-guide
Computer algebra systems: SymPy, SageMath, and Mathematica for research
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Computer algebra systems: SymPy, SageMath, and Mathematica for research
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
公司金融实证研究的"漏斗式选题查找器"。互动开场先后询问 (1) 研究方向、(2) 候选标题数量 N, 再扫描全球文献(已出版英文学术期刊 + SSRN working paper + 全球高校 department seminar 1 年内日程),基于 Edmans (2024) "1000 Rejections" 红线生成 N 个候选标题,**通过并行 subagent(Agent 工具)批量生成计划书 + 查新;每个 subagent 必须强制调用 Skill 工具加载 econfin-proposal 与 novelty-check 两个预设 skill 完成各自模块**,**只有当 novelty score >= 9 时(即 JF/JFE/RFS 顶刊层次),subagent 才把 proposal + 查新报告合并的 md 写入 F:\Dropbox\CC\选题大全\<研究方向短名>\(以"简短选题名称-分数"命名,子文件夹名由 Step 0 从用户输入的研究方向派生);< 9 分的选题在 subagent 内部直接丢弃,绝不写盘、绝不输出**。当用户说"找选题"、"帮我找选题"、"想做 X 方向"、 "empirical CF idea search"、"批量生成研究计划书"、"100 ideas"、"econfin-idea-finder" 时触发。
Create and compile beautiful Beamer presentations following the Rhetoric of Decks philosophy. Use when making slides, creating decks, or compiling .tex presentation files.
Scaffold a new research project with standard directory structure, CLAUDE.md template, and documented README. Use this at the start of every new project to ensure consistent organization.
Download, split, and deeply read academic PDFs. Use when asked to read, review, or summarize an academic paper. Splits PDFs into 4-page chunks, reads them in small batches, and produces structured reading notes — avoiding context window crashes and shallow comprehension.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
| name | symbolic-computation-guide |
| description | Computer algebra systems: SymPy, SageMath, and Mathematica for research |
| metadata | {"openclaw":{"emoji":"🧮","category":"domains","subcategory":"math","keywords":["symbolic-computation","computer-algebra","sympy","sagemath","mathematica","calculus"],"source":"wentor"}} |
A skill for using computer algebra systems (CAS) in mathematical research. Covers symbolic differentiation, integration, equation solving, series expansion, linear algebra, and polynomial arithmetic using SymPy, SageMath, and Mathematica, with practical workflows for research mathematics.
from sympy import (
symbols, expand, factor, simplify, cancel, apart,
sin, cos, exp, log, sqrt, pi, oo, I,
Rational, Eq, solve, solveset, S
)
x, y, z, t, n, k = symbols("x y z t n k")
a, b, c = symbols("a b c", real=True)
# Expression manipulation
expr = (x + 1) ** 3
expanded = expand(expr) # x**3 + 3*x**2 + 3*x + 1
factored = factor(expanded) # (x + 1)**3
# Trigonometric simplification
from sympy import trigsimp
trig_expr = sin(x)**2 + cos(x)**2
simplified = trigsimp(trig_expr) # 1
# Partial fraction decomposition
rational = (x**2 + 2*x + 3) / ((x + 1) * (x + 2) * (x + 3))
partial = apart(rational, x)
# 3/(2*(x + 3)) - 2/(x + 2) + 1/(2*(x + 1))
from sympy import diff, integrate, limit, series, Sum, Product
# Differentiation
f = x**3 * exp(-x) * sin(x)
f_prime = diff(f, x)
f_double_prime = diff(f, x, 2)
# Integration
# Definite integral
area = integrate(exp(-x**2), (x, -oo, oo)) # sqrt(pi)
# Indefinite integral
antideriv = integrate(x * sin(x), x) # -x*cos(x) + sin(x)
# Limits
lim_result = limit(sin(x) / x, x, 0) # 1
lim_inf = limit((1 + 1/n)**n, n, oo) # E (Euler's number)
# Taylor series
taylor = series(exp(x) * cos(x), x, 0, n=6)
# 1 + x - x**3/3 - x**4/6 + ...
# Summation
harmonic = Sum(1/k, (k, 1, n))
partial_sum = harmonic.doit() # harmonic(n) -- returns harmonic number
geometric = Sum(x**k, (k, 0, oo))
closed_form = geometric.doit() # Piecewise(1/(1 - x), Abs(x) < 1)
# Algebraic equations
solutions = solve(x**3 - 6*x**2 + 11*x - 6, x) # [1, 2, 3]
# System of equations
system_sol = solve([
2*x + 3*y - 7,
x - y + 1
], [x, y]) # {x: 4/5, y: 9/5}
# Differential equations
from sympy import Function, dsolve, Derivative
f = Function("f")
# f''(x) + f(x) = 0 (simple harmonic oscillator)
ode = Eq(f(x).diff(x, 2) + f(x), 0)
general_solution = dsolve(ode, f(x))
# f(x) = C1*sin(x) + C2*cos(x)
# With initial conditions
particular = dsolve(ode, f(x), ics={f(0): 1, f(x).diff(x).subs(x, 0): 0})
# f(x) = cos(x)
from sympy import Matrix, eye, zeros, det, Rational
# Define a symbolic matrix
A = Matrix([
[1, 2, 3],
[4, 5, 6],
[7, 8, 10]
])
# Basic operations
print(f"Determinant: {det(A)}") # -3
print(f"Inverse:\n{A.inv()}")
print(f"Eigenvalues: {A.eigenvals()}")
print(f"Rank: {A.rank()}")
# Characteristic polynomial
lam = symbols("lambda")
char_poly = (A - lam * eye(3)).det()
char_poly = expand(char_poly)
# Jordan normal form
P, J = A.jordan_form()
# Null space and column space
null = A.nullspace()
col_space = A.columnspace()
# Symbolic matrix with parameters
M = Matrix([
[a, b],
[c, a]
])
eigenvals = M.eigenvals() # {a - sqrt(b*c): 1, a + sqrt(b*c): 1}
# SageMath syntax (Python-based, but with enhanced number theory)
# Run in SageMath environment or via sage -python
"""
# Prime factorization
factor(2024) # 2^3 * 11 * 23
# Modular arithmetic
R = IntegerModRing(17)
R(3)^(-1) # multiplicative inverse of 3 mod 17
# Elliptic curves
E = EllipticCurve(QQ, [-1, 0])
E.rank()
E.torsion_subgroup()
E.gens()
# Polynomial rings
R.<x,y> = PolynomialRing(QQ)
I = R.ideal(x^2 + y^2 - 1, x - y)
I.groebner_basis() # [y^2 - 1/2, x - y]
# Group theory
G = SymmetricGroup(4)
G.order() # 24
G.center()
G.normal_subgroups()
"""
"""
# SageMath combinatorics
Partitions(10).cardinality() # 42
# Graph theory
G = graphs.PetersenGraph()
G.chromatic_number() # 3
G.is_vertex_transitive() # True
G.automorphism_group().order() # 120
# Posets and lattices
P = posets.BooleanLattice(3)
P.is_lattice()
P.mobius_function(P.bottom(), P.top())
"""
(* Symbolic integration *)
Integrate[x^n * Exp[-x], {x, 0, Infinity}, Assumptions -> n > -1]
(* Result: Gamma[1 + n] *)
(* Solve a PDE *)
DSolve[D[u[x, t], t] == k * D[u[x, t], {x, 2}], u[x, t], {x, t}]
(* Asymptotic expansion *)
Series[Gamma[n + 1], {n, Infinity, 3}]
(* Minimize with constraints *)
NMinimize[{x^2 + y^2, x + y >= 1}, {x, y}]
(* Compute a sum in closed form *)
Sum[1/k^2, {k, 1, Infinity}] (* Pi^2/6 *)
Common CAS workflow in mathematical research:
from sympy import simplify, Abs
def verify_identity(lhs, rhs):
"""Verify a proposed mathematical identity symbolically."""
diff = simplify(lhs - rhs)
if diff == 0:
return "VERIFIED: identity holds symbolically"
else:
return f"NOT VERIFIED: difference = {diff}"
# Example: verify Cauchy-Schwarz for 2D
a1, a2, b1, b2 = symbols("a1 a2 b1 b2", real=True)
lhs = (a1*b1 + a2*b2)**2
rhs = (a1**2 + a2**2) * (b1**2 + b2**2)
diff = expand(rhs - lhs)
# (a1*b2 - a2*b1)**2 >= 0, confirming Cauchy-Schwarz