ntp-mathlib / Extracted /Mathlib /TacticPrediction /Mathlib_Algebra_Algebra_Pi.jsonl
wellecks's picture
Upload folder using huggingface_hub
01d1bb5 verified
raw
history blame
35.1 kB
{"state":"I : Type u\nR : Type u_1\nf✝ : I → Type v\nx y : (i : I) → f✝ i\ni : I\nr : CommSemiring R\ns : (i : I) → Semiring (f✝ i)\ninst✝ : (i : I) → Algebra R (f✝ i)\nsrc✝ : R →+* (i : I) → f✝ i := Pi.ringHom fun i => algebraMap R (f✝ i)\na : R\nf : (i : I) → f✝ i\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 a *\n f =\n f *\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 a","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.Equiv\n\n#align_import algebra.algebra.pi from \"leanprover-community/mathlib\"@\"b16045e4bf61c6fd619a1a68854ab3d605dcd017\"\n\n/-!\n# The R-algebra structure on families 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\nuniverse u v w\n\nnamespace Pi\n\n-- The indexing type\nvariable {I : Type u}\n\n-- The scalar type\nvariable {R : Type*}\n\n-- The family of types already equipped with instances\nvariable {f : I → Type v}\n\nvariable (x y : ∀ i, f i) (i : I)\n\nvariable (I f)\n\ninstance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) :=\n { (Pi.ringHom fun i => algebraMap R (f i) : R →+* ∀ i : I, f i) with\n commutes' := fun a f => by ","nextTactic":"ext","declUpToTactic":"instance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) :=\n { (Pi.ringHom fun i => algebraMap R (f i) : R →+* ∀ i : I, f i) with\n commutes' := fun a f => by ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Pi.40_0.iEzBlhDeTy24dhL","decl":"instance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) "}
{"state":"case h\nI : Type u\nR : Type u_1\nf✝ : I → Type v\nx y : (i : I) → f✝ i\ni : I\nr : CommSemiring R\ns : (i : I) → Semiring (f✝ i)\ninst✝ : (i : I) → Algebra R (f✝ i)\nsrc✝ : R →+* (i : I) → f✝ i := Pi.ringHom fun i => algebraMap R (f✝ i)\na : R\nf : (i : I) → f✝ i\nx✝ : I\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 a *\n f)\n x✝ =\n (f *\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 a)\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.Equiv\n\n#align_import algebra.algebra.pi from \"leanprover-community/mathlib\"@\"b16045e4bf61c6fd619a1a68854ab3d605dcd017\"\n\n/-!\n# The R-algebra structure on families 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\nuniverse u v w\n\nnamespace Pi\n\n-- The indexing type\nvariable {I : Type u}\n\n-- The scalar type\nvariable {R : Type*}\n\n-- The family of types already equipped with instances\nvariable {f : I → Type v}\n\nvariable (x y : ∀ i, f i) (i : I)\n\nvariable (I f)\n\ninstance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) :=\n { (Pi.ringHom fun i => algebraMap R (f i) : R →+* ∀ i : I, f i) with\n commutes' := fun a f => by ext; ","nextTactic":"simp [Algebra.commutes]","declUpToTactic":"instance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) :=\n { (Pi.ringHom fun i => algebraMap R (f i) : R →+* ∀ i : I, f i) with\n commutes' := fun a f => by ext; ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Pi.40_0.iEzBlhDeTy24dhL","decl":"instance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) "}
{"state":"I : Type u\nR : Type u_1\nf✝ : I → Type v\nx y : (i : I) → f✝ i\ni : I\nr : CommSemiring R\ns : (i : I) → Semiring (f✝ i)\ninst✝ : (i : I) → Algebra R (f✝ i)\nsrc✝ : R →+* (i : I) → f✝ i := Pi.ringHom fun i => algebraMap R (f✝ i)\na : R\nf : (i : I) → f✝ i\n⊢ a • f =\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 a *\n 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.Equiv\n\n#align_import algebra.algebra.pi from \"leanprover-community/mathlib\"@\"b16045e4bf61c6fd619a1a68854ab3d605dcd017\"\n\n/-!\n# The R-algebra structure on families 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\nuniverse u v w\n\nnamespace Pi\n\n-- The indexing type\nvariable {I : Type u}\n\n-- The scalar type\nvariable {R : Type*}\n\n-- The family of types already equipped with instances\nvariable {f : I → Type v}\n\nvariable (x y : ∀ i, f i) (i : I)\n\nvariable (I f)\n\ninstance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) :=\n { (Pi.ringHom fun i => algebraMap R (f i) : R →+* ∀ i : I, f i) with\n commutes' := fun a f => by ext; simp [Algebra.commutes]\n smul_def' := fun a f => by ","nextTactic":"ext","declUpToTactic":"instance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) :=\n { (Pi.ringHom fun i => algebraMap R (f i) : R →+* ∀ i : I, f i) with\n commutes' := fun a f => by ext; simp [Algebra.commutes]\n smul_def' := fun a f => by ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Pi.40_0.iEzBlhDeTy24dhL","decl":"instance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) "}
{"state":"case h\nI : Type u\nR : Type u_1\nf✝ : I → Type v\nx y : (i : I) → f✝ i\ni : I\nr : CommSemiring R\ns : (i : I) → Semiring (f✝ i)\ninst✝ : (i : I) → Algebra R (f✝ i)\nsrc✝ : R →+* (i : I) → f✝ i := Pi.ringHom fun i => algebraMap R (f✝ i)\na : R\nf : (i : I) → f✝ i\nx✝ : I\n⊢ (a • f) 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 a *\n f)\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.Equiv\n\n#align_import algebra.algebra.pi from \"leanprover-community/mathlib\"@\"b16045e4bf61c6fd619a1a68854ab3d605dcd017\"\n\n/-!\n# The R-algebra structure on families 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\nuniverse u v w\n\nnamespace Pi\n\n-- The indexing type\nvariable {I : Type u}\n\n-- The scalar type\nvariable {R : Type*}\n\n-- The family of types already equipped with instances\nvariable {f : I → Type v}\n\nvariable (x y : ∀ i, f i) (i : I)\n\nvariable (I f)\n\ninstance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) :=\n { (Pi.ringHom fun i => algebraMap R (f i) : R →+* ∀ i : I, f i) with\n commutes' := fun a f => by ext; simp [Algebra.commutes]\n smul_def' := fun a f => by ext; ","nextTactic":"simp [Algebra.smul_def]","declUpToTactic":"instance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) :=\n { (Pi.ringHom fun i => algebraMap R (f i) : R →+* ∀ i : I, f i) with\n commutes' := fun a f => by ext; simp [Algebra.commutes]\n smul_def' := fun a f => by ext; ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Pi.40_0.iEzBlhDeTy24dhL","decl":"instance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) "}
{"state":"R : Type u\nA : Type v\nB : Type w\nI✝ : Type u_1\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Semiring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nI : Type u_2\nsrc✝ : (I → A) →+* I → B := RingHom.compLeft (↑f) I\nc : R\n⊢ OneHom.toFun\n (↑↑{\n toMonoidHom :=\n { toOneHom := { toFun := fun h => ⇑f ∘ h, map_one' := (_ : OneHom.toFun (↑↑src✝) 1 = 1) },\n map_mul' :=\n (_ :\n ∀ (x y : I → A),\n OneHom.toFun (↑↑src✝) (x * y) = OneHom.toFun (↑↑src✝) x * OneHom.toFun (↑↑src✝) y) },\n map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n map_add' :=\n (_ :\n ∀ (x y : I → A), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n ((algebraMap R (I → A)) c) =\n (algebraMap R (I → B)) c","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.Equiv\n\n#align_import algebra.algebra.pi from \"leanprover-community/mathlib\"@\"b16045e4bf61c6fd619a1a68854ab3d605dcd017\"\n\n/-!\n# The R-algebra structure on families 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\nuniverse u v w\n\nnamespace Pi\n\n-- The indexing type\nvariable {I : Type u}\n\n-- The scalar type\nvariable {R : Type*}\n\n-- The family of types already equipped with instances\nvariable {f : I → Type v}\n\nvariable (x y : ∀ i, f i) (i : I)\n\nvariable (I f)\n\ninstance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) :=\n { (Pi.ringHom fun i => algebraMap R (f i) : R →+* ∀ i : I, f i) with\n commutes' := fun a f => by ext; simp [Algebra.commutes]\n smul_def' := fun a f => by ext; simp [Algebra.smul_def] }\n#align pi.algebra Pi.algebra\n\ntheorem algebraMap_def {_ : CommSemiring R} [_s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)]\n (a : R) : algebraMap R (∀ i, f i) a = fun i => algebraMap R (f i) a :=\n rfl\n#align pi.algebra_map_def Pi.algebraMap_def\n\n@[simp]\ntheorem algebraMap_apply {_ : CommSemiring R} [_s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)]\n (a : R) (i : I) : algebraMap R (∀ i, f i) a i = algebraMap R (f i) a :=\n rfl\n#align pi.algebra_map_apply Pi.algebraMap_apply\n\n-- One could also build a `∀ i, R i`-algebra structure on `∀ i, A i`,\n-- when each `A i` is an `R i`-algebra, although I'm not sure that it's useful.\nvariable {I} (R)\n\n/-- `Function.eval` as an `AlgHom`. The name matches `Pi.evalRingHom`, `Pi.evalMonoidHom`,\netc. -/\n@[simps]\ndef evalAlgHom {_ : CommSemiring R} [∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] (i : I) :\n (∀ i, f i) →ₐ[R] f i :=\n { Pi.evalRingHom f i with\n toFun := fun f => f i\n commutes' := fun _ => rfl }\n#align pi.eval_alg_hom Pi.evalAlgHom\n\nvariable (A B : Type*) [CommSemiring R] [Semiring B] [Algebra R B]\n\n/-- `Function.const` as an `AlgHom`. The name matches `Pi.constRingHom`, `Pi.constMonoidHom`,\netc. -/\n@[simps]\ndef constAlgHom : B →ₐ[R] A → B :=\n { Pi.constRingHom A B with\n toFun := Function.const _\n commutes' := fun _ => rfl }\n#align pi.const_alg_hom Pi.constAlgHom\n\n/-- When `R` is commutative and permits an `algebraMap`, `Pi.constRingHom` is equal to that\nmap. -/\n@[simp]\ntheorem constRingHom_eq_algebraMap : constRingHom A R = algebraMap R (A → R) :=\n rfl\n#align pi.const_ring_hom_eq_algebra_map Pi.constRingHom_eq_algebraMap\n\n@[simp]\ntheorem constAlgHom_eq_algebra_ofId : constAlgHom R A R = Algebra.ofId R (A → R) :=\n rfl\n#align pi.const_alg_hom_eq_algebra_of_id Pi.constAlgHom_eq_algebra_ofId\n\nend Pi\n\n/-- A special case of `Pi.algebra` for non-dependent types. Lean struggles to elaborate\ndefinitions elsewhere in the library without this, -/\ninstance Function.algebra {R : Type*} (I : Type*) (A : Type*) [CommSemiring R] [Semiring A]\n [Algebra R A] : Algebra R (I → A) :=\n Pi.algebra _ _\n#align function.algebra Function.algebra\n\nnamespace AlgHom\n\nvariable {R : Type u} {A : Type v} {B : Type w} {I : Type*}\n\nvariable [CommSemiring R] [Semiring A] [Semiring B]\n\nvariable [Algebra R A] [Algebra R B]\n\n/-- `R`-algebra homomorphism between the function spaces `I → A` and `I → B`, induced by an\n`R`-algebra homomorphism `f` between `A` and `B`. -/\n@[simps]\nprotected def compLeft (f : A →ₐ[R] B) (I : Type*) : (I → A) →ₐ[R] I → B :=\n { f.toRingHom.compLeft I with\n toFun := fun h => f ∘ h\n commutes' := fun c => by\n ","nextTactic":"ext","declUpToTactic":"/-- `R`-algebra homomorphism between the function spaces `I → A` and `I → B`, induced by an\n`R`-algebra homomorphism `f` between `A` and `B`. -/\n@[simps]\nprotected def compLeft (f : A →ₐ[R] B) (I : Type*) : (I → A) →ₐ[R] I → B :=\n { f.toRingHom.compLeft I with\n toFun := fun h => f ∘ h\n commutes' := fun c => by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Pi.112_0.iEzBlhDeTy24dhL","decl":"/-- `R`-algebra homomorphism between the function spaces `I → A` and `I → B`, induced by an\n`R`-algebra homomorphism `f` between `A` and `B`. -/\n@[simps]\nprotected def compLeft (f : A →ₐ[R] B) (I : Type*) : (I → A) →ₐ[R] I → B "}
{"state":"case h\nR : Type u\nA : Type v\nB : Type w\nI✝ : Type u_1\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Semiring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nI : Type u_2\nsrc✝ : (I → A) →+* I → B := RingHom.compLeft (↑f) I\nc : R\nx✝ : I\n⊢ OneHom.toFun\n (↑↑{\n toMonoidHom :=\n { toOneHom := { toFun := fun h => ⇑f ∘ h, map_one' := (_ : OneHom.toFun (↑↑src✝) 1 = 1) },\n map_mul' :=\n (_ :\n ∀ (x y : I → A),\n OneHom.toFun (↑↑src✝) (x * y) = OneHom.toFun (↑↑src✝) x * OneHom.toFun (↑↑src✝) y) },\n map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n map_add' :=\n (_ :\n ∀ (x y : I → A), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n ((algebraMap R (I → A)) c) x✝ =\n (algebraMap R (I → B)) c 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.Equiv\n\n#align_import algebra.algebra.pi from \"leanprover-community/mathlib\"@\"b16045e4bf61c6fd619a1a68854ab3d605dcd017\"\n\n/-!\n# The R-algebra structure on families 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\nuniverse u v w\n\nnamespace Pi\n\n-- The indexing type\nvariable {I : Type u}\n\n-- The scalar type\nvariable {R : Type*}\n\n-- The family of types already equipped with instances\nvariable {f : I → Type v}\n\nvariable (x y : ∀ i, f i) (i : I)\n\nvariable (I f)\n\ninstance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) :=\n { (Pi.ringHom fun i => algebraMap R (f i) : R →+* ∀ i : I, f i) with\n commutes' := fun a f => by ext; simp [Algebra.commutes]\n smul_def' := fun a f => by ext; simp [Algebra.smul_def] }\n#align pi.algebra Pi.algebra\n\ntheorem algebraMap_def {_ : CommSemiring R} [_s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)]\n (a : R) : algebraMap R (∀ i, f i) a = fun i => algebraMap R (f i) a :=\n rfl\n#align pi.algebra_map_def Pi.algebraMap_def\n\n@[simp]\ntheorem algebraMap_apply {_ : CommSemiring R} [_s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)]\n (a : R) (i : I) : algebraMap R (∀ i, f i) a i = algebraMap R (f i) a :=\n rfl\n#align pi.algebra_map_apply Pi.algebraMap_apply\n\n-- One could also build a `∀ i, R i`-algebra structure on `∀ i, A i`,\n-- when each `A i` is an `R i`-algebra, although I'm not sure that it's useful.\nvariable {I} (R)\n\n/-- `Function.eval` as an `AlgHom`. The name matches `Pi.evalRingHom`, `Pi.evalMonoidHom`,\netc. -/\n@[simps]\ndef evalAlgHom {_ : CommSemiring R} [∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] (i : I) :\n (∀ i, f i) →ₐ[R] f i :=\n { Pi.evalRingHom f i with\n toFun := fun f => f i\n commutes' := fun _ => rfl }\n#align pi.eval_alg_hom Pi.evalAlgHom\n\nvariable (A B : Type*) [CommSemiring R] [Semiring B] [Algebra R B]\n\n/-- `Function.const` as an `AlgHom`. The name matches `Pi.constRingHom`, `Pi.constMonoidHom`,\netc. -/\n@[simps]\ndef constAlgHom : B →ₐ[R] A → B :=\n { Pi.constRingHom A B with\n toFun := Function.const _\n commutes' := fun _ => rfl }\n#align pi.const_alg_hom Pi.constAlgHom\n\n/-- When `R` is commutative and permits an `algebraMap`, `Pi.constRingHom` is equal to that\nmap. -/\n@[simp]\ntheorem constRingHom_eq_algebraMap : constRingHom A R = algebraMap R (A → R) :=\n rfl\n#align pi.const_ring_hom_eq_algebra_map Pi.constRingHom_eq_algebraMap\n\n@[simp]\ntheorem constAlgHom_eq_algebra_ofId : constAlgHom R A R = Algebra.ofId R (A → R) :=\n rfl\n#align pi.const_alg_hom_eq_algebra_of_id Pi.constAlgHom_eq_algebra_ofId\n\nend Pi\n\n/-- A special case of `Pi.algebra` for non-dependent types. Lean struggles to elaborate\ndefinitions elsewhere in the library without this, -/\ninstance Function.algebra {R : Type*} (I : Type*) (A : Type*) [CommSemiring R] [Semiring A]\n [Algebra R A] : Algebra R (I → A) :=\n Pi.algebra _ _\n#align function.algebra Function.algebra\n\nnamespace AlgHom\n\nvariable {R : Type u} {A : Type v} {B : Type w} {I : Type*}\n\nvariable [CommSemiring R] [Semiring A] [Semiring B]\n\nvariable [Algebra R A] [Algebra R B]\n\n/-- `R`-algebra homomorphism between the function spaces `I → A` and `I → B`, induced by an\n`R`-algebra homomorphism `f` between `A` and `B`. -/\n@[simps]\nprotected def compLeft (f : A →ₐ[R] B) (I : Type*) : (I → A) →ₐ[R] I → B :=\n { f.toRingHom.compLeft I with\n toFun := fun h => f ∘ h\n commutes' := fun c => by\n ext\n ","nextTactic":"exact f.commutes' c","declUpToTactic":"/-- `R`-algebra homomorphism between the function spaces `I → A` and `I → B`, induced by an\n`R`-algebra homomorphism `f` between `A` and `B`. -/\n@[simps]\nprotected def compLeft (f : A →ₐ[R] B) (I : Type*) : (I → A) →ₐ[R] I → B :=\n { f.toRingHom.compLeft I with\n toFun := fun h => f ∘ h\n commutes' := fun c => by\n ext\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Pi.112_0.iEzBlhDeTy24dhL","decl":"/-- `R`-algebra homomorphism between the function spaces `I → A` and `I → B`, induced by an\n`R`-algebra homomorphism `f` between `A` and `B`. -/\n@[simps]\nprotected def compLeft (f : A →ₐ[R] B) (I : Type*) : (I → A) →ₐ[R] I → B "}
{"state":"R : Type u_1\nι : Type u_2\nA₁ : ι → Type u_3\nA₂ : ι → Type u_4\ninst✝⁴ : CommSemiring R\ninst✝³ : (i : ι) → Semiring (A₁ i)\ninst✝² : (i : ι) → Semiring (A₂ i)\ninst✝¹ : (i : ι) → Algebra R (A₁ i)\ninst✝ : (i : ι) → Algebra R (A₂ i)\ne : (i : ι) → A₁ i ≃ₐ[R] A₂ i\nsrc✝ : ((i : ι) → A₁ i) ≃+* ((i : ι) → A₂ i) := RingEquiv.piCongrRight fun i => toRingEquiv (e i)\nr : R\n⊢ Equiv.toFun\n { toFun := fun x j => (e j) (x j), invFun := fun x j => (symm (e j)) (x j),\n left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n ((algebraMap R ((i : ι) → A₁ i)) r) =\n (algebraMap R ((i : ι) → A₂ i)) 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.Equiv\n\n#align_import algebra.algebra.pi from \"leanprover-community/mathlib\"@\"b16045e4bf61c6fd619a1a68854ab3d605dcd017\"\n\n/-!\n# The R-algebra structure on families 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\nuniverse u v w\n\nnamespace Pi\n\n-- The indexing type\nvariable {I : Type u}\n\n-- The scalar type\nvariable {R : Type*}\n\n-- The family of types already equipped with instances\nvariable {f : I → Type v}\n\nvariable (x y : ∀ i, f i) (i : I)\n\nvariable (I f)\n\ninstance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) :=\n { (Pi.ringHom fun i => algebraMap R (f i) : R →+* ∀ i : I, f i) with\n commutes' := fun a f => by ext; simp [Algebra.commutes]\n smul_def' := fun a f => by ext; simp [Algebra.smul_def] }\n#align pi.algebra Pi.algebra\n\ntheorem algebraMap_def {_ : CommSemiring R} [_s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)]\n (a : R) : algebraMap R (∀ i, f i) a = fun i => algebraMap R (f i) a :=\n rfl\n#align pi.algebra_map_def Pi.algebraMap_def\n\n@[simp]\ntheorem algebraMap_apply {_ : CommSemiring R} [_s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)]\n (a : R) (i : I) : algebraMap R (∀ i, f i) a i = algebraMap R (f i) a :=\n rfl\n#align pi.algebra_map_apply Pi.algebraMap_apply\n\n-- One could also build a `∀ i, R i`-algebra structure on `∀ i, A i`,\n-- when each `A i` is an `R i`-algebra, although I'm not sure that it's useful.\nvariable {I} (R)\n\n/-- `Function.eval` as an `AlgHom`. The name matches `Pi.evalRingHom`, `Pi.evalMonoidHom`,\netc. -/\n@[simps]\ndef evalAlgHom {_ : CommSemiring R} [∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] (i : I) :\n (∀ i, f i) →ₐ[R] f i :=\n { Pi.evalRingHom f i with\n toFun := fun f => f i\n commutes' := fun _ => rfl }\n#align pi.eval_alg_hom Pi.evalAlgHom\n\nvariable (A B : Type*) [CommSemiring R] [Semiring B] [Algebra R B]\n\n/-- `Function.const` as an `AlgHom`. The name matches `Pi.constRingHom`, `Pi.constMonoidHom`,\netc. -/\n@[simps]\ndef constAlgHom : B →ₐ[R] A → B :=\n { Pi.constRingHom A B with\n toFun := Function.const _\n commutes' := fun _ => rfl }\n#align pi.const_alg_hom Pi.constAlgHom\n\n/-- When `R` is commutative and permits an `algebraMap`, `Pi.constRingHom` is equal to that\nmap. -/\n@[simp]\ntheorem constRingHom_eq_algebraMap : constRingHom A R = algebraMap R (A → R) :=\n rfl\n#align pi.const_ring_hom_eq_algebra_map Pi.constRingHom_eq_algebraMap\n\n@[simp]\ntheorem constAlgHom_eq_algebra_ofId : constAlgHom R A R = Algebra.ofId R (A → R) :=\n rfl\n#align pi.const_alg_hom_eq_algebra_of_id Pi.constAlgHom_eq_algebra_ofId\n\nend Pi\n\n/-- A special case of `Pi.algebra` for non-dependent types. Lean struggles to elaborate\ndefinitions elsewhere in the library without this, -/\ninstance Function.algebra {R : Type*} (I : Type*) (A : Type*) [CommSemiring R] [Semiring A]\n [Algebra R A] : Algebra R (I → A) :=\n Pi.algebra _ _\n#align function.algebra Function.algebra\n\nnamespace AlgHom\n\nvariable {R : Type u} {A : Type v} {B : Type w} {I : Type*}\n\nvariable [CommSemiring R] [Semiring A] [Semiring B]\n\nvariable [Algebra R A] [Algebra R B]\n\n/-- `R`-algebra homomorphism between the function spaces `I → A` and `I → B`, induced by an\n`R`-algebra homomorphism `f` between `A` and `B`. -/\n@[simps]\nprotected def compLeft (f : A →ₐ[R] B) (I : Type*) : (I → A) →ₐ[R] I → B :=\n { f.toRingHom.compLeft I with\n toFun := fun h => f ∘ h\n commutes' := fun c => by\n ext\n exact f.commutes' c }\n#align alg_hom.comp_left AlgHom.compLeft\n\nend AlgHom\n\nnamespace AlgEquiv\n\n/-- A family of algebra equivalences `∀ i, (A₁ i ≃ₐ A₂ i)` generates a\nmultiplicative equivalence between `∀ i, A₁ i` and `∀ i, A₂ i`.\n\nThis is the `AlgEquiv` version of `Equiv.piCongrRight`, and the dependent version of\n`AlgEquiv.arrowCongr`.\n-/\n@[simps apply]\ndef piCongrRight {R ι : Type*} {A₁ A₂ : ι → Type*} [CommSemiring R] [∀ i, Semiring (A₁ i)]\n [∀ i, Semiring (A₂ i)] [∀ i, Algebra R (A₁ i)] [∀ i, Algebra R (A₂ i)]\n (e : ∀ i, A₁ i ≃ₐ[R] A₂ i) : (∀ i, A₁ i) ≃ₐ[R] ∀ i, A₂ i :=\n { @RingEquiv.piCongrRight ι A₁ A₂ _ _ fun i => (e i).toRingEquiv with\n toFun := fun x j => e j (x j)\n invFun := fun x j => (e j).symm (x j)\n commutes' := fun r => by\n ","nextTactic":"ext i","declUpToTactic":"/-- A family of algebra equivalences `∀ i, (A₁ i ≃ₐ A₂ i)` generates a\nmultiplicative equivalence between `∀ i, A₁ i` and `∀ i, A₂ i`.\n\nThis is the `AlgEquiv` version of `Equiv.piCongrRight`, and the dependent version of\n`AlgEquiv.arrowCongr`.\n-/\n@[simps apply]\ndef piCongrRight {R ι : Type*} {A₁ A₂ : ι → Type*} [CommSemiring R] [∀ i, Semiring (A₁ i)]\n [∀ i, Semiring (A₂ i)] [∀ i, Algebra R (A₁ i)] [∀ i, Algebra R (A₂ i)]\n (e : ∀ i, A₁ i ≃ₐ[R] A₂ i) : (∀ i, A₁ i) ≃ₐ[R] ∀ i, A₂ i :=\n { @RingEquiv.piCongrRight ι A₁ A₂ _ _ fun i => (e i).toRingEquiv with\n toFun := fun x j => e j (x j)\n invFun := fun x j => (e j).symm (x j)\n commutes' := fun r => by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Pi.127_0.iEzBlhDeTy24dhL","decl":"/-- A family of algebra equivalences `∀ i, (A₁ i ≃ₐ A₂ i)` generates a\nmultiplicative equivalence between `∀ i, A₁ i` and `∀ i, A₂ i`.\n\nThis is the `AlgEquiv` version of `Equiv.piCongrRight`, and the dependent version of\n`AlgEquiv.arrowCongr`.\n-/\n@[simps apply]\ndef piCongrRight {R ι : Type*} {A₁ A₂ : ι → Type*} [CommSemiring R] [∀ i, Semiring (A₁ i)]\n [∀ i, Semiring (A₂ i)] [∀ i, Algebra R (A₁ i)] [∀ i, Algebra R (A₂ i)]\n (e : ∀ i, A₁ i ≃ₐ[R] A₂ i) : (∀ i, A₁ i) ≃ₐ[R] ∀ i, A₂ i "}
{"state":"case h\nR : Type u_1\nι : Type u_2\nA₁ : ι → Type u_3\nA₂ : ι → Type u_4\ninst✝⁴ : CommSemiring R\ninst✝³ : (i : ι) → Semiring (A₁ i)\ninst✝² : (i : ι) → Semiring (A₂ i)\ninst✝¹ : (i : ι) → Algebra R (A₁ i)\ninst✝ : (i : ι) → Algebra R (A₂ i)\ne : (i : ι) → A₁ i ≃ₐ[R] A₂ i\nsrc✝ : ((i : ι) → A₁ i) ≃+* ((i : ι) → A₂ i) := RingEquiv.piCongrRight fun i => toRingEquiv (e i)\nr : R\ni : ι\n⊢ Equiv.toFun\n { toFun := fun x j => (e j) (x j), invFun := fun x j => (symm (e j)) (x j),\n left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n ((algebraMap R ((i : ι) → A₁ i)) r) i =\n (algebraMap R ((i : ι) → A₂ i)) r i","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.Equiv\n\n#align_import algebra.algebra.pi from \"leanprover-community/mathlib\"@\"b16045e4bf61c6fd619a1a68854ab3d605dcd017\"\n\n/-!\n# The R-algebra structure on families 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\nuniverse u v w\n\nnamespace Pi\n\n-- The indexing type\nvariable {I : Type u}\n\n-- The scalar type\nvariable {R : Type*}\n\n-- The family of types already equipped with instances\nvariable {f : I → Type v}\n\nvariable (x y : ∀ i, f i) (i : I)\n\nvariable (I f)\n\ninstance algebra {r : CommSemiring R} [s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] :\n Algebra R (∀ i : I, f i) :=\n { (Pi.ringHom fun i => algebraMap R (f i) : R →+* ∀ i : I, f i) with\n commutes' := fun a f => by ext; simp [Algebra.commutes]\n smul_def' := fun a f => by ext; simp [Algebra.smul_def] }\n#align pi.algebra Pi.algebra\n\ntheorem algebraMap_def {_ : CommSemiring R} [_s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)]\n (a : R) : algebraMap R (∀ i, f i) a = fun i => algebraMap R (f i) a :=\n rfl\n#align pi.algebra_map_def Pi.algebraMap_def\n\n@[simp]\ntheorem algebraMap_apply {_ : CommSemiring R} [_s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)]\n (a : R) (i : I) : algebraMap R (∀ i, f i) a i = algebraMap R (f i) a :=\n rfl\n#align pi.algebra_map_apply Pi.algebraMap_apply\n\n-- One could also build a `∀ i, R i`-algebra structure on `∀ i, A i`,\n-- when each `A i` is an `R i`-algebra, although I'm not sure that it's useful.\nvariable {I} (R)\n\n/-- `Function.eval` as an `AlgHom`. The name matches `Pi.evalRingHom`, `Pi.evalMonoidHom`,\netc. -/\n@[simps]\ndef evalAlgHom {_ : CommSemiring R} [∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] (i : I) :\n (∀ i, f i) →ₐ[R] f i :=\n { Pi.evalRingHom f i with\n toFun := fun f => f i\n commutes' := fun _ => rfl }\n#align pi.eval_alg_hom Pi.evalAlgHom\n\nvariable (A B : Type*) [CommSemiring R] [Semiring B] [Algebra R B]\n\n/-- `Function.const` as an `AlgHom`. The name matches `Pi.constRingHom`, `Pi.constMonoidHom`,\netc. -/\n@[simps]\ndef constAlgHom : B →ₐ[R] A → B :=\n { Pi.constRingHom A B with\n toFun := Function.const _\n commutes' := fun _ => rfl }\n#align pi.const_alg_hom Pi.constAlgHom\n\n/-- When `R` is commutative and permits an `algebraMap`, `Pi.constRingHom` is equal to that\nmap. -/\n@[simp]\ntheorem constRingHom_eq_algebraMap : constRingHom A R = algebraMap R (A → R) :=\n rfl\n#align pi.const_ring_hom_eq_algebra_map Pi.constRingHom_eq_algebraMap\n\n@[simp]\ntheorem constAlgHom_eq_algebra_ofId : constAlgHom R A R = Algebra.ofId R (A → R) :=\n rfl\n#align pi.const_alg_hom_eq_algebra_of_id Pi.constAlgHom_eq_algebra_ofId\n\nend Pi\n\n/-- A special case of `Pi.algebra` for non-dependent types. Lean struggles to elaborate\ndefinitions elsewhere in the library without this, -/\ninstance Function.algebra {R : Type*} (I : Type*) (A : Type*) [CommSemiring R] [Semiring A]\n [Algebra R A] : Algebra R (I → A) :=\n Pi.algebra _ _\n#align function.algebra Function.algebra\n\nnamespace AlgHom\n\nvariable {R : Type u} {A : Type v} {B : Type w} {I : Type*}\n\nvariable [CommSemiring R] [Semiring A] [Semiring B]\n\nvariable [Algebra R A] [Algebra R B]\n\n/-- `R`-algebra homomorphism between the function spaces `I → A` and `I → B`, induced by an\n`R`-algebra homomorphism `f` between `A` and `B`. -/\n@[simps]\nprotected def compLeft (f : A →ₐ[R] B) (I : Type*) : (I → A) →ₐ[R] I → B :=\n { f.toRingHom.compLeft I with\n toFun := fun h => f ∘ h\n commutes' := fun c => by\n ext\n exact f.commutes' c }\n#align alg_hom.comp_left AlgHom.compLeft\n\nend AlgHom\n\nnamespace AlgEquiv\n\n/-- A family of algebra equivalences `∀ i, (A₁ i ≃ₐ A₂ i)` generates a\nmultiplicative equivalence between `∀ i, A₁ i` and `∀ i, A₂ i`.\n\nThis is the `AlgEquiv` version of `Equiv.piCongrRight`, and the dependent version of\n`AlgEquiv.arrowCongr`.\n-/\n@[simps apply]\ndef piCongrRight {R ι : Type*} {A₁ A₂ : ι → Type*} [CommSemiring R] [∀ i, Semiring (A₁ i)]\n [∀ i, Semiring (A₂ i)] [∀ i, Algebra R (A₁ i)] [∀ i, Algebra R (A₂ i)]\n (e : ∀ i, A₁ i ≃ₐ[R] A₂ i) : (∀ i, A₁ i) ≃ₐ[R] ∀ i, A₂ i :=\n { @RingEquiv.piCongrRight ι A₁ A₂ _ _ fun i => (e i).toRingEquiv with\n toFun := fun x j => e j (x j)\n invFun := fun x j => (e j).symm (x j)\n commutes' := fun r => by\n ext i\n ","nextTactic":"simp","declUpToTactic":"/-- A family of algebra equivalences `∀ i, (A₁ i ≃ₐ A₂ i)` generates a\nmultiplicative equivalence between `∀ i, A₁ i` and `∀ i, A₂ i`.\n\nThis is the `AlgEquiv` version of `Equiv.piCongrRight`, and the dependent version of\n`AlgEquiv.arrowCongr`.\n-/\n@[simps apply]\ndef piCongrRight {R ι : Type*} {A₁ A₂ : ι → Type*} [CommSemiring R] [∀ i, Semiring (A₁ i)]\n [∀ i, Semiring (A₂ i)] [∀ i, Algebra R (A₁ i)] [∀ i, Algebra R (A₂ i)]\n (e : ∀ i, A₁ i ≃ₐ[R] A₂ i) : (∀ i, A₁ i) ≃ₐ[R] ∀ i, A₂ i :=\n { @RingEquiv.piCongrRight ι A₁ A₂ _ _ fun i => (e i).toRingEquiv with\n toFun := fun x j => e j (x j)\n invFun := fun x j => (e j).symm (x j)\n commutes' := fun r => by\n ext i\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_Pi.127_0.iEzBlhDeTy24dhL","decl":"/-- A family of algebra equivalences `∀ i, (A₁ i ≃ₐ A₂ i)` generates a\nmultiplicative equivalence between `∀ i, A₁ i` and `∀ i, A₂ i`.\n\nThis is the `AlgEquiv` version of `Equiv.piCongrRight`, and the dependent version of\n`AlgEquiv.arrowCongr`.\n-/\n@[simps apply]\ndef piCongrRight {R ι : Type*} {A₁ A₂ : ι → Type*} [CommSemiring R] [∀ i, Semiring (A₁ i)]\n [∀ i, Semiring (A₂ i)] [∀ i, Algebra R (A₁ i)] [∀ i, Algebra R (A₂ i)]\n (e : ∀ i, A₁ i ≃ₐ[R] A₂ i) : (∀ i, A₁ i) ≃ₐ[R] ∀ i, A₂ i "}