]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/relocation/pr_compose.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / ground / relocation / pr_compose.ma
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/relocation/pr_after_after.ma".
16
17 (* FUNCTIONAL COMPOSITION FOR PARTIAL RELOCATION MAPS ***********************)
18
19 corec definition pr_compose: pr_map → pr_map → pr_map.
20 * * #g2 [ #f1 | * * #g1 ]
21 [ @pr_next @(pr_compose g2 f1)
22 | @pr_next @(pr_compose g2 g1)
23 | @pr_push @(pr_compose g2 g1)
24 ]
25 defined.
26
27 interpretation
28   "functional composition (partial relocation maps)"
29   'compose f2 f1 = (pr_compose f2 f1).
30
31 (* Basic constructions ******************************************************)
32
33 lemma pr_compose_unfold_refl (f2) (f1): ⫯(f2∘f1) = (⫯f2)∘(⫯f1).
34 #f2 #f1
35 <(stream_unfold … ((⫯f2)∘(⫯f1))) in ⊢ (???%); //
36 qed.
37
38 lemma pr_compose_unfold_push (f2) (f1): ↑(f2∘f1) = (⫯f2)∘(↑f1).
39 #f2 #f1
40 <(stream_unfold … ((⫯f2)∘(↑f1))) in ⊢ (???%); //
41 qed.
42
43 (*** compose_next *)
44 lemma pr_compose_unfold_next (f2) (f1):
45       ↑(f2∘f1) = (↑f2)∘f1.
46 #f2 #f1
47 <(stream_unfold … ((↑f2)∘f1)) in ⊢ (???%); //
48 qed.
49
50 (* Main constructions *******************************************************)
51
52 (*** after_total *)
53 corec theorem pr_after_total (f2) (f1):
54               f2 ⊚ f1 ≘ f2∘f1.
55 cases (pr_map_split_tl f2)*
56 [ cases (pr_map_split_tl f1) * ]
57 [ @pr_after_refl /2 width=7 by/
58 | @pr_after_push /2 width=7 by/
59 | @pr_after_next /2 width=5 by/
60 ]
61 qed.
62
63 (* Main inversions **********************************************************)
64
65 (*** after_inv_total *)
66 lemma pr_after_inv_total: ∀f2,f1,f. f2 ⊚ f1 ≘ f → f2 ∘ f1 ≡ f.
67 /2 width=4 by pr_after_mono/ qed-.