Section 2.04. Ignorance or Mistake.

 (1) Ignorance or mistake as to a matter of fact or law is a defense if:

  (a) the ignorance or mistake negatives the purpose, knowledge, belief, recklessness or negligence required to establish a material element of the offense;  or

  (b) the law provides that the state of mind established by such ignorance or mistake constitutes a defense.

 (2) Although ignorance or mistake would otherwise afford a defense to the offense charged, the defense is not available if the defendant would be guilty of another offense had the situation been as he supposed.  In such case, however, the ignorance or mistake of the defendant shall reduce the grade and degree of the offense of which he may be convicted to those of the offense of which he would be guilty had the situation been as he supposed.

 (3) A belief that conduct does not legally constitute an offense is a defense to a prosecution for that offense based upon such conduct when:

  (a) the statute or other enactment defining the offense is not known to the actor and has not been published or otherwise reasonably made available prior to the conduct alleged;  or

  (b) he acts in reasonable reliance upon an official statement of the law, afterward determined to be invalid or erroneous, contained in (i) a statute or other enactment;  (ii) a judicial decision, opinion or judgment;  (iii) an administrative order or grant of permission;  or (iv) an official interpretation of the public officer or body charged by law with responsibility for the interpretation, administration or enforcement of the law defining the offense.

 (4) The defendant must prove a defense arising under Subsection (3) of this Section by a preponderance of evidence.

Section 3.09. Mistake of Law as to Unlawfulness of Force or Legality of Arrest;  Reckless or Negligent Use of Otherwise Justifiable Force;  Reckless or Negligent Injury or Risk of Injury to Innocent Persons.

  (1) The justification afforded by Sections 3.04 to 3.07, inclusive, is unavailable when:

    (a) the actor's belief in the unlawfulness of the force or conduct against which he employs protective force or his belief in the lawfulness of an arrest which he endeavors to effect by force is erroneous;  and

    (b) his error is due to ignorance or mistake as to the provisions of the Code, any other provision of the criminal law or the law governing the legality of an arrest or search.

  (2) When the actor believes that the use of force upon or toward the person of another is necessary for any of the purposes for which such belief would establish a justification under Sections 3.03 to 3.08 but the actor is reckless or negligent in having such belief or in acquiring or failing to acquire any knowledge or belief which is material to the justifiability of his use of force, the justification afforded by those Sections is unavailable in a prosecution for an offense for which recklessness or negligence, as the case may be, suffices to establish culpability.

  (3) When the actor is justified under Sections 3.03 to 3.08 in using force upon or toward the person of another but he recklessly or negligently injures or creates a risk of injury to innocent persons, the justification afforded by those Sections is unavailable in a prosecution for such recklessness or negligence towards innocent persons.