mathlib documentation

data.​real.​basic

data.​real.​basic

def real  :
Type

Equations
@[instance]

Equations
@[instance]

Equations
@[instance]

Equations

Coercion ℚ → ℝ as a ring_hom. Note that this is cau_seq.completion.of_rat, not rat.cast.

Equations
def real.​mk  :

Make a real number from a Cauchy sequence of rationals (by taking the equivalence class).

Equations
@[instance]

Equations
@[simp]
theorem real.​mk_lt {f g : cau_seq ℚ abs} :

theorem real.​mk_eq {f g : cau_seq ℚ abs} :

@[simp]
theorem real.​mk_pos {f : cau_seq ℚ abs} :

def real.​le  :
ℝ → ℝ → Prop

Equations
@[instance]

Equations
@[simp]
theorem real.​mk_le {f g : cau_seq ℚ abs} :

theorem real.​add_lt_add_iff_left {a b : ℝ} (c : ℝ) :
c + a < c + b ↔ a < b

@[instance]

Equations
theorem real.​zero_lt_one  :
0 < 1

theorem real.​mul_pos {a b : ℝ} :
0 < a → 0 < b → 0 < a * b

@[instance]

Equations
@[instance]

Equations
@[instance]
def real.​decidable_lt (a b : ℝ) :
decidable (a < b)

Equations
@[instance]
def real.​decidable_le (a b : ℝ) :

Equations
@[instance]
def real.​decidable_eq (a b : ℝ) :
decidable (a = b)

Equations
theorem real.​le_of_forall_epsilon_le {a b : ℝ} :
(∀ (ε : ℝ), 0 < ε → a ≤ b + ε) → a ≤ b

@[simp]

theorem real.​le_mk_of_forall_le {x : ℝ} {f : cau_seq ℚ abs} :
(∃ (i : ℕ), ∀ (j : ℕ), j ≥ i → x ≤ ↑(⇑f j)) → x ≤ real.mk f

theorem real.​mk_le_of_forall_le {f : cau_seq ℚ abs} {x : ℝ} :
(∃ (i : ℕ), ∀ (j : ℕ), j ≥ i → ↑(⇑f j) ≤ x) → real.mk f ≤ x

theorem real.​mk_near_of_forall_near {f : cau_seq ℚ abs} {x ε : ℝ} :
(∃ (i : ℕ), ∀ (j : ℕ), j ≥ i → abs (↑(⇑f j) - x) ≤ ε) → abs (real.mk f - x) ≤ ε

@[instance]

Equations
theorem real.​is_cau_seq_iff_lift {f : ℕ → ℚ} :
is_cau_seq abs f ↔ is_cau_seq abs (λ (i : ℕ), ↑(f i))

