turing machines – Here's why it's wrong to stop proving the problem

Instead of solving the halting problem, I will try to solve a less complicated problem in a similar way.
Can we write a function that predicts whether two given numeric inputs are the same?
I will not create such a function, but suppose such a function can exist and we will call it H. Now we have H, a function that works and solves our problem, but we write another function and call it H +, a function that negates the result of our perfectly functioning 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 if we have the code, we compare p1 = 1, p2 = 2. And if we use the function H +, why not, it's the same function as H, a function that we know works. H + negates only the results of H. The result of H + is true, how can it be? we know that 1 is not equal to 2, so here we have a paradox and prove that we can not write a function to predict whether two numeric values ​​are the same.

Now for the Halting problem,
If I understand that correctly, the Halting problem has been proved in a similar way; There is a machine H that can predict if a problem is solvable. There is a larger machine that uses H, but negates the results named H +. When H + is then fed into H +, a paradox arises. Of course, H + will not work. We assume that machine H delivers the correct result. Why will H still work in the same way after changing and converting to H +?
What happens if we feed H + into H, will we still have the same paradox? I do not think so.