
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 the function $f(x)=\ln x+\frac{a}{x}-1$, where $a\in \mathbb{R}$.

$(1)$ If the tangent line to the curve $y=f(x)$ at the point $(1,f(1))$ is perpendicular to the line $x-y+1=0$, find the extreme values of the function $f(x)$;

$(2)$ Let the function $g(x)=x+\frac{1}{x}$. When $a=-1$, if there exists $x_0$ in the interval $[1,e]$ such that $g(x_0) < m[f(x_0)+1]$, find the range of the real number $m$. ($e$ is the base of the natural logarithm)

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