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/relocation/pr_after_after.ma".
17 (* FUNCTIONAL COMPOSITION FOR PARTIAL RELOCATION MAPS ***********************)
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)
28 "functional composition (partial relocation maps)"
29 'compose f2 f1 = (pr_compose f2 f1).
31 (* Basic constructions ******************************************************)
33 lemma pr_compose_unfold_refl (f2) (f1): ⫯(f2∘f1) = (⫯f2)∘(⫯f1).
35 <(stream_unfold … ((⫯f2)∘(⫯f1))) in ⊢ (???%); //
38 lemma pr_compose_unfold_push (f2) (f1): ↑(f2∘f1) = (⫯f2)∘(↑f1).
40 <(stream_unfold … ((⫯f2)∘(↑f1))) in ⊢ (???%); //
44 lemma pr_compose_unfold_next (f2) (f1):
47 <(stream_unfold … ((↑f2)∘f1)) in ⊢ (???%); //
50 (* Main constructions *******************************************************)
53 corec theorem pr_after_total (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/
63 (* Main inversions **********************************************************)
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-.