proposition: Lemma int_to_nat_mult_nonneg_l x y : 0 ≤ x → int_to_nat Z N (x * y) = int_to_nat Z N x * int_to_nat Z N y.
proof: Proof. intros E. apply (injective f). rewrite preserves_mult. rewrite (int_to_nat_of_nonneg x) by easy. destruct (int_to_nat_spec y) as [[? Ey]|[? Ey]]; rewrite Ey, ?preserves_0. rewrite int_to_nat_of_nonneg. easy. now apply nonneg_mult_compat. rewrite int_to_nat_of_nonpos, preserves_0. ring. now apply nonneg_nonpos_mult. Qed.
imports: Coq.setoid_ring.Ring MathClasses.interfaces.naturals MathClasses.interfaces.abstract_algebra MathClasses.interfaces.orders MathClasses.orders.nat_int MathClasses.theory.integers MathClasses.theory.rings MathClasses.orders.rings