Did God Create Evil?
Yes. The verse describes it: فالھمھا فجورھا و تقواھا
To be written does not mean to be ordained. The knowledge of God does not determine a course of action. What people do, God knows, it is not the other way around that since God knows, so the people do.