
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 range of real numbers $m$ for which the equation $(m+1)x^2 - mx + m - 1 = 0$ has real roots be the set $A$, and the domain of the function $f(x) = \lg(x^2 - (a+2)x + 2a)$ be the set $B$.
(1) Find the set $A$; (2) If $A \cup B = B$, find the range of the real number $a$.

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