1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
18 alias id "nat" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1)".
19 alias num (instance 0) = "Coq natural number".
20 alias symbol "eq" (instance 0) = "Coq's leibnitz's equality".
21 alias symbol "plus" (instance 0) = "Coq's natural plus".
22 alias id "plus_n_O" = "cic:/Coq/Init/Peano/plus_n_O.con".
26 a = b \to b + a + b + a= (\lambda j.((\lambda w.((\lambda x.x + b + w + j) a)) b)) a.
28 rewrite < H in \vdash (? ? ? ((\lambda j.((\lambda w.%) ?)) ?)).
30 rewrite < H in \vdash (? ? % ?).
32 simplify in \vdash (? ? ? ((\lambda _.((\lambda _.%) ?)) ?)).
34 rewrite < H in \vdash (? ? ? (% ?)).
39 theorem t: \forall n. 0=0 \to n = n + 0.
44 (* In this test "rewrite < t" should open a new goal 0=0 and put it in *)
45 (* the goallist so that the THEN tactical closes it using reflexivity. *)
46 theorem foo: \forall n. n = n + 0.
48 rewrite < t; reflexivity.
51 theorem test_rewrite_in_hyp:
52 \forall n,m. n + 0 = m \to m = n + 0 \to n=m \land m+0=n+0.
54 rewrite < plus_n_O in H.
55 rewrite > plus_n_O in H1.
56 split; [ exact H | exact H1].
59 theorem test_rewrite_in_hyp2:
60 \forall n,m. n + 0 = m \to n + 0 = m \to n=m \land n+0=m.
62 rewrite < plus_n_O in H H1 \vdash (? ? %).
63 split; [ exact H | exact H1].
66 alias id "O" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/1)".
67 theorem test_rewrite_under_pi: \forall x,y. x = O \to y = O \to x = x \to O = x.
69 rewrite > H in \vdash (? \to ? ? % % \to ? ? ? %).