]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/library/dama/sequence.ma
cicNotationUtil: in fresh_name_generator, "\eta" replaced with "eta", which is an...
[helm.git] / helm / software / matita / library / dama / sequence.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 "nat/nat.ma".
16
17 inductive sequence (O:Type) : Type ≝  
18  | mk_seq : (nat → O) → sequence O.
19
20 definition fun_of_seq: ∀O:Type.sequence O → nat → O ≝ 
21   λO.λx:sequence O.match x with [ mk_seq f ⇒ f ].
22
23 coercion fun_of_seq 1.
24
25 notation < "hvbox((\lfloor term 19 p \rfloor) \sub ident i)" with precedence 90
26 for @{ 'sequence (\lambda ${ident i} : $t . $p)}.
27
28 notation > "hvbox((\lfloor term 19 p \rfloor) \sub ident i)" with precedence 90
29 for @{ 'sequence (\lambda ${ident i} . $p)}.
30
31 notation > "hvbox(\lfloor ident i, term 19 p \rfloor)" with precedence 90
32 for @{ 'sequence (\lambda ${ident i} . $p)}.
33   
34 notation "a \sub i" left associative with precedence 90 
35   for @{ 'sequence_appl $a $i }.
36
37 interpretation "sequence" 'sequence \eta.x = (mk_seq _ x).
38 interpretation "sequence element" 'sequence_appl s i = (fun_of_seq _ s i).