Instead of solving the halting problem, I will try to solve a less complicated problem in a similar manner.
Can we write a function that will predict if two given numerical inputs are equal. I will not create such function but, let's assume such function can exist and we will call it H. Now we have H, a function that works and solves our problem, but let's write another function and call it H+, a function that will negate the results of our perfectly working function.
def H(p1, p2): #perfectly working piece of code that will solve our problem # returns True if p1 == p2, else returns False def H+(p1, p2): return not H(p1, p2)
Now when we have the code lets compare p1 = 1, p2 = 2. And let's use the function H+, why not, it is the same function as H, a function we know works. H+ just negates the results from H. The result of H+ is True, how can it be?? we know that 1 is not equal to 2 so we have a paradox here hence proving we cannot write a function to predict if two numerical values will be equal.
Now to the Halting problem,
If I understand correctly the Halting problem was prooven in a similar way; There is a machine H that can predict if a problem is solvable. There is a bigger machine that uses H but negates its results called H+. Then if H+ is fed into H+ it will create a paradox. Of course, H+ will not work. We assume machine H is the one that will give us the right result, why do we think that H will still work the same way after modifying it and turning it into H+??
What happens if we feed H+ into H will we still have the same paradox? I don't think so.