Operations on extended real numbers #
This file supplements Mathlib's API for arithmetic operations on EReal. The common theme is
subtraction in which one operand is a real number: both a - (r : EReal) and (r : EReal) - a
are defined for every extended real a, are never of the form ∞ - ∞, and behave like real
subtraction in the ways recorded here. The first two results below have a real subtrahend and
the last two a real minuend.
Main results #
EReal.iInf_sub_coeandEReal.iSup_sub_coe— subtracting a real constant commutes with an infimum and with a supremum inEReal;EReal.coe_sub_add_coe— subtracting a sum whose final term is real can be reassociated when the minuend is real;EReal.coe_sub_le_comm— the two subtrahends of a real minuend can be exchanged across an inequality, as insub_le_commfor groups;EReal.neg_sub_coeandEReal.neg_coe_sub— negating a difference with one real operand exchanges the operands, with no finiteness hypothesis on the other;EReal.sub_sub_coe_eq_add_coe_subandEReal.sub_coe_add_eq_add_sub— a real subtrahend moves freely through sums and differences, as insub_sub_eq_add_subandsub_add_eq_add_subfor groups;EReal.sub_coe_eq_iff_eq_add_coe— a real subtrahend can be moved across an equation, as insub_eq_iff_eq_addfor groups;EReal.add_eq_coe_iff_neg_add_neg_eq— an equation between a sum and a real number can be negated term by term.
An equation between a sum of extended reals and a real number can be negated term by term.
Both sides force x and y to be real, so no finiteness hypothesis is needed, even though
-(x + y) = -x + -y fails in EReal when x and y are opposite infinities.