1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| A.Asperti, C.Sacerdoti Coen, *)
8 (* ||A|| E.Tassi, S.Zacchiroli *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU Lesser General Public License Version 2.1 *)
13 (**************************************************************************)
15 include "logic/equality.ma".
17 inductive void : Set \def.
19 inductive unit : Set ≝ something: unit.
21 inductive Prod (A,B:Type) : Type \def
22 pair : A \to B \to Prod A B.
24 interpretation "Pair construction" 'pair x y =
25 (cic:/matita/datatypes/constructors/Prod.ind#xpointer(1/1/1) _ _ x y).
27 interpretation "Product" 'product x y =
28 (cic:/matita/datatypes/constructors/Prod.ind#xpointer(1/1) x y).
30 definition fst \def \lambda A,B:Type.\lambda p: Prod A B.
32 [(pair a b) \Rightarrow a].
34 definition snd \def \lambda A,B:Type.\lambda p: Prod A B.
36 [(pair a b) \Rightarrow b].
38 interpretation "pair pi1" 'pi1 = (fst _ _).
39 interpretation "pair pi2" 'pi2 = (snd _ _).
40 interpretation "pair pi1" 'pi1a x = (fst _ _ x).
41 interpretation "pair pi2" 'pi2a x = (snd _ _ x).
42 interpretation "pair pi1" 'pi1b x y = (fst _ _ x y).
43 interpretation "pair pi2" 'pi2b x y = (snd _ _ x y).
45 theorem eq_pair_fst_snd: \forall A,B:Type.\forall p:Prod A B.
46 p = 〈 \fst p, \snd p 〉.
47 intros.elim p.simplify.reflexivity.
50 inductive Sum (A,B:Type) : Type \def
52 | inr : B \to Sum A B.
54 interpretation "Disjoint union" 'plus A B =
55 (cic:/matita/datatypes/constructors/Sum.ind#xpointer(1/1) A B).
57 inductive option (A:Type) : Type ≝
59 | Some : A → option A.