Discrete math library