let rec subset s1 s2 =
if is_empty s1 then true else
if is_empty s2 then false else
let v1, v2 = root s2 in
let l2 = left_branch s2 in
let r2 = right_branch s2 in
let l1 = before s1 v1 in
let r1 = after s1 v2 in
(subset l1 l2) && (subset r1 r2)