ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Rat.isSquare_natCast_iff
@[norm_cast, simp]
theorem isSquare_natCast_iff {n : ℕ} : IsSquare (n : ℚ) ↔ IsSquare n 
Arguments: {n : ℕ}
Goal: IsSquare ↑n ↔ IsSquare n
-- Rat.isSquare_intCast_iff
@[norm_cast, simp]
theorem isSquare_intCast_iff {z : ℤ} : IsSquare (z : ℚ) ↔ IsSquare z 
Arguments: {z : ℤ}
Goal: IsSquare ↑z ↔ IsSquare z
-- Rat.isSquare_ofNat_iff
@[simp]
theorem isSquare_ofNat_iff {n : ℕ} :
    IsSquare (no_index (OfNat.ofNat n) : ℚ) ↔ IsSquare (OfNat.ofNat n : ℕ) 
Arguments: {n : ℕ}
Goal: IsSquare (OfNat.ofNat n) ↔ IsSquare (OfNat.ofNat n)
-- Rat.exists_eq_mul_div_num_and_eq_mul_div_den
theorem exists_eq_mul_div_num_and_eq_mul_div_den (n : ℤ) {d : ℤ} (d_ne_zero : d ≠ 0) :
    ∃ c : ℤ, n = c * ((n : ℚ) / d).num ∧ (d : ℤ) = c * ((n : ℚ) / d).den 
Arguments: (n : ℤ) {d : ℤ} (d_ne_zero : d ≠ 0)
Goal: ∃ c, n = c * (↑n / ↑d).num ∧ d = c * ↑(↑n / ↑d).den
-- Rat.mul_num_den'
theorem mul_num_den' (q r : ℚ) :
    (q * r).num * q.den * r.den = q.num * r.num * (q * r).den 
Arguments: (q r : ℚ)
Goal: (q * r).num * ↑q.den * ↑r.den = q.num * r.num * ↑(q * r).den
-- Rat.add_num_den'
theorem add_num_den' (q r : ℚ) :
    (q + r).num * q.den * r.den = (q.num * r.den + r.num * q.den) * (q + r).den 
Arguments: (q r : ℚ)
Goal: (q + r).num * ↑q.den * ↑r.den = (q.num * ↑r.den + r.num * ↑q.den) * ↑(q + r).den
-- Rat.substr_num_den'
theorem substr_num_den' (q r : ℚ) :
    (q - r).num * q.den * r.den = (q.num * r.den - r.num * q.den) * (q - r).den 
Arguments: (q r : ℚ)
Goal: (q - r).num * ↑q.den * ↑r.den = (q.num * ↑r.den - r.num * ↑q.den) * ↑(q - r).den
-- Rat.inv_neg
protected theorem inv_neg (q : ℚ) : (-q)⁻¹ = -q⁻¹ 
Arguments: (q : ℚ)
Goal: (-q)⁻¹ = -q⁻¹
-- Rat.num_div_eq_of_coprime
theorem num_div_eq_of_coprime {a b : ℤ} (hb0 : 0 < b) (h : Nat.Coprime a.natAbs b.natAbs) :
    (a / b : ℚ).num = a 
Arguments: {a b : ℤ} (hb0 : 0 < b) (h : a.natAbs.Coprime b.natAbs)
Goal: (↑a / ↑b).num = a
-- Rat.den_div_eq_of_coprime
theorem den_div_eq_of_coprime {a b : ℤ} (hb0 : 0 < b) (h : Nat.Coprime a.natAbs b.natAbs) :
    ((a / b : ℚ).den : ℤ) = b 
Arguments: {a b : ℤ} (hb0 : 0 < b) (h : a.natAbs.Coprime b.natAbs)
Goal: ↑(↑a / ↑b).den = b
-- Rat.div_int_inj
theorem div_int_inj {a b c d : ℤ} (hb0 : 0 < b) (hd0 : 0 < d) (h1 : Nat.Coprime a.natAbs b.natAbs)
    (h2 : Nat.Coprime c.natAbs d.natAbs) (h : (a : ℚ) / b = (c : ℚ) / d) : a = c ∧ b = d 
