The Talmud, with its characteristic brevity, expresses this in four Hebrew words: hakol tzafuy v'hareshut nitana, "everything is forseen, but permission is given." (Avot 3:19).
It's also elegantly expressed in Chaucer's Canterbury Tales, in "The Nun's Priest's Tale." Chaunticleer the rooster has a dream in which he foresees that he will be eaten by a red beast (a fox). He tells his dream to his wife Pertelote, and they discuss whether this was a natural dream or a divine prophetic dream. If the latter, can Chauntecleer escape his fate? They work it out by going through a number of examples that God sometimes warns people through dreams, but leaves the dreamer free to choose how he will respond to the warning.
This in turn is based many on Boethius's "Consolation of Philosophy," which draws the distinction between Divine Providence and pagan fate.