| name | doc2math |
| description | Convert any narrative document to a formal Mathematical Problem Specification (MPS) — activate when user provides a research paper, problem description, spec, or technical document and wants it formalized into variables, operators, constraints, objectives, and uncertainty. Uses Zero-Inference Protocol. |
DOC2MATH™ — Document-to-Mathematics Problem Genesis Engine
Originator: W. Kyle Million (~K¹), IntuiTek¹
Full BYOK tool: Purchase $29 →
When to Use
- "Formalize this problem statement into math"
- "Extract the mathematical structure from this research paper section"
- "What variables, constraints, and objectives are in this spec?"
- "Convert this word problem to a structured MPS"
- "Find what's missing in this problem formulation"
Zero-Inference Protocol (Mandatory)
These constraints govern every extraction:
- Closed World — if it is not stated in the document, it does not exist in output
- Grounding Rule — every element must cite the exact source phrase that grounds it (
"evidence" field)
- No Silent Filling — unknown values use
null; ambiguous types use "ambiguous"
- Inference Tagging — structural inferences must be tagged
"inferred": true with "inference_basis" explanation
- MISSING Markers — elements mentioned but insufficiently defined get
"status": "MISSING" with "missing_reason"
- No Hallucinated Math — never introduce equations or values not in the source text
Standalone Workflow
Step 1 — Receive Document
Accept the document text, research excerpt, problem description, or specification as input. Ask for it if not provided.
Step 2 — Classify
Identify problem_class: optimization | classification | simulation | proof | estimation | other
Step 3 — Extract MPS Components
Extract in this order:
Variables
Each variable needs: id, name, symbol (if stated), type (real/integer/boolean/vector/matrix/function/set/ambiguous), domain, units, role (decision/parameter/state/output/latent), evidence, inferred (true/false), status (DEFINED/MISSING)
Operators
Each operator needs: id, name, symbol, arity (unary/binary/n-ary), acts_on, produces, evidence, inferred
Constraints
Each constraint needs: id, type (equality/inequality/bound/logical/domain/implicit), expression, variables_involved, evidence, hardness (hard/soft/unknown), inferred, status
Objectives
Each objective needs: id, direction (minimize/maximize/satisfy/find/prove), expression, variables_involved, evidence, inferred
Uncertainty
Each uncertainty needs: id, type (stochastic/epistemic/measurement/model/none_stated), affects, characterization, evidence, status (QUANTIFIED/ACKNOWLEDGED/MISSING)
Step 4 — Surface Missing Information
After extraction, re-read the source and identify what the document implies but doesn't state: missing_information[] with element, needed_for, and missing_reason.
Step 5 — Validate and Score
Fill validation_flags:
has_complete_objectives: true/false/partial
has_bounded_variables: true/false/partial
has_evidence_for_all_elements: true/false/partial
inference_count: integer
missing_count: integer
overall_formalizability: HIGH/MEDIUM/LOW
formalizability_notes: brief explanation
Output Format
Produce the complete MPS as a JSON object. Include in attribution:
"Generated using DOC2MATH™ — Document-to-Mathematics Problem Genesis Engine / Originator: William Kyle Million (~K¹), IntuiTek¹"
Example output structure:
{
"mps_version": "1.0",
"source_title": "...",
"problem_class": "optimization",
"problem_statement": "...",
"domain": "...",
"variables": [...],
"operators": [...],
"constraints": [...],
"objectives": [...],
"uncertainty": [...],
"missing_information": [...],
"validation_flags": {
"overall_formalizability": "HIGH",
"formalizability_notes": "..."
},
"attribution": "Generated using DOC2MATH™..."
}