
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}\sin{x}\cos{x}-\sqrt{2}\cos^{2}x+\frac{\sqrt{2}}{2}$.  
$(1)$ Find the interval where the function $f(x)$ is monotonically increasing.  
$(2)$ If $g(x)=f(x)+f(x+\frac{\pi}{4})-f(x)\cdot f(x+\frac{\pi}{4})$, and there exist $x_{1}$, $x_{2}\in \mathbb{R}$ such that for any $x\in \mathbb{R}$, $g(x_{1})\leq g(x)\leq g(x_{2})$ always holds, find the minimum value of $|x_{1}-x_{2}|$.

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