(* autre correction a verifier : appartenance du dernier etat *)
Definition addr_in_preDTA (d : preDTA) (a : ad) : Prop :=
exists s : state, MapGet state d a = Some s.
Definition DTA_main_state_correct (d : DTA) : Prop :=
match d with
| dta p a => addr_in_preDTA p a
end.
Definition DTA_main_state_correct_check (d : DTA) : bool :=
match d with
| dta p a =>
match MapGet state p a with
| None => false
| Some _ => true
end
end.

Lemma DTA_main_state_correct_check_correct :
forall d : DTA,
DTA_main_state_correct d -> DTA_main_state_correct_check d = true.