--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/relocation/gr_isi_eq.ma".
+include "ground/relocation/gr_sor_eq.ma".
+include "ground/relocation/gr_sor_sor.ma".
+
+(* RELATIONAL UNION FOR GENERIC RELOCATION MAPS ***********************************************************)
+
+(* Properties with test for identity *****************************************)
+
+(*** sor_isid_sn *)
+corec lemma gr_sor_isi_sn:
+ โf1. ๐โชf1โซ โ โf2. f1 โ f2 โ f2.
+#f1 * -f1
+#f1 #g1 #Hf1 #H1 #f2 cases (gr_map_split_tl f2)
+/3 width=7 by gr_sor_push_bi, gr_sor_push_next/
+qed.
+
+(*** sor_isid_dx *)
+corec lemma gr_sor_isi_dx:
+ โf2. ๐โชf2โซ โ โf1. f1 โ f2 โ f1.
+#f2 * -f2
+#f2 #g2 #Hf2 #H2 #f1 cases (gr_map_split_tl f1)
+/3 width=7 by gr_sor_push_bi, gr_sor_next_push/
+qed.
+
+(*** sor_isid *)
+lemma gr_sor_isi_bi_isi:
+ โf1,f2,f. ๐โชf1โซ โ ๐โชf2โซ โ ๐โชfโซ โ f1 โ f2 โ f.
+/4 width=3 by gr_sor_eq_repl_back_dx, gr_sor_eq_repl_back_sn, gr_isi_inv_eq_repl/ qed.
+
+
+(* Forward lemmas with test for identity **********************************)
+
+(*** sor_fwd_isid1 *)
+corec lemma gr_sor_des_isi_sn:
+ โf1,f2,f. f1 โ f2 โ f โ ๐โชfโซ โ ๐โชf1โซ.
+#f1 #f2 #f * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H #Hg
+[ /4 width=6 by gr_isi_inv_push, gr_isi_push/ ]
+cases (gr_isi_inv_next โฆ Hg โฆ H)
+qed-.
+
+(*** sor_fwd_isid2 *)
+corec lemma gr_sor_des_isi_dx:
+ โf1,f2,f. f1 โ f2 โ f โ ๐โชfโซ โ ๐โชf2โซ.
+#f1 #f2 #f * -f1 -f2 -f
+#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H #Hg
+[ /4 width=6 by gr_isi_inv_push, gr_isi_push/ ]
+cases (gr_isi_inv_next โฆ Hg โฆ H)
+qed-.
+
+(* Inversion lemmas with test for identity **********************************)
+
+(*** sor_isid_inv_sn *)
+lemma gr_sor_inv_isi_sn:
+ โf1,f2,f. f1 โ f2 โ f โ ๐โชf1โซ โ f2 โก f.
+/3 width=4 by gr_sor_isi_sn, gr_sor_mono/
+qed-.
+
+(*** sor_isid_inv_dx *)
+lemma gr_sor_inv_isi_dx:
+ โf1,f2,f. f1 โ f2 โ f โ ๐โชf2โซ โ f1 โก f.
+/3 width=4 by gr_sor_isi_dx, gr_sor_mono/
+qed-.
+
+(*** sor_inv_isid3 *)
+lemma gr_sor_inv_isi:
+ โf1,f2,f. f1 โ f2 โ f โ ๐โชfโซ โ
+ โงโง ๐โชf1โซ & ๐โชf2โซ.
+/3 width=4 by gr_sor_des_isi_dx, gr_sor_des_isi_sn, conj/ qed-.