I was listening to a lecture by Dr. Shomali and he said something that intrigued me: "Allah does not make 2+2=5 because 2+2=4 is a reality". Mutahhari says the same thing about Allah being bound by justice, that justice is a reality. What are these realities? How is Allah bound to them?

Is it any different from my understanding that Allah is necessarily all wise, and illogical things would be against that wisdom, therefore Allah does not make 2+2=5, rather than Allah cannot make 2+2=5?

We have fundamental principles such as Allah is the most Wise. Knowing this we understand that He would never do anything that is against Wisdom because that would be a deficiency and Allah is without deficiencies because He is Absolute Perfection.

The scholar you mentioned is not limiting Allah by saying He doesn’t have the power to do such and such but rather saying that He would never do such and such thing if it is against wisdom.