(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)
(* conservation de l'invariant de compatibilité par rapport à une signature pour l'union *)

(* Specifications: *)
Lemma upl_conv_0_correct_wrt_sign_invar :
forall (p : prec_list) (n : nat),
pl_tl_length p n -> pl_tl_length (upl_conv_0 p) n.
Lemma upl_conv_1_correct_wrt_sign_invar :
forall (p : prec_list) (n : nat),
pl_tl_length p n -> pl_tl_length (upl_conv_1 p) n.
Lemma umpl_conv_0_correct_wrt_sign_invar_0 :
forall (s : state) (sigma : signature) (pa : pre_ad),
state_correct_wrt_sign_with_offset s sigma pa ->
state_correct_wrt_sign_with_offset (umpl_conv_0 s) sigma pa.
Lemma umpl_conv_0_correct_wrt_sign_invar :
forall (s : state) (sigma : signature),
state_correct_wrt_sign s sigma ->
state_correct_wrt_sign (umpl_conv_0 s) sigma.
Lemma umpl_conv_1_correct_wrt_sign_invar_0 :
forall (s : state) (sigma : signature) (pa : pre_ad),
state_correct_wrt_sign_with_offset s sigma pa ->
state_correct_wrt_sign_with_offset (umpl_conv_1 s) sigma pa.
Lemma umpl_conv_1_correct_wrt_sign_invar :
forall (s : state) (sigma : signature),
state_correct_wrt_sign s sigma ->
state_correct_wrt_sign (umpl_conv_1 s) sigma.
Lemma udta_conv_0_correct_wrt_sign_invar_0 :
forall (d : preDTA) (sigma : signature),
predta_correct_wrt_sign d sigma ->
predta_correct_wrt_sign (udta_conv_0_aux d) sigma.
Lemma udta_conv_0_correct_wrt_sign_invar :
forall (d : preDTA) (sigma : signature),
predta_correct_wrt_sign d sigma ->
predta_correct_wrt_sign (udta_conv_0 d) sigma.
Lemma udta_conv_1_correct_wrt_sign_invar_0 :
forall (d : preDTA) (sigma : signature),
predta_correct_wrt_sign d sigma ->
predta_correct_wrt_sign (udta_conv_1_aux d) sigma.
Lemma udta_conv_1_correct_wrt_sign_invar :
forall (d : preDTA) (sigma : signature),
predta_correct_wrt_sign d sigma ->
predta_correct_wrt_sign (udta_conv_1 d) sigma.
Lemma umerge_correct_wrt_sign_invar :
forall (d0 d1 : preDTA) (sigma : signature),
predta_correct_wrt_sign d0 sigma ->
predta_correct_wrt_sign d1 sigma ->
predta_correct_wrt_sign (u_merge d0 d1) sigma.
Lemma union_pl_correct_wrt_sign_invar :
forall (p0 p1 : prec_list) (n : nat),
pl_tl_length p0 n -> pl_tl_length p1 n -> pl_tl_length (union_pl p0 p1) n.
Lemma union_mpl_correct_wrt_sign_invar_0 :
forall (s : state) (a : ad) (p : prec_list) (pa : pre_ad)
(sigma : signature),
state_correct_wrt_sign_with_offset s sigma pa ->
state_correct_wrt_sign_with_offset (M1 prec_list a p) sigma pa ->
state_correct_wrt_sign_with_offset (union_mpl_0 a p s) sigma pa.
Lemma union_mpl_correct_wrt_sign_invar_1 :
forall (s0 s1 : state) (pa : pre_ad) (sigma : signature),
state_correct_wrt_sign_with_offset s0 sigma pa ->
state_correct_wrt_sign_with_offset s1 sigma pa ->
state_correct_wrt_sign_with_offset (union_mpl s0 s1) sigma pa.
Lemma union_mpl_correct_wrt_sign_invar :
forall (s0 s1 : state) (sigma : signature),
state_correct_wrt_sign s0 sigma ->
state_correct_wrt_sign s1 sigma ->
state_correct_wrt_sign (union_mpl s0 s1) sigma.
Lemma union_0_correct_wrt_sign_invar :
forall (d : preDTA) (a0 a1 : ad) (s : state) (sigma : signature),
predta_correct_wrt_sign d sigma ->
union_0 d a0 a1 = Some s -> state_correct_wrt_sign s sigma.
Lemma insert_ostate_correct_wrt_sign_invar :
forall (d : preDTA) (a : ad) (s : state) (sigma : signature),
predta_correct_wrt_sign d sigma ->
state_correct_wrt_sign s sigma ->
predta_correct_wrt_sign (insert_ostate d a (Some s)) sigma.
Lemma union_correct_wrt_sign_invar :
forall (d0 d1 : DTA) (sigma : signature),
dta_correct_wrt_sign d0 sigma ->
dta_correct_wrt_sign d1 sigma -> dta_correct_wrt_sign (union d0 d1) sigma.