Debian Codegraph @

tests-stdlib/test_ring.v

raw
1 From elpi Require Import elpi.
2 From Stdlib Require Import ZArith Lia.
3
4 (* we test we can call ML tactics *)
5
6 Elpi Tactic xlia.
7 Elpi Accumulate lp:{{
8 solve G GL :- coq.ltac.call-mltac "rocq-runtime.plugins.micromega" "Lia" 0 G GL ok.
9 }}.
10 Tactic Notation "mylia" :=
11 Zify.zify; elpi xlia ltac_tactic:(zchecker).
12
13 Open Scope Z.
14
15 Goal 0 = 0 :> Z.
16 mylia.
17 Qed.
18
19 From Stdlib Require Import Ring.
20
21 Ltac xx rl :=
22 let G := Get_goal in
23 ring_lookup (PackRing Ring_simplify) [] rl G.
24
25 Elpi Tactic test.
26 Elpi Accumulate lp:{{
27 solve (goal C R T E []) GL :- coq.ltac.call-ltac1 "xx" (goal C R T E [trm {{ 0 + 0 }}]) GL ok.
28 }}.
29
30 Goal forall f, 0 = f (0 + 0) :> Z.
31 intro f.
32 elpi test.
33 match goal with |- 0 = f 0 => idtac end.
34 Abort.