declaration stringlengths 27 11.3k | file stringlengths 52 114 | context dict | tactic_states listlengths 1 1.24k |
|---|---|---|---|
theorem map_zsmul_const [AddGroup G] [AddGroup H] [AddConstMapClass F G H a b]
(f : F) (n : ℤ) : f (n • a) = f 0 + n • b := by
simpa using map_add_zsmul f 0 n
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/AddConstMap/Basic.lean | {
"open": [
"Function Set"
],
"variables": [
"{F G H : Type*} [FunLike F G H] {a : G} {b : H}"
]
} | [
{
"line": "simpa using map_add_zsmul f 0 n",
"before_state": "F : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : FunLike F G H\na : G\nb : H\ninst✝² : AddGroup G\ninst✝¹ : AddGroup H\ninst✝ : AddConstMapClass F G H a b\nf : F\nn : ℤ\n⊢ f (n • a) = f 0 + n • b",
"after_state": "No Goals!"
}
] |
theorem map_sub_zsmul [AddGroup G] [AddGroup H] [AddConstMapClass F G H a b]
(f : F) (x : G) (n : ℤ) : f (x - n • a) = f x - n • b := by
simpa [sub_eq_add_neg] using map_add_zsmul f x (-n)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/AddConstMap/Basic.lean | {
"open": [
"Function Set"
],
"variables": [
"{F G H : Type*} [FunLike F G H] {a : G} {b : H}"
]
} | [
{
"line": "simpa [sub_eq_add_neg] using map_add_zsmul f x (-n)",
"before_state": "F : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : FunLike F G H\na : G\nb : H\ninst✝² : AddGroup G\ninst✝¹ : AddGroup H\ninst✝ : AddConstMapClass F G H a b\nf : F\nx : G\nn : ℤ\n⊢ f (x - n • a) = f x - n • b",
"after_stat... |
theorem singleton_vsub_self (p : P) : ({p} : Set P) -ᵥ {p} = {(0 : G)} := by
rw [Set.singleton_vsub_singleton]
rw [vsub_self]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/AddTorsor/Basic.lean | {
"open": [
"scoped Pointwise"
],
"variables": [
"{G : Type*} {P : Type*} [AddGroup G] [T : AddTorsor G P]"
]
} | [
{
"line": "rw [Set.singleton_vsub_singleton]",
"before_state": "G : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np : P\n⊢ {p} -ᵥ {p} = {0}",
"after_state": "G : Type u_1\nP : Type u_2\ninst✝ : AddGroup G\nT : AddTorsor G P\np : P\n⊢ {p -ᵥ p} = {0}"
},
{
"line": "rewrite [Set.si... |
theorem Algebra.ext {S : Type u} {A : Type v} [CommSemiring S] [Semiring A] (h1 h2 : Algebra S A)
(h : ∀ (r : S) (x : A), (by have I := h1; exact r • x) = r • x) : h1 = h2 :=
Algebra.algebra_ext _ _ fun r => by
simpa only [@Algebra.smul_def _ _ _ _ h1,@Algebra.smul_def _ _ _ _ h2,mul_one] using h r 1
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Tower.lean | {
"open": [
"Pointwise"
],
"variables": [
"(R : Type u) (S : Type v) (A : Type w) (B : Type u₁) (M : Type v₁)",
"[CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B]",
"[AddCommMonoid M] [Module R M] [Module A M] [Module B M]",
"[IsScalarTower R A M] [IsScalarTower R B M] [SM... | [
{
"line": "have I := h1",
"before_state": "R : Type u\nS✝ : Type v\nA✝ : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹⁹ : CommSemiring R\ninst✝¹⁸ : Semiring A✝\ninst✝¹⁷ : Semiring B\ninst✝¹⁶ : Algebra R A✝\ninst✝¹⁵ : Algebra R B\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : Module R M\ninst✝¹² : Module A✝ M\ninst✝¹¹ : M... |
theorem algebra_ext {R : Type*} [CommSemiring R] {A : Type*} [Semiring A] (P Q : Algebra R A)
(h : ∀ r : R, (haveI := P; algebraMap R A r) = haveI := Q; algebraMap R A r) :
P = Q := by
replace h : P.algebraMap = Q.algebraMap := DFunLike.ext _ _ h
have h' : (haveI := P; (· • ·) : R → A → A) = (haveI := Q; (·... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Defs.lean | {
"open": [],
"variables": [
"{R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A]",
"{R A : Type*} [CommRing R] [Ring A] [Algebra R A]",
"{R : Type u} {S : Type v} {A : Type w} {B : Type*}",
"[CommSemiring R] [CommSemiring S]",
"[Semiring A] [Algebra R A] [Semiring B] [Algebra R B]"
]
} | [
{
"line": "replace h : P.algebraMap = Q.algebraMap := DFunLike.ext _ _ h",
"before_state": "R : Type u_6\ninst✝¹ : CommSemiring R\nA : Type u_7\ninst✝ : Semiring A\nP Q : Algebra R A\nh : ∀ (r : R), (algebraMap R A) r = (algebraMap R A) r\n⊢ P = Q",
"after_state": "R : Type u_6\ninst✝¹ : CommSemiring R\... |
theorem comp_symm (e : A₁ ≃ₐ[R] A₂) : AlgHom.comp (e : A₁ →ₐ[R] A₂) ↑e.symm = AlgHom.id R A₂ := by
ext
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Equiv.lean | {
"open": [],
"variables": [
"{R : Type uR}",
"{A₁ : Type uA₁} {A₂ : Type uA₂} {A₃ : Type uA₃}",
"{A₁' : Type uA₁'} {A₂' : Type uA₂'} {A₃' : Type uA₃'}",
"[CommSemiring R] [Semiring A₁] [Semiring A₂] [Semiring A₃]",
"[Semiring A₁'] [Semiring A₂'] [Semiring A₃']",
"[Algebra R A₁] [Algebra R A... | [
{
"line": "ext",
"before_state": "R : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A₁\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₁\ninst✝ : Algebra R A₂\ne : A₁ ≃ₐ[R] A₂\n⊢ (↑e).comp ↑e.symm = AlgHom.id R A₂",
"after_state": "case H\nR : Type uR\nA₁ : Type uA₁\nA₂ : ... |
theorem symm_comp (e : A₁ ≃ₐ[R] A₂) : AlgHom.comp ↑e.symm (e : A₁ →ₐ[R] A₂) = AlgHom.id R A₁ := by
ext
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Equiv.lean | {
"open": [],
"variables": [
"{R : Type uR}",
"{A₁ : Type uA₁} {A₂ : Type uA₂} {A₃ : Type uA₃}",
"{A₁' : Type uA₁'} {A₂' : Type uA₂'} {A₃' : Type uA₃'}",
"[CommSemiring R] [Semiring A₁] [Semiring A₂] [Semiring A₃]",
"[Semiring A₁'] [Semiring A₂'] [Semiring A₃']",
"[Algebra R A₁] [Algebra R A... | [
{
"line": "ext",
"before_state": "R : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A₁\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₁\ninst✝ : Algebra R A₂\ne : A₁ ≃ₐ[R] A₂\n⊢ (↑e.symm).comp ↑e = AlgHom.id R A₁",
"after_state": "case H\nR : Type uR\nA₁ : Type uA₁\nA₂ : ... |
theorem algebraMap_eq_apply (e : A₁ ≃ₐ[R] A₂) {y : R} {x : A₁} :
algebraMap R A₂ y = e x ↔ algebraMap R A₁ y = x :=
⟨fun h => by simpa using e.symm.toAlgHom.algebraMap_eq_apply h, fun h =>
e.toAlgHom.algebraMap_eq_apply h⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Equiv.lean | {
"open": [],
"variables": [
"{R : Type uR}",
"{A₁ : Type uA₁} {A₂ : Type uA₂} {A₃ : Type uA₃}",
"{A₁' : Type uA₁'} {A₂' : Type uA₂'} {A₃' : Type uA₃'}",
"[CommSemiring R] [Semiring A₁] [Semiring A₂] [Semiring A₃]",
"[Semiring A₁'] [Semiring A₂'] [Semiring A₃']",
"[Algebra R A₁] [Algebra R A... | [
{
"line": "simpa using e.symm.toAlgHom.algebraMap_eq_apply h",
"before_state": "R : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A₁\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₁\ninst✝ : Algebra R A₂\ne : A₁ ≃ₐ[R] A₂\ny : R\nx : A₁\nh : (algebraMap R A₂) y = e x\n⊢ (algeb... |
theorem comp_ofId (φ : A →ₐ[R] B) : φ.comp (Algebra.ofId R A) = Algebra.ofId R B := by ext
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Hom.lean | {
"open": [],
"variables": [
"{R A B F : Type*} [CommSemiring R] [Semiring A] [Semiring B]",
"{R : Type u} {A : Type v} {B : Type w} {C : Type u₁} {D : Type v₁}",
"[CommSemiring R] [Semiring A] [Semiring B] [Semiring C] [Semiring D]",
"[Algebra R A] [Algebra R B] [Algebra R C] [Algebra R D]",
"(... | [
{
"line": "ext",
"before_state": "R : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nφ : A →ₐ[R] B\n⊢ φ.comp (Algebra.ofId R A) = Algebra.ofId R B",
"after_state": "No Goals!"
}
] |
lemma span_eq_toSubmodule (s : NonUnitalSubalgebra R A) :
Submodule.span R (s : Set A) = s.toSubmodule := by
simp [SetLike.ext'_iff, Submodule.coe_span_eq_self]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean | {
"open": [],
"variables": [
"{S R A : Type*} [CommSemiring R] [NonUnitalNonAssocSemiring A] [Module R A]",
"[SetLike S A] [NonUnitalSubsemiringClass S A] [hSR : SMulMemClass S R A] (s : S)",
"{s} in",
"{F : Type v'} {R' : Type u'} {R : Type u} {A : Type v} {B : Type w} {C : Type w'}",
"[CommSem... | [
{
"line": "simp [SetLike.ext'_iff, Submodule.coe_span_eq_self]",
"before_state": "R : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : Module R A\ns : NonUnitalSubalgebra R A\n⊢ Submodule.span R ↑s = s.toSubmodule",
"after_state": "No Goals!"
}
] |
theorem mem_sup_left {S T : NonUnitalSubalgebra R A} : ∀ {x : A}, x ∈ S → x ∈ S ⊔ T := by
rw [← SetLike.le_def]
exact le_sup_left
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean | {
"open": [
"Submodule in",
"NonUnitalSubalgebra in",
"NonUnitalSubalgebra in"
],
"variables": [
"{S R A : Type*} [CommSemiring R] [NonUnitalNonAssocSemiring A] [Module R A]",
"[SetLike S A] [NonUnitalSubsemiringClass S A] [hSR : SMulMemClass S R A] (s : S)",
"{s} in",
"{F : Type v'} {... | [
{
"line": "rw [← SetLike.le_def]",
"before_state": "R : Type u\nA : Type v\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nS T : NonUnitalSubalgebra R A\n⊢ ∀ {x : A}, x ∈ S → x ∈ S ⊔ T",
"after_state": "R : T... |
theorem mem_sup_right {S T : NonUnitalSubalgebra R A} : ∀ {x : A}, x ∈ T → x ∈ S ⊔ T := by
rw [← SetLike.le_def]
exact le_sup_right
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean | {
"open": [
"Submodule in",
"NonUnitalSubalgebra in",
"NonUnitalSubalgebra in"
],
"variables": [
"{S R A : Type*} [CommSemiring R] [NonUnitalNonAssocSemiring A] [Module R A]",
"[SetLike S A] [NonUnitalSubsemiringClass S A] [hSR : SMulMemClass S R A] (s : S)",
"{s} in",
"{F : Type v'} {... | [
{
"line": "rw [← SetLike.le_def]",
"before_state": "R : Type u\nA : Type v\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nS T : NonUnitalSubalgebra R A\n⊢ ∀ {x : A}, x ∈ T → x ∈ S ⊔ T",
"after_state": "R : T... |
theorem sInf_toSubmodule (S : Set (NonUnitalSubalgebra R A)) :
(sInf S).toSubmodule = sInf (NonUnitalSubalgebra.toSubmodule '' S) :=
SetLike.coe_injective <| by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean | {
"open": [
"Submodule in",
"NonUnitalSubalgebra in",
"NonUnitalSubalgebra in"
],
"variables": [
"{S R A : Type*} [CommSemiring R] [NonUnitalNonAssocSemiring A] [Module R A]",
"[SetLike S A] [NonUnitalSubsemiringClass S A] [hSR : SMulMemClass S R A] (s : S)",
"{s} in",
"{F : Type v'} {... | [
{
"line": "simp",
"before_state": "R : Type u\nA : Type v\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nS : Set (NonUnitalSubalgebra R A)\n⊢ ↑(sInf S).toSubmodule = ↑(sInf (NonUnitalSubalgebra.toSubmodule '' S)... |
theorem sInf_toNonUnitalSubsemiring (S : Set (NonUnitalSubalgebra R A)) :
(sInf S).toNonUnitalSubsemiring = sInf (NonUnitalSubalgebra.toNonUnitalSubsemiring '' S) :=
SetLike.coe_injective <| by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean | {
"open": [
"Submodule in",
"NonUnitalSubalgebra in",
"NonUnitalSubalgebra in"
],
"variables": [
"{S R A : Type*} [CommSemiring R] [NonUnitalNonAssocSemiring A] [Module R A]",
"[SetLike S A] [NonUnitalSubsemiringClass S A] [hSR : SMulMemClass S R A] (s : S)",
"{s} in",
"{F : Type v'} {... | [
{
"line": "simp",
"before_state": "R : Type u\nA : Type v\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nS : Set (NonUnitalSubalgebra R A)\n⊢ ↑(sInf S).toNonUnitalSubsemiring = ↑(sInf (NonUnitalSubalgebra.toNonU... |
theorem coe_iInf {ι : Sort*} {S : ι → NonUnitalSubalgebra R A} :
(↑(⨅ i, S i) : Set A) = ⋂ i, S i := by simp [iInf]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean | {
"open": [
"Submodule in",
"NonUnitalSubalgebra in",
"NonUnitalSubalgebra in"
],
"variables": [
"{S R A : Type*} [CommSemiring R] [NonUnitalNonAssocSemiring A] [Module R A]",
"[SetLike S A] [NonUnitalSubsemiringClass S A] [hSR : SMulMemClass S R A] (s : S)",
"{s} in",
"{F : Type v'} {... | [
{
"line": "simp [iInf]",
"before_state": "R : Type u\nA : Type v\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nι : Sort u_4\nS : ι → NonUnitalSubalgebra R A\n⊢ ↑(⨅ i, S i) = ⋂ i, ↑(S i)",
"after_state": "No... |
theorem iInf_toSubmodule {ι : Sort*} (S : ι → NonUnitalSubalgebra R A) :
(⨅ i, S i).toSubmodule = ⨅ i, (S i).toSubmodule :=
SetLike.coe_injective <| by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean | {
"open": [
"Submodule in",
"NonUnitalSubalgebra in",
"NonUnitalSubalgebra in"
],
"variables": [
"{S R A : Type*} [CommSemiring R] [NonUnitalNonAssocSemiring A] [Module R A]",
"[SetLike S A] [NonUnitalSubsemiringClass S A] [hSR : SMulMemClass S R A] (s : S)",
"{s} in",
"{F : Type v'} {... | [
{
"line": "simp",
"before_state": "R : Type u\nA : Type v\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nι : Sort u_4\nS : ι → NonUnitalSubalgebra R A\n⊢ ↑(⨅ i, S i).toSubmodule = ↑(⨅ i, (S i).toSubmodule)",
... |
theorem mem_bot {x : A} : x ∈ (⊥ : NonUnitalSubalgebra R A) ↔ x = 0 :=
show x ∈ Submodule.span R (NonUnitalSubsemiring.closure (∅ : Set A) : Set A) ↔ x = 0 by
rw [NonUnitalSubsemiring.closure_empty]
rw [NonUnitalSubsemiring.coe_bot]
rw [Submodule.span_zero_singleton]
rw [Submodule.mem_bot]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean | {
"open": [
"Submodule in",
"NonUnitalSubalgebra in",
"NonUnitalSubalgebra in"
],
"variables": [
"{S R A : Type*} [CommSemiring R] [NonUnitalNonAssocSemiring A] [Module R A]",
"[SetLike S A] [NonUnitalSubsemiringClass S A] [hSR : SMulMemClass S R A] (s : S)",
"{s} in",
"{F : Type v'} {... | [
{
"line": "rw [NonUnitalSubsemiring.closure_empty]",
"before_state": "R : Type u\nA : Type v\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nx : A\n⊢ x ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure ∅) ↔ x = 0... |
theorem coe_bot : ((⊥ : NonUnitalSubalgebra R A) : Set A) = {0} := by
simp [Set.ext_iff, NonUnitalAlgebra.mem_bot]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean | {
"open": [
"Submodule in",
"NonUnitalSubalgebra in",
"NonUnitalSubalgebra in"
],
"variables": [
"{S R A : Type*} [CommSemiring R] [NonUnitalNonAssocSemiring A] [Module R A]",
"[SetLike S A] [NonUnitalSubsemiringClass S A] [hSR : SMulMemClass S R A] (s : S)",
"{s} in",
"{F : Type v'} {... | [
{
"line": "simp [Set.ext_iff, NonUnitalAlgebra.mem_bot]",
"before_state": "R : Type u\nA : Type v\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\n⊢ ↑⊥ = {0}",
"after_state": "No Goals!"
}
] |
theorem map_bot [IsScalarTower R B B] [SMulCommClass R B B]
(f : A →ₙₐ[R] B) : (⊥ : NonUnitalSubalgebra R A).map f = ⊥ :=
SetLike.coe_injective <| by simp [NonUnitalAlgebra.coe_bot, NonUnitalSubalgebra.coe_map]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean | {
"open": [
"Submodule in",
"NonUnitalSubalgebra in",
"NonUnitalSubalgebra in"
],
"variables": [
"{S R A : Type*} [CommSemiring R] [NonUnitalNonAssocSemiring A] [Module R A]",
"[SetLike S A] [NonUnitalSubsemiringClass S A] [hSR : SMulMemClass S R A] (s : S)",
"{s} in",
"{F : Type v'} {... | [
{
"line": "simp [NonUnitalAlgebra.coe_bot, NonUnitalSubalgebra.coe_map]",
"before_state": "R : Type u\nA : Type v\nB : Type w\ninst✝⁸ : CommSemiring R\ninst✝⁷ : NonUnitalNonAssocSemiring A\ninst✝⁶ : Module R A\ninst✝⁵ : NonUnitalNonAssocSemiring B\ninst✝⁴ : Module R B\ninst✝³ : IsScalarTower R A A\ninst✝² :... |
theorem mem_one' {x : A} : x ∈ (1 : SubMulAction R A) ↔ ∃ y, algebraMap R A y = x :=
exists_congr fun r => by rw [algebraMap_eq_smul_one]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Operations.lean | {
"open": [
"Algebra Set MulOpposite",
"Pointwise"
],
"variables": [
"{R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [Algebra R A]"
]
} | [
{
"line": "rw [algebraMap_eq_smul_one]",
"before_state": "R : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : A\nr : R\n⊢ (fun r => r • 1) r = x ↔ (algebraMap R A) r = x",
"after_state": "No Goals!"
},
{
"line": "rewrite [algebraMap_eq_smul_one]",
"... |
theorem le_one_toAddSubmonoid : 1 ≤ (1 : Submodule R A).toAddSubmonoid := by
rintro x ⟨n, rfl⟩
exact ⟨n, show (n : R) • (1 : A) = n by rw [Nat.cast_smul_eq_nsmul, nsmul_one]⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Operations.lean | {
"open": [
"Algebra Set MulOpposite",
"Pointwise"
],
"variables": [
"{R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [Algebra R A]",
"{R : Type u} [Semiring R] {A : Type v} [Semiring A] [Module R A]"
]
} | [
{
"line": "rintro x ⟨n, rfl⟩",
"before_state": "R : Type u\ninst✝² : Semiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Module R A\n⊢ 1 ≤ Submodule.toAddSubmonoid 1",
"after_state": "case intro\nR : Type u\ninst✝² : Semiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Module R A\nn : ℕ\n⊢ (Nat.castAdd... |
theorem smul_induction_on' {x : M} (hx : x ∈ I • N) {p : ∀ x, x ∈ I • N → Prop}
(smul : ∀ (r : A) (hr : r ∈ I) (n : M) (hn : n ∈ N), p (r • n) (smul_mem_smul hr hn))
(add : ∀ x hx y hy, p x hx → p y hy → p (x + y) (add_mem ‹_› ‹_›)) : p x hx := by
refine Exists.elim ?_ fun (h : x ∈ I • N) (H : p x h) ↦ H
ex... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Operations.lean | {
"open": [
"Algebra Set MulOpposite",
"Pointwise"
],
"variables": [
"{R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [Algebra R A]",
"{R : Type u} [Semiring R] {A : Type v} [Semiring A] [Module R A]",
"{M : Type*} [AddCommMonoid M] [Module R M] [Module A M] [IsScalarTower R A M]",
... | [
{
"line": "assumption",
"before_state": "R✝ : Type u\nA✝ : Type v\ninst✝⁹ : CommSemiring R✝\ninst✝⁸ : Semiring A✝\ninst✝⁷ : Algebra R✝ A✝\nR : Type u\ninst✝⁶ : Semiring R\nA : Type v\ninst✝⁵ : Semiring A\ninst✝⁴ : Module R A\nM : Type u_1\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module A M\n... |
theorem le_pow_toAddSubmonoid {n : ℕ} : M.toAddSubmonoid ^ n ≤ (M ^ n).toAddSubmonoid := by
obtain rfl | hn := Decidable.eq_or_ne n 0
· rw [Submodule.pow_zero, pow_zero]
exact le_one_toAddSubmonoid
· exact (pow_toAddSubmonoid M hn).ge
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Operations.lean | {
"open": [
"Algebra Set MulOpposite",
"Pointwise"
],
"variables": [
"{R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [Algebra R A]",
"{R : Type u} [Semiring R] {A : Type v} [Semiring A] [Module R A]",
"{M : Type*} [AddCommMonoid M] [Module R M] [Module A M] [IsScalarTower R A M]",
... | [
{
"line": "obtain rfl | hn := Decidable.eq_or_ne n 0",
"before_state": "R : Type u\ninst✝³ : Semiring R\nA : Type v\ninst✝² : Semiring A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R A A\nM : Submodule R A\nn : ℕ\n⊢ M.toAddSubmonoid ^ n ≤ (M ^ n).toAddSubmonoid",
"after_state": "case inl\nR : Type u\nin... |
theorem mem_one {x : A} : x ∈ (1 : Submodule R A) ↔ ∃ y, algebraMap R A y = x := by
simp [one_eq_range]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Operations.lean | {
"open": [
"Algebra Set MulOpposite",
"Pointwise"
],
"variables": [
"{R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [Algebra R A]",
"{R : Type u} [Semiring R] {A : Type v} [Semiring A] [Module R A]",
"{M : Type*} [AddCommMonoid M] [Module R M] [Module A M] [IsScalarTower R A M]",
... | [
{
"line": "simp [one_eq_range]",
"before_state": "R : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : A\n⊢ x ∈ 1 ↔ ∃ y, (algebraMap R A) y = x",
"after_state": "No Goals!"
}
] |
theorem mem_span_mul_finite_of_mem_mul {P Q : Submodule R A} {x : A} (hx : x ∈ P * Q) :
∃ T T' : Finset A, (T : Set A) ⊆ P ∧ (T' : Set A) ⊆ Q ∧ x ∈ span R (T * T' : Set A) :=
Submodule.mem_span_mul_finite_of_mem_span_mul
(by rwa [← Submodule.span_eq P, ← Submodule.span_eq Q, Submodule.span_mul_span] at hx)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Operations.lean | {
"open": [
"Algebra Set MulOpposite",
"Pointwise",
"Pointwise"
],
"variables": [
"{R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [Algebra R A]",
"{R : Type u} [Semiring R] {A : Type v} [Semiring A] [Module R A]",
"{M : Type*} [AddCommMonoid M] [Module R M] [Module A M] [IsScalarT... | [
{
"line": "rwa [← Submodule.span_eq P, ← Submodule.span_eq Q, Submodule.span_mul_span] at hx",
"before_state": "R : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx✝ : Sort u_3\nspan : x✝\nP Q : Submodule R A\nx : A\nhx : x ∈ P * Q\n⊢ ?m.89073 ∈ Submodule.span ?m.8906... |
lemma mem_smul_iff_inv_mul_mem {S} [DivisionSemiring S] [Algebra R S] {x : S} {p : Submodule R S}
{y : S} (hx : x ≠ 0) : y ∈ x • p ↔ x⁻¹ * y ∈ p := by
constructor
· rintro ⟨a, ha : a ∈ p, rfl⟩; simpa [inv_mul_cancel_left₀ hx]
· exact fun h ↦ ⟨_, h, by simp [mul_inv_cancel_left₀ hx]⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Operations.lean | {
"open": [
"Algebra Set MulOpposite",
"Pointwise",
"Pointwise"
],
"variables": [
"{R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [Algebra R A]",
"{R : Type u} [Semiring R] {A : Type v} [Semiring A] [Module R A]",
"{M : Type*} [AddCommMonoid M] [Module R M] [Module A M] [IsScalarT... | [
{
"line": "constructor",
"before_state": "R : Type u\ninst✝² : CommSemiring R\nS : Type u_3\ninst✝¹ : DivisionSemiring S\ninst✝ : Algebra R S\nx : S\np : Submodule R S\ny : S\nhx : x ≠ 0\n⊢ y ∈ x • p ↔ x⁻¹ * y ∈ p",
"after_state": "case mp\nR : Type u\ninst✝² : CommSemiring R\nS : Type u_3\ninst✝¹ : Div... |
theorem mul_smul_mul_eq_smul_mul_smul (x y : R) : (x * y) • (M * N) = (x • M) * (y • N) := by
ext
refine ⟨?_, fun hx ↦ Submodule.mul_induction_on hx ?_ fun _ _ hx hy ↦ Submodule.add_mem _ hx hy⟩
· rintro ⟨_, hx, rfl⟩
rw [DistribMulAction.toLinearMap_apply]
refine Submodule.mul_induction_on hx (fun m hm n ... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Operations.lean | {
"open": [
"Algebra Set MulOpposite",
"Pointwise",
"Pointwise"
],
"variables": [
"{R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [Algebra R A]",
"{R : Type u} [Semiring R] {A : Type v} [Semiring A] [Module R A]",
"{M : Type*} [AddCommMonoid M] [Module R M] [Module A M] [IsScalarT... | [
{
"line": "ext",
"before_state": "R : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nx y : R\n⊢ (x * y) • (M * N) = x • M * y • N",
"after_state": "case h\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R... |
theorem mem_div_iff_smul_subset {x : A} {I J : Submodule R A} : x ∈ I / J ↔ x • (J : Set A) ⊆ I :=
⟨fun h y ⟨y', hy', xy'_eq_y⟩ => by rw [← xy'_eq_y]; exact h _ hy',
fun h _ hy => h (Set.smul_mem_smul_set hy)⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Operations.lean | {
"open": [
"Algebra Set MulOpposite",
"Pointwise",
"Pointwise"
],
"variables": [
"{R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [Algebra R A]",
"{R : Type u} [Semiring R] {A : Type v} [Semiring A] [Module R A]",
"{M : Type*} [AddCommMonoid M] [Module R M] [Module A M] [IsScalarT... | [
{
"line": "rw [← xy'_eq_y]",
"before_state": "R : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nx : A\nI J : Submodule R A\nh : x ∈ I / J\ny : A\nx✝ : y ∈ x • ↑J\ny' : A\nhy' : y' ∈ ↑J\nxy'_eq_y : (fun x_1 => x • x_1) y' = y\n⊢ y ∈ ↑I",
"after_state": "R : Ty... |
theorem mul_one_div_le_one {I : Submodule R A} : I * (1 / I) ≤ 1 := by
rw [Submodule.mul_le]
intro m hm n hn
rw [Submodule.mem_div_iff_forall_mul_mem] at hn
rw [mul_comm]
exact hn m hm
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Operations.lean | {
"open": [
"Algebra Set MulOpposite",
"Pointwise",
"Pointwise"
],
"variables": [
"{R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [Algebra R A]",
"{R : Type u} [Semiring R] {A : Type v} [Semiring A] [Module R A]",
"{M : Type*} [AddCommMonoid M] [Module R M] [Module A M] [IsScalarT... | [
{
"line": "rw [Submodule.mul_le]",
"before_state": "R : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nI : Submodule R A\n⊢ I * (1 / I) ≤ 1",
"after_state": "R : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nI : Sub... |
theorem algebraMap_mem_iff (S : Type*) {R A : Type*} [CommSemiring R] [CommSemiring S]
[Ring A] [Algebra R S] [Algebra R A] [Algebra S A] [IsScalarTower R S A] {a : A} {r : R} :
algebraMap R S r ∈ spectrum S a ↔ r ∈ spectrum R a := by
simp only [spectrum.mem_iff]
simp only [Algebra.algebraMap_eq_smul_one]
... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Basic.lean | {
"open": [
"Set",
"scoped Pointwise"
],
"variables": [
"(R : Type u) {A : Type v}",
"[CommSemiring R] [Ring A] [Algebra R A]",
"{R}",
"{R : Type u} {A : Type v}",
"[CommSemiring R] [Ring A] [Algebra R A]",
"(R)",
"{R}"
]
} | [
{
"line": "simp only [spectrum.mem_iff]",
"before_state": "S : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Ring A\ninst✝³ : Algebra R S\ninst✝² : Algebra R A\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\na : A\nr : R\n⊢ (algebraMap R S) r ∈ spectrum... |
theorem resolventSet_of_subsingleton [Subsingleton A] (a : A) : resolventSet R a = Set.univ := by
simp_rw [resolventSet, Subsingleton.elim (algebraMap R A _ - a) 1, isUnit_one, Set.setOf_true]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Basic.lean | {
"open": [
"Set",
"scoped Pointwise"
],
"variables": [
"(R : Type u) {A : Type v}",
"[CommSemiring R] [Ring A] [Algebra R A]",
"{R}",
"{R : Type u} {A : Type v}",
"[CommSemiring R] [Ring A] [Algebra R A]",
"(R)",
"{R}"
]
} | [
{
"line": "simp_rw [resolventSet, Subsingleton.elim (algebraMap R A _ - a) 1, isUnit_one, Set.setOf_true]",
"before_state": "R : Type u\nA : Type v\ninst✝³ : CommSemiring R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : Subsingleton A\na : A\n⊢ resolventSet R a = univ",
"after_state": "No Goals!"
},
... |
theorem units_smul_resolvent_self {r : Rˣ} {a : A} :
r • resolvent a (r : R) = resolvent (r⁻¹ • a) (1 : R) := by
simpa only [Units.smul_def,Algebra.id.smul_eq_mul,Units.inv_mul] using
@units_smul_resolvent _ _ _ _ _ r r a
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Basic.lean | {
"open": [
"Set",
"scoped Pointwise"
],
"variables": [
"(R : Type u) {A : Type v}",
"[CommSemiring R] [Ring A] [Algebra R A]",
"{R}",
"{R : Type u} {A : Type v}",
"[CommSemiring R] [Ring A] [Algebra R A]",
"(R)",
"{R}"
]
} | [
{
"line": "simpa only [Units.smul_def, Algebra.id.smul_eq_mul, Units.inv_mul] using @units_smul_resolvent _ _ _ _ _ r r a",
"before_state": "R : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\na : A\n⊢ r • resolvent a ↑r = resolvent (r⁻¹ • a) 1",
"after_state":... |
lemma inv₀_mem_iff {r : R} {a : Aˣ} :
r⁻¹ ∈ spectrum R (a : A) ↔ r ∈ spectrum R (↑a⁻¹ : A) := by
obtain (rfl | hr) := eq_or_ne r 0
· simp [zero_mem_iff]
· lift r to Rˣ using hr.isUnit
simp [inv_mem_iff]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Basic.lean | {
"open": [
"Set",
"scoped Pointwise"
],
"variables": [
"(R : Type u) {A : Type v}",
"[CommSemiring R] [Ring A] [Algebra R A]",
"{R}",
"{R : Type u} {A : Type v}",
"[CommSemiring R] [Ring A] [Algebra R A]",
"(R)",
"{R}",
"[InvolutiveStar R] [StarRing A] [StarModule R A]",
... | [
{
"line": "obtain (rfl | hr) := eq_or_ne r 0",
"before_state": "R : Type u\nA : Type v\ninst✝² : Semifield R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : R\na : Aˣ\n⊢ r⁻¹ ∈ spectrum R ↑a ↔ r ∈ spectrum R ↑a⁻¹",
"after_state": "case inl\nR : Type u\nA : Type v\ninst✝² : Semifield R\ninst✝¹ : Ring A\ninst✝ ... |
lemma inv₀_mem_inv_iff {r : R} {a : Aˣ} :
r⁻¹ ∈ spectrum R (↑a⁻¹ : A) ↔ r ∈ spectrum R (a : A) := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Basic.lean | {
"open": [
"Set",
"scoped Pointwise"
],
"variables": [
"(R : Type u) {A : Type v}",
"[CommSemiring R] [Ring A] [Algebra R A]",
"{R}",
"{R : Type u} {A : Type v}",
"[CommSemiring R] [Ring A] [Algebra R A]",
"(R)",
"{R}",
"[InvolutiveStar R] [StarRing A] [StarModule R A]",
... | [
{
"line": "simp",
"before_state": "R : Type u\nA : Type v\ninst✝² : Semifield R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : R\na : Aˣ\n⊢ r⁻¹ ∈ spectrum R ↑a⁻¹ ↔ r ∈ spectrum R ↑a",
"after_state": "No Goals!"
}
] |
theorem mem_resolventSet_apply (φ : F) {a : A} {r : R} (h : r ∈ resolventSet R a) :
r ∈ resolventSet R ((φ : A → B) a) := by
simpa only [map_sub,AlgHomClass.commutes] using h.map φ
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Basic.lean | {
"open": [
"Set",
"scoped Pointwise"
],
"variables": [
"(R : Type u) {A : Type v}",
"[CommSemiring R] [Ring A] [Algebra R A]",
"{R}",
"{R : Type u} {A : Type v}",
"[CommSemiring R] [Ring A] [Algebra R A]",
"(R)",
"{R}",
"[InvolutiveStar R] [StarRing A] [StarModule R A]",
... | [
{
"line": "simpa only [map_sub, AlgHomClass.commutes] using h.map φ",
"before_state": "F : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Ring A\ninst✝⁴ : Algebra R A\ninst✝³ : Ring B\ninst✝² : Algebra R B\ninst✝¹ : FunLike F A B\ninst✝ : AlgHomClass F R A B\nφ : F\na ... |
lemma inv_add_add_mul_eq_zero (u : (PreQuasiregular R)ˣ) :
u⁻¹.val.val + u.val.val + u.val.val * u⁻¹.val.val = 0 := by
simpa [-Units.mul_inv] using congr($(u.mul_inv).val)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [],
"variables": [
"{R : Type*} [NonUnitalSemiring R]"
]
} | [
{
"line": "<failed to pretty print>",
"before_state": "R : Type u_1\ninst✝ : NonUnitalSemiring R\nu : (PreQuasiregular R)ˣ\n⊢ (↑u⁻¹).val + (↑u).val + (↑u).val * (↑u⁻¹).val = 0",
"after_state": "No Goals!"
}
] |
lemma add_inv_add_mul_eq_zero (u : (PreQuasiregular R)ˣ) :
u.val.val + u⁻¹.val.val + u⁻¹.val.val * u.val.val = 0 := by
simpa [-Units.inv_mul] using congr($(u.inv_mul).val)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [],
"variables": [
"{R : Type*} [NonUnitalSemiring R]"
]
} | [
{
"line": "<failed to pretty print>",
"before_state": "R : Type u_1\ninst✝ : NonUnitalSemiring R\nu : (PreQuasiregular R)ˣ\n⊢ (↑u).val + (↑u⁻¹).val + (↑u⁻¹).val * (↑u).val = 0",
"after_state": "No Goals!"
}
] |
lemma zero_mem_spectrum_inr (R S : Type*) {A : Type*} [CommSemiring R]
[CommRing S] [Nontrivial S] [NonUnitalRing A] [Algebra R S] [Module S A] [IsScalarTower S A A]
[SMulCommClass S A A] [Module R A] [IsScalarTower R S A] (a : A) :
0 ∈ spectrum R (a : Unitization S A) := by
rw [spectrum.zero_mem_iff]
r... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [
"PreQuasiregular",
"PreQuasiregular"
],
"variables": [
"{R : Type*} [NonUnitalSemiring R]",
"{R A : Type*} [CommSemiring R] [NonUnitalSemiring A] [Module R A] [IsScalarTower R A A]",
"(R A) in",
"(R) in",
"{R : Type*} [NonUnitalSemiring R]",
"(R : Type*) {A : Type*} [Co... | [
{
"line": "rw [spectrum.zero_mem_iff]",
"before_state": "R : Type u_6\nS : Type u_7\nA : Type u_8\ninst✝⁹ : CommSemiring R\ninst✝⁸ : CommRing S\ninst✝⁷ : Nontrivial S\ninst✝⁶ : NonUnitalRing A\ninst✝⁵ : Algebra R S\ninst✝⁴ : Module S A\ninst✝³ : IsScalarTower S A A\ninst✝² : SMulCommClass S A A\ninst✝¹ : Mo... |
lemma iff_spectrum_nonneg {𝕜 A : Type*} [Semifield 𝕜] [LinearOrder 𝕜] [Ring A] [PartialOrder A]
[Algebra 𝕜 A] : NonnegSpectrumClass 𝕜 A ↔ ∀ a : A, 0 ≤ a → ∀ x ∈ spectrum 𝕜 a, 0 ≤ x := by
simp [show NonnegSpectrumClass 𝕜 A ↔ _ from ⟨fun ⟨h⟩ ↦ h, (⟨·⟩)⟩,
quasispectrum_eq_spectrum_union_zero]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [
"PreQuasiregular",
"PreQuasiregular"
],
"variables": [
"{R : Type*} [NonUnitalSemiring R]",
"{R A : Type*} [CommSemiring R] [NonUnitalSemiring A] [Module R A] [IsScalarTower R A A]",
"(R A) in",
"(R) in",
"{R : Type*} [NonUnitalSemiring R]",
"(R : Type*) {A : Type*} [Co... | [
{
"line": "simp [show NonnegSpectrumClass 𝕜 A ↔ _ from ⟨fun ⟨h⟩ ↦ h, (⟨·⟩)⟩, quasispectrum_eq_spectrum_union_zero]",
"before_state": "𝕜 : Type u_6\nA : Type u_7\ninst✝⁴ : Semifield 𝕜\ninst✝³ : LinearOrder 𝕜\ninst✝² : Ring A\ninst✝¹ : PartialOrder A\ninst✝ : Algebra 𝕜 A\n⊢ NonnegSpectrumClass 𝕜 A ↔ ∀ (... |
theorem of_subset_range_algebraMap (hf : f.LeftInverse (algebraMap R S))
(h : quasispectrum S a ⊆ Set.range (algebraMap R S)) : QuasispectrumRestricts a f where
rightInvOn := fun s hs => by obtain ⟨r, rfl⟩ := h hs; rw [hf r]
left_inv := hf
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [
"PreQuasiregular",
"PreQuasiregular"
],
"variables": [
"{R : Type*} [NonUnitalSemiring R]",
"{R A : Type*} [CommSemiring R] [NonUnitalSemiring A] [Module R A] [IsScalarTower R A A]",
"(R A) in",
"(R) in",
"{R : Type*} [NonUnitalSemiring R]",
"(R : Type*) {A : Type*} [Co... | [
{
"line": "obtain ⟨r, rfl⟩ := h hs",
"before_state": "R : Type u_6\nS : Type u_7\nA : Type u_8\ninst✝⁵ : Semifield R\ninst✝⁴ : Field S\ninst✝³ : NonUnitalRing A\ninst✝² : Module R A\ninst✝¹ : Module S A\ninst✝ : Algebra R S\na : A\nf : S → R\nhf : Function.LeftInverse f ⇑(algebraMap R S)\nh : quasispectrum ... |
lemma mul_comm_iff {f : S → R} {a b : A} :
QuasispectrumRestricts (a * b) f ↔ QuasispectrumRestricts (b * a) f := by
simp only [quasispectrumRestricts_iff]
simp only [quasispectrum.mul_comm]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [
"PreQuasiregular",
"PreQuasiregular"
],
"variables": [
"{R : Type*} [NonUnitalSemiring R]",
"{R A : Type*} [CommSemiring R] [NonUnitalSemiring A] [Module R A] [IsScalarTower R A A]",
"(R A) in",
"(R) in",
"{R : Type*} [NonUnitalSemiring R]",
"(R : Type*) {A : Type*} [Co... | [
{
"line": "simp only [quasispectrumRestricts_iff]",
"before_state": "R : Type u_6\nS : Type u_7\nA : Type u_8\ninst✝⁷ : Semifield R\ninst✝⁶ : Field S\ninst✝⁵ : NonUnitalRing A\ninst✝⁴ : Module R A\ninst✝³ : Module S A\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower S A A\ninst✝ : SMulCommClass S A A\nf : S → ... |
theorem algebraMap_image (h : QuasispectrumRestricts a f) :
algebraMap R S '' quasispectrum R a = quasispectrum S a := by
refine Set.eq_of_subset_of_subset ?_ fun s hs => ⟨f s, ?_⟩
· simpa only [quasispectrum.preimage_algebraMap] using
(quasispectrum S a).image_preimage_subset (algebraMap R S)
exact ⟨qu... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [
"PreQuasiregular",
"PreQuasiregular"
],
"variables": [
"{R : Type*} [NonUnitalSemiring R]",
"{R A : Type*} [CommSemiring R] [NonUnitalSemiring A] [Module R A] [IsScalarTower R A A]",
"(R A) in",
"(R) in",
"{R : Type*} [NonUnitalSemiring R]",
"(R : Type*) {A : Type*} [Co... | [
{
"line": "refine Set.eq_of_subset_of_subset ?_ fun s hs => ⟨f s, ?_⟩",
"before_state": "R : Type u_6\nS : Type u_7\nA : Type u_8\ninst✝⁸ : Semifield R\ninst✝⁷ : Field S\ninst✝⁶ : NonUnitalRing A\ninst✝⁵ : Module R A\ninst✝⁴ : Module S A\ninst✝³ : Algebra R S\na : A\nf : S → R\ninst✝² : IsScalarTower S A A\... |
theorem image (h : QuasispectrumRestricts a f) : f '' quasispectrum S a = quasispectrum R a := by
simp only [← h.algebraMap_image]
simp only [Set.image_image]
simp only [h.left_inv _]
simp only [Set.image_id']
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [
"PreQuasiregular",
"PreQuasiregular"
],
"variables": [
"{R : Type*} [NonUnitalSemiring R]",
"{R A : Type*} [CommSemiring R] [NonUnitalSemiring A] [Module R A] [IsScalarTower R A A]",
"(R A) in",
"(R) in",
"{R : Type*} [NonUnitalSemiring R]",
"(R : Type*) {A : Type*} [Co... | [
{
"line": "simp only [← h.algebraMap_image]",
"before_state": "R : Type u_6\nS : Type u_7\nA : Type u_8\ninst✝⁸ : Semifield R\ninst✝⁷ : Field S\ninst✝⁶ : NonUnitalRing A\ninst✝⁵ : Module R A\ninst✝⁴ : Module S A\ninst✝³ : Algebra R S\na : A\nf : S → R\ninst✝² : IsScalarTower S A A\ninst✝¹ : SMulCommClass S ... |
theorem of_rightInvOn (h₁ : Function.LeftInverse f (algebraMap R S))
(h₂ : (spectrum S a).RightInvOn f (algebraMap R S)) : SpectrumRestricts a f where
rightInvOn x hx := by
obtain (rfl | hx) := mem_quasispectrum_iff.mp hx
· simpa using h₁ 0
· exact h₂ hx
left_inv := h₁
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [
"PreQuasiregular",
"PreQuasiregular"
],
"variables": [
"{R : Type*} [NonUnitalSemiring R]",
"{R A : Type*} [CommSemiring R] [NonUnitalSemiring A] [Module R A] [IsScalarTower R A A]",
"(R A) in",
"(R) in",
"{R : Type*} [NonUnitalSemiring R]",
"(R : Type*) {A : Type*} [Co... | [
{
"line": "obtain (rfl | hx) := mem_quasispectrum_iff.mp hx",
"before_state": "R : Type u_9\nS : Type u_10\nA : Type u_11\ninst✝⁵ : Semifield R\ninst✝⁴ : Semifield S\ninst✝³ : Ring A\ninst✝² : Algebra R S\ninst✝¹ : Algebra R A\ninst✝ : Algebra S A\na : A\nf : S → R\nh₁ : Function.LeftInverse f ⇑(algebraMap ... |
theorem of_subset_range_algebraMap (hf : f.LeftInverse (algebraMap R S))
(h : spectrum S a ⊆ Set.range (algebraMap R S)) : SpectrumRestricts a f where
rightInvOn := fun s hs => by
rw [mem_quasispectrum_iff] at hs
obtain (rfl | hs) := hs
· simpa using hf 0
· obtain ⟨r, rfl⟩ := h hs
rw [hf r]
... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [
"PreQuasiregular",
"PreQuasiregular"
],
"variables": [
"{R : Type*} [NonUnitalSemiring R]",
"{R A : Type*} [CommSemiring R] [NonUnitalSemiring A] [Module R A] [IsScalarTower R A A]",
"(R A) in",
"(R) in",
"{R : Type*} [NonUnitalSemiring R]",
"(R : Type*) {A : Type*} [Co... | [
{
"line": "rw [mem_quasispectrum_iff] at hs",
"before_state": "R : Type u_9\nS : Type u_10\nA : Type u_11\ninst✝⁵ : Semifield R\ninst✝⁴ : Semifield S\ninst✝³ : Ring A\ninst✝² : Algebra R S\ninst✝¹ : Algebra R A\ninst✝ : Algebra S A\na : A\nf : S → R\nhf : Function.LeftInverse f ⇑(algebraMap R S)\nh : spectr... |
lemma of_spectrum_eq {a b : A} {f : S → R} (ha : SpectrumRestricts a f)
(h : spectrum S a = spectrum S b) : SpectrumRestricts b f where
rightInvOn := by
rw [quasispectrum_eq_spectrum_union_zero]
rw [← h]
rw [← quasispectrum_eq_spectrum_union_zero]
exact QuasispectrumRestricts.rightInvOn ha
left... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [
"PreQuasiregular",
"PreQuasiregular"
],
"variables": [
"{R : Type*} [NonUnitalSemiring R]",
"{R A : Type*} [CommSemiring R] [NonUnitalSemiring A] [Module R A] [IsScalarTower R A A]",
"(R A) in",
"(R) in",
"{R : Type*} [NonUnitalSemiring R]",
"(R : Type*) {A : Type*} [Co... | [
{
"line": "rw [quasispectrum_eq_spectrum_union_zero]",
"before_state": "R : Type u_9\nS : Type u_10\nA : Type u_11\ninst✝⁵ : Semifield R\ninst✝⁴ : Semifield S\ninst✝³ : Ring A\ninst✝² : Algebra R S\ninst✝¹ : Algebra R A\ninst✝ : Algebra S A\na b : A\nf : S → R\nha : SpectrumRestricts a f\nh : spectrum S a =... |
theorem algebraMap_image (h : SpectrumRestricts a f) :
algebraMap R S '' spectrum R a = spectrum S a := by
refine Set.eq_of_subset_of_subset ?_ fun s hs => ⟨f s, ?_⟩
· simpa only [spectrum.preimage_algebraMap] using
(spectrum S a).image_preimage_subset (algebraMap R S)
exact ⟨spectrum.of_algebraMap_mem ... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [
"PreQuasiregular",
"PreQuasiregular"
],
"variables": [
"{R : Type*} [NonUnitalSemiring R]",
"{R A : Type*} [CommSemiring R] [NonUnitalSemiring A] [Module R A] [IsScalarTower R A A]",
"(R A) in",
"(R) in",
"{R : Type*} [NonUnitalSemiring R]",
"(R : Type*) {A : Type*} [Co... | [
{
"line": "refine Set.eq_of_subset_of_subset ?_ fun s hs => ⟨f s, ?_⟩",
"before_state": "R : Type u_9\nS : Type u_10\nA : Type u_11\ninst✝⁶ : Semifield R\ninst✝⁵ : Semifield S\ninst✝⁴ : Ring A\ninst✝³ : Algebra R S\ninst✝² : Algebra R A\ninst✝¹ : Algebra S A\na : A\nf : S → R\ninst✝ : IsScalarTower R S A\nh... |
theorem image (h : SpectrumRestricts a f) : f '' spectrum S a = spectrum R a := by
simp only [← h.algebraMap_image]
simp only [Set.image_image]
simp only [h.left_inv _]
simp only [Set.image_id']
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean | {
"open": [
"PreQuasiregular",
"PreQuasiregular"
],
"variables": [
"{R : Type*} [NonUnitalSemiring R]",
"{R A : Type*} [CommSemiring R] [NonUnitalSemiring A] [Module R A] [IsScalarTower R A A]",
"(R A) in",
"(R) in",
"{R : Type*} [NonUnitalSemiring R]",
"(R : Type*) {A : Type*} [Co... | [
{
"line": "simp only [← h.algebraMap_image]",
"before_state": "R : Type u_9\nS : Type u_10\nA : Type u_11\ninst✝⁶ : Semifield R\ninst✝⁵ : Semifield S\ninst✝⁴ : Ring A\ninst✝³ : Algebra R S\ninst✝² : Algebra R A\ninst✝¹ : Algebra S A\na : A\nf : S → R\ninst✝ : IsScalarTower R S A\nh : SpectrumRestricts a f\n... |
theorem op_adjoin (s : Set A) :
(Algebra.adjoin R s).op = Algebra.adjoin R (MulOpposite.unop ⁻¹' s) := by
apply toSubsemiring_injective
simp_rw [Algebra.adjoin, op_toSubsemiring, Subsemiring.op_closure, Set.preimage_union]
congr with x
simp_rw [Set.mem_preimage, Set.mem_range, MulOpposite.algebraMap_apply]
... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Subalgebra/MulOpposite.lean | {
"open": [],
"variables": [
"{ι : Sort*} {R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A]"
]
} | [
{
"line": "apply toSubsemiring_injective",
"before_state": "R : Type u_2\nA : Type u_3\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ns : Set A\n⊢ (Algebra.adjoin R s).op = Algebra.adjoin R (MulOpposite.unop ⁻¹' s)",
"after_state": "No Goals!"
}
] |
theorem unop_adjoin (s : Set Aᵐᵒᵖ) :
(Algebra.adjoin R s).unop = Algebra.adjoin R (MulOpposite.op ⁻¹' s) := by
apply toSubsemiring_injective
simp_rw [Algebra.adjoin, unop_toSubsemiring, Subsemiring.unop_closure, Set.preimage_union]
congr with x
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Subalgebra/MulOpposite.lean | {
"open": [],
"variables": [
"{ι : Sort*} {R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A]"
]
} | [
{
"line": "apply toSubsemiring_injective",
"before_state": "R : Type u_2\nA : Type u_3\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ns : Set Aᵐᵒᵖ\n⊢ (Algebra.adjoin R s).unop = Algebra.adjoin R (MulOpposite.op ⁻¹' s)",
"after_state": "No Goals!"
}
] |
theorem toSubalgebra_mk (s : Submodule R A) (h1 hmul) :
s.toSubalgebra h1 hmul =
Subalgebra.mk ⟨⟨⟨s, @hmul⟩, h1⟩, s.add_mem, s.zero_mem⟩
(by intro r; rw [Algebra.algebraMap_eq_smul_one]; apply s.smul_mem _ h1) :=
rfl
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Subalgebra/Basic.lean | {
"open": [],
"variables": [
"{R' : Type u'} {R : Type u} {A : Type v} {B : Type w} {C : Type w'}",
"[CommSemiring R]",
"[Semiring A] [Algebra R A] [Semiring B] [Algebra R B] [Semiring C] [Algebra R C]",
"(S : Subalgebra R A)",
"{S R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A]",
"... | [
{
"line": "intro r",
"before_state": "R' : Type u'\nR✝¹ : Type u\nA✝¹ : Type v\nB : Type w\nC : Type w'\ninst✝¹⁴ : CommSemiring R✝¹\ninst✝¹³ : Semiring A✝¹\ninst✝¹² : Algebra R✝¹ A✝¹\ninst✝¹¹ : Semiring B\ninst✝¹⁰ : Algebra R✝¹ B\ninst✝⁹ : Semiring C\ninst✝⁸ : Algebra R✝¹ C\nS✝ : Subalgebra R✝¹ A✝¹\nS : Typ... |
lemma centralizer_coe_image_includeLeft_eq_center_tensorProduct
(S : Set A) [Module.Free R B] :
Subalgebra.centralizer R
(Algebra.TensorProduct.includeLeft (S := R) '' S) =
(Algebra.TensorProduct.map (Subalgebra.centralizer R (S : Set A)).val
(AlgHom.id R B)).range := by
classical
ext w
co... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Subalgebra/Centralizer.lean | {
"open": [
"Algebra.TensorProduct",
"Finsupp TensorProduct"
],
"variables": [
"{R : Type*} [CommSemiring R]",
"{A : Type*} [Semiring A] [Algebra R A]",
"(R : Type*) [CommSemiring R]",
"(A : Type*) [Semiring A] [Algebra R A]",
"(B : Type*) [Semiring B] [Algebra R B]"
]
} | [
{
"line": "classical\next w\nconstructor\n· intro hw\n rw [mem_centralizer_iff] at hw\n let ℬ := Module.Free.chooseBasis R B\n obtain ⟨b, rfl⟩ := TensorProduct.eq_repr_basis_right ℬ w\n refine Subalgebra.sum_mem _ fun j hj => ⟨⟨b j, ?_⟩ ⊗ₜ[R] ℬ j, by simp⟩\n rw [Subalgebra.mem_centralizer_iff]\n intro x h... |
theorem map_comap_eq_self
{f : A →ₐ[R] B} {S : Subalgebra R B} (h : S ≤ f.range) : (S.comap f).map f = S := by
simpa only [inf_of_le_left h] using map_comap_eq f S
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Subalgebra/Lattice.lean | {
"open": [
"Subalgebra in",
"Subalgebra in",
"Subalgebra in",
"Algebra"
],
"variables": [
"(R : Type u) {A : Type v} {B : Type w}",
"[CommSemiring R] [Semiring A] [Algebra R A] [Semiring B] [Algebra R B]",
"{R}",
"{R : Type u} {A : Type v} {B : Type w}",
"[CommSemiring R] [Sem... | [
{
"line": "simpa only [inf_of_le_left h] using map_comap_eq f S",
"before_state": "R : Type u_5\nA : Type u_6\nB : Type u_7\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nS : Subalgebra R B\nh : S ≤ f.range\n⊢ Subalgebra.map f (S... |
theorem ext_of_eq_adjoin {S : Subalgebra R A} {s : Set A} (hS : S = adjoin R s) ⦃φ₁ φ₂ : S →ₐ[R] B⦄
(h : ∀ x hx, φ₁ ⟨x, hS.ge (subset_adjoin hx)⟩ = φ₂ ⟨x, hS.ge (subset_adjoin hx)⟩) :
φ₁ = φ₂ := by
subst hS; exact adjoin_ext h
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Subalgebra/Lattice.lean | {
"open": [
"Subalgebra in",
"Subalgebra in",
"Subalgebra in",
"Algebra",
"Submodule Subsemiring",
"Algebra Subalgebra"
],
"variables": [
"(R : Type u) {A : Type v} {B : Type w}",
"[CommSemiring R] [Semiring A] [Algebra R A] [Semiring B] [Algebra R B]",
"{R}",
"{R : Type u}... | [
{
"line": "subst hS",
"before_state": "R : Type uR\nA : Type uA\nB : Type uB\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : Semiring A\ninst✝¹³ : Semiring B\ninst✝¹² : Algebra R A\ninst✝¹¹ : Algebra R B\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring A\nins... |
theorem comap_map_eq (f : A →ₐ[R] B) (S : Subalgebra R A) :
(S.map f).comap f = S ⊔ Algebra.adjoin R (f ⁻¹' {0}) := by
apply le_antisymm
· intro x hx
rw [mem_comap] at hx
rw [mem_map] at hx
obtain ⟨y, hy, hxy⟩ := hx
replace hxy : x - y ∈ f ⁻¹' {0} := by simp [hxy]
rw [← Algebra.adjoin_eq S]
... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Subalgebra/Lattice.lean | {
"open": [
"Subalgebra in",
"Subalgebra in",
"Subalgebra in",
"Algebra",
"Submodule Subsemiring",
"Algebra Subalgebra"
],
"variables": [
"(R : Type u) {A : Type v} {B : Type w}",
"[CommSemiring R] [Semiring A] [Algebra R A] [Semiring B] [Algebra R B]",
"{R}",
"{R : Type u}... | [
{
"line": "apply le_antisymm",
"before_state": "R : Type uR\nA : Type uA\nB : Type uB\ninst✝²⁰ : CommSemiring R\ninst✝¹⁹ : Semiring A\ninst✝¹⁸ : Semiring B\ninst✝¹⁷ : Algebra R A\ninst✝¹⁶ : Algebra R B\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : CommSemiring A\ninst✝¹³ : Algebra R A\ninst✝¹² : CommRing R\ninst✝¹¹ ... |
theorem mem_of_finset_sum_eq_one_of_pow_smul_mem
{ι : Type*} (ι' : Finset ι) (s : ι → S) (l : ι → S)
(e : ∑ i ∈ ι', l i * s i = 1) (hs : ∀ i, s i ∈ S') (hl : ∀ i, l i ∈ S') (x : S)
(H : ∀ i, ∃ n : ℕ, (s i ^ n : S) • x ∈ S') : x ∈ S' := by
suffices x ∈ Subalgebra.toSubmodule (Algebra.ofId S' S).range by
... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Subalgebra/Operations.lean | {
"open": [
"Algebra"
],
"variables": [
"{R A B : Type*} [CommSemiring R] [Semiring A] [Algebra R A] [Semiring B] [Algebra R B]",
"{R S : Type*} [CommSemiring R] [CommRing S] [Algebra R S]",
"(S' : Subalgebra R S)"
]
} | [
{
"line": "suffices x ∈ Subalgebra.toSubmodule (Algebra.ofId S' S).range\n by\n obtain ⟨x, rfl⟩ := this\n exact x.2",
"before_state": "R : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_6\nι' : Finset ι\ns l : ι → S\ne : ∑ i ∈ ι'... |
theorem mul_toSubmodule_le (S T : Subalgebra R A) :
(Subalgebra.toSubmodule S)* (Subalgebra.toSubmodule T) ≤ Subalgebra.toSubmodule (S ⊔ T) := by
rw [Submodule.mul_le]
intro y hy z hz
show y * z ∈ S ⊔ T
exact mul_mem (Algebra.mem_sup_left hy) (Algebra.mem_sup_right hz)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Subalgebra/Pointwise.lean | {
"open": [],
"variables": [
"{R : Type*} {A : Type*} [CommSemiring R] [Semiring A] [Algebra R A]"
]
} | [
{
"line": "rw [Submodule.mul_le]",
"before_state": "R : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Subalgebra R A\n⊢ Subalgebra.toSubmodule S * Subalgebra.toSubmodule T ≤ Subalgebra.toSubmodule (S ⊔ T)",
"after_state": "R : Type u_1\nA : Type u_2\nin... |
theorem isIdempotentElem_toSubmodule (S : Subalgebra R A) :
IsIdempotentElem S.toSubmodule := by
apply le_antisymm
· refine (mul_toSubmodule_le _ _).trans_eq ?_
rw [sup_idem]
· intro x hx1
rw [← mul_one x]
exact Submodule.mul_mem_mul hx1 (show (1 : A) ∈ S from one_mem S)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Subalgebra/Pointwise.lean | {
"open": [],
"variables": [
"{R : Type*} {A : Type*} [CommSemiring R] [Semiring A] [Algebra R A]"
]
} | [
{
"line": "apply le_antisymm",
"before_state": "R : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS : Subalgebra R A\n⊢ IsIdempotentElem (Subalgebra.toSubmodule S)",
"after_state": "case a\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semirin... |
theorem restrictScalars_top : restrictScalars R (⊤ : Subalgebra S A) = ⊤ :=
SetLike.coe_injective <| by dsimp -- Porting note: why does `rfl` not work instead of `by dsimp`?
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Algebra/Subalgebra/Tower.lean | {
"open": [
"Pointwise",
"IsScalarTower"
],
"variables": [
"(R : Type u) (S : Type v) (A : Type w) (B : Type u₁) (M : Type v₁)",
"[CommSemiring R] [Semiring A] [Algebra R A]",
"[AddCommMonoid M] [Module R M] [Module A M] [IsScalarTower R A M]",
"{A}",
"[CommSemiring R] [CommSemiring S]... | [
{
"line": "dsimp\n -- Porting note: why does `rfl` not work instead of `by dsimp`?",
"before_state": "x✝ : Sort u_1\nrestrictScalars : x✝\n⊢ ↑?m.19805 = ↑?m.19806",
"after_state": "No Goals!"
}
] |
lemma mulLeftRight_comp_congr (e : A ≃ₐ[R] B) :
(AlgHom.mulLeftRight R B).comp (Algebra.TensorProduct.congr e e.op).toAlgHom =
(e.toLinearEquiv.algConj R).toAlgHom.comp (AlgHom.mulLeftRight R A) := by
apply AlgHom.ext
intro a
induction a using TensorProduct.induction_on with
| zero => simp
| tmul a a'... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Azumaya/Basic.lean | {
"open": [
"scoped TensorProduct",
"MulOpposite"
],
"variables": [
"(R A B : Type*) [CommSemiring R] [Ring A] [Ring B] [Algebra R A] [Algebra R B]"
]
} | [
{
"line": "apply AlgHom.ext",
"before_state": "R : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\n⊢ (AlgHom.mulLeftRight R B).comp ↑(Algebra.TensorProduct.congr e (AlgEquiv.op e)) =\n (↑(LinearEqui... |
theorem matrix [Nonempty n] : IsAzumaya R (Matrix n n R) where
eq_of_smul_eq_smul := by nontriviality R; exact eq_of_smul_eq_smul
bij := Function.bijective_iff_has_inverse.mpr
⟨AlgHom.mulLeftRightMatrix_inv R n,
DFunLike.congr_fun (AlgHom.mulLeftRightMatrix.inv_comp R n),
DFunLike.congr_fun (AlgHom.mulL... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Azumaya/Matrix.lean | {
"open": [
"scoped TensorProduct",
"Matrix MulOpposite"
],
"variables": [
"(R n : Type*) [CommSemiring R] [Fintype n] [DecidableEq n]"
]
} | [
{
"line": "nontriviality R",
"before_state": "R : Type u_1\nn : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\ninst✝ : Nonempty n\n⊢ ∀ {m₁ m₂ : R}, (∀ (a : Matrix n n R), m₁ • a = m₂ • a) → m₁ = m₂",
"after_state": "R : Type u_1\nn : Type u_2\ninst✝³ : CommSemiring R\nins... |
theorem exists_mem_multiset_dvd (hp : Prime p) {s : Multiset α} : p ∣ s.prod → ∃ a ∈ s, p ∣ a :=
Multiset.induction_on s (fun h => (hp.not_dvd_one h).elim) fun a s ih h =>
have : p ∣ a * s.prod := by simpa using h
match hp.dvd_or_dvd this with
| Or.inl h => ⟨a, Multiset.mem_cons_self a s, h⟩
| Or.inr ... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Associated.lean | {
"open": [],
"variables": [
"{α β γ δ : Type*}",
"[CommMonoidWithZero α] {p : α}"
]
} | [
{
"line": "simpa using h",
"before_state": "α : Type u_1\ninst✝ : CommMonoidWithZero α\np : α\nhp : Prime p\ns✝ : Multiset α\na : α\ns : Multiset α\nih : p ∣ s.prod → ∃ a ∈ s, p ∣ a\nh : p ∣ (a ::ₘ s).prod\n⊢ p ∣ a * s.prod",
"after_state": "No Goals!"
}
] |
theorem exists_mem_multiset_map_dvd (hp : Prime p) {s : Multiset β} {f : β → α} :
p ∣ (s.map f).prod → ∃ a ∈ s, p ∣ f a := fun h => by
simpa only [exists_prop,Multiset.mem_map,exists_exists_and_eq_and] using
hp.exists_mem_multiset_dvd h
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Associated.lean | {
"open": [],
"variables": [
"{α β γ δ : Type*}",
"[CommMonoidWithZero α] {p : α}"
]
} | [
{
"line": "simpa only [exists_prop, Multiset.mem_map, exists_exists_and_eq_and] using hp.exists_mem_multiset_dvd h",
"before_state": "α : Type u_1\nβ : Type u_2\ninst✝ : CommMonoidWithZero α\np : α\nhp : Prime p\ns : Multiset β\nf : β → α\nh : p ∣ (Multiset.map f s).prod\n⊢ ∃ a ∈ s, p ∣ f a",
"after_sta... |
lemma expect_sum_comm (s : Finset ι) (t : Finset κ) (f : ι → κ → M) :
𝔼 i ∈ s, ∑ j ∈ t, f i j = ∑ j ∈ t, 𝔼 i ∈ s, f i j := by
simpa only [expect,smul_sum] using sum_comm
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Expect.lean | {
"open": [
"Finset Function",
"Fintype (card)",
"scoped Pointwise",
"Batteries.ExtendedBinder Lean Meta",
"Lean Meta Parser.Term PrettyPrinter.Delaborator SubExpr",
"Batteries.ExtendedBinder",
"scoped BigOperators"
],
"variables": [
"{ι κ M N : Type*}",
"[AddCommMonoid M] [Mod... | [
{
"line": "simpa only [expect, smul_sum] using sum_comm",
"before_state": "ι : Type u_1\nκ : Type u_2\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : _root_.Module ℚ≥0 M\ns : Finset ι\nt : Finset κ\nf : ι → κ → M\n⊢ 𝔼 i ∈ s, ∑ j ∈ t, f i j = ∑ j ∈ t, 𝔼 i ∈ s, f i j",
"after_state": "No Goals!"
}
] |
lemma expect_comm (s : Finset ι) (t : Finset κ) (f : ι → κ → M) :
𝔼 i ∈ s, 𝔼 j ∈ t, f i j = 𝔼 j ∈ t, 𝔼 i ∈ s, f i j := by
rw [expect]
rw [expect]
rw [← expect_sum_comm]
rw [← expect_sum_comm]
rw [expect]
rw [expect]
rw [smul_comm]
rw [sum_comm]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Expect.lean | {
"open": [
"Finset Function",
"Fintype (card)",
"scoped Pointwise",
"Batteries.ExtendedBinder Lean Meta",
"Lean Meta Parser.Term PrettyPrinter.Delaborator SubExpr",
"Batteries.ExtendedBinder",
"scoped BigOperators"
],
"variables": [
"{ι κ M N : Type*}",
"[AddCommMonoid M] [Mod... | [
{
"line": "rw [expect]",
"before_state": "ι : Type u_1\nκ : Type u_2\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : _root_.Module ℚ≥0 M\ns : Finset ι\nt : Finset κ\nf : ι → κ → M\n⊢ 𝔼 i ∈ s, 𝔼 j ∈ t, f i j = 𝔼 j ∈ t, 𝔼 i ∈ s, f i j",
"after_state": "ι : Type u_1\nκ : Type u_2\nM : Type u_3\ninst✝¹... |
lemma expect_add_distrib (s : Finset ι) (f g : ι → M) :
𝔼 i ∈ s, (f i + g i) = 𝔼 i ∈ s, f i + 𝔼 i ∈ s, g i := by
simp [expect, sum_add_distrib]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Expect.lean | {
"open": [
"Finset Function",
"Fintype (card)",
"scoped Pointwise",
"Batteries.ExtendedBinder Lean Meta",
"Lean Meta Parser.Term PrettyPrinter.Delaborator SubExpr",
"Batteries.ExtendedBinder",
"scoped BigOperators"
],
"variables": [
"{ι κ M N : Type*}",
"[AddCommMonoid M] [Mod... | [
{
"line": "simp [expect, sum_add_distrib]",
"before_state": "ι : Type u_1\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : _root_.Module ℚ≥0 M\ns : Finset ι\nf g : ι → M\n⊢ 𝔼 i ∈ s, (f i + g i) = 𝔼 i ∈ s, f i + 𝔼 i ∈ s, g i",
"after_state": "No Goals!"
}
] |
lemma expect_add_expect_comm (f₁ f₂ g₁ g₂ : ι → M) :
𝔼 i ∈ s, (f₁ i + f₂ i) + 𝔼 i ∈ s, (g₁ i + g₂ i) =
𝔼 i ∈ s, (f₁ i + g₁ i) + 𝔼 i ∈ s, (f₂ i + g₂ i) := by
simp_rw [expect_add_distrib, add_add_add_comm]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Expect.lean | {
"open": [
"Finset Function",
"Fintype (card)",
"scoped Pointwise",
"Batteries.ExtendedBinder Lean Meta",
"Lean Meta Parser.Term PrettyPrinter.Delaborator SubExpr",
"Batteries.ExtendedBinder",
"scoped BigOperators"
],
"variables": [
"{ι κ M N : Type*}",
"[AddCommMonoid M] [Mod... | [
{
"line": "simp_rw [expect_add_distrib, add_add_add_comm]",
"before_state": "ι : Type u_1\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : _root_.Module ℚ≥0 M\ns : Finset ι\nf₁ f₂ g₁ g₂ : ι → M\n⊢ 𝔼 i ∈ s, (f₁ i + f₂ i) + 𝔼 i ∈ s, (g₁ i + g₂ i) = 𝔼 i ∈ s, (f₁ i + g₁ i) + 𝔼 i ∈ s, (f₂ i + g₂ i)",
"af... |
lemma expect_ite_mem (s t : Finset ι) (f : ι → M) :
𝔼 i ∈ s, (if i ∈ t then f i else 0) = (#(s ∩ t) / #s : ℚ≥0) • 𝔼 i ∈ s ∩ t, f i := by
obtain hst | hst := (s ∩ t).eq_empty_or_nonempty
· simp [expect, hst]
· simp [expect, smul_smul, ← inv_mul_eq_div, hst.card_ne_zero]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Expect.lean | {
"open": [
"Finset Function",
"Fintype (card)",
"scoped Pointwise",
"Batteries.ExtendedBinder Lean Meta",
"Lean Meta Parser.Term PrettyPrinter.Delaborator SubExpr",
"Batteries.ExtendedBinder",
"scoped BigOperators"
],
"variables": [
"{ι κ M N : Type*}",
"[AddCommMonoid M] [Mod... | [
{
"line": "obtain hst | hst := (s ∩ t).eq_empty_or_nonempty",
"before_state": "ι : Type u_1\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : _root_.Module ℚ≥0 M\ninst✝ : DecidableEq ι\ns t : Finset ι\nf : ι → M\n⊢ (𝔼 i ∈ s, if i ∈ t then f i else 0) = (↑(#(s ∩ t)) / ↑(#s)) • 𝔼 i ∈ s ∩ t, f i",
"after... |
lemma card_smul_expect (s : Finset ι) (f : ι → M) : #s • 𝔼 i ∈ s, f i = ∑ i ∈ s, f i := by
obtain rfl | hs := s.eq_empty_or_nonempty
· simp
· rw [expect, ← Nat.cast_smul_eq_nsmul ℚ≥0, smul_inv_smul₀]
exact mod_cast hs.card_ne_zero
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Expect.lean | {
"open": [
"Finset Function",
"Fintype (card)",
"scoped Pointwise",
"Batteries.ExtendedBinder Lean Meta",
"Lean Meta Parser.Term PrettyPrinter.Delaborator SubExpr",
"Batteries.ExtendedBinder",
"scoped BigOperators"
],
"variables": [
"{ι κ M N : Type*}",
"[AddCommMonoid M] [Mod... | [
{
"line": "obtain rfl | hs := s.eq_empty_or_nonempty",
"before_state": "ι : Type u_1\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : _root_.Module ℚ≥0 M\ninst✝ : DecidableEq ι\ns : Finset ι\nf : ι → M\n⊢ #s • 𝔼 i ∈ s, f i = ∑ i ∈ s, f i",
"after_state": "case inl\nι : Type u_1\nM : Type u_3\ninst✝² :... |
lemma smul_expect {G : Type*} [DistribSMul G M] [SMulCommClass G ℚ≥0 M] (a : G)
(s : Finset ι) (f : ι → M) : a • 𝔼 i ∈ s, f i = 𝔼 i ∈ s, a • f i := by
simp only [expect]
simp only [smul_sum]
simp only [smul_comm]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Expect.lean | {
"open": [
"Finset Function",
"Fintype (card)",
"scoped Pointwise",
"Batteries.ExtendedBinder Lean Meta",
"Lean Meta Parser.Term PrettyPrinter.Delaborator SubExpr",
"Batteries.ExtendedBinder",
"scoped BigOperators"
],
"variables": [
"{ι κ M N : Type*}",
"[AddCommMonoid M] [Mod... | [
{
"line": "simp only [expect]",
"before_state": "ι : Type u_1\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : _root_.Module ℚ≥0 M\ninst✝² : DecidableEq ι\nG : Type u_5\ninst✝¹ : DistribSMul G M\ninst✝ : SMulCommClass G ℚ≥0 M\na : G\ns : Finset ι\nf : ι → M\n⊢ a • 𝔼 i ∈ s, f i = 𝔼 i ∈ s, a • f i",
"a... |
lemma expect_bijective (e : ι → κ) (he : Bijective e) (f : ι → M) (g : κ → M)
(h : ∀ i, f i = g (e i)) : 𝔼 i, f i = 𝔼 i, g i :=
expect_nbij e (fun _ _ ↦ mem_univ _) (fun i _ ↦ h i) he.injective.injOn <| by
simpa using he.surjective.surjOn _
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Expect.lean | {
"open": [
"Finset Function",
"Fintype (card)",
"scoped Pointwise",
"Batteries.ExtendedBinder Lean Meta",
"Lean Meta Parser.Term PrettyPrinter.Delaborator SubExpr",
"Batteries.ExtendedBinder",
"scoped BigOperators"
],
"variables": [
"{ι κ M N : Type*}",
"[AddCommMonoid M] [Mod... | [
{
"line": "simpa using he.surjective.surjOn _",
"before_state": "ι : Type u_1\nκ : Type u_2\nM : Type u_3\ninst✝¹⁸ : AddCommMonoid M\ninst✝¹⁷ : _root_.Module ℚ≥0 M\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : _root_.Module ℚ≥0 M\ninst✝¹³ : Semiring M\ninst✝¹² : _root_.Module ℚ≥0 M\ninst✝¹¹ ... |
lemma dens_disjiUnion (s : Finset α) (t : α → Finset β) (h) :
(s.disjiUnion t h).dens = ∑ a ∈ s, (t a).dens := by simp [dens, sum_div]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Field.lean | {
"open": [
"Fintype"
],
"variables": [
"{ι K : Type*} [DivisionSemiring K]",
"{α β : Type*} [Fintype β]"
]
} | [
{
"line": "simp [dens, sum_div]",
"before_state": "α : Type u_3\nβ : Type u_4\ninst✝ : Fintype β\ns : Finset α\nt : α → Finset β\nh : (↑s).PairwiseDisjoint t\n⊢ (s.disjiUnion t h).dens = ∑ a ∈ s, (t a).dens",
"after_state": "No Goals!"
}
] |
theorem prod_ofFn (f : Fin n → M) : (List.ofFn f).prod = ∏ i, f i := by
simp [prod_eq_multiset_prod]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Fin.lean | {
"open": [
"Finset"
],
"variables": [
"{α M : Type*}",
"[CommMonoid M] {n : ℕ}"
]
} | [
{
"line": "simp [prod_eq_multiset_prod]",
"before_state": "M : Type u_2\ninst✝ : CommMonoid M\nn : ℕ\nf : Fin n → M\n⊢ (List.ofFn f).prod = ∏ i, f i",
"after_state": "No Goals!"
}
] |
theorem prod_univ_getElem (l : List M) : ∏ i : Fin l.length, l[i.1] = l.prod := by
simp [Finset.prod_eq_multiset_prod]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Fin.lean | {
"open": [
"Finset"
],
"variables": [
"{α M : Type*}",
"[CommMonoid M] {n : ℕ}"
]
} | [
{
"line": "get_elem_tactic",
"before_state": "α : Type u_1\nM : Type u_2\ninst✝ : CommMonoid M\nn : ℕ\nl : List M\ni : Fin l.length\n⊢ ↑i < l.length",
"after_state": "No Goals!"
},
{
"line": "first\n| done\n| assumption\n| get_elem_tactic_trivial\n|\n fail \"failed to prove index is valid, poss... |
theorem prod_univ_fun_getElem (l : List α) (f : α → M) :
∏ i : Fin l.length, f l[i.1] = (l.map f).prod := by
simp [Finset.prod_eq_multiset_prod]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Fin.lean | {
"open": [
"Finset"
],
"variables": [
"{α M : Type*}",
"[CommMonoid M] {n : ℕ}"
]
} | [
{
"line": "get_elem_tactic",
"before_state": "α : Type u_1\nM : Type u_2\ninst✝ : CommMonoid M\nn : ℕ\nl : List α\nf : α → M\ni : Fin l.length\n⊢ ↑i < l.length",
"after_state": "No Goals!"
},
{
"line": "first\n| done\n| assumption\n| get_elem_tactic_trivial\n|\n fail \"failed to prove index is ... |
theorem prod_univ_one (f : Fin 1 → M) : ∏ i, f i = f 0 := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Fin.lean | {
"open": [
"Finset"
],
"variables": [
"{α M : Type*}",
"[CommMonoid M] {n : ℕ}"
]
} | [
{
"line": "simp",
"before_state": "M : Type u_2\ninst✝ : CommMonoid M\nf : Fin 1 → M\n⊢ ∏ i, f i = f 0",
"after_state": "No Goals!"
}
] |
theorem prod_univ_two (f : Fin 2 → M) : ∏ i, f i = f 0 * f 1 := by
simp [prod_univ_succ]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Fin.lean | {
"open": [
"Finset"
],
"variables": [
"{α M : Type*}",
"[CommMonoid M] {n : ℕ}"
]
} | [
{
"line": "simp [prod_univ_succ]",
"before_state": "M : Type u_2\ninst✝ : CommMonoid M\nf : Fin 2 → M\n⊢ ∏ i, f i = f 0 * f 1",
"after_state": "No Goals!"
}
] |
theorem prod_const (n : ℕ) (x : M) : ∏ _i : Fin n, x = x ^ n := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Fin.lean | {
"open": [
"Finset"
],
"variables": [
"{α M : Type*}",
"[CommMonoid M] {n : ℕ}"
]
} | [
{
"line": "simp",
"before_state": "M : Type u_2\ninst✝ : CommMonoid M\nn : ℕ\nx : M\n⊢ ∏ _i, x = x ^ n",
"after_state": "No Goals!"
}
] |
theorem prod_congr' {a b : ℕ} (f : Fin b → M) (h : a = b) :
(∏ i : Fin a, f (i.cast h)) = ∏ i : Fin b, f i := by
subst h
congr
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Fin.lean | {
"open": [
"Finset"
],
"variables": [
"{α M : Type*}",
"[CommMonoid M] {n : ℕ}"
]
} | [
{
"line": "subst h",
"before_state": "M : Type u_2\ninst✝ : CommMonoid M\na b : ℕ\nf : Fin b → M\nh : a = b\n⊢ ∏ i, f (Fin.cast h i) = ∏ i, f i",
"after_state": "M : Type u_2\ninst✝ : CommMonoid M\na : ℕ\nf : Fin a → M\n⊢ ∏ i, f (Fin.cast ⋯ i) = ∏ i, f i"
},
{
"line": "congr",
"before_state"... |
theorem sum_pow_mul_eq_add_pow {n : ℕ} {R : Type*} [CommSemiring R] (a b : R) :
(∑ s : Finset (Fin n), a ^ s.card * b ^ (n - s.card)) = (a + b) ^ n := by
simpa using Fintype.sum_pow_mul_eq_add_pow (Fin n) a b
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Fin.lean | {
"open": [
"Finset"
],
"variables": [
"{α M : Type*}",
"[CommMonoid M] {n : ℕ}"
]
} | [
{
"line": "simpa using Fintype.sum_pow_mul_eq_add_pow (Fin n) a b",
"before_state": "n : ℕ\nR : Type u_3\ninst✝ : CommSemiring R\na b : R\n⊢ ∑ s, a ^ #s * b ^ (n - #s) = (a + b) ^ n",
"after_state": "No Goals!"
}
] |
theorem sum_Ico_Ico_comm {M : Type*} [AddCommMonoid M] (a b : ℕ) (f : ℕ → ℕ → M) :
(∑ i ∈ Finset.Ico a b, ∑ j ∈ Finset.Ico i b, f i j) =
∑ j ∈ Finset.Ico a b, ∑ i ∈ Finset.Ico a (j + 1), f i j := by
rw [Finset.sum_sigma']
rw [Finset.sum_sigma']
refine sum_nbij' (fun x ↦ ⟨x.2, x.1⟩) (fun x ↦ ⟨x.2, x.1⟩) ... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Intervals.lean | {
"open": [
"Nat"
],
"variables": [
"{α M : Type*}",
"[PartialOrder α] [CommMonoid M] {f : α → M} {a b : α}",
"[LocallyFiniteOrder α]",
"[LocallyFiniteOrderTop α]",
"[LocallyFiniteOrderBot α]",
"[Fintype α] [LinearOrder α] [LocallyFiniteOrderTop α] [LocallyFiniteOrderBot α]",
"[Com... | [
{
"line": "rw [Finset.sum_sigma']",
"before_state": "M : Type u_3\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → M\n⊢ ∑ i ∈ Finset.Ico a b, ∑ j ∈ Finset.Ico i b, f i j = ∑ j ∈ Finset.Ico a b, ∑ i ∈ Finset.Ico a (j + 1), f i j",
"after_state": "M : Type u_3\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → ... |
theorem sum_Ico_Ico_comm' {M : Type*} [AddCommMonoid M] (a b : ℕ) (f : ℕ → ℕ → M) :
(∑ i ∈ Finset.Ico a b, ∑ j ∈ Finset.Ico (i + 1) b, f i j) =
∑ j ∈ Finset.Ico a b, ∑ i ∈ Finset.Ico a j, f i j := by
rw [Finset.sum_sigma']
rw [Finset.sum_sigma']
refine sum_nbij' (fun x ↦ ⟨x.2, x.1⟩) (fun x ↦ ⟨x.2, x.1⟩)... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Intervals.lean | {
"open": [
"Nat"
],
"variables": [
"{α M : Type*}",
"[PartialOrder α] [CommMonoid M] {f : α → M} {a b : α}",
"[LocallyFiniteOrder α]",
"[LocallyFiniteOrderTop α]",
"[LocallyFiniteOrderBot α]",
"[Fintype α] [LinearOrder α] [LocallyFiniteOrderTop α] [LocallyFiniteOrderBot α]",
"[Com... | [
{
"line": "rw [Finset.sum_sigma']",
"before_state": "M : Type u_3\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → M\n⊢ ∑ i ∈ Finset.Ico a b, ∑ j ∈ Finset.Ico (i + 1) b, f i j = ∑ j ∈ Finset.Ico a b, ∑ i ∈ Finset.Ico a j, f i j",
"after_state": "M : Type u_3\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → ... |
theorem sum_sym2_filter_not_isDiag {ι α} [LinearOrder ι] [AddCommMonoid α]
(s : Finset ι) (p : Sym2 ι → α) :
∑ i ∈ s.sym2 with ¬ i.IsDiag, p i = ∑ i ∈ s.offDiag with i.1 < i.2, p s(i.1, i.2) := by
rw [Finset.offDiag_filter_lt_eq_filter_le]
conv_rhs => rw [← Finset.sum_subtype_eq_sum_filter]
refine (Finset... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Sym.lean | {
"open": [
"Multiset"
],
"variables": []
} | [
{
"line": "rw [Finset.offDiag_filter_lt_eq_filter_le]",
"before_state": "ι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid α\ns : Finset ι\np : Sym2 ι → α\n⊢ ∑ i ∈ {i ∈ s.sym2 | ¬i.IsDiag}, p i = ∑ i ∈ {i ∈ s.offDiag | i.1 < i.2}, p s(i.1, i.2)",
"after_state": "ι : Type u_1\nα :... |
theorem sum_count_of_mem_sym {α} [DecidableEq α] {m : ℕ} {k : Sym α m} {s : Finset α}
(hk : k ∈ s.sym m) : (∑ i ∈ s, count i k) = m := by
simp_rw [← k.prop, ← toFinset_sum_count_eq, eq_comm]
refine sum_subset_zero_on_sdiff (fun _ _ ↦ ?_) ?_ (fun _ _ ↦ rfl)
all_goals aesop
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Sym.lean | {
"open": [
"Multiset"
],
"variables": []
} | [
{
"line": "simp_rw [← k.prop, ← toFinset_sum_count_eq, eq_comm]",
"before_state": "α : Type u_1\ninst✝ : DecidableEq α\nm : ℕ\nk : Sym α m\ns : Finset α\nhk : k ∈ s.sym m\n⊢ ∑ i ∈ s, count i ↑k = m",
"after_state": "α : Type u_1\ninst✝ : DecidableEq α\nm : ℕ\nk : Sym α m\ns : Finset α\nhk : k ∈ s.sym m\... |
lemma sum_ne_top : ∑ i ∈ s, f i ≠ ⊤ ↔ ∀ i ∈ s, f i ≠ ⊤ := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/WithTop.lean | {
"open": [
"Finset"
],
"variables": [
"{ι α : Type*}",
"[AddCommMonoid α] {s : Finset ι} {f : ι → WithTop α}"
]
} | [
{
"line": "simp",
"before_state": "ι : Type u_1\nα : Type u_2\ninst✝ : AddCommMonoid α\ns : Finset ι\nf : ι → WithTop α\n⊢ ∑ i ∈ s, f i ≠ ⊤ ↔ ∀ i ∈ s, f i ≠ ⊤",
"after_state": "No Goals!"
}
] |
lemma sum_eq_bot_iff : ∑ i ∈ s, f i = ⊥ ↔ ∃ i ∈ s, f i = ⊥ := by
induction s using Finset.cons_induction <;> simp [*]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/WithTop.lean | {
"open": [
"Finset"
],
"variables": [
"{ι α : Type*}",
"[AddCommMonoid α] {s : Finset ι} {f : ι → WithTop α}",
"[LT α]",
"[CommMonoidWithZero α] [NoZeroDivisors α] [Nontrivial α] [DecidableEq α]",
"[AddCommMonoid α] {s : Finset ι} {f : ι → WithBot α}"
]
} | [
{
"line": "focus\n induction s using Finset.cons_induction\n with_annotate_state\"<;>\" skip\n all_goals simp [*]",
"before_state": "ι : Type u_1\nα : Type u_2\ninst✝⁶ : AddCommMonoid α\ninst✝⁵ : LT α\ninst✝⁴ : CommMonoidWithZero α\ninst✝³ : NoZeroDivisors α\ninst✝² : Nontrivial α\ninst✝¹ : DecidableEq α... |
theorem prod_of_support_subset (f : α →₀ M) {s : Finset α} (hs : f.support ⊆ s) (g : α → M → N)
(h : ∀ i ∈ s, g i 0 = 1) : f.prod g = ∏ x ∈ s, g x (f x) := by
refine Finset.prod_subset hs fun x hxs hx => h x hxs ▸ (congr_arg (g x) ?_)
exact not_mem_support_iff.1 hx
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Finsupp/Basic.lean | {
"open": [
"Finset Function"
],
"variables": [
"{α ι γ A B C : Type*} [AddCommMonoid A] [AddCommMonoid B] [AddCommMonoid C]",
"{t : ι → A → C}",
"{s : Finset α} {f : α → ι →₀ A} (i : ι)",
"(g : ι →₀ A) (k : ι → A → γ → B) (x : γ)",
"{β M M' N P G H R S : Type*}",
"[Zero M] [Zero M'] [... | [
{
"line": "refine Finset.prod_subset hs fun x hxs hx => h x hxs ▸ (congr_arg (g x) ?_)",
"before_state": "α : Type u_1\nM : Type u_8\nN : Type u_10\ninst✝¹ : Zero M\ninst✝ : CommMonoid N\nf : α →₀ M\ns : Finset α\nhs : f.support ⊆ s\ng : α → M → N\nh : ∀ i ∈ s, g i 0 = 1\n⊢ f.prod g = ∏ x ∈ s, g x (f x)",
... |
theorem prod_ite_eq [DecidableEq α] (f : α →₀ M) (a : α) (b : α → M → N) :
(f.prod fun x v => ite (a = x) (b x v) 1) = ite (a ∈ f.support) (b a (f a)) 1 := by
dsimp [Finsupp.prod]
rw [f.support.prod_ite_eq]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Finsupp/Basic.lean | {
"open": [
"Finset Function"
],
"variables": [
"{α ι γ A B C : Type*} [AddCommMonoid A] [AddCommMonoid B] [AddCommMonoid C]",
"{t : ι → A → C}",
"{s : Finset α} {f : α → ι →₀ A} (i : ι)",
"(g : ι →₀ A) (k : ι → A → γ → B) (x : γ)",
"{β M M' N P G H R S : Type*}",
"[Zero M] [Zero M'] [... | [
{
"line": "dsimp [Finsupp.prod]",
"before_state": "α : Type u_1\nM : Type u_8\nN : Type u_10\ninst✝² : Zero M\ninst✝¹ : CommMonoid N\ninst✝ : DecidableEq α\nf : α →₀ M\na : α\nb : α → M → N\n⊢ (f.prod fun x v => if a = x then b x v else 1) = if a ∈ f.support then b a (f a) else 1",
"after_state": "α : T... |
theorem sum_ite_self_eq [DecidableEq α] {N : Type*} [AddCommMonoid N] (f : α →₀ N) (a : α) :
(f.sum fun x v => ite (a = x) v 0) = f a := by
classical
convert f.sum_ite_eq a fun _ => id
simp [ite_eq_right_iff.2 Eq.symm]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Finsupp/Basic.lean | {
"open": [
"Finset Function"
],
"variables": [
"{α ι γ A B C : Type*} [AddCommMonoid A] [AddCommMonoid B] [AddCommMonoid C]",
"{t : ι → A → C}",
"{s : Finset α} {f : α → ι →₀ A} (i : ι)",
"(g : ι →₀ A) (k : ι → A → γ → B) (x : γ)",
"{β M M' N P G H R S : Type*}",
"[Zero M] [Zero M'] [... | [
{
"line": "classical\nconvert f.sum_ite_eq a fun _ => id\nsimp [ite_eq_right_iff.2 Eq.symm]",
"before_state": "α : Type u_1\ninst✝¹ : DecidableEq α\nN : Type u_16\ninst✝ : AddCommMonoid N\nf : α →₀ N\na : α\n⊢ (f.sum fun x v => if a = x then v else 0) = f a",
"after_state": "No Goals!"
},
{
"lin... |
theorem prod_ite_eq' [DecidableEq α] (f : α →₀ M) (a : α) (b : α → M → N) :
(f.prod fun x v => ite (x = a) (b x v) 1) = ite (a ∈ f.support) (b a (f a)) 1 := by
dsimp [Finsupp.prod]
rw [f.support.prod_ite_eq']
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Finsupp/Basic.lean | {
"open": [
"Finset Function"
],
"variables": [
"{α ι γ A B C : Type*} [AddCommMonoid A] [AddCommMonoid B] [AddCommMonoid C]",
"{t : ι → A → C}",
"{s : Finset α} {f : α → ι →₀ A} (i : ι)",
"(g : ι →₀ A) (k : ι → A → γ → B) (x : γ)",
"{β M M' N P G H R S : Type*}",
"[Zero M] [Zero M'] [... | [
{
"line": "dsimp [Finsupp.prod]",
"before_state": "α : Type u_1\nM : Type u_8\nN : Type u_10\ninst✝² : Zero M\ninst✝¹ : CommMonoid N\ninst✝ : DecidableEq α\nf : α →₀ M\na : α\nb : α → M → N\n⊢ (f.prod fun x v => if x = a then b x v else 1) = if a ∈ f.support then b a (f a) else 1",
"after_state": "α : T... |
theorem sum_ite_self_eq' [DecidableEq α] {N : Type*} [AddCommMonoid N] (f : α →₀ N) (a : α) :
(f.sum fun x v => ite (x = a) v 0) = f a := by
classical
convert f.sum_ite_eq' a fun _ => id
simp [ite_eq_right_iff.2 Eq.symm]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Finsupp/Basic.lean | {
"open": [
"Finset Function"
],
"variables": [
"{α ι γ A B C : Type*} [AddCommMonoid A] [AddCommMonoid B] [AddCommMonoid C]",
"{t : ι → A → C}",
"{s : Finset α} {f : α → ι →₀ A} (i : ι)",
"(g : ι →₀ A) (k : ι → A → γ → B) (x : γ)",
"{β M M' N P G H R S : Type*}",
"[Zero M] [Zero M'] [... | [
{
"line": "classical\nconvert f.sum_ite_eq' a fun _ => id\nsimp [ite_eq_right_iff.2 Eq.symm]",
"before_state": "α : Type u_1\ninst✝¹ : DecidableEq α\nN : Type u_16\ninst✝ : AddCommMonoid N\nf : α →₀ N\na : α\n⊢ (f.sum fun x v => if x = a then v else 0) = f a",
"after_state": "No Goals!"
},
{
"li... |
theorem support_sum [DecidableEq β] [Zero M] [AddCommMonoid N] {f : α →₀ M} {g : α → M → β →₀ N} :
(f.sum g).support ⊆ f.support.biUnion fun a => (g a (f a)).support := by
have : ∀ c, (f.sum fun a b => g a b c) ≠ 0 → ∃ a, f a ≠ 0 ∧ ¬(g a (f a)) c = 0 := fun a₁ h =>
let ⟨a, ha, ne⟩ := Finset.exists_ne_zero_of_... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Finsupp/Basic.lean | {
"open": [
"Finset Function"
],
"variables": [
"{α ι γ A B C : Type*} [AddCommMonoid A] [AddCommMonoid B] [AddCommMonoid C]",
"{t : ι → A → C}",
"{s : Finset α} {f : α → ι →₀ A} (i : ι)",
"(g : ι →₀ A) (k : ι → A → γ → B) (x : γ)",
"{β M M' N P G H R S : Type*}",
"[Zero M] [Zero M'] [... | [
{
"line": "have : ∀ c, (f.sum fun a b => g a b c) ≠ 0 → ∃ a, f a ≠ 0 ∧ ¬(g a (f a)) c = 0 := fun a₁ h =>\n let ⟨a, ha, ne⟩ := Finset.exists_ne_zero_of_sum_ne_zero h\n ⟨a, mem_support_iff.mp ha, ne⟩",
"before_state": "α : Type u_1\nβ : Type u_7\nM : Type u_8\nN : Type u_10\ninst✝⁸ : Zero M\ninst✝⁷ : CommMo... |
lemma prod_mul_eq_prod_mul_of_exists [Zero M] [CommMonoid N]
{f : α →₀ M} {g : α → M → N} {n₁ n₂ : N}
(a : α) (ha : a ∈ f.support)
(h : g a (f a) * n₁ = g a (f a) * n₂) :
f.prod g * n₁ = f.prod g * n₂ := by
classical
exact Finset.prod_mul_eq_prod_mul_of_exists a ha h
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Finsupp/Basic.lean | {
"open": [
"Finset Function"
],
"variables": [
"{α ι γ A B C : Type*} [AddCommMonoid A] [AddCommMonoid B] [AddCommMonoid C]",
"{t : ι → A → C}",
"{s : Finset α} {f : α → ι →₀ A} (i : ι)",
"(g : ι →₀ A) (k : ι → A → γ → B) (x : γ)",
"{β M M' N P G H R S : Type*}",
"[Zero M] [Zero M'] [... | [
{
"line": "classical exact Finset.prod_mul_eq_prod_mul_of_exists a ha h",
"before_state": "α : Type u_1\nM : Type u_8\nN : Type u_10\ninst✝⁴ : Zero M\ninst✝³ : CommMonoid N\ninst✝² : Zero α\ninst✝¹ : Zero M\ninst✝ : CommMonoid N\nf : α →₀ M\ng : α → M → N\nn₁ n₂ : N\na : α\nha : a ∈ f.support\nh : g a (f a)... |
theorem prod_pow_pos_of_zero_not_mem_support {f : ℕ →₀ ℕ} (nhf : 0 ∉ f.support) :
0 < f.prod (· ^ ·) :=
Nat.pos_iff_ne_zero.mpr <| Finset.prod_ne_zero_iff.mpr fun _ hf =>
pow_ne_zero _ fun H => by subst H; exact nhf hf
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Finsupp/Basic.lean | {
"open": [
"Finset Function"
],
"variables": [
"{α ι γ A B C : Type*} [AddCommMonoid A] [AddCommMonoid B] [AddCommMonoid C]",
"{t : ι → A → C}",
"{s : Finset α} {f : α → ι →₀ A} (i : ι)",
"(g : ι →₀ A) (k : ι → A → γ → B) (x : γ)",
"{β M M' N P G H R S : Type*}",
"[Zero M] [Zero M'] [... | [
{
"line": "subst H",
"before_state": "f : ℕ →₀ ℕ\nnhf : 0 ∉ f.support\nx✝ : ℕ\nhf : x✝ ∈ f.support\nH : x✝ = 0\n⊢ False",
"after_state": "f : ℕ →₀ ℕ\nnhf : 0 ∉ f.support\nhf : 0 ∈ f.support\n⊢ False"
},
{
"line": "exact nhf hf",
"before_state": "f : ℕ →₀ ℕ\nnhf : 0 ∉ f.support\nhf : 0 ∈ f.su... |
lemma prod_univ_pi [DecidableEq ι] [Fintype ι] {κ : ι → Type*} (t : ∀ i, Finset (κ i))
(f : (∀ i ∈ (univ : Finset ι), κ i) → β) :
∏ x ∈ univ.pi t, f x = ∏ x ∈ Fintype.piFinset t, f fun a _ ↦ x a := by
apply prod_nbij' (fun x i ↦ x i <| mem_univ _) (fun x i _ ↦ x i) <;> simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Group/Finset/Pi.lean | {
"open": [
"Fin Function"
],
"variables": [
"{ι β : Type*}",
"[CommMonoid β]"
]
} | [
{
"line": "focus\n apply prod_nbij' (fun x i ↦ x i <| mem_univ _) (fun x i _ ↦ x i)\n with_annotate_state\"<;>\" skip\n all_goals simp",
"before_state": "ι : Type u_1\nβ : Type u_2\ninst✝² : CommMonoid β\nuniv : Finset ι\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nκ : ι → Type u_3\nt : (i : ι) → Finset (... |
theorem prod_comm' {s : Finset γ} {t : γ → Finset α} {t' : Finset α} {s' : α → Finset γ}
(h : ∀ x y, x ∈ s ∧ y ∈ t x ↔ x ∈ s' y ∧ y ∈ t') {f : γ → α → β} :
(∏ x ∈ s, ∏ y ∈ t x, f x y) = ∏ y ∈ t', ∏ x ∈ s' y, f x y := by
classical
have : ∀ z : γ × α, (z ∈ s.biUnion fun x => (t x).map <| Function.Embedding.... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Group/Finset/Sigma.lean | {
"open": [
"Fin Function"
],
"variables": [
"{ι κ α β γ : Type*}",
"{s s₁ s₂ : Finset α} {a : α} {f g : α → β}",
"[CommMonoid β]"
]
} | [
{
"line": "classical\nhave : ∀ z : γ × α, (z ∈ s.biUnion fun x => (t x).map <| Function.Embedding.sectR x _) ↔ z.1 ∈ s ∧ z.2 ∈ t z.1 :=\n by\n rintro ⟨x, y⟩\n simp only [mem_biUnion]\n simp only [mem_map]\n simp only [Function.Embedding.sectR_apply]\n simp only [Prod.mk.injEq]\n simp only [exists_eq_righ... |
theorem prod_congr (h : s₁ = s₂) : (∀ x ∈ s₂, f x = g x) → s₁.prod f = s₂.prod g := by
rw [h]; exact fold_congr
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Group/Finset/Basic.lean | {
"open": [
"Fin Function"
],
"variables": [
"{ι κ G M : Type*} {s s₁ s₂ : Finset ι} {a : ι}",
"[CommMonoid M] {f g : ι → M}"
]
} | [
{
"line": "rw [h]",
"before_state": "ι : Type u_1\nM : Type u_4\ns₁ s₂ : Finset ι\ninst✝ : CommMonoid M\nf g : ι → M\nh : s₁ = s₂\n⊢ (∀ x ∈ s₂, f x = g x) → s₁.prod f = s₂.prod g",
"after_state": "ι : Type u_1\nM : Type u_4\ns₁ s₂ : Finset ι\ninst✝ : CommMonoid M\nf g : ι → M\nh : s₁ = s₂\n⊢ (∀ x ∈ s₂, ... |
lemma prod_eq_one_iff [Subsingleton Mˣ] : ∏ i ∈ s, f i = 1 ↔ ∀ i ∈ s, f i = 1 := by
induction' s using Finset.cons_induction with i s hi ih <;> simp [*]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Group/Finset/Basic.lean | {
"open": [
"Fin Function"
],
"variables": [
"{ι κ G M : Type*} {s s₁ s₂ : Finset ι} {a : ι}",
"[CommMonoid M] {f g : ι → M}"
]
} | [
{
"line": "focus\n induction' s using Finset.cons_induction with i s hi ih\n with_annotate_state\"<;>\" skip\n all_goals simp [*]",
"before_state": "ι : Type u_1\nM : Type u_4\ns : Finset ι\ninst✝¹ : CommMonoid M\nf : ι → M\ninst✝ : Subsingleton Mˣ\n⊢ ∏ i ∈ s, f i = 1 ↔ ∀ i ∈ s, f i = 1",
"after_stat... |
lemma prod_sum_eq_prod_toLeft_mul_prod_toRight (s : Finset (ι ⊕ κ)) (f : ι ⊕ κ → M) :
∏ x ∈ s, f x = (∏ x ∈ s.toLeft, f (Sum.inl x)) * ∏ x ∈ s.toRight, f (Sum.inr x) := by
rw [← Finset.toLeft_disjSum_toRight (u := s)]
rw [Finset.prod_disj_sum]
rw [Finset.toLeft_disjSum]
rw [Finset.toRight_disjSum]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Group/Finset/Basic.lean | {
"open": [
"Fin Function"
],
"variables": [
"{ι κ G M : Type*} {s s₁ s₂ : Finset ι} {a : ι}",
"[CommMonoid M] {f g : ι → M}"
]
} | [
{
"line": "rw [← Finset.toLeft_disjSum_toRight (u := s)]",
"before_state": "ι : Type u_1\nκ : Type u_2\nM : Type u_4\ninst✝ : CommMonoid M\ns : Finset (ι ⊕ κ)\nf : ι ⊕ κ → M\n⊢ ∏ x ∈ s, f x = (∏ x ∈ s.toLeft, f (Sum.inl x)) * ∏ x ∈ s.toRight, f (Sum.inr x)",
"after_state": "ι : Type u_1\nκ : Type u_2\nM... |
theorem prod_sumElim (s : Finset ι) (t : Finset κ) (f : ι → M) (g : κ → M) :
∏ x ∈ s.disjSum t, Sum.elim f g x = (∏ x ∈ s, f x) * ∏ x ∈ t, g x := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Group/Finset/Basic.lean | {
"open": [
"Fin Function"
],
"variables": [
"{ι κ G M : Type*} {s s₁ s₂ : Finset ι} {a : ι}",
"[CommMonoid M] {f g : ι → M}"
]
} | [
{
"line": "simp",
"before_state": "ι : Type u_1\nκ : Type u_2\nM : Type u_4\ninst✝ : CommMonoid M\ns : Finset ι\nt : Finset κ\nf : ι → M\ng : κ → M\n⊢ ∏ x ∈ s.disjSum t, Sum.elim f g x = (∏ x ∈ s, f x) * ∏ x ∈ t, g x",
"after_state": "No Goals!"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.