(* Predicate for belonging *)
Inductive inpb : pbtree -> pbtree -> Prop :=
  | inpb_leaf : forall t : pbtree, inpb t t
  | inpb_left : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbleft t1)
  | inpb_right : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbright t1)
  | inpb_node_l : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbnode t1 t2)
  | inpb_node_r : forall t t1 t2 : pbtree, inpb t t2 -> inpb t (pbnode t1 t2).(* Predicate for belonging *)
Inductive inpb : pbtree -> pbtree -> Prop :=
  | inpb_leaf : forall t : pbtree, inpb t t
  | inpb_left : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbleft t1)
  | inpb_right : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbright t1)
  | inpb_node_l : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbnode t1 t2)
  | inpb_node_r : forall t t1 t2 : pbtree, inpb t t2 -> inpb t (pbnode t1 t2).(* Predicate for belonging *)
Inductive inpb : pbtree -> pbtree -> Prop :=
  | inpb_leaf : forall t : pbtree, inpb t t
  | inpb_left : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbleft t1)
  | inpb_right : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbright t1)
  | inpb_node_l : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbnode t1 t2)
  | inpb_node_r : forall t t1 t2 : pbtree, inpb t t2 -> inpb t (pbnode t1 t2).(* Predicate for belonging *)
Inductive inpb : pbtree -> pbtree -> Prop :=
  | inpb_leaf : forall t : pbtree, inpb t t
  | inpb_left : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbleft t1)
  | inpb_right : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbright t1)
  | inpb_node_l : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbnode t1 t2)
  | inpb_node_r : forall t t1 t2 : pbtree, inpb t t2 -> inpb t (pbnode t1 t2).(* Predicate for belonging *)
Inductive inpb : pbtree -> pbtree -> Prop :=
  | inpb_leaf : forall t : pbtree, inpb t t
  | inpb_left : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbleft t1)
  | inpb_right : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbright t1)
  | inpb_node_l : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbnode t1 t2)
  | inpb_node_r : forall t t1 t2 : pbtree, inpb t t2 -> inpb t (pbnode t1 t2).(* Predicate for belonging *)
Inductive inpb : pbtree -> pbtree -> Prop :=
  | inpb_leaf : forall t : pbtree, inpb t t
  | inpb_left : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbleft t1)
  | inpb_right : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbright t1)
  | inpb_node_l : forall t t1 t2 : pbtree, inpb t t1 -> inpb t (pbnode t1 t2)
  | inpb_node_r : forall t t1 t2 : pbtree, inpb t t2 -> inpb t (pbnode t1 t2).(* Equality on partial trees is decidable *) 
Definition pbtree_dec : forall a b : pbtree, {a = b} + {a <> b}.(* Belonging is decidable *) 
Definition inpb_dec : forall a b, {inpb a b} + {~ inpb a b}.

Theorem inpb_trans : forall t1 t2 t3, inpb t1 t2 -> inpb t2 t3 -> inpb t1 t3.