|
{"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 "} |
|
|