Arguments: {a b c d : ℤ} (hb0 : 0 < b) (hd0 : 0 < d) (h1 : a.natAbs.Coprime b.natAbs) (h2 : c.natAbs.Coprime d.natAbs) (h : ↑a / ↑b = ↑c / ↑d)
Goal: a = c ∧ b = d
-- Rat.intCast_div_self
@[norm_cast]
theorem intCast_div_self (n : ℤ) : ((n / n : ℤ) : ℚ) = n / n 
Arguments: (n : ℤ)
Goal: ↑(n / n) = ↑n / ↑n
-- Rat.natCast_div_self
@[norm_cast]
theorem natCast_div_self (n : ℕ) : ((n / n : ℕ) : ℚ) = n / n 
Arguments: (n : ℕ)
Goal: ↑(n / n) = ↑n / ↑n
-- Rat.intCast_div
theorem intCast_div (a b : ℤ) (h : b ∣ a) : ((a / b : ℤ) : ℚ) = a / b 
Arguments: (a b : ℤ) (h : b ∣ a)
Goal: ↑(a / b) = ↑a / ↑b
-- Rat.natCast_div
theorem natCast_div (a b : ℕ) (h : b ∣ a) : ((a / b : ℕ) : ℚ) = a / b 
Arguments: (a b : ℕ) (h : b ∣ a)
Goal: ↑(a / b) = ↑a / ↑b
-- Rat.den_div_intCast_eq_one_iff
theorem den_div_intCast_eq_one_iff (m n : ℤ) (hn : n ≠ 0) : ((m : ℚ) / n).den = 1 ↔ n ∣ m 
Arguments: (m n : ℤ) (hn : n ≠ 0)
Goal: (↑m / ↑n).den = 1 ↔ n ∣ m
-- Rat.den_div_natCast_eq_one_iff
theorem den_div_natCast_eq_one_iff (m n : ℕ) (hn : n ≠ 0) : ((m : ℚ) / n).den = 1 ↔ n ∣ m 
Arguments: (m n : ℕ) (hn : n ≠ 0)
Goal: (↑m / ↑n).den = 1 ↔ n ∣ m
-- Rat.inv_intCast_num_of_pos
theorem inv_intCast_num_of_pos {a : ℤ} (ha0 : 0 < a) : (a : ℚ)⁻¹.num = 1 
Arguments: {a : ℤ} (ha0 : 0 < a)
Goal: (↑a)⁻¹.num = 1
-- Rat.inv_natCast_num_of_pos
theorem inv_natCast_num_of_pos {a : ℕ} (ha0 : 0 < a) : (a : ℚ)⁻¹.num = 1 
Arguments: {a : ℕ} (ha0 : 0 < a)
Goal: (↑a)⁻¹.num = 1
-- Rat.inv_intCast_den_of_pos
theorem inv_intCast_den_of_pos {a : ℤ} (ha0 : 0 < a) : ((a : ℚ)⁻¹.den : ℤ) = a 
Arguments: {a : ℤ} (ha0 : 0 < a)
Goal: ↑(↑a)⁻¹.den = a
-- Rat.inv_natCast_den_of_pos
theorem inv_natCast_den_of_pos {a : ℕ} (ha0 : 0 < a) : (a : ℚ)⁻¹.den = a 
Arguments: {a : ℕ} (ha0 : 0 < a)
Goal: (↑a)⁻¹.den = a
-- Rat.inv_intCast_num
@[simp]
theorem inv_intCast_num (a : ℤ) : (a : ℚ)⁻¹.num = Int.sign a 
Arguments: (a : ℤ)
Goal: (↑a)⁻¹.num = a.sign
-- Rat.inv_natCast_num
@[simp]
theorem inv_natCast_num (a : ℕ) : (a : ℚ)⁻¹.num = Int.sign a 
Arguments: (a : ℕ)
Goal: (↑a)⁻¹.num = (↑a).sign
-- Rat.inv_ofNat_num
@[simp]
theorem inv_ofNat_num (a : ℕ) [a.AtLeastTwo] : (no_index (OfNat.ofNat a : ℚ))⁻¹.num = 1 
Arguments: (a : ℕ) [a.AtLeastTwo]
Goal: (OfNat.ofNat a)⁻¹.num = 1
-- Rat.inv_intCast_den
@[simp]
theorem inv_intCast_den (a : ℤ) : (a : ℚ)⁻¹.den = if a = 0 then 1 else a.natAbs 
Arguments: (a : ℤ)
Goal: (↑a)⁻¹.den = if a = 0 then 1 else a.natAbs
-- Rat.inv_natCast_den
@[simp]
theorem inv_natCast_den (a : ℕ) : (a : ℚ)⁻¹.den = if a = 0 then 1 else a 
Arguments: (a : ℕ)
Goal: (↑a)⁻¹.den = if a = 0 then 1 else a
-- Rat.inv_ofNat_den
@[simp]
theorem inv_ofNat_den (a : ℕ) [a.AtLeastTwo] :
    (no_index (OfNat.ofNat a : ℚ))⁻¹.den = OfNat.ofNat a 
