(* insertion d'un état *)
Definition insert_state (d : preDTA) (a : ad) (s : state) : preDTA :=
MapPut state d a s.
Definition insert_main_state_0 (d : preDTA) (a : ad)
(s : state) : DTA := dta (insert_state d a s) a.
Definition insert_main_state (d : preDTA) (s : state) : DTA :=
insert_main_state_0 d (new_preDTA_ad d) s.
Definition insert_ostate (d : preDTA) (a : ad) (o : option state) : preDTA :=
match o with
| None => d
| Some s => MapPut state d a s
end.
Definition insert_main_ostate_0 (d : preDTA) (a : ad)
(o : option state) : DTA := dta (insert_ostate d a o) a.

Lemma u_conv_0_ref_ok :
forall d : preDTA, preDTA_ref_ok d -> preDTA_ref_ok (udta_conv_0 d).