]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/tests/unfold.ma
ocaml 3.09 transition
[helm.git] / helm / matita / tests / unfold.ma
index ff68d5fd1e8cbb111bb13fda979665d60b49809e..d17e5a2daf9fd243c136f10cfcd6997707226ede 100644 (file)
 
 set "baseuri" "cic:/matita/unfold".
 
+include "coq.ma".
+
 alias symbol "plus" (instance 0) = "Coq's natural plus".
 definition myplus \def \lambda x,y. x+y.
 
+alias id "S" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/2)".
 lemma lem: \forall n. S (n + n) = (S n) + n.
  intro; reflexivity.
 qed.
 
-theorem trivial: \forall n. S (myplus n n) = (S n) + n.
- unfold myplus.
+theorem trivial: \forall n. S (myplus n n) = myplus (S n) n.
+ unfold myplus in \vdash (\forall _.(? ? ? %)).
  intro.
+ unfold myplus.
  rewrite > lem.
  reflexivity.
-qed.
\ No newline at end of file
+qed.
+
+(* This test needs to parse "uno" in the context of the hypothesis H,
+   not in the context of the goal. *)
+alias id "O" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/1)".
+theorem t: let uno \def S O in uno + uno = S uno \to uno=uno.
+ intros. unfold uno in H.
+ reflexivity.
+qed.