(**************************************************************)
(*   Copyright Dominique Larchey-Wendling [*]                 *)
(*                                                            *)
(*                             [*] Affiliation LORIA -- CNRS  *)
(**************************************************************)
(*      This file is distributed under the terms of the       *)
(*         CeCILL v2 FREE SOFTWARE LICENSE AGREEMENT          *)
(**************************************************************)
From Undecidability.Shared.Libs.DLW.Utils
From Undecidability.Shared.Libs.DLW.Vec
From Undecidability.TRAKHTENBROT
Set Implicit Arguments.
(* * Decidability and discreteness and closure properties *)
Definition decidable (P : Prop) := { P } + { ~ P }.
Fact decidable_bool_eq P : (decidable P -> { Q : bool | P <-> Q = true })
* ({ Q : bool | P <-> Q = true } -> decidable P).
Fact ireduction_decidable X Y (p : X -> Prop) (q : Y -> Prop) :
p ⪯ᵢ q -> (forall y, decidable (q y)) -> forall x, decidable (p x).
Definition discrete X := forall x y : X, decidable (x=y).
Fact discrete_unit : discrete unit.
Let Dex : decidable (exists v, K (vec_pos v)).

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