Documentation

Mathlib.Data.Rat.NNRat.BigOperators

Casting lemmas for non-negative rational numbers involving sums and products #

theorem NNRat.coe_list_sum (l : List NNRat) :
(List.sum l) = List.sum (List.map Subtype.val l)
theorem NNRat.coe_list_prod (l : List NNRat) :
(List.prod l) = List.prod (List.map Subtype.val l)
theorem NNRat.coe_sum {α : Type u_2} {s : Finset α} {f : αNNRat} :
(Finset.sum s fun (a : α) => f a) = Finset.sum s fun (a : α) => (f a)
theorem NNRat.toNNRat_sum_of_nonneg {α : Type u_2} {s : Finset α} {f : α} (hf : as, 0 f a) :
Rat.toNNRat (Finset.sum s fun (a : α) => f a) = Finset.sum s fun (a : α) => Rat.toNNRat (f a)
theorem NNRat.coe_prod {α : Type u_2} {s : Finset α} {f : αNNRat} :
(Finset.prod s fun (a : α) => f a) = Finset.prod s fun (a : α) => (f a)
theorem NNRat.toNNRat_prod_of_nonneg {α : Type u_2} {s : Finset α} {f : α} (hf : as, 0 f a) :
Rat.toNNRat (Finset.prod s fun (a : α) => f a) = Finset.prod s fun (a : α) => Rat.toNNRat (f a)