mental ability

noun

1.
the power to learn or retain knowledge; in law, the ability to understand the facts and significance of your behavior