norm_num
extensions for GCD-adjacent functions #
This module defines some norm_num
extensions for functions such as
Nat.gcd
, Nat.lcm
, Int.gcd
, and Int.lcm
.
Note that Nat.coprime
is reducible and defined in terms of Nat.gcd
, so the Nat.gcd
extension
also indirectly provides a Nat.coprime
extension.
theorem
Tactic.NormNum.isNat_gcd
{x y nx ny z : ℕ}
:
Mathlib.Meta.NormNum.IsNat x nx →
Mathlib.Meta.NormNum.IsNat y ny → nx.gcd ny = z → Mathlib.Meta.NormNum.IsNat (x.gcd y) z
theorem
Tactic.NormNum.isNat_lcm
{x y nx ny z : ℕ}
:
Mathlib.Meta.NormNum.IsNat x nx →
Mathlib.Meta.NormNum.IsNat y ny → nx.lcm ny = z → Mathlib.Meta.NormNum.IsNat (x.lcm y) z
theorem
Tactic.NormNum.isInt_gcd
{x y nx ny : ℤ}
{z : ℕ}
:
Mathlib.Meta.NormNum.IsInt x nx →
Mathlib.Meta.NormNum.IsInt y ny → nx.gcd ny = z → Mathlib.Meta.NormNum.IsNat (x.gcd y) z
theorem
Tactic.NormNum.isInt_lcm
{x y nx ny : ℤ}
{z : ℕ}
:
Mathlib.Meta.NormNum.IsInt x nx →
Mathlib.Meta.NormNum.IsInt y ny → nx.lcm ny = z → Mathlib.Meta.NormNum.IsNat (x.lcm y) z
Given natural number literals ex
and ey
, return their GCD as a natural number literal
and an equality proof. Panics if ex
or ey
aren't natural number literals.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given natural number literals ex
and ey
, return their LCM as a natural number literal
and an equality proof. Panics if ex
or ey
aren't natural number literals.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Evaluates the Nat.lcm
function.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Evaluates the Int.gcd
function.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Evaluates the Int.lcm
function.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Tactic.NormNum.isInt_ratNum
{q : ℚ}
{n : ℤ}
{n' d : ℕ}
:
Mathlib.Meta.NormNum.IsRat q n d → n.natAbs = n' → n'.gcd d = 1 → Mathlib.Meta.NormNum.IsInt q.num n
theorem
Tactic.NormNum.isNat_ratDen
{q : ℚ}
{n : ℤ}
{n' d : ℕ}
:
Mathlib.Meta.NormNum.IsRat q n d → n.natAbs = n' → n'.gcd d = 1 → Mathlib.Meta.NormNum.IsNat q.den d
Evaluates the Rat.num
function.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Evaluates the Rat.den
function.
Equations
- One or more equations did not get rendered due to their size.