Arguments: (a : ℕ) [a.AtLeastTwo]
Goal: (OfNat.ofNat a)⁻¹.den = OfNat.ofNat a
-- Rat.forall
protected theorem «forall» {p : ℚ → Prop} : (∀ r, p r) ↔ ∀ a b : ℤ, p (a / b) 
Arguments: {p : ℚ → Prop}
Goal: (∀ (r : ℚ), p r) ↔ ∀ (a b : ℤ), p (↑a / ↑b)
-- Rat.exists
protected theorem «exists» {p : ℚ → Prop} : (∃ r, p r) ↔ ∃ a b : ℤ, p (a / b) 
Arguments: {p : ℚ → Prop}
Goal: (∃ r, p r) ↔ ∃ a b, p (↑a / ↑b)
-- Rat.coe_pnatDen
@[simp]
theorem coe_pnatDen (x : ℚ) : (x.pnatDen : ℕ) = x.den 
Arguments: (x : ℚ)
Goal: ↑x.pnatDen = x.den
-- Rat.pnatDen_eq_iff_den_eq
theorem pnatDen_eq_iff_den_eq {x : ℚ} {n : ℕ+} : x.pnatDen = n ↔ x.den = ↑n 
Arguments: {x : ℚ} {n : ℕ+}
Goal: x.pnatDen = n ↔ x.den = ↑n
-- Rat.pnatDen_one
@[simp]
theorem pnatDen_one : (1 : ℚ).pnatDen = 1 
Goal: Rat.pnatDen 1 = 1
-- Rat.pnatDen_zero
@[simp]
theorem pnatDen_zero : (0 : ℚ).pnatDen = 1 
Goal: Rat.pnatDen 0 = 1
-- Rat.pos
theorem pos (a : ℚ) : 0 < a.den 
Arguments: (a : ℚ)
Goal: 0 < a.den
-- Rat.mk'_num_den
lemma mk'_num_den (q : ℚ) : mk' q.num q.den q.den_nz q.reduced = q 
Arguments: (q : ℚ)
Goal: { num := q.num, den := q.den, den_nz := ⋯, reduced := ⋯ } = q
-- Rat.ofInt_eq_cast
@[simp]
theorem ofInt_eq_cast (n : ℤ) : ofInt n = Int.cast n 
Arguments: (n : ℤ)
Goal: Rat.ofInt n = ↑n
-- Rat.num_ofNat
@[simp] lemma num_ofNat (n : ℕ) : num (no_index (OfNat.ofNat n)) = OfNat.ofNat n 
Arguments: (n : ℕ)
Goal: (OfNat.ofNat n).num = OfNat.ofNat n
-- Rat.den_ofNat
@[simp] lemma den_ofNat (n : ℕ) : den (no_index (OfNat.ofNat n)) = 1 
Arguments: (n : ℕ)
Goal: (OfNat.ofNat n).den = 1
-- Rat.num_natCast
@[simp, norm_cast] lemma num_natCast (n : ℕ) : num n = n 
Arguments: (n : ℕ)
Goal: (↑n).num = ↑n
-- Rat.den_natCast
@[simp, norm_cast] lemma den_natCast (n : ℕ) : den n = 1 
Arguments: (n : ℕ)
Goal: (↑n).den = 1
-- Rat.num_intCast
@[simp, norm_cast] lemma num_intCast (n : ℤ) : (n : ℚ).num = n 
Arguments: (n : ℤ)
Goal: (↑n).num = n
-- Rat.den_intCast
@[simp, norm_cast] lemma den_intCast (n : ℤ) : (n : ℚ).den = 1 
Arguments: (n : ℤ)
Goal: (↑n).den = 1
-- Rat.intCast_injective
lemma intCast_injective : Injective (Int.cast : ℤ → ℚ) 
Goal: Function.Injective Int.cast
-- Rat.natCast_injective
lemma natCast_injective : Injective (Nat.cast : ℕ → ℚ) 
Goal: Function.Injective Nat.cast
-- Rat.natCast_inj
@[simp, nolint simpNF, norm_cast] lemma natCast_inj {m n : ℕ} : (m : ℚ) = n ↔ m = n 
Arguments: {m n : ℕ}
Goal: ↑m = ↑n ↔ m = n
-- Rat.intCast_eq_zero
@[simp, nolint simpNF, norm_cast] lemma intCast_eq_zero {n : ℤ} : (n : ℚ) = 0 ↔ n = 0 
Arguments: {n : ℤ}
Goal: ↑n = 0 ↔ n = 0
-- Rat.natCast_eq_zero
@[simp, nolint simpNF, norm_cast] lemma natCast_eq_zero {n : ℕ} : (n : ℚ) = 0 ↔ n = 0 
Arguments: {n : ℕ}
Goal: ↑n = 0 ↔ n = 0
-- Rat.intCast_eq_one
@[simp, nolint simpNF, norm_cast] lemma intCast_eq_one {n : ℤ} : (n : ℚ) = 1 ↔ n = 1 
Arguments: {n : ℤ}
Goal: ↑n = 1 ↔ n = 1
-- Rat.natCast_eq_one
@[simp, nolint simpNF, norm_cast] lemma natCast_eq_one {n : ℕ} : (n : ℚ) = 1 ↔ n = 1 
Arguments: {n : ℕ}
Goal: ↑n = 1 ↔ n = 1
-- Rat.mkRat_eq_divInt
lemma mkRat_eq_divInt (n d) : mkRat n d = n /. d 
Arguments: (n : ℤ) (d : ℕ)
Goal: mkRat n d = Rat.divInt n ↑d
-- Rat.mk'_zero
@[simp] lemma mk'_zero (d) (h : d ≠ 0) (w) : mk' 0 d h w = 0 
Arguments: (d : ℕ) (h : d ≠ 0) (w : (Int.natAbs 0).Coprime d)
Goal: { num := 0, den := d, den_nz := h, reduced := w } = 0
-- Rat.num_eq_zero
@[simp]
lemma num_eq_zero {q : ℚ} : q.num = 0 ↔ q = 0 
Arguments: {q : ℚ}
Goal: q.num = 0 ↔ q = 0
-- Rat.num_ne_zero
lemma num_ne_zero {q : ℚ} : q.num ≠ 0 ↔ q ≠ 0 
Arguments: {q : ℚ}
Goal: q.num ≠ 0 ↔ q ≠ 0
-- Rat.den_ne_zero
@[simp] lemma den_ne_zero (q : ℚ) : q.den ≠ 0 
Arguments: (q : ℚ)
Goal: q.den ≠ 0
-- Rat.num_nonneg
@[simp] lemma num_nonneg : 0 ≤ q.num ↔ 0 ≤ q 
Arguments: {q : ℚ}
Goal: 0 ≤ q.num ↔ 0 ≤ q
-- Rat.divInt_eq_zero
@[simp]
theorem divInt_eq_zero {a b : ℤ} (b0 : b ≠ 0) : a /. b = 0 ↔ a = 0 
Arguments: {a b : ℤ} (b0 : b ≠ 0)
Goal: Rat.divInt a b = 0 ↔ a = 0
-- Rat.divInt_ne_zero
theorem divInt_ne_zero {a b : ℤ} (b0 : b ≠ 0) : a /. b ≠ 0 ↔ a ≠ 0 
Arguments: {a b : ℤ} (b0 : b ≠ 0)
Goal: Rat.divInt a b ≠ 0 ↔ a ≠ 0
-- Rat.normalize_eq_mk'
theorem normalize_eq_mk' (n : Int) (d : Nat) (h : d ≠ 0) (c : Nat.gcd (Int.natAbs n) d = 1) :
    normalize n d h = mk' n d h c 
