Debian Codegraph @

apps/tc/tests/WIP/included_proof.v

raw
1 From elpi.apps Require Import tc.
2
3 Class EqDec (A : Type) :=
4 { eqb : A -> A -> bool ;
5 eqb_leibniz : forall x y, eqb x y = true -> x = y }.
6
7 Generalizable Variables A.
8
9 Class Ord `(E : EqDec A) := { le : A -> A -> bool }.
10
11 Class C (A : Set).
12
13 Elpi TC Solver Override TC.Solver All.
14 Global Instance cInst `{e: EqDec nat} : Ord e -> C nat. Admitted.
15
16 (*
17 We want to be sure that cInst when compiled has only one hypothesis: (Ord e).
18 We don't want the hypothesis {e : EqDec nat} since it will be verified by (Ord e)
19 *)
20 (* TODO: it should not fail *)
21 Fail Elpi Query TC.Solver lp:{{
22 compile {{:gref cInst}} _ _ CL,
23 CL = (pi a\ pi b\ (_ :- (Hyp a b))),
24 coq.say Hyp,
25 pi a b\
26 expected-found (do _) (Hyp a b).
27 }}.
28
29
30