mathlib documentation

data.real.irrational

Irrational real numbers #

In this file we define a predicate irrational on , prove that the n-th root of an integer number is irrational if it is not integer, and that sqrt q is irrational if and only if rat.sqrt q * rat.sqrt q ≠ q ∧ 0 ≤ q.

We also provide dot-style constructors like irrational.add_rat, irrational.rat_sub etc.

def irrational (x : ) :
Prop

A real number is irrational if it is not equal to any rational number.

Equations
theorem irrational_iff_ne_rational (x : ) :
irrational x ∀ (a b : ), x a / b

A transcendental real number is irrational.

Irrationality of roots of integer and rational numbers #

theorem irrational_nrt_of_notint_nrt {x : } (n : ) (m : ) (hxr : x ^ n = m) (hv : ¬∃ (y : ), x = y) (hnpos : 0 < n) :

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_n_not_dvd_multiplicity {x : } (n : ) {m : } (hm : m 0) (p : ) [hp : fact (nat.prime p)] (hxr : x ^ n = m) (hv : (multiplicity p m).get _ % n 0) :

If x^n = m is an integer and n does not divide the multiplicity p m, then x is irrational.

theorem irrational_sqrt_of_multiplicity_odd (m : ) (hm : 0 < m) (p : ) [hp : fact (nat.prime p)] (Hpv : (multiplicity p m).get _ % 2 = 1) :

Irrationality of the Square Root of 2

Adding/subtracting/multiplying by rational numbers #

theorem irrational.add_cases {x y : } :
theorem irrational.of_rat_add (q : ) {x : } (h : irrational (q + x)) :
theorem irrational.rat_add (q : ) {x : } (h : irrational x) :
theorem irrational.of_add_rat (q : ) {x : } :
theorem irrational.add_rat (q : ) {x : } (h : irrational x) :
theorem irrational.of_neg {x : } (h : irrational (-x)) :
theorem irrational.neg {x : } (h : irrational x) :
theorem irrational.sub_rat (q : ) {x : } (h : irrational x) :
theorem irrational.rat_sub (q : ) {x : } (h : irrational x) :
theorem irrational.of_sub_rat (q : ) {x : } (h : irrational (x - q)) :
theorem irrational.of_rat_sub (q : ) {x : } (h : irrational (q - x)) :
theorem irrational.mul_cases {x y : } :
theorem irrational.of_mul_rat (q : ) {x : } (h : irrational (x * q)) :
theorem irrational.mul_rat {x : } (h : irrational x) {q : } (hq : q 0) :
theorem irrational.of_rat_mul (q : ) {x : } :
irrational ((q) * x)irrational x
theorem irrational.rat_mul {x : } (h : irrational x) {q : } (hq : q 0) :
theorem irrational.of_mul_self {x : } (h : irrational (x * x)) :
theorem irrational.inv {x : } (h : irrational x) :
theorem irrational.div_cases {x y : } (h : irrational (x / y)) :
theorem irrational.of_rat_div (q : ) {x : } (h : irrational (q / x)) :
theorem irrational.of_one_div {x : } (h : irrational (1 / x)) :
theorem irrational.of_pow {x : } (n : ) :
irrational (x ^ n)irrational x
theorem irrational.of_fpow {x : } (m : ) :
irrational (x ^ m)irrational x
theorem one_lt_nat_degree_of_irrational_root (x : ) (p : polynomial ) (hx : irrational x) (p_nonzero : p 0) (x_is_root : (polynomial.aeval x) p = 0) :
@[simp]
theorem irrational_rat_add_iff {q : } {x : } :
@[simp]
theorem irrational_add_rat_iff {q : } {x : } :
@[simp]
theorem irrational_rat_sub_iff {q : } {x : } :
@[simp]
theorem irrational_sub_rat_iff {q : } {x : } :
@[simp]