mathematics. In this way, he became acquainted with Isaac Beeckman, the principal of a Dordrecht school, for whom he wrote the Compendium of Music (written 1618, published 1650). Together, they worked on free fall, catenary, conic section, and fluid statics. Both believed that it was necessary to create a method that thoroughly linked mathematics and physics. While in the service of the Catholic Duke Maximilian of Bavaria from 1619, Descartes was present at the Battle of the White Mountain near Prague, in November 1620. According to Adrien Baillet, on the night of 10–11 November 1619 (St. Martin's Day), while stationed in Neuburg an der Donau, Descartes shut himself in a room with an "oven" (probably a cocklestove) to escape the cold. While within, he had three dreams, and believed that a divine spirit revealed to him a new philosophy. However, it is speculated that what Descartes considered to be his second dream was actually an episode of exploding head syndrome. Upon exiting, he had formulated analytic geometry and the idea of applying the mathematical method to philosophy. He concluded from these visions that the pursuit of science would prove to be, for him, the pursuit of true wisdom and a central part of his life's work. Descartes also saw very clearly that all truths were linked with one another, so that finding a fundamental truth and proceeding with logic would open the way to all science. Descartes discovered this basic truth quite soon: his famous "I think, therefore I am." Career France In 1620, Descartes left the army. He visited Basilica della Santa Casa in Loreto, then visited various countries before returning to France, and during the next few years, he spent time in Paris. It was there that he composed his first essay on method: Regulae ad Directionem Ingenii (Rules for the Direction of the Mind). He arrived in La Haye in 1623, selling all of his property to invest in bonds, which provided a comfortable income for the rest of his life. Descartes was present at the siege of La Rochelle by Cardinal Richelieu in 1627. In the autumn of that year, in the residence of the papal nuncio Guidi di Bagno, where he came with Mersenne and many other scholars to listen to a lecture given by the alchemist, Nicolas de Villiers, Sieur de Chandoux, on the principles of a supposed new philosophy, Cardinal Bérulle urged him