Debian Codegraph @

test-suite/output/EmptyExtraction.v

raw
1 From Corelib Require Extraction.
2
3 (** Testing extraction of stdlib Empty_set *)
4
5 Recursive Extraction Empty_set.
6 Extraction TestCompile Empty_set.
7
8 (** Testing extraction of a type level not *)
9
10 Definition not : Type -> Type := fun X => X -> Empty_set.
11
12 Recursive Extraction not.
13 Extraction TestCompile not.
14
15 (** Testing extraction of a simple proof using not but no elimination. *)
16
17 Definition foo : forall X, not (not (not X)) -> not X.
18 Proof.
19 intros X.
20 intros p q.
21 apply p.
22 intros r.
23 apply r.
24 exact q.
25 Defined.
26
27 Recursive Extraction foo.
28 Extraction TestCompile foo.
29
30 (** Testing extraction of a user defined Empty *)
31
32 Inductive Empty : Set := .
33
34 Recursive Extraction Empty.
35 Extraction TestCompile Empty.
36
37 (** Testing extraction of Empty eliminator *)
38
39 Recursive Extraction Empty_rect.
40 Extraction TestCompile Empty_rect.
41
42 (** Testing extraction of an slightly different eliminator *)
43
44 Definition bar : Empty -> forall A, A := fun x => Empty_rect _ x.
45
46 Recursive Extraction bar.
47 Extraction TestCompile bar.