I think that I have found an issue with the proof of the halting problem, which would cause the entire proof to be invalid.
To ensure I understand, here is Turing's proof of the halting problem being unsolvable.
Proof:
Assume the function $h(x,y)$ determines whether the function $y(x)$ halts on input x, $h(x,y)$ returns True, or 1 if $y(x)$ halts, otherwise it returns False or 0.
Given that the function $h(x,y)$ exists, it must be possible to create a new function, $h'(x)$, which is just $h(x,x)$. In essence, $h'(x)$ determines if the program $x()$ halts when run with itself (encoded in the form of a number).
If $h'(x)$ also exists, then again, a new function $H(x)$ can be created. $H(x)$ in pseudo code is:
Def H(x)
If h'(x) == True:
Loop forever
Otherwise:
Return()
Now when $H$ is run with itself as an input – $H(H)$ - a paradox is created:
If $H(H)$ will halt, then $H$ run with itself as an input must loop, but that is the original statement
Otherwise if $H(H)$ loops, then $H$ run on itself must halt, which is a contradiction.
Hence $H(x)$ cannot exist, and by extension $h(x)$ cannot exist
Disproof of the proof:
If we assume that the logic in Turing's proof is correct, then we can do this:
Assume the function $l(x,y)$ determines whether $y(x)$ takes more than n, where n is any number, seconds to compute.
Symmetrically to $h(x,y)$ going to $h'(x)$, $l'(x)$ can also be created from $l(x,y)$, where $l'(x)$ = $l(x,x)$.
Finally, exactly the same as in Turing's proof, $L(x)$ can also exist. $L(x)$ will take more than n seconds to compute if $l'(x)$ returns False, and otherwise will take less than n seconds. $L(x)$ does the opposite of $x(x)$.
If $L(x)$ does exist, then $L(L)$ can be run, and results in a paradox the same way that $H(H)$ does.
But the function $l(x,y)$ is possible to create, by simply timing the function $y(x)$. It may be that some adjustments are needed to fix the way $l(x,y)$ works, e.g there is an inherent time associated with the function so you need to subtract a number, but the function should work.
Edit: Because it is confusing as to exactly what $l(x,y)$ is, I should clarify. What the function $l(x,y)$ is is completely irrelevant to whether the proof works. I chose the steps taken or the time taken because it is similar to the original problem, but an easy function might be something like if the first character of x and y are both in the first half of the alphabet. That would still work with the proof.
Not only this, but the logic can be extended to any meta-program, and because most programs could be divided into 2 programs, the same way that $x^2 + 8x + 16$ can be divided into $f(g(x))$ where $f(x) = x^2$ and $g(x) = x + 4$. Turing's proof, if correct, would also prove that any program is not able to be created, which is evidently false, hence the proof must be false. Is this incorrect?