File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,8 +53,6 @@ namespace MulEquiv
5353section Mul
5454variable [Mul M] [Mul N] [Mul P]
5555
56- section unique
57-
5856/-- The `MulEquiv` between two monoids with a unique element. -/
5957@ [to_additive /-- The `AddEquiv` between two `AddMonoid`s with a unique element. -/ ]
6058def ofUnique {M N} [Unique M] [Unique N] [Mul M] [Mul N] : M ≃* N :=
@@ -67,7 +65,13 @@ instance {M N} [Unique M] [Unique N] [Mul M] [Mul N] : Unique (M ≃* N) where
6765 default := ofUnique
6866 uniq _ := ext fun _ => Subsingleton.elim _ _
6967
70- end unique
68+ variable (α M) in
69+ /-- If `α` has a unique term, then the product of magmas `α → M` is isomorphic to `M`. -/
70+ @ [to_additive (attr := simps!)
71+ /-- If `α` has a unique term, then the product of magmas `α → M` is isomorphic to `M`. -/ ]
72+ def funUnique [Unique α] : (α → M) ≃* M where
73+ toEquiv := .funUnique ..
74+ map_mul' := by simp
7175
7276end Mul
7377
Original file line number Diff line number Diff line change @@ -578,10 +578,9 @@ theorem sumArrowLequivProdArrow_symm_apply_inr {α β} (f : α → M) (g : β
578578/-- If `ι` has a unique element, then `ι → M` is linearly equivalent to `M`. -/
579579@ [simps +simpRhs -fullyApplied symm_apply]
580580def funUnique (ι R M : Type *) [Unique ι] [Semiring R] [AddCommMonoid M] [Module R M] :
581- (ι → M) ≃ₗ[R] M :=
582- { Equiv.funUnique ι M with
583- map_add' := fun _ _ => rfl
584- map_smul' := fun _ _ => rfl }
581+ (ι → M) ≃ₗ[R] M where
582+ toAddEquiv := .funUnique ι M
583+ map_smul' _ _ := rfl
585584
586585@[simp]
587586theorem funUnique_apply (ι R M : Type *) [Unique ι] [Semiring R] [AddCommMonoid M] [Module R M] :
You can’t perform that action at this time.
0 commit comments