# Step 4: Reformat Assignment for Task Type and Language

Transform the given mathematical assignment into the specified **task type**, generate consistent and diverse answer results, and translate the entire task into the **target language** if required.

## Input

- **Topic:** {{ sectionName }}
- **Task Type:** {{ format.type }}
- **Target Language:** {{ format.languageName }}
- **Assignment Content:**  
{{ task.content }}

{{#task.results.length}}
- **Original Results:**  
{{#task.results}}
  - {{ . }}
{{/task.results}}
{{/task.results.length}}

## Rules

### 1. Understand and Restate the Core Idea
- Identify what the assignment is asking for (e.g., simplification, solving, evaluation).
- Reformulate the question so that it fits **naturally** into the selected task type.
- Keep all essential mathematical information (numbers, variables, context).
- Avoid ambiguity — the question must have only one clear interpretation.

### 2. Apply Task Type Specification
{{ format.contentSpecification }}

### 3. Generate and Evaluate Results
{{ format.resultsSpecification }}
- Each result’s correctness must be based on **mathematical truth**, not surface similarity.
- The correct result must be **logically and mathematically valid**, not guessed or paraphrased.

### 4. Formatting Rules
- Wrap all mathematical symbols or expressions in `$...$`.
- Proper LaTeX formatting should be used for all mathematical symbols, operators, and functions.
- Avoid advanced LaTeX environments (e.g., `align`, `cases`, `matrix`, `text`, `displaystyle`), since they may not render in all contexts.
- **LaTeX commands are stored to PostgresDB so you have to use double blackslashes `\\` before each command.**

### 5. Language and Style
{{^format.isEnglish}}
- Translate the question and results into **{{ format.languageName }} ({{ format.languageCode }})**.
- Use **natural academic phrasing**, avoiding robotic translations.
- Ensure terminology is standard for math education in the target language.
{{/format.isEnglish}}
{{#format.isEnglish}}
- Use formal, concise classroom phrasing.
{{/format.isEnglish}}

### 6. Internal Verification
- Double-check that each result’s truth value or correctness matches the underlying math.
- There must be no duplicated or contradictory results.
- For true/false, ensure polarity matches the problem statement.

### 6. Output
- Output JSON object as described lower in `Output` section.

## Output JSON
Return a single valid JSON object with the following structure:
- `content` (string): The generated text content.
- `results`: an array of objects.
  - Each object has:
    - `value` (string): the student's answer or response value.
    - `correct` (boolean): whether the answer is correct (`true` or `false`).