File: Mathlib/Tactic/NormNum/Basic.lean

full_name: Mathlib.Meta.NormNum.IsInt.raw_refl
code: theorem IsInt.raw_refl (n : ℤ) : IsInt n n 
goal: Mathlib.Meta.NormNum.IsInt n n

full_name: Mathlib.Meta.NormNum.isNat_zero
code: theorem isNat_zero (α) [AddMonoidWithOne α] : IsNat (Zero.zero : α) (nat_lit 0) 
goal: Mathlib.Meta.NormNum.IsNat Zero.zero 0

full_name: Mathlib.Meta.NormNum.evalZero
code: /-- The `norm_num` extension which identifies the expression `Zero.zero`, returning `0`. -/
@[norm_num Zero.zero] def evalZero : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isNat_one
code: theorem isNat_one (α) [AddMonoidWithOne α] : IsNat (One.one : α) (nat_lit 1) 
goal: Mathlib.Meta.NormNum.IsNat One.one 1

full_name: Mathlib.Meta.NormNum.evalOne
code: /-- The `norm_num` extension which identifies the expression `One.one`, returning `1`. -/
@[norm_num One.one] def evalOne : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isNat_ofNat
code: theorem isNat_ofNat (α : Type u) [AddMonoidWithOne α] {a : α} {n : ℕ}
    (h : n = a) : IsNat a n 
goal: Mathlib.Meta.NormNum.IsNat a n

