]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/tests/match_inference.ma
version 0.7.1
[helm.git] / helm / matita / tests / match_inference.ma
index a84b3c373853fd6138d5dd525e3a1e3be9824ba3..afb2513eeb9344df5c7b54feafea0ba91bac97a5 100644 (file)
@@ -1,3 +1,5 @@
+set "baseuri" "cic:/matita/tests/match_inference/".
+
 inductive pos: Set \def
 | one : pos
 | next : pos \to pos.
@@ -6,12 +8,31 @@ inductive nat:Set \def
 | O : nat
 | S : nat \to nat.
 
-inductive empty : Set \def .
-
 definition pos2nat : pos \to nat  \def 
      \lambda x:pos . match x with  
       [ one \Rightarrow O 
       | (next z) \Rightarrow O]. 
 
-definition empty2nat : empty \to nat  \def
-  \lambda x : empty . S (match x in empty with []).
\ No newline at end of file
+inductive empty (x:nat) : nat \to Set \def .
+
+definition empty2nat : (empty O O) \to nat  \def
+  \lambda x : (empty O O). S (match x in empty with []).
+
+inductive le (n:nat) : nat \to Prop \def
+  | le_n : le n n
+  | le_S : \forall m:nat. le n m \to le n (S m).
+
+inductive True : Prop \def
+ I : True.
+
+definition r : True \def
+ match (le_n O) with
+  [ le_n \Rightarrow I
+  | (le_S y p') \Rightarrow I ].
+
+inductive Prod (A,B:Set): Set \def
+pair : A \to B \to Prod A B.
+
+definition fst : \forall A,B:Set. (Prod A B) \to A \def
+\lambda A,B:Set. \lambda p:(Prod A B). match p with
+[(pair a b) \Rightarrow a].