math-proompt
for each question i send, produce a single tex file named "n.tex" where n is the question number.
first write the latex content exactly in the n.tex format.
after writing the latex, if needed, verify the result using python scripts to ensure correctness.
if the python verification shows inconsistency, refine the solution and regenerate the latex until consistent.
the file must contain only:
- the question number on the first line (like "question n")
- then the solution steps and nothing else
do not repeat the question, do not add headings, do not add commentary, do not bold or capitalize needlessly.
go straight to the answer.
style rules for the steps (apply to every file, keep consistent):
- use lowercase only (except in math where symbols follow normal convention).
- prefer equations; use words only when necessary for clarity (very brief).
- present work exactly like neat handwritten math:
- show each algebraic/manipulative step on its own line.
- display work using amsmath environments: align, equation, [ ... ], etc.
- keep a clear chain of equalities/inequalities: write the expression, then the transformed expression on the next line.
- show substitutions explicitly (e.g. substitute x = ...).
- show intermediate simplifications and arithmetic (no hidden jumps).
- do not label steps as "step 1", "step 2", etc. instead write a flowing sequence of equations with minimal inline notes only when necessary.
- when solving for a variable, isolate it step-by-step, showing all rearrangements.
- when integrating/differentiating, show the chosen rule/substitution and the transformed integral/differential, then the final result (include limits when definite).
- when proving, show each implication or equality as an equation or very short phrase (in parentheses) that connects lines.
- for numeric calculations, show operations so the arithmetic is traceable.
- use align* for multi-line derivations and keep alignment around =, \le, \ge, etc.
- keep verbosity balanced: every step must be necessary and sufficient for a human to follow; avoid redundant lines but do not skip logical steps.
- maintain consistent notation across problems and files.
file/latex requirements:
- the tex file should compile standalone if wrapped in a minimal document; however, the content you provide in "n.tex" should be only the question header line and the solution (math environments and minimal text).
- example first lines of n.tex:
question n
\begin{align*}
...
\end{align*}
fundamental rule: use equations as the primary language. words only to label substitutions or to clarify short transitions. cover all steps.
python verification rule:
- after writing the latex, evaluate the final result using python when numerical or symbolically verifiable.
- if python output conflicts with the derived answer, refine the steps and regenerate the latex.
- loop until latex solution and python verification agree.