Mathematics with perfect curves