ntp-mathlib / Extracted /Mathlib /TacticPrediction /Mathlib_Algebra_Algebra_Prod.jsonl
wellecks's picture
Upload folder using huggingface_hub
01d1bb5 verified
raw
history blame
55.4 kB
{"state":"R : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nsrc✝¹ : Module R (A Γ— B) := instModule\nsrc✝ : R β†’+* A Γ— B := RingHom.prod (algebraMap R A) (algebraMap R B)\n⊒ βˆ€ (r : R) (x : A Γ— B),\n { toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n map_add' :=\n (_ : βˆ€ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n r *\n x =\n x *\n { toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n map_add' :=\n (_ : βˆ€ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n r","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n ","nextTactic":"rintro r ⟨a, b⟩","declUpToTactic":"instance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.35_0.SYlFgSZc7uFXKXx","decl":"instance algebra : Algebra R (A Γ— B) "}
{"state":"case mk\nR : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nsrc✝¹ : Module R (A Γ— B) := instModule\nsrc✝ : R β†’+* A Γ— B := RingHom.prod (algebraMap R A) (algebraMap R B)\nr : R\na : A\nb : B\n⊒ { toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n map_add' :=\n (_ : βˆ€ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n r *\n (a, b) =\n (a, b) *\n { toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n map_add' :=\n (_ : βˆ€ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n r","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n ","nextTactic":"dsimp","declUpToTactic":"instance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.35_0.SYlFgSZc7uFXKXx","decl":"instance algebra : Algebra R (A Γ— B) "}
{"state":"case mk\nR : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nsrc✝¹ : Module R (A Γ— B) := instModule\nsrc✝ : R β†’+* A Γ— B := RingHom.prod (algebraMap R A) (algebraMap R B)\nr : R\na : A\nb : B\n⊒ ((algebraMap R A) r * a, (algebraMap R B) r * b) = (a * (algebraMap R A) r, b * (algebraMap R B) r)","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n ","nextTactic":"rw [commutes r a]","declUpToTactic":"instance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.35_0.SYlFgSZc7uFXKXx","decl":"instance algebra : Algebra R (A Γ— B) "}
{"state":"case mk\nR : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nsrc✝¹ : Module R (A Γ— B) := instModule\nsrc✝ : R β†’+* A Γ— B := RingHom.prod (algebraMap R A) (algebraMap R B)\nr : R\na : A\nb : B\n⊒ (a * (algebraMap R A) r, (algebraMap R B) r * b) = (a * (algebraMap R A) r, b * (algebraMap R B) r)","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n ","nextTactic":"rw [commutes r b]","declUpToTactic":"instance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.35_0.SYlFgSZc7uFXKXx","decl":"instance algebra : Algebra R (A Γ— B) "}
{"state":"R : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nsrc✝¹ : Module R (A Γ— B) := instModule\nsrc✝ : R β†’+* A Γ— B := RingHom.prod (algebraMap R A) (algebraMap R B)\n⊒ βˆ€ (r : R) (x : A Γ— B),\n r β€’ x =\n { toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n map_add' :=\n (_ : βˆ€ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n r *\n x","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n ","nextTactic":"rintro r ⟨a, b⟩","declUpToTactic":"instance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.35_0.SYlFgSZc7uFXKXx","decl":"instance algebra : Algebra R (A Γ— B) "}
{"state":"case mk\nR : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nsrc✝¹ : Module R (A Γ— B) := instModule\nsrc✝ : R β†’+* A Γ— B := RingHom.prod (algebraMap R A) (algebraMap R B)\nr : R\na : A\nb : B\n⊒ r β€’ (a, b) =\n { toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n map_add' :=\n (_ : βˆ€ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n r *\n (a, b)","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n ","nextTactic":"dsimp","declUpToTactic":"instance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.35_0.SYlFgSZc7uFXKXx","decl":"instance algebra : Algebra R (A Γ— B) "}
{"state":"case mk\nR : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nsrc✝¹ : Module R (A Γ— B) := instModule\nsrc✝ : R β†’+* A Γ— B := RingHom.prod (algebraMap R A) (algebraMap R B)\nr : R\na : A\nb : B\n⊒ (r β€’ a, r β€’ b) = ((algebraMap R A) r * a, (algebraMap R B) r * b)","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n ","nextTactic":"rw [Algebra.smul_def r a, Algebra.smul_def r b]","declUpToTactic":"instance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.35_0.SYlFgSZc7uFXKXx","decl":"instance algebra : Algebra R (A Γ— B) "}
{"state":"R : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nf : A →ₐ[R] B\ng : A →ₐ[R] C\nsrc✝ : A β†’+* B Γ— C := RingHom.prod ↑f ↑g\nr : R\n⊒ OneHom.toFun\n (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n map_add' :=\n (_ : βˆ€ (x y : A), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n ((algebraMap R A) r) =\n (algebraMap R (B Γ— C)) r","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [Algebra.smul_def r a, Algebra.smul_def r b] }\n#align prod.algebra Prod.algebra\n\nvariable {R A B}\n\n@[simp]\ntheorem algebraMap_apply (r : R) : algebraMap R (A Γ— B) r = (algebraMap R A r, algebraMap R B r) :=\n rfl\n#align prod.algebra_map_apply Prod.algebraMap_apply\n\nend Prod\n\nnamespace AlgHom\n\nvariable (R A B)\n\n/-- First projection as `AlgHom`. -/\ndef fst : A Γ— B →ₐ[R] A :=\n { RingHom.fst A B with commutes' := fun _r => rfl }\n#align alg_hom.fst AlgHom.fst\n\n/-- Second projection as `AlgHom`. -/\ndef snd : A Γ— B →ₐ[R] B :=\n { RingHom.snd A B with commutes' := fun _r => rfl }\n#align alg_hom.snd AlgHom.snd\n\nvariable {R A B}\n\n/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C :=\n { f.toRingHom.prod g.toRingHom with\n commutes' := fun r => by\n ","nextTactic":"simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,\n commutes, Prod.algebraMap_apply]","declUpToTactic":"/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C :=\n { f.toRingHom.prod g.toRingHom with\n commutes' := fun r => by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.74_0.SYlFgSZc7uFXKXx","decl":"/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C "}
{"state":"R : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nf : A →ₐ[R] B\ng : A →ₐ[R] C\n⊒ comp (fst R B C) (prod f g) = f","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [Algebra.smul_def r a, Algebra.smul_def r b] }\n#align prod.algebra Prod.algebra\n\nvariable {R A B}\n\n@[simp]\ntheorem algebraMap_apply (r : R) : algebraMap R (A Γ— B) r = (algebraMap R A r, algebraMap R B r) :=\n rfl\n#align prod.algebra_map_apply Prod.algebraMap_apply\n\nend Prod\n\nnamespace AlgHom\n\nvariable (R A B)\n\n/-- First projection as `AlgHom`. -/\ndef fst : A Γ— B →ₐ[R] A :=\n { RingHom.fst A B with commutes' := fun _r => rfl }\n#align alg_hom.fst AlgHom.fst\n\n/-- Second projection as `AlgHom`. -/\ndef snd : A Γ— B →ₐ[R] B :=\n { RingHom.snd A B with commutes' := fun _r => rfl }\n#align alg_hom.snd AlgHom.snd\n\nvariable {R A B}\n\n/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C :=\n { f.toRingHom.prod g.toRingHom with\n commutes' := fun r => by\n simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,\n commutes, Prod.algebraMap_apply] }\n#align alg_hom.prod AlgHom.prod\n\ntheorem coe_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g :=\n rfl\n#align alg_hom.coe_prod AlgHom.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 ","nextTactic":"ext","declUpToTactic":"@[simp]\ntheorem fst_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : (fst R B C).comp (prod f g) = f := by ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.87_0.SYlFgSZc7uFXKXx","decl":"@[simp]\ntheorem fst_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : (fst R B C).comp (prod f g) = f "}
{"state":"case H\nR : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nf : A →ₐ[R] B\ng : A →ₐ[R] C\nx✝ : A\n⊒ (comp (fst R B C) (prod f g)) x✝ = f x✝","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [Algebra.smul_def r a, Algebra.smul_def r b] }\n#align prod.algebra Prod.algebra\n\nvariable {R A B}\n\n@[simp]\ntheorem algebraMap_apply (r : R) : algebraMap R (A Γ— B) r = (algebraMap R A r, algebraMap R B r) :=\n rfl\n#align prod.algebra_map_apply Prod.algebraMap_apply\n\nend Prod\n\nnamespace AlgHom\n\nvariable (R A B)\n\n/-- First projection as `AlgHom`. -/\ndef fst : A Γ— B →ₐ[R] A :=\n { RingHom.fst A B with commutes' := fun _r => rfl }\n#align alg_hom.fst AlgHom.fst\n\n/-- Second projection as `AlgHom`. -/\ndef snd : A Γ— B →ₐ[R] B :=\n { RingHom.snd A B with commutes' := fun _r => rfl }\n#align alg_hom.snd AlgHom.snd\n\nvariable {R A B}\n\n/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C :=\n { f.toRingHom.prod g.toRingHom with\n commutes' := fun r => by\n simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,\n commutes, Prod.algebraMap_apply] }\n#align alg_hom.prod AlgHom.prod\n\ntheorem coe_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g :=\n rfl\n#align alg_hom.coe_prod AlgHom.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 ext; ","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 ext; ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.87_0.SYlFgSZc7uFXKXx","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_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nf : A →ₐ[R] B\ng : A →ₐ[R] C\n⊒ comp (snd R B C) (prod f g) = g","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [Algebra.smul_def r a, Algebra.smul_def r b] }\n#align prod.algebra Prod.algebra\n\nvariable {R A B}\n\n@[simp]\ntheorem algebraMap_apply (r : R) : algebraMap R (A Γ— B) r = (algebraMap R A r, algebraMap R B r) :=\n rfl\n#align prod.algebra_map_apply Prod.algebraMap_apply\n\nend Prod\n\nnamespace AlgHom\n\nvariable (R A B)\n\n/-- First projection as `AlgHom`. -/\ndef fst : A Γ— B →ₐ[R] A :=\n { RingHom.fst A B with commutes' := fun _r => rfl }\n#align alg_hom.fst AlgHom.fst\n\n/-- Second projection as `AlgHom`. -/\ndef snd : A Γ— B →ₐ[R] B :=\n { RingHom.snd A B with commutes' := fun _r => rfl }\n#align alg_hom.snd AlgHom.snd\n\nvariable {R A B}\n\n/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C :=\n { f.toRingHom.prod g.toRingHom with\n commutes' := fun r => by\n simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,\n commutes, Prod.algebraMap_apply] }\n#align alg_hom.prod AlgHom.prod\n\ntheorem coe_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g :=\n rfl\n#align alg_hom.coe_prod AlgHom.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 ext; rfl\n#align alg_hom.fst_prod AlgHom.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 ","nextTactic":"ext","declUpToTactic":"@[simp]\ntheorem snd_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : (snd R B C).comp (prod f g) = g := by ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.91_0.SYlFgSZc7uFXKXx","decl":"@[simp]\ntheorem snd_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : (snd R B C).comp (prod f g) = g "}
{"state":"case H\nR : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nf : A →ₐ[R] B\ng : A →ₐ[R] C\nx✝ : A\n⊒ (comp (snd R B C) (prod f g)) x✝ = g x✝","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [Algebra.smul_def r a, Algebra.smul_def r b] }\n#align prod.algebra Prod.algebra\n\nvariable {R A B}\n\n@[simp]\ntheorem algebraMap_apply (r : R) : algebraMap R (A Γ— B) r = (algebraMap R A r, algebraMap R B r) :=\n rfl\n#align prod.algebra_map_apply Prod.algebraMap_apply\n\nend Prod\n\nnamespace AlgHom\n\nvariable (R A B)\n\n/-- First projection as `AlgHom`. -/\ndef fst : A Γ— B →ₐ[R] A :=\n { RingHom.fst A B with commutes' := fun _r => rfl }\n#align alg_hom.fst AlgHom.fst\n\n/-- Second projection as `AlgHom`. -/\ndef snd : A Γ— B →ₐ[R] B :=\n { RingHom.snd A B with commutes' := fun _r => rfl }\n#align alg_hom.snd AlgHom.snd\n\nvariable {R A B}\n\n/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C :=\n { f.toRingHom.prod g.toRingHom with\n commutes' := fun r => by\n simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,\n commutes, Prod.algebraMap_apply] }\n#align alg_hom.prod AlgHom.prod\n\ntheorem coe_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g :=\n rfl\n#align alg_hom.coe_prod AlgHom.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 ext; rfl\n#align alg_hom.fst_prod AlgHom.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 ext; ","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 ext; ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.91_0.SYlFgSZc7uFXKXx","decl":"@[simp]\ntheorem snd_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : (snd R B C).comp (prod f g) = g "}
{"state":"R : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nf : (A →ₐ[R] B) Γ— (A →ₐ[R] C)\n⊒ (fun f => (comp (fst R B C) f, comp (snd R B C) f)) ((fun f => prod f.1 f.2) f) = f","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [Algebra.smul_def r a, Algebra.smul_def r b] }\n#align prod.algebra Prod.algebra\n\nvariable {R A B}\n\n@[simp]\ntheorem algebraMap_apply (r : R) : algebraMap R (A Γ— B) r = (algebraMap R A r, algebraMap R B r) :=\n rfl\n#align prod.algebra_map_apply Prod.algebraMap_apply\n\nend Prod\n\nnamespace AlgHom\n\nvariable (R A B)\n\n/-- First projection as `AlgHom`. -/\ndef fst : A Γ— B →ₐ[R] A :=\n { RingHom.fst A B with commutes' := fun _r => rfl }\n#align alg_hom.fst AlgHom.fst\n\n/-- Second projection as `AlgHom`. -/\ndef snd : A Γ— B →ₐ[R] B :=\n { RingHom.snd A B with commutes' := fun _r => rfl }\n#align alg_hom.snd AlgHom.snd\n\nvariable {R A B}\n\n/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C :=\n { f.toRingHom.prod g.toRingHom with\n commutes' := fun r => by\n simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,\n commutes, Prod.algebraMap_apply] }\n#align alg_hom.prod AlgHom.prod\n\ntheorem coe_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g :=\n rfl\n#align alg_hom.coe_prod AlgHom.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 ext; rfl\n#align alg_hom.fst_prod AlgHom.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 ext; rfl\n#align alg_hom.snd_prod AlgHom.snd_prod\n\n@[simp]\ntheorem prod_fst_snd : prod (fst R A B) (snd R A B) = 1 :=\n FunLike.coe_injective Pi.prod_fst_snd\n#align alg_hom.prod_fst_snd AlgHom.prod_fst_snd\n\n/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f := f.1.prod f.2\n invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)\n left_inv f := by ","nextTactic":"ext","declUpToTactic":"/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f := f.1.prod f.2\n invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)\n left_inv f := by ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.100_0.SYlFgSZc7uFXKXx","decl":"/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f "}
{"state":"case a.H\nR : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nf : (A →ₐ[R] B) Γ— (A →ₐ[R] C)\nx✝ : A\n⊒ ((fun f => (comp (fst R B C) f, comp (snd R B C) f)) ((fun f => prod f.1 f.2) f)).1 x✝ = f.1 x✝","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [Algebra.smul_def r a, Algebra.smul_def r b] }\n#align prod.algebra Prod.algebra\n\nvariable {R A B}\n\n@[simp]\ntheorem algebraMap_apply (r : R) : algebraMap R (A Γ— B) r = (algebraMap R A r, algebraMap R B r) :=\n rfl\n#align prod.algebra_map_apply Prod.algebraMap_apply\n\nend Prod\n\nnamespace AlgHom\n\nvariable (R A B)\n\n/-- First projection as `AlgHom`. -/\ndef fst : A Γ— B →ₐ[R] A :=\n { RingHom.fst A B with commutes' := fun _r => rfl }\n#align alg_hom.fst AlgHom.fst\n\n/-- Second projection as `AlgHom`. -/\ndef snd : A Γ— B →ₐ[R] B :=\n { RingHom.snd A B with commutes' := fun _r => rfl }\n#align alg_hom.snd AlgHom.snd\n\nvariable {R A B}\n\n/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C :=\n { f.toRingHom.prod g.toRingHom with\n commutes' := fun r => by\n simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,\n commutes, Prod.algebraMap_apply] }\n#align alg_hom.prod AlgHom.prod\n\ntheorem coe_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g :=\n rfl\n#align alg_hom.coe_prod AlgHom.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 ext; rfl\n#align alg_hom.fst_prod AlgHom.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 ext; rfl\n#align alg_hom.snd_prod AlgHom.snd_prod\n\n@[simp]\ntheorem prod_fst_snd : prod (fst R A B) (snd R A B) = 1 :=\n FunLike.coe_injective Pi.prod_fst_snd\n#align alg_hom.prod_fst_snd AlgHom.prod_fst_snd\n\n/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f := f.1.prod f.2\n invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)\n left_inv f := by ext <;> ","nextTactic":"rfl","declUpToTactic":"/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f := f.1.prod f.2\n invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)\n left_inv f := by ext <;> ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.100_0.SYlFgSZc7uFXKXx","decl":"/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f "}
{"state":"case a.H\nR : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nf : (A →ₐ[R] B) Γ— (A →ₐ[R] C)\nx✝ : A\n⊒ ((fun f => (comp (fst R B C) f, comp (snd R B C) f)) ((fun f => prod f.1 f.2) f)).2 x✝ = f.2 x✝","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [Algebra.smul_def r a, Algebra.smul_def r b] }\n#align prod.algebra Prod.algebra\n\nvariable {R A B}\n\n@[simp]\ntheorem algebraMap_apply (r : R) : algebraMap R (A Γ— B) r = (algebraMap R A r, algebraMap R B r) :=\n rfl\n#align prod.algebra_map_apply Prod.algebraMap_apply\n\nend Prod\n\nnamespace AlgHom\n\nvariable (R A B)\n\n/-- First projection as `AlgHom`. -/\ndef fst : A Γ— B →ₐ[R] A :=\n { RingHom.fst A B with commutes' := fun _r => rfl }\n#align alg_hom.fst AlgHom.fst\n\n/-- Second projection as `AlgHom`. -/\ndef snd : A Γ— B →ₐ[R] B :=\n { RingHom.snd A B with commutes' := fun _r => rfl }\n#align alg_hom.snd AlgHom.snd\n\nvariable {R A B}\n\n/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C :=\n { f.toRingHom.prod g.toRingHom with\n commutes' := fun r => by\n simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,\n commutes, Prod.algebraMap_apply] }\n#align alg_hom.prod AlgHom.prod\n\ntheorem coe_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g :=\n rfl\n#align alg_hom.coe_prod AlgHom.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 ext; rfl\n#align alg_hom.fst_prod AlgHom.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 ext; rfl\n#align alg_hom.snd_prod AlgHom.snd_prod\n\n@[simp]\ntheorem prod_fst_snd : prod (fst R A B) (snd R A B) = 1 :=\n FunLike.coe_injective Pi.prod_fst_snd\n#align alg_hom.prod_fst_snd AlgHom.prod_fst_snd\n\n/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f := f.1.prod f.2\n invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)\n left_inv f := by ext <;> ","nextTactic":"rfl","declUpToTactic":"/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f := f.1.prod f.2\n invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)\n left_inv f := by ext <;> ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.100_0.SYlFgSZc7uFXKXx","decl":"/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f "}
{"state":"R : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nf : A →ₐ[R] B Γ— C\n⊒ (fun f => prod f.1 f.2) ((fun f => (comp (fst R B C) f, comp (snd R B C) f)) f) = f","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [Algebra.smul_def r a, Algebra.smul_def r b] }\n#align prod.algebra Prod.algebra\n\nvariable {R A B}\n\n@[simp]\ntheorem algebraMap_apply (r : R) : algebraMap R (A Γ— B) r = (algebraMap R A r, algebraMap R B r) :=\n rfl\n#align prod.algebra_map_apply Prod.algebraMap_apply\n\nend Prod\n\nnamespace AlgHom\n\nvariable (R A B)\n\n/-- First projection as `AlgHom`. -/\ndef fst : A Γ— B →ₐ[R] A :=\n { RingHom.fst A B with commutes' := fun _r => rfl }\n#align alg_hom.fst AlgHom.fst\n\n/-- Second projection as `AlgHom`. -/\ndef snd : A Γ— B →ₐ[R] B :=\n { RingHom.snd A B with commutes' := fun _r => rfl }\n#align alg_hom.snd AlgHom.snd\n\nvariable {R A B}\n\n/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C :=\n { f.toRingHom.prod g.toRingHom with\n commutes' := fun r => by\n simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,\n commutes, Prod.algebraMap_apply] }\n#align alg_hom.prod AlgHom.prod\n\ntheorem coe_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g :=\n rfl\n#align alg_hom.coe_prod AlgHom.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 ext; rfl\n#align alg_hom.fst_prod AlgHom.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 ext; rfl\n#align alg_hom.snd_prod AlgHom.snd_prod\n\n@[simp]\ntheorem prod_fst_snd : prod (fst R A B) (snd R A B) = 1 :=\n FunLike.coe_injective Pi.prod_fst_snd\n#align alg_hom.prod_fst_snd AlgHom.prod_fst_snd\n\n/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f := f.1.prod f.2\n invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)\n left_inv f := by ext <;> rfl\n right_inv f := by ","nextTactic":"ext","declUpToTactic":"/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f := f.1.prod f.2\n invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)\n left_inv f := by ext <;> rfl\n right_inv f := by ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.100_0.SYlFgSZc7uFXKXx","decl":"/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f "}
{"state":"case H.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nf : A →ₐ[R] B Γ— C\nx✝ : A\n⊒ (((fun f => prod f.1 f.2) ((fun f => (comp (fst R B C) f, comp (snd R B C) f)) f)) x✝).1 = (f x✝).1","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [Algebra.smul_def r a, Algebra.smul_def r b] }\n#align prod.algebra Prod.algebra\n\nvariable {R A B}\n\n@[simp]\ntheorem algebraMap_apply (r : R) : algebraMap R (A Γ— B) r = (algebraMap R A r, algebraMap R B r) :=\n rfl\n#align prod.algebra_map_apply Prod.algebraMap_apply\n\nend Prod\n\nnamespace AlgHom\n\nvariable (R A B)\n\n/-- First projection as `AlgHom`. -/\ndef fst : A Γ— B →ₐ[R] A :=\n { RingHom.fst A B with commutes' := fun _r => rfl }\n#align alg_hom.fst AlgHom.fst\n\n/-- Second projection as `AlgHom`. -/\ndef snd : A Γ— B →ₐ[R] B :=\n { RingHom.snd A B with commutes' := fun _r => rfl }\n#align alg_hom.snd AlgHom.snd\n\nvariable {R A B}\n\n/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C :=\n { f.toRingHom.prod g.toRingHom with\n commutes' := fun r => by\n simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,\n commutes, Prod.algebraMap_apply] }\n#align alg_hom.prod AlgHom.prod\n\ntheorem coe_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g :=\n rfl\n#align alg_hom.coe_prod AlgHom.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 ext; rfl\n#align alg_hom.fst_prod AlgHom.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 ext; rfl\n#align alg_hom.snd_prod AlgHom.snd_prod\n\n@[simp]\ntheorem prod_fst_snd : prod (fst R A B) (snd R A B) = 1 :=\n FunLike.coe_injective Pi.prod_fst_snd\n#align alg_hom.prod_fst_snd AlgHom.prod_fst_snd\n\n/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f := f.1.prod f.2\n invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)\n left_inv f := by ext <;> rfl\n right_inv f := by ext <;> ","nextTactic":"rfl","declUpToTactic":"/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f := f.1.prod f.2\n invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)\n left_inv f := by ext <;> rfl\n right_inv f := by ext <;> ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.100_0.SYlFgSZc7uFXKXx","decl":"/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f "}
{"state":"case H.a\nR : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁢ : CommSemiring R\ninst✝⁡ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nf : A →ₐ[R] B Γ— C\nx✝ : A\n⊒ (((fun f => prod f.1 f.2) ((fun f => (comp (fst R B C) f, comp (snd R B C) f)) f)) x✝).2 = (f x✝).2","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Hom\n\n#align_import algebra.algebra.prod from \"leanprover-community/mathlib\"@\"28aa996fc6fb4317f0083c4e6daf79878d81be33\"\n\n/-!\n# The R-algebra structure on products of R-algebras\n\nThe R-algebra structure on `(i : I) β†’ A i` when each `A i` is an R-algebra.\n\n## Main definitions\n\n* `Pi.algebra`\n* `Pi.evalAlgHom`\n* `Pi.constAlgHom`\n-/\n\n\nvariable {R A B C : Type*}\n\nvariable [CommSemiring R]\n\nvariable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]\n\nnamespace Prod\n\nvariable (R A B)\n\nopen Algebra\n\ninstance algebra : Algebra R (A Γ— B) :=\n { Prod.instModule,\n RingHom.prod (algebraMap R A) (algebraMap R B) with\n commutes' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [commutes r a]\n rw [commutes r b]\n smul_def' := by\n rintro r ⟨a, b⟩\n dsimp\n rw [Algebra.smul_def r a, Algebra.smul_def r b] }\n#align prod.algebra Prod.algebra\n\nvariable {R A B}\n\n@[simp]\ntheorem algebraMap_apply (r : R) : algebraMap R (A Γ— B) r = (algebraMap R A r, algebraMap R B r) :=\n rfl\n#align prod.algebra_map_apply Prod.algebraMap_apply\n\nend Prod\n\nnamespace AlgHom\n\nvariable (R A B)\n\n/-- First projection as `AlgHom`. -/\ndef fst : A Γ— B →ₐ[R] A :=\n { RingHom.fst A B with commutes' := fun _r => rfl }\n#align alg_hom.fst AlgHom.fst\n\n/-- Second projection as `AlgHom`. -/\ndef snd : A Γ— B →ₐ[R] B :=\n { RingHom.snd A B with commutes' := fun _r => rfl }\n#align alg_hom.snd AlgHom.snd\n\nvariable {R A B}\n\n/-- The `Pi.prod` of two morphisms is a morphism. -/\n@[simps!]\ndef prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B Γ— C :=\n { f.toRingHom.prod g.toRingHom with\n commutes' := fun r => by\n simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,\n commutes, Prod.algebraMap_apply] }\n#align alg_hom.prod AlgHom.prod\n\ntheorem coe_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g :=\n rfl\n#align alg_hom.coe_prod AlgHom.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 ext; rfl\n#align alg_hom.fst_prod AlgHom.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 ext; rfl\n#align alg_hom.snd_prod AlgHom.snd_prod\n\n@[simp]\ntheorem prod_fst_snd : prod (fst R A B) (snd R A B) = 1 :=\n FunLike.coe_injective Pi.prod_fst_snd\n#align alg_hom.prod_fst_snd AlgHom.prod_fst_snd\n\n/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f := f.1.prod f.2\n invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)\n left_inv f := by ext <;> rfl\n right_inv f := by ext <;> ","nextTactic":"rfl","declUpToTactic":"/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f := f.1.prod f.2\n invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)\n left_inv f := by ext <;> rfl\n right_inv f := by ext <;> ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Prod.100_0.SYlFgSZc7uFXKXx","decl":"/-- Taking the product of two maps with the same domain is equivalent to taking the product of\ntheir codomains. -/\n@[simps]\ndef prodEquiv : (A →ₐ[R] B) Γ— (A →ₐ[R] C) ≃ (A →ₐ[R] B Γ— C)\n where\n toFun f "}