theorem real.​of_near (f : ℕ → ℚ) (x : ℝ) :
(∀ (ε : ℝ), ε > 0 → (∃ (i : ℕ), ∀ (j : ℕ), j ≥ i → abs (↑(f j) - x) < ε)) → (∃ (h' : is_cau_seq abs f), real.mk ⟨f, h'⟩ = x)

theorem real.​exists_floor (x : ℝ) :
∃ (ub : ℤ), ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub

theorem real.​exists_sup (S : set ℝ) :
(∃ (x : ℝ), x ∈ S) → (∃ (x : ℝ), ∀ (y : ℝ), y ∈ S → y ≤ x) → (∃ (x : ℝ), ∀ (y : ℝ), x ≤ y ↔ ∀ (z : ℝ), z ∈ S → z ≤ y)

@[instance]

Equations
theorem real.​Sup_def (S : set ℝ) :
has_Sup.Sup S = dite ((∃ (x : ℝ), x ∈ S) ∧ ∃ (x : ℝ), ∀ (y : ℝ), y ∈ S → y ≤ x) (λ (h : (∃ (x : ℝ), x ∈ S) ∧ ∃ (x : ℝ), ∀ (y : ℝ), y ∈ S → y ≤ x), classical.some _) (λ (h : ¬((∃ (x : ℝ), x ∈ S) ∧ ∃ (x : ℝ), ∀ (y : ℝ), y ∈ S → y ≤ x)), 0)

theorem real.​Sup_le (S : set ℝ) (h₁ : ∃ (x : ℝ), x ∈ S) (h₂ : ∃ (x : ℝ), ∀ (y : ℝ), y ∈ S → y ≤ x) {y : ℝ} :
has_Sup.Sup S ≤ y ↔ ∀ (z : ℝ), z ∈ S → z ≤ y

theorem real.​lt_Sup (S : set ℝ) (h₁ : ∃ (x : ℝ), x ∈ S) (h₂ : ∃ (x : ℝ), ∀ (y : ℝ), y ∈ S → y ≤ x) {y : ℝ} :
y < has_Sup.Sup S ↔ ∃ (z : ℝ) (H : z ∈ S), y < z

theorem real.​le_Sup (S : set ℝ) (h₂ : ∃ (x : ℝ), ∀ (y : ℝ), y ∈ S → y ≤ x) {x : ℝ} :
x ∈ S → x ≤ has_Sup.Sup S

theorem real.​Sup_le_ub (S : set ℝ) (h₁ : ∃ (x : ℝ), x ∈ S) {ub : ℝ} :
(∀ (y : ℝ), y ∈ S → y ≤ ub) → has_Sup.Sup S ≤ ub

theorem real.​is_lub_Sup {s : set ℝ} {a b : ℝ} :
a ∈ s → b ∈ upper_bounds s → is_lub s (has_Sup.Sup s)

@[instance]

Equations
theorem real.​Inf_def (S : set ℝ) :

theorem real.​le_Inf (S : set ℝ) (h₁ : ∃ (x : ℝ), x ∈ S) (h₂ : ∃ (x : ℝ), ∀ (y : ℝ), y ∈ S → x ≤ y) {y : ℝ} :
y ≤ has_Inf.Inf S ↔ ∀ (z : ℝ), z ∈ S → y ≤ z

theorem real.​Inf_lt (S : set ℝ) (h₁ : ∃ (x : ℝ), x ∈ S) (h₂ : ∃ (x : ℝ), ∀ (y : ℝ), y ∈ S → x ≤ y) {y : ℝ} :
has_Inf.Inf S < y ↔ ∃ (z : ℝ) (H : z ∈ S), z < y

theorem real.​Inf_le (S : set ℝ) (h₂ : ∃ (x : ℝ), ∀ (y : ℝ), y ∈ S → x ≤ y) {x : ℝ} :
x ∈ S → has_Inf.Inf S ≤ x

theorem real.​lb_le_Inf (S : set ℝ) (h₁ : ∃ (x : ℝ), x ∈ S) {lb : ℝ} :
(∀ (y : ℝ), y ∈ S → lb ≤ y) → lb ≤ has_Inf.Inf S

theorem real.​sqrt_exists {x : ℝ} :
0 ≤ x → (∃ (y : ℝ), 0 ≤ y ∧ y * y = x)

Equations
def real.​sqrt  :
ℝ → ℝ

The square root of a real number. This returns 0 for negative inputs.

Equations
theorem real.​sqrt_eq_zero_of_nonpos {x : ℝ} :
x ≤ 0 → real.sqrt x = 0

theorem real.​sqrt_nonneg (x : ℝ) :

@[simp]
theorem real.​mul_self_sqrt {x : ℝ} :
0 ≤ x → real.sqrt x * real.sqrt x = x

@[simp]
theorem real.​sqrt_mul_self {x : ℝ} :
0 ≤ x → real.sqrt (x * x) = x

theorem real.​sqrt_eq_iff_mul_self_eq {x y : ℝ} :
0 ≤ x → 0 ≤ y → (real.sqrt x = y ↔ y * y = x)

@[simp]
theorem real.​sqr_sqrt {x : ℝ} :
0 ≤ x → real.sqrt x ^ 2 = x

@[simp]
theorem real.​sqrt_sqr {x : ℝ} :
0 ≤ x → real.sqrt (x ^ 2) = x

theorem real.​sqrt_eq_iff_sqr_eq {x y : ℝ} :
0 ≤ x → 0 ≤ y → (real.sqrt x = y ↔ y ^ 2 = x)

theorem real.​sqrt_sqr_eq_abs (x : ℝ) :
real.sqrt (x ^ 2) = abs x

@[simp]
theorem real.​sqrt_zero  :

@[simp]
theorem real.​sqrt_one  :

@[simp]
theorem real.​sqrt_le {x y : ℝ} :
0 ≤ x → 0 ≤ y → (real.sqrt x ≤ real.sqrt y ↔ x ≤ y)

@[simp]
theorem real.​sqrt_lt {x y : ℝ} :
0 ≤ x → 0 ≤ y → (real.sqrt x < real.sqrt y ↔ x < y)

theorem real.​sqrt_le_sqrt {x y : ℝ} :

theorem real.​sqrt_le_left {x y : ℝ} :
0 ≤ y → (real.sqrt x ≤ y ↔ x ≤ y ^ 2)

theorem real.​le_sqrt {x y : ℝ} :
0 ≤ x → 0 ≤ y → (x ≤ real.sqrt y ↔ x ^ 2 ≤ y)

theorem real.​le_sqrt' {x y : ℝ} :
0 < x → (x ≤ real.sqrt y ↔ x ^ 2 ≤ y)

theorem real.​le_sqrt_of_sqr_le {x y : ℝ} :
x ^ 2 ≤ y → x ≤ real.sqrt y

@[simp]
theorem real.​sqrt_inj {x y : ℝ} :
0 ≤ x → 0 ≤ y → (real.sqrt x = real.sqrt y ↔ x = y)

@[simp]
theorem real.​sqrt_eq_zero {x : ℝ} :
0 ≤ x → (real.sqrt x = 0 ↔ x = 0)

theorem real.​sqrt_eq_zero' {x : ℝ} :
real.sqrt x = 0 ↔ x ≤ 0

@[simp]
theorem real.​sqrt_pos {x : ℝ} :
0 < real.sqrt x ↔ 0 < x

@[simp]
theorem real.​sqrt_mul' (x : ℝ) {y : ℝ} :
0 ≤ y → real.sqrt (x * y) = real.sqrt x * real.sqrt y

@[simp]
theorem real.​sqrt_mul {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :

@[simp]

@[simp]
theorem real.​sqrt_div {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :