|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nβ’ Function.Injective fun f => f.toFun","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by ","nextTactic":"rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h","declUpToTactic":"instance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.127_0.9y3TORfxg2P0A5c","decl":"instance : FunLike (A βββ[R] B) A fun _ => B where\n coe f "} |
|
{"state":"case mk.mk.mk.mk.mk.mk\nR : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf : A β B\nmap_smul'βΒΉ : β (m : R) (x : A), f (m β’ x) = m β’ f x\nmap_zero'βΒΉ : MulActionHom.toFun { toFun := f, map_smul' := map_smul'βΒΉ } 0 = 0\nmap_add'βΒΉ :\n β (x y : A),\n MulActionHom.toFun { toFun := f, map_smul' := map_smul'βΒΉ } (x + y) =\n MulActionHom.toFun { toFun := f, map_smul' := map_smul'βΒΉ } x +\n MulActionHom.toFun { toFun := f, map_smul' := map_smul'βΒΉ } y\nmap_mul'βΒΉ :\n β (x y : A),\n MulActionHom.toFun\n { toMulActionHom := { toFun := f, map_smul' := map_smul'βΒΉ }, map_zero' := map_zero'βΒΉ,\n map_add' := map_add'βΒΉ }.toMulActionHom\n (x * y) =\n MulActionHom.toFun\n { toMulActionHom := { toFun := f, map_smul' := map_smul'βΒΉ }, map_zero' := map_zero'βΒΉ,\n map_add' := map_add'βΒΉ }.toMulActionHom\n x *\n MulActionHom.toFun\n { toMulActionHom := { toFun := f, map_smul' := map_smul'βΒΉ }, map_zero' := map_zero'βΒΉ,\n map_add' := map_add'βΒΉ }.toMulActionHom\n y\ng : A β B\nmap_smul'β : β (m : R) (x : A), g (m β’ x) = m β’ g x\nmap_zero'β : MulActionHom.toFun { toFun := g, map_smul' := map_smul'β } 0 = 0\nmap_add'β :\n β (x y : A),\n MulActionHom.toFun { toFun := g, map_smul' := map_smul'β } (x + y) =\n MulActionHom.toFun { toFun := g, map_smul' := map_smul'β } x +\n MulActionHom.toFun { toFun := g, map_smul' := map_smul'β } y\nmap_mul'β :\n β (x y : A),\n MulActionHom.toFun\n { toMulActionHom := { toFun := g, map_smul' := map_smul'β }, map_zero' := map_zero'β,\n map_add' := map_add'β }.toMulActionHom\n (x * y) =\n MulActionHom.toFun\n { toMulActionHom := { toFun := g, map_smul' := map_smul'β }, map_zero' := map_zero'β,\n map_add' := map_add'β }.toMulActionHom\n x *\n MulActionHom.toFun\n { toMulActionHom := { toFun := g, map_smul' := map_smul'β }, map_zero' := map_zero'β,\n map_add' := map_add'β }.toMulActionHom\n y\nh :\n (fun f => f.toFun)\n {\n toDistribMulActionHom :=\n { toMulActionHom := { toFun := f, map_smul' := map_smul'βΒΉ }, map_zero' := map_zero'βΒΉ,\n map_add' := map_add'βΒΉ },\n map_mul' := map_mul'βΒΉ } =\n (fun f => f.toFun)\n {\n toDistribMulActionHom :=\n { toMulActionHom := { toFun := g, map_smul' := map_smul'β }, map_zero' := map_zero'β, map_add' := map_add'β },\n map_mul' := map_mul'β }\nβ’ {\n toDistribMulActionHom :=\n { toMulActionHom := { toFun := f, map_smul' := map_smul'βΒΉ }, map_zero' := map_zero'βΒΉ,\n map_add' := map_add'βΒΉ },\n map_mul' := map_mul'βΒΉ } =\n {\n toDistribMulActionHom :=\n { toMulActionHom := { toFun := g, map_smul' := map_smul'β }, map_zero' := map_zero'β, map_add' := map_add'β },\n map_mul' := map_mul'β }","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; ","nextTactic":"congr","declUpToTactic":"instance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.127_0.9y3TORfxg2P0A5c","decl":"instance : FunLike (A βββ[R] B) A fun _ => B where\n coe f "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nβ’ Function.Injective FunLike.coe","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n ","nextTactic":"rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h","declUpToTactic":"theorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.148_0.9y3TORfxg2P0A5c","decl":"theorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) "} |
|
{"state":"case mk.mk.mk.mk.mk.mk\nR : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf : A β B\nmap_smul'βΒΉ : β (m : R) (x : A), f (m β’ x) = m β’ f x\nmap_zero'βΒΉ : MulActionHom.toFun { toFun := f, map_smul' := map_smul'βΒΉ } 0 = 0\nmap_add'βΒΉ :\n β (x y : A),\n MulActionHom.toFun { toFun := f, map_smul' := map_smul'βΒΉ } (x + y) =\n MulActionHom.toFun { toFun := f, map_smul' := map_smul'βΒΉ } x +\n MulActionHom.toFun { toFun := f, map_smul' := map_smul'βΒΉ } y\nmap_mul'βΒΉ :\n β (x y : A),\n MulActionHom.toFun\n { toMulActionHom := { toFun := f, map_smul' := map_smul'βΒΉ }, map_zero' := map_zero'βΒΉ,\n map_add' := map_add'βΒΉ }.toMulActionHom\n (x * y) =\n MulActionHom.toFun\n { toMulActionHom := { toFun := f, map_smul' := map_smul'βΒΉ }, map_zero' := map_zero'βΒΉ,\n map_add' := map_add'βΒΉ }.toMulActionHom\n x *\n MulActionHom.toFun\n { toMulActionHom := { toFun := f, map_smul' := map_smul'βΒΉ }, map_zero' := map_zero'βΒΉ,\n map_add' := map_add'βΒΉ }.toMulActionHom\n y\ng : A β B\nmap_smul'β : β (m : R) (x : A), g (m β’ x) = m β’ g x\nmap_zero'β : MulActionHom.toFun { toFun := g, map_smul' := map_smul'β } 0 = 0\nmap_add'β :\n β (x y : A),\n MulActionHom.toFun { toFun := g, map_smul' := map_smul'β } (x + y) =\n MulActionHom.toFun { toFun := g, map_smul' := map_smul'β } x +\n MulActionHom.toFun { toFun := g, map_smul' := map_smul'β } y\nmap_mul'β :\n β (x y : A),\n MulActionHom.toFun\n { toMulActionHom := { toFun := g, map_smul' := map_smul'β }, map_zero' := map_zero'β,\n map_add' := map_add'β }.toMulActionHom\n (x * y) =\n MulActionHom.toFun\n { toMulActionHom := { toFun := g, map_smul' := map_smul'β }, map_zero' := map_zero'β,\n map_add' := map_add'β }.toMulActionHom\n x *\n MulActionHom.toFun\n { toMulActionHom := { toFun := g, map_smul' := map_smul'β }, map_zero' := map_zero'β,\n map_add' := map_add'β }.toMulActionHom\n y\nh :\n β{\n toDistribMulActionHom :=\n { toMulActionHom := { toFun := f, map_smul' := map_smul'βΒΉ }, map_zero' := map_zero'βΒΉ,\n map_add' := map_add'βΒΉ },\n map_mul' := map_mul'βΒΉ } =\n β{\n toDistribMulActionHom :=\n { toMulActionHom := { toFun := g, map_smul' := map_smul'β }, map_zero' := map_zero'β, map_add' := map_add'β },\n map_mul' := map_mul'β }\nβ’ {\n toDistribMulActionHom :=\n { toMulActionHom := { toFun := f, map_smul' := map_smul'βΒΉ }, map_zero' := map_zero'βΒΉ,\n map_add' := map_add'βΒΉ },\n map_mul' := map_mul'βΒΉ } =\n {\n toDistribMulActionHom :=\n { toMulActionHom := { toFun := g, map_smul' := map_smul'β }, map_zero' := map_zero'β, map_add' := map_add'β },\n map_mul' := map_mul'β }","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; ","nextTactic":"congr","declUpToTactic":"theorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.148_0.9y3TORfxg2P0A5c","decl":"theorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf g : A βββ[R] B\nβ’ f = g β β (x : A), f x = g x","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n ","nextTactic":"rintro rfl x","declUpToTactic":"theorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.166_0.9y3TORfxg2P0A5c","decl":"theorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf : A βββ[R] B\nx : A\nβ’ f x = f x","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n ","nextTactic":"rfl","declUpToTactic":"theorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.166_0.9y3TORfxg2P0A5c","decl":"theorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf : A βββ[R] B\nhβ : β (m : R) (x : A), f (m β’ x) = m β’ f x\nhβ : MulActionHom.toFun { toFun := βf, map_smul' := hβ } 0 = 0\nhβ :\n β (x y : A),\n MulActionHom.toFun { toFun := βf, map_smul' := hβ } (x + y) =\n MulActionHom.toFun { toFun := βf, map_smul' := hβ } x + MulActionHom.toFun { toFun := βf, map_smul' := hβ } y\nhβ :\n β (x y : A),\n MulActionHom.toFun\n { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ }.toMulActionHom (x * y) =\n MulActionHom.toFun\n { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ }.toMulActionHom x *\n MulActionHom.toFun\n { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ }.toMulActionHom y\nβ’ { toDistribMulActionHom := { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ },\n map_mul' := hβ } =\n f","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n ","nextTactic":"rfl","declUpToTactic":"@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.181_0.9y3TORfxg2P0A5c","decl":"@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf g : A βββ[R] B\nh : βf = βg\nβ’ f = g","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ","nextTactic":"ext a","declUpToTactic":"theorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.212_0.9y3TORfxg2P0A5c","decl":"theorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g "} |
|
{"state":"case h\nR : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf g : A βββ[R] B\nh : βf = βg\na : A\nβ’ f a = g a","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n ","nextTactic":"exact DistribMulActionHom.congr_fun h a","declUpToTactic":"theorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.212_0.9y3TORfxg2P0A5c","decl":"theorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf g : A βββ[R] B\nh : βf = βg\nβ’ f = g","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n exact DistribMulActionHom.congr_fun h a\n#align non_unital_alg_hom.to_distrib_mul_action_hom_injective NonUnitalAlgHom.to_distribMulActionHom_injective\n\ntheorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ","nextTactic":"ext a","declUpToTactic":"theorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.218_0.9y3TORfxg2P0A5c","decl":"theorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g "} |
|
{"state":"case h\nR : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf g : A βββ[R] B\nh : βf = βg\na : A\nβ’ f a = g a","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n exact DistribMulActionHom.congr_fun h a\n#align non_unital_alg_hom.to_distrib_mul_action_hom_injective NonUnitalAlgHom.to_distribMulActionHom_injective\n\ntheorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ext a\n ","nextTactic":"exact FunLike.congr_fun h a","declUpToTactic":"theorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ext a\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.218_0.9y3TORfxg2P0A5c","decl":"theorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf : A βββ[R] B\nhβ : β (m : R) (x : A), f (m β’ x) = m β’ f x\nhβ : MulActionHom.toFun { toFun := βf, map_smul' := hβ } 0 = 0\nhβ :\n β (x y : A),\n MulActionHom.toFun { toFun := βf, map_smul' := hβ } (x + y) =\n MulActionHom.toFun { toFun := βf, map_smul' := hβ } x + MulActionHom.toFun { toFun := βf, map_smul' := hβ } y\nhβ :\n β (x y : A),\n MulActionHom.toFun\n { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ }.toMulActionHom (x * y) =\n MulActionHom.toFun\n { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ }.toMulActionHom x *\n MulActionHom.toFun\n { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ }.toMulActionHom y\nβ’ β{ toDistribMulActionHom := { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ },\n map_mul' := hβ } =\n { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ }","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n exact DistribMulActionHom.congr_fun h a\n#align non_unital_alg_hom.to_distrib_mul_action_hom_injective NonUnitalAlgHom.to_distribMulActionHom_injective\n\ntheorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ext a\n exact FunLike.congr_fun h a\n#align non_unital_alg_hom.to_mul_hom_injective NonUnitalAlgHom.to_mulHom_injective\n\n@[norm_cast]\ntheorem coe_distribMulActionHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A β+[R] B) = β¨β¨f, hββ©, hβ, hββ© := by\n ","nextTactic":"rfl","declUpToTactic":"@[norm_cast]\ntheorem coe_distribMulActionHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A β+[R] B) = β¨β¨f, hββ©, hβ, hββ© := by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.223_0.9y3TORfxg2P0A5c","decl":"@[norm_cast]\ntheorem coe_distribMulActionHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A β+[R] B) = β¨β¨f, hββ©, hβ, hββ© "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf : A βββ[R] B\nhβ : β (m : R) (x : A), f (m β’ x) = m β’ f x\nhβ : MulActionHom.toFun { toFun := βf, map_smul' := hβ } 0 = 0\nhβ :\n β (x y : A),\n MulActionHom.toFun { toFun := βf, map_smul' := hβ } (x + y) =\n MulActionHom.toFun { toFun := βf, map_smul' := hβ } x + MulActionHom.toFun { toFun := βf, map_smul' := hβ } y\nhβ :\n β (x y : A),\n MulActionHom.toFun\n { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ }.toMulActionHom (x * y) =\n MulActionHom.toFun\n { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ }.toMulActionHom x *\n MulActionHom.toFun\n { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ }.toMulActionHom y\nβ’ β{ toDistribMulActionHom := { toMulActionHom := { toFun := βf, map_smul' := hβ }, map_zero' := hβ, map_add' := hβ },\n map_mul' := hβ } =\n { toFun := βf, map_mul' := hβ }","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n exact DistribMulActionHom.congr_fun h a\n#align non_unital_alg_hom.to_distrib_mul_action_hom_injective NonUnitalAlgHom.to_distribMulActionHom_injective\n\ntheorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ext a\n exact FunLike.congr_fun h a\n#align non_unital_alg_hom.to_mul_hom_injective NonUnitalAlgHom.to_mulHom_injective\n\n@[norm_cast]\ntheorem coe_distribMulActionHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A β+[R] B) = β¨β¨f, hββ©, hβ, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_distrib_mul_action_hom_mk NonUnitalAlgHom.coe_distribMulActionHom_mk\n\n@[norm_cast]\ntheorem coe_mulHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A ββ* B) = β¨f, hββ© := by\n ","nextTactic":"rfl","declUpToTactic":"@[norm_cast]\ntheorem coe_mulHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A ββ* B) = β¨f, hββ© := by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.229_0.9y3TORfxg2P0A5c","decl":"@[norm_cast]\ntheorem coe_mulHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A ββ* B) = β¨f, hββ© "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nsrcβ : A β+[R] B := 0\nβ’ β (x y : A),\n MulActionHom.toFun\n { toMulActionHom := srcβ.toMulActionHom, map_zero' := (_ : MulActionHom.toFun srcβ.toMulActionHom 0 = 0),\n map_add' :=\n (_ :\n β (x y : A),\n MulActionHom.toFun srcβ.toMulActionHom (x + y) =\n MulActionHom.toFun srcβ.toMulActionHom x +\n MulActionHom.toFun srcβ.toMulActionHom y) }.toMulActionHom\n (x * y) =\n MulActionHom.toFun\n { toMulActionHom := srcβ.toMulActionHom, map_zero' := (_ : MulActionHom.toFun srcβ.toMulActionHom 0 = 0),\n map_add' :=\n (_ :\n β (x y : A),\n MulActionHom.toFun srcβ.toMulActionHom (x + y) =\n MulActionHom.toFun srcβ.toMulActionHom x +\n MulActionHom.toFun srcβ.toMulActionHom y) }.toMulActionHom\n x *\n MulActionHom.toFun\n { toMulActionHom := srcβ.toMulActionHom, map_zero' := (_ : MulActionHom.toFun srcβ.toMulActionHom 0 = 0),\n map_add' :=\n (_ :\n β (x y : A),\n MulActionHom.toFun srcβ.toMulActionHom (x + y) =\n MulActionHom.toFun srcβ.toMulActionHom x +\n MulActionHom.toFun srcβ.toMulActionHom y) }.toMulActionHom\n y","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n exact DistribMulActionHom.congr_fun h a\n#align non_unital_alg_hom.to_distrib_mul_action_hom_injective NonUnitalAlgHom.to_distribMulActionHom_injective\n\ntheorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ext a\n exact FunLike.congr_fun h a\n#align non_unital_alg_hom.to_mul_hom_injective NonUnitalAlgHom.to_mulHom_injective\n\n@[norm_cast]\ntheorem coe_distribMulActionHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A β+[R] B) = β¨β¨f, hββ©, hβ, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_distrib_mul_action_hom_mk NonUnitalAlgHom.coe_distribMulActionHom_mk\n\n@[norm_cast]\ntheorem coe_mulHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A ββ* B) = β¨f, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_mul_hom_mk NonUnitalAlgHom.coe_mulHom_mk\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_smul (f : A βββ[R] B) (c : R) (x : A) : f (c β’ x) = c β’ f x :=\n map_smul _ _ _\n#align non_unital_alg_hom.map_smul NonUnitalAlgHom.map_smul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_add (f : A βββ[R] B) (x y : A) : f (x + y) = f x + f y :=\n map_add _ _ _\n#align non_unital_alg_hom.map_add NonUnitalAlgHom.map_add\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_mul (f : A βββ[R] B) (x y : A) : f (x * y) = f x * f y :=\n map_mul _ _ _\n#align non_unital_alg_hom.map_mul NonUnitalAlgHom.map_mul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_zero (f : A βββ[R] B) : f 0 = 0 :=\n map_zero _\n#align non_unital_alg_hom.map_zero NonUnitalAlgHom.map_zero\n\n/-- The identity map as a `NonUnitalAlgHom`. -/\nprotected def id (R A : Type*) [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] : A βββ[R] A :=\n { NonUnitalRingHom.id A with\n toFun := id\n map_smul' := fun _ _ => rfl }\n\n@[simp]\ntheorem coe_id : β(NonUnitalAlgHom.id R A) = id :=\n rfl\n\ninstance : Zero (A βββ[R] B) :=\n β¨{ (0 : A β+[R] B) with map_mul' := by ","nextTactic":"simp","declUpToTactic":"instance : Zero (A βββ[R] B) :=\n β¨{ (0 : A β+[R] B) with map_mul' := by ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.266_0.9y3TORfxg2P0A5c","decl":"instance : Zero (A βββ[R] B) "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf : A βββ[R] B\ng : A βββ[R] C\nc : R\nx : A\nβ’ Pi.prod (βf) (βg) (c β’ x) = c β’ Pi.prod (βf) (βg) x","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n exact DistribMulActionHom.congr_fun h a\n#align non_unital_alg_hom.to_distrib_mul_action_hom_injective NonUnitalAlgHom.to_distribMulActionHom_injective\n\ntheorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ext a\n exact FunLike.congr_fun h a\n#align non_unital_alg_hom.to_mul_hom_injective NonUnitalAlgHom.to_mulHom_injective\n\n@[norm_cast]\ntheorem coe_distribMulActionHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A β+[R] B) = β¨β¨f, hββ©, hβ, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_distrib_mul_action_hom_mk NonUnitalAlgHom.coe_distribMulActionHom_mk\n\n@[norm_cast]\ntheorem coe_mulHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A ββ* B) = β¨f, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_mul_hom_mk NonUnitalAlgHom.coe_mulHom_mk\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_smul (f : A βββ[R] B) (c : R) (x : A) : f (c β’ x) = c β’ f x :=\n map_smul _ _ _\n#align non_unital_alg_hom.map_smul NonUnitalAlgHom.map_smul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_add (f : A βββ[R] B) (x y : A) : f (x + y) = f x + f y :=\n map_add _ _ _\n#align non_unital_alg_hom.map_add NonUnitalAlgHom.map_add\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_mul (f : A βββ[R] B) (x y : A) : f (x * y) = f x * f y :=\n map_mul _ _ _\n#align non_unital_alg_hom.map_mul NonUnitalAlgHom.map_mul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_zero (f : A βββ[R] B) : f 0 = 0 :=\n map_zero _\n#align non_unital_alg_hom.map_zero NonUnitalAlgHom.map_zero\n\n/-- The identity map as a `NonUnitalAlgHom`. -/\nprotected def id (R A : Type*) [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] : A βββ[R] A :=\n { NonUnitalRingHom.id A with\n toFun := id\n map_smul' := fun _ _ => rfl }\n\n@[simp]\ntheorem coe_id : β(NonUnitalAlgHom.id R A) = id :=\n rfl\n\ninstance : Zero (A βββ[R] B) :=\n β¨{ (0 : A β+[R] B) with map_mul' := by simp }β©\n\ninstance : One (A βββ[R] A) :=\n β¨NonUnitalAlgHom.id R Aβ©\n\n@[simp]\ntheorem coe_zero : β(0 : A βββ[R] B) = 0 :=\n rfl\n#align non_unital_alg_hom.coe_zero NonUnitalAlgHom.coe_zero\n\n@[simp]\ntheorem coe_one : ((1 : A βββ[R] A) : A β A) = id :=\n rfl\n#align non_unital_alg_hom.coe_one NonUnitalAlgHom.coe_one\n\ntheorem zero_apply (a : A) : (0 : A βββ[R] B) a = 0 :=\n rfl\n#align non_unital_alg_hom.zero_apply NonUnitalAlgHom.zero_apply\n\ntheorem one_apply (a : A) : (1 : A βββ[R] A) a = a :=\n rfl\n#align non_unital_alg_hom.one_apply NonUnitalAlgHom.one_apply\n\ninstance : Inhabited (A βββ[R] B) :=\n β¨0β©\n\n/-- The composition of morphisms is a morphism. -/\ndef comp (f : B βββ[R] C) (g : A βββ[R] B) : A βββ[R] C :=\n { (f : B ββ* C).comp (g : A ββ* B), (f : B β+[R] C).comp (g : A β+[R] B) with }\n#align non_unital_alg_hom.comp NonUnitalAlgHom.comp\n\n@[simp, norm_cast]\ntheorem coe_comp (f : B βββ[R] C) (g : A βββ[R] B) :\n β(f.comp g) = (βf) β (βg) :=\n rfl\n#align non_unital_alg_hom.coe_comp NonUnitalAlgHom.coe_comp\n\ntheorem comp_apply (f : B βββ[R] C) (g : A βββ[R] B) (x : A) : f.comp g x = f (g x) :=\n rfl\n#align non_unital_alg_hom.comp_apply NonUnitalAlgHom.comp_apply\n\n/-- The inverse of a bijective morphism is a morphism. -/\ndef inverse (f : A βββ[R] B) (g : B β A) (hβ : Function.LeftInverse g f)\n (hβ : Function.RightInverse g f) : B βββ[R] A :=\n { (f : A ββ* B).inverse g hβ hβ, (f : A β+[R] B).inverse g hβ hβ with }\n#align non_unital_alg_hom.inverse NonUnitalAlgHom.inverse\n\n@[simp]\ntheorem coe_inverse (f : A βββ[R] B) (g : B β A) (hβ : Function.LeftInverse g f)\n (hβ : Function.RightInverse g f) : (inverse f g hβ hβ : B β A) = g :=\n rfl\n#align non_unital_alg_hom.coe_inverse NonUnitalAlgHom.coe_inverse\n\n/-! ### Operations on the product type\n\nNote that much of this is copied from [`LinearAlgebra/Prod`](../../LinearAlgebra/Prod). -/\n\n\nsection Prod\n\nvariable (R A B)\n\n/-- The first projection of a product is a non-unital alg_hom. -/\n@[simps]\ndef fst : A Γ B βββ[R] A where\n toFun := Prod.fst\n map_zero' := rfl\n map_add' _ _ := rfl\n map_smul' _ _ := rfl\n map_mul' _ _ := rfl\n#align non_unital_alg_hom.fst NonUnitalAlgHom.fst\n\n/-- The second projection of a product is a non-unital alg_hom. -/\n@[simps]\ndef snd : A Γ B βββ[R] B where\n toFun := Prod.snd\n map_zero' := rfl\n map_add' _ _ := rfl\n map_smul' _ _ := rfl\n map_mul' _ _ := rfl\n#align non_unital_alg_hom.snd NonUnitalAlgHom.snd\n\nvariable {R A B}\n\n/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun := Pi.prod f g\n map_zero' := by simp only [Pi.prod, Prod.zero_eq_mk, map_zero]\n map_add' x y := by simp only [Pi.prod, Prod.mk_add_mk, map_add]\n map_mul' x y := by simp only [Pi.prod, Prod.mk_mul_mk, map_mul]\n map_smul' c x := by ","nextTactic":"simp only [Pi.prod, Prod.smul_mk, map_smul, RingHom.id_apply]","declUpToTactic":"/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun := Pi.prod f g\n map_zero' := by simp only [Pi.prod, Prod.zero_eq_mk, map_zero]\n map_add' x y := by simp only [Pi.prod, Prod.mk_add_mk, map_add]\n map_mul' x y := by simp only [Pi.prod, Prod.mk_mul_mk, map_mul]\n map_smul' c x := by ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.351_0.9y3TORfxg2P0A5c","decl":"/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf : A βββ[R] B\ng : A βββ[R] C\nβ’ MulActionHom.toFun\n { toFun := Pi.prod βf βg, map_smul' := (_ : β (c : R) (x : A), (f (c β’ x), g (c β’ x)) = (c β’ f x, c β’ g x)) } 0 =\n 0","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n exact DistribMulActionHom.congr_fun h a\n#align non_unital_alg_hom.to_distrib_mul_action_hom_injective NonUnitalAlgHom.to_distribMulActionHom_injective\n\ntheorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ext a\n exact FunLike.congr_fun h a\n#align non_unital_alg_hom.to_mul_hom_injective NonUnitalAlgHom.to_mulHom_injective\n\n@[norm_cast]\ntheorem coe_distribMulActionHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A β+[R] B) = β¨β¨f, hββ©, hβ, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_distrib_mul_action_hom_mk NonUnitalAlgHom.coe_distribMulActionHom_mk\n\n@[norm_cast]\ntheorem coe_mulHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A ββ* B) = β¨f, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_mul_hom_mk NonUnitalAlgHom.coe_mulHom_mk\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_smul (f : A βββ[R] B) (c : R) (x : A) : f (c β’ x) = c β’ f x :=\n map_smul _ _ _\n#align non_unital_alg_hom.map_smul NonUnitalAlgHom.map_smul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_add (f : A βββ[R] B) (x y : A) : f (x + y) = f x + f y :=\n map_add _ _ _\n#align non_unital_alg_hom.map_add NonUnitalAlgHom.map_add\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_mul (f : A βββ[R] B) (x y : A) : f (x * y) = f x * f y :=\n map_mul _ _ _\n#align non_unital_alg_hom.map_mul NonUnitalAlgHom.map_mul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_zero (f : A βββ[R] B) : f 0 = 0 :=\n map_zero _\n#align non_unital_alg_hom.map_zero NonUnitalAlgHom.map_zero\n\n/-- The identity map as a `NonUnitalAlgHom`. -/\nprotected def id (R A : Type*) [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] : A βββ[R] A :=\n { NonUnitalRingHom.id A with\n toFun := id\n map_smul' := fun _ _ => rfl }\n\n@[simp]\ntheorem coe_id : β(NonUnitalAlgHom.id R A) = id :=\n rfl\n\ninstance : Zero (A βββ[R] B) :=\n β¨{ (0 : A β+[R] B) with map_mul' := by simp }β©\n\ninstance : One (A βββ[R] A) :=\n β¨NonUnitalAlgHom.id R Aβ©\n\n@[simp]\ntheorem coe_zero : β(0 : A βββ[R] B) = 0 :=\n rfl\n#align non_unital_alg_hom.coe_zero NonUnitalAlgHom.coe_zero\n\n@[simp]\ntheorem coe_one : ((1 : A βββ[R] A) : A β A) = id :=\n rfl\n#align non_unital_alg_hom.coe_one NonUnitalAlgHom.coe_one\n\ntheorem zero_apply (a : A) : (0 : A βββ[R] B) a = 0 :=\n rfl\n#align non_unital_alg_hom.zero_apply NonUnitalAlgHom.zero_apply\n\ntheorem one_apply (a : A) : (1 : A βββ[R] A) a = a :=\n rfl\n#align non_unital_alg_hom.one_apply NonUnitalAlgHom.one_apply\n\ninstance : Inhabited (A βββ[R] B) :=\n β¨0β©\n\n/-- The composition of morphisms is a morphism. -/\ndef comp (f : B βββ[R] C) (g : A βββ[R] B) : A βββ[R] C :=\n { (f : B ββ* C).comp (g : A ββ* B), (f : B β+[R] C).comp (g : A β+[R] B) with }\n#align non_unital_alg_hom.comp NonUnitalAlgHom.comp\n\n@[simp, norm_cast]\ntheorem coe_comp (f : B βββ[R] C) (g : A βββ[R] B) :\n β(f.comp g) = (βf) β (βg) :=\n rfl\n#align non_unital_alg_hom.coe_comp NonUnitalAlgHom.coe_comp\n\ntheorem comp_apply (f : B βββ[R] C) (g : A βββ[R] B) (x : A) : f.comp g x = f (g x) :=\n rfl\n#align non_unital_alg_hom.comp_apply NonUnitalAlgHom.comp_apply\n\n/-- The inverse of a bijective morphism is a morphism. -/\ndef inverse (f : A βββ[R] B) (g : B β A) (hβ : Function.LeftInverse g f)\n (hβ : Function.RightInverse g f) : B βββ[R] A :=\n { (f : A ββ* B).inverse g hβ hβ, (f : A β+[R] B).inverse g hβ hβ with }\n#align non_unital_alg_hom.inverse NonUnitalAlgHom.inverse\n\n@[simp]\ntheorem coe_inverse (f : A βββ[R] B) (g : B β A) (hβ : Function.LeftInverse g f)\n (hβ : Function.RightInverse g f) : (inverse f g hβ hβ : B β A) = g :=\n rfl\n#align non_unital_alg_hom.coe_inverse NonUnitalAlgHom.coe_inverse\n\n/-! ### Operations on the product type\n\nNote that much of this is copied from [`LinearAlgebra/Prod`](../../LinearAlgebra/Prod). -/\n\n\nsection Prod\n\nvariable (R A B)\n\n/-- The first projection of a product is a non-unital alg_hom. -/\n@[simps]\ndef fst : A Γ B βββ[R] A where\n toFun := Prod.fst\n map_zero' := rfl\n map_add' _ _ := rfl\n map_smul' _ _ := rfl\n map_mul' _ _ := rfl\n#align non_unital_alg_hom.fst NonUnitalAlgHom.fst\n\n/-- The second projection of a product is a non-unital alg_hom. -/\n@[simps]\ndef snd : A Γ B βββ[R] B where\n toFun := Prod.snd\n map_zero' := rfl\n map_add' _ _ := rfl\n map_smul' _ _ := rfl\n map_mul' _ _ := rfl\n#align non_unital_alg_hom.snd NonUnitalAlgHom.snd\n\nvariable {R A B}\n\n/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun := Pi.prod f g\n map_zero' := by ","nextTactic":"simp only [Pi.prod, Prod.zero_eq_mk, map_zero]","declUpToTactic":"/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun := Pi.prod f g\n map_zero' := by ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.351_0.9y3TORfxg2P0A5c","decl":"/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf : A βββ[R] B\ng : A βββ[R] C\nx y : A\nβ’ MulActionHom.toFun\n { toFun := Pi.prod βf βg, map_smul' := (_ : β (c : R) (x : A), (f (c β’ x), g (c β’ x)) = (c β’ f x, c β’ g x)) }\n (x + y) =\n MulActionHom.toFun\n { toFun := Pi.prod βf βg, map_smul' := (_ : β (c : R) (x : A), (f (c β’ x), g (c β’ x)) = (c β’ f x, c β’ g x)) }\n x +\n MulActionHom.toFun\n { toFun := Pi.prod βf βg, map_smul' := (_ : β (c : R) (x : A), (f (c β’ x), g (c β’ x)) = (c β’ f x, c β’ g x)) } y","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n exact DistribMulActionHom.congr_fun h a\n#align non_unital_alg_hom.to_distrib_mul_action_hom_injective NonUnitalAlgHom.to_distribMulActionHom_injective\n\ntheorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ext a\n exact FunLike.congr_fun h a\n#align non_unital_alg_hom.to_mul_hom_injective NonUnitalAlgHom.to_mulHom_injective\n\n@[norm_cast]\ntheorem coe_distribMulActionHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A β+[R] B) = β¨β¨f, hββ©, hβ, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_distrib_mul_action_hom_mk NonUnitalAlgHom.coe_distribMulActionHom_mk\n\n@[norm_cast]\ntheorem coe_mulHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A ββ* B) = β¨f, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_mul_hom_mk NonUnitalAlgHom.coe_mulHom_mk\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_smul (f : A βββ[R] B) (c : R) (x : A) : f (c β’ x) = c β’ f x :=\n map_smul _ _ _\n#align non_unital_alg_hom.map_smul NonUnitalAlgHom.map_smul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_add (f : A βββ[R] B) (x y : A) : f (x + y) = f x + f y :=\n map_add _ _ _\n#align non_unital_alg_hom.map_add NonUnitalAlgHom.map_add\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_mul (f : A βββ[R] B) (x y : A) : f (x * y) = f x * f y :=\n map_mul _ _ _\n#align non_unital_alg_hom.map_mul NonUnitalAlgHom.map_mul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_zero (f : A βββ[R] B) : f 0 = 0 :=\n map_zero _\n#align non_unital_alg_hom.map_zero NonUnitalAlgHom.map_zero\n\n/-- The identity map as a `NonUnitalAlgHom`. -/\nprotected def id (R A : Type*) [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] : A βββ[R] A :=\n { NonUnitalRingHom.id A with\n toFun := id\n map_smul' := fun _ _ => rfl }\n\n@[simp]\ntheorem coe_id : β(NonUnitalAlgHom.id R A) = id :=\n rfl\n\ninstance : Zero (A βββ[R] B) :=\n β¨{ (0 : A β+[R] B) with map_mul' := by simp }β©\n\ninstance : One (A βββ[R] A) :=\n β¨NonUnitalAlgHom.id R Aβ©\n\n@[simp]\ntheorem coe_zero : β(0 : A βββ[R] B) = 0 :=\n rfl\n#align non_unital_alg_hom.coe_zero NonUnitalAlgHom.coe_zero\n\n@[simp]\ntheorem coe_one : ((1 : A βββ[R] A) : A β A) = id :=\n rfl\n#align non_unital_alg_hom.coe_one NonUnitalAlgHom.coe_one\n\ntheorem zero_apply (a : A) : (0 : A βββ[R] B) a = 0 :=\n rfl\n#align non_unital_alg_hom.zero_apply NonUnitalAlgHom.zero_apply\n\ntheorem one_apply (a : A) : (1 : A βββ[R] A) a = a :=\n rfl\n#align non_unital_alg_hom.one_apply NonUnitalAlgHom.one_apply\n\ninstance : Inhabited (A βββ[R] B) :=\n β¨0β©\n\n/-- The composition of morphisms is a morphism. -/\ndef comp (f : B βββ[R] C) (g : A βββ[R] B) : A βββ[R] C :=\n { (f : B ββ* C).comp (g : A ββ* B), (f : B β+[R] C).comp (g : A β+[R] B) with }\n#align non_unital_alg_hom.comp NonUnitalAlgHom.comp\n\n@[simp, norm_cast]\ntheorem coe_comp (f : B βββ[R] C) (g : A βββ[R] B) :\n β(f.comp g) = (βf) β (βg) :=\n rfl\n#align non_unital_alg_hom.coe_comp NonUnitalAlgHom.coe_comp\n\ntheorem comp_apply (f : B βββ[R] C) (g : A βββ[R] B) (x : A) : f.comp g x = f (g x) :=\n rfl\n#align non_unital_alg_hom.comp_apply NonUnitalAlgHom.comp_apply\n\n/-- The inverse of a bijective morphism is a morphism. -/\ndef inverse (f : A βββ[R] B) (g : B β A) (hβ : Function.LeftInverse g f)\n (hβ : Function.RightInverse g f) : B βββ[R] A :=\n { (f : A ββ* B).inverse g hβ hβ, (f : A β+[R] B).inverse g hβ hβ with }\n#align non_unital_alg_hom.inverse NonUnitalAlgHom.inverse\n\n@[simp]\ntheorem coe_inverse (f : A βββ[R] B) (g : B β A) (hβ : Function.LeftInverse g f)\n (hβ : Function.RightInverse g f) : (inverse f g hβ hβ : B β A) = g :=\n rfl\n#align non_unital_alg_hom.coe_inverse NonUnitalAlgHom.coe_inverse\n\n/-! ### Operations on the product type\n\nNote that much of this is copied from [`LinearAlgebra/Prod`](../../LinearAlgebra/Prod). -/\n\n\nsection Prod\n\nvariable (R A B)\n\n/-- The first projection of a product is a non-unital alg_hom. -/\n@[simps]\ndef fst : A Γ B βββ[R] A where\n toFun := Prod.fst\n map_zero' := rfl\n map_add' _ _ := rfl\n map_smul' _ _ := rfl\n map_mul' _ _ := rfl\n#align non_unital_alg_hom.fst NonUnitalAlgHom.fst\n\n/-- The second projection of a product is a non-unital alg_hom. -/\n@[simps]\ndef snd : A Γ B βββ[R] B where\n toFun := Prod.snd\n map_zero' := rfl\n map_add' _ _ := rfl\n map_smul' _ _ := rfl\n map_mul' _ _ := rfl\n#align non_unital_alg_hom.snd NonUnitalAlgHom.snd\n\nvariable {R A B}\n\n/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun := Pi.prod f g\n map_zero' := by simp only [Pi.prod, Prod.zero_eq_mk, map_zero]\n map_add' x y := by ","nextTactic":"simp only [Pi.prod, Prod.mk_add_mk, map_add]","declUpToTactic":"/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun := Pi.prod f g\n map_zero' := by simp only [Pi.prod, Prod.zero_eq_mk, map_zero]\n map_add' x y := by ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.351_0.9y3TORfxg2P0A5c","decl":"/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf : A βββ[R] B\ng : A βββ[R] C\nx y : A\nβ’ MulActionHom.toFun\n {\n toMulActionHom :=\n { toFun := Pi.prod βf βg,\n map_smul' := (_ : β (c : R) (x : A), (f (c β’ x), g (c β’ x)) = (c β’ f x, c β’ g x)) },\n map_zero' := (_ : (f 0, g 0) = (0, 0)),\n map_add' := (_ : β (x y : A), (f (x + y), g (x + y)) = (f x + f y, g x + g y)) }.toMulActionHom\n (x * y) =\n MulActionHom.toFun\n {\n toMulActionHom :=\n { toFun := Pi.prod βf βg,\n map_smul' := (_ : β (c : R) (x : A), (f (c β’ x), g (c β’ x)) = (c β’ f x, c β’ g x)) },\n map_zero' := (_ : (f 0, g 0) = (0, 0)),\n map_add' := (_ : β (x y : A), (f (x + y), g (x + y)) = (f x + f y, g x + g y)) }.toMulActionHom\n x *\n MulActionHom.toFun\n {\n toMulActionHom :=\n { toFun := Pi.prod βf βg,\n map_smul' := (_ : β (c : R) (x : A), (f (c β’ x), g (c β’ x)) = (c β’ f x, c β’ g x)) },\n map_zero' := (_ : (f 0, g 0) = (0, 0)),\n map_add' := (_ : β (x y : A), (f (x + y), g (x + y)) = (f x + f y, g x + g y)) }.toMulActionHom\n y","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n exact DistribMulActionHom.congr_fun h a\n#align non_unital_alg_hom.to_distrib_mul_action_hom_injective NonUnitalAlgHom.to_distribMulActionHom_injective\n\ntheorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ext a\n exact FunLike.congr_fun h a\n#align non_unital_alg_hom.to_mul_hom_injective NonUnitalAlgHom.to_mulHom_injective\n\n@[norm_cast]\ntheorem coe_distribMulActionHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A β+[R] B) = β¨β¨f, hββ©, hβ, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_distrib_mul_action_hom_mk NonUnitalAlgHom.coe_distribMulActionHom_mk\n\n@[norm_cast]\ntheorem coe_mulHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A ββ* B) = β¨f, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_mul_hom_mk NonUnitalAlgHom.coe_mulHom_mk\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_smul (f : A βββ[R] B) (c : R) (x : A) : f (c β’ x) = c β’ f x :=\n map_smul _ _ _\n#align non_unital_alg_hom.map_smul NonUnitalAlgHom.map_smul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_add (f : A βββ[R] B) (x y : A) : f (x + y) = f x + f y :=\n map_add _ _ _\n#align non_unital_alg_hom.map_add NonUnitalAlgHom.map_add\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_mul (f : A βββ[R] B) (x y : A) : f (x * y) = f x * f y :=\n map_mul _ _ _\n#align non_unital_alg_hom.map_mul NonUnitalAlgHom.map_mul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_zero (f : A βββ[R] B) : f 0 = 0 :=\n map_zero _\n#align non_unital_alg_hom.map_zero NonUnitalAlgHom.map_zero\n\n/-- The identity map as a `NonUnitalAlgHom`. -/\nprotected def id (R A : Type*) [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] : A βββ[R] A :=\n { NonUnitalRingHom.id A with\n toFun := id\n map_smul' := fun _ _ => rfl }\n\n@[simp]\ntheorem coe_id : β(NonUnitalAlgHom.id R A) = id :=\n rfl\n\ninstance : Zero (A βββ[R] B) :=\n β¨{ (0 : A β+[R] B) with map_mul' := by simp }β©\n\ninstance : One (A βββ[R] A) :=\n β¨NonUnitalAlgHom.id R Aβ©\n\n@[simp]\ntheorem coe_zero : β(0 : A βββ[R] B) = 0 :=\n rfl\n#align non_unital_alg_hom.coe_zero NonUnitalAlgHom.coe_zero\n\n@[simp]\ntheorem coe_one : ((1 : A βββ[R] A) : A β A) = id :=\n rfl\n#align non_unital_alg_hom.coe_one NonUnitalAlgHom.coe_one\n\ntheorem zero_apply (a : A) : (0 : A βββ[R] B) a = 0 :=\n rfl\n#align non_unital_alg_hom.zero_apply NonUnitalAlgHom.zero_apply\n\ntheorem one_apply (a : A) : (1 : A βββ[R] A) a = a :=\n rfl\n#align non_unital_alg_hom.one_apply NonUnitalAlgHom.one_apply\n\ninstance : Inhabited (A βββ[R] B) :=\n β¨0β©\n\n/-- The composition of morphisms is a morphism. -/\ndef comp (f : B βββ[R] C) (g : A βββ[R] B) : A βββ[R] C :=\n { (f : B ββ* C).comp (g : A ββ* B), (f : B β+[R] C).comp (g : A β+[R] B) with }\n#align non_unital_alg_hom.comp NonUnitalAlgHom.comp\n\n@[simp, norm_cast]\ntheorem coe_comp (f : B βββ[R] C) (g : A βββ[R] B) :\n β(f.comp g) = (βf) β (βg) :=\n rfl\n#align non_unital_alg_hom.coe_comp NonUnitalAlgHom.coe_comp\n\ntheorem comp_apply (f : B βββ[R] C) (g : A βββ[R] B) (x : A) : f.comp g x = f (g x) :=\n rfl\n#align non_unital_alg_hom.comp_apply NonUnitalAlgHom.comp_apply\n\n/-- The inverse of a bijective morphism is a morphism. -/\ndef inverse (f : A βββ[R] B) (g : B β A) (hβ : Function.LeftInverse g f)\n (hβ : Function.RightInverse g f) : B βββ[R] A :=\n { (f : A ββ* B).inverse g hβ hβ, (f : A β+[R] B).inverse g hβ hβ with }\n#align non_unital_alg_hom.inverse NonUnitalAlgHom.inverse\n\n@[simp]\ntheorem coe_inverse (f : A βββ[R] B) (g : B β A) (hβ : Function.LeftInverse g f)\n (hβ : Function.RightInverse g f) : (inverse f g hβ hβ : B β A) = g :=\n rfl\n#align non_unital_alg_hom.coe_inverse NonUnitalAlgHom.coe_inverse\n\n/-! ### Operations on the product type\n\nNote that much of this is copied from [`LinearAlgebra/Prod`](../../LinearAlgebra/Prod). -/\n\n\nsection Prod\n\nvariable (R A B)\n\n/-- The first projection of a product is a non-unital alg_hom. -/\n@[simps]\ndef fst : A Γ B βββ[R] A where\n toFun := Prod.fst\n map_zero' := rfl\n map_add' _ _ := rfl\n map_smul' _ _ := rfl\n map_mul' _ _ := rfl\n#align non_unital_alg_hom.fst NonUnitalAlgHom.fst\n\n/-- The second projection of a product is a non-unital alg_hom. -/\n@[simps]\ndef snd : A Γ B βββ[R] B where\n toFun := Prod.snd\n map_zero' := rfl\n map_add' _ _ := rfl\n map_smul' _ _ := rfl\n map_mul' _ _ := rfl\n#align non_unital_alg_hom.snd NonUnitalAlgHom.snd\n\nvariable {R A B}\n\n/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun := Pi.prod f g\n map_zero' := by simp only [Pi.prod, Prod.zero_eq_mk, map_zero]\n map_add' x y := by simp only [Pi.prod, Prod.mk_add_mk, map_add]\n map_mul' x y := by ","nextTactic":"simp only [Pi.prod, Prod.mk_mul_mk, map_mul]","declUpToTactic":"/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun := Pi.prod f g\n map_zero' := by simp only [Pi.prod, Prod.zero_eq_mk, map_zero]\n map_add' x y := by simp only [Pi.prod, Prod.mk_add_mk, map_add]\n map_mul' x y := by ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.351_0.9y3TORfxg2P0A5c","decl":"/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf : A βββ[R] B\ng : A βββ[R] C\nβ’ comp (fst R B C) (prod f g) = f","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n exact DistribMulActionHom.congr_fun h a\n#align non_unital_alg_hom.to_distrib_mul_action_hom_injective NonUnitalAlgHom.to_distribMulActionHom_injective\n\ntheorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ext a\n exact FunLike.congr_fun h a\n#align non_unital_alg_hom.to_mul_hom_injective NonUnitalAlgHom.to_mulHom_injective\n\n@[norm_cast]\ntheorem coe_distribMulActionHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A β+[R] B) = β¨β¨f, hββ©, hβ, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_distrib_mul_action_hom_mk NonUnitalAlgHom.coe_distribMulActionHom_mk\n\n@[norm_cast]\ntheorem coe_mulHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A ββ* B) = β¨f, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_mul_hom_mk NonUnitalAlgHom.coe_mulHom_mk\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_smul (f : A βββ[R] B) (c : R) (x : A) : f (c β’ x) = c β’ f x :=\n map_smul _ _ _\n#align non_unital_alg_hom.map_smul NonUnitalAlgHom.map_smul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_add (f : A βββ[R] B) (x y : A) : f (x + y) = f x + f y :=\n map_add _ _ _\n#align non_unital_alg_hom.map_add NonUnitalAlgHom.map_add\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_mul (f : A βββ[R] B) (x y : A) : f (x * y) = f x * f y :=\n map_mul _ _ _\n#align non_unital_alg_hom.map_mul NonUnitalAlgHom.map_mul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_zero (f : A βββ[R] B) : f 0 = 0 :=\n map_zero _\n#align non_unital_alg_hom.map_zero NonUnitalAlgHom.map_zero\n\n/-- The identity map as a `NonUnitalAlgHom`. -/\nprotected def id (R A : Type*) [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] : A βββ[R] A :=\n { NonUnitalRingHom.id A with\n toFun := id\n map_smul' := fun _ _ => rfl }\n\n@[simp]\ntheorem coe_id : β(NonUnitalAlgHom.id R A) = id :=\n rfl\n\ninstance : Zero (A βββ[R] B) :=\n β¨{ (0 : A β+[R] B) with map_mul' := by simp }β©\n\ninstance : One (A βββ[R] A) :=\n β¨NonUnitalAlgHom.id R Aβ©\n\n@[simp]\ntheorem coe_zero : β(0 : A βββ[R] B) = 0 :=\n rfl\n#align non_unital_alg_hom.coe_zero NonUnitalAlgHom.coe_zero\n\n@[simp]\ntheorem coe_one : ((1 : A βββ[R] A) : A β A) = id :=\n rfl\n#align non_unital_alg_hom.coe_one NonUnitalAlgHom.coe_one\n\ntheorem zero_apply (a : A) : (0 : A βββ[R] B) a = 0 :=\n rfl\n#align non_unital_alg_hom.zero_apply NonUnitalAlgHom.zero_apply\n\ntheorem one_apply (a : A) : (1 : A βββ[R] A) a = a :=\n rfl\n#align non_unital_alg_hom.one_apply NonUnitalAlgHom.one_apply\n\ninstance : Inhabited (A βββ[R] B) :=\n β¨0β©\n\n/-- The composition of morphisms is a morphism. -/\ndef comp (f : B βββ[R] C) (g : A βββ[R] B) : A βββ[R] C :=\n { (f : B ββ* C).comp (g : A ββ* B), (f : B β+[R] C).comp (g : A β+[R] B) with }\n#align non_unital_alg_hom.comp NonUnitalAlgHom.comp\n\n@[simp, norm_cast]\ntheorem coe_comp (f : B βββ[R] C) (g : A βββ[R] B) :\n β(f.comp g) = (βf) β (βg) :=\n rfl\n#align non_unital_alg_hom.coe_comp NonUnitalAlgHom.coe_comp\n\ntheorem comp_apply (f : B βββ[R] C) (g : A βββ[R] B) (x : A) : f.comp g x = f (g x) :=\n rfl\n#align non_unital_alg_hom.comp_apply NonUnitalAlgHom.comp_apply\n\n/-- The inverse of a bijective morphism is a morphism. -/\ndef inverse (f : A βββ[R] B) (g : B β A) (hβ : Function.LeftInverse g f)\n (hβ : Function.RightInverse g f) : B βββ[R] A :=\n { (f : A ββ* B).inverse g hβ hβ, (f : A β+[R] B).inverse g hβ hβ with }\n#align non_unital_alg_hom.inverse NonUnitalAlgHom.inverse\n\n@[simp]\ntheorem coe_inverse (f : A βββ[R] B) (g : B β A) (hβ : Function.LeftInverse g f)\n (hβ : Function.RightInverse g f) : (inverse f g hβ hβ : B β A) = g :=\n rfl\n#align non_unital_alg_hom.coe_inverse NonUnitalAlgHom.coe_inverse\n\n/-! ### Operations on the product type\n\nNote that much of this is copied from [`LinearAlgebra/Prod`](../../LinearAlgebra/Prod). -/\n\n\nsection Prod\n\nvariable (R A B)\n\n/-- The first projection of a product is a non-unital alg_hom. -/\n@[simps]\ndef fst : A Γ B βββ[R] A where\n toFun := Prod.fst\n map_zero' := rfl\n map_add' _ _ := rfl\n map_smul' _ _ := rfl\n map_mul' _ _ := rfl\n#align non_unital_alg_hom.fst NonUnitalAlgHom.fst\n\n/-- The second projection of a product is a non-unital alg_hom. -/\n@[simps]\ndef snd : A Γ B βββ[R] B where\n toFun := Prod.snd\n map_zero' := rfl\n map_add' _ _ := rfl\n map_smul' _ _ := rfl\n map_mul' _ _ := rfl\n#align non_unital_alg_hom.snd NonUnitalAlgHom.snd\n\nvariable {R A B}\n\n/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun := Pi.prod f g\n map_zero' := by simp only [Pi.prod, Prod.zero_eq_mk, map_zero]\n map_add' x y := by simp only [Pi.prod, Prod.mk_add_mk, map_add]\n map_mul' x y := by simp only [Pi.prod, Prod.mk_mul_mk, map_mul]\n map_smul' c x := by simp only [Pi.prod, Prod.smul_mk, map_smul, RingHom.id_apply]\n#align non_unital_alg_hom.prod NonUnitalAlgHom.prod\n\ntheorem coe_prod (f : A βββ[R] B) (g : A βββ[R] C) : β(f.prod g) = Pi.prod f g :=\n rfl\n#align non_unital_alg_hom.coe_prod NonUnitalAlgHom.coe_prod\n\n@[simp]\ntheorem fst_prod (f : A βββ[R] B) (g : A βββ[R] C) : (fst R B C).comp (prod f g) = f := by\n ","nextTactic":"rfl","declUpToTactic":"@[simp]\ntheorem fst_prod (f : A βββ[R] B) (g : A βββ[R] C) : (fst R B C).comp (prod f g) = f := by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.366_0.9y3TORfxg2P0A5c","decl":"@[simp]\ntheorem fst_prod (f : A βββ[R] B) (g : A βββ[R] C) : (fst R B C).comp (prod f g) = f "} |
|
{"state":"R : Type u\nA : Type v\nB : Type w\nC : Type wβ\ninstββΆ : Monoid R\ninstββ΅ : NonUnitalNonAssocSemiring A\ninstββ΄ : DistribMulAction R A\ninstβΒ³ : NonUnitalNonAssocSemiring B\ninstβΒ² : DistribMulAction R B\ninstβΒΉ : NonUnitalNonAssocSemiring C\ninstβ : DistribMulAction R C\nf : A βββ[R] B\ng : A βββ[R] C\nβ’ comp (snd R B C) (prod f g) = g","srcUpToTactic":"/-\nCopyright (c) 2021 Oliver Nash. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Oliver Nash\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.hom.non_unital_alg from \"leanprover-community/mathlib\"@\"bd9851ca476957ea4549eb19b40e7b5ade9428cc\"\n\n/-!\n# Morphisms of non-unital algebras\n\nThis file defines morphisms between two types, each of which carries:\n * an addition,\n * an additive zero,\n * a multiplication,\n * a scalar action.\n\nThe multiplications are not assumed to be associative or unital, or even to be compatible with the\nscalar actions. In a typical application, the operations will satisfy compatibility conditions\nmaking them into algebras (albeit possibly non-associative and/or non-unital) but such conditions\nare not required to make this definition.\n\nThis notion of morphism should be useful for any category of non-unital algebras. The motivating\napplication at the time it was introduced was to be able to state the adjunction property for\nmagma algebras. These are non-unital, non-associative algebras obtained by applying the\ngroup-algebra construction except where we take a type carrying just `Mul` instead of `Group`.\n\nFor a plausible future application, one could take the non-unital algebra of compactly-supported\nfunctions on a non-compact topological space. A proper map between a pair of such spaces\n(contravariantly) induces a morphism between their algebras of compactly-supported functions which\nwill be a `NonUnitalAlgHom`.\n\nTODO: add `NonUnitalAlgEquiv` when needed.\n\n## Main definitions\n\n * `NonUnitalAlgHom`\n * `AlgHom.toNonUnitalAlgHom`\n\n## Tags\n\nnon-unital, algebra, morphism\n-/\n\nset_option autoImplicit true\n\n\nuniverse u v w wβ wβ wβ\n\nvariable (R : Type u) (A : Type v) (B : Type w) (C : Type wβ)\n\n/-- A morphism respecting addition, multiplication, and scalar multiplication. When these arise from\nalgebra structures, this is the same as a not-necessarily-unital morphism of algebras. -/\nstructure NonUnitalAlgHom [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] extends A β+[R] B, A ββ* B\n#align non_unital_alg_hom NonUnitalAlgHom\n\n@[inherit_doc NonUnitalAlgHom]\ninfixr:25 \" βββ \" => NonUnitalAlgHom _\n\n@[inherit_doc]\nnotation:25 A \" βββ[\" R \"] \" B => NonUnitalAlgHom R A B\n\nattribute [nolint docBlame] NonUnitalAlgHom.toMulHom\n\n/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms\nfrom `A` to `B`. -/\nclass NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))\n (B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]\n [DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,\n MulHomClass F A B\n#align non_unital_alg_hom_class NonUnitalAlgHomClass\n\n-- Porting note: commented out, not dangerous\n-- attribute [nolint dangerousInstance] NonUnitalAlgHomClass.toMulHomClass\n\nnamespace NonUnitalAlgHomClass\n\n-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement\n-- See note [lower instance priority]\ninstance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}\n [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with coe := (β) }\n#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass\n\nvariable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]\n [NonUnitalNonAssocSemiring B] [Module R B]\n\n-- see Note [lower instance priority]\ninstance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=\n { βΉNonUnitalAlgHomClass F R A BβΊ with map_smulββ := map_smul }\n\n/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual\n`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A βββ[R] B`. -/\n@[coe]\ndef toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n [NonUnitalAlgHomClass F R A B] (f : F) : A βββ[R] B :=\n { (f : A ββ+* B) with\n map_smul' := map_smul f }\n\ninstance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :\n CoeTC F (A βββ[R] B) :=\n β¨toNonUnitalAlgHomβ©\n\nend NonUnitalAlgHomClass\n\nnamespace NonUnitalAlgHom\n\nvariable {R A B C} [Monoid R]\n\nvariable [NonUnitalNonAssocSemiring A] [DistribMulAction R A]\n\nvariable [NonUnitalNonAssocSemiring B] [DistribMulAction R B]\n\nvariable [NonUnitalNonAssocSemiring C] [DistribMulAction R C]\n\n-- Porting note: Replaced with FunLike instance\n-- /-- see Note [function coercion] -/\n-- instance : CoeFun (A βββ[R] B) fun _ => A β B :=\n-- β¨toFunβ©\n\ninstance : FunLike (A βββ[R] B) A fun _ => B where\n coe f := f.toFun\n coe_injective' := by rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n\n@[simp]\ntheorem toFun_eq_coe (f : A βββ[R] B) : f.toFun = βf :=\n rfl\n#align non_unital_alg_hom.to_fun_eq_coe NonUnitalAlgHom.toFun_eq_coe\n\n/-- See Note [custom simps projection] -/\ndef Simps.apply (f : A βββ[R] B) : A β B := f\n\ninitialize_simps_projections NonUnitalAlgHom\n (toDistribMulActionHom_toMulActionHom_toFun β apply, -toDistribMulActionHom)\n\n@[simp]\nprotected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :\n β(f : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe\n\ntheorem coe_injective : @Function.Injective (A βββ[R] B) (A β B) (β) := by\n rintro β¨β¨β¨f, _β©, _β©, _β© β¨β¨β¨g, _β©, _β©, _β© h; congr\n#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective\n\ninstance : NonUnitalAlgHomClass (A βββ[R] B) R A B\n where\n coe f := f.toFun\n coe_injective' := coe_injective\n map_smul f := f.map_smul'\n map_add f := f.map_add'\n map_zero f := f.map_zero'\n map_mul f := f.map_mul'\n\n@[ext]\ntheorem ext {f g : A βββ[R] B} (h : β x, f x = g x) : f = g :=\n coe_injective <| funext h\n#align non_unital_alg_hom.ext NonUnitalAlgHom.ext\n\ntheorem ext_iff {f g : A βββ[R] B} : f = g β β x, f x = g x :=\n β¨by\n rintro rfl x\n rfl, extβ©\n#align non_unital_alg_hom.ext_iff NonUnitalAlgHom.ext_iff\n\ntheorem congr_fun {f g : A βββ[R] B} (h : f = g) (x : A) : f x = g x :=\n h βΈ rfl\n#align non_unital_alg_hom.congr_fun NonUnitalAlgHom.congr_fun\n\n@[simp]\ntheorem coe_mk (f : A β B) (hβ hβ hβ hβ) : β(β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_mk NonUnitalAlgHom.coe_mk\n\n@[simp]\ntheorem mk_coe (f : A βββ[R] B) (hβ hβ hβ hβ) : (β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) = f := by\n rfl\n#align non_unital_alg_hom.mk_coe NonUnitalAlgHom.mk_coe\n\ninstance : CoeOut (A βββ[R] B) (A β+[R] B) :=\n β¨toDistribMulActionHomβ©\n\ninstance : CoeOut (A βββ[R] B) (A ββ* B) :=\n β¨toMulHomβ©\n\n@[simp]\ntheorem toDistribMulActionHom_eq_coe (f : A βββ[R] B) : f.toDistribMulActionHom = βf :=\n rfl\n#align non_unital_alg_hom.to_distrib_mul_action_hom_eq_coe NonUnitalAlgHom.toDistribMulActionHom_eq_coe\n\n@[simp]\ntheorem toMulHom_eq_coe (f : A βββ[R] B) : f.toMulHom = βf :=\n rfl\n#align non_unital_alg_hom.to_mul_hom_eq_coe NonUnitalAlgHom.toMulHom_eq_coe\n\n@[simp, norm_cast]\ntheorem coe_to_distribMulActionHom (f : A βββ[R] B) : β(f : A β+[R] B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_distrib_mul_action_hom NonUnitalAlgHom.coe_to_distribMulActionHom\n\n@[simp, norm_cast]\ntheorem coe_to_mulHom (f : A βββ[R] B) : β(f : A ββ* B) = f :=\n rfl\n#align non_unital_alg_hom.coe_to_mul_hom NonUnitalAlgHom.coe_to_mulHom\n\ntheorem to_distribMulActionHom_injective {f g : A βββ[R] B}\n (h : (f : A β+[R] B) = (g : A β+[R] B)) : f = g := by\n ext a\n exact DistribMulActionHom.congr_fun h a\n#align non_unital_alg_hom.to_distrib_mul_action_hom_injective NonUnitalAlgHom.to_distribMulActionHom_injective\n\ntheorem to_mulHom_injective {f g : A βββ[R] B} (h : (f : A ββ* B) = (g : A ββ* B)) : f = g := by\n ext a\n exact FunLike.congr_fun h a\n#align non_unital_alg_hom.to_mul_hom_injective NonUnitalAlgHom.to_mulHom_injective\n\n@[norm_cast]\ntheorem coe_distribMulActionHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A β+[R] B) = β¨β¨f, hββ©, hβ, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_distrib_mul_action_hom_mk NonUnitalAlgHom.coe_distribMulActionHom_mk\n\n@[norm_cast]\ntheorem coe_mulHom_mk (f : A βββ[R] B) (hβ hβ hβ hβ) :\n ((β¨β¨β¨f, hββ©, hβ, hββ©, hββ© : A βββ[R] B) : A ββ* B) = β¨f, hββ© := by\n rfl\n#align non_unital_alg_hom.coe_mul_hom_mk NonUnitalAlgHom.coe_mulHom_mk\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_smul (f : A βββ[R] B) (c : R) (x : A) : f (c β’ x) = c β’ f x :=\n map_smul _ _ _\n#align non_unital_alg_hom.map_smul NonUnitalAlgHom.map_smul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_add (f : A βββ[R] B) (x y : A) : f (x + y) = f x + f y :=\n map_add _ _ _\n#align non_unital_alg_hom.map_add NonUnitalAlgHom.map_add\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_mul (f : A βββ[R] B) (x y : A) : f (x * y) = f x * f y :=\n map_mul _ _ _\n#align non_unital_alg_hom.map_mul NonUnitalAlgHom.map_mul\n\n-- @[simp] -- Porting note: simp can prove this\nprotected theorem map_zero (f : A βββ[R] B) : f 0 = 0 :=\n map_zero _\n#align non_unital_alg_hom.map_zero NonUnitalAlgHom.map_zero\n\n/-- The identity map as a `NonUnitalAlgHom`. -/\nprotected def id (R A : Type*) [Monoid R] [NonUnitalNonAssocSemiring A]\n [DistribMulAction R A] : A βββ[R] A :=\n { NonUnitalRingHom.id A with\n toFun := id\n map_smul' := fun _ _ => rfl }\n\n@[simp]\ntheorem coe_id : β(NonUnitalAlgHom.id R A) = id :=\n rfl\n\ninstance : Zero (A βββ[R] B) :=\n β¨{ (0 : A β+[R] B) with map_mul' := by simp }β©\n\ninstance : One (A βββ[R] A) :=\n β¨NonUnitalAlgHom.id R Aβ©\n\n@[simp]\ntheorem coe_zero : β(0 : A βββ[R] B) = 0 :=\n rfl\n#align non_unital_alg_hom.coe_zero NonUnitalAlgHom.coe_zero\n\n@[simp]\ntheorem coe_one : ((1 : A βββ[R] A) : A β A) = id :=\n rfl\n#align non_unital_alg_hom.coe_one NonUnitalAlgHom.coe_one\n\ntheorem zero_apply (a : A) : (0 : A βββ[R] B) a = 0 :=\n rfl\n#align non_unital_alg_hom.zero_apply NonUnitalAlgHom.zero_apply\n\ntheorem one_apply (a : A) : (1 : A βββ[R] A) a = a :=\n rfl\n#align non_unital_alg_hom.one_apply NonUnitalAlgHom.one_apply\n\ninstance : Inhabited (A βββ[R] B) :=\n β¨0β©\n\n/-- The composition of morphisms is a morphism. -/\ndef comp (f : B βββ[R] C) (g : A βββ[R] B) : A βββ[R] C :=\n { (f : B ββ* C).comp (g : A ββ* B), (f : B β+[R] C).comp (g : A β+[R] B) with }\n#align non_unital_alg_hom.comp NonUnitalAlgHom.comp\n\n@[simp, norm_cast]\ntheorem coe_comp (f : B βββ[R] C) (g : A βββ[R] B) :\n β(f.comp g) = (βf) β (βg) :=\n rfl\n#align non_unital_alg_hom.coe_comp NonUnitalAlgHom.coe_comp\n\ntheorem comp_apply (f : B βββ[R] C) (g : A βββ[R] B) (x : A) : f.comp g x = f (g x) :=\n rfl\n#align non_unital_alg_hom.comp_apply NonUnitalAlgHom.comp_apply\n\n/-- The inverse of a bijective morphism is a morphism. -/\ndef inverse (f : A βββ[R] B) (g : B β A) (hβ : Function.LeftInverse g f)\n (hβ : Function.RightInverse g f) : B βββ[R] A :=\n { (f : A ββ* B).inverse g hβ hβ, (f : A β+[R] B).inverse g hβ hβ with }\n#align non_unital_alg_hom.inverse NonUnitalAlgHom.inverse\n\n@[simp]\ntheorem coe_inverse (f : A βββ[R] B) (g : B β A) (hβ : Function.LeftInverse g f)\n (hβ : Function.RightInverse g f) : (inverse f g hβ hβ : B β A) = g :=\n rfl\n#align non_unital_alg_hom.coe_inverse NonUnitalAlgHom.coe_inverse\n\n/-! ### Operations on the product type\n\nNote that much of this is copied from [`LinearAlgebra/Prod`](../../LinearAlgebra/Prod). -/\n\n\nsection Prod\n\nvariable (R A B)\n\n/-- The first projection of a product is a non-unital alg_hom. -/\n@[simps]\ndef fst : A Γ B βββ[R] A where\n toFun := Prod.fst\n map_zero' := rfl\n map_add' _ _ := rfl\n map_smul' _ _ := rfl\n map_mul' _ _ := rfl\n#align non_unital_alg_hom.fst NonUnitalAlgHom.fst\n\n/-- The second projection of a product is a non-unital alg_hom. -/\n@[simps]\ndef snd : A Γ B βββ[R] B where\n toFun := Prod.snd\n map_zero' := rfl\n map_add' _ _ := rfl\n map_smul' _ _ := rfl\n map_mul' _ _ := rfl\n#align non_unital_alg_hom.snd NonUnitalAlgHom.snd\n\nvariable {R A B}\n\n/-- The prod of two morphisms is a morphism. -/\n@[simps]\ndef prod (f : A βββ[R] B) (g : A βββ[R] C) : A βββ[R] B Γ C\n where\n toFun := Pi.prod f g\n map_zero' := by simp only [Pi.prod, Prod.zero_eq_mk, map_zero]\n map_add' x y := by simp only [Pi.prod, Prod.mk_add_mk, map_add]\n map_mul' x y := by simp only [Pi.prod, Prod.mk_mul_mk, map_mul]\n map_smul' c x := by simp only [Pi.prod, Prod.smul_mk, map_smul, RingHom.id_apply]\n#align non_unital_alg_hom.prod NonUnitalAlgHom.prod\n\ntheorem coe_prod (f : A βββ[R] B) (g : A βββ[R] C) : β(f.prod g) = Pi.prod f g :=\n rfl\n#align non_unital_alg_hom.coe_prod NonUnitalAlgHom.coe_prod\n\n@[simp]\ntheorem fst_prod (f : A βββ[R] B) (g : A βββ[R] C) : (fst R B C).comp (prod f g) = f := by\n rfl\n#align non_unital_alg_hom.fst_prod NonUnitalAlgHom.fst_prod\n\n@[simp]\ntheorem snd_prod (f : A βββ[R] B) (g : A βββ[R] C) : (snd R B C).comp (prod f g) = g := by\n ","nextTactic":"rfl","declUpToTactic":"@[simp]\ntheorem snd_prod (f : A βββ[R] B) (g : A βββ[R] C) : (snd R B C).comp (prod f g) = g := by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_NonUnitalHom.371_0.9y3TORfxg2P0A5c","decl":"@[simp]\ntheorem snd_prod (f : A βββ[R] B) (g : A βββ[R] C) : (snd R B C).comp (prod f g) = g "} |
|
|