
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 an ellipse $C$: $\frac{x^2}{a^2} + y^2 = 1 (a > 0)$ with one of its foci at $(\sqrt{3}, 0)$.

$(1)$ Find the value of $a$.  
$(2)$ A line $l$ passes through the point $P\left(\frac{1}{2}, \frac{1}{2}\right)$ and intersects the ellipse $C$ at points $A$ and $B$. If point $P$ is exactly the midpoint of the line segment $AB$, find the equation of line $l$.

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