Apply the function f
given by e : pexpr
to the local hypothesis hyp
, which must either be
of the form a = b
or a ≤ b
, replacing the type of hyp
with f a = f b
or f a ≤ f b
. If
hyp
names an inequality then a new goal monotone f
is created, unless the name of a proof of
this fact is passed as the optional argument mono_lem
, or the mono
tactic can prove it.
Attempt to "apply" a function f
represented by the argument e : pexpr
to the goal.
If the goal is of the form a ≠ b
, we obtain the new goal f a ≠ f b
.
If the goal is of the form a = b
, we obtain a new goal f a = f b
, and a subsidiary goal
injective f
.
(We attempt to discharge this subsidiary goal automatically, or using the optional argument.)
If the goal is of the form a ≤ b
(or similarly for a < b
), and f
is an order_iso
,
we obtain a new goal f a ≤ f b
.
Apply a function to an equality or inequality in either a local hypothesis or the goal.
- If we have
h : a = b
, thenapply_fun f at h
will replace this withh : f a = f b
. - If we have
h : a ≤ b
, thenapply_fun f at h
will replace this withh : f a ≤ f b
, and create a subsidiary goalmonotone f
.apply_fun
will automatically attempt to discharge this subsidiary goal usingmono
, or an explicit solution can be provided withapply_fun f at h using P
, whereP : monotone f
. - If the goal is
a ≠ b
,apply_fun f
will replace this withf a ≠ f b
. - If the goal is
a = b
,apply_fun f
will replace this withf a = f b
, and create a subsidiary goalinjective f
.apply_fun
will automatically attempt to discharge this subsidiary goal using local hypotheses, or iff
is actually anequiv
, or an explicit solution can be provided withapply_fun f using P
, whereP : injective f
. - If the goal is
a ≤ b
(or similarly fora < b
), andf
is actually anorder_iso
,apply_fun f
will replace the goal withf a ≤ f b
. Iff
is anything else (e.g. just a function, or anequiv
),apply_fun
will fail.
Typical usage is: