]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/etc/relocation/pstream.etc
cc8863b593c6802e18e1405b24b8d39a58fb3a45
[helm.git] / matita / matita / contribs / lambdadelta / ground / etc / relocation / pstream.etc
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 "ground/notation/functions/upspoon_1.ma".
16 include "ground/lib/stream.ma".
17 include "ground/arith/pnat.ma".
18
19 (* RELOCATION P-STREAM ******************************************************)
20
21 definition gr_push: gr_map → gr_map ≝ λf. 𝟏⨮f.
22
23 interpretation "push (pstream)" 'UpSpoon f = (gr_push f).
24
25 definition gr_next: gr_map → gr_map.
26 * #p #f @(↑p⨮f)
27 defined.
28
29 interpretation "next (pstream)" 'UpArrow f = (gr_next f).
30
31 (* Basic properties *********************************************************)
32
33 lemma gr_push_unfold: ∀f. 𝟏⨮f = ⫯f.
34 // qed.
35
36 lemma gr_next_unfold: ∀f,p. (↑p)⨮f = ↑(p⨮f).
37 // qed.
38
39 (* Basic inversion lemmas ***************************************************)
40
41 lemma eq_inv_gr_push_bi: injective ? ? gr_push.
42 #f1 #f2 <gr_push_unfold <gr_push_unfold #H destruct //
43 qed-.
44
45 lemma eq_inv_gr_push_next: ∀f1,f2. ⫯f1 = ↑f2 → ⊥.
46 #f1 * #p2 #f2 <gr_push_unfold <gr_next_unfold #H destruct
47 qed-.
48
49 lemma eq_inv_gr_next_push: ∀f1,f2. ↑f1 = ⫯f2 → ⊥.
50 * #p1 #f1 #f2 <gr_next_unfold <gr_push_unfold #H destruct
51 qed-.
52
53 lemma eq_inv_gr_next_bi: injective ? ? gr_next.
54 * #p1 #f1 * #p2 #f2 <gr_next_unfold <gr_next_unfold #H destruct //
55 qed-.
56
57 lemma case_prop (Q:predicate gr_map):
58       (∀f. Q (⫯f)) → (∀f. Q (↑f)) → ∀f. Q f.
59 #Q #H1 #H2 * * //
60 qed-.
61
62 lemma case_type0 (Q:gr_map→Type[0]):
63       (∀f. Q (⫯f)) → (∀f. Q (↑f)) → ∀f. Q f.
64 #Q #H1 #H2 * * //
65 qed-.
66
67 lemma iota_push: ∀Q,a,b,f. a f = case_type0 Q a b (⫯f).
68 // qed.
69
70 lemma iota_next: ∀Q,a,b,f. b f = case_type0 Q a b (↑f).
71 #Q #a #b * //
72 qed.