Debian Codegraph @

apps/tc/tests/tlc.v

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 (* Test inspired from tlc library *)
2 From elpi Require Import tc.
3
4 Module extensionability.
5 Notation binary A := (A -> A -> Prop).
6 Class Extensionality (T : Type).
7 Global Instance Extensionality_pred_2
8 (A1 : Type) (A2 : forall (x1 : A1), Type):
9 Extensionality (forall (x1:A1) (x2:A2 x1), Prop). Qed.
10
11 Goal forall A, Extensionality (binary A).
12 intros.
13 apply _.
14 Qed.
15 End extensionability.
16
17 Module SlowExecution.
18 Set Implicit Arguments.
19
20 Elpi Accumulate TC.Solver lp:{{
21 % :after "normalize-ty" tc.link.scope-check _ _ :- !, true.
22 }}.
23
24 Class Extensionality (A:Type) := Extensionality_make {
25 extensionality_hyp : A -> A -> Prop;
26 extensionality : forall (x y : A), extensionality_hyp x y -> x = y }.
27
28 Section FuncExtDep.
29 Variables (A1 : Type).
30 Variables (A2 : forall (x1 : A1), Type).
31 Variables (A3 : forall (x1 : A1) (x2 : A2 x1), Type).
32 Variables (A4 : forall (x1 : A1) (x2 : A2 x1) (x3 : A3 x2), Type).
33 Variables (A5 : forall (x1 : A1) (x2 : A2 x1) (x3 : A3 x2) (x4 : A4 x3), Type).
34 Variables (A6 : forall (x1 : A1) (x2 : A2 x1) (x3 : A3 x2) (x4 : A4 x3) (x5 : A5 x4), Type).
35
36 Global Instance Extensionality_fun_1 :
37 Extensionality (forall (x1:A1), A2 x1). Admitted.
38
39 End FuncExtDep.
40
41 Lemma eq_existT_same_eq (A : Type) (P : A -> Type) (p : A) (x y : P p):
42 (existT P p x = existT P p y) = (x = y).
43 Proof.
44 Timeout 30 Fail refine (@extensionality _ _).
45 Abort.
46 End SlowExecution.