From f2d0f4e55ea0f3a953982bee62d9ad98876e4aa8 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Fri, 8 May 2009 21:06:29 +0000 Subject: [PATCH] Improved tests (for left parameters and mutual recursive definitions). --- helm/software/matita/tests/ng_commands.ma | 27 +++++++++++------------ 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/helm/software/matita/tests/ng_commands.ma b/helm/software/matita/tests/ng_commands.ma index f816b3684..755921938 100644 --- a/helm/software/matita/tests/ng_commands.ma +++ b/helm/software/matita/tests/ng_commands.ma @@ -39,23 +39,22 @@ ntheorem nzero_ok: nzero (S (S O)) = O. napply (refl_eq ? O); nqed. -ninductive nnat: Type ≝ - nO: nnat - | nS: mat → mat → nnat +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 → mat -. + |mS : nnat n A → mat n A. -nlet rec nnzero (n:nnat) : nnat ≝ +nlet rec nnzero (n:nnat 0 (dt ?)) : nnat 0 (dt ?) ≝ match n return ? with - [ nO ⇒ nO + [ nO ⇒ nO 0 (dt ?) | nS m _ ⇒ nmzero m ] -and nmzero (m:mat) : nnat ≝ +and nmzero (m:mat 0 (dt ?)) : nnat 0 (dt ?) ≝ match m return ? with - [ mS n ⇒ nnzero n ]. - -(* testare anche i record e le ricorsioni/coricorsioni/(co)induttivi MUTUI *) + [ mS n ⇒ nnzero n ]. -(* -nrecord pair: Type ≝ { l: pair; r: pair }. -*) \ No newline at end of file +nrecord pair (n: nat) (x: dt n) (label: Type): Type ≝ + { lbl:label; l: pair label; r: pair label}. \ No newline at end of file -- 2.39.2