Debian Codegraph @

apps/tc/tests/test_eta.v

raw
1 From elpi Require Import tc.
2
3 Module M1.
4 Axiom T : Type.
5 Axiom P : T -> T -> T.
6
7 Class eta (P: T -> T -> T).
8
9 Instance I1: eta P. Qed.
10
11 Goal eta (fun x => P x). Proof. apply _. Qed.
12 Goal eta (fun x y => P x y). Proof. apply _. Qed.
13 End M1.
14
15 Module M2.
16 Axiom T : Type.
17 Axiom P1 : T -> T.
18 Axiom P2 : T -> T -> T.
19
20 Class eta (P1 : T -> T) (P2: T -> T -> T).
21
22 Instance I1: eta P1 P2. Qed.
23
24 Goal eta (fun x => P1 x) P2. Proof. apply _. Qed.
25 Goal eta P1 (fun x y => P2 x y). Proof. apply _. Qed.
26 Goal eta (fun x => P1 x) (fun x y => P2 x y). Proof. apply _. Qed.
27 End M2.
28
29 Module M3.
30 Axiom T : Type.
31 Axiom P : T -> T.
32
33 Class eta (P: T -> T).
34 Class aux (P: T -> T).
35
36 Instance auxInst : aux (fun x => x). Qed.
37
38 Instance I1: forall (P : T -> T), aux (fun x => P x) -> eta P. Qed.
39
40 Goal exists P, eta (fun x => P x). Proof. eexists. apply _. Qed.
41 End M3.
42