Debian Codegraph @

test-suite/success/Discriminate.v

raw
1 (* Check the behaviour of Discriminate *)
2
3 (* Check that Discriminate tries Intro until *)
4
5 Lemma l1 : 0 = 1 -> False.
6 discriminate 1.
7 Qed.
8
9 Lemma l2 : forall H : 0 = 1, H = H.
10 discriminate H.
11 Qed.
12
13 (* Check the variants of discriminate *)
14
15 Goal O = S O -> True.
16 discriminate 1.
17 Undo.
18 intros.
19 discriminate H.
20 Undo.
21 Ltac g x := discriminate x.
22 g H.
23 Abort.
24
25 Goal (forall x y : nat, x = y -> x = S y) -> True.
26 intros.
27 try discriminate (H O) || exact I.
28 Qed.
29
30 Goal (forall x y : nat, x = y -> x = S y) -> True.
31 intros.
32 ediscriminate (H O).
33 instantiate (1:=O).
34 Abort.
35
36 (* Check discriminate on identity *)
37
38 Goal ~ identity 0 1.
39 discriminate.
40 Qed.
41
42 (* Check discriminate on types with local definitions *)
43
44 Inductive A := B (T := unit) (x y : bool) (z := x).
45 Goal forall x y, B x true = B y false -> False.
46 discriminate.
47 Qed.