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/notation/functions/apply_2.ma".
16 include "ground/arith/pnat_plus.ma".
17 include "ground/relocation/tr_map.ma".
19 (* POSITIVE APPLICATION FOR TOTAL RELOCATION MAPS ***************************)
22 rec definition tr_pap (i: pnat) on i: tr_map → pnat.
25 | #i lapply (tr_pap i f) -tr_pap -i -f
31 "functional positive application (total relocation maps)"
32 'Apply f i = (tr_pap i f).
34 (* Basic constructions ******************************************************)
37 lemma tr_pap_unit (f):
42 lemma tr_pap_succ (f):
43 ∀p,i. f@❨i❩+p = (p⨮f)@❨↑i❩.
47 lemma tr_pap_next (f):
48 ∀i. ↑(f@❨i❩) = (↑f)@❨i❩.
55 lemma apply_eq_repl (i):
56 ∀f1,f2. f1 ≗ f2 → f1@❨i❩ = f2@❨i❩.
59 (i): pr_eq_repl … (λf1,f2. f1@❨i❩ = f2@❨i❩).
60 #i elim i -i [2: #i #IH ] * #p1 #f1 * #p2 #f2 #H
61 elim (eq_inv_seq_aux … H) -H #Hp #Hf //
62 >apply_S1 >apply_S1 /3 width=1 by eq_f2/
66 (* Main inversion lemmas ****************************************************)
68 theorem apply_inj: ∀f,i1,i2,j. f@❨i1❩ = j → f@❨i2❩ = j → i1 = i2.
69 /2 width=4 by gr_pat_inj/ qed-.
71 corec theorem nstream_eq_inv_ext: ∀f1,f2. (∀i. f1@❨i❩ = f2@❨i❩) → f1 ≗ f2.
72 * #p1 #f1 * #p2 #f2 #Hf @stream_eq_cons
74 | @nstream_eq_inv_ext -nstream_eq_inv_ext #i
75 lapply (Hf (𝟏)) >apply_O1 >apply_O1 #H destruct
76 lapply (Hf (↑i)) >apply_S1 >apply_S1 #H
77 /3 width=2 by eq_inv_pplus_bi_dx, eq_inv_psucc_bi/
82 include "ground/relocation/pstream_eq.ma".
86 include "ground/relocation/rtmap_istot.ma".
88 lemma at_istot: ∀f. 𝐓❨f❩.
89 /2 width=2 by ex_intro/ qed.