File: Mathlib/Data/Rat/Cast/Defs.lean

full_name: NNRat.cast_natCast
code: @[simp, norm_cast] lemma cast_natCast (n : ℕ) : ((n : ℚ≥0) : α) = n 
goal: ↑↑n = ↑n

full_name: NNRat.cast_ofNat
code: @[simp, norm_cast] lemma cast_ofNat (n : ℕ) [n.AtLeastTwo] :
    no_index (OfNat.ofNat n : ℚ≥0) = (OfNat.ofNat n : α) 
goal: ↑(OfNat.ofNat n) = OfNat.ofNat n

full_name: NNRat.cast_zero
code: @[simp, norm_cast] lemma cast_zero : ((0 : ℚ≥0) : α) = 0 
goal: ↑0 = 0

full_name: NNRat.cast_one
code: @[simp, norm_cast] lemma cast_one : ((1 : ℚ≥0) : α) = 1 
goal: ↑1 = 1

full_name: NNRat.cast_commute
code: lemma cast_commute (q : ℚ≥0) (a : α) : Commute (↑q) a 
goal: Commute (↑q) a

full_name: NNRat.commute_cast
code: lemma commute_cast (a : α) (q : ℚ≥0) : Commute a q 
goal: Commute a ↑q

full_name: NNRat.cast_comm
code: lemma cast_comm (q : ℚ≥0) (a : α) : q * a = a * q 
goal: ↑q * a = a * ↑q

full_name: NNRat.cast_divNat_of_ne_zero
code: @[norm_cast] lemma cast_divNat_of_ne_zero (a : ℕ) {b : ℕ} (hb : (b : α) ≠ 0) :
    divNat a b = (a / b : α) 
goal: ↑(NNRat.divNat a b) = ↑a / ↑b

full_name: NNRat.cast_add_of_ne_zero
code: @[norm_cast]
lemma cast_add_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
    ↑(q + r) = (q + r : α) 
goal: ↑(q + r) = ↑q + ↑r

full_name: NNRat.cast_mul_of_ne_zero
code: @[norm_cast]
lemma cast_mul_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
    ↑(q * r) = (q * r : α) 
goal: ↑(q * r) = ↑q * ↑r

full_name: NNRat.cast_inv_of_ne_zero
code: @[norm_cast]
lemma cast_inv_of_ne_zero (hq : (q.num : α) ≠ 0) : (q⁻¹ : ℚ≥0) = (q⁻¹ : α) 
goal: ↑q⁻¹ = (↑q)⁻¹

full_name: NNRat.cast_div_of_ne_zero
code: @[norm_cast]
lemma cast_div_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.num : α) ≠ 0) :
    ↑(q / r) = (q / r : α) 
goal: ↑(q / r) = ↑q / ↑r

full_name: Rat.cast_intCast
code: @[simp, norm_cast]
theorem cast_intCast (n : ℤ) : ((n : ℚ) : α) = n 
goal: ↑↑n = ↑n

full_name: Rat.cast_natCast
code: @[simp, norm_cast]
theorem cast_natCast (n : ℕ) : ((n : ℚ) : α) = n 
goal: ↑↑n = ↑n

full_name: Rat.cast_ofNat
code: @[simp, norm_cast] lemma cast_ofNat (n : ℕ) [n.AtLeastTwo] :
    ((no_index (OfNat.ofNat n : ℚ)) : α) = (OfNat.ofNat n : α) 
goal: ↑(OfNat.ofNat n) = OfNat.ofNat n

full_name: Rat.cast_zero
code: @[simp, norm_cast]
theorem cast_zero : ((0 : ℚ) : α) = 0 
goal: ↑0 = 0

full_name: Rat.cast_one
code: @[simp, norm_cast]
theorem cast_one : ((1 : ℚ) : α) = 1 
goal: ↑1 = 1

full_name: Rat.cast_commute
code: theorem cast_commute (r : ℚ) (a : α) : Commute (↑r) a 
goal: Commute (↑r) a

full_name: Rat.cast_comm
code: theorem cast_comm (r : ℚ) (a : α) : (r : α) * a = a * r 
goal: ↑r * a = a * ↑r

full_name: Rat.commute_cast
code: theorem commute_cast (a : α) (r : ℚ) : Commute a r 
goal: Commute a ↑r

full_name: Rat.cast_divInt_of_ne_zero
code: @[norm_cast]
lemma cast_divInt_of_ne_zero (a : ℤ) {b : ℤ} (b0 : (b : α) ≠ 0) : (a /. b : α) = a / b 
goal: ↑(a /. b) = ↑a / ↑b

full_name: Rat.cast_mkRat_of_ne_zero
code: @[norm_cast]
lemma cast_mkRat_of_ne_zero (a : ℤ) {b : ℕ} (hb : (b : α) ≠ 0) : (mkRat a b : α) = a / b 
goal: ↑(mkRat a b) = ↑a / ↑b