Arguments: (n : ℤ) (d : ℕ) (h : d ≠ 0) (c : n.natAbs.gcd d = 1)
Goal: Rat.normalize n d h = { num := n, den := d, den_nz := h, reduced := c }
-- Rat.num_divInt_den
lemma num_divInt_den (q : ℚ) : q.num /. q.den = q 
Arguments: (q : ℚ)
Goal: Rat.divInt q.num ↑q.den = q
-- Rat.mk'_eq_divInt
lemma mk'_eq_divInt {n d h c} : (⟨n, d, h, c⟩ : ℚ) = n /. d 
Arguments: {n : ℤ} {d : ℕ} {h : d ≠ 0} {c : n.natAbs.Coprime d}
Goal: { num := n, den := d, den_nz := h, reduced := c } = Rat.divInt n ↑d
-- Rat.intCast_eq_divInt
theorem intCast_eq_divInt (z : ℤ) : (z : ℚ) = z /. 1 
Arguments: (z : ℤ)
Goal: ↑z = Rat.divInt z 1
-- Rat.divInt_self'
@[simp] lemma divInt_self' {n : ℤ} (hn : n ≠ 0) : n /. n = 1 
Arguments: {n : ℤ} (hn : n ≠ 0)
Goal: Rat.divInt n n = 1
-- Rat.lift_binop_eq
theorem lift_binop_eq (f : ℚ → ℚ → ℚ) (f₁ : ℤ → ℤ → ℤ → ℤ → ℤ) (f₂ : ℤ → ℤ → ℤ → ℤ → ℤ)
    (fv :
      ∀ {n₁ d₁ h₁ c₁ n₂ d₂ h₂ c₂},
        f ⟨n₁, d₁, h₁, c₁⟩ ⟨n₂, d₂, h₂, c₂⟩ = f₁ n₁ d₁ n₂ d₂ /. f₂ n₁ d₁ n₂ d₂)
    (f0 : ∀ {n₁ d₁ n₂ d₂}, d₁ ≠ 0 → d₂ ≠ 0 → f₂ n₁ d₁ n₂ d₂ ≠ 0) (a b c d : ℤ)
    (b0 : b ≠ 0) (d0 : d ≠ 0)
    (H :
      ∀ {n₁ d₁ n₂ d₂}, a * d₁ = n₁ * b → c * d₂ = n₂ * d →
        f₁ n₁ d₁ n₂ d₂ * f₂ a b c d = f₁ a b c d * f₂ n₁ d₁ n₂ d₂) :
    f (a /. b) (c /. d) = f₁ a b c d /. f₂ a b c d 
Arguments: (f : ℚ → ℚ → ℚ) (f₁ f₂ : ℤ → ℤ → ℤ → ℤ → ℤ) (fv :
  ∀ {n₁ : ℤ} {d₁ : ℕ} {h₁ : d₁ ≠ 0} {c₁ : n₁.natAbs.Coprime d₁} {n₂ : ℤ} {d₂ : ℕ} {h₂ : d₂ ≠ 0}
    {c₂ : n₂.natAbs.Coprime d₂},
    f { num := n₁, den := d₁, den_nz := h₁, reduced := c₁ } { num := n₂, den := d₂, den_nz := h₂, reduced := c₂ } =
      Rat.divInt (f₁ n₁ (↑d₁) n₂ ↑d₂) (f₂ n₁ (↑d₁) n₂ ↑d₂)) (f0 : ∀ {n₁ d₁ n₂ d₂ : ℤ}, d₁ ≠ 0 → d₂ ≠ 0 → f₂ n₁ d₁ n₂ d₂ ≠ 0) (a b c d : ℤ) (b0 : b ≠ 0) (d0 : d ≠ 0) (H : ∀ {n₁ d₁ n₂ d₂ : ℤ}, a * d₁ = n₁ * b → c * d₂ = n₂ * d → f₁ n₁ d₁ n₂ d₂ * f₂ a b c d = f₁ a b c d * f₂ n₁ d₁ n₂ d₂)
Goal: f (Rat.divInt a b) (Rat.divInt c d) = Rat.divInt (f₁ a b c d) (f₂ a b c d)
-- Rat.add_def''
@[deprecated divInt_add_divInt (since := "2024-03-18")]
theorem add_def'' {a b c d : ℤ} (b0 : b ≠ 0) (d0 : d ≠ 0) :
    a /. b + c /. d = (a * d + c * b) /. (b * d) 
Arguments: {a b c d : ℤ} (b0 : b ≠ 0) (d0 : d ≠ 0)
Goal: Rat.divInt a b + Rat.divInt c d = Rat.divInt (a * d + c * b) (b * d)
-- Rat.neg_def
lemma neg_def (q : ℚ) : -q = -q.num /. q.den 
Arguments: (q : ℚ)
Goal: -q = Rat.divInt (-q.num) ↑q.den
-- Rat.divInt_neg
@[simp] lemma divInt_neg (n d : ℤ) : n /. -d = -n /. d 
Arguments: (n d : ℤ)
Goal: Rat.divInt n (-d) = Rat.divInt (-n) d
-- Rat.sub_def''
@[deprecated divInt_sub_divInt (since := "2024-03-18")]
lemma sub_def'' {a b c d : ℤ} (b0 : b ≠ 0) (d0 : d ≠ 0) :
    a /. b - c /. d = (a * d - c * b) /. (b * d) 
