While attempting to prove All in Software Foundations Volume 1, Logic.v, I came across a proof state of simply True. I.e. my proof state looks like:
T : Type
P : T -> Prop
H : forall x : T, False -> P
==================================
(1/1)
True
I understand that simply using reflexivity should get my to my goal. But, I don't understand why, or what it means for the proof state to simply be True. What does this mean? And why does reflexivity work here?
You can ask Coq to print the definition of any term:
Print True.The response is:
From this response, we see that
Trueis a proposition, and thatIis (by fiat) a proof ofTrue.When you have something like
H : forall x : T, False -> Pin your context above, it meansHis a proof offorall x : T, False -> P, so that if your goal were to beforall x : T, False -> Pthen you could prove this goal using the commandexact H.In general, whenever you have
H : PwherePis a proposition, thenHis a proof ofP.Accordingly, in this case, you have
I : True, and your goal isTrue, so you can prove this goal using the commandexact I.