File: Mathlib/Data/Real/Irrational.lean

full_name: Irrational
code: /-- A real number is irrational if it is not equal to any rational number. -/
def Irrational (x : ℝ) 
goal: Prop

full_name: irrational_iff_ne_rational
code: theorem irrational_iff_ne_rational (x : ℝ) : Irrational x ↔ ∀ a b : ℤ, x ≠ a / b 
goal: Irrational x ↔ ∀ (a b : ℤ), x ≠ ↑a / ↑b

full_name: Transcendental.irrational
code: /-- A transcendental real number is irrational. -/
theorem Transcendental.irrational {r : ℝ} (tr : Transcendental ℚ r) : Irrational r 
goal: Irrational r

full_name: irrational_nrt_of_notint_nrt
code: /-- If `x^n`, `n > 0`, is integer and is not the `n`-th power of an integer, then
`x` is irrational. -/
theorem irrational_nrt_of_notint_nrt {x : ℝ} (n : ℕ) (m : ℤ) (hxr : x ^ n = m)
    (hv : ¬∃ y : ℤ, x = y) (hnpos : 0 < n) : Irrational x 
goal: Irrational x

full_name: irrational_nrt_of_n_not_dvd_multiplicity
code: /-- If `x^n = m` is an integer and `n` does not divide the `multiplicity p m`, then `x`
is irrational. -/
theorem irrational_nrt_of_n_not_dvd_multiplicity {x : ℝ} (n : ℕ) {m : ℤ} (hm : m ≠ 0) (p : ℕ)
    [hp : Fact p.Prime] (hxr : x ^ n = m)
    (hv : (multiplicity (p : ℤ) m).get (finite_int_iff.2 ⟨hp.1.ne_one, hm⟩) % n ≠ 0) :
    Irrational x 
goal: Irrational x

full_name: irrational_sqrt_of_multiplicity_odd
code: theorem irrational_sqrt_of_multiplicity_odd (m : ℤ) (hm : 0 < m) (p : ℕ) [hp : Fact p.Prime]
    (Hpv :
      (multiplicity (p : ℤ) m).get (finite_int_iff.2 ⟨hp.1.ne_one, (ne_of_lt hm).symm⟩) % 2 = 1) :
    Irrational (√m) 
goal: Irrational √↑m

full_name: not_irrational_zero
code: @[simp] theorem not_irrational_zero : ¬Irrational 0 
goal: ¬Irrational 0

full_name: not_irrational_one
code: @[simp] theorem not_irrational_one : ¬Irrational 1 
goal: ¬Irrational 1

full_name: irrational_sqrt_ratCast_iff_of_nonneg
code: theorem irrational_sqrt_ratCast_iff_of_nonneg {q : ℚ} (hq : 0 ≤ q) :
    Irrational (√q) ↔ ¬IsSquare q 
goal: Irrational √↑q ↔ ¬IsSquare q

full_name: irrational_sqrt_ratCast_iff
code: theorem irrational_sqrt_ratCast_iff {q : ℚ} :
    Irrational (√q) ↔ ¬IsSquare q ∧ 0 ≤ q 
goal: Irrational √↑q ↔ ¬IsSquare q ∧ 0 ≤ q

full_name: irrational_sqrt_intCast_iff_of_nonneg
code: theorem irrational_sqrt_intCast_iff_of_nonneg {z : ℤ} (hz : 0 ≤ z) :
    Irrational (√z) ↔ ¬IsSquare z 
goal: Irrational √↑z ↔ ¬IsSquare z

full_name: irrational_sqrt_intCast_iff
code: theorem irrational_sqrt_intCast_iff {z : ℤ} :
    Irrational (√z) ↔ ¬IsSquare z ∧ 0 ≤ z 
goal: Irrational √↑z ↔ ¬IsSquare z ∧ 0 ≤ z

full_name: irrational_sqrt_natCast_iff
code: theorem irrational_sqrt_natCast_iff {n : ℕ} : Irrational (√n) ↔ ¬IsSquare n 
goal: Irrational √↑n ↔ ¬IsSquare n

