The areas / V34. The tactics of Mathlib
Mathlib.Tactic.NormNum.Irrational
18 declarations. Mathlib docs · Source
norm_num extension for Irrational
This module defines a norm_num extension for Irrational x ^ y for rational x and y. It also
supports Irrational √x expressions.
Implementation notes
To prove that (a / b) ^ (p / q) is irrational, we reduce the problem to showing that (a / b) ^ p
is not a q-th power of any rational number. This, in turn, reduces to proving that either a or
b is not a q-th power of a natural number, assuming p and q are coprime.
To show that a given n : ℕ is not a q-th power, we find a natural number k
such that k ^ q < n < (k + 1) ^ q, using binary search.
TODO
Disprove Irrational x for rational x.
theorem Mathlib.Meta.NormNum.NotPowerCertificate.mk.inj E1 #
∀ {m n k : Q(ℕ)} {pf_left : Q(«$k» ^ «$n» < «$m»)} {pf_right : Q(«$m» < («$k» + 1) ^ «$n»)} {k_1 : Q(ℕ)}
{pf_left_1 : Q(«$k_1» ^ «$n» < «$m»)} {pf_right_1 : Q(«$m» < («$k_1» + 1) ^ «$n»)},
{ k := k, pf_left := pf_left, pf_right := pf_right } = { k := k_1, pf_left := pf_left_1, pf_right := pf_right_1 } →
k = k_1 ∧ pf_left = pf_left_1 ∧ pf_right = pf_right_1
def Mathlib.Meta.NormNum.NotPowerCertificate.ctorIdx E1 #
{m n : Q(ℕ)} → Mathlib.Meta.NormNum.NotPowerCertificate m n → ℕ
theorem Mathlib.Meta.NormNum.NotPowerCertificate.mk.injEq E0 #
∀ {m n : Q(ℕ)} (k : Q(ℕ)) (pf_left : Q(«$k» ^ «$n» < «$m»)) (pf_right : Q(«$m» < («$k» + 1) ^ «$n»)) (k_1 : Q(ℕ))
(pf_left_1 : Q(«$k_1» ^ «$n» < «$m»)) (pf_right_1 : Q(«$m» < («$k_1» + 1) ^ «$n»)),
({ k := k, pf_left := pf_left, pf_right := pf_right } = { k := k_1, pf_left := pf_left_1, pf_right := pf_right_1 }) =
(k = k_1 ∧ pf_left = pf_left_1 ∧ pf_right = pf_right_1)
theorem Mathlib.Meta.NormNum.irrational_rpow_rat_rat_of_num E1 #
∀ {x y : ℝ} {x_num x_den y_num y_den k_num : ℕ},
Mathlib.Meta.NormNum.IsNNRat x x_num x_den →
Mathlib.Meta.NormNum.IsNNRat y y_num y_den →
x_num.Coprime x_den →
y_num.Coprime y_den → k_num ^ y_den < x_num → x_num < (k_num + 1) ^ y_den → Irrational (x ^ y)
theorem Mathlib.Meta.NormNum.irrational_rpow_rat_rat_of_den E1 #
∀ {x y : ℝ} {x_num x_den y_num y_den k_den : ℕ},
Mathlib.Meta.NormNum.IsNNRat x x_num x_den →
Mathlib.Meta.NormNum.IsNNRat y y_num y_den →
x_num.Coprime x_den →
y_num.Coprime y_den → k_den ^ y_den < x_den → x_den < (k_den + 1) ^ y_den → Irrational (x ^ y)
theorem Mathlib.Meta.NormNum.irrational_rpow_nat_rat E1 #
∀ {x y : ℝ} {x_num y_num y_den k : ℕ},
Mathlib.Meta.NormNum.IsNat x x_num →
Mathlib.Meta.NormNum.IsNNRat y y_num y_den →
y_num.Coprime y_den → k ^ y_den < x_num → x_num < (k + 1) ^ y_den → Irrational (x ^ y)
theorem Mathlib.Meta.NormNum.irrational_sqrt_rat_of_num E1 #
∀ {x : ℝ} {num den num_k : ℕ},
Mathlib.Meta.NormNum.IsNNRat x num den → num.Coprime den → num_k ^ 2 < num → num < (num_k + 1) ^ 2 → Irrational √x
theorem Mathlib.Meta.NormNum.irrational_sqrt_rat_of_den E1 #
∀ {x : ℝ} {num den den_k : ℕ},
Mathlib.Meta.NormNum.IsNNRat x num den → num.Coprime den → den_k ^ 2 < den → den < (den_k + 1) ^ 2 → Irrational √x
theorem Mathlib.Meta.NormNum.irrational_sqrt_nat E1 #
∀ {x : ℝ} {n k : ℕ}, Mathlib.Meta.NormNum.IsNat x n → k ^ 2 < n → n < (k + 1) ^ 2 → Irrational √x
structure Mathlib.Meta.NormNum.NotPowerCertificate E1 #
Q(ℕ) → Q(ℕ) → Type
To prove that m is not n-power (and thus m ^ (1/n) is irrational), we find k such that
k ^ n < m < (k + 1) ^ n.
ctor Mathlib.Meta.NormNum.NotPowerCertificate.mk E0 #
{m n : Q(ℕ)} →
(k : Q(ℕ)) → Q(«$k» ^ «$n» < «$m») → Q(«$m» < («$k» + 1) ^ «$n») → Mathlib.Meta.NormNum.NotPowerCertificate m n
abbrev Mathlib.Meta.NormNum.NotPowerCertificate.k E1 #
{m n : Q(ℕ)} → Mathlib.Meta.NormNum.NotPowerCertificate m n → Q(ℕ)
Natural k such that k ^ n < m < (k + 1) ^ n.
abbrev Mathlib.Meta.NormNum.NotPowerCertificate.pf_left E1 #
{m n : Q(ℕ)} → (self : Mathlib.Meta.NormNum.NotPowerCertificate m n) → Q(unknown_1 ^ «$n» < «$m»)
Proof of k ^ n < m.
abbrev Mathlib.Meta.NormNum.NotPowerCertificate.pf_right E1 #
{m n : Q(ℕ)} → (self : Mathlib.Meta.NormNum.NotPowerCertificate m n) → Q(«$m» < (unknown_1 + 1) ^ «$n»)
Proof of m < (k + 1) ^ n.
def Mathlib.Meta.NormNum.findNotPowerCertificateCore E1 #
ℕ → ℕ → Option ℕ
Finds k such that k ^ n < m < (k + 1) ^ n using bisection method. It assumes n > 0.
def Mathlib.Meta.NormNum.findNotPowerCertificate E1 #
(m n : Q(ℕ)) → Lean.MetaM (Mathlib.Meta.NormNum.NotPowerCertificate m n)
Finds NotPowerCertificate showing that m is not n-power.
def Mathlib.Meta.NormNum.evalIrrationalRpow E1 #
Mathlib.Meta.NormNum.NormNumExt
norm_num extension that proves Irrational x ^ y for rational y. x may be
natural or rational.
def Mathlib.Meta.NormNum.evalIrrationalSqrt E1 #
Mathlib.Meta.NormNum.NormNumExt
norm_num extension that proves Irrational √x for rational x.