|
440 | 440 | lemma eval_map (x : S) : (p.map f).eval x = p.eval₂ f x :=
|
441 | 441 | eval₂_map f (ring_hom.id _) x
|
442 | 442 |
|
| 443 | +lemma map_sum {ι : Type*} (g : ι → polynomial R) (s : finset ι) : |
| 444 | + (∑ i in s, g i).map f = ∑ i in s, (g i).map f := |
| 445 | +eq.symm $ sum_hom _ _ |
| 446 | + |
443 | 447 | end map
|
444 | 448 |
|
445 | 449 | /-!
|
@@ -522,10 +526,6 @@ lemma map_prod {ι : Type*} (g : ι → polynomial R) (s : finset ι) :
|
522 | 526 | (∏ i in s, g i).map f = ∏ i in s, (g i).map f :=
|
523 | 527 | eq.symm $ prod_hom _ _
|
524 | 528 |
|
525 |
| -lemma map_sum {ι : Type*} (g : ι → polynomial R) (s : finset ι) : |
526 |
| - (∑ i in s, g i).map f = ∑ i in s, (g i).map f := |
527 |
| -eq.symm $ sum_hom _ _ |
528 |
| - |
529 | 529 | lemma support_map_subset (p : polynomial R) : (map f p).support ⊆ p.support :=
|
530 | 530 | begin
|
531 | 531 | intros x,
|
@@ -562,14 +562,18 @@ lemma C_sub : C (a - b) = C a - C b := ring_hom.map_sub C a b
|
562 | 562 | instance map.is_ring_hom {S} [ring S] (f : R →+* S) : is_ring_hom (map f) :=
|
563 | 563 | by apply is_ring_hom.of_semiring
|
564 | 564 |
|
565 |
| -@[simp] lemma map_sub {S} [comm_ring S] (f : R →+* S) : |
| 565 | +@[simp] lemma map_sub {S} [ring S] (f : R →+* S) : |
566 | 566 | (p - q).map f = p.map f - q.map f :=
|
567 | 567 | is_ring_hom.map_sub _
|
568 | 568 |
|
569 |
| -@[simp] lemma map_neg {S} [comm_ring S] (f : R →+* S) : |
| 569 | +@[simp] lemma map_neg {S} [ring S] (f : R →+* S) : |
570 | 570 | (-p).map f = -(p.map f) :=
|
571 | 571 | is_ring_hom.map_neg _
|
572 | 572 |
|
| 573 | +@[simp] lemma map_int_cast {S} [ring S] (f : R →+* S) (n : ℤ) : |
| 574 | + map f ↑n = ↑n := |
| 575 | +(ring_hom.of (map f)).map_int_cast n |
| 576 | + |
573 | 577 | @[simp] lemma eval_int_cast {n : ℤ} {x : R} : (n : polynomial R).eval x = n :=
|
574 | 578 | by simp only [←C_eq_int_cast, eval_C]
|
575 | 579 |
|
|
0 commit comments