(* 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                                                     *)
(* définition inductive de la coaccessibilité *)
Inductive coacc : preDTA -> ad -> ad -> Prop :=
| coacc_id :
forall (d : preDTA) (a : ad) (s : state),
MapGet state d a = Some s -> coacc d a a
| coacc_nxt :
forall (d : preDTA) (a0 a1 a2 : ad) (s1 s2 : state)
(pl : prec_list) (c : ad),
MapGet state d a2 = Some s2 ->
MapGet state d a1 = Some s1 ->
MapGet prec_list s1 c = Some pl ->
prec_occur pl a2 -> coacc d a0 a1 -> coacc d a0 a2.
Definition coacc_transitive_def (d : preDTA) (a0 a1 : ad) : Prop :=
forall a2 : ad, coacc d a0 a1 -> coacc d a2 a0 -> coacc d a2 a1.

Lemma coacc_transitive_1 :
forall (d : preDTA) (a0 a1 a2 : ad) (s1 s2 : state)
(pl : prec_list) (c : ad),
MapGet state d a2 = Some s2 ->
MapGet state d a1 = Some s1 ->
MapGet prec_list s1 c = Some pl ->
prec_occur pl a2 ->
coacc d a0 a1 ->
coacc_transitive_def d a0 a1 -> coacc_transitive_def d a0 a2.