
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
Given the function $f(x) = 2\sin^2(x + \frac{\pi}{4}) - 2\sqrt{2}\cos(x - \frac{\pi}{4}) - 5a + 2$.

(1) Let $t = \sin x + \cos x$, express the function $f(x)$ as a function $g(t)$ of $t$, and find the expression for $g(t)$.

(2) For any $x \in [0, \frac{\pi}{2}]$, the inequality $f(x) \geq 6 - 2a$ always holds. Find the range of values for $a$.

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