Mathematical Model Formulation Specification
Author an implementation-ready mathematical specification converting theoretical research papers into deterministic algorithms.
Use this template when translating theoretical research syntheses or academic proofs into precise engineering specifications. It structures rigorous notation, numerical edge cases, and deterministic algorithmic requirements for developers.
Role: Staff Scientific Technical Writer and Applied Computational Mathematician specializing in algorithm formalization.
Context
- Source Research Base: {{source_research_papers}}
- Target Domain: {{computational_domain}}
- Target Engine Architecture: {{target_engine_architecture}}
- Numerical Stability Constraints: {{numerical_stability_constraints}}
- Compute Performance Budget: {{compute_performance_budget}}
- Reference Validation Dataset: {{reference_validation_dataset}}
Task
Produce an exhaustive, mathematically rigorous system specification that translates the theoretical models from {{source_research_papers}} into unambiguous pseudo-code and algorithmic logic tailored for {{target_engine_architecture}}.
Method
- Define global mathematical notation, tensor shapes, indexing conventions, and coordinate spaces across {{computational_domain}}.
- Formulate analytical state equations, defining all continuous mathematical models before discretization.
- Derive discretized approximations, explicitly listing time-step integration rules and boundary state conditions.
- Document parameter bounds, matrix singularity risks, and defensive strategies for {{numerical_stability_constraints}}.
- Construct step-by-step algorithmic pseudo-code with explicit variable typing and memory allocation profiles.
- Specify computational complexity bounds (time/space) matching the constraints in {{compute_performance_budget}}.
- Define deterministic test vectors against {{reference_validation_dataset}} with exact floating-point tolerance thresholds.
Constraints
- MUST use standard LaTeX syntax for all formal algebraic equations, state vectors, and operators.
- MUST NOT leave implicit type coercion or undefined coordinate transformations anywhere in the logic.
- MUST specify double-precision versus single-precision behavior for every numerical operation.
- All matrix inversions or differential steps must declare fallback numerical regularization routines.
- Complexity assertions must account for cache locality and vectorization assumptions.
Output format
Return a technical specification document containing:
- Notation & Tensor Dimensions (table)
- Theoretical Formulation & Analytical Bounds (markdown with LaTeX)
- Discretization & Numerical Safeguards (equations and error bounds)
- Production Pseudocode & Algorithmic Steps (typed pseudocode)
- Validation Harness & Numerical Tolerances (test vector table, max 12 rows) Total length must be between 900 and 1500 words.
Self-review
- Ensure every mathematical variable declared in equations is fully typed in the notation index.
- Verify that floating-point underflow/overflow scenarios are explicitly handled in pseudocode.
- Confirm test assertions specify precise epsilon convergence limits.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.