The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V34. The tactics of Mathlib

Mathlib.Tactic.NormNum.NatLog

13 declarations. Mathlib docs · Source

norm_num extensions for Nat.log and Nat.clog

This module defines norm_num extensions for Nat.log and Nat.clog.

theorem Mathlib.Meta.NormNum.nat_log_zero E1 #

∀ (n : ℕ), Nat.log 0 n = 0

theorem Mathlib.Meta.NormNum.nat_log_one E1 #

∀ (n : ℕ), Nat.log 1 n = 0

theorem Mathlib.Meta.NormNum.nat_log_helper0 E1 #

∀ (b n : ℕ), n.blt b = true → Nat.log b n = 0

theorem Mathlib.Meta.NormNum.nat_log_helper E1 #

∀ (b n k : ℕ), (b ^ k).ble n = true → n.blt (b ^ (k + 1)) = true → Nat.log b n = k

theorem Mathlib.Meta.NormNum.isNat_log E1 #

∀ {b nb n nn k : ℕ},
  Mathlib.Meta.NormNum.IsNat b nb →
    Mathlib.Meta.NormNum.IsNat n nn → Nat.log nb nn = k → Mathlib.Meta.NormNum.IsNat (Nat.log b n) k

def Mathlib.Meta.NormNum.proveNatLog E1 #

(eb en : Q(ℕ)) → (ek : Q(ℕ)) × Q(Nat.log «$eb» «$en» = «$ek»)

Given the natural number literals eb and en, returns Nat.log eb en as a natural number literal and an equality proof. Panics if ex or en aren't natural number literals.

def Mathlib.Meta.NormNum.evalNatLog E1 #

Mathlib.Meta.NormNum.NormNumExt

Evaluates the Nat.log function.

theorem Mathlib.Meta.NormNum.nat_clog_zero_left E1 #

∀ (b n : ℕ), b.ble 1 = true → Nat.clog b n = 0

theorem Mathlib.Meta.NormNum.nat_clog_zero_right E1 #

∀ (b n : ℕ), n.ble 1 = true → Nat.clog b n = 0

theorem Mathlib.Meta.NormNum.nat_clog_helper E1 #

∀ {b m n : ℕ}, (b ^ m).blt n = true → n.ble (b ^ (m + 1)) = true → Nat.clog b n = m + 1

theorem Mathlib.Meta.NormNum.isNat_clog E1 #

∀ {b nb n nn k : ℕ},
  Mathlib.Meta.NormNum.IsNat b nb →
    Mathlib.Meta.NormNum.IsNat n nn → Nat.clog nb nn = k → Mathlib.Meta.NormNum.IsNat (Nat.clog b n) k

def Mathlib.Meta.NormNum.proveNatClog E1 #

(eb en : Q(ℕ)) → (ek : Q(ℕ)) × Q(Nat.clog «$eb» «$en» = «$ek»)

Given the natural number literals eb and en, returns Nat.clog eb en as a natural number literal and an equality proof. Panics if ex or en aren't natural number literals.

def Mathlib.Meta.NormNum.evalNatClog E1 #

Mathlib.Meta.NormNum.NormNumExt

Evaluates the Nat.clog function.