(** the transposition of h is the hedge where all the pairs (M,N) are reversed in (N,M) *)
Definition transpose (h : hedge) (M N : Msg) := h N M.(** h is consistent if h is left consistent and if (transpose h) is left consistent (h is right consistent) *)
Definition is_consistent (h : hedge) :=
  is_left_consistent h /\ is_left_consistent (transpose h).Definition no_pairs (h : hedge) :=
  forall M1 M2 N1 N2 : Msg, ~ h (MPair M1 M2) (MPair N1 N2).Definition no_syn_ops (h : hedge) :=
  forall (o : op) (M N : Msg), h (Mop o M) (Mop o N) -> ~ synthesis h M N.Definition no_syn_cyph (h : hedge) :=
  forall M N K L : Msg,
  h (MEnc M K) (MEnc N L) -> ~ synthesis h M N \/ ~ synthesis h K L.Definition cyph_dec (h : hedge) :=
  forall M N K L : Msg,
  h (MEnc M K) (MEnc N L) -> synthesis h (inv K) (inv L) -> synthesis h M N.(** we show in the following that a hedge is irreducible iff it satisfies these conditions *)
Definition cond_irr (h : hedge) :=
  no_pairs h /\ no_syn_ops h /\ no_syn_cyph h /\ cyph_dec h.

Theorem irreducible_iff_cond_irr : forall h : hedge, cond_irr h <-> is_irreducible h.