A formal investigation -- governed by court rules -- that is conducted before trial by both parties. Discovery allows each party to question the other parties, and sometimes witnesses. The most common types of discovery are interrogatories, consisting of written questions the other party must answer under penalty of perjury; depositions, at which one party to a lawsuit has the opportunity to ask oral questions of the other party or witnesses under oath while a written transcript is made by a court reporter; and requests to produce documents, by which one party can force the other to produce physical evidence. Parties may also ask each other to admit or deny key facts in the case. Discovery allows parties to assess the strength or weakness of an opponent's case, in order to support settlement talks and also to be sure that the parties have as much knowledge as possible for trial. Discovery is also present in criminal cases, in which by law the prosecutor must turn over to the defense any witness statements and any evidence that might tend to exonerate the defendant. Depending on the rules of the court, the defendant may also be obliged to share evidence with the prosecutor.