full_name: irrational_sqrt_ofNat_iff
code: theorem irrational_sqrt_ofNat_iff {n : ℕ} [n.AtLeastTwo] :
    Irrational (√(no_index (OfNat.ofNat n))) ↔ ¬IsSquare (OfNat.ofNat n) 
goal: Irrational √(OfNat.ofNat n) ↔ ¬IsSquare (OfNat.ofNat n)

full_name: Nat.Prime.irrational_sqrt
code: theorem Nat.Prime.irrational_sqrt {p : ℕ} (hp : Nat.Prime p) : Irrational (√p) 
goal: Irrational √↑p

full_name: irrational_sqrt_two
code: /-- **Irrationality of the Square Root of 2** -/
theorem irrational_sqrt_two : Irrational (√2) 
goal: Irrational √2

full_name: irrational_sqrt_rat_iff
code: @[deprecated irrational_sqrt_ratCast_iff (since := "2024-06-16")]
theorem irrational_sqrt_rat_iff (q : ℚ) :
    Irrational (√q) ↔ Rat.sqrt q * Rat.sqrt q ≠ q ∧ 0 ≤ q 
goal: Irrational √↑q ↔ Rat.sqrt q * Rat.sqrt q ≠ q ∧ 0 ≤ q

full_name: instDecidableIrrationalSqrtOfNatReal
code: /--
This can be used as
```lean
unseal Nat.sqrt.iter in
example : Irrational √24 := by decide
```
-/
instance {n : ℕ} [n.AtLeastTwo] : Decidable (Irrational (√(no_index (OfNat.ofNat n)))) 
goal: Decidable (Irrational √(OfNat.ofNat n))

full_name: instDecidableIrrationalSqrtCastReal
code: instance (n : ℕ) : Decidable (Irrational (√n)) 
goal: Decidable (Irrational √↑n)

full_name: instDecidableIrrationalSqrtCastReal_1
code: instance (z : ℤ) : Decidable (Irrational (√z)) 
goal: Decidable (Irrational √↑z)

full_name: instDecidableIrrationalSqrtCastReal_2
code: instance (q : ℚ) : Decidable (Irrational (√q)) 
goal: Decidable (Irrational √↑q)

full_name: Irrational.ne_rat
code: theorem ne_rat (h : Irrational x) (q : ℚ) : x ≠ q 
goal: x ≠ ↑q

full_name: Irrational.ne_int
code: theorem ne_int (h : Irrational x) (m : ℤ) : x ≠ m 
goal: x ≠ ↑m

full_name: Irrational.ne_nat
code: theorem ne_nat (h : Irrational x) (m : ℕ) : x ≠ m 
goal: x ≠ ↑m

full_name: Irrational.ne_zero
code: theorem ne_zero (h : Irrational x) : x ≠ 0 
goal: x ≠ 0

full_name: Irrational.ne_one
code: theorem ne_one (h : Irrational x) : x ≠ 1 
goal: x ≠ 1

full_name: Irrational.ne_ofNat
code: @[simp] theorem ne_ofNat (h : Irrational x) (n : ℕ) [n.AtLeastTwo] : x ≠ no_index (OfNat.ofNat n) 
goal: x ≠ OfNat.ofNat n

full_name: Rat.not_irrational
code: @[simp]
theorem Rat.not_irrational (q : ℚ) : ¬Irrational q 
goal: ¬Irrational ↑q

full_name: Int.not_irrational
code: @[simp]
theorem Int.not_irrational (m : ℤ) : ¬Irrational m 
goal: ¬Irrational ↑m

full_name: Nat.not_irrational
code: @[simp]
theorem Nat.not_irrational (m : ℕ) : ¬Irrational m 
goal: ¬Irrational ↑m

full_name: not_irrational_ofNat
code: @[simp] theorem not_irrational_ofNat (n : ℕ) [n.AtLeastTwo] :
    ¬Irrational (no_index (OfNat.ofNat n)) 
goal: ¬Irrational (OfNat.ofNat n)

full_name: Irrational.add_cases
code: /-- If `x + y` is irrational, then at least one of `x` and `y` is irrational. -/
theorem add_cases : Irrational (x + y) → Irrational x ∨ Irrational y 
goal: Irrational (x + y) → Irrational x ∨ Irrational y

