X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Ftests%2Fng_commands.ma;h=cbb73844d98b7d4fe55d8327d4ac9d57919930d1;hb=f261b8315d0b14781ae78740feb476327083d664;hp=75d3eda6a78bff973519efcc4b0659d341f026df;hpb=7ce251730873891f2975bc8c46b122e842d203db;p=helm.git diff --git a/helm/software/matita/tests/ng_commands.ma b/helm/software/matita/tests/ng_commands.ma index 75d3eda6a..cbb73844d 100644 --- a/helm/software/matita/tests/ng_commands.ma +++ b/helm/software/matita/tests/ng_commands.ma @@ -39,14 +39,22 @@ ntheorem nzero_ok: nzero (S (S O)) = O. napply (refl_eq ? O); nqed. -(* -ninductive nnat: Type ≝ - nO: nnat - | nS: nnat → nnat. -*) - -(* testare anche i record e le ricorsioni/coricorsioni/(co)induttivi MUTUI *) - -(* -nrecord pair: Type ≝ { l: pair; r: pair }. -*) \ No newline at end of file +naxiom DT: nat → Type. +naxiom dt: ∀n. DT n. + +ninductive nnat (n: nat) (A:DT n): Type ≝ + nO: nnat n A + | nS: mat n A → mat n A → nnat n A +with mat: Type ≝ + |mS : nnat n A → mat n A. + +nlet rec nnzero (n:nnat 0 (dt ?)) : nnat 0 (dt ?) ≝ + match n return ? with + [ nO ⇒ nO 0 (dt ?) + | nS m _ ⇒ nmzero m ] +and nmzero (m:mat 0 (dt ?)) : nnat 0 (dt ?) ≝ + match m return ? with + [ mS n ⇒ nnzero n ]. + +nrecord pair (n: nat) (x: DT n) (label: Type): Type ≝ + { lbl:label; l: pair n x label; r: pair n x label}. \ No newline at end of file