induct: fixes P :: "int option \<Rightarrow> 'a tree23 \<Rightarrow> bool"   and a0 :: "int option"   and a1 :: "'a tree23" assumes "\<And>k. P (Some k) Empty"   and "\<And>p. P None (Branch2 Empty p Empty)"   and "\<And>p q. P None (Branch3 Empty p Empty q Empty)"   and "\<And>v p. P (Some v) (Branch2 Empty p Empty)"   and "\<And>v p q. P (Some v) (Branch3 Empty p Empty q Empty)"   and "\<And>v va vb vc p r. \<lbrakk>compare (Some v) p = LESS \<Longrightarrow> P (Some v) (Branch2 va vb vc); compare (Some v) p = EQUAL \<Longrightarrow> P (if_eq EQUAL None (Some v)) r; compare (Some v) p = GREATER \<Longrightarrow> P (if_eq GREATER None (Some v)) r\<rbrakk> \<Longrightarrow> P (Some v) (Branch2 (Branch2 va vb vc) p r)"   and "\<And>v va vb vc vd ve p r. \<lbrakk>compare (Some v) p = LESS \<Longrightarrow> P (Some v) (Branch3 va vb vc vd ve); compare (Some v) p = EQUAL \<Longrightarrow> P (if_eq EQUAL None (Some v)) r; compare (Some v) p = GREATER \<Longrightarrow> P (if_eq GREATER None (Some v)) r\<rbrakk> \<Longrightarrow> P (Some v) (Branch2 (Branch3 va vb vc vd ve) p r)"   and "\<And>v l p va vb vc. \<lbrakk>compare (Some v) p = LESS \<Longrightarrow> P (Some v) l; compare (Some v) p = EQUAL \<Longrightarrow> P (if_eq EQUAL None (Some v)) (Branch2 va vb vc); compare (Some v) p = GREATER \<Longrightarrow> P (if_eq GREATER None (Some v)) (Branch2 va vb vc)\<rbrakk> \<Longrightarrow> P (Some v) (Branch2 l p (Branch2 va vb vc))"   and "\<And>v l p va vb vc vd ve. \<lbrakk>compare (Some v) p = LESS \<Longrightarrow> P (Some v) l; compare (Some v) p = EQUAL \<Longrightarrow> P (if_eq EQUAL None (Some v)) (Branch3 va vb vc vd ve); compare (Some v) p = GREATER \<Longrightarrow> P (if_eq GREATER None (Some v)) (Branch3 va vb vc vd ve)\<rbrakk> \<Longrightarrow> P (Some v) (Branch2 l p (Branch3 va vb vc vd ve))"   and "\<And>k v va vb p r. \<lbrakk>compare k p = LESS \<Longrightarrow> P k (Branch2 v va vb); compare k p = EQUAL \<Longrightarrow> P (if_eq EQUAL None k) r; compare k p = GREATER \<Longrightarrow> P (if_eq GREATER None k) r\<rbrakk> \<Longrightarrow> P k (Branch2 (Branch2 v va vb) p r)"   and "\<And>k v va vb vc vd p r. \<lbrakk>compare k p = LESS \<Longrightarrow> P k (Branch3 v va vb vc vd); compare k p = EQUAL \<Longrightarrow> P (if_eq EQUAL None k) r; compare k p = GREATER \<Longrightarrow> P (if_eq GREATER None k) r\<rbrakk> \<Longrightarrow> P k (Branch2 (Branch3 v va vb vc vd) p r)"   and "\<And>k l p v va vb. \<lbrakk>compare k p = LESS \<Longrightarrow> P k l; compare k p = EQUAL \<Longrightarrow> P (if_eq EQUAL None k) (Branch2 v va vb); compare k p = GREATER \<Longrightarrow> P (if_eq GREATER None k) (Branch2 v va vb)\<rbrakk> \<Longrightarrow> P k (Branch2 l p (Branch2 v va vb))"   and "\<And>k l p v va vb vc vd. \<lbrakk>compare k p = LESS \<Longrightarrow> P k l; compare k p = EQUAL \<Longrightarrow> P (if_eq EQUAL None k) (Branch3 v va vb vc vd); compare k p = GREATER \<Longrightarrow> P (if_eq GREATER None k) (Branch3 v va vb vc vd)\<rbrakk> \<Longrightarrow> P k (Branch2 l p (Branch3 v va vb vc vd))"   and "\<And>v va vb vc p m q r. \<lbrakk>\<lbrakk>compare (Some v) q = LESS; compare (Some v) p = LESS\<rbrakk> \<Longrightarrow> P (Some v) (Branch2 va vb vc); \<lbrakk>compare (Some v) q = LESS; compare (Some v) p = EQUAL\<rbrakk> \<Longrightarrow> P (if_eq EQUAL None (Some v)) m; \<lbrakk>compare (Some v) q = LESS; compare (Some v) p = GREATER\<rbrakk> \<Longrightarrow> P (if_eq GREATER None (Some v)) m; compare (Some v) q = EQUAL \<Longrightarrow> P (if_eq EQUAL None (Some v)) r; compare (Some v) q = GREATER \<Longrightarrow> P (if_eq GREATER None (Some v)) r\<rbrakk> \<Longrightarrow> P (Some v) (Branch3 (Branch2 va vb vc) p m q r)"   and "\<And>v va vb vc vd ve p m q r. \<lbrakk>\<lbrakk>compare (Some v) q = LESS; compare (Some v) p = LESS\<rbrakk> \<Longrightarrow> P (Some v) (Branch3 va vb vc vd ve); \<lbrakk>compare (Some v) q = LESS; compare (Some v) p = EQUAL\<rbrakk> \<Longrightarrow> P (if_eq EQUAL None (Some v)) m; \<lbrakk>compare (Some v) q = LESS; compare (Some v) p = GREATER\<rbrakk> \<Longrightarrow> P (if_eq GREATER None (Some v)) m; compare (Some v) q = EQUAL \<Longrightarrow> P (if_eq EQUAL None (Some v)) r; compare (Some v) q = GREATER \<Longrightarrow> P (if_eq GREATER None (Some v)) r\<rbrakk> \<Longrightarrow> P (Some v) (Branch3 (Branch3 va vb vc vd ve) p m q r)"   and "\<And>v l p va vb vc q r. \<lbrakk>\<lbrakk>compare (Some v) q = LESS; compare (Some v) p = LESS\<rbrakk> \<Longrightarrow> P (Some v) l; \<lbrakk>compare (Some v) q = LESS; compare (Some v) p = EQUAL\<rbrakk> \<Longrightarrow> P (if_eq EQUAL None (Some v)) (Branch2 va vb vc); \<lbrakk>compare (Some v) q = LESS; compare (Some v) p = GREATER\<rbrakk> \<Longrightarrow> P (if_eq GREATER None (Some v)) (Branch2 va vb vc); compare (Some v) q = EQUAL \<Longrightarrow> P (if_eq EQUAL None (Some v)) r; compare (Some v) q = GREATER \<Longrightarrow> P (if_eq GREATER None (Some v)) r\<rbrakk> \<Longrightarrow> P (Some v) (Branch3 l p (Branch2 va vb vc) q r)"   and "\<And>v l p va vb vc vd ve q r. \<lbrakk>\<lbrakk>compare (Some v) q = LESS; compare (Some v) p = LESS\<rbrakk> \<Longrightarrow> P (Some v) l; \<lbrakk>compare (Some v) q = LESS; compare (Some v) p = EQUAL\<rbrakk> \<Longrightarrow> P (if_eq EQUAL None (Some v)) (Branch3 va vb vc vd ve); \<lbrakk>compare (Some v) q = LESS; compare (Some v) p = GREATER\<rbrakk> \<Longrightarrow> P (if_eq GREATER None (Some v)) (Branch3 va vb vc vd ve); compare (Some v) q = EQUAL \<Longrightarrow> P (if_eq EQUAL None (Some v)) r; compare (Some v) q = GREATER \<Longrightarrow> P (if_eq GREATER None (Some v)) r\<rbrakk> \<Longrightarrow> P (Some v) (Branch3 l p (Branch3 va vb vc vd ve) q r)"   and "\<And>v l p m q va vb vc. \<lbrakk>\<lbrakk>compare (Some v) q = LESS; compare (Some v) p = LESS\<rbrakk> \<Longrightarrow> P (Some v) l; \<lbrakk>compare (Some v) q = LESS; compare (Some v) p = EQUAL\<rbrakk> \<Longrightarrow> P (if_eq EQUAL None (Some v)) m; \<lbrakk>compare (Some v) q = LESS; compare (Some v) p = GREATER\<rbrakk> \<Longrightarrow> P (if_eq GREATER None (Some v)) m; compare (Some v) q = EQUAL \<Longrightarrow> P (if_eq EQUAL None (Some v)) (Branch2 va vb vc); compare (Some v) q = GREATER \<Longrightarrow> P (if_eq GREATER None (Some v)) (Branch2 va vb vc)\<rbrakk> \<Longrightarrow> P (Some v) (Branch3 l p m q (Branch2 va vb vc))"   and "\<And>v l p m q va vb vc vd ve. \<lbrakk>\<lbrakk>compare (Some v) q = LESS; compare (Some v) p = LESS\<rbrakk> \<Longrightarrow> P (Some v) l; \<lbrakk>compare (Some v) q = LESS; compare (Some v) p = EQUAL\<rbrakk> \<Longrightarrow> P (if_eq EQUAL None (Some v)) m; \<lbrakk>compare (Some v) q = LESS; compare (Some v) p = GREATER\<rbrakk> \<Longrightarrow> P (if_eq GREATER None (Some v)) m; compare (Some v) q = EQUAL \<Longrightarrow> P (if_eq EQUAL None (Some v)) (Branch3 va vb vc vd ve); compare (Some v) q = GREATER \<Longrightarrow> P (if_eq GREATER None (Some v)) (Branch3 va vb vc vd ve)\<rbrakk> \<Longrightarrow> P (Some v) (Branch3 l p m q (Branch3 va vb vc vd ve))"   and "\<And>k v va vb p m q r. \<lbrakk>\<lbrakk>compare k q = LESS; compare k p = LESS\<rbrakk> \<Longrightarrow> P k (Branch2 v va vb); \<lbrakk>compare k q = LESS; compare k p = EQUAL\<rbrakk> \<Longrightarrow> P (if_eq EQUAL None k) m; \<lbrakk>compare k q = LESS; compare k p = GREATER\<rbrakk> \<Longrightarrow> P (if_eq GREATER None k) m; compare k q = EQUAL \<Longrightarrow> P (if_eq EQUAL None k) r; compare k q = GREATER \<Longrightarrow> P (if_eq GREATER None k) r\<rbrakk> \<Longrightarrow> P k (Branch3 (Branch2 v va vb) p m q r)"   and "\<And>k v va vb vc vd p m q r. \<lbrakk>\<lbrakk>compare k q = LESS; compare k p = LESS\<rbrakk> \<Longrightarrow> P k (Branch3 v va vb vc vd); \<lbrakk>compare k q = LESS; compare k p = EQUAL\<rbrakk> \<Longrightarrow> P (if_eq EQUAL None k) m; \<lbrakk>compare k q = LESS; compare k p = GREATER\<rbrakk> \<Longrightarrow> P (if_eq GREATER None k) m; compare k q = EQUAL \<Longrightarrow> P (if_eq EQUAL None k) r; compare k q = GREATER \<Longrightarrow> P (if_eq GREATER None k) r\<rbrakk> \<Longrightarrow> P k (Branch3 (Branch3 v va vb vc vd) p m q r)"   and "\<And>k l p v va vb q r. \<lbrakk>\<lbrakk>compare k q = LESS; compare k p = LESS\<rbrakk> \<Longrightarrow> P k l; \<lbrakk>compare k q = LESS; compare k p = EQUAL\<rbrakk> \<Longrightarrow> P (if_eq EQUAL None k) (Branch2 v va vb); \<lbrakk>compare k q = LESS; compare k p = GREATER\<rbrakk> \<Longrightarrow> P (if_eq GREATER None k) (Branch2 v va vb); compare k q = EQUAL \<Longrightarrow> P (if_eq EQUAL None k) r; compare k q = GREATER \<Longrightarrow> P (if_eq GREATER None k) r\<rbrakk> \<Longrightarrow> P k (Branch3 l p (Branch2 v va vb) q r)"   and "\<And>k l p v va vb vc vd q r. \<lbrakk>\<lbrakk>compare k q = LESS; compare k p = LESS\<rbrakk> \<Longrightarrow> P k l; \<lbrakk>compare k q = LESS; compare k p = EQUAL\<rbrakk> \<Longrightarrow> P (if_eq EQUAL None k) (Branch3 v va vb vc vd); \<lbrakk>compare k q = LESS; compare k p = GREATER\<rbrakk> \<Longrightarrow> P (if_eq GREATER None k) (Branch3 v va vb vc vd); compare k q = EQUAL \<Longrightarrow> P (if_eq EQUAL None k) r; compare k q = GREATER \<Longrightarrow> P (if_eq GREATER None k) r\<rbrakk> \<Longrightarrow> P k (Branch3 l p (Branch3 v va vb vc vd) q r)"   and "\<And>k l p m q v va vb. \<lbrakk>\<lbrakk>compare k q = LESS; compare k p = LESS\<rbrakk> \<Longrightarrow> P k l; \<lbrakk>compare k q = LESS; compare k p = EQUAL\<rbrakk> \<Longrightarrow> P (if_eq EQUAL None k) m; \<lbrakk>compare k q = LESS; compare k p = GREATER\<rbrakk> \<Longrightarrow> P (if_eq GREATER None k) m; compare k q = EQUAL \<Longrightarrow> P (if_eq EQUAL None k) (Branch2 v va vb); compare k q = GREATER \<Longrightarrow> P (if_eq GREATER None k) (Branch2 v va vb)\<rbrakk> \<Longrightarrow> P k (Branch3 l p m q (Branch2 v va vb))"   and "\<And>k l p m q v va vb vc vd. \<lbrakk>\<lbrakk>compare k q = LESS; compare k p = LESS\<rbrakk> \<Longrightarrow> P k l; \<lbrakk>compare k q = LESS; compare k p = EQUAL\<rbrakk> \<Longrightarrow> P (if_eq EQUAL None k) m; \<lbrakk>compare k q = LESS; compare k p = GREATER\<rbrakk> \<Longrightarrow> P (if_eq GREATER None k) m; compare k q = EQUAL \<Longrightarrow> P (if_eq EQUAL None k) (Branch3 v va vb vc vd); compare k q = GREATER \<Longrightarrow> P (if_eq GREATER None k) (Branch3 v va vb vc vd)\<rbrakk> \<Longrightarrow> P k (Branch3 l p m q (Branch3 v va vb vc vd))"   and "P None Empty" shows "P a0 a1"