full_name: Irrational.of_rat_add
code: theorem of_rat_add (h : Irrational (q + x)) : Irrational x 
goal: Irrational x

full_name: Irrational.rat_add
code: theorem rat_add (h : Irrational x) : Irrational (q + x) 
goal: Irrational (↑q + x)

full_name: Irrational.of_add_rat
code: theorem of_add_rat : Irrational (x + q) → Irrational x 
goal: Irrational (x + ↑q) → Irrational x

full_name: Irrational.add_rat
code: theorem add_rat (h : Irrational x) : Irrational (x + q) 
goal: Irrational (x + ↑q)

full_name: Irrational.of_int_add
code: theorem of_int_add (m : ℤ) (h : Irrational (m + x)) : Irrational x 
goal: Irrational x

full_name: Irrational.of_add_int
code: theorem of_add_int (m : ℤ) (h : Irrational (x + m)) : Irrational x 
goal: Irrational x

full_name: Irrational.int_add
code: theorem int_add (h : Irrational x) (m : ℤ) : Irrational (m + x) 
goal: Irrational (↑m + x)

full_name: Irrational.add_int
code: theorem add_int (h : Irrational x) (m : ℤ) : Irrational (x + m) 
goal: Irrational (x + ↑m)

full_name: Irrational.of_nat_add
code: theorem of_nat_add (m : ℕ) (h : Irrational (m + x)) : Irrational x 
goal: Irrational x

full_name: Irrational.of_add_nat
code: theorem of_add_nat (m : ℕ) (h : Irrational (x + m)) : Irrational x 
goal: Irrational x

full_name: Irrational.nat_add
code: theorem nat_add (h : Irrational x) (m : ℕ) : Irrational (m + x) 
goal: Irrational (↑m + x)

full_name: Irrational.add_nat
code: theorem add_nat (h : Irrational x) (m : ℕ) : Irrational (x + m) 
goal: Irrational (x + ↑m)

full_name: Irrational.of_neg
code: theorem of_neg (h : Irrational (-x)) : Irrational x 
goal: Irrational x

full_name: Irrational.neg
code: protected theorem neg (h : Irrational x) : Irrational (-x) 
goal: Irrational (-x)

full_name: Irrational.sub_rat
code: theorem sub_rat (h : Irrational x) : Irrational (x - q) 
goal: Irrational (x - ↑q)

full_name: Irrational.rat_sub
code: theorem rat_sub (h : Irrational x) : Irrational (q - x) 
goal: Irrational (↑q - x)

full_name: Irrational.of_sub_rat
code: theorem of_sub_rat (h : Irrational (x - q)) : Irrational x 
goal: Irrational x

full_name: Irrational.of_rat_sub
code: theorem of_rat_sub (h : Irrational (q - x)) : Irrational x 
goal: Irrational x

full_name: Irrational.sub_int
code: theorem sub_int (h : Irrational x) (m : ℤ) : Irrational (x - m) 
goal: Irrational (x - ↑m)

full_name: Irrational.int_sub
code: theorem int_sub (h : Irrational x) (m : ℤ) : Irrational (m - x) 
goal: Irrational (↑m - x)

full_name: Irrational.of_sub_int
code: theorem of_sub_int (m : ℤ) (h : Irrational (x - m)) : Irrational x 
goal: Irrational x

full_name: Irrational.of_int_sub
code: theorem of_int_sub (m : ℤ) (h : Irrational (m - x)) : Irrational x 
goal: Irrational x

full_name: Irrational.sub_nat
code: theorem sub_nat (h : Irrational x) (m : ℕ) : Irrational (x - m) 
goal: Irrational (x - ↑m)

full_name: Irrational.nat_sub
code: theorem nat_sub (h : Irrational x) (m : ℕ) : Irrational (m - x) 
goal: Irrational (↑m - x)

full_name: Irrational.of_sub_nat
code: theorem of_sub_nat (m : ℕ) (h : Irrational (x - m)) : Irrational x 
goal: Irrational x

full_name: Irrational.of_nat_sub
code: theorem of_nat_sub (m : ℕ) (h : Irrational (m - x)) : Irrational x 
goal: Irrational x

