[Math] In what ways did Leibniz’s philosophy foresee modern mathematics

ho.history-overviewmathematical-philosophynonstandard-analysissoft-question

Leibniz was a noted polymath who was deeply interested in philosophy as well as mathematics, among other things. From my mathematical readings I have the impression that Leibniz's stature as a mathematician has grown in the last fifty years as some of his philosophically oriented mathematical ideas have connected with modern mathematicians and mathematics. That because of Leibniz's philosophical reflections, he foresaw aspects or parts of modern mathematics. Can anyone elaborate on these connections and recommend any references?

EDIT, Will Jagy. Editing mostly to bump this to the front of active. It is evident that Jacques and Sergey have good, substantial answers in mind. Please do not answer unless you have read Leibniz at length. I kind of liked philosophy in high school and college, or thought I did. Recently, I read one page of Spinoza and gave up.

Best Answer

Abraham Robinson explicitly referred to Leibniz's idea of infinitesimal quantities when developing non-standard analysis in 1960's. Wikipedia article has a quotation from his book Robinson, Abraham (1996). Non-standard analysis (Revised edition ed.). Princeton University Press. ISBN 0-691-04490-2.

Added: the idea of expressing logic in an algebraic way is credited to Leibniz; see e.g. the following article in Stanford Encyclopedia of Philosophy:

http://plato.stanford.edu/entries/leibniz-logic-influence/#DisLeiMatLog

Added: Saul Kripke introduced a semantics of possible worlds (really, relational semantics) for modal logic. http://en.wikipedia.org/wiki/Modal_logic#Semantics

The idea of possible worlds precedes Leibniz, but he devoted a lot of consideration to it. Ironically, his claim that our existing world is the best out of possible ones is perhaps most known from the ridicule it received in Voltaire's "Candide". Oh wait, this is Math Overflow...