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.int_gcd_helper
{x : ℤ}
{y : ℤ}
{x' : ℕ}
{y' : ℕ}
{d : ℕ}
(hx : Int.natAbs x = x')
(hy : Int.natAbs y = y')
(h : Nat.gcd x' y' = d)
:
theorem
Tactic.NormNum.int_lcm_helper
{x : ℤ}
{y : ℤ}
{x' : ℕ}
{y' : ℕ}
{d : ℕ}
(hx : Int.natAbs x = x')
(hy : Int.natAbs y = y')
(h : Nat.lcm x' y' = d)
:
theorem
Tactic.NormNum.isNat_gcd
{x : ℕ}
{y : ℕ}
{nx : ℕ}
{ny : ℕ}
{z : ℕ}
:
Mathlib.Meta.NormNum.IsNat x nx →
Mathlib.Meta.NormNum.IsNat y ny → Nat.gcd nx ny = z → Mathlib.Meta.NormNum.IsNat (Nat.gcd x y) z
theorem
Tactic.NormNum.isNat_lcm
{x : ℕ}
{y : ℕ}
{nx : ℕ}
{ny : ℕ}
{z : ℕ}
:
Mathlib.Meta.NormNum.IsNat x nx →
Mathlib.Meta.NormNum.IsNat y ny → Nat.lcm nx ny = z → Mathlib.Meta.NormNum.IsNat (Nat.lcm x y) z
theorem
Tactic.NormNum.isInt_gcd
{x : ℤ}
{y : ℤ}
{nx : ℤ}
{ny : ℤ}
{z : ℕ}
:
Mathlib.Meta.NormNum.IsInt x nx →
Mathlib.Meta.NormNum.IsInt y ny → Int.gcd nx ny = z → Mathlib.Meta.NormNum.IsNat (Int.gcd x y) z
theorem
Tactic.NormNum.isInt_lcm
{x : ℤ}
{y : ℤ}
{nx : ℤ}
{ny : ℤ}
{z : ℕ}
:
Mathlib.Meta.NormNum.IsInt x nx →
Mathlib.Meta.NormNum.IsInt y ny → Int.lcm nx ny = z → Mathlib.Meta.NormNum.IsNat (Int.lcm x y) z
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.