full_name: Irrational.mul_cases
code: theorem mul_cases : Irrational (x * y) → Irrational x ∨ Irrational y 
goal: Irrational (x * y) → Irrational x ∨ Irrational y

full_name: Irrational.of_mul_rat
code: theorem of_mul_rat (h : Irrational (x * q)) : Irrational x 
goal: Irrational x

full_name: Irrational.mul_rat
code: theorem mul_rat (h : Irrational x) {q : ℚ} (hq : q ≠ 0) : Irrational (x * q) 
goal: Irrational (x * ↑q)

full_name: Irrational.of_rat_mul
code: theorem of_rat_mul : Irrational (q * x) → Irrational x 
goal: Irrational (↑q * x) → Irrational x

full_name: Irrational.rat_mul
code: theorem rat_mul (h : Irrational x) {q : ℚ} (hq : q ≠ 0) : Irrational (q * x) 
goal: Irrational (↑q * x)

full_name: Irrational.of_mul_int
code: theorem of_mul_int (m : ℤ) (h : Irrational (x * m)) : Irrational x 
goal: Irrational x

full_name: Irrational.of_int_mul
code: theorem of_int_mul (m : ℤ) (h : Irrational (m * x)) : Irrational x 
goal: Irrational x

full_name: Irrational.mul_int
code: theorem mul_int (h : Irrational x) {m : ℤ} (hm : m ≠ 0) : Irrational (x * m) 
goal: Irrational (x * ↑m)

full_name: Irrational.int_mul
code: theorem int_mul (h : Irrational x) {m : ℤ} (hm : m ≠ 0) : Irrational (m * x) 
goal: Irrational (↑m * x)

full_name: Irrational.of_mul_nat
code: theorem of_mul_nat (m : ℕ) (h : Irrational (x * m)) : Irrational x 
goal: Irrational x

full_name: Irrational.of_nat_mul
code: theorem of_nat_mul (m : ℕ) (h : Irrational (m * x)) : Irrational x 
goal: Irrational x

full_name: Irrational.mul_nat
code: theorem mul_nat (h : Irrational x) {m : ℕ} (hm : m ≠ 0) : Irrational (x * m) 
goal: Irrational (x * ↑m)

full_name: Irrational.nat_mul
code: theorem nat_mul (h : Irrational x) {m : ℕ} (hm : m ≠ 0) : Irrational (m * x) 
goal: Irrational (↑m * x)

full_name: Irrational.of_inv
code: theorem of_inv (h : Irrational x⁻¹) : Irrational x 
goal: Irrational x

full_name: Irrational.inv
code: protected theorem inv (h : Irrational x) : Irrational x⁻¹ 
goal: Irrational x⁻¹

full_name: Irrational.div_cases
code: theorem div_cases (h : Irrational (x / y)) : Irrational x ∨ Irrational y 
goal: Irrational x ∨ Irrational y

full_name: Irrational.of_rat_div
code: theorem of_rat_div (h : Irrational (q / x)) : Irrational x 
goal: Irrational x

full_name: Irrational.of_div_rat
code: theorem of_div_rat (h : Irrational (x / q)) : Irrational x 
goal: Irrational x

full_name: Irrational.rat_div
code: theorem rat_div (h : Irrational x) {q : ℚ} (hq : q ≠ 0) : Irrational (q / x) 
goal: Irrational (↑q / x)

full_name: Irrational.div_rat
code: theorem div_rat (h : Irrational x) {q : ℚ} (hq : q ≠ 0) : Irrational (x / q) 
goal: Irrational (x / ↑q)

full_name: Irrational.of_int_div
code: theorem of_int_div (m : ℤ) (h : Irrational (m / x)) : Irrational x 
goal: Irrational x

full_name: Irrational.of_div_int
code: theorem of_div_int (m : ℤ) (h : Irrational (x / m)) : Irrational x 
goal: Irrational x

full_name: Irrational.int_div
code: theorem int_div (h : Irrational x) {m : ℤ} (hm : m ≠ 0) : Irrational (m / x) 
goal: Irrational (↑m / x)

