Section decidable_fun_finite_bool.
(* Decidability of quantification over extensional and decidable predicates of type (X -> bool) -> Prop when X is a finite and discrete type *)
Variable (X : Type) (H1 : finite_t X) (H2 : discrete X)
(K : (X -> bool) -> Prop)
(HK : forall P Q, (forall x, P x = Q x) -> K P <-> K Q)
(Dec : forall P, decidable (K P)).
Let D : { n : nat & bij_t X (pos n) }.
Let n := projT1 D.
Let i : X -> pos n := projT1 (projT2 D).
Let j : pos n -> X := proj1_sig (projT2 (projT2 D)).
Let Hji : forall x, j (i x) = x.

Theorem ex_fun_bool_decidable : decidable (exists P, K P).