(**************************************************************************)
include "ground_2/relocation/rtmap_isid.ma".
+include "ground_2/relocation/rtmap_isdiv.ma".
(* RELOCATION MAP ***********************************************************)
(* Basic properties *********************************************************)
-corec lemma sle_refl: ∀f. f ⊆ f.
-#f cases (pn_split f) * #g #H
-[ @(sle_push … H H) | @(sle_next … H H) ] -H //
+corec lemma sle_refl: ∀f1,f2. f1 ≗ f2 → f1 ⊆ f2.
+#f1 #f2 * -f1 -f2
+#f1 #f2 #g1 #g2 #H12 #H1 #H2
+[ @(sle_push … H1 H2) | @(sle_next … H1 H2) ] -H1 -H2 /2 width=1 by/
qed.
(* Basic inversion lemmas ***************************************************)
/3 width=3 by ex2_intro, or_introl, or_intror/
qed-.
+lemma sle_inv_xn: ∀g1,g2. g1 ⊆ g2 → ∀f2. ⫯f2 = g2 →
+ (∃∃f1. f1 ⊆ f2 & ↑f1 = g1) ∨ ∃∃f1. f1 ⊆ f2 & ⫯f1 = g1.
+#g1 #g2 elim (pn_split g1) * #f1 #H1 #H #f2 #H2
+[ lapply (sle_inv_pn … H … H1 H2) | lapply (sle_inv_nn … H … H1 H2) ] -H -H2
+/3 width=3 by ex2_intro, or_introl, or_intror/
+qed-.
+
(* Main properties **********************************************************)
corec theorem sle_trans: Transitive … sle.
#g1 #g2 #H #f1 #H1 elim (sle_inv_px … H … H1) -H -H1 * //
qed.
+lemma sle_xn_tl: ∀g1,g2. g1 ⊆ g2 → ∀f2. ⫯f2 = g2 → ⫱g1 ⊆ f2.
+#g1 #g2 #H #f2 #H2 elim (sle_inv_xn … H … H2) -H -H2 * //
+qed.
+
lemma sle_tl: ∀f1,f2. f1 ⊆ f2 → ⫱f1 ⊆ ⫱f2.
#f1 elim (pn_split f1) * #g1 #H1 #f2 #H
[ lapply (sle_px_tl … H … H1) -H //
lapply (isid_inv_push … H ??) -H
/3 width=3 by isid_push/
qed-.
+
+(* Properties with isdiv ****************************************************)
+
+corec lemma sle_isdiv_dx: ∀f2. 𝛀⦃f2⦄ → ∀f1. f1 ⊆ f2.
+#f2 * -f2
+#f2 #g2 #Hf2 #H2 #f1 cases (pn_split f1) *
+/3 width=5 by sle_weak, sle_next/
+qed.
+
+(* Inversion lemmas with isdiv **********************************************)
+
+corec lemma sle_inv_isdiv_sn: ∀f1,f2. f1 ⊆ f2 → 𝛀⦃f1⦄ → 𝛀⦃f2⦄.
+#f1 #f2 * -f1 -f2
+#f1 #f2 #g1 #g2 #Hf * * #H
+[1,3: elim (isdiv_inv_push … H) // ]
+lapply (isdiv_inv_next … H ??) -H
+/3 width=3 by isdiv_next/
+qed-.