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/gr_pat_tls.ma".
16 include "ground/relocation/gr_ist_tls.ma".
17 include "ground/relocation/gr_coafter_nat_tls.ma".
19 (* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ***********************************************************)
22 definition H_gr_coafter_inj: predicate gr_map ≝
24 ∀f,f21,f22. f1 ~⊚ f21 ≘ f → f1 ~⊚ f22 ≘ f → f21 ≡ f22.
26 (* Main Forward lemmas with istot ************************************************)
28 (*** coafter_inj_O_aux *)
29 corec fact gr_coafter_inj_unit_aux:
30 ∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_gr_coafter_inj f1.
31 #f1 #H1f1 #H2f1 #f #f21 #f22 #H1f #H2f
32 cases (gr_pat_inv_unit_bi … H1f1) -H1f1 [ |*: // ] #g1 #H1
33 lapply (gr_ist_inv_push … H2f1 … H1) -H2f1 #H2g1
34 cases (H2g1 (𝟏)) #n #Hn
35 cases (gr_coafter_inv_push_sn … H1f … H1) -H1f * #g21 #g #H1g #H21 #H
36 [ cases (gr_coafter_inv_push_sn_push … H2f … H1 H) -f1 -f #g22 #H2g #H22
37 @(gr_eq_push … H21 H22) -f21 -f22
38 | cases (gr_coafter_inv_push_sn_next … H2f … H1 H) -f1 -f #g22 #H2g #H22
39 @(gr_eq_next … H21 H22) -f21 -f22
41 @(gr_coafter_inj_unit_aux (⫱*[↓n]g1) … (⫱*[↓n]g)) -gr_coafter_inj_unit_aux
42 /2 width=1 by gr_coafter_tls_bi_tls, gr_ist_tls, gr_pat_unit_succ_tls/
45 (*** coafter_inj_aux *)
46 fact gr_coafter_inj_aux:
47 (∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_gr_coafter_inj f1) →
48 ∀i2,f1. @❪𝟏, f1❫ ≘ i2 → H_gr_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 (gr_pat_inv_unit_succ … H1f1) -H1f1 [ |*: // ] #g1 #H1g1 #H1
52 elim (gr_coafter_inv_next_sn … H1f … H1) -H1f #g #H1g #H
53 lapply (gr_coafter_inv_next_sn_push … H2f … H1 H) -f #H2g
54 /3 width=6 by gr_ist_inv_next/
58 theorem gr_coafter_inj:
59 ∀f1. H_gr_coafter_inj f1.
60 #f1 #H cases (H (𝟏)) /3 width=7 by gr_coafter_inj_aux, gr_coafter_inj_unit_aux/