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_isi_tls.ma".
17 include "ground/relocation/gr_ist_tls.ma".
18 include "ground/relocation/gr_coafter_nat_tls.ma".
20 (* RELATIONAL CO-COMPOSITION FOR GENERIC RELOCATION MAPS ********************)
22 (*** H_coafter_fwd_isid2 *)
23 definition H_gr_coafter_des_ist_sn_isi: predicate gr_map ≝
24 λf1. ∀f2,f. f1 ~⊚ f2 ≘ f → 𝐓❪f1❫ → 𝐈❪f❫ → 𝐈❪f2❫.
26 (* Destructions with gr_ist and gr_isi **************************************)
28 (*** coafter_fwd_isid2_O_aux *)
29 corec fact gr_coafter_des_ist_sn_isi_unit_aux:
30 ∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_gr_coafter_des_ist_sn_isi f1.
31 #f1 #H1f1 #f2 #f #H #H2f1 #Hf
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 … H … H1) -H * #g2 #g #H #H2 #H0
36 [ lapply (gr_isi_inv_push … Hf … H0) -Hf #Hg
37 @(gr_isi_push … H2) -H2
38 /3 width=7 by gr_coafter_tls_sn_tls, gr_pat_unit_succ_tls, gr_ist_tls, gr_isi_tls/
39 | cases (gr_isi_inv_next … Hf … H0)
43 (*** coafter_fwd_isid2_aux *)
44 fact gr_coafter_des_ist_sn_isi_aux:
45 (∀f1. @❪𝟏, f1❫ ≘ 𝟏 → H_gr_coafter_des_ist_sn_isi f1) →
46 ∀i2,f1. @❪𝟏, f1❫ ≘ i2 → H_gr_coafter_des_ist_sn_isi f1.
47 #H0 #i2 elim i2 -i2 /2 width=1 by/ -H0
48 #i2 #IH #f1 #H1f1 #f2 #f #H #H2f1 #Hf
49 elim (gr_pat_inv_unit_succ … H1f1) -H1f1 [ |*: // ] #g1 #Hg1 #H1
50 elim (gr_coafter_inv_next_sn … H … H1) -H #g #Hg #H0
51 @(IH … Hg1 … Hg) /2 width=3 by gr_ist_inv_next, gr_isi_inv_push/ (* * full auto fails *)
54 (*** coafter_fwd_isid2 *)
55 lemma gr_coafter_des_ist_sn_isi:
56 ∀f1. H_gr_coafter_des_ist_sn_isi f1.
57 #f1 #f2 #f #Hf #H cases (H (𝟏))
58 /3 width=7 by gr_coafter_des_ist_sn_isi_aux, gr_coafter_des_ist_sn_isi_unit_aux/