Skip to content

Commit

Permalink
chore: Rat.cast in Data.Complex.Basic
Browse files Browse the repository at this point in the history
  • Loading branch information
thorimur committed Mar 17, 2023
1 parent 37fc027 commit 7e94014
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Mathlib/Data/Complex/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -863,19 +863,19 @@ theorem int_cast_im (n : ℤ) : (n : ℂ).im = 0 := by rw [← ofReal_int_cast,
#align complex.int_cast_im Complex.int_cast_im

@[simp, norm_cast]
theorem ofReal_rat_cast (n : ℚ) : ((n : ℝ) : ℂ) = @RatCast.ratCast ℂ _ n :=
theorem ofReal_rat_cast (n : ℚ) : ((n : ℝ) : ℂ) = (n : ℂ) :=
map_ratCast ofReal n
#align complex.of_real_rat_cast Complex.ofReal_rat_cast

-- Porting note: removed `norm_cast` attribute because the RHS can't start with `↑`
@[simp]
theorem rat_cast_re (q : ℚ) : (RatCast.ratCast q : ℂ).re = @RatCast.ratCast ℂ _ q := by
theorem rat_cast_re (q : ℚ) : (q : ℂ).re = (q : ℂ) := by
rw [← ofReal_rat_cast, ofReal_re]
#align complex.rat_cast_re Complex.rat_cast_re

-- Porting note: removed `norm_cast` attribute because the RHS can't start with `↑`
@[simp]
theorem rat_cast_im (q : ℚ) : (RatCast.ratCast q : ℂ).im = @RatCast.ratCast ℂ _ 0 := by
theorem rat_cast_im (q : ℚ) : (q : ℂ).im = (0 : ℂ) := by
rw [← ofReal_rat_cast, ofReal_im]; norm_cast
#align complex.rat_cast_im Complex.rat_cast_im

Expand Down

0 comments on commit 7e94014

Please sign in to comment.