Debian Codegraph @

test-suite/success/setoid_rewrite_proj.v

raw
1 Require Export Corelib.Setoids.Setoid.
2
3 Module Test1.
4
5 #[projections(primitive=yes)]
6 Structure Test := {
7 test : unit
8 }.
9
10 Axiom tst : Test.
11 Axiom tst' : Test.
12 Axiom H : tst = tst'.
13
14 Theorem a :
15 test tst = test tst'.
16 Proof.
17 setoid_rewrite H.
18 exact eq_refl.
19 Qed.
20
21 End Test1.
22
23 Module Test2.
24
25 #[projections(primitive=yes)]
26 Structure Test (n : nat) := {
27 test : unit
28 }.
29
30 Axiom tst : Test 0.
31 Axiom tst' : Test 0.
32 Axiom H : tst = tst'.
33
34 Theorem a :
35 test _ tst = test _ tst'.
36 Proof.
37 setoid_rewrite H.
38 exact eq_refl.
39 Qed.
40
41 End Test2.
42
43 Module Test3.
44
45 #[projections(primitive=yes)]
46 Structure Test (n : nat) := {
47 test : unit
48 }.
49
50 Axiom n : nat.
51 Axiom tst : Test n.
52 Axiom tst' : Test n.
53 Axiom H : n = 0.
54
55 Theorem a :
56 test _ tst = test _ tst'.
57 Proof.
58 Fail setoid_rewrite H. (* no rewriting in parameters *)
59 Abort.
60
61 End Test3.