full_name: Mathlib.Meta.NormNum.evalOfNat
code: /-- The `norm_num` extension which identifies an expression `OfNat.ofNat n`, returning `n`. -/
@[norm_num OfNat.ofNat _] def evalOfNat : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isNat_intOfNat
code: theorem isNat_intOfNat : {n n' : ℕ} → IsNat n n' → IsNat (Int.ofNat n) n'
  
goal: Mathlib.Meta.NormNum.IsNat n n' → Mathlib.Meta.NormNum.IsNat (Int.ofNat n) n'

full_name: Mathlib.Meta.NormNum.evalIntOfNat
code: /-- The `norm_num` extension which identifies the constructor application `Int.ofNat n` such that
`norm_num` successfully recognizes `n`, returning `n`. -/
@[norm_num Int.ofNat _] def evalIntOfNat : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isNat_natAbs_pos
code: theorem isNat_natAbs_pos : {n : ℤ} → {a : ℕ} → IsNat n a → IsNat n.natAbs a
  
goal: Mathlib.Meta.NormNum.IsNat n a → Mathlib.Meta.NormNum.IsNat n.natAbs a

full_name: Mathlib.Meta.NormNum.isNat_natAbs_neg
code: theorem isNat_natAbs_neg : {n : ℤ} → {a : ℕ} → IsInt n (.negOfNat a) → IsNat n.natAbs a
  
goal: Mathlib.Meta.NormNum.IsInt n (Int.negOfNat a) → Mathlib.Meta.NormNum.IsNat n.natAbs a

full_name: Mathlib.Meta.NormNum.evalIntNatAbs
code: /-- The `norm_num` extension which identifies the expression `Int.natAbs n` such that
`norm_num` successfully recognizes `n`. -/
@[norm_num Int.natAbs (_ : ℤ)] def evalIntNatAbs : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isNat_natCast
code: theorem isNat_natCast {R} [AddMonoidWithOne R] (n m : ℕ) :
    IsNat n m → IsNat (n : R) m 
goal: Mathlib.Meta.NormNum.IsNat n m → Mathlib.Meta.NormNum.IsNat (↑n) m

full_name: Mathlib.Meta.NormNum.evalNatCast
code: /-- The `norm_num` extension which identifies an expression `Nat.cast n`, returning `n`. -/
@[norm_num Nat.cast _, NatCast.natCast _] def evalNatCast : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isNat_intCast
code: theorem isNat_intCast {R} [Ring R] (n : ℤ) (m : ℕ) :
    IsNat n m → IsNat (n : R) m 
goal: Mathlib.Meta.NormNum.IsNat n m → Mathlib.Meta.NormNum.IsNat (↑n) m

full_name: Mathlib.Meta.NormNum.isintCast
code: theorem isintCast {R} [Ring R] (n m : ℤ) :
    IsInt n m → IsInt (n : R) m 
goal: Mathlib.Meta.NormNum.IsInt n m → Mathlib.Meta.NormNum.IsInt (↑n) m

full_name: Mathlib.Meta.NormNum.evalIntCast
code: /-- The `norm_num` extension which identifies an expression `Int.cast n`, returning `n`. -/
@[norm_num Int.cast _, IntCast.intCast _] def evalIntCast : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isNat_add
code: theorem isNat_add {α} [AddMonoidWithOne α] : ∀ {f : α → α → α} {a b : α} {a' b' c : ℕ},
    f = HAdd.hAdd → IsNat a a' → IsNat b b' → Nat.add a' b' = c → IsNat (f a b) c
  
goal: f = HAdd.hAdd →
  Mathlib.Meta.NormNum.IsNat a a' →
    Mathlib.Meta.NormNum.IsNat b b' → a'.add b' = c → Mathlib.Meta.NormNum.IsNat (f a b) c

full_name: Mathlib.Meta.NormNum.isInt_add
code: theorem isInt_add {α} [Ring α] : ∀ {f : α → α → α} {a b : α} {a' b' c : ℤ},
    f = HAdd.hAdd → IsInt a a' → IsInt b b' → Int.add a' b' = c → IsInt (f a b) c
  
goal: f = HAdd.hAdd →
  Mathlib.Meta.NormNum.IsInt a a' →
    Mathlib.Meta.NormNum.IsInt b b' → a'.add b' = c → Mathlib.Meta.NormNum.IsInt (f a b) c

full_name: Mathlib.Meta.NormNum.invertibleOfMul
code: /-- If `b` divides `a` and `a` is invertible, then `b` is invertible. -/
def invertibleOfMul {α} [Semiring α] (k : ℕ) (b : α) :
    ∀ (a : α) [Invertible a], a = k * b → Invertible b
  
goal: a = ↑k * b → Invertible b

full_name: Mathlib.Meta.NormNum.invertibleOfMul'
code: /-- If `b` divides `a` and `a` is invertible, then `b` is invertible. -/
def invertibleOfMul' {α} [Semiring α] {a k b : ℕ} [Invertible (a : α)]
    (h : a = k * b) : Invertible (b : α) 
goal: Invertible ↑b

full_name: Mathlib.Meta.NormNum.isRat_add
code: theorem isRat_add {α} [Ring α] {f : α → α → α} {a b : α} {na nb nc : ℤ} {da db dc k : ℕ} :
    f = HAdd.hAdd → IsRat a na da → IsRat b nb db →
    Int.add (Int.mul na db) (Int.mul nb da) = Int.mul k nc →
    Nat.mul da db = Nat.mul k dc →
    IsRat (f a b) nc dc 
goal: f = HAdd.hAdd →
  Mathlib.Meta.NormNum.IsRat a na da →
    Mathlib.Meta.NormNum.IsRat b nb db →
      (na.mul ↑db).add (nb.mul ↑da) = (↑k).mul nc → da.mul db = k.mul dc → Mathlib.Meta.NormNum.IsRat (f a b) nc dc

full_name: Mathlib.Meta.NormNum.instMonadLiftOptionMetaM_mathlib
code: instance : MonadLift Option MetaM 
goal: MonadLift Option Lean.MetaM

full_name: Mathlib.Meta.NormNum.evalAdd.core
code: /-- The `norm_num` extension which identifies expressions of the form `a + b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ + _] def evalAdd : NormNumExt 
goal: Option (Mathlib.Meta.NormNum.Result e)

full_name: Mathlib.Meta.NormNum.evalAdd.core.intArm
code: /-- The `norm_num` extension which identifies expressions of the form `a + b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ + _] def evalAdd : NormNumExt 
goal: Option (Mathlib.Meta.NormNum.Result e)

