Is there a way to enumerate the values of a finite inductive type in Coq?
E.g., consider the type:
Inductive state := A | B | C | D | E.
Is there any way to take this definition and from it, programmatically gain access to A
, B
, C
, D
, and E
? I know in a proof I can use the induction
tactic to prove for each case, but I want to be able to loop over the values of the type.