]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/tests/unfold.ma
...
[helm.git] / helm / matita / tests / unfold.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 set "baseuri" "cic:/matita/unfold".
16
17 include "coq.ma".
18
19 alias symbol "plus" (instance 0) = "Coq's natural plus".
20 definition myplus \def \lambda x,y. x+y.
21
22 lemma lem: \forall n. S (n + n) = (S n) + n.
23  intro; reflexivity.
24 qed.
25
26 theorem trivial: \forall n. S (myplus n n) = myplus (S n) n.
27  unfold myplus in \vdash \forall _.(? ? ? %).
28  intro.
29  unfold myplus.
30  rewrite > lem.
31  reflexivity.
32 qed.
33
34 (* This test needs to parse "uno" in the context of the hypothesis H,
35    not in the context of the goal. *)
36 theorem t: let uno \def S O in uno + uno = S uno \to uno=uno.
37  intros. unfold uno in H.