(* *)
(**************************************************************************)
-include "ground/relocation/rtmap_after.ma".
+include "ground/arith/nat_le_pred.ma".
+include "ground/relocation/rtmap_after_uni.ma".
include "ground/relocation/rtmap_basic.ma".
(* RELOCATION MAP ***********************************************************)
(* Properties with composition **********************************************)
-lemma after_basic_rc (m2,m1,n2,n1):
- m1 ≤ m2 → m2 ≤ m1+n1 → 𝐁❨m2,n2❩ ⊚ 𝐁❨m1,n1❩ ≘ 𝐁❨m1,n2+n1❩.
-#m2 elim m2 -m2
-[ #m1 #n2 #n1 #Hm21 #_
- <(le_n_O_to_eq … Hm21) -m1 //
-| #m2 #IH *
- [ #n2 #n1 #_ < plus_O_n #H
- elim (le_inv_S1 … H) -H #x #Hx #H destruct
- <plus_n_Sm
- @after_push [4:|*: // ]
- @(IH 0 … Hx) -IH -n2 -x //
- | #m1 #n2 #n1 #H1 #H2
- lapply (le_S_S_to_le … H1) -H1 #H1
- lapply (le_S_S_to_le … H2) -H2 #H2
- /3 width=7 by after_refl/
- ]
+lemma after_basic_rc (m2,m1):
+ m1 ≤ m2 → ∀n2,n1.m2 ≤ n1+m1 → 𝐁❨m2,n2❩ ⊚ 𝐁❨m1,n1❩ ≘ 𝐁❨m1,n1+n2❩.
+#m2 #m1 @(nat_ind_2_succ … m2 m1) -m2 -m1
+[ #m1 #H #n2 #n1 #_
+ <(nle_inv_zero_dx … H) -m1 //
+| #m2 #IH #_ #n2 #n1 <nplus_zero_dx #H
+ elim (nle_inv_succ_sn … H) -H #Hm2 #Hn1
+ >Hn1 -Hn1 <nplus_succ_sn
+ /3 width=7 by after_push/
+| #m2 #m1 #IH #H1 #n2 #n1 <nplus_succ_dx #H2
+ lapply (nle_inv_succ_bi … H1) -H1 #H1
+ lapply (nle_inv_succ_bi … H2) -H2 #H2
+ /3 width=7 by after_refl/
]
qed.