
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)= \sqrt{2}\cos\left(2x-\frac{\pi}{4}\right)$, $x\in\mathbb{R}$.

(1) Determine the least positive period of the function $f(x)$ and the intervals in which it is monotonically decreasing.

(2) Find the minimum and maximum values of the function $f(x)$ in the interval $\left[-\frac{\pi}{8}, \frac{\pi}{2}\right]$ and determine the values of $x$ for which these extreme values are reached.

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