Add filter_diverging function to theorist