]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/tests/esempio_oliboni.ma
import of a sample for cosimo
[helm.git] / helm / software / matita / tests / esempio_oliboni.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 "logic/equality.ma".
16 include "nat/nat.ma".
17
18 universe constraint Type[0] < Type[1].
19 universe constraint Type[1] < Type[2].
20 universe constraint CProp[0] < CProp[1].
21 universe constraint CProp[1] < CProp[2].
22 universe constraint Type[0] ≤ CProp[0].
23 universe constraint CProp[0] ≤ Type[0].
24 universe constraint Type[1] ≤ CProp[1].
25 universe constraint CProp[1] ≤ Type[1].
26 universe constraint Type[2] ≤ CProp[2].
27 universe constraint CProp[2] ≤ Type[2].
28
29 ninductive A : Type[0] ≝ 
30  | K : nat → A
31  | W : nat → A.
32  
33 nlet rec A_rect (Q_:∀x_3:A.Type[0]) H_K H_W x_3 on x_3 :Q_ x_3≝
34 match x_3 with [K x_4⇒H_K x_4|W x_5⇒H_W x_5].
35
36 nlemma yy : ∀x,y. K x = W y → False.
37 #x; #y; #H; 
38 nchange with 
39   (match K x return λ_.Prop with [ K _ ⇒ False | W _ ⇒ True]);
40 nrewrite > H; nwhd; napply I;
41 nqed.  
42   
43 nlemma xx : ∀x,y. K x = K y → x = y.
44 # x; #y; #H;
45 nchange with 
46   (match K x return λ_.Prop with [ K a ⇒ a = y | W b ⇒ b = y]);
47 nrewrite > H; nwhd; napply (refl_eq ??);
48 nqed.
49
50 naxiom P : Prop.
51
52 nlemma ww : ∀a,b:A. a = b → P.
53 #a; #b;
54 ncases a; ncases b;
55 #x; #y; #H;
56 ##[  
57
58 ##| nelim (yy ?? H);
59 ##| nelim (yy ?? H);
60
61 ##]
62
63
64
65