]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/tests/elim.ma
added test for elim
[helm.git] / helm / matita / tests / elim.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 set "baseuri" "cic:/matita/tests/elim".
16
17 inductive stupidtype: Set \def
18   | Base : stupidtype
19   | Next : stupidtype \to stupidtype
20   | Pair : stupidtype \to stupidtype \to stupidtype.
21   
22 alias symbol "eq" (instance 0) = "leibnitz's equality".
23 alias symbol "exists" (instance 0) = "exists".
24 alias symbol "or" (instance 0) = "logical or".
25   
26 theorem serious:
27   \forall a:stupidtype.
28     a = Base 
29   \lor 
30     (\exists b:stupidtype.a = Next b) 
31   \lor 
32     (\exists c,d:stupidtype.a = Pair c d).
33 intros.
34 elim a.
35 clear a.left.left.
36   reflexivity.
37 clear H.clear H1.clear a.right.
38   exists.exact e2.exists.exact e1.reflexivity.
39 clear H.clear a.left.right.
40   exists.exact e3.reflexivity.
41 qed.