Answer:
In 'The Crucible,' the purpose of irony in Proctor forgetting the commandment against adultery is to emphasize the idea to the readers in understanding the difference between the expectations and the reality/outcome as he actually didn't apply that commandment in his life. He had a love affair with Abigail and therefore, he pretends that he does not remember the commadment preaching not to commit adultery which conveys the readers the distinction between his words and actions.