Documentation

Mathlib.Tactic.Contrapose

Contrapose #

The contrapose tactic transforms the goal into its contrapositive when that goal is an implication or an iff. It also avoids creating a double negation if there already is a negation.

An option to turn off the feature that contrapose negates both sides of goals. This may be useful for teaching.

theorem Mathlib.Tactic.Contrapose.contrapose₁ {p q : Prop} :
(¬q¬p)pq
theorem Mathlib.Tactic.Contrapose.contrapose₂ {p q : Prop} :
(¬qp)¬pq
theorem Mathlib.Tactic.Contrapose.contrapose₃ {p q : Prop} :
(q¬p)p¬q
theorem Mathlib.Tactic.Contrapose.contrapose₄ {p q : Prop} :
(qp)¬p¬q

Transforms the goal into its contrapositive.

  • contrapose turns a goal P → Q into ¬ Q → ¬ P and it turns a goal P ↔ Q into ¬ P ↔ ¬ Q
  • contrapose h first reverts the local assumption h, and then uses contrapose and intro h
  • contrapose h with new_h uses the name new_h for the introduced hypothesis
Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Transforms the goal into its contrapositive and pushes negations in the result. Usage matches contrapose

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For