]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/tests/ng_commands.ma
- hExtlib: new function "list_assoc_all"
[helm.git] / helm / software / matita / tests / ng_commands.ma
index b597156499e152dc8533c6e17bf7e2a870f9800a..f816b36840c2b4684593e011fbf8c430c74433d1 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-(* ATTENZIONE: si puo' eseguire solo con MatitaC e dopo aver scelto
-   Debug → always show all disambiguation errors (that, moreover, slows
-   down the library a lot) *)
-
 include "nat/plus.ma".
 
 ndefinition thesis0: ∀A:Type.Type ≝ λA. A → A.
@@ -43,7 +39,23 @@ ntheorem nzero_ok: nzero (S (S O)) = O.
  napply (refl_eq ? O);
 nqed.
 
-(*
 ninductive nnat: Type ≝
    nO: nnat
- | nS: nnat → nnat. *)
\ No newline at end of file
+ | nS: mat → mat → nnat
+with mat: Type ≝ 
+ |mS : nnat → mat
+.
+
+nlet rec nnzero (n:nnat) : nnat ≝
+ match n return ? with
+  [ nO ⇒ nO
+  | nS m _ ⇒ nmzero m ]
+and nmzero (m:mat) : nnat ≝ 
+ match m return ? with
+ [ mS n ⇒ nnzero n ].   
+
+(* testare anche i record e le ricorsioni/coricorsioni/(co)induttivi MUTUI *)
+
+(*
+nrecord pair: Type ≝ { l: pair; r: pair }.
+*)
\ No newline at end of file