Proof by Turing Reduction I need to proof the following by turing reduction.

Given two languages:

$Q= \{(\langle M_1 \rangle , \langle M_2 \rangle ) \mid L(M_1) = L(M_2)\}$

$I= \{\langle M \rangle \mid \;\vert L(M) \vert = \infty \}$

Where $\langle M_1 \rangle$ is the encoding of Turing Machine $M_1$.

I need to show that $ I \le_T Q $ ($I$ can be reduced to $Q$ using a Turing Machine).

So far I came up with the following idea, which I think isn't correct.

Create Turing Machine $M'$ so that a mapping from $Q$ to $I$ is found:


$M'$ takes as input a random word $u$ for example $aab$
$M'$ removes the input ($u$) from its tape
$M'$ guesses words $v$ and $w$ 
$M'$ checks if $v \in L(M_1)$ and $ w \in L(M_2)$ if and only if $v = w$
Your solution doesn't quite make sense for many reasons:


The reduction should take $\langle M \rangle$ as input, and using an oracle to $Q$, decide whether $\langle M \rangle \in I$.
The reduction should be deterministic (so step 3 is invalid).
The function of the arbitrary word $u$ is not explained; indeed, steps 1 and 2 seem useless.
You don't explain what $M_1,M_2$ are in step 4 (are you trying to reduce from $Q$ to $I$?).
You don't explain how to implement step 4.


Also, you are missing a proof that your reduction works. Without a proof, your solution is wrong even if it could be completed to a correct solution.

One solution goes along the following lines (I'm assuming $L(M)$ consists of all inputs on which $M$ halts; I also say that $n \in L(M)$ is accepted by $M$):


Given $M$, let $M'$ be the machine that on input $n$, simulates $M$ on $n$, and then (if $M$ halted) tries to find an $m &gt; n$ accepted by $M$ (if there is no such $M$, it never halts); you can implement this using the technique of dovetailing.
Give $M$ and $M'$ to the $Q$ oracle, and return its answer.


The idea is that $L(M)$ is infinite iff $L(M) = L(M')$. I'll leave you the details.