generate_sympy_script
Generate a complete SymPy script that performs specified symbolic operations on given expressions, producing a standalone runnable script for reproducible derivations.
Instructions
Generate a standalone SymPy script for a computation.
This generates a complete, runnable Python script that can be
executed independently to reproduce the derivation.
Args:
expressions: List of {"name": str, "expr": str, "description": str}
operations: List of operations to perform
{"op": "simplify|solve|diff|integrate", "input": str, ...}
Returns:
Complete Python script
Example:
generate_sympy_script(
expressions=[
{"name": "momentum", "expr": "m1*v1 + m2*v2", "description": "Total momentum"},
],
operations=[
{"op": "solve", "input": "momentum = (m1+m2)*v_f", "for": "v_f"},
]
)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operations | Yes | ||
| expressions | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||