Debian Codegraph @

test-suite/success/somatching.v

raw
1 Goal forall A B C (p : forall (x : A) (y : B), C x y) (x : A) (y : B), True.
2 Proof.
3 intros A B C p x y.
4 match type of p with
5 | forall x y, @?F x y => pose F as C1
6 end.
7 match type of p with
8 | forall x y, @?F y x => pose F as C2
9 end.
10 assert (C1 x y) as ?.
11 assert (C2 y x) as ?.
12 Abort.
13
14 Goal forall A B C D (p : forall (x : A) (y : B) (z : C), D x y) (x : A) (y : B), True.
15 Proof.
16 intros A B C D p x y.
17 match type of p with
18 | forall x y z, @?F x y => pose F as C1
19 end.
20 assert (C1 x y) as ?.
21 Abort.
22
23 Goal forall A B C D (p : forall (z : C) (x : A) (y : B), D x y) (x : A) (y : B), True.
24 Proof.
25 intros A B C D p x y.
26 match type of p with
27 | forall z x y, @?F x y => pose F as C1
28 end.
29 assert (C1 x y) as ?.
30 Abort.
31
32 (** Those should fail *)
33
34 Goal forall A B C (p : forall (x : A) (y : B), C x y) (x : A) (y : B), True.
35 Proof.
36 intros A B C p x y.
37 Fail match type of p with
38 | forall x, @?F x y => pose F as C1
39 end.
40 Fail match type of p with
41 | forall x y, @?F x x y => pose F as C1
42 end.
43 Fail match type of p with
44 | forall x y, @?F x => pose F as C1
45 end.
46 Abort.
47
48 (** This one is badly typed *)
49
50 Goal forall A (B : A -> Type) (C : forall x, B x -> Type), (forall x y, C x y) -> True.
51 Proof.
52 intros A B C p.
53 Fail match type of p with
54 | forall x y, @?F y x => idtac
55 end.
56 Abort.
57
58 Goal forall A (B : A -> Type) (C : Type) (D : forall x, B x -> Type), (forall x (z : C) y, D x y) -> True.
59 Proof.
60 intros A B C D p.
61 match type of p with
62 | forall x z y, @?F x y => idtac
63 end.
64 Abort.