Did God use a mathematical optimisation function? I don’t know. I don’t believe many parts of Christianity claim to know how exactly God created the world.
Did He create the best possible world?
Following Leibniz on this, if you believe, as most Christian denominations teach I think, that God is both omnipotent and all good, all love, then it would be a logical conclusion to assume that this world, this creation of His, is the best possible.
The more interesting questions remain however.
- What is exactly “the best”? By what criteria do you measure the goodness of creation? How would you be able to say anything sensible about that? In the book Ecclesiasticus (part of the Catholic canon of the Bible), chapter 39 you will find the words:
Non est dicere: “ Hoc illo nequius est ”: omnia enim in tempore suo comprobabuntur.
in the translation I found online ( https://www.catholic.org/bible/book.php?bible_chapter=39&id=28 ) it says
You must not say, "This is worse than that," for, sooner or later, everything proves its worth.
So, at least for catholics, there is a foundation in holy Scripture for the notion that even what we may see as “not good” in the end is “good”.
How can this be, as there evidently is evil in the world? Why would we need a Saviour if there is nothing to save us from?
You could find an indication for an answer to this riddle in the word of the Exultet, the Easter Proclamation to be sung by the deacon at the Easter Vigil. It contains the words
O felix culpa, quæ talem ac tantum méruit habére Redemptórem!
or in translation:
O happy fault that earned for us so great, so glorious a Redeemer!
What this might tell you, is that in some, maybe mysterious or strange for us simple mortals, way, even our fall to sin was better than when that hadn’t happen.
So yes, we can see evil, sin, wrong in the world. And still we may, or even should, keep faith that this is the utterly good creation of our dear Lord.
- What is “possible”?
If we say that God is omnipotent, surely anything is possible for Him? And if we say this world is the best possible, aren’t we saying that a better world would have been impossible? Doesn’t that lead us to the only logical conclusion that God is in fact not omnipotent?
It may look that way, but there are two ways out of this matter.
First, there is no reason to assume that God in all His might, is able to do something that is logically impossible. Can God create a stone that is too heavy for God to lift? A simple riddle that may distract a believer for a second, but soon enough one will see that the question is the problem, not the answer. The thing is that God is not limited by anything part of His own creation, so the laws of physics do not apply to Him. What we call a miracle, is just as easy for Him as anything else. But logic is not something created. Can God do what God cannot do? No. Just as simple as that. Do we know what exactly He cannot do? Maybe not. But we can assume that a better world than the world just isn’t logically possible. For if it had been, He would have created it and not this one.
Second, we must be aware of a logical mistake we make easily. If we say this is the best possible world (even if we don’t understand it and don’t understand in what way it is the best) we may assume that a better world may not be possible, but would be imaginable. That would lead to the conclusion that God was not able to create that better world, and so He is not omnipotent, as He failed to create the better world imaginable. But is that assumption valid? Could we, or at least He, imagine a better world than this one? No, we cannot. We can name different details and aspects of the world we would like to improve, but would it improve the entire creation? Are we in any position to make bold statements like that? God answered Job rather clearly when Job seemed to suggest he was:
Where were you when I laid the earth's foundations? Tell me, since you are so well-informed! Who decided its dimensions, do you know? Or who stretched the measuring line across it?
(and so on, interesting read, chapter 38 of the book of Job!)
I do believe one shouldn’t try to understand the position of Leibniz in such a way that God becomes a utilitarian mathematician. Rather I would suggest to understand his position as an affirmation that we can logically trust our dear Lord to have created all to be the best, as we could already trust Him based on holy Scripture and the teachings of Jesus Christ. Even if we see bad, sin, evil, we still can and must trust God. Yes, even if we see evil things happening as “acts of God”, we still can and must trust God.