Module Import ValidSafe := Validator_safe.Make A.
(** A few helpers for dependent types. *)
(** Decidable propositions. *)
Class Decidable (P : Prop) := decide : {P} + {~P}.
Arguments decide _ {_}.
(** A [Comparable] type has decidable equality. *)
Instance comparable_decidable_eq T `{ComparableLeibnizEq T} (x y : T) :
Decidable (x = y).

Lemma pop_state_valid symbols_to_pop stk Hp A action lpred :
prefix_pred lpred (state_stack_of_stack stk) ->
let stk' := fst (pop symbols_to_pop stk Hp (A:=A) action) in
state_valid_after_pop (state_of_stack stk') symbols_to_pop lpred.