]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/dama/dama/sequence.ma
- notation fixed according to the new stricter semantics
[helm.git] / helm / software / matita / contribs / dama / dama / sequence.ma
index 3bcb691a5119c9af37a776eacdee8b88939cd561..39c40194bca3c8db2133e149a8aa2a206fb8b979 100644 (file)
 
 include "nat/nat.ma".
 
-definition sequence := λO:Type.nat → O.
+inductive sequence (O:Type) : Type ≝  
+ | mk_seq : (nat → O) → sequence O.
 
-definition fun_of_sequence: ∀O:Type.sequence O → nat → O ≝ λO.λx:sequence O.x.
+definition fun_of_seq: ∀O:Type.sequence O → nat → O ≝ 
+  λO.λx:sequence O.match x with [ mk_seq f ⇒ f ].
 
-coercion cic:/matita/dama/sequence/fun_of_sequence.con 1.
+coercion cic:/matita/dama/sequence/fun_of_seq.con 1.
+
+notation < "hvbox((\lfloor p \rfloor) \sub ident i)" with precedence 70
+for @{ 'sequence (\lambda ${ident i} : $t . $p)}.
+
+notation > "hvbox((\lfloor p \rfloor) \sub ident i)" with precedence 70
+for @{ 'sequence (\lambda ${ident i} . $p)}.
+
+notation > "hvbox(\lfloor ident i, p \rfloor)" with precedence 70
+for @{ 'sequence (\lambda ${ident i} . $p)}.
+  
+notation "a \sub i" left associative with precedence 70 
+  for @{ 'sequence_appl $a $i }.
+
+interpretation "sequence" 'sequence \eta.x = (mk_seq _ x).
+interpretation "sequence element" 'sequence_appl s i = (fun_of_seq _ s i).