Push negations in the goal of some assumption.
For instance, a hypothesis h : ¬ ∀ x, ∃ y, x ≤ y will be transformed by push_neg at h into
h : ∃ x, ∀ y, y < x. Variables names are conserved.
This tactic pushes negations inside expressions. For instance, given an assumption
h : ¬ ∀ ε > 0, ∃ δ > 0, ∀ x, |x - x₀| ≤ δ → |f x - y₀| ≤ ε)
writing push_neg at h will turn h into
h : ∃ ε, ε > 0 ∧ ∀ δ, δ > 0 → (∃ x, |x - x₀| ≤ δ ∧ ε < |f x - y₀|),
(the pretty printer does not use the abreviations ∀ δ > 0 and ∃ ε > 0 but this issue
has nothing to do with push_neg).
Note that names are conserved by this tactic, contrary to what would happen with simp
using the relevant lemmas. One can also use this tactic at the goal using push_neg,
at every assumption and the goal using push_neg at * or at selected assumptions and the goal
using say push_neg at h h' ⊢ as usual.
Transforms the goal into its contrapositive.
contraposeturns a goalP → Qinto¬ Q → ¬ Pcontrapose!turns a goalP → Qinto¬ Q → ¬ Pand pushes negations insidePandQusingpush_negcontrapose hfirst reverts the local assumptionh, and then usescontraposeandintro hcontrapose! hfirst reverts the local assumptionh, and then usescontrapose!andintro hcontrapose h with new_huses the namenew_hfor the introduced hypothesis