@@ -142,6 +142,7 @@ theorem GammaIntegral_ofReal (s : ℝ) :
142
142
simp
143
143
#align complex.Gamma_integral_of_real Complex.GammaIntegral_ofReal
144
144
145
+ @[simp]
145
146
theorem GammaIntegral_one : GammaIntegral 1 = 1 := by
146
147
simpa only [← ofReal_one, GammaIntegral_ofReal, ofReal_inj, sub_self, rpow_zero,
147
148
mul_one] using integral_exp_neg_Ioi_zero
@@ -340,17 +341,24 @@ theorem Gamma_eq_integral {s : ℂ} (hs : 0 < s.re) : Gamma s = GammaIntegral s
340
341
Gamma_eq_GammaAux s 0 (by norm_cast; linarith)
341
342
#align complex.Gamma_eq_integral Complex.Gamma_eq_integral
342
343
343
- theorem Gamma_one : Gamma 1 = 1 := by rw [Gamma_eq_integral]; simpa using GammaIntegral_one; simp
344
+ @[simp]
345
+ theorem Gamma_one : Gamma 1 = 1 := by rw [Gamma_eq_integral]; simp; simp
344
346
#align complex.Gamma_one Complex.Gamma_one
345
347
346
348
theorem Gamma_nat_eq_factorial (n : ℕ) : Gamma (n + 1 ) = n ! := by
347
349
induction' n with n hn
348
- · simpa using Gamma_one
350
+ · simp
349
351
· rw [Gamma_add_one n.succ <| Nat.cast_ne_zero.mpr <| Nat.succ_ne_zero n]
350
352
simp only [Nat.cast_succ, Nat.factorial_succ, Nat.cast_mul]; congr
351
353
#align complex.Gamma_nat_eq_factorial Complex.Gamma_nat_eq_factorial
352
354
355
+ @[simp]
356
+ theorem Gamma_ofNat_eq_factorial (n : ℕ) [(n + 1 ).AtLeastTwo] :
357
+ Gamma (no_index (OfNat.ofNat (n + 1 ) : ℂ)) = n ! := by
358
+ exact_mod_cast Gamma_nat_eq_factorial (n : ℕ)
359
+
353
360
/-- At `0` the Gamma function is undefined; by convention we assign it the value `0`. -/
361
+ @[simp]
354
362
theorem Gamma_zero : Gamma 0 = 0 := by
355
363
simp_rw [Gamma, zero_re, sub_zero, Nat.floor_one, GammaAux, div_zero]
356
364
#align complex.Gamma_zero Complex.Gamma_zero
@@ -493,6 +501,7 @@ theorem Gamma_add_one {s : ℝ} (hs : s ≠ 0) : Gamma (s + 1) = s * Gamma s :=
493
501
rwa [Complex.ofReal_ne_zero]
494
502
#align real.Gamma_add_one Real.Gamma_add_one
495
503
504
+ @[simp]
496
505
theorem Gamma_one : Gamma 1 = 1 := by
497
506
rw [Gamma, Complex.ofReal_one, Complex.Gamma_one, Complex.one_re]
498
507
#align real.Gamma_one Real.Gamma_one
@@ -506,7 +515,13 @@ theorem Gamma_nat_eq_factorial (n : ℕ) : Gamma (n + 1) = n ! := by
506
515
Complex.Gamma_nat_eq_factorial, ← Complex.ofReal_nat_cast, Complex.ofReal_re]
507
516
#align real.Gamma_nat_eq_factorial Real.Gamma_nat_eq_factorial
508
517
518
+ @[simp]
519
+ theorem Gamma_ofNat_eq_factorial (n : ℕ) [(n + 1 ).AtLeastTwo] :
520
+ Gamma (no_index (OfNat.ofNat (n + 1 ) : ℝ)) = n ! := by
521
+ exact_mod_cast Gamma_nat_eq_factorial (n : ℕ)
522
+
509
523
/-- At `0` the Gamma function is undefined; by convention we assign it the value `0`. -/
524
+ @[simp]
510
525
theorem Gamma_zero : Gamma 0 = 0 := by
511
526
simpa only [← Complex.ofReal_zero, Complex.Gamma_ofReal, Complex.ofReal_inj] using
512
527
Complex.Gamma_zero
0 commit comments