]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/dama/dama/sequence.ma
c643154810acf3dc5ad92c452632dea28187ba5c
[helm.git] / helm / software / matita / contribs / dama / 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 cic:/matita/dama/sequence/fun_of_seq.con 1.
24
25 notation < "hvbox((\lfloor p \rfloor) \sub ident i)"
26   left associative with precedence 70
27 for @{ 'sequence (\lambda ${ident i} : $t . $p)}.
28
29 notation > "hvbox((\lfloor p \rfloor) \sub ident i)"
30   left associative with precedence 70
31 for @{ 'sequence (\lambda ${ident i} . $p)}.
32
33 notation > "hvbox(\lfloor ident i, p \rfloor)"
34   left associative with precedence 70
35 for @{ 'sequence (\lambda ${ident i} . $p)}.
36   
37 notation "a \sub i" left associative with precedence 70 
38   for @{ 'sequence_appl $a $i }.
39
40 interpretation "sequence" 'sequence \eta.x = (mk_seq _ x).
41 interpretation "sequence element" 'sequence_appl s i = (fun_of_seq _ s i).