There's a part in Turing's halting problem proof that I don't understand
So the proof to my understanding goes like this:
Imagine a machine A which takes in a machine B's code and that B's input as its own input and tells us if the problem halts exists
Place A into a greater machine C which takes the output of A and if A returns "halts" it goes into an infinite loop, and if it returns "does not halt" C halts.
Use C as an input to C and create a paradox.
The part I don't understand is how exactly the last step is a paradox. A, and therefore C don't just take in a machine as an input, but also that machines input, so you can't just put the machine C into itself without the context of what is being put into C.
Therefore C(C(B)) is not the same program as C(B), so why do they need to have the same result in order for it not to be a paradox?
Edit: i think i get it now, C modifies A not just in how it reacts to the output but it also modifies the input to be the same for both the program and the program's input
Thanks to u/OpiskionThemed, u/Aminumbra and u/stevemegson for explaining it