Suppose I become aware of something while dreaming. Does the fact that I am dreaming invalidate the content of my awareness? Or are there cases in which I become veridically aware that p even while and despite dreaming?
In bed I am puzzling over a chess problem. The book drops from my hands and I fall asleep. The solution occurs to me in a dream, and I later upon waking verify that it is correct. This happens. The solution I dreamt was correct despite my having dreamt it. So not everything that appears in a dream is invalidated by so appearing.
Or during a dream it occurs to me that the number of primes between 13 and 19 inclusive is itself prime. (A prime number is an integer greater than 1 the positive integer divisors of which are only 1 and the number itself. Examples: 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29.) The content of my dream-thought is true, indeed necessarily true. So again one cannot validly infer the invalidity of a dream content from the fact that it is a dream content.
Are all items of a priori knowledge that are knowable while awake also knowable while dreaming? I think so. At least in principle. Suppose I come to know a priori by working through the proof that Zorn's Lemma is equivalent to the Axiom of Choice. Could I come to this insight while dreaming? In principle, yes, but not in practice inasmuch as I would need to have visual aids, paper, pencil, books, etc.
In sum, my dreaming that p is consistent with the truth of p if p is knowable a priori.
Due to my embodiment and its limitations, what I know a priori I know in most cases only on the occasion of sense experience, but never on the basis of sense experience. (That's what makes it a priori.) Now suppose there is a visio intellectualis, an intellectual intuition, not only of necessary truths, but also of spiritual substances. Suppose there is mystical knowledge of God or of Persons of the Triniity. Would such mystical insight, if veridical, lose one iota of its veridicality if it were enjoyed while dreaming? Why should it? Perhaps the quiescence of the senses and bodily functions in sleep disposes us toward such extraordinary experiences.
"You're speculating!" No doubt. But if a philosopher can't speculate, who can?