A tactic pushing negations into an expression #
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.
contrapose
turns a goalP → Q
into¬ Q → ¬ P
contrapose!
turns a goalP → Q
into¬ Q → ¬ P
and pushes negations insideP
andQ
usingpush_neg
contrapose h
first reverts the local assumptionh
, and then usescontrapose
andintro h
contrapose! h
first reverts the local assumptionh
, and then usescontrapose!
andintro h
contrapose h with new_h
uses the namenew_h
for the introduced hypothesis
#push_neg
command #
A user command to run push_neg
. Mostly copied from the #norm_num
and #simp
commands.
The syntax is #push_neg e
, where e
is an expression,
which will print the push_neg
form of e
.
#push_neg
understands local variables, so you can use them to
introduce parameters.