This repository was archived by the owner on Jul 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -549,6 +549,14 @@ begin
549
549
exact ⟨x, (mem_filter.1 hx).1 , (mem_filter.1 hx).2 ⟩
550
550
end
551
551
552
+ @[to_additive]
553
+ lemma prod_subset_one_on_sdiff [decidable_eq α] (h : s₁ ⊆ s₂) (hg : ∀ x ∈ (s₂ \ s₁), g x = 1 )
554
+ (hfg : ∀ x ∈ s₁, f x = g x) : ∏ i in s₁, f i = ∏ i in s₂, g i :=
555
+ begin
556
+ rw [← prod_sdiff h, prod_eq_one hg, one_mul],
557
+ exact prod_congr rfl hfg
558
+ end
559
+
552
560
lemma sum_range_succ {β} [add_comm_monoid β] (f : ℕ → β) (n : ℕ) :
553
561
(∑ x in range (n + 1 ), f x) = f n + (∑ x in range n, f x) :=
554
562
by rw [range_succ, sum_insert not_mem_range_self]
Original file line number Diff line number Diff line change @@ -447,6 +447,28 @@ lemma map_prod {ι : Type*} (g : ι → polynomial R) (s : finset ι) :
447
447
(∏ i in s, g i).map f = ∏ i in s, (g i).map f :=
448
448
eq.symm $ prod_hom _ _
449
449
450
+ lemma map_sum {ι : Type *} (g : ι → polynomial R) (s : finset ι) :
451
+ (∑ i in s, g i).map f = ∑ i in s, (g i).map f :=
452
+ eq.symm $ sum_hom _ _
453
+
454
+ lemma support_map_subset (p : polynomial R) : (map f p).support ⊆ p.support :=
455
+ begin
456
+ intros x,
457
+ simp only [mem_support_iff],
458
+ contrapose!,
459
+ change p.coeff x = 0 → (map f p).coeff x = 0 ,
460
+ rw coeff_map,
461
+ intro hx,
462
+ rw hx,
463
+ exact ring_hom.map_zero f,
464
+ end
465
+
466
+ lemma map_comp (p q : polynomial R) : map f (p.comp q) = (map f p).comp (map f q) :=
467
+ polynomial.induction_on p
468
+ (by simp)
469
+ (by simp {contextual := tt})
470
+ (by simp [pow_succ', ← mul_assoc, polynomial.comp] {contextual := tt})
471
+
450
472
end map
451
473
452
474
end comm_semiring
You can’t perform that action at this time.
0 commit comments