Debian Codegraph @

test-suite/bugs/bug_3132.v

raw
1 Unset Elimination Schemes.
2 Inductive eq (A:Type) (x:A) : A -> Prop :=
3 eq_refl : x = x :>A
4
5 where "x = y :> A" := (@ eq A x y) : type_scope.
6
7 Notation "x = y" := (x = y :>_) : type_scope.
8 Notation "x <> y :> T" := (~ x = y :>T) : type_scope.
9 Notation "x <> y" := (x <> y :>_) : type_scope.
10
11 Arguments eq {A} x _.
12 Arguments eq_refl {A x} , [A] x.
13 Set Elimination Schemes.
14
15 Scheme eq_rect := Minimality for eq Sort Type.
16 Scheme eq_rec := Minimality for eq Sort Set.
17 Scheme eq_ind := Minimality for eq Sort Prop.
18
19 (* needed for discriminate to recognize the hypothesis *)
20 Register eq as core.eq.type.
21 Register eq_refl as core.eq.refl.
22 Register eq_ind as core.eq.ind.
23 Register eq_rect as core.eq.rect.
24
25 Lemma foo (H : true = false) : False.
26 Proof.
27 discriminate.
28 Defined.
29 Print foo.
30
31 Goal False.
32 let c := eval cbv delta [foo] in foo in
33 match c with
34 context[eq_ind] => idtac
35 end.
36 Abort.