The end of Arthur Miller's play The Crucible is one of the most powerful endings in theater. John Proctor's good name is so important to him that he refuses to sign a confession because he grieves over what it would do to his name in the community and how his own children might look upon him. John knows that the community sees his anguish and has heard his confession, but he hangs on to his good name.
Elizabeth is a very intelligent woman, and she knows her husband. She knew that he was committing adultery with Abigail even before he admitted it to her. Elizabeth also knows that John is a good man. She might hang on to feelings of bitterness, anger, and resentment, but Elizabeth knows that John is a good man and that he is trying to make amends. When Elizabeth is asked in court if John committed adultery with Abigail, Elizabeth lies to protect John and his good name in the community. She has no idea that he has already confessed to his sins, and that adds a layer of irony to the entire scene.
Elizabeth's lie to the court is an example of situational irony, as we expect her to tell the truth. Elizabeth has been painted as a Godly and truthful woman, and John admitted to the court that Elizabeth would never lie. We fully expect her to tell the truth, but she lies about John's affair. We know that John has already confessed his relationship with Abigail, but Elizabeth has no such knowledge. Audiences are fully aware of the consequences of Elizabeth telling either the truth or lying, but she is clueless about either outcome.