In the interactive theorem prover Coq, any interactive proof or definition can be terminated with either Qed
or Defined
. There is some concept of \"opa
You are not really able to use the value of x
, but only its type. For example, since x
is false
, try to prove that x = false
or that x = true
, and you won't be able to. You can unfold the definition of not_x
(its definition is the same as that of x
, but using Defined
), but you won't be able to inspect the value of x
, you only know that it is a boolean.
Lemma not_x_is_true : not_x = true.
Proof.
unfold not_x. (* this one is fine *)
unfold x. (* This one is not. Error: Cannot coerce x to an evaluable reference. *)
The idea behind Qed
vs Defined
is that in some cases, you don't want to look at the content of proof term (because it is not relevant, or just a really huge term you don't want to unfold), and all you need to know is that the statement is true, not why it is true. In the end, the question you have to ask before using Qed
or Defined
is: Do I need to know why one theorem is true, or do I only need to know that it is true?