full_name: Mathlib.Meta.NormNum.evalAdd.core.ratArm
code: /-- The `norm_num` extension which identifies expressions of the form `a + b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ + _] def evalAdd : NormNumExt 
goal: Option (Mathlib.Meta.NormNum.Result e)

full_name: Mathlib.Meta.NormNum.evalAdd
code: /-- The `norm_num` extension which identifies expressions of the form `a + b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ + _] def evalAdd : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isInt_neg
code: theorem isInt_neg {α} [Ring α] : ∀ {f : α → α} {a : α} {a' b : ℤ},
    f = Neg.neg → IsInt a a' → Int.neg a' = b → IsInt (-a) b
  
goal: f = Neg.neg → Mathlib.Meta.NormNum.IsInt a a' → a'.neg = b → Mathlib.Meta.NormNum.IsInt (-a) b

full_name: Mathlib.Meta.NormNum.isRat_neg
code: theorem isRat_neg {α} [Ring α] : ∀ {f : α → α} {a : α} {n n' : ℤ} {d : ℕ},
    f = Neg.neg → IsRat a n d → Int.neg n = n' → IsRat (-a) n' d
  
goal: f = Neg.neg → Mathlib.Meta.NormNum.IsRat a n d → n.neg = n' → Mathlib.Meta.NormNum.IsRat (-a) n' d

full_name: Mathlib.Meta.NormNum.evalNeg
code: /-- The `norm_num` extension which identifies expressions of the form `-a`,
such that `norm_num` successfully recognises `a`. -/
@[norm_num -_] def evalNeg : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.evalNeg.core
code: /-- The `norm_num` extension which identifies expressions of the form `-a`,
such that `norm_num` successfully recognises `a`. -/
@[norm_num -_] def evalNeg : NormNumExt 
goal: Option (Mathlib.Meta.NormNum.Result e)

full_name: Mathlib.Meta.NormNum.isInt_sub
code: theorem isInt_sub {α} [Ring α] : ∀ {f : α → α → α} {a b : α} {a' b' c : ℤ},
    f = HSub.hSub → IsInt a a' → IsInt b b' → Int.sub a' b' = c → IsInt (f a b) c
  
goal: f = HSub.hSub →
  Mathlib.Meta.NormNum.IsInt a a' →
    Mathlib.Meta.NormNum.IsInt b b' → a'.sub b' = c → Mathlib.Meta.NormNum.IsInt (f a b) c

full_name: Mathlib.Meta.NormNum.isRat_sub
code: theorem isRat_sub {α} [Ring α] {f : α → α → α} {a b : α} {na nb nc : ℤ} {da db dc k : ℕ}
    (hf : f = HSub.hSub) (ra : IsRat a na da) (rb : IsRat b nb db)
    (h₁ : Int.sub (Int.mul na db) (Int.mul nb da) = Int.mul k nc)
    (h₂ : Nat.mul da db = Nat.mul k dc) :
    IsRat (f a b) nc dc 
goal: Mathlib.Meta.NormNum.IsRat (f a b) nc dc

full_name: Mathlib.Meta.NormNum.evalSub
code: /-- The `norm_num` extension which identifies expressions of the form `a - b` in a ring,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ - _] def evalSub : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.evalSub.core
code: /-- The `norm_num` extension which identifies expressions of the form `a - b` in a ring,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ - _] def evalSub : NormNumExt 
goal: Option (Mathlib.Meta.NormNum.Result e)

full_name: Mathlib.Meta.NormNum.isNat_mul
code: theorem isNat_mul {α} [Semiring α] : ∀ {f : α → α → α} {a b : α} {a' b' c : ℕ},
    f = HMul.hMul → IsNat a a' → IsNat b b' → Nat.mul a' b' = c → IsNat (a * b) c
  
goal: f = HMul.hMul →
  Mathlib.Meta.NormNum.IsNat a a' →
    Mathlib.Meta.NormNum.IsNat b b' → a'.mul b' = c → Mathlib.Meta.NormNum.IsNat (a * b) c

full_name: Mathlib.Meta.NormNum.isInt_mul
code: theorem isInt_mul {α} [Ring α] : ∀ {f : α → α → α} {a b : α} {a' b' c : ℤ},
    f = HMul.hMul → IsInt a a' → IsInt b b' → Int.mul a' b' = c → IsInt (a * b) c
  
goal: f = HMul.hMul →
  Mathlib.Meta.NormNum.IsInt a a' →
    Mathlib.Meta.NormNum.IsInt b b' → a'.mul b' = c → Mathlib.Meta.NormNum.IsInt (a * b) c

full_name: Mathlib.Meta.NormNum.isRat_mul
code: theorem isRat_mul {α} [Ring α] {f : α → α → α} {a b : α} {na nb nc : ℤ} {da db dc k : ℕ} :
    f = HMul.hMul → IsRat a na da → IsRat b nb db →
    Int.mul na nb = Int.mul k nc →
    Nat.mul da db = Nat.mul k dc →
    IsRat (f a b) nc dc 
