]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/relocation/pr_coafter_coafter_ist.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / ground / relocation / pr_coafter_coafter_ist.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_pat_tls.ma".
16 include "ground/relocation/pr_ist_tls.ma".
17 include "ground/relocation/pr_coafter_nat_tls.ma".
18
19 (* RELATIONAL CO-COMPOSITION FOR PARTIAL RELOCATION MAPS ********************)
20
21 (*** H_coafter_inj *)
22 definition H_pr_coafter_inj: predicate pr_map ≝
23            λf1. 𝐓❨f1❩ →
24            ∀f,f21,f22. f1 ~⊚ f21 ≘ f → f1 ~⊚ f22 ≘ f → f21 ≡ f22.
25
26 (* Main destructions with pr_ist ********************************************)
27
28 (*** coafter_inj_O_aux *)
29 corec fact pr_coafter_inj_unit_aux:
30            ∀f1. @❨𝟏, f1❩ ≘ 𝟏 → H_pr_coafter_inj f1.
31 #f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f
32 cases (pr_pat_inv_unit_bi … H1f1) -H1f1 [ |*: // ] #g1 #H1
33 lapply (pr_ist_inv_push … H2f1 … H1) -H2f1 #H2g1
34 cases (H2g1 (𝟏)) #n #Hn
35 cases (pr_coafter_inv_push_sn … H1f … H1) -H1f * #g21 #g #H1g #H21 #H
36 [ cases (pr_coafter_inv_push_sn_push … H2f … H1 H) -f1 -f #g22 #H2g #H22
37   @(pr_eq_push … H21 H22) -f21 -f22
38 | cases (pr_coafter_inv_push_sn_next … H2f … H1 H) -f1 -f #g22 #H2g #H22
39   @(pr_eq_next … H21 H22) -f21 -f22
40 ]
41 @(pr_coafter_inj_unit_aux (⫰*[↓n]g1) … (⫰*[↓n]g)) -pr_coafter_inj_unit_aux
42 /2 width=1 by pr_coafter_tls_bi_tls, pr_ist_tls, pr_pat_unit_succ_tls/
43 qed-.
44
45 (*** coafter_inj_aux *)
46 fact pr_coafter_inj_aux:
47      (∀f1. @❨𝟏, f1❩ ≘ 𝟏 → H_pr_coafter_inj f1) →
48      ∀i2,f1. @❨𝟏, f1❩ ≘ i2 → H_pr_coafter_inj f1.
49 #H0 #i2 elim i2 -i2 /2 width=1 by/ -H0
50 #i2 #IH #f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f
51 elim (pr_pat_inv_unit_succ … H1f1) -H1f1 [ |*: // ] #g1 #H1g1 #H1
52 elim (pr_coafter_inv_next_sn … H1f … H1) -H1f #g #H1g #H
53 lapply (pr_coafter_inv_next_sn_push … H2f … H1 H) -f #H2g
54 /3 width=6 by pr_ist_inv_next/
55 qed-.
56
57 (*** coafter_inj *)
58 theorem pr_coafter_inj:
59         ∀f1. H_pr_coafter_inj f1.
60 #f1 #H cases (H (𝟏)) /3 width=7 by pr_coafter_inj_aux, pr_coafter_inj_unit_aux/
61 qed-.