
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 the function $f(x)=2\sin x\cos^2 \frac{\varphi}{2}+\cos x\sin \varphi-\sin x$ $(0 < \varphi < \pi)$ take its minimum value at $x=\pi$.  
$(I)$ Find the value of $\varphi$ and simplify $f(x)$;  
$(II)$ In $\triangle ABC$, $a$, $b$, and $c$ are the sides opposite angles $A$, $B$, and $C$ respectively, given that $a=1$, $b= \sqrt{2}$, and $f(A)= \frac{\sqrt{3}}{2}$, find angle $C$.

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