The castle of Montelupo that Leonardo depicted in his different maps of the Arno Valley was born as a Florentine stronghold on the borderline formed by the River Arno. At the beginning of the 13th century, Florence, intending to expand its territory beyond that boundary, set out to build a castle ex novo on the left bank of the Arno, the Florentine shore, right in front of the fortress of Capraia, an ancient castle of the noble Alberti family, which was on the opposite bank, in the territory of Pistoia. The history of Montelupo is thus closely linked to that of Capraia, which was, by this time, at the beginning of the 13th century, part of the districtus of Pistoia, and functioned as a stronghold for this city on the border with Florence.
Leonardo had the opportunity to observe the different geological formations that characterized the hills overlooking the Arno. His reflections revolved around the idea that they were formed by the retreating waters of the sea that, in ancient times, reached La Golfolina, where it received the waters of the Arno. According to Leonardo, the movement of the sea waters modeled the lithic material, which the rivers discharged into the ancient sea, giving rise to geological layers of different composition, from coarsest to finest, namely, ghiara minuta (minute gravel), rena (sand), and lastly, fango (mud). The retreat of the waters of the Pliocene sea must have left the coarser and heavier deposits along the ancient shores situated farther upstream, and the finer and lighter, along the banks farther downstream. Leonardo observed, and explained in this way, the presence of "very large stones" and "gravel" around Montelupo and Capraia, the rena (sand), even finer, toward Castelfiorentino, and lastly, finally the fango (mud), the thinnest and lightest, at Collegonzi (Codex Leicester, f. 6A-31v; 8B-8v).
.