Fermat was fluent in multiple languages, including French and Occitan. Though he was born and raised in Beaumont-de-Lomagne (Occitania), his paternal family was originally from Catalonia:
In the second half of the fifteenth century, the Fermat family apparently emigrated from Catalonia to Beaumont-de-Lomagne...
Pierre de Fermat (1601?-1665): His life ...
The 1999 Routledge grammar Catalan: A Comprehensive Grammar describes four variations in in Catalan with respect to the personal article:
i) En, Na, N'
ii) en, na, n'
iii) en, la, l'
iv) el, la, l'
These have the following distribution: i) is formal literary written style; ii) is Balearic Catalan; iii) is current in Catalonia; iv) is ...
I think palatalization of final s in such environments is the most common outcome, and I wouldn't trust native speakers not versed on linguistics since the difference is not phonemic, let alone represented in spelling.
I also have the feeling that palatalization in nys is clearer than in lls. My s in anys is a downright /ʃ/, but in valls it's so soft that I'...
L’Atles Lingüístic del Domini Català
Here are some self-aware discussions by native speakers noting the phenomenon:
Grup d/Estudi de la Variació Dialectal (GEVaD)
En posició final de mot, la ...