File: Mathlib/Tactic/NormNum/GCD.lean

full_name: Tactic.NormNum.int_gcd_helper'
code: theorem int_gcd_helper' {d : ℕ} {x y : ℤ} (a b : ℤ) (h₁ : (d : ℤ) ∣ x) (h₂ : (d : ℤ) ∣ y)
    (h₃ : x * a + y * b = d) : Int.gcd x y = d 
goal: x.gcd y = d

full_name: Tactic.NormNum.nat_gcd_helper_dvd_left
code: theorem nat_gcd_helper_dvd_left (x y : ℕ) (h : y % x = 0) : Nat.gcd x y = x 
goal: x.gcd y = x

full_name: Tactic.NormNum.nat_gcd_helper_dvd_right
code: theorem nat_gcd_helper_dvd_right (x y : ℕ) (h : x % y = 0) : Nat.gcd x y = y 
goal: x.gcd y = y

full_name: Tactic.NormNum.nat_gcd_helper_2
code: theorem nat_gcd_helper_2 (d x y a b : ℕ) (hu : x % d = 0) (hv : y % d = 0)
    (h : x * a = y * b + d) : Nat.gcd x y = d 
goal: x.gcd y = d

full_name: Tactic.NormNum.nat_gcd_helper_1
code: theorem nat_gcd_helper_1 (d x y a b : ℕ) (hu : x % d = 0) (hv : y % d = 0)
    (h : y * b = x * a + d) : Nat.gcd x y = d 
goal: x.gcd y = d

full_name: Tactic.NormNum.nat_gcd_helper_1'
code: theorem nat_gcd_helper_1' (x y a b : ℕ) (h : y * b = x * a + 1) :
    Nat.gcd x y = 1 
goal: x.gcd y = 1

full_name: Tactic.NormNum.nat_gcd_helper_2'
code: theorem nat_gcd_helper_2' (x y a b : ℕ) (h : x * a = y * b + 1) :
    Nat.gcd x y = 1 
goal: x.gcd y = 1

full_name: Tactic.NormNum.nat_lcm_helper
code: theorem nat_lcm_helper (x y d m : ℕ) (hd : Nat.gcd x y = d)
    (d0 : Nat.beq d 0 = false)
    (dm : x * y = d * m) : Nat.lcm x y = m 
goal: x.lcm y = m

full_name: Tactic.NormNum.int_gcd_helper
code: theorem int_gcd_helper {x y : ℤ} {x' y' d : ℕ}
    (hx : x.natAbs = x') (hy : y.natAbs = y') (h : Nat.gcd x' y' = d) :
    Int.gcd x y = d 
goal: x.gcd y = d

full_name: Tactic.NormNum.int_lcm_helper
code: theorem int_lcm_helper {x y : ℤ} {x' y' d : ℕ}
    (hx : x.natAbs = x') (hy : y.natAbs = y') (h : Nat.lcm x' y' = d) :
    Int.lcm x y = d 
goal: x.lcm y = d

full_name: Tactic.NormNum.isNat_gcd
code: theorem isNat_gcd : {x y nx ny z : ℕ} →
    IsNat x nx → IsNat y ny → Nat.gcd nx ny = z → IsNat (Nat.gcd x y) z
  
goal: Mathlib.Meta.NormNum.IsNat x nx →
  Mathlib.Meta.NormNum.IsNat y ny → nx.gcd ny = z → Mathlib.Meta.NormNum.IsNat (x.gcd y) z

full_name: Tactic.NormNum.isNat_lcm
code: theorem isNat_lcm : {x y nx ny z : ℕ} →
    IsNat x nx → IsNat y ny → Nat.lcm nx ny = z → IsNat (Nat.lcm x y) z
  
goal: Mathlib.Meta.NormNum.IsNat x nx →
  Mathlib.Meta.NormNum.IsNat y ny → nx.lcm ny = z → Mathlib.Meta.NormNum.IsNat (x.lcm y) z

full_name: Tactic.NormNum.isInt_gcd
code: theorem isInt_gcd : {x y nx ny : ℤ} → {z : ℕ} →
    IsInt x nx → IsInt y ny → Int.gcd nx ny = z → IsNat (Int.gcd x y) z
  
goal: Mathlib.Meta.NormNum.IsInt x nx →
  Mathlib.Meta.NormNum.IsInt y ny → nx.gcd ny = z → Mathlib.Meta.NormNum.IsNat (x.gcd y) z

full_name: Tactic.NormNum.isInt_lcm
code: theorem isInt_lcm : {x y nx ny : ℤ} → {z : ℕ} →
    IsInt x nx → IsInt y ny → Int.lcm nx ny = z → IsNat (Int.lcm x y) z
  
goal: Mathlib.Meta.NormNum.IsInt x nx →
  Mathlib.Meta.NormNum.IsInt y ny → nx.lcm ny = z → Mathlib.Meta.NormNum.IsNat (x.lcm y) z

full_name: Tactic.NormNum.proveNatGCD
code: /-- 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. -/
def proveNatGCD (ex ey : Q(ℕ)) : (ed : Q(ℕ)) × Q(Nat.gcd $ex $ey = $ed) 
goal: (ed : Q(ℕ)) × Q(«$ex».gcd «$ey» = «$ed»)

full_name: Tactic.NormNum.evalNatGCD
code: @[norm_num Nat.gcd _ _]
def evalNatGCD : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Tactic.NormNum.proveNatLCM
code: /-- 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. -/
def proveNatLCM (ex ey : Q(ℕ)) : (ed : Q(ℕ)) × Q(Nat.lcm $ex $ey = $ed) 
goal: (ed : Q(ℕ)) × Q(«$ex».lcm «$ey» = «$ed»)

full_name: Tactic.NormNum.evalNatLCM
code: /-- Evaluates the `Nat.lcm` function. -/
@[norm_num Nat.lcm _ _]
def evalNatLCM : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Tactic.NormNum.proveIntGCD
code: /-- Given two integers, return their GCD and an equality proof.
Panics if `ex` or `ey` aren't integer literals. -/
def proveIntGCD (ex ey : Q(ℤ)) : (ed : Q(ℕ)) × Q(Int.gcd $ex $ey = $ed) 
goal: (ed : Q(ℕ)) × Q(«$ex».gcd «$ey» = «$ed»)

full_name: Tactic.NormNum.evalIntGCD
code: /-- Evaluates the `Int.gcd` function. -/
@[norm_num Int.gcd _ _]
def evalIntGCD : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Tactic.NormNum.proveIntLCM
code: /-- Given two integers, return their LCM and an equality proof.
Panics if `ex` or `ey` aren't integer literals. -/
def proveIntLCM (ex ey : Q(ℤ)) : (ed : Q(ℕ)) × Q(Int.lcm $ex $ey = $ed) 
goal: (ed : Q(ℕ)) × Q(«$ex».lcm «$ey» = «$ed»)

full_name: Tactic.NormNum.evalIntLCM
code: /-- Evaluates the `Int.lcm` function. -/
@[norm_num Int.lcm _ _]
def evalIntLCM : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt