Definition of constants using evidence of existence in Coq

After proving the existence statement, it is often convenient to introduce a constant symbol for some evidence of this theorem.

As a simple example, it is much easier to write (in typical mathematical notation)

∀x. ∅ ⊆ x.

what to write

∀x. ∃y. empty(y) and y ⊆ x.

I want to repeat this effect in Coq. Here is the main scenario that I am facing, and my attempt, which leads to an error (now in real Coq code):

Variable A:Type.
Hypothesis inhabited: exists x:A, x=x.

Definition inhabitant:A.
  destruct inhabited.  
  (*Error: Case analysis on sort Type is not allowed for inductive definition ex.*)

I am wondering what this error message means, and if there is any way around this. Thank!

+4
source share
1 answer

Prop vs Type. Prop (. ex), , , , Type.

sig ( sigS sigT), :

Hypothesis inhabited : {x : A | x = x }.
+4

All Articles