Arguments: {a b c d : ℤ} (b0 : b ≠ 0) (d0 : d ≠ 0)
Goal: Rat.divInt a b - Rat.divInt c d = Rat.divInt (a * d - c * b) (b * d)
-- Rat.divInt_mul_divInt'
@[simp]
lemma divInt_mul_divInt' (n₁ d₁ n₂ d₂ : ℤ) : (n₁ /. d₁) * (n₂ /. d₂) = (n₁ * n₂) /. (d₁ * d₂) 
Arguments: (n₁ d₁ n₂ d₂ : ℤ)
Goal: Rat.divInt n₁ d₁ * Rat.divInt n₂ d₂ = Rat.divInt (n₁ * n₂) (d₁ * d₂)
-- Rat.mk'_mul_mk'
lemma mk'_mul_mk' (n₁ n₂ : ℤ) (d₁ d₂ : ℕ) (hd₁ hd₂ hnd₁ hnd₂) (h₁₂ : n₁.natAbs.Coprime d₂)
    (h₂₁ : n₂.natAbs.Coprime d₁) :
    mk' n₁ d₁ hd₁ hnd₁ * mk' n₂ d₂ hd₂ hnd₂ = mk' (n₁ * n₂) (d₁ * d₂) (Nat.mul_ne_zero hd₁ hd₂) (by
      rw [Int.natAbs_mul]; exact (hnd₁.mul h₂₁).mul_right (h₁₂.mul hnd₂)) 
Arguments: (n₁ n₂ : ℤ) (d₁ d₂ : ℕ) (hd₁ : d₁ ≠ 0) (hd₂ : d₂ ≠ 0) (hnd₁ : n₁.natAbs.Coprime d₁) (hnd₂ : n₂.natAbs.Coprime d₂) (h₁₂ : n₁.natAbs.Coprime d₂) (h₂₁ : n₂.natAbs.Coprime d₁)
Goal: { num := n₁, den := d₁, den_nz := hd₁, reduced := hnd₁ } * { num := n₂, den := d₂, den_nz := hd₂, reduced := hnd₂ } =
  { num := n₁ * n₂, den := d₁ * d₂, den_nz := ⋯, reduced := ⋯ }
-- Rat.mul_eq_mkRat
lemma mul_eq_mkRat (q r : ℚ) : q * r = mkRat (q.num * r.num) (q.den * r.den) 
Arguments: (q r : ℚ)
Goal: q * r = mkRat (q.num * r.num) (q.den * r.den)
-- Rat.pow_def
lemma pow_def (q : ℚ) (n : ℕ) :
    q ^ n = ⟨q.num ^ n, q.den ^ n,
      by simp [Nat.pow_eq_zero],
      by rw [Int.natAbs_pow]; exact q.reduced.pow _ _⟩ 
Arguments: (q : ℚ) (n : ℕ)
Goal: q ^ n = { num := q.num ^ n, den := q.den ^ n, den_nz := ⋯, reduced := ⋯ }
-- Rat.pow_eq_mkRat
lemma pow_eq_mkRat (q : ℚ) (n : ℕ) : q ^ n = mkRat (q.num ^ n) (q.den ^ n) 
Arguments: (q : ℚ) (n : ℕ)
Goal: q ^ n = mkRat (q.num ^ n) (q.den ^ n)
-- Rat.pow_eq_divInt
lemma pow_eq_divInt (q : ℚ) (n : ℕ) : q ^ n = q.num ^ n /. q.den ^ n 
Arguments: (q : ℚ) (n : ℕ)
Goal: q ^ n = Rat.divInt (q.num ^ n) (↑q.den ^ n)
-- Rat.num_pow
@[simp] lemma num_pow (q : ℚ) (n : ℕ) : (q ^ n).num = q.num ^ n 
Arguments: (q : ℚ) (n : ℕ)
Goal: (q ^ n).num = q.num ^ n
-- Rat.den_pow
@[simp] lemma den_pow (q : ℚ) (n : ℕ) : (q ^ n).den = q.den ^ n 
Arguments: (q : ℚ) (n : ℕ)
Goal: (q ^ n).den = q.den ^ n
-- Rat.mk'_pow
@[simp] lemma mk'_pow (num : ℤ) (den : ℕ) (hd hdn) (n : ℕ) :
    mk' num den hd hdn ^ n = mk' (num ^ n) (den ^ n)
      (by simp [Nat.pow_eq_zero, hd]) (by rw [Int.natAbs_pow]; exact hdn.pow _ _) 
Arguments: (num : ℤ) (den : ℕ) (hd : den ≠ 0) (hdn : num.natAbs.Coprime den) (n : ℕ)
Goal: { num := num, den := den, den_nz := hd, reduced := hdn } ^ n =
  { num := num ^ n, den := den ^ n, den_nz := ⋯, reduced := ⋯ }
