Quadratic categories and square rings