(* fonction de suppression des états non coaccessibles *)

Fixpoint non_coacc_kill (d : preDTA) (m : Map bool) {struct m} : preDTA :=
  match d, m with
  | M0, M0 => M0 state
  | M1 a s, M1 a' b => if Neqb a a' && b then M1 state a s else M0 state
  | M2 x y, M2 z t => M2 state (non_coacc_kill x z) (non_coacc_kill y t)
  | _, _ => M0 state
  end.Definition predta_kill_non_coacc (d : preDTA) (a : ad) : preDTA :=
  non_coacc_kill d (predta_coacc_states d a).Definition dta_kill_non_coacc (d : DTA) : DTA :=
  match d with
  | dta p a => dta (predta_kill_non_coacc p a) a
  end.Definition predta_kill_non_coacc_lazy (d : preDTA) 
  (a : ad) : preDTA := non_coacc_kill d (predta_coacc_states_0 d a).Definition dta_kill_non_coacc_lazy (d : DTA) : DTA :=
  match d with
  | dta p a => dta (predta_kill_non_coacc_lazy p a) a
  end.

Lemma non_coacc_kill_1 : forall (d : preDTA) (a : ad) (s : state) (m : Map bool), ensemble_base state d m -> MapGet state (non_coacc_kill d m) a = Some s -> MapGet state d a = Some s /\ MapGet bool m a = Some true.