]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/dama/dama/sequence.ma
a) update with upstream version
[helm.git] / helm / software / matita / contribs / dama / dama / sequence.ma
index 3bcb691a5119c9af37a776eacdee8b88939cd561..948d14f67963ef2e929bba924e40edbe58572ea4 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 term 19 p \rfloor) \sub ident i)" with precedence 90
+for @{ 'sequence (\lambda ${ident i} : $t . $p)}.
+
+notation > "hvbox((\lfloor term 19 p \rfloor) \sub ident i)" with precedence 90
+for @{ 'sequence (\lambda ${ident i} . $p)}.
+
+notation > "hvbox(\lfloor ident i, term 19 p \rfloor)" with precedence 90
+for @{ 'sequence (\lambda ${ident i} . $p)}.
+  
+notation "a \sub i" left associative with precedence 90 
+  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).