@@ -583,6 +583,53 @@ def biproduct.mapIso {f g : J → C} [HasBiproduct f] [HasBiproduct g] (p : ∀
583
583
inv := biproduct.map fun b => (p b).inv
584
584
#align category_theory.limits.biproduct.map_iso CategoryTheory.Limits.biproduct.mapIso
585
585
586
+ /-- Two biproducts which differ by an equivalence in the indexing type,
587
+ and up to isomorphism in the factors, are isomorphic.
588
+
589
+ Unfortunately there are two natural ways to define each direction of this isomorphism
590
+ (because it is true for both products and coproducts separately).
591
+ We give the alternative definitions as lemmas below.
592
+ -/
593
+ @[simps]
594
+ def biproduct.whisker_equiv {f : J → C} {g : K → C} (e : J ≃ K) (w : ∀ j, g (e j) ≅ f j)
595
+ [HasBiproduct f] [HasBiproduct g] : ⨁ f ≅ ⨁ g where
596
+ hom := biproduct.desc fun j => (w j).inv ≫ biproduct.ι g (e j)
597
+ inv := biproduct.desc fun k => eqToHom (by simp) ≫ (w (e.symm k)).hom ≫ biproduct.ι f _
598
+
599
+ lemma biproduct.whisker_equiv_hom_eq_lift {f : J → C} {g : K → C} (e : J ≃ K)
600
+ (w : ∀ j, g (e j) ≅ f j) [HasBiproduct f] [HasBiproduct g] :
601
+ (biproduct.whisker_equiv e w).hom =
602
+ biproduct.lift fun k => biproduct.π f (e.symm k) ≫ (w _).inv ≫ eqToHom (by simp) := by
603
+ simp only [whisker_equiv_hom]
604
+ ext k j
605
+ by_cases h : k = e j
606
+ · subst h
607
+ simp
608
+ · simp only [ι_desc_assoc, Category.assoc, ne_eq, lift_π]
609
+ rw [biproduct.ι_π_ne, biproduct.ι_π_ne_assoc]
610
+ · simp
611
+ · rintro rfl
612
+ simp at h
613
+ · exact Ne.symm h
614
+
615
+ lemma biproduct.whisker_equiv_inv_eq_lift {f : J → C} {g : K → C} (e : J ≃ K)
616
+ (w : ∀ j, g (e j) ≅ f j) [HasBiproduct f] [HasBiproduct g] :
617
+ (biproduct.whisker_equiv e w).inv =
618
+ biproduct.lift fun j => biproduct.π g (e j) ≫ (w j).hom := by
619
+ simp only [whisker_equiv_inv]
620
+ ext j k
621
+ by_cases h : k = e j
622
+ · subst h
623
+ simp only [ι_desc_assoc, ← eqToHom_iso_hom_naturality_assoc w (e.symm_apply_apply j).symm,
624
+ Equiv.symm_apply_apply, eqToHom_comp_ι, Category.assoc, bicone_ι_π_self, Category.comp_id,
625
+ lift_π, bicone_ι_π_self_assoc]
626
+ · simp only [ι_desc_assoc, Category.assoc, ne_eq, lift_π]
627
+ rw [biproduct.ι_π_ne, biproduct.ι_π_ne_assoc]
628
+ · simp
629
+ · exact h
630
+ · rintro rfl
631
+ simp at h
632
+
586
633
instance (f : ι → Type _) (g : (i : ι) → (f i) → C)
587
634
[∀ i, HasBiproduct (g i)] [HasBiproduct fun i => ⨁ g i] :
588
635
HasBiproduct fun p : Σ i, f i => g p.1 p.2 where
0 commit comments