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_eq.ma".
17 (* RELATIONAL COMPOSITION FOR PARTIAL RELOCATION MAPS ***********************)
19 (* Main constructions *******************************************************)
22 corec theorem pr_after_trans_sn:
23 ∀f0,f3,f4. f0 ⊚ f3 ≘ f4 →
24 ∀f1,f2. f1 ⊚ f2 ≘ f0 →
25 ∀f. f2 ⊚ f3 ≘ f → f1 ⊚ f ≘ f4.
26 #f0 #f3 #f4 * -f0 -f3 -f4 #f0 #f3 #f4 #g0 [1,2: #g3 ] #g4
27 [ #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg
28 cases (pr_after_inv_push … Hg0 … H0) -g0
30 cases (pr_after_inv_push_bi … Hg … H2 H3) -g2 -g3
31 #f #Hf #H /3 width=7 by pr_after_refl/
32 | #Hf4 #H0 #H3 #H4 #g1 #g2 #Hg0 #g #Hg
33 cases (pr_after_inv_push … Hg0 … H0) -g0
35 cases (pr_after_inv_push_next … Hg … H2 H3) -g2 -g3
36 #f #Hf #H /3 width=7 by pr_after_push/
37 | #Hf4 #H0 #H4 #g1 #g2 #Hg0 #g #Hg
38 cases (pr_after_inv_next … Hg0 … H0) -g0 *
39 [ #f1 #f2 #Hf0 #H1 #H2
40 cases (pr_after_inv_next_sn … Hg … H2) -g2
41 #f #Hf #H /3 width=7 by pr_after_push/
42 | #f1 #Hf0 #H1 /3 width=6 by pr_after_next/
48 corec theorem pr_after_trans_dx:
49 ∀f1,f0,f4. f1 ⊚ f0 ≘ f4 →
50 ∀f2, f3. f2 ⊚ f3 ≘ f0 →
51 ∀f. f1 ⊚ f2 ≘ f → f ⊚ f3 ≘ f4.
52 #f1 #f0 #f4 * -f1 -f0 -f4 #f1 #f0 #f4 #g1 [1,2: #g0 ] #g4
53 [ #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg
54 cases (pr_after_inv_push … Hg0 … H0) -g0
56 cases (pr_after_inv_push_bi … Hg … H1 H2) -g1 -g2
57 #f #Hf #H /3 width=7 by pr_after_refl/
58 | #Hf4 #H1 #H0 #H4 #g2 #g3 #Hg0 #g #Hg
59 cases (pr_after_inv_next … Hg0 … H0) -g0 *
60 [ #f2 #f3 #Hf0 #H2 #H3
61 cases (pr_after_inv_push_bi … Hg … H1 H2) -g1 -g2
62 #f #Hf #H /3 width=7 by pr_after_push/
64 cases (pr_after_inv_push_next … Hg … H1 H2) -g1 -g2
65 #f #Hf #H /3 width=6 by pr_after_next/
67 | #Hf4 #H1 #H4 #f2 #f3 #Hf0 #g #Hg
68 cases (pr_after_inv_next_sn … Hg … H1) -g1
69 #f #Hg #H /3 width=6 by pr_after_next/
73 (* Main inversions **********************************************************)
76 corec theorem pr_after_mono:
77 ∀f1,f2,x,y. f1 ⊚ f2 ≘ x → f1 ⊚ f2 ≘ y → x ≡ y.
78 #f1 #f2 #x #y * -f1 -f2 -x
79 #f1 #f2 #x #g1 [1,2: #g2 ] #g #Hx #H1 [1,2: #H2 ] #H0x #Hy
80 [ cases (pr_after_inv_push_bi … Hy … H1 H2) -g1 -g2 /3 width=8 by pr_eq_push/
81 | cases (pr_after_inv_push_next … Hy … H1 H2) -g1 -g2 /3 width=8 by pr_eq_next/
82 | cases (pr_after_inv_next_sn … Hy … H1) -g1 /3 width=8 by pr_eq_next/
87 lemma pr_after_mono_eq:
88 ∀f1,f2,f. f1 ⊚ f2 ≘ f → ∀g1,g2,g. g1 ⊚ g2 ≘ g →
89 f1 ≡ g1 → f2 ≡ g2 → f ≡ g.
90 /4 width=4 by pr_after_mono, pr_after_eq_repl_back_dx, pr_after_eq_repl_back_sn/ qed-.