
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
In the Cartesian coordinate system, with the origin as the pole and the positive half-axis of the x-axis as the polar axis, a polar coordinate system is established. The polar equation of line $l$ is $\rho\cos(\theta+ \frac{\pi}{4})= \frac{\sqrt{2}}{2}$, and the parametric equation of curve $C$ is $\begin{cases} x=5+\cos\theta \\ y=\sin\theta \end{cases}$ (where $\theta$ is the parameter).

(1) Find the Cartesian equation of line $l$ and the ordinary equation of curve $C$;  
(2) Curve $C$ intersects the x-axis at points $A$ and $B$, with the x-coordinate of point $A$ being less than that of point $B$. Let $P$ be a moving point on line $l$. Find the minimum value of the perimeter of $\triangle PAB$.

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