well it was formulated by decartes in his meditations..
he just states that there may be some evil genius who is capable of creating or simulating a world in which he lives and is therefore not real at all. it's identical to his dream world
Descart also came to the conclusion it does not matter what the evil genius does to reality because reality to him is what he makes of it, and said his very famous phrase " I think therefore I am".