full_name: Rat.cast_add_of_ne_zero
code: @[norm_cast]
lemma cast_add_of_ne_zero {q r : ℚ} (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
    (q + r : ℚ) = (q + r : α) 
goal: ↑(q + r) = ↑q + ↑r

full_name: Rat.cast_neg
code: @[simp, norm_cast] lemma cast_neg (q : ℚ) : ↑(-q) = (-q : α) 
goal: ↑(-q) = -↑q

full_name: Rat.cast_sub_of_ne_zero
code: @[norm_cast] lemma cast_sub_of_ne_zero (hp : (p.den : α) ≠ 0) (hq : (q.den : α) ≠ 0) :
    ↑(p - q) = (p - q : α) 
goal: ↑(p - q) = ↑p - ↑q

full_name: Rat.cast_mul_of_ne_zero
code: @[norm_cast] lemma cast_mul_of_ne_zero (hp : (p.den : α) ≠ 0) (hq : (q.den : α) ≠ 0) :
    ↑(p * q) = (p * q : α) 
goal: ↑(p * q) = ↑p * ↑q

full_name: Rat.cast_inv_of_ne_zero
code: @[norm_cast]
lemma cast_inv_of_ne_zero (hq : (q.num : α) ≠ 0) : ↑(q⁻¹) = (q⁻¹ : α) 
goal: ↑q⁻¹ = (↑q)⁻¹

full_name: Rat.cast_div_of_ne_zero
code: @[norm_cast] lemma cast_div_of_ne_zero (hp : (p.den : α) ≠ 0) (hq : (q.num : α) ≠ 0) :
    ↑(p / q) = (p / q : α) 
goal: ↑(p / q) = ↑p / ↑q

full_name: map_nnratCast
code: @[simp] lemma map_nnratCast [DivisionSemiring α] [DivisionSemiring β] [RingHomClass F α β] (f : F)
    (q : ℚ≥0) : f q = q 
goal: f ↑q = ↑q

full_name: eq_nnratCast
code: @[simp]
lemma eq_nnratCast [DivisionSemiring α] [FunLike F ℚ≥0 α] [RingHomClass F ℚ≥0 α] (f : F) (q : ℚ≥0) :
    f q = q 
goal: f q = ↑q

full_name: map_ratCast
code: @[simp]
theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (f : F) (q : ℚ) :
    f q = q 
goal: f ↑q = ↑q

full_name: eq_ratCast
code: @[simp] lemma eq_ratCast [DivisionRing α] [FunLike F ℚ α] [RingHomClass F ℚ α] (f : F) (q : ℚ) :
    f q = q 
goal: f q = ↑q

full_name: MonoidWithZeroHom.ext_rat'
code: /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g 
goal: f = g

full_name: MonoidWithZeroHom.ext_rat
code: /-- If `f` and `g` agree on the integers then they are equal `φ`.

See note [partially-applied ext lemmas] for why `comp` is used here. -/
@[ext]
theorem ext_rat {f g : ℚ →*₀ M₀}
    (h : f.comp (Int.castRingHom ℚ : ℤ →*₀ ℚ) = g.comp (Int.castRingHom ℚ)) : f = g 
goal: f = g

full_name: MonoidWithZeroHom.ext_rat_on_pnat
code: /-- Positive integer values of a morphism `φ` and its value on `-1` completely determine `φ`. -/
theorem ext_rat_on_pnat (same_on_neg_one : f (-1) = g (-1))
    (same_on_pnat : ∀ n : ℕ, 0 < n → f n = g n) : f = g 
goal: f = g

full_name: RingHom.ext_rat
code: /-- Any two ring homomorphisms from `ℚ` to a semiring are equal. If the codomain is a division ring,
then this lemma follows from `eq_ratCast`. -/
theorem RingHom.ext_rat {R : Type*} [Semiring R] [FunLike F ℚ R] [RingHomClass F ℚ R] (f g : F) :
    f = g 
goal: f = g

full_name: Rat.subsingleton_ringHom
code: instance Rat.subsingleton_ringHom {R : Type*} [Semiring R] : Subsingleton (ℚ →+* R) 
goal: Subsingleton (ℚ →+* R)

full_name: NNRat.instDistribSMul
code: instance (priority := 100) instDistribSMul : DistribSMul ℚ≥0 α 
goal: DistribSMul ℚ≥0 α

full_name: NNRat.instIsScalarTowerRight
code: instance instIsScalarTowerRight : IsScalarTower ℚ≥0 α α 
goal: IsScalarTower ℚ≥0 α α

full_name: Rat.instDistribSMul
code: instance (priority := 100) instDistribSMul : DistribSMul ℚ α 
goal: DistribSMul ℚ α

full_name: Rat.instIsScalarTowerRight
code: instance instIsScalarTowerRight : IsScalarTower ℚ α α 
goal: IsScalarTower ℚ α α