Module ReductionChainNotations.
(* DLW: Thx to M. Wuttke for the tip, see coq-club ML *)
Ltac redchain2Prop_rec xs :=
lazymatch xs with
| pair ?x (pair ?y ?xs) =>
let z := redchain2Prop_rec (pair y xs) in
constr:(x ⪯ y /\ z)
| pair ?x ?y => constr:(x ⪯ y)
end.
Ltac redchain2Prop xs :=
let z := redchain2Prop_rec xs
in  exact z.
Declare Scope reduction_chain.
Delimit Scope reduction_chain with redchain_scope.
Notation "x '⪯ₘ' y" := (pair x y) (at level 80, right associativity, only parsing) : reduction_chain.
Notation "'⎩' xs '⎭'" := (ltac:(redchain2Prop (xs % redchain_scope))) (only parsing).
(* Definition Undec_Problem := { X : Type & X -> Prop }.  Definition undec_problem X (P : X -> Prop) : Undec_Problem := existT _ X P.  Notation "⎩ p ⎭" := (@undec_problem _ p) (format "⎩ p ⎭").  Infix "⪯ₚ" := (fun p q : Undec_Problem => projT2 p ⪯ projT2 q : Prop) (at level 70).  Reserved Notation "p '⪯ₗ' q 'by' l" (at level 70).  Section reduction_chain.  Inductive reduction_chain : Undec_Problem -> Undec_Problem -> list Undec_Problem -> Prop := | reduction_chain_nil  : forall p, p ⪯ₗ p by nil | reduction_chain_cons : forall p q r l, p ⪯ₚ q -> q ⪯ₗ r by l -> p ⪯ₗ r by q::l where "p '⪯ₗ' q 'by' l" := (reduction_chain p q l).  Fact reduction_chain_reduces p q l : p ⪯ₗ q by l -> p ⪯ₚ q.  Fact reduction_chain_app p q r l m : p ⪯ₗ q by l -> q ⪯ₗ r by m -> p ⪯ₗ r by l++m.  End reduction_chain.  Notation "p '⪯ₗ' q 'by' l" := (reduction_chain p q l).  Tactic Notation "red" "chain" "stop" := constructor 1. Tactic Notation "red" "chain" "step" constr(H) := constructor 2; [ apply H | ]. Tactic Notation "red" "chain" "app" constr(H) := apply reduction_chain_app with (1 := H). *)
End ReductionChainNotations.

Lemma dec_red X (p : X -> Prop) Y (q : Y -> Prop) :
p ⪯ q -> decidable q -> decidable p.