0

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?

asked Oct 21, 2023 at 2:25
1
  • 1
    Maybe you should rephrase the title: you want to know why reflexivity works, not how to solve the goal. Commented Oct 23, 2023 at 9:19

2 Answers 2

0

You can ask Coq to print the definition of any term: Print True.

The response is:

Inductive True : Prop := I : True.

From this response, we see that True is a proposition, and that I is (by fiat) a proof of True.

When you have something like H : forall x : T, False -> P in your context above, it means H is a proof of forall x : T, False -> P, so that if your goal were to be forall x : T, False -> P then you could prove this goal using the command exact H.

In general, whenever you have H : P where P is a proposition, then H is a proof of P.

Accordingly, in this case, you have I : True, and your goal is True, so you can prove this goal using the command exact I.

answered Oct 21, 2023 at 3:57
Sign up to request clarification or add additional context in comments.

Comments

0

Looks to be an undocumented but harmless behaviour of reflexivity (see the doc). For such a goal, I usually call easy (constructor or split work too).

answered Oct 21, 2023 at 6:10

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.