File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ end Polynomial
203203
204204end Pochhammer
205205
206- section Nat_Int
206+ section Basic_Instances
207207
208208open Polynomial
209209
@@ -236,7 +236,16 @@ instance Int.instBinomialRing : BinomialRing ℤ where
236236 ← Nat.descFactorial_eq_factorial_mul_choose, ← descPochhammer_smeval_eq_descFactorial,
237237 ← Int.neg_ofNat_succ, ascPochhammer_smeval_neg_eq_descPochhammer]
238238
239- end Nat_Int
239+ noncomputable instance {R : Type*} [AddCommMonoid R] [Module ℚ≥0 R] [Pow R ℕ] : BinomialRing R where
240+ nsmul_right_injective n hn r s hrs := by
241+ rw [← one_smul ℚ≥0 r, ← one_smul ℚ≥0 s, show 1 = (n : ℚ≥0 )⁻¹ • (n : ℚ≥0 ) by simp_all]
242+ simp_all only [smul_assoc, ← nsmul_eq_smul_cast]
243+ multichoose r n := (n.factorial : ℚ≥0 )⁻¹ • Polynomial.smeval (ascPochhammer ℕ n) r
244+ factorial_nsmul_multichoose r n := by
245+ simp only [← smul_assoc]
246+ field_simp
247+
248+ end Basic_Instances
240249
241250section Choose
242251
You can’t perform that action at this time.
0 commit comments