Debian Codegraph @

test-suite/output/unification.v

raw
1 (* coq-prog-args: ("-async-proofs" "off") *)
2
3 (* Unification error tests *)
4
5 Module A.
6
7 (* Check regression of an UNBOUND_REL bug *)
8 Inductive T := C : forall {A}, A -> T.
9 Fail Check fun x => match x return ?[X] with C a => a end.
10
11 (* Bug #3634 *)
12 Fail Check (id:Type -> _).
13
14 End A.
15
16 (* Choice of evar names *)
17
18 Goal (forall x, S (S (S x)) = x) -> exists x, S x = 0.
19 eexists.
20 rewrite H.
21 Show.
22 Abort.
23
24 Goal (forall x, S (S (S x)) = x) -> exists x, S x = 0.
25 eexists ?[x].
26 rewrite H.
27 Show.
28 Abort.
29
30 Goal (forall x, S (S (S x)) = x) -> exists x, S x = 0.
31 eexists ?[y].
32 rewrite H.
33 Show.
34 reflexivity.
35 Qed.
36
37 (* Preserve the name if there is one *)
38
39 Goal (forall x, S x = x) -> exists x, S x = 0.
40 eexists ?[y].
41 rewrite H.
42 Show.
43 reflexivity.
44 Qed.
45
46 (* Use names also when instantiating an existing evar *)
47
48 Lemma L (T : Prop) (H : forall Q R S : Prop, (Q /\ R) /\ S -> T) :
49 exists P:Prop, (P -> T) /\ P.
50 Proof.
51 eexists ?[P]. split.
52 - apply H.
53 - Show.
54 Abort.