An example where this is true would be ( i think this is right - other mathematicians are welcome to check)
$$\\examples\\
x=\sqrt y\\
y=x^3\\
y=-x(3-x)^2$$
https://www.desmos.com/calculator/upcp0cts6b
Notice that all the positive y values have a unique x value.
So the top half of the graph passes the horizontal line test.
A one-to-one function is a function where each x-value is paired with exactly one y-value and each y-value is paired with exactly one x-value.
The "if f(x) > 0" part says that the function will be one-to-one when the y-values are greater than zero.
If f(x) ≤ 0, it still may be a one-to-one function, but does not have to be.
An example where this is true would be ( i think this is right - other mathematicians are welcome to check)
$$\\examples\\
x=\sqrt y\\
y=x^3\\
y=-x(3-x)^2$$
https://www.desmos.com/calculator/upcp0cts6b
Notice that all the positive y values have a unique x value.
So the top half of the graph passes the horizontal line test.