mathlib documentation

data.real.basic

def real  :
Type

Equations
@[instance]
def real.ring  :

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 (x : cau_seq ℚ abs) :

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 (x y : ℝ) :
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 : ℝ} (a_1 : 0 < a) (a_2 : 0 < b) :
0 < a * b

@[instance]

Equations
@[instance]

@[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 : ℝ} (h : ∀ (ε : ℝ), 0 < ε → a ≤ b + ε) :
a ≤ b

@[simp]

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

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

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

@[instance]

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 : ℝ) (h : ∀ (ε : ℝ), ε > 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 ℝ) (a : ∃ (x : ℝ), x ∈ S) (a_1 : ∃ (x : ℝ), ∀ (y : ℝ), y ∈ S → y ≤ x) :
∃ (x : ℝ), ∀ (y : ℝ), x ≤ y ↔ ∀ (z : ℝ), z ∈ S → z ≤ y

@[instance]

Equations
theorem real.Sup_def (S : set ℝ) :
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 : ℝ} :
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 < Sup S ↔ ∃ (z : ℝ) (H : z ∈ S), y < z

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

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

theorem real.is_lub_Sup {s : set ℝ} {a b : ℝ} (ha : a ∈ s) (hb : b ∈ upper_bounds s) :
is_lub s (Sup s)

@[instance]

Equations
theorem real.Inf_def (S : set ℝ) :
Inf S = -Sup {x : ℝ | -x ∈ S}

theorem real.le_Inf (S : set ℝ) (h₁ : ∃ (x : ℝ), x ∈ S) (h₂ : ∃ (x : ℝ), ∀ (y : ℝ), y ∈ S → x ≤ y) {y : ℝ} :
y ≤ 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 : ℝ} :
Inf S < y ↔ ∃ (z : ℝ) (H : z ∈ S), z < y

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

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

theorem real.Sup_empty  :

theorem real.Sup_of_not_bdd_above {s : set ℝ} (hs : ¬bdd_above s) :
Sup s = 0

theorem real.Inf_empty  :

theorem real.Inf_of_not_bdd_below {s : set ℝ} (hs : ¬bdd_below s) :
Inf s = 0

theorem real.cau_seq_converges (f : cau_seq ℝ abs) :
∃ (x : ℝ), f ≈ cau_seq.const abs x

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

def real.sqrt_aux (f : cau_seq ℚ abs) (a : ℕ) :

Equations
def real.sqrt (x : ℝ) :

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

Equations
theorem real.sqrt_prop (x : ℝ) :

theorem real.sqrt_eq_zero_of_nonpos {x : ℝ} (h : x ≤ 0) :

theorem real.sqrt_nonneg (x : ℝ) :

@[simp]
theorem real.mul_self_sqrt {x : ℝ} (h : 0 ≤ x) :

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

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

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

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

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

theorem real.sqrt_mul_self_eq_abs (x : ℝ) :
real.sqrt (x * x) = abs 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 : ℝ} (hx : 0 ≤ x) (hy : 0 ≤ y) :

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

theorem real.sqrt_le_sqrt {x y : ℝ} (h : x ≤ y) :

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

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

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

theorem real.le_sqrt_of_sqr_le {x y : ℝ} (h : x ^ 2 ≤ y) :

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

@[simp]
theorem real.sqrt_eq_zero {x : ℝ} (h : 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 : ℝ} (hy : 0 ≤ y) :

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

@[simp]

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