-- Rat.inv_divInt'
@[simp] lemma inv_divInt' (a b : ℤ) : (a /. b)⁻¹ = b /. a 
Arguments: (a b : ℤ)
Goal: (Rat.divInt a b)⁻¹ = Rat.divInt b a
-- Rat.inv_mkRat
@[simp] lemma inv_mkRat (a : ℤ) (b : ℕ) : (mkRat a b)⁻¹ = b /. a 
Arguments: (a : ℤ) (b : ℕ)
Goal: (mkRat a b)⁻¹ = Rat.divInt (↑b) a
-- Rat.inv_def'
lemma inv_def' (q : ℚ) : q⁻¹ = q.den /. q.num 
Arguments: (q : ℚ)
Goal: q⁻¹ = Rat.divInt (↑q.den) q.num
-- Rat.divInt_div_divInt
@[simp] lemma divInt_div_divInt (n₁ d₁ n₂ d₂) :
    (n₁ /. d₁) / (n₂ /. d₂) = (n₁ * d₂) /. (d₁ * n₂) 
Arguments: (n₁ d₁ n₂ d₂ : ℤ)
Goal: Rat.divInt n₁ d₁ / Rat.divInt n₂ d₂ = Rat.divInt (n₁ * d₂) (d₁ * n₂)
-- Rat.div_def'
lemma div_def' (q r : ℚ) : q / r = (q.num * r.den) /. (q.den * r.num) 
Arguments: (q r : ℚ)
Goal: q / r = Rat.divInt (q.num * ↑r.den) (↑q.den * r.num)
-- Rat.add_zero
protected lemma add_zero : a + 0 = a 
Arguments: (a : ℚ)
Goal: a + 0 = a
-- Rat.zero_add
protected lemma zero_add : 0 + a = a 
Arguments: (a : ℚ)
Goal: 0 + a = a
-- Rat.add_comm
protected lemma add_comm : a + b = b + a 
Arguments: (a b : ℚ)
Goal: a + b = b + a
-- Rat.add_assoc
protected theorem add_assoc : a + b + c = a + (b + c) 
Arguments: (a b c : ℚ)
Goal: a + b + c = a + (b + c)
-- Rat.add_left_neg
protected lemma add_left_neg : -a + a = 0 
Arguments: (a : ℚ)
Goal: -a + a = 0
-- Rat.divInt_zero_one
@[deprecated zero_divInt (since := "2024-03-18")]
lemma divInt_zero_one : 0 /. 1 = 0 
Goal: Rat.divInt 0 1 = 0
-- Rat.divInt_one
@[simp] lemma divInt_one (n : ℤ) : n /. 1 = n 
Arguments: (n : ℤ)
Goal: Rat.divInt n 1 = ↑n
-- Rat.mkRat_one
@[simp] lemma mkRat_one (n : ℤ) : mkRat n 1 = n 
Arguments: (n : ℤ)
Goal: mkRat n 1 = ↑n
-- Rat.divInt_one_one
lemma divInt_one_one : 1 /. 1 = 1 
Goal: Rat.divInt 1 1 = 1
-- Rat.divInt_neg_one_one
@[deprecated divInt_one (since := "2024-03-18")]
lemma divInt_neg_one_one : -1 /. 1 = -1 
Goal: Rat.divInt (-1) 1 = -1
-- Rat.mul_assoc
protected theorem mul_assoc : a * b * c = a * (b * c) 
Arguments: (a b c : ℚ)
Goal: a * b * c = a * (b * c)
-- Rat.add_mul
protected theorem add_mul : (a + b) * c = a * c + b * c 
Arguments: (a b c : ℚ)
Goal: (a + b) * c = a * c + b * c
-- Rat.mul_add
protected theorem mul_add : a * (b + c) = a * b + a * c 
Arguments: (a b c : ℚ)
Goal: a * (b + c) = a * b + a * c
-- Rat.zero_ne_one
protected theorem zero_ne_one : 0 ≠ (1 : ℚ) 
Goal: 0 ≠ 1
-- Rat.mul_inv_cancel
protected theorem mul_inv_cancel : a ≠ 0 → a * a⁻¹ = 1 
Arguments: (a : ℚ)
Goal: a ≠ 0 → a * a⁻¹ = 1
-- Rat.inv_mul_cancel
protected theorem inv_mul_cancel (h : a ≠ 0) : a⁻¹ * a = 1 
Arguments: (a : ℚ) (h : a ≠ 0)
Goal: a⁻¹ * a = 1
-- Rat.eq_iff_mul_eq_mul
theorem eq_iff_mul_eq_mul {p q : ℚ} : p = q ↔ p.num * q.den = q.num * p.den 
Arguments: {p q : ℚ}
Goal: p = q ↔ p.num * ↑q.den = q.num * ↑p.den
-- Rat.den_neg_eq_den
@[simp]
theorem den_neg_eq_den (q : ℚ) : (-q).den = q.den 
Arguments: (q : ℚ)
Goal: (-q).den = q.den
-- Rat.num_neg_eq_neg_num
@[simp]
theorem num_neg_eq_neg_num (q : ℚ) : (-q).num = -q.num 
Arguments: (q : ℚ)
Goal: (-q).num = -q.num
-- Rat.num_zero
@[simp]
theorem num_zero : Rat.num 0 = 0 
Goal: Rat.num 0 = 0
-- Rat.den_zero
@[simp]
theorem den_zero : Rat.den 0 = 1 
Goal: Rat.den 0 = 1
-- Rat.zero_of_num_zero
lemma zero_of_num_zero {q : ℚ} (hq : q.num = 0) : q = 0 
Arguments: {q : ℚ} (hq : q.num = 0)
Goal: q = 0
-- Rat.zero_iff_num_zero
theorem zero_iff_num_zero {q : ℚ} : q = 0 ↔ q.num = 0 
Arguments: {q : ℚ}
Goal: q = 0 ↔ q.num = 0
-- Rat.num_one
@[simp]
theorem num_one : (1 : ℚ).num = 1 
Goal: Rat.num 1 = 1
-- Rat.den_one
@[simp]
theorem den_one : (1 : ℚ).den = 1 
Goal: Rat.den 1 = 1
-- Rat.mk_num_ne_zero_of_ne_zero
theorem mk_num_ne_zero_of_ne_zero {q : ℚ} {n d : ℤ} (hq : q ≠ 0) (hqnd : q = n /. d) : n ≠ 0 
Arguments: {q : ℚ} {n d : ℤ} (hq : q ≠ 0) (hqnd : q = Rat.divInt n d)
Goal: n ≠ 0
-- Rat.mk_denom_ne_zero_of_ne_zero
theorem mk_denom_ne_zero_of_ne_zero {q : ℚ} {n d : ℤ} (hq : q ≠ 0) (hqnd : q = n /. d) : d ≠ 0 
Arguments: {q : ℚ} {n d : ℤ} (hq : q ≠ 0) (hqnd : q = Rat.divInt n d)
Goal: d ≠ 0
-- Rat.divInt_ne_zero_of_ne_zero
theorem divInt_ne_zero_of_ne_zero {n d : ℤ} (h : n ≠ 0) (hd : d ≠ 0) : n /. d ≠ 0 
Arguments: {n d : ℤ} (h : n ≠ 0) (hd : d ≠ 0)
Goal: Rat.divInt n d ≠ 0
-- Rat.nonneg_antisymm
protected lemma nonneg_antisymm : 0 ≤ q → 0 ≤ -q → q = 0 
Arguments: {q : ℚ}
Goal: 0 ≤ q → 0 ≤ -q → q = 0
-- Rat.nonneg_total
protected lemma nonneg_total (a : ℚ) : 0 ≤ a ∨ 0 ≤ -a 
Arguments: (a : ℚ)
Goal: 0 ≤ a ∨ 0 ≤ -a
-- Rat.add_divInt
protected theorem add_divInt (a b c : ℤ) : (a + b) /. c = a /. c + b /. c 
Arguments: (a b c : ℤ)
Goal: Rat.divInt (a + b) c = Rat.divInt a c + Rat.divInt b c
-- Rat.divInt_eq_div
theorem divInt_eq_div (n d : ℤ) : n /. d = (n : ℚ) / d 
Arguments: (n d : ℤ)
Goal: Rat.divInt n d = ↑n / ↑d
-- Rat.intCast_div_eq_divInt
lemma intCast_div_eq_divInt (n d : ℤ) : (n : ℚ) / (d) = n /. d 
Arguments: (n d : ℤ)
Goal: ↑n / ↑d = Rat.divInt n d
-- Rat.natCast_div_eq_divInt
theorem natCast_div_eq_divInt (n d : ℕ) : (n : ℚ) / d = n /. d 
Arguments: (n d : ℕ)
Goal: ↑n / ↑d = Rat.divInt ↑n ↑d
-- Rat.divInt_mul_divInt_cancel
theorem divInt_mul_divInt_cancel {x : ℤ} (hx : x ≠ 0) (n d : ℤ) : n /. x * (x /. d) = n /. d 
Arguments: {x : ℤ} (hx : x ≠ 0) (n d : ℤ)
Goal: Rat.divInt n x * Rat.divInt x d = Rat.divInt n d
-- Rat.coe_int_num_of_den_eq_one
theorem coe_int_num_of_den_eq_one {q : ℚ} (hq : q.den = 1) : (q.num : ℚ) = q 
Arguments: {q : ℚ} (hq : q.den = 1)
Goal: ↑q.num = q
-- Rat.eq_num_of_isInt
lemma eq_num_of_isInt {q : ℚ} (h : q.isInt) : q = q.num 
Arguments: {q : ℚ} (h : q.isInt = true)
Goal: q = ↑q.num
-- Rat.den_eq_one_iff
theorem den_eq_one_iff (r : ℚ) : r.den = 1 ↔ ↑r.num = r 
Arguments: (r : ℚ)
Goal: r.den = 1 ↔ ↑r.num = r
-- Rat.coe_int_inj
theorem coe_int_inj (m n : ℤ) : (m : ℚ) = n ↔ m = n 
Arguments: (m n : ℤ)
Goal: ↑m = ↑n ↔ m = n
-- NNRat.cast_natCast
@[simp, norm_cast] lemma cast_natCast (n : ℕ) : ((n : ℚ≥0) : α) = n 
Arguments: {α : Type u_3} [DivisionSemiring α] (n : ℕ)
Goal: ↑↑n = ↑n
-- NNRat.cast_ofNat
@[simp, norm_cast] lemma cast_ofNat (n : ℕ) [n.AtLeastTwo] :
    no_index (OfNat.ofNat n : ℚ≥0) = (OfNat.ofNat n : α) 
Arguments: {α : Type u_3} [DivisionSemiring α] (n : ℕ) [n.AtLeastTwo]
Goal: ↑(OfNat.ofNat n) = OfNat.ofNat n
-- NNRat.cast_zero
@[simp, norm_cast] lemma cast_zero : ((0 : ℚ≥0) : α) = 0 
Arguments: {α : Type u_3} [DivisionSemiring α]
Goal: ↑0 = 0
-- NNRat.cast_one
@[simp, norm_cast] lemma cast_one : ((1 : ℚ≥0) : α) = 1 
Arguments: {α : Type u_3} [DivisionSemiring α]
Goal: ↑1 = 1
-- NNRat.cast_commute
lemma cast_commute (q : ℚ≥0) (a : α) : Commute (↑q) a 
Arguments: {α : Type u_3} [DivisionSemiring α] (q : ℚ≥0) (a : α)
Goal: Commute (↑q) a
-- NNRat.commute_cast
lemma commute_cast (a : α) (q : ℚ≥0) : Commute a q 
Arguments: {α : Type u_3} [DivisionSemiring α] (a : α) (q : ℚ≥0)
Goal: Commute a ↑q
-- NNRat.cast_comm
lemma cast_comm (q : ℚ≥0) (a : α) : q * a = a * q 
Arguments: {α : Type u_3} [DivisionSemiring α] (q : ℚ≥0) (a : α)
Goal: ↑q * a = a * ↑q
-- NNRat.cast_divNat_of_ne_zero
@[norm_cast] lemma cast_divNat_of_ne_zero (a : ℕ) {b : ℕ} (hb : (b : α) ≠ 0) :
    divNat a b = (a / b : α) 
