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