Documentation
Projects
.
Util
.
Real
Search
return to top
source
Imports
Init
Mathlib.Analysis.MeanInequalities
Projects.Util.Finset
Mathlib.Analysis.SpecialFunctions.Log.Base
Imported by
Real
.
am
Real
.
gm
Real
.
mk!
Real
.
add_inv
Real
.
pow_lt_iff
Real
.
add_inv_pow_lt_exp_one_of
Real
.
ofNat_eq
Real
.
list_sum_map_mul_left
Real
.
list_sum_map_mul_right
Real
.
gm_le_am
Real
.
gm_le_am_2
Real
.
gm_le_am_3
Real
.
log_eq_logb
Real
.
eq_of_log_eq_log
Real
.
log_eq_log_iff
Real
.
rpow_eq_exp
Real
.
exi_mk_cauchy
IsCauSeq
.
sub
Real
.
mk_sub_mk
IsCauSeq
.
abs'
Real
.
neg_mk
Real
.
abs_mk
Real
.
inv_lt_self_of_one_lt
Real
.
inv_le_self_of_one_le
Real
.
lt_inv_self_of
Real
.
le_inv_self_of
Real
.
sqrt_add_one_sub_lt_one
Real
.
abs_sqrt
Real
.
abs_sub_lt_of_lt_lt_half
Real
.
abs_sub_lt_of_le_lt_half
Real
.
abs_sub_lt_of_lt_le_half
Real
.
abs_sub_le_of_le_le_half
Real
.
sqrt_add
Real
.
sqrt_sub
Real
.
sqrt_add_sqrt
Real
.
sqrt_sub_sqrt
Real
.
sq_sqrt_nat
Real
.
sqrt_sq_nat
Real
.
sqrt_eq_of_neg
Real
.
sqrt_eq_of_nonpos
Real
.
le_sq_self_iff
Real
.
lt_sq_self_iff
Real
.
pow_rpow_inv
Real
.
rpow_inv_pow
source
noncomputable def
Real
.
am
(
xs
:
List
ℝ
)
:
ℝ
Equations
Real.am
xs
=
xs
.
sum
/
↑
xs
.
length
Instances For
source
noncomputable def
Real
.
gm
(
xs
:
List
ℝ
)
:
ℝ
Equations
Real.gm
xs
=
xs
.
prod
^
(↑
xs
.
length
)
⁻¹
Instances For
source
noncomputable def
Real
.
mk!
(
f
:
ℕ
→
ℚ
)
:
ℝ
Equations
Real.mk!
f
=
if h :
IsCauSeq
abs
f
then
Real.mk
⟨
f
,
h
⟩
else
0
Instances For
source
theorem
Real
.
add_inv
{
a
b
:
ℝ
}
(
h
:
b
≠
0
)
:
a
+
b
⁻¹
=
(
a
*
b
+
1
)
/
b
source
theorem
Real
.
pow_lt_iff
{
a
b
c
:
ℝ
}
(
ha
:
0
<
a
)
(
hb
:
0
<
b
)
(
hc
:
0
<
c
)
:
a
^
b
<
c
↔
a
<
c
^
(
1
/
b
)
source
theorem
Real
.
add_inv_pow_lt_exp_one_of
{
a
:
ℝ
}
(
h
:
0
≤
a
)
:
(
1
+
a
⁻¹
)
^
a
<
exp
1
source
theorem
Real
.
ofNat_eq
{
n
:
ℕ
}
:
OfNat.ofNat
n
=
↑
n
source
theorem
Real
.
list_sum_map_mul_left
{
xs
:
List
ℝ
}
{
w
:
ℝ
}
:
(
List.map
(fun (
x
:
ℝ
) =>
w
*
x
)
xs
)
.
sum
=
w
*
xs
.
sum
source
theorem
Real
.
list_sum_map_mul_right
{
xs
:
List
ℝ
}
{
w
:
ℝ
}
:
(
List.map
(fun (
x
:
ℝ
) =>
x
*
w
)
xs
)
.
sum
=
xs
.
sum
*
w
source
theorem
Real
.
gm_le_am
(
xs
:
List
ℝ
)
(
h₁
:
xs
≠
[
]
)
(
h₂
:
∀
x
∈
xs
,
0
≤
x
)
:
gm
xs
≤
am
xs
source
theorem
Real
.
gm_le_am_2
(
a
b
:
ℝ
)
(
ha
:
0
≤
a
)
(
hb
:
0
≤
b
)
:
√
(
a
*
b
)
≤
(
a
+
b
)
/
2
source
theorem
Real
.
gm_le_am_3
(
a
b
c
:
ℝ
)
(
ha
:
0
≤
a
)
(
hb
:
0
≤
b
)
(
hc
:
0
≤
c
)
:
(
a
*
b
*
c
)
^
3
⁻¹
≤
(
a
+
b
+
c
)
/
3
source
theorem
Real
.
log_eq_logb
{
a
:
ℝ
}
:
log
a
=
logb
(
exp
1
)
a
source
theorem
Real
.
eq_of_log_eq_log
{
a
b
:
ℝ
}
(
ha
:
0
<
a
)
(
hb
:
0
<
b
)
(
h
:
log
a
=
log
b
)
:
a
=
b
source
theorem
Real
.
log_eq_log_iff
{
a
b
:
ℝ
}
(
ha
:
0
<
a
)
(
hb
:
0
<
b
)
:
log
a
=
log
b
↔
a
=
b
source
theorem
Real
.
rpow_eq_exp
{
a
b
:
ℝ
}
(
ha
:
0
<
a
)
:
a
^
b
=
exp
(
b
*
log
a
)
source
theorem
Real
.
exi_mk_cauchy
{
x
:
ℝ
}
:
∃ (
a
:
ℕ
→
ℚ
) (
ha
:
IsCauSeq
abs
a
),
x
=
mk
⟨
a
,
ha
⟩
source
theorem
IsCauSeq
.
sub
{
a
b
:
ℕ
→
ℚ
}
(
ha
:
IsCauSeq
abs
a
)
(
hb
:
IsCauSeq
abs
b
)
:
IsCauSeq
abs
(
a
-
b
)
source
theorem
Real
.
mk_sub_mk
{
a
b
:
ℕ
→
ℚ
}
{
ha
:
IsCauSeq
abs
a
}
{
hb
:
IsCauSeq
abs
b
}
:
mk
⟨
a
,
ha
⟩
-
mk
⟨
b
,
hb
⟩
=
mk
⟨
a
-
b
,
⋯
⟩
source
theorem
IsCauSeq
.
abs'
{
a
:
ℕ
→
ℚ
}
(
ha
:
IsCauSeq
abs
a
)
:
IsCauSeq
abs
|
a
|
source
theorem
Real
.
neg_mk
{
a
:
ℕ
→
ℚ
}
{
ha
:
IsCauSeq
abs
a
}
:
-
mk
⟨
a
,
ha
⟩
=
mk
⟨
-
a
,
⋯
⟩
source
theorem
Real
.
abs_mk
{
a
:
ℕ
→
ℚ
}
{
ha
:
IsCauSeq
abs
a
}
:
|
mk
⟨
a
,
ha
⟩
|
=
mk
⟨
|
a
|
,
⋯
⟩
source
theorem
Real
.
inv_lt_self_of_one_lt
{
x
:
ℝ
}
(
h
:
1
<
x
)
:
x
⁻¹
<
x
source
theorem
Real
.
inv_le_self_of_one_le
{
x
:
ℝ
}
(
h
:
1
≤
x
)
:
x
⁻¹
≤
x
source
theorem
Real
.
lt_inv_self_of
{
x
:
ℝ
}
(
h₁
:
0
<
x
)
(
h₂
:
x
<
1
)
:
x
<
x
⁻¹
source
theorem
Real
.
le_inv_self_of
{
x
:
ℝ
}
(
h₁
:
0
<
x
)
(
h₂
:
x
≤
1
)
:
x
≤
x
⁻¹
source
theorem
Real
.
sqrt_add_one_sub_lt_one
{
x
:
ℝ
}
(
hx
:
0
<
x
)
:
√
(
x
+
1
)
-
√
x
<
1
source
@[simp]
theorem
Real
.
abs_sqrt
{
x
:
ℝ
}
:
|
√
x
|
=
√
x
source
theorem
Real
.
abs_sub_lt_of_lt_lt_half
{
a
b
c
d
:
ℝ
}
(
h₁
:
|
a
-
c
|
<
d
/
2
)
(
h₂
:
|
b
-
c
|
<
d
/
2
)
:
|
a
-
b
|
<
d
source
theorem
Real
.
abs_sub_lt_of_le_lt_half
{
a
b
c
d
:
ℝ
}
(
h₁
:
|
a
-
c
|
≤
d
/
2
)
(
h₂
:
|
b
-
c
|
<
d
/
2
)
:
|
a
-
b
|
<
d
source
theorem
Real
.
abs_sub_lt_of_lt_le_half
{
a
b
c
d
:
ℝ
}
(
h₁
:
|
a
-
c
|
<
d
/
2
)
(
h₂
:
|
b
-
c
|
≤
d
/
2
)
:
|
a
-
b
|
<
d
source
theorem
Real
.
abs_sub_le_of_le_le_half
{
a
b
c
d
:
ℝ
}
(
h₁
:
|
a
-
c
|
≤
d
/
2
)
(
h₂
:
|
b
-
c
|
≤
d
/
2
)
:
|
a
-
b
|
≤
d
source
theorem
Real
.
sqrt_add
{
a
b
:
ℝ
}
(
h₁
:
0
≤
b
)
(
h₂
:
b
≤
a
)
:
√
(
a
+
b
)
=
√
((
a
+
√
(
a
^
2
-
b
^
2
))
/
2
)
+
√
((
a
-
√
(
a
^
2
-
b
^
2
))
/
2
)
source
theorem
Real
.
sqrt_sub
{
a
b
:
ℝ
}
(
h₁
:
0
≤
b
)
(
h₂
:
b
≤
a
)
:
√
(
a
-
b
)
=
√
((
a
+
√
(
a
^
2
-
b
^
2
))
/
2
)
-
√
((
a
-
√
(
a
^
2
-
b
^
2
))
/
2
)
source
theorem
Real
.
sqrt_add_sqrt
{
a
b
:
ℝ
}
(
h₁
:
0
≤
b
)
(
h₂
:
√
b
≤
a
)
:
√
(
a
+
√
b
)
=
√
((
a
+
√
(
a
^
2
-
b
))
/
2
)
+
√
((
a
-
√
(
a
^
2
-
b
))
/
2
)
source
theorem
Real
.
sqrt_sub_sqrt
{
a
b
:
ℝ
}
(
h₁
:
0
≤
b
)
(
h₂
:
√
b
≤
a
)
:
√
(
a
-
√
b
)
=
√
((
a
+
√
(
a
^
2
-
b
))
/
2
)
-
√
((
a
-
√
(
a
^
2
-
b
))
/
2
)
source
@[simp]
theorem
Real
.
sq_sqrt_nat
{
n
:
ℕ
}
:
√
(
OfNat.ofNat
n
)
^
2
=
OfNat.ofNat
n
source
@[simp]
theorem
Real
.
sqrt_sq_nat
{
n
:
ℕ
}
:
√
(
OfNat.ofNat
n
^
2
)
=
OfNat.ofNat
n
source
theorem
Real
.
sqrt_eq_of_neg
{
a
:
ℝ
}
(
h
:
a
<
0
)
:
√
a
=
0
source
theorem
Real
.
sqrt_eq_of_nonpos
{
a
:
ℝ
}
(
h
:
a
≤
0
)
:
√
a
=
0
source
@[simp]
theorem
Real
.
le_sq_self_iff
{
a
:
ℝ
}
:
a
≤
a
^
2
↔
a
≤
0
∨
1
≤
a
source
@[simp]
theorem
Real
.
lt_sq_self_iff
{
a
:
ℝ
}
:
a
<
a
^
2
↔
a
<
0
∨
1
<
a
source
theorem
Real
.
pow_rpow_inv
{
a
:
ℝ
}
{
n
:
ℕ
}
(
ha
:
0
≤
a
)
(
hn
:
n
≠
0
)
:
(
a
^
OfNat.ofNat
n
)
^
(
OfNat.ofNat
n
)
⁻¹
=
a
source
theorem
Real
.
rpow_inv_pow
{
a
:
ℝ
}
{
n
:
ℕ
}
(
ha
:
0
≤
a
)
(
hn
:
n
≠
0
)
:
(
a
^
(
OfNat.ofNat
n
)
⁻¹
)
^
OfNat.ofNat
n
=
a