
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
Assume the function $f(x) = 2\sin x \cos^2\left(\frac{\varphi}{2}\right) + \cos x \sin\varphi - \sin x$, where $(0 < \varphi < \pi)$, takes 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 lengths of the sides opposite to 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