]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/tests/ng_commands.ma
cbb73844d98b7d4fe55d8327d4ac9d57919930d1
[helm.git] / helm / software / matita / tests / ng_commands.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 include "nat/plus.ma".
16
17 ndefinition thesis0: ∀A:Type.Type ≝ λA. A → A.
18
19 ndefinition thesis: ∀A:Type.Type ≝ λA. ?.
20  napply (A → A);
21 nqed.
22
23 ntheorem foo: ∀A:Type.thesis A.#A;#x;napply x;
24 nqed.
25
26 ntheorem goo: ∀A:Type.A → A. #A; napply (foo ?);
27 nqed.
28
29 naxiom NP: Prop.
30
31 ndefinition Q: Prop ≝ NP.
32
33 nlet rec nzero (n:nat) : nat ≝
34  match n with
35   [ O ⇒ O
36   | S m ⇒ nzero m].
37
38 ntheorem nzero_ok: nzero (S (S O)) = O.
39  napply (refl_eq ? O);
40 nqed.
41
42 naxiom DT: nat → Type.
43 naxiom dt: ∀n. DT n.
44
45 ninductive nnat (n: nat) (A:DT n): Type ≝
46    nO: nnat n A
47  | nS: mat n A → mat n A → nnat n A
48 with mat: Type ≝ 
49  |mS : nnat n A → mat n A.
50
51 nlet rec nnzero (n:nnat 0 (dt ?)) : nnat 0 (dt ?) ≝
52  match n return ? with
53   [ nO ⇒ nO 0 (dt ?)
54   | nS m _ ⇒ nmzero m ]
55 and nmzero (m:mat 0 (dt ?)) : nnat 0 (dt ?) ≝ 
56  match m return ? with
57  [ mS n ⇒ nnzero n ].
58
59 nrecord pair (n: nat) (x: DT n) (label: Type): Type ≝
60  { lbl:label; l: pair n x label; r: pair n x label}.