Arguments: {α : Type u_3} [DivisionSemiring α] (a : ℕ) {b : ℕ} (hb : ↑b ≠ 0)
Goal: ↑(NNRat.divNat a b) = ↑a / ↑b
-- NNRat.cast_add_of_ne_zero
@[norm_cast]
lemma cast_add_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
    ↑(q + r) = (q + r : α) 
Arguments: {α : Type u_3} [DivisionSemiring α] {q r : ℚ≥0} (hq : ↑q.den ≠ 0) (hr : ↑r.den ≠ 0)
Goal: ↑(q + r) = ↑q + ↑r
-- NNRat.cast_mul_of_ne_zero
@[norm_cast]
lemma cast_mul_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
    ↑(q * r) = (q * r : α) 
Arguments: {α : Type u_3} [DivisionSemiring α] {q r : ℚ≥0} (hq : ↑q.den ≠ 0) (hr : ↑r.den ≠ 0)
Goal: ↑(q * r) = ↑q * ↑r
-- NNRat.cast_inv_of_ne_zero
@[norm_cast]
lemma cast_inv_of_ne_zero (hq : (q.num : α) ≠ 0) : (q⁻¹ : ℚ≥0) = (q⁻¹ : α) 
Arguments: {α : Type u_3} [DivisionSemiring α] {q : ℚ≥0} (hq : ↑q.num ≠ 0)
Goal: ↑q⁻¹ = (↑q)⁻¹
-- NNRat.cast_div_of_ne_zero
@[norm_cast]
lemma cast_div_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.num : α) ≠ 0) :
    ↑(q / r) = (q / r : α) 
Arguments: {α : Type u_3} [DivisionSemiring α] {q r : ℚ≥0} (hq : ↑q.den ≠ 0) (hr : ↑r.num ≠ 0)
Goal: ↑(q / r) = ↑q / ↑r
-- Rat.cast_intCast
@[simp, norm_cast]
theorem cast_intCast (n : ℤ) : ((n : ℚ) : α) = n 
Arguments: {α : Type u_3} [DivisionRing α] (n : ℤ)
Goal: ↑↑n = ↑n
-- Rat.cast_natCast
@[simp, norm_cast]
theorem cast_natCast (n : ℕ) : ((n : ℚ) : α) = n 
Arguments: {α : Type u_3} [DivisionRing α] (n : ℕ)
Goal: ↑↑n = ↑n
-- Rat.cast_ofNat
@[simp, norm_cast] lemma cast_ofNat (n : ℕ) [n.AtLeastTwo] :
    ((no_index (OfNat.ofNat n : ℚ)) : α) = (OfNat.ofNat n : α) 
Arguments: {α : Type u_3} [DivisionRing α] (n : ℕ) [n.AtLeastTwo]
Goal: ↑(OfNat.ofNat n) = OfNat.ofNat n
-- Rat.cast_zero
@[simp, norm_cast]
theorem cast_zero : ((0 : ℚ) : α) = 0 
Arguments: {α : Type u_3} [DivisionRing α]
Goal: ↑0 = 0
-- Rat.cast_one
@[simp, norm_cast]
theorem cast_one : ((1 : ℚ) : α) = 1 
Arguments: {α : Type u_3} [DivisionRing α]
Goal: ↑1 = 1
-- Rat.cast_commute
theorem cast_commute (r : ℚ) (a : α) : Commute (↑r) a 
Arguments: {α : Type u_3} [DivisionRing α] (r : ℚ) (a : α)
Goal: Commute (↑r) a
-- Rat.cast_comm
theorem cast_comm (r : ℚ) (a : α) : (r : α) * a = a * r 
Arguments: {α : Type u_3} [DivisionRing α] (r : ℚ) (a : α)
Goal: ↑r * a = a * ↑r
-- Rat.commute_cast
theorem commute_cast (a : α) (r : ℚ) : Commute a r 
Arguments: {α : Type u_3} [DivisionRing α] (a : α) (r : ℚ)
Goal: Commute a ↑r
-- Rat.cast_divInt_of_ne_zero
@[norm_cast]
lemma cast_divInt_of_ne_zero (a : ℤ) {b : ℤ} (b0 : (b : α) ≠ 0) : (a /. b : α) = a / b 
Arguments: {α : Type u_3} [DivisionRing α] (a : ℤ) {b : ℤ} (b0 : ↑b ≠ 0)
Goal: ↑(a /. b) = ↑a / ↑b