Debian Codegraph @

test-suite/bugs/bug_18463.v

raw
1 From Corelib Require Import Setoid.
2
3 Module Type Nop. End Nop.
4 Module nop. End nop.
5
6 Module RewriteStratSubstTestF (Nop : Nop).
7 Axiom X : Set.
8
9 Axiom f : X -> X.
10 Axiom g : X -> X -> X.
11 Axiom h : nat -> X -> X.
12
13 Axiom lem0 : forall x, f (f x) = f x.
14 Axiom lem1 : forall x, g x x = f x.
15 Axiom lem2 : forall n x, h (S n) x = g (h n x) (h n x).
16 Axiom lem3 : forall x, h 0 x = x.
17 Definition idnat := @id nat.
18
19 Ltac rs1 := rewrite_strat topdown lem2.
20 Ltac rs2 := rewrite_strat try fold idnat.
21 Ltac rs3 := rewrite_strat try subterms lem2.
22 Ltac rs4 := rewrite_strat eval cbv delta [idnat].
23 End RewriteStratSubstTestF.
24
25 Module RewriteStratSubstTest := RewriteStratSubstTestF nop.
26
27 Goal forall x, RewriteStratSubstTest.h 6 x = RewriteStratSubstTest.f x /\ RewriteStratSubstTest.idnat 5 = id 5.
28 intros.
29 Print Ltac RewriteStratSubstTest.rs1. (* Ltac RewriteStratSubstTest.rs1 := Stdlib.Init.Ltac.rewrite_strat_#_521927FC _ (* Generic printer *) *)
30 RewriteStratSubstTest.rs1. (* Error: Anomaly "Constant rewrite_strat.RewriteStratSubstTestF.lem2 does not appear in the environment."
31 Please report at http://coq.inria.fr/bugs/. *)
32 Undo 1.
33 RewriteStratSubstTest.rs2.
34 Undo 1.
35 RewriteStratSubstTest.rs3.
36 Undo 1.
37 RewriteStratSubstTest.rs4.
38 Admitted.