Quadratic forms with values in invertible modules