let rec has_MUX cycle tree = 
    match cycle with
      x::tail -> if is_MUX x tree then true else has_MUX tail tree
    | _ -> false