
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Let \( A = \{1, 2, 3, m\} \) and \( B = \{4, 7, n^4, n^2 + 3n\} \). The correspondence rule \( f: a \rightarrow b = pa + q \) is a one-to-one mapping from \( A \) to \( B \). It is known that \( m \) and \( n \) are positive integers, the image of 1 is 4, and the preimage of 7 is 2. Find the values of \( p, q, m, n \).

Present the answer in LaTex format: \boxed{Your answer}
user