Given an instance (Π,I) of the co-halting problem, construct an instance (Π1,Π2,I) of the same output problem, where Π1 and Π2 are defined as follows:
procedure Π1: Input: input string I while (true) do {}procedure Π2: Input: input string I call Π(I) return I
⇒ Completeness
If Π does not halt on input I, then both Π1 and Π2 do not terminate on input I. Hence (Π1,Π2,I) is a positive instance of the same output problem.
⇐ Soundness
If (Π1,Π2,I) is a positive instance of the same output problem, then Π2 does not terminate on input I. By construction, Π2 does not terminate only if Π does not halt on input I. Hence (Π,I) is a positive instance of the co-halting problem.
Given an instance (Π,I) of the halting problem, construct an instance (Π1,Π2,I) of the same output problem, where Π1 and Π2 are defined as follows:
procedure Π1: Input: input string I return Iprocedure Π2: Input: input string I call Π(I) return I
⇒ Completeness
If Π halts on input I, then both Π1 and Π2 terminate on input I and output I. Hence (Π1,Π2,I) is a positive instance of the same output problem.
⇐ Soundness
If (Π1,Π2,I) is a positive instance of the same output problem, then Π2 terminates on input I. By construction, Π2 can only terminate after Π has halted on input I. Hence (Π,I) is a positive instance of the halting problem.