Gottfried Leibniz named his metaphysics the system of pre-established harmony, which presupposed the ontological argument. The ontological argument resulted in pantheism. The law of continuity applies what is true of God to every substances, which resulted in monadology. The principle of sufficient reason prompts us to ask why this universe exists, which resulted in optimism. Leibniz thought God is intelligent enough to know the best of all possible universes, benevolent enough to select it and powerful enough to realize it as the existing one, but this being is more than the mere amount of universes whose existence alone the ontological argument can prove. We cannot identify them and apply the system of pre-established harmony to our cognition, benevolence and fulfillment, because we experience mistake, evil and failure.
1. Three aspects of pre-established harmony
Although the philosophy of Gottfried Leibniz is often referred to as monadology, he had never used this term. Instead, he identified himself as “the author of the system of pre-established harmony (l’auteur du système de l’harmonie préétablie)". For him arguments about monads are just preliminary arrangements for his system of pre-established harmony and not the ultimate goal of his metaphysics. In this article, using “the system of pre-established harmony" as the proper name of his metaphysics, I elucidate its three aspects, namely pantheism based on the ontological argument, monadology based on the law of continuity and optimism based on the principle of sufficient reason so as to clarify why Leibniz advocated the system. Then I point out its problem.
2. Pantheism based on the ontological argument
Leibniz defines God as follows to apply the ontological argument.
God is absolutely perfect and perfection is nothing but the magnitude of positive reality, taken in the precise sense of leaving aside the limits or bounds in things that have them
According to Leibniz God is complete in possessing positive reality and must “contain as much reality as is possible “. The “reality (réalités)" stems from “thing (res)" in Latin, by which Leibniz meant not only existing things but also possible things. So, Leibniz’s God is not identical to the existing universe. He wrote, there is an infinite number of possible universes in the Ideas of God" , which indicates his God not only includes existing universe but also all possible universes. At this point his pantheism is different from usual pantheism that identifies God with the existing universe.
Leibniz was originally a mathematician and, as mathematics deals with possible worlds, he probably thought God would be incomplete if He did not include possible universes. In his article in 1696, “Surprising expression of all numbers by means of 1 and o, representing the origin of things by God and nothingness or the mystery of the Creation“, Leibniz connected the binary number system with the genesis by God: since every number can be expressed by means of 1 and o, everything consists of not God and materials but God and nothingness. If you interpret 1 (unity) as “positive reality" and 0 (zero) as nothingness, you will make out the binary implication of his assertion that God has the unlimited magnitude of positive reality and there is nothing outside God.
In Monadology, Leibniz’s late representative work of metaphysics in 1714, he wrote, “God alone is the primary unity" , identifying God with the primary source of 1. Here he called what he had called “metaphysical point" and so on before Surprising expression of all numbers by means of 1 and o in 1696 “monad", which stems from a Greek word “μονάς" meaning 1 or unity. Thus he regarded all the creatures as unities derived from the primary unity of God.
While Leibniz defined God as omnipresence in terms of the ontological argument, he also respected the other traditional Christian definitions of God as omniscience, omnipotence and omnibenevolence. The property of omniscience presupposes that God has the cognitive power. How can omnipresent God have cognizance of objects? We usually think of cognition as acquiring information on the objects outside our consciousness through a window. If God were to know objects in this way, it should be against the ontological argument, because there would be objects to be known outside God and God would not be omnipresence. As God must “contain as much reality as is possible", God should not have any window for cognition and His cognition must always be self-reflection.
3. Monadology based on the law of continuity
Another aspect to understand the system of pre-established harmony is monadology based on the law of continuity. Leibniz is along with Isaac Newton the inventor of infinitesimal calculus and, since a function must be continuous to be differentiable, he postulated the following law of continuity as an axiom of his metaphysics.
When the cases (or what is given) approach continuously and at last overlap each other, the consequences or events (or what is asked) must do it as well.
This formula is neither clear nor strict, but the example using an ellipse and a parabola that Leibniz gave to explain the law of continuity is easy to understand. So, let me introduce it. The graph below presents an ellipse in blue whose foci are F1 (0,1) and F2 (0,f) = (0,3).
As the value of “f" approaches infinity, the blue ellipse gets infinitely close to the red parabola. Now that the ellipse can approach the parabola continuously, we can apply the law of continuity to it: what is true of the ellipse is also true of the parabola. For example, any beam emitted from F2 reflects the ellipse mirror and converges on F1. Provided that F2 lies at infinity, the beam from F2 can be considered to be parallel to Y-axis and therefore converges on F1.
Although this is not what Leibniz wrote, we can also say that the blue ellipse infinitely approaches the green circle, as the value of “f" gets infinitely close to 1. Now that the ellipse can approach the circle continuously, we can apply the law of continuity to it: what is true of the ellipse is also true of the circle. As for the previous example, two foci merge together into a center of the circle and any beam emitted from the center reflects the circle mirror and converges back on it.
Parabolas, ellipses and circles are usually considered to be different in kind but the law of continuity tells us that this is not the case. Here assign these three figuratively to God, humans and non-human creatures respectively. The limit of an ellipse is a parabola as the distance between foci approaches infinity and the limit of an ellipse is a circle as the distance between foci approaches zero. Likewise the limit of humans is God as the completeness of human cognition approaches infinity and their limit is lifeless creatures as the completeness of human cognition approaches zero. Still these three substances of cognition are equal in that they are unities or what Leibniz called monads.
A monad is “a simple substance, which enters into compounds, and 'simple’ means 'without parts’“, so that “there can be neither extension nor figure nor divisibility " . This explanation might lead you to take it for a physical atom, but as the current science shows, an atom has extension, figure and divisibility. Leibniz distinguished monads as metaphysical points or those of substance from physical points and mathematical points.
Thus physical points are only indivisible in appearance; mathematical points are so in reality but they are merely modalities ; only metaphysical points or those of substance (constituted by forms or souls) are exact and real
As this quotation indicates, forms or souls constitute metaphysical points or those of substance. According to Leibniz, spirits as rational souls are more complete and therefore more near to God than other souls and forms in general.
This is why God governs spirits as a prince governs his subjects, and even as a father cares for his children; while he disposes of the other substances as an engineer manipulates his machines.
Though there is a hierarchy of substances in order of completeness that consists of God, human spirits, souls of animals and forms of things in general, they as the same monads and the same substances are continuous just like parabolas, ellipses and circles. Following the law of continuity, we must think that what is true of God is also true of the other substances. Since God has nothing outside Him, He has no windows to interact with the outside. So are the other substances.
The Monads have no windows, through which anything could come in or go out. 
The cognition of God is not the copy of the outside but the expression of Himself. Nor is our cognition the copy of the outside but the expression of God Himself. Leibniz wrote, “no external cause acts upon us excepting God alone" and “there is absolutely no other external object which comes into contact with our souls and directly excites perceptions in us." The expression of the universe on monads becomes incomplete, that is to say, perspectively distorted in the order corresponding to human spirits, souls of animals and forms of things in general. They still express the same entire universe and therefore called “a perpetual living mirror of the universe."
A monad is a unit in that it expresses the coherent and therefore unified university, while the expressed universe is diverse.
The passing condition, which involves and represents a multiplicity in the unit or in the simple substance, is nothing but what is called Perception, which is to be distinguished from Apperception.
Leibniz’s metaphysics is different from that of Descartes in acknowledging animal souls or forms in general having perception, although he considered it quite different from apperception of human spirits. The Cartesian dualism of thought and extension resulted in the so-called mind-body problem. Descartes regarded pineal gland as the window through which the soul and the body interacted, while Leibniz denied the window and tried to solve the mind-body problem through the approach of mentalism.
If “a particular substance never acts upon another particular substance" , how can human spirits can control their bodies, as they will?
The soul follows its own laws, and the body likewise follows its own laws; and they agree with each other in virtue of the pre-established harmony between all substances, since they are all representations of one and the same universe. 
This is what Leibniz called pre-established harmony. This harmony is analogous to that of activity existing between two independent clocks whose ticking is perfectly synchronized without causal interaction and interference. If it were not for the pre-established harmony between monads, there would be no harmony in God that includes all monads, but it is contradictory to the definition of God as the infinitely complete being. Thus we can see that Leibniz’s system of pre-established harmony is founded on the omnipresence of God defined by the ontological argument.
4. Optimism based on the principle of sufficient reason
Leibniz called the principle of contradiction and the principle of sufficient reason the two great principles. The principle of sufficient reason (principe de la raison suffisante) is such that"there can be no fact real or existing, no statement true, unless there be a sufficient reason, why it should be so and not otherwise" .
Corresponding to the two principles, there are also two kinds of truths: those of reasoning and those of fact. Truths of reasoning are necessary and their opposite is impossible, while truths of fact are contingent and their opposite is possible. The former are justified by the principle of contradiction and the latter the principle of sufficient reason. To stop the search for reasons of the latter from plunging into regressus ad infinitum, the final reason must be in a necessary substance whose reason you cannot find any longer. Leibniz thought it must be God.
This is a cosmological argument for the existence of God. Since Leibniz used the ontological argument as well, God cannot be confined to the mere first cause that does not include the subsequent events. His ontological argument defines God as the substance that includes not only the entire existing universe but also all possible universes. He must have the sufficient reason He selected this universe rather than other possible ones.
Leibniz believed that God had selected the best of all possible universes and realized it, because He has omniscience, omnibenevolence and omnipotence. So, “the actual existence of the best that wisdom makes known to God is due to this, that His goodness makes Him choose it, and His power makes Him produce it. ." This doctrine is called optimism (optimisme).
According to Leibniz, optimism is a kind of theory of pre-established harmony.
As we have shown above that there is a perfect harmony between the two realms in nature, one of efficient, and the other of final causes, we should here notice also another harmony between the physical realm of nature and the moral realm of grace, that is to say, between God, considered as Architect of the mechanism of the universe and God considered as Monarch of the divine City of spirits.
His optimism incurred disrepute in those days: Why can we say that this world is the best of all possible worlds, although this world obviously has so much evil? He retorted that the world with a little evil is better than that without it, because it helps us appreciate good.
A little acid, sharpness or bitterness is often more pleasing than sugar; shadows enhance colours; and even a dissonance in the right place gives relief to harmony. We wish to be terrified by ropedancers on the point of falling and we wish that tragedies shall well-nigh cause us to weep. Do men relish health enough, or thank God enough for it, without having ever been sick? And is it not most often necessary that a little evil render the good more discernible, that is to say, greater?
It was natural that Leibniz should not exclude evil from God. If he had attributed good to God and evil to non-God, his theory would have been morally rational and easily accepted, but then he would have been obliged to admit that God had what is not God outside Himself, which contradicts the omnipresence of God postulated by the ontological argument.
5. Problems of the theory of pre-established harmony
The preceding analysis has clarified that Leibniz’s theory of pre-established harmony presupposes pantheism resulting from the ontological argument. Generally speaking, the being whose existence the ontological argument demonstrates has omnipresence but it is different from the Christian god that has omniscience, omnibenevolence and omnipotence. Leibniz thought God is intelligent enough to know the best of all possible universes, benevolent enough to select it and powerful enough to realize it as the existing one, but this being is more than the mere amount of universes whose existence alone the ontological argument can prove.
If omniscience just meant that the universe expresses itself as it is and if omnipotence just meant that the exiting universe is different from possible universes, then we could safely say that the being whose existence the ontological argument demonstrates had omniscience and omnipotence. Such a way of cognition and fulfillment, however, is different from that of us humans.
Leibniz supposes the monads as human spirits mirror the entire universe as God does and their intentions are fulfilled owing to the pre-established harmony of God. The fact is that what we regard absolutely true often turns out to be false and what we intend to fulfill absolutely ends in a failure. The theory of preformation that Leibniz believed in is today considered to be false and his attempt at Catholic-Protestant Reconciliation failed. If the harmony is not always pre-established in this way, doesn’t it follow that God contains contradiction in Himself?
Maybe Leibniz might defend his theory of pre-established harmony in the way to defend his optimism: if what we perceive is always true, we cannot appreciate the truth, so God often makes us make an error to maximize the value of the truth or if what we intend is always fulfilled, we cannot appreciate the fulfillment, so God often makes us experience failure to maximize the value of success. Such an explanation is arbitrary and not persuasive, because it just confirms the present situation.
In fact, we can draw the conclusion contrary to optimism by the same logic: it is not God but the Devil that governs this universe, that is to say, He chooses the worst of all possible universes and mingles evil with a little good in the chosen universe so as to awaken futile expectations in people and maximize their suffering from disappointment.
Leibniz founded a system of pre-established harmony on omnipresence of God resulting from the ontological argument. Descartes also adopted the ontological argument but unlike Leibniz he did not seriously examine how God knows or how He fulfills his intention. Leibniz is worth praising in trying to construct a coherent system of metaphysics based on the ontological argument, but as the presupposition is wrong, the more consistent with the presupposition he tried to make his theory, the more grotesque his metaphysics becomes. In such a case, radical doubt on the presupposition instead of making makeshift modifications to it is necessary.
- “Dieu est absolument parfait ; la perfection n’étant autre chose que la grandeur de la réalité positive prise précisément, en mettant à part les limites ou bornes dans les choses qui en ont." Gottfried Leibniz. Monadologie. §. 41.
- “contenir tout autant de réalités qu’il est possible" Gottfried Leibniz. Monadologie. 1re édition en 1720 (édition posthume). §. 40.
- “il y a une infinité d’univers possibles dans les idées de Dieu" Gottfried Leibniz. Monadologie. 1re édition en 1720 (édition posthume). §. 53.
- Gottfried Leibniz. “Mira numerorum omnium expressio per 1 et 0, repraesentans rerum originem ex Deo et Nihilo, seu Mysterium creationis." in Die philosophischen Schriften. Vol. 6 ed. Karl Immanuel Gerhardt.
- “Dieu seul est l’unité primitive" Gottfried Leibniz. Monadologie. 1re édition en 1720 (édition posthume). §. 47.
- “Lorsque les cas (ou ce qui est donné) s’approchent continuellement et se perdent enfin l’un dans l’autre, il faut que les suites ou événements (ou ce qui est demandé) le fassent aussi." Gottfried Leibniz. “Lettre de M. L. sur un principe general utile à l’explication des loix de la nature par la consideration de la sagesse divine, pour servir de replique à la reponse du R. P. Malebranche." in Die philosophischen Schriften: Band III . p. 52.
- “une substance simple, qui entre dans les composés ; simple, c’est-à-dire sans parties" Gottfried Leibniz. Monadologie. 1re édition en 1720 (édition posthume). §. 1.
- “il n’y a ni étendue ni figure, ni divisibilité possible" Gottfried Leibniz. Monadologie. 1re édition en 1720 (édition posthume). §. 3.
- “Ainsi les points physiques ne sont indivisibles qu’en apparence: les points mathématiques sont exacts, mais ce ne sont que des modalités: il n’y a que les points métaphysiques ou de substance (constitués par les formes ou âmes) qui soient exacts et réels." Gottfried Leibniz. Système nouveau de la nature et de la communication des substances. 27 juin 1695. §. 11.
- “C’est pourquoi Dieu gouverne les Esprits, comme un Prince gouverne ses sujets, et même comme un père a soin de ses enfants ; au lieu qu’il dispose des autres substances, comme un Ingénieur manie ses machines." Gottfried Leibniz. Système nouveau de la nature et de la communication des substances. 27 juin 1695. §. 5.
- “Les Monades n’ont point de fenêtres par lesquelles quelque chose y puisse entrer ou sortir." Gottfried Leibniz. Monadologie. 1re édition en 1720 (édition posthume). §. 7.
- “il n’y a point de cause externe qui agisse sur nous, excepté Dieu seul" Gottfried Leibniz. Discours de métaphysique. 1686. §. 28.
- “il n’y a point d’autre objet externe qui touche notre âme et qui excite immédiatement notre perception" Gottfried Leibniz. Discours de métaphysique. 1686. §. 28.
- “un miroir vivant perpétuel de l’univers" Gottfried Leibniz. Monadologie. 1re édition en 1720 (édition posthume). §. 56.
- “L’état passager qui enveloppe et représente une multitude dans l’unité ou dans la substance simple n’est autre chose que ce qu’on appelle la Perception, qu’on doit distinguer de l’aperception ou de la conscience." Gottfried Leibniz. Monadologie. 1re édition en 1720 (édition posthume). §. 14.
- Gottfried Leibniz. L’homme et un traitté de la formation du foetus. 1664. p. 73.
- “une substance particulière n’agit jamais sur une autre substance particulière" Gottfried Leibniz. Discours de métaphysique. 1686. §. 14.
- “L’âme suit ses propres lois et le corps aussi les siennes, et ils se rencontrent en vertu de l’harmonie préétablie entre toutes les substances, puisqu’elles sont toutes des représentations d’un même univers." Gottfried Leibniz. Monadologie. 1re édition en 1720 (édition posthume). §. 78.
- Gottfried Leibniz. “Considérations sur les Principes de Vie, et sur les Natures Plastiques, par l’Auteur du Systeme de l’Harmonie préétablie." in Die philosophischen Schriften. Vol. 6 ed. Karl Immanuel Gerhardt.
- “aucun fait ne saurait se trouver vrai ou existant, aucune énonciation véritable, sans qu’il y ait une raison suffisante pourquoi il en soit ainsi et non pas autrement." Gottfried Leibniz. Monadologie. 1re édition en 1720 (édition posthume). §. 32.
- “c’est ce qui est la cause de l’existence du meilleur que la sagesse fait connaître à Dieu, que sa bonté le fait choisir, et que sa puissance le fait produire." Gottfried Leibniz. Monadologie. 1re édition en 1720 (édition posthume). §. 55.
- “Comme nous avons établi ci-dessus une Harmonie parfaite entre deux règnes naturels, l’un des causes Efficientes, l’autre des Finales, nous devons remarquer ici encore une autre harmonie entre le règne Physique de la Nature et le règne Moral de la Grâce, c’est-à-dire, entre Dieu considéré comme Architecte de la Machine de l’univers, et Dieu considéré comme monarque de la Cité divine des Esprits." Gottfried Leibniz. Monadologie. 1re édition en 1720 (édition posthume). §. 87.
- “Un peu d’acide, d’acre ou d’amer, plaît souvent mieux que du sucre; les ombres rehaussent les couleurs; et même une dissonance placée où il faut, donne du relief à l’harmonie. Nous voulons être effrayés par des danseurs de corde qui sont sur le point de tomber, et nous voulons que les tragédies nous lassent presque pleurer. Goûte-t-on assez la santé, et en rend-on assez grâces à Dieu, sans avoir jamais été malade? Et ne faut-il pas le plus souvent qu’un peu de mal rende le bien plus sensible, c’est-à-dire plus grand?" Gottfried Leibniz. Essais de Théodicée sur la bonté de Dieu, la liberté de l’homme et l’origine du mal. 1710. §. Première partie, 12.