Text this: Mathematical Foundations of Beta Diversity