goal: f = HMul.hMul →
  Mathlib.Meta.NormNum.IsRat a na da →
    Mathlib.Meta.NormNum.IsRat b nb db →
      na.mul nb = (↑k).mul nc → da.mul db = k.mul dc → Mathlib.Meta.NormNum.IsRat (f a b) nc dc

full_name: Mathlib.Meta.NormNum.evalMul.core
code: /-- The `norm_num` extension which identifies expressions of the form `a * b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ * _] def evalMul : NormNumExt 
goal: Option (Mathlib.Meta.NormNum.Result e)

full_name: Mathlib.Meta.NormNum.evalMul
code: /-- The `norm_num` extension which identifies expressions of the form `a * b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ * _] def evalMul : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.evalMul.core.intArm
code: /-- The `norm_num` extension which identifies expressions of the form `a * b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ * _] def evalMul : NormNumExt 
goal: Option (Mathlib.Meta.NormNum.Result e)

full_name: Mathlib.Meta.NormNum.evalMul.core.ratArm
code: /-- The `norm_num` extension which identifies expressions of the form `a * b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ * _] def evalMul : NormNumExt 
goal: Option (Mathlib.Meta.NormNum.Result e)

full_name: Mathlib.Meta.NormNum.isRat_div
code: theorem isRat_div {α : Type u} [DivisionRing α] : {a b : α} → {cn : ℤ} → {cd : ℕ} →
    IsRat (a * b⁻¹) cn cd → IsRat (a / b) cn cd
  
goal: Mathlib.Meta.NormNum.IsRat (a * b⁻¹) cn cd → Mathlib.Meta.NormNum.IsRat (a / b) cn cd

full_name: Mathlib.Meta.NormNum.inferDivisionRing
code: /-- Helper function to synthesize a typed `DivisionRing α` expression. -/
def inferDivisionRing {u : Level} (α : Q(Type u)) : MetaM Q(DivisionRing $α) 
goal: Lean.MetaM Q(DivisionRing «$α»)

full_name: Mathlib.Meta.NormNum.evalDiv
code: /-- The `norm_num` extension which identifies expressions of the form `a / b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ / _] def evalDiv : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.evalTrue
code: /-- The `norm_num` extension which identifies `True`. -/
@[norm_num True] def evalTrue : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.evalFalse
code: /-- The `norm_num` extension which identifies `False`. -/
@[norm_num False] def evalFalse : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.evalNot
code: /-- The `norm_num` extension which identifies expressions of the form `¬a`,
such that `norm_num` successfully recognises `a`. -/
@[norm_num ¬_] def evalNot : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isNat_eq_true
code: theorem isNat_eq_true [AddMonoidWithOne α] : {a b : α} → {c : ℕ} →
    IsNat a c → IsNat b c → a = b
  
goal: Mathlib.Meta.NormNum.IsNat a c → Mathlib.Meta.NormNum.IsNat b c → a = b

full_name: Mathlib.Meta.NormNum.ble_eq_false
code: theorem ble_eq_false {x y : ℕ} : x.ble y = false ↔ y < x 
goal: x.ble y = false ↔ y < x

full_name: Mathlib.Meta.NormNum.isInt_eq_true
code: theorem isInt_eq_true [Ring α] : {a b : α} → {z : ℤ} → IsInt a z → IsInt b z → a = b
  
goal: Mathlib.Meta.NormNum.IsInt a z → Mathlib.Meta.NormNum.IsInt b z → a = b

full_name: Mathlib.Meta.NormNum.isRat_eq_true
code: theorem isRat_eq_true [Ring α] : {a b : α} → {n : ℤ} → {d : ℕ} →
    IsRat a n d → IsRat b n d → a = b
  
goal: Mathlib.Meta.NormNum.IsRat a n d → Mathlib.Meta.NormNum.IsRat b n d → a = b

full_name: Mathlib.Meta.NormNum.eq_of_true
code: theorem eq_of_true {a b : Prop} (ha : a) (hb : b) : a = b 
goal: a = b

full_name: Mathlib.Meta.NormNum.ne_of_false_of_true
code: theorem ne_of_false_of_true {a b : Prop} (ha : ¬a) (hb : b) : a ≠ b 
goal: a ≠ b

full_name: Mathlib.Meta.NormNum.ne_of_true_of_false
code: theorem ne_of_true_of_false {a b : Prop} (ha : a) (hb : ¬b) : a ≠ b 
goal: a ≠ b

full_name: Mathlib.Meta.NormNum.eq_of_false
code: theorem eq_of_false {a b : Prop} (ha : ¬a) (hb : ¬b) : a = b 
goal: a = b

full_name: Mathlib.Meta.NormNum.isNat_natSucc
code: theorem isNat_natSucc : {a : ℕ} → {a' c : ℕ} →
    IsNat a a' → Nat.succ a' = c → IsNat (a.succ) c
  
goal: Mathlib.Meta.NormNum.IsNat a a' → a'.succ = c → Mathlib.Meta.NormNum.IsNat a.succ c

full_name: Mathlib.Meta.NormNum.evalNatSucc
code: /-- The `norm_num` extension which identifies expressions of the form `Nat.succ a`,
such that `norm_num` successfully recognises `a`. -/
@[norm_num Nat.succ _] def evalNatSucc : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isNat_natSub
code: theorem isNat_natSub : {a b : ℕ} → {a' b' c : ℕ} →
    IsNat a a' → IsNat b b' → Nat.sub a' b' = c → IsNat (a - b) c
  
goal: Mathlib.Meta.NormNum.IsNat a a' → Mathlib.Meta.NormNum.IsNat b b' → a'.sub b' = c → Mathlib.Meta.NormNum.IsNat (a - b) c

full_name: Mathlib.Meta.NormNum.evalNatSub
code: /-- The `norm_num` extension which identifies expressions of the form `Nat.sub a b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num (_ : ℕ) - _] def evalNatSub :
    NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isNat_natMod
