feat(library/data/real/basic): improve performance

This commit is contained in:
Leonardo de Moura 2015-12-09 10:57:16 -08:00
parent cbc3c0cf4f
commit 1b80dc0df6

View file

@ -947,7 +947,7 @@ section
eq_of_forall_abs_sub_le eq_of_forall_abs_sub_le
(take ε, (take ε,
suppose ε > 0, suppose ε > 0,
have ε / 2 > 0, from div_pos_of_pos_of_pos this two_pos, have ε / 2 > 0, begin exact div_pos_of_pos_of_pos this two_pos end,
obtain n (Hn : n⁻¹ ≤ ε / 2), from pnat_bound this, obtain n (Hn : n⁻¹ ≤ ε / 2), from pnat_bound this,
show abs (a - b) ≤ ε, from calc show abs (a - b) ≤ ε, from calc
abs (a - b) ≤ n⁻¹ + n⁻¹ : H₁ n abs (a - b) ≤ n⁻¹ + n⁻¹ : H₁ n