
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 a circle $C$ passes through points $A(-1,0)$ and $B(3,0)$, and the center of the circle is on the line $x-y=0$.
$(1)$ Find the equation of circle $C$;
$(2)$ If point $P(x,y)$ is any point on circle $C$, find the maximum and minimum distance from point $P$ to the line $x+2y+4=0$.

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