mathematical definition of a triangle