+(* Advanced properties ******************************************************)
+
+lemma cpms_sort (h) (G) (L):
+ ∀n,s. ❪G,L❫ ⊢ ⋆s ➡*[h,n] ⋆((next h)^n s).
+#h #G #L #n elim n -n [ // ]
+#n #IH #s <plus_SO_dx
+/3 width=3 by cpms_step_dx, cpm_sort/
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma cpms_inv_sort1 (h) (n) (G) (L):
+ ∀X2,s. ❪G,L❫ ⊢ ⋆s ➡*[h,n] X2 → X2 = ⋆(((next h)^n) s).
+#h #n #G #L #X2 #s #H @(cpms_ind_dx … H) -X2 //
+#n1 #n2 #X #X2 #_ #IH #HX2 destruct
+elim (cpm_inv_sort1 … HX2) -HX2 #H #_ destruct //
+qed-.
+
+lemma cpms_inv_lref1_ctop (h) (n) (G):
+ ∀X2,i. ❪G,⋆❫ ⊢ #i ➡*[h,n] X2 → ∧∧ X2 = #i & n = 0.
+#h #n #G #X2 #i #H @(cpms_ind_dx … H) -X2
+[ /2 width=1 by conj/
+| #n1 #n2 #X #X2 #_ * #HX #Hn1 #HX2 destruct
+ elim (cpm_inv_lref1_ctop … HX2) -HX2 #H1 #H2 destruct
+ /2 width=1 by conj/
+]
+qed-.
+
+lemma cpms_inv_zero1_unit (h) (n) (I) (K) (G):
+ ∀X2. ❪G,K.ⓤ[I]❫ ⊢ #0 ➡*[h,n] X2 → ∧∧ X2 = #0 & n = 0.
+#h #n #I #G #K #X2 #H @(cpms_ind_dx … H) -X2
+[ /2 width=1 by conj/
+| #n1 #n2 #X #X2 #_ * #HX #Hn1 #HX2 destruct
+ elim (cpm_inv_zero1_unit … HX2) -HX2 #H1 #H2 destruct
+ /2 width=1 by conj/
+]
+qed-.
+
+lemma cpms_inv_gref1 (h) (n) (G) (L):
+ ∀X2,l. ❪G,L❫ ⊢ §l ➡*[h,n] X2 → ∧∧ X2 = §l & n = 0.
+#h #n #G #L #X2 #l #H @(cpms_ind_dx … H) -X2
+[ /2 width=1 by conj/
+| #n1 #n2 #X #X2 #_ * #HX #Hn1 #HX2 destruct
+ elim (cpm_inv_gref1 … HX2) -HX2 #H1 #H2 destruct
+ /2 width=1 by conj/
+]
+qed-.
+
+lemma cpms_inv_cast1 (h) (n) (G) (L):
+ ∀W1,T1,X2. ❪G,L❫ ⊢ ⓝW1.T1 ➡*[h,n] X2 →
+ ∨∨ ∃∃W2,T2. ❪G,L❫ ⊢ W1 ➡*[h,n] W2 & ❪G,L❫ ⊢ T1 ➡*[h,n] T2 & X2 = ⓝW2.T2
+ | ❪G,L❫ ⊢ T1 ➡*[h,n] X2
+ | ∃∃m. ❪G,L❫ ⊢ W1 ➡*[h,m] X2 & n = ↑m.
+#h #n #G #L #W1 #T1 #X2 #H @(cpms_ind_dx … H) -n -X2
+[ /3 width=5 by or3_intro0, ex3_2_intro/
+| #n1 #n2 #X #X2 #_ * [ * || * ]
+ [ #W #T #HW1 #HT1 #H #HX2 destruct
+ elim (cpm_inv_cast1 … HX2) -HX2 [ * || * ]
+ [ #W2 #T2 #HW2 #HT2 #H destruct
+ /4 width=5 by cpms_step_dx, ex3_2_intro, or3_intro0/
+ | #HX2 /3 width=3 by cpms_step_dx, or3_intro1/
+ | #m #HX2 #H destruct <plus_n_Sm
+ /4 width=3 by cpms_step_dx, ex2_intro, or3_intro2/
+ ]
+ | #HX #HX2 /3 width=3 by cpms_step_dx, or3_intro1/
+ | #m #HX #H #HX2 destruct
+ /4 width=3 by cpms_step_dx, ex2_intro, or3_intro2/
+ ]
+]
+qed-.
+