code: theorem isNat_natMod : {a b : ℕ} → {a' b' c : ℕ} →
    IsNat a a' → IsNat b b' → Nat.mod a' b' = c → IsNat (a % b) c
  
goal: Mathlib.Meta.NormNum.IsNat a a' → Mathlib.Meta.NormNum.IsNat b b' → a'.mod b' = c → Mathlib.Meta.NormNum.IsNat (a % b) c

full_name: Mathlib.Meta.NormNum.evalNatMod
code: /-- The `norm_num` extension which identifies expressions of the form `Nat.mod a b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num (_ : ℕ) % _] def evalNatMod :
    NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isNat_natDiv
code: theorem isNat_natDiv : {a b : ℕ} → {a' b' c : ℕ} →
    IsNat a a' → IsNat b b' → Nat.div a' b' = c → IsNat (a / b) c
  
goal: Mathlib.Meta.NormNum.IsNat a a' → Mathlib.Meta.NormNum.IsNat b b' → a'.div b' = c → Mathlib.Meta.NormNum.IsNat (a / b) c

full_name: Mathlib.Meta.NormNum.evalNatDiv
code: /-- The `norm_num` extension which identifies expressions of the form `Nat.div a b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num (_ : ℕ) / _]
def evalNatDiv : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.isNat_dvd_true
code: theorem isNat_dvd_true : {a b : ℕ} → {a' b' : ℕ} →
    IsNat a a' → IsNat b b' → Nat.mod b' a' = nat_lit 0 → a ∣ b
  
goal: Mathlib.Meta.NormNum.IsNat a a' → Mathlib.Meta.NormNum.IsNat b b' → b'.mod a' = 0 → a ∣ b

full_name: Mathlib.Meta.NormNum.isNat_dvd_false
code: theorem isNat_dvd_false : {a b : ℕ} → {a' b' c : ℕ} →
    IsNat a a' → IsNat b b' → Nat.mod b' a' = Nat.succ c → ¬a ∣ b
  
goal: Mathlib.Meta.NormNum.IsNat a a' → Mathlib.Meta.NormNum.IsNat b b' → b'.mod a' = c.succ → ¬a ∣ b

full_name: Mathlib.Meta.NormNum.evalNatDvd
code: /-- The `norm_num` extension which identifies expressions of the form `(a : ℕ) | b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num (_ : ℕ) ∣ _] def evalNatDvd : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt