Muhammad Wrote and Compiled the Quran

All in all, with the help of the two before-mentioned ayahs (21:104 and 96:4) which direct us to contemplate on the issue painstakingly, we can infer that the Quran had already been written and compiled as a book in the time of the prophet. It was the book sent by God, and its receivers and believers would later be obliged to pay some big prices just because of their loyalty to the message of the God. For instance, they would later be forced to leave their lands, be threatened with their lives. So then, is it something reasonable to think that those people acted such negligently and did not compiled the message for which they ventured to be killed?