'But I say unto you, That whosoever looketh on a woman
 to lust after her hath committed adultery 
with her already in his heart.' - Matthew 5:28 KJV
		
		
	 
This 'quote' is from the 
Sermon on the Mount, 
which is an artificial and non-historical speech 
that is really a kind of 'Halakah' or attempt 
to sum up Jesus' teaching, but divides much of it from its context. 
This 'quote' is not an authentic saying of Jesus, 
but is in fact prime forensic evidence for the authenticity of John 8:1-11. 
When we grasp that this verse is 
an interpretation of Jesus, 
inspired by His actions in 
John 8:1-11, 
we immediately get several valuable things out of it:
(1)  John 8:1-11 is authentic, and although problematic because of its ambiguity, 
was given an interpretation by the early Church that Jews and Christians could accept, 
allowing them to skip over the more difficult questions raised by 
the original incident.
 (2)  Matthew (or the church-committe that created it) overstepped his (their) authority, 
in assigning meanings to Jesus' actions that were not necessarily originally intended by Jesus. 
(3)  The 'sayings' of Jesus in Matthew are 'elaborated' and interpreted,
often provided without their original context, and so are neither verifiable, 
nor binding for Christians who want to follow Jesus precisely. 
This verse is good case in point. 
No rational person can accept that the mere thought or momentary 
consideration of a crime is or can be fully equal to consenting to it, 
planning it, and acting on it, with real-world results. 
What Jesus did teach remains true, namely that thinking, desiring, 
and scheming 
leads to sinning, and may involve sin, but they are not 
all equivalent acts, nor do they result in equal guilt.  
Jesus Himself refutes such a claim in another passage 
which is likely a very authentic saying from a different speech:
"No good tree bears bad fruit, nor does a bad tree bear good fruit." -  
Luke 6:43
 This saying also has been elaborated and expanded in 
Matthew, 
for the purpose of explaining it and expounding it,
"You will know them by their fruits. Grapes are not gathered from thorn bushes nor figs from thistles, are they?  So every good tree bears good fruit, but the bad tree bears bad fruit.  A good tree cannot produce bad fruit, nor can a bad tree produce good fruit.   Every tree that does not bear good fruit is cut down and thrown into the fire.  So then, you will know them by their fruits. " -  Matt. 7:16-20
...however 
this did not likely happen in public orations by Jesus, 
since in 
Mark we are told how Jesus really operated:
As soon as He was alone, His followers, along with the twelve, began asking Him about the parables.  And  He was saying to them, "To you has been given the mystery of the  kingdom of God, but those who are outside get everything in parables,   so  that while seeing they may see and not perceive, and while hearing they may hear and not understand, otherwise they might repent and be forgiven. " 
. Mark 4:10-12
The account in Mark is earlier and likely more accurate in portraying 
Jesus earthly ministry. 
The 'Speech' in Matthew is really meant as a timeless message which 
summarizes the main teachings of Jesus as the early church understood them, 
and so is presented as a 'universal speech' to all believers for all time, 
meant to remind hearers of all the teachings and stories behind the 'sayings'. 
Matthew is the gospel prepared for church service and worship, 
topically arranged and expanded with additional materials from 
the era of the early church. 
In the Gospels of 
Luke and Mark, Jesus begins His ministry 
in Galilee (a synagogue in Capernaum), not on a mountain.
The interpretation that Matthew gives the 
Pericope de Adultera (John 8:1-11)
is  important, for one of the (several) purposes behind Matthew's  expansions 
is to provide ammo and arguments in disputes between  Christians and Jews
 (who rejected Jesus as Messiah).
Here, 
a very likely early objection to John 8:1-11  was that it casts 
the Pharisees and scribes as possibly physically  guilty of adultery with the woman, 
something which would be implausible  to many Jews who might be potential converts.
Here Matthew has a ready reply:  
The Pharisees were guilty of adultery anyway, for even thinking about 
committing fornication with the woman.  She was their captive, 
and may  have been caught (in the act) without even having clothing on.  
Finally,  how long she was 'under arrest' away from the Romans 
and under who's  charge would remain unclear and open to counter-questions.  
 
Note also that "
is cut down and thrown into the fire.*"  in Matthew 7:20 
is also strong evidence that he is drawing from John's gospel
 in other places (cf. 
John 15:6 etc.), to remind his readers of those urgent teachings.