Irrational real numbers #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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.
A real number is irrational if it is not equal to any rational number.
Equations
- irrational x = (x ∉ set.range coe)
Instances for irrational
A transcendental real number is irrational.
Irrationality of roots of integer and rational numbers #
theorem
irrational_sqrt_of_multiplicity_odd
(m : ℤ)
(hm : 0 < m)
(p : ℕ)
[hp : fact (nat.prime p)]
(Hpv : (multiplicity ↑p m).get _ % 2 = 1) :
irrational (√ ↑m)
@[protected, instance]
Equations
- irrational.decidable q = decidable_of_iff' (rat.sqrt q * rat.sqrt q ≠ q ∧ 0 ≤ q) _
Dot-style operations on irrational
#
Coercion of a rational/integer/natural number is not irrational #
Irrational number is not equal to a rational/integer/natural number #
Addition of rational/integer/natural numbers #
If x + y
is irrational, then at least one of x
and y
is irrational.
Negation #
Subtraction of rational/integer/natural numbers #
Multiplication by rational numbers #
Inverse #
Division #
Natural and integerl power #
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) :
1 < p.nat_degree
Simplification lemmas about operations #
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]