(* * Encoding for binary numbers *)
From Undecidability.Shared.Libs.PSL Require Export Bijection.
Require Export BinNums.
(* We use Coq's standard types [positive] and [N] *)
(* It is important to note that the least-significant bit is the last symbol in the encoding *)
Inductive sigPos : Type :=
| sigPos_xI : sigPos
| sigPos_xO : sigPos
| sigPos_xH : sigPos.
Global Instance sigPos_eq : eq_dec sigPos.

Lemma app_singleton_inv_nil (X : Type) (xs : list X) (x y : X) :
xs ++ [x] = [y] -> xs = nil /\ x = y.