full_name: Irrational.div_int
code: theorem div_int (h : Irrational x) {m : ℤ} (hm : m ≠ 0) : Irrational (x / m) 
goal: Irrational (x / ↑m)

full_name: Irrational.of_nat_div
code: theorem of_nat_div (m : ℕ) (h : Irrational (m / x)) : Irrational x 
goal: Irrational x

full_name: Irrational.of_div_nat
code: theorem of_div_nat (m : ℕ) (h : Irrational (x / m)) : Irrational x 
goal: Irrational x

full_name: Irrational.nat_div
code: theorem nat_div (h : Irrational x) {m : ℕ} (hm : m ≠ 0) : Irrational (m / x) 
goal: Irrational (↑m / x)

full_name: Irrational.div_nat
code: theorem div_nat (h : Irrational x) {m : ℕ} (hm : m ≠ 0) : Irrational (x / m) 
goal: Irrational (x / ↑m)

full_name: Irrational.of_one_div
code: theorem of_one_div (h : Irrational (1 / x)) : Irrational x 
goal: Irrational x

full_name: Irrational.of_mul_self
code: theorem of_mul_self (h : Irrational (x * x)) : Irrational x 
goal: Irrational x

full_name: Irrational.of_pow
code: theorem of_pow : ∀ n : ℕ, Irrational (x ^ n) → Irrational x
  
goal: Irrational (x ^ n) → Irrational x

full_name: Irrational.of_zpow
code: theorem of_zpow : ∀ m : ℤ, Irrational (x ^ m) → Irrational x
  
goal: Irrational (x ^ m) → Irrational x

full_name: one_lt_natDegree_of_irrational_root
code: theorem one_lt_natDegree_of_irrational_root (hx : Irrational x) (p_nonzero : p ≠ 0)
    (x_is_root : aeval x p = 0) : 1 < p.natDegree 
goal: 1 < p.natDegree

full_name: irrational_rat_add_iff
code: @[simp]
theorem irrational_rat_add_iff : Irrational (q + x) ↔ Irrational x 
goal: Irrational (↑q + x) ↔ Irrational x

full_name: irrational_int_add_iff
code: @[simp]
theorem irrational_int_add_iff : Irrational (m + x) ↔ Irrational x 
goal: Irrational (↑m + x) ↔ Irrational x

full_name: irrational_nat_add_iff
code: @[simp]
theorem irrational_nat_add_iff : Irrational (n + x) ↔ Irrational x 
goal: Irrational (↑n + x) ↔ Irrational x

full_name: irrational_add_rat_iff
code: @[simp]
theorem irrational_add_rat_iff : Irrational (x + q) ↔ Irrational x 
goal: Irrational (x + ↑q) ↔ Irrational x

full_name: irrational_add_int_iff
code: @[simp]
theorem irrational_add_int_iff : Irrational (x + m) ↔ Irrational x 
goal: Irrational (x + ↑m) ↔ Irrational x

full_name: irrational_add_nat_iff
code: @[simp]
theorem irrational_add_nat_iff : Irrational (x + n) ↔ Irrational x 
goal: Irrational (x + ↑n) ↔ Irrational x

full_name: irrational_rat_sub_iff
code: @[simp]
theorem irrational_rat_sub_iff : Irrational (q - x) ↔ Irrational x 
goal: Irrational (↑q - x) ↔ Irrational x

full_name: irrational_int_sub_iff
code: @[simp]
theorem irrational_int_sub_iff : Irrational (m - x) ↔ Irrational x 
goal: Irrational (↑m - x) ↔ Irrational x

full_name: irrational_nat_sub_iff
code: @[simp]
theorem irrational_nat_sub_iff : Irrational (n - x) ↔ Irrational x 
goal: Irrational (↑n - x) ↔ Irrational x

full_name: irrational_sub_rat_iff
code: @[simp]
theorem irrational_sub_rat_iff : Irrational (x - q) ↔ Irrational x 
goal: Irrational (x - ↑q) ↔ Irrational x

full_name: irrational_sub_int_iff
code: @[simp]
theorem irrational_sub_int_iff : Irrational (x - m) ↔ Irrational x 
goal: Irrational (x - ↑m) ↔ Irrational x

full_name: irrational_sub_nat_iff
code: @[simp]
theorem irrational_sub_nat_iff : Irrational (x - n) ↔ Irrational x 
goal: Irrational (x - ↑n) ↔ Irrational x

full_name: irrational_neg_iff
code: @[simp]
theorem irrational_neg_iff : Irrational (-x) ↔ Irrational x 
goal: Irrational (-x) ↔ Irrational x

full_name: irrational_inv_iff
code: @[simp]
theorem irrational_inv_iff : Irrational x⁻¹ ↔ Irrational x 
goal: Irrational x⁻¹ ↔ Irrational x

full_name: irrational_rat_mul_iff
code: @[simp]
theorem irrational_rat_mul_iff : Irrational (q * x) ↔ q ≠ 0 ∧ Irrational x 
goal: Irrational (↑q * x) ↔ q ≠ 0 ∧ Irrational x

full_name: irrational_mul_rat_iff
code: @[simp]
theorem irrational_mul_rat_iff : Irrational (x * q) ↔ q ≠ 0 ∧ Irrational x 
goal: Irrational (x * ↑q) ↔ q ≠ 0 ∧ Irrational x

full_name: irrational_int_mul_iff
code: @[simp]
theorem irrational_int_mul_iff : Irrational (m * x) ↔ m ≠ 0 ∧ Irrational x 
goal: Irrational (↑m * x) ↔ m ≠ 0 ∧ Irrational x

full_name: irrational_mul_int_iff
code: @[simp]
theorem irrational_mul_int_iff : Irrational (x * m) ↔ m ≠ 0 ∧ Irrational x 
goal: Irrational (x * ↑m) ↔ m ≠ 0 ∧ Irrational x

full_name: irrational_nat_mul_iff
code: @[simp]
theorem irrational_nat_mul_iff : Irrational (n * x) ↔ n ≠ 0 ∧ Irrational x 
goal: Irrational (↑n * x) ↔ n ≠ 0 ∧ Irrational x

full_name: irrational_mul_nat_iff
code: @[simp]
theorem irrational_mul_nat_iff : Irrational (x * n) ↔ n ≠ 0 ∧ Irrational x 
goal: Irrational (x * ↑n) ↔ n ≠ 0 ∧ Irrational x

full_name: irrational_rat_div_iff
code: @[simp]
theorem irrational_rat_div_iff : Irrational (q / x) ↔ q ≠ 0 ∧ Irrational x 
goal: Irrational (↑q / x) ↔ q ≠ 0 ∧ Irrational x

full_name: irrational_div_rat_iff
code: @[simp]
theorem irrational_div_rat_iff : Irrational (x / q) ↔ q ≠ 0 ∧ Irrational x 
goal: Irrational (x / ↑q) ↔ q ≠ 0 ∧ Irrational x

full_name: irrational_int_div_iff
code: @[simp]
theorem irrational_int_div_iff : Irrational (m / x) ↔ m ≠ 0 ∧ Irrational x 
goal: Irrational (↑m / x) ↔ m ≠ 0 ∧ Irrational x

full_name: irrational_div_int_iff
code: @[simp]
theorem irrational_div_int_iff : Irrational (x / m) ↔ m ≠ 0 ∧ Irrational x 
goal: Irrational (x / ↑m) ↔ m ≠ 0 ∧ Irrational x

full_name: irrational_nat_div_iff
code: @[simp]
theorem irrational_nat_div_iff : Irrational (n / x) ↔ n ≠ 0 ∧ Irrational x 
goal: Irrational (↑n / x) ↔ n ≠ 0 ∧ Irrational x

full_name: irrational_div_nat_iff
code: @[simp]
theorem irrational_div_nat_iff : Irrational (x / n) ↔ n ≠ 0 ∧ Irrational x 
goal: Irrational (x / ↑n) ↔ n ≠ 0 ∧ Irrational x

full_name: exists_irrational_btwn
code: /-- There is an irrational number `r` between any two reals `x < r < y`. -/
theorem exists_irrational_btwn {x y : ℝ} (h : x < y) : ∃ r, Irrational r ∧ x < r ∧ r < y 
goal: ∃ r, Irrational r ∧ x < r ∧ r < y