]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/nlibrary/datatypes/pairs.ma
Preparing for 0.5.9 release.
[helm.git] / helm / software / matita / nlibrary / datatypes / pairs.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/pts.ma".
16
17 nrecord pair (A,B: Type[0]) : Type[0] ≝
18  { fst: A;
19    snd: B
20  }.
21
22 interpretation "Pair construction" 'pair x y = (mk_pair ? ? x y).
23
24 interpretation "Product" 'product x y = (pair x y).
25
26 interpretation "pair pi1" 'pi1 = (fst ? ?).
27 interpretation "pair pi2" 'pi2 = (snd ? ?).
28 interpretation "pair pi1" 'pi1a x = (fst ? ? x).
29 interpretation "pair pi2" 'pi2a x = (snd ? ? x).
30 interpretation "pair pi1" 'pi1b x y = (fst ? ? x y).
31 interpretation "pair pi2" 'pi2b x y = (snd ? ? x y).