1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "ground/lib/stream_hdtl.ma".
16 include "ground/lib/stream_eq.ma".
18 (* HEAD AND TAIL FOR STREAMS ************************************************)
20 (* Constructions with stream_eq *********************************************)
22 lemma stream_hd_eq_repl (A):
23 stream_eq_repl A (λt1,t2. ⇃t1 = ⇃t2).
24 #A * #a1 #t1 * #a2 #t2 #H
25 elim (stream_eq_inv_cons_bi … H) -H
29 lemma stream_tl_eq_repl (A):
30 stream_eq_repl A (λt1,t2. ⇂t1 ≗ ⇂t2).
31 #A * #a1 #t1 * #a2 #t2 #H
32 elim (stream_eq_inv_cons_bi … H) -H
36 lemma stream_hd_tl_eq_repl (A) (t1) (t2):
38 ∧∧ ⇃t1 = ⇃t2 & ⇂t1 ≗ ⇂t2.
40 /3 width=1 by stream_tl_eq_repl, stream_hd_eq_repl, conj/
43 (* Inversions with stram_eq *************************************************)
45 lemma stream_eq_inv_hd_tl_bi (A) (t1) (t2):
46 ⇃t1 = ⇃t2 → ⇂t1 ≗ ⇂t2 → t1 ≗{A} t2.
47 #A * #a1 #t1 * #a2 #t2
48 /2 width=1 by stream_eq_cons/