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 (**************************************************************************)
15 set "baseuri" "cic:/matita/generalize".
17 alias num (instance 0) = "natural number".
18 alias symbol "eq" (instance 0) = "leibnitz's equality".
19 alias symbol "plus" (instance 0) = "natural plus".
20 alias id "plus_comm" = "cic:/Coq/Arith/Plus/plus_comm.con".
21 alias id "S" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/2)".
23 (* This tests is for the case of a pattern that contains metavariables *)
24 theorem t: \forall x. x + 4 = 4 + x.
26 generalize in match (S ?).
27 intro; apply plus_comm.
30 (* This test used to fail because x was used in the wrong context *)
31 (* Once this was fixed it still did not work since apply is not *)
32 (* able to solve a goal that ends in a product. *)
33 theorem test2: \forall x. x + 4 = 4 + x.
34 generalize in match 4.