The Cambridge Analytica scandals have made it obvious that some people’s votes can be predicted and manipulated by knowing their emotional triggers. But new research suggests that the way people think, in apparently unemotional ways, is also a reliable predictor of political attitudes, and in particular, of nationalism and enthusiasm for Brexit.

Leor Zmigrod, a Cambridge University psychologist, set out to investigate whether a preference for clear categories in thought mapped on to a preference for clear national boundaries and precise, exclusionary definitions of citizenship. Instead of relying on self-reported habits of thought, as previous surveys have done, she had participants (who were not students) take part in some standard psychological tests. One of them tested how easy it is for participants to adapt to changes in the rules of the game they are playing; the other is a test of the ability to associate words and ideas across different contexts, so that it works as a measurement of cognitive flexibility, or woolly-mindedness, as the more rigid would no doubt say.

Even with a reasonably small sample of about 330, the differences that appeared were large and startling. In particular, her team found that less cognitive flexibility correlated strongly with “positive feelings toward Brexit and negative feelings toward immigration, the European Union, and free movement of labour”. This not to say that there is anything abnormal about people on either side of the question. There is a lot of normal variation in temperament and imagination among perfectly healthy and sane people, even those who disagree with us. But it is still extraordinary to think that some political differences can quite reliably be traced to cognitive ones which seem to have no connection with politics at all.

One of the strongest links was between cognitive flexibility, as measured by these two tests, and disagreement with Theresa May’s statement that “a citizen of the world is a citizen of nowhere”.

A March for Europe, through the centre of London in July 2016. Photograph: Alamy

These cognitive styles do not work directly on attitudes to Brexit, says Zmigrod. They predispose people to wider ideological attitudes, and those in turn determine the attitudes people took to the referendum. And the test results she found work differently to each other: in particular, nationalism and authoritarianism were very strongly predicted by a preference for fixed rules and categories, whereas political conservatism (as self-reported) was influenced by an inability to take words out of familiar contexts and make fresh connections between them (which the second test measures).

Nonetheless, the correlation between the style in which people think and the way that they voted was very much stronger than any of the other factors in the sample: controlling for class, age and sex only changed the results by 4%, although there was a strong, and possibly related, correlation with the length of time in education.

“The way the brain constructs internal boundaries between conceptual representations and adapts to changes in environmental contingencies has been shown here to be linked to individuals’ desire for external boundaries to be imposed on national entities and for greater homogeneity in their cultural environment. Information-processing styles in relation to perceptual and linguistic stimuli may also be drawn upon when dealing with political and ideological information,” she writes.

What this suggests to me is that some kinds of political argument are going to be literally interminable. Obviously this isn’t true of any particular issue. Even the question of our relations with Europe will be settled some time before the heat death of the universe. But it may be replaced by something else which arouses the same passions and splits the population in the same way, because the cognitive traits she is analysing are all part of the normal variation of humanity.

Despite what you learn on the internet, the people who disagree with you about Brexit do not all have something terrible wrong with their brains. Progress is not necessarily on our side. Nor is it even on the other side. One of the underlying tendencies of political argument at the moment is that both left and right expect the other side to be proved conclusively wrong by history – either to be swept away by progress or to be destroyed by the return of traditional reality. But if ideologies arise in part from differences in cognitive style which are evenly distributed through the population, the war between progress and reaction will continue for as long as humanity does.

• Andrew Brown is a Guardian leader writer