Darko Suvin defines sf thus:

a literary genre or verbal construct whose necessary and sufficient conditions are the presence and interaction of estrangement and cognition, and whose main device is an imaginative framework alternative to the author’s empirical environment. (Metamorphoses of Science Fiction: on the history and poetics of a literary genre, Yale UP, 1995. 37)