I don't think that I agree that all physical phenomena reduce down to math and algorithms and laws. Scientific descriptions of physical phenomena often seem to take mathematical form, especially in physics. But our descriptions of physical reality shouldn't be confused with the physical realities that they describe. As to why and how mathematics applies to reality, and the extent to which reality itself embodies mathematics, those are among the most profound mysteries still outstanding. We don't even have a good explanation of what mathematics is at this point. I don't know of any persuasive reason to move beyond recognition of those mysteries to the belief that reality is merely a "simulation". But yeah, as you note in the drawing of the 'cave' analogy from the 'Republic', Plato did make that kind of argument. His idea derived from the common ancient belief that true realities must be unchanging and eternal. The Pythagoreans had already turned Greek intellectuals on to the idea that the structure of reality is fundamentally mathematical. So Plato decided that true reality must be a transcendental world of unchanging mathematical forms, relationships and theorems, and the world of constant flux and change that we observe is a lesser image of that higher world of forms projected onto the chaos of matter. Again, we need to be careful about equating our conceptual descriptions of reality with the reality described. Suppose that the Pythagoreans were right that reality is essentially mathematical. How does that imply that it's a simulation of something else? Aristotle basically made that point against Plato. Aristotle recognized the reality of forms, which we might equate Pythagorean-style to the mathematical structure of reality. But unlike Plato, Aristotle believed that the mathematical forms of things were part of the things themselves, part of what this reality ontologically consists of. Aristotle didn't take the additional Platonic step to the belief that this had to be a projection of some imagined higher unchanging world of eternal forms. That sounds like the 'demiurge' (craftsman) from Plato's Timaeus, the imagined creator that used the unchanging mathematical forms so as to shape a functional world. But that idea isn't entirely consistent. If the higher reality is an eternal world of unchanging mathematical form, then where does the demiurge come from and where does it reside? Presumably it changes over time so as to act. That kind of thinking led the later Platonists to the idea of a whole hierarchy of higher and lower planes of being. In my opinion, the craftsman is another questionable assumption, the idea that there must be some supernatural Intelligence that's responsible for the existence of the reality we observe around us. If we are going to make that creationist/intelligent-design assumption, then why not call the universe-creating Intelligence "God"? Traditionally, that's what it's been called, in the West at least. That's why I said that this 'simulation' idea looks like another argument for the existence of God. The more explicitly religious middle Platonists around the time of Christ (along with Jewish Platonist thinkers like Philo of Alexandria) tended to imagine Plato's world of eternal unchanging forms as eternal ideas in the mind of a monotheistic God. These ideas could be expressed in God's 'logos', by the meaning inherent in his 'word', as he spoke reality into existence as the Jews taught. The spoken divine logos kind of became the connection between the remote God in heaven and this world, the thing that flowed out from God on high to shape and form this material universe. (Just as edicts flowed out from the mouth of an ancient god-king, creating legal realities that shaped life in his kingdom.) And as early as the beginning of the gospel of John, we see that idea being identified with the person of Jesus.