Cognitive and affective components of undergraduate students learning how to prove