(* 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                                                     *)
(* correction de l'invariant de compatibilité par rapport à une signature *)
Definition pl_produit_ref_ok_0 (la pl : prec_list) : Prop :=
forall (a b : ad) (l : prec_list) (n : nat),
prec_occur (pl_produit_0 a la pl n l) b ->
(exists a0 : ad,
(exists a1 : ad,
b = iad_conv a0 a1 /\ prec_occur la a0 /\ prec_occur pl a1)) \/
(exists a1 : ad, b = iad_conv a a1 /\ prec_occur pl a1) \/ prec_occur l b.
Definition pl_produit_ref_ok_1 (p0 p1 : prec_list) : Prop :=
forall (b : ad) (n : nat),
prec_occur (pl_produit_1 p0 n p1) b ->
exists a0 : ad,
(exists a1 : ad,
b = iad_conv a0 a1 /\ prec_occur p0 a0 /\ prec_occur p1 a1).

Lemma s_produit_r_ref_ok :
forall (s : state) (a : ad) (p : prec_list) (d0 d1 : preDTA),
state_ref_ok s d1 ->
state_ref_ok (M1 prec_list a p) d0 ->
state_ref_ok (s_produit_r a p s) (preDTA_produit d1 d0).