(* does not simplify array indices, because that might be too expensive *)
Ltac simpl_compute_legal_nested_field :=
  repeat match goal with
  | |- context [ compute_legal_nested_field ?T ?L ] =>
    let r := eval hnf in (compute_legal_nested_field T L) in
    change (compute_legal_nested_field T L) with r
  end.Hint Extern 1 (_ = _) => 
  match goal with |- ?A = ?B => constr_eq A B; reflexivity end : cancel.

(* Specifications: *)
Lemma field_at_data_at_cancel': forall {cs : compspecs} sh t v p, field_at sh t nil v p = data_at sh t v p.
Lemma data_at__Tarray: forall {CS: compspecs} sh t n a, data_at_ sh (Tarray t n a) = data_at sh (Tarray t n a) (list_repeat (Z.to_nat n) (default_val t)).
Lemma data_at__tarray: forall {CS: compspecs} sh t n, data_at_ sh (tarray t n) = data_at sh (tarray t n) (list_repeat (Z.to_nat n) (default_val t)).
Lemma data_at__Tarray': forall {CS: compspecs} sh t n a v, v = list_repeat (Z.to_nat n) (default_val t) -> data_at_ sh (Tarray t n a) = data_at sh (Tarray t n a) v.
Lemma data_at__tarray': forall {CS: compspecs} sh t n v, v = list_repeat (Z.to_nat n) (default_val t) -> data_at_ sh (tarray t n) = data_at sh (tarray t n) v.