I once had a cat, he was a lovely big, strong beautiful cat. I found him one day working out how electricity came from the socket in the wall, down a cable, and activated the kettle to make the water boil. He watched the kettle boil, then shut off, then he directed his gaze all along the wire, to the plug, and socket. He gazed at this a while, then down the wire again, and stared at the kettle. There is no doubt in my mind that he was working this out in what appeared (to me) to be a "mental" kind of way.
I used to joke that he was not a cat but an electrician in a new incarnation!