:- module tree_bitset.
:- interface.
:- import_module enum.
:- import_module list.
:- import_module term.
:- use_module set.
:- type tree_bitset(T).
:- pragma type_spec((tree_bitset.all_true)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__all_true__[T = int]')).
:- pragma type_spec((tree_bitset.all_true)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__all_true__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.contains)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__contains__[T = int]')).
:- pragma type_spec((tree_bitset.contains)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__contains__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.delete)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__delete__[T = int]')).
:- pragma type_spec((tree_bitset.delete)/3, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__delete__[T = int]')).
:- pragma type_spec((tree_bitset.delete)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__delete__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.delete)/3, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__delete__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.delete_list)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__delete_list__[T = int]')).
:- pragma type_spec((tree_bitset.delete_list)/3, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__delete_list__[T = int]')).
:- pragma type_spec((tree_bitset.delete_list)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__delete_list__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.delete_list)/3, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__delete_list__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.empty)/1, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__empty__[T = int]')).
:- pragma type_spec((tree_bitset.empty)/1, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__empty__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.equal)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__equal__[T = int]')).
:- pragma type_spec((tree_bitset.equal)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__equal__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.foldl)/3, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__foldl__[T = int]')).
:- pragma type_spec((tree_bitset.foldl)/4, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__foldl__[T = int]')).
:- pragma type_spec((tree_bitset.foldl)/3, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__foldl__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.foldl)/4, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__foldl__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.foldr)/3, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__foldr__[T = int]')).
:- pragma type_spec((tree_bitset.foldr)/4, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__foldr__[T = int]')).
:- pragma type_spec((tree_bitset.foldr)/3, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__foldr__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.foldr)/4, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__foldr__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.from_set)/1, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__from_set__[T = int]')).
:- pragma type_spec((tree_bitset.from_set)/1, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__from_set__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.init)/0, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__init__[T = int]')).
:- pragma type_spec((tree_bitset.init)/0, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__init__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.insert)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__insert__[T = int]')).
:- pragma type_spec((tree_bitset.insert)/3, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__insert__[T = int]')).
:- pragma type_spec((tree_bitset.insert)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__insert__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.insert)/3, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__insert__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.insert_list)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__insert_list__[T = int]')).
:- pragma type_spec((tree_bitset.insert_list)/3, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__insert_list__[T = int]')).
:- pragma type_spec((tree_bitset.insert_list)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__insert_list__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.insert_list)/3, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__insert_list__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.list_to_set)/1, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__list_to_set__[T = int]')).
:- pragma type_spec((tree_bitset.list_to_set)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__list_to_set__[T = int]')).
:- pragma type_spec((tree_bitset.list_to_set)/1, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__list_to_set__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.list_to_set)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__list_to_set__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.make_singleton_set)/1, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__make_singleton_set__[T = int]')).
:- pragma type_spec((tree_bitset.make_singleton_set)/1, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__make_singleton_set__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.member)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__member__[T = int]')).
:- pragma type_spec((tree_bitset.member)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__member__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.sorted_list_to_set)/1, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__sorted_list_to_set__[T = int]')).
:- pragma type_spec((tree_bitset.sorted_list_to_set)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__sorted_list_to_set__[T = int]')).
:- pragma type_spec((tree_bitset.sorted_list_to_set)/1, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__sorted_list_to_set__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.sorted_list_to_set)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__sorted_list_to_set__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.subset)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__subset__[T = int]')).
:- pragma type_spec((tree_bitset.subset)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__subset__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.superset)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__superset__[T = int]')).
:- pragma type_spec((tree_bitset.superset)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__superset__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.to_set)/1, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__to_set__[T = int]')).
:- pragma type_spec((tree_bitset.to_set)/1, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__to_set__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.to_sorted_list)/1, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__to_sorted_list__[T = int]')).
:- pragma type_spec((tree_bitset.to_sorted_list)/2, (T = int), (tree_bitset.'TypeSpecOf__pred_or_func__to_sorted_list__[T = int]')).
:- pragma type_spec((tree_bitset.to_sorted_list)/1, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__to_sorted_list__[T = var(V_2)]')).
:- pragma type_spec((tree_bitset.to_sorted_list)/2, (T = term.var(V_2)), (tree_bitset.'TypeSpecOf__pred_or_func__to_sorted_list__[T = var(V_2)]')).
:- pred all_true((pred T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode all_true(builtin.in((pred((builtin.in)) is semidet)), (builtin.in)) is semidet.
:- pred contains(tree_bitset.tree_bitset(T), T) <= (enum.enum(T)).
:- mode contains((builtin.in), (builtin.in)) is semidet.
:- func count(tree_bitset.tree_bitset(T)) = int <= (enum.enum(T)).
:- func delete(tree_bitset.tree_bitset(T), T) = tree_bitset.tree_bitset(T) <= (enum.enum(T)).
:- pred delete(T, tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode delete((builtin.in), (builtin.in), (builtin.out)) is det.
:- func delete_list(tree_bitset.tree_bitset(T), list.list(T)) = tree_bitset.tree_bitset(T) <= (enum.enum(T)).
:- pred delete_list(list.list(T), tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode delete_list((builtin.in), (builtin.in), (builtin.out)) is det.
:- func difference(tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) = tree_bitset.tree_bitset(T).
:- pred difference(tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)).
:- mode difference((builtin.in), (builtin.in), (builtin.out)) is det.
:- pred divide((pred T), tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode divide(builtin.in((pred((builtin.in)) is semidet)), (builtin.in), (builtin.out), (builtin.out)) is det.
:- pred divide_by_set(tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode divide_by_set((builtin.in), (builtin.in), (builtin.out), (builtin.out)) is det.
:- pred empty(tree_bitset.tree_bitset(T)).
:- mode empty((builtin.in)) is semidet.
:- mode empty((builtin.out)) is det.
:- pred equal(tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode equal((builtin.in), (builtin.in)) is semidet.
:- func filter((pred T), tree_bitset.tree_bitset(T)) = tree_bitset.tree_bitset(T) <= (enum.enum(T)).
:- mode filter((pred((builtin.in)) is semidet), (builtin.in)) = (builtin.out) is det.
:- pred filter((pred T), tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode filter((pred((builtin.in)) is semidet), (builtin.in), (builtin.out), (builtin.out)) is det.
:- func foldl((func(T, U) = U), tree_bitset.tree_bitset(T), U) = U <= (enum.enum(T)).
:- pred foldl(pred(T, U, U), tree_bitset.tree_bitset(T), U, U) <= (enum.enum(T)).
:- mode foldl((pred((builtin.in), (builtin.in), (builtin.out)) is det), (builtin.in), (builtin.in), (builtin.out)) is det.
:- mode foldl((pred((builtin.in), (builtin.mdi), (builtin.muo)) is det), (builtin.in), (builtin.mdi), (builtin.muo)) is det.
:- mode foldl((pred((builtin.in), (builtin.di), (builtin.uo)) is det), (builtin.in), (builtin.di), (builtin.uo)) is det.
:- mode foldl((pred((builtin.in), (builtin.in), (builtin.out)) is semidet), (builtin.in), (builtin.in), (builtin.out)) is semidet.
:- mode foldl((pred((builtin.in), (builtin.mdi), (builtin.muo)) is semidet), (builtin.in), (builtin.mdi), (builtin.muo)) is semidet.
:- mode foldl((pred((builtin.in), (builtin.di), (builtin.uo)) is semidet), (builtin.in), (builtin.di), (builtin.uo)) is semidet.
:- mode foldl((pred((builtin.in), (builtin.in), (builtin.out)) is nondet), (builtin.in), (builtin.in), (builtin.out)) is nondet.
:- mode foldl((pred((builtin.in), (builtin.mdi), (builtin.muo)) is nondet), (builtin.in), (builtin.mdi), (builtin.muo)) is nondet.
:- mode foldl((pred((builtin.in), (builtin.di), (builtin.uo)) is cc_multi), (builtin.in), (builtin.di), (builtin.uo)) is cc_multi.
:- mode foldl((pred((builtin.in), (builtin.in), (builtin.out)) is cc_multi), (builtin.in), (builtin.in), (builtin.out)) is cc_multi.
:- pred foldl2(pred(T, U, U, V, V), tree_bitset.tree_bitset(T), U, U, V, V) <= (enum.enum(T)).
:- mode foldl2((pred((builtin.in), (builtin.di), (builtin.uo), (builtin.di), (builtin.uo)) is det), (builtin.in), (builtin.di), (builtin.uo), (builtin.di), (builtin.uo)) is det.
:- mode foldl2((pred((builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)) is det), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)) is det.
:- mode foldl2((pred((builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is det), (builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is det.
:- mode foldl2((pred((builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is semidet), (builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is semidet.
:- mode foldl2((pred((builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is nondet), (builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is nondet.
:- mode foldl2((pred((builtin.in), (builtin.di), (builtin.uo), (builtin.di), (builtin.uo)) is cc_multi), (builtin.in), (builtin.di), (builtin.uo), (builtin.di), (builtin.uo)) is cc_multi.
:- mode foldl2((pred((builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)) is cc_multi), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)) is cc_multi.
:- mode foldl2((pred((builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is cc_multi), (builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is cc_multi.
:- func foldr((func(T, U) = U), tree_bitset.tree_bitset(T), U) = U <= (enum.enum(T)).
:- pred foldr(pred(T, U, U), tree_bitset.tree_bitset(T), U, U) <= (enum.enum(T)).
:- mode foldr((pred((builtin.in), (builtin.di), (builtin.uo)) is det), (builtin.in), (builtin.di), (builtin.uo)) is det.
:- mode foldr((pred((builtin.in), (builtin.in), (builtin.out)) is det), (builtin.in), (builtin.in), (builtin.out)) is det.
:- mode foldr((pred((builtin.in), (builtin.in), (builtin.out)) is semidet), (builtin.in), (builtin.in), (builtin.out)) is semidet.
:- mode foldr((pred((builtin.in), (builtin.in), (builtin.out)) is nondet), (builtin.in), (builtin.in), (builtin.out)) is nondet.
:- mode foldr((pred((builtin.in), (builtin.di), (builtin.uo)) is cc_multi), (builtin.in), (builtin.di), (builtin.uo)) is cc_multi.
:- mode foldr((pred((builtin.in), (builtin.in), (builtin.out)) is cc_multi), (builtin.in), (builtin.in), (builtin.out)) is cc_multi.
:- pred foldr2(pred(T, U, U, V, V), tree_bitset.tree_bitset(T), U, U, V, V) <= (enum.enum(T)).
:- mode foldr2((pred((builtin.in), (builtin.di), (builtin.uo), (builtin.di), (builtin.uo)) is det), (builtin.in), (builtin.di), (builtin.uo), (builtin.di), (builtin.uo)) is det.
:- mode foldr2((pred((builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)) is det), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)) is det.
:- mode foldr2((pred((builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is det), (builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is det.
:- mode foldr2((pred((builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is semidet), (builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is semidet.
:- mode foldr2((pred((builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is nondet), (builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is nondet.
:- mode foldr2((pred((builtin.in), (builtin.di), (builtin.uo), (builtin.di), (builtin.uo)) is cc_multi), (builtin.in), (builtin.di), (builtin.uo), (builtin.di), (builtin.uo)) is cc_multi.
:- mode foldr2((pred((builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)) is cc_multi), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)) is cc_multi.
:- mode foldr2((pred((builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is cc_multi), (builtin.in), (builtin.in), (builtin.out), (builtin.in), (builtin.out)) is cc_multi.
:- func from_set(set.set(T)) = tree_bitset.tree_bitset(T) <= (enum.enum(T)).
:- func init = tree_bitset.tree_bitset(T).
:- func insert(tree_bitset.tree_bitset(T), T) = tree_bitset.tree_bitset(T) <= (enum.enum(T)).
:- pred insert(T, tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode insert((builtin.in), (builtin.in), (builtin.out)) is det.
:- func insert_list(tree_bitset.tree_bitset(T), list.list(T)) = tree_bitset.tree_bitset(T) <= (enum.enum(T)).
:- pred insert_list(list.list(T), tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode insert_list((builtin.in), (builtin.in), (builtin.out)) is det.
:- pred insert_new(T, tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode insert_new((builtin.in), (builtin.in), (builtin.out)) is semidet.
:- func intersect(tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) = tree_bitset.tree_bitset(T).
:- pred intersect(tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)).
:- mode intersect((builtin.in), (builtin.in), (builtin.out)) is det.
:- func intersect_list(list.list(tree_bitset.tree_bitset(T))) = tree_bitset.tree_bitset(T).
:- pred intersect_list(list.list(tree_bitset.tree_bitset(T)), tree_bitset.tree_bitset(T)).
:- mode intersect_list((builtin.in), (builtin.out)) is det.
:- pred is_empty(tree_bitset.tree_bitset(T)).
:- mode is_empty((builtin.in)) is semidet.
:- pred is_non_empty(tree_bitset.tree_bitset(T)).
:- mode is_non_empty((builtin.in)) is semidet.
:- pred is_singleton(tree_bitset.tree_bitset(T), T) <= (enum.enum(T)).
:- mode is_singleton((builtin.in), (builtin.out)) is semidet.
:- func list_to_set(list.list(T)) = tree_bitset.tree_bitset(T) <= (enum.enum(T)).
:- pred list_to_set(list.list(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode list_to_set((builtin.in), (builtin.out)) is det.
:- func make_singleton_set(T) = tree_bitset.tree_bitset(T) <= (enum.enum(T)).
:- pred member(T, tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode member((builtin.in), (builtin.in)) is semidet.
:- mode member((builtin.out), (builtin.in)) is nondet.
:- pred remove(T, tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode remove((builtin.in), (builtin.in), (builtin.out)) is semidet.
:- func remove_gt(tree_bitset.tree_bitset(T), T) = tree_bitset.tree_bitset(T) <= (enum.enum(T)).
:- pred remove_least(T, tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode remove_least((builtin.out), (builtin.in), (builtin.out)) is semidet.
:- func remove_leq(tree_bitset.tree_bitset(T), T) = tree_bitset.tree_bitset(T) <= (enum.enum(T)).
:- pred remove_list(list.list(T), tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode remove_list((builtin.in), (builtin.in), (builtin.out)) is semidet.
:- func sorted_list_to_set(list.list(T)) = tree_bitset.tree_bitset(T) <= (enum.enum(T)).
:- pred sorted_list_to_set(list.list(T), tree_bitset.tree_bitset(T)) <= (enum.enum(T)).
:- mode sorted_list_to_set((builtin.in), (builtin.out)) is det.
:- pred subset(tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)).
:- mode subset((builtin.in), (builtin.in)) is semidet.
:- pred superset(tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)).
:- mode superset((builtin.in), (builtin.in)) is semidet.
:- func to_set(tree_bitset.tree_bitset(T)) = set.set(T) <= (enum.enum(T)).
:- func to_sorted_list(tree_bitset.tree_bitset(T)) = list.list(T) <= (enum.enum(T)).
:- pred to_sorted_list(tree_bitset.tree_bitset(T), list.list(T)) <= (enum.enum(T)).
:- mode to_sorted_list((builtin.in), (builtin.out)) is det.
:- func union(tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)) = tree_bitset.tree_bitset(T).
:- pred union(tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T), tree_bitset.tree_bitset(T)).
:- mode union((builtin.in), (builtin.in), (builtin.out)) is det.
:- func union_list(list.list(tree_bitset.tree_bitset(T))) = tree_bitset.tree_bitset(T).
:- pred union_list(list.list(tree_bitset.tree_bitset(T)), tree_bitset.tree_bitset(T)).
:- mode union_list((builtin.in), (builtin.out)) is det.
