Science fiction is a genre of fiction dealing with the impact of imagined innovations in science or technology. It differs from fantasy in that, within the context of the story, its imaginary elements are largely possible within scientifically established or scientifically postulated laws of nature. Exploring the consequences of such differences is the traditional purpose of science fiction, making it a "literature of ideas". Science fiction is largely based on writing rationally about alternative possibilities.