declaration stringlengths 27 11.3k | file stringlengths 52 114 | context dict | tactic_states listlengths 1 1.24k |
|---|---|---|---|
theorem prod_dvd_prod_of_dvd [CommMonoid β] {S : Multiset α} (g1 g2 : α → β)
(h : ∀ a ∈ S, g1 a ∣ g2 a) : (Multiset.map g1 S).prod ∣ (Multiset.map g2 S).prod := by
apply Multiset.induction_on' S
· simp
intro a T haS _ IH
simp [mul_dvd_mul (h a haS) IH]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Group/Multiset/Basic.lean | {
"open": [],
"variables": [
"{F ι α β β' γ : Type*}",
"[CommMonoid α] [CommMonoid β] {s t : Multiset α} {a : α} {m : Multiset ι} {f g : ι → α}"
]
} | [
{
"line": "apply Multiset.induction_on' S",
"before_state": "α : Type u_3\nβ : Type u_4\ninst✝² : CommMonoid α\ninst✝¹ inst✝ : CommMonoid β\nS : Multiset α\ng1 g2 : α → β\nh : ∀ a ∈ S, g1 a ∣ g2 a\n⊢ (Multiset.map g1 S).prod ∣ (Multiset.map g2 S).prod",
"after_state": "case h₁\nα : Type u_3\nβ : Type u_... |
theorem sum_map_singleton (s : Multiset α) : (s.map fun a => ({a} : Multiset α)).sum = s :=
Multiset.induction_on s (by simp) (by simp)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Group/Multiset/Basic.lean | {
"open": [],
"variables": [
"{F ι α β β' γ : Type*}",
"[CommMonoid α] [CommMonoid β] {s t : Multiset α} {a : α} {m : Multiset ι} {f g : ι → α}",
"[AddCommMonoid α]",
"[DivisionCommMonoid α] {m : Multiset ι} {f g : ι → α}"
]
} | [
{
"line": "simp",
"before_state": "α : Type u_3\ninst✝² : CommMonoid α\ninst✝¹ : AddCommMonoid α\ninst✝ : DivisionCommMonoid α\ns : Multiset α\n⊢ (Multiset.map (fun a => {a}) 0).sum = 0",
"after_state": "No Goals!"
},
{
"line": "simp",
"before_state": "α : Type u_3\ninst✝² : CommMonoid α\nin... |
theorem sum_nat_mod (s : Multiset ℕ) (n : ℕ) : s.sum % n = (s.map (· % n)).sum % n := by
induction s using Multiset.induction <;> simp [Nat.add_mod, *]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Group/Multiset/Basic.lean | {
"open": [],
"variables": [
"{F ι α β β' γ : Type*}",
"[CommMonoid α] [CommMonoid β] {s t : Multiset α} {a : α} {m : Multiset ι} {f g : ι → α}",
"[AddCommMonoid α]",
"[DivisionCommMonoid α] {m : Multiset ι} {f g : ι → α}"
]
} | [
{
"line": "focus\n induction s using Multiset.induction\n with_annotate_state\"<;>\" skip\n all_goals simp [Nat.add_mod, *]",
"before_state": "s : Multiset ℕ\nn : ℕ\n⊢ s.sum % n = (Multiset.map (fun x => x % n) s).sum % n",
"after_state": "No Goals!"
},
{
"line": "induction s using Multiset.i... |
theorem prod_nat_mod (s : Multiset ℕ) (n : ℕ) : s.prod % n = (s.map (· % n)).prod % n := by
induction s using Multiset.induction <;> simp [Nat.mul_mod, *]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Group/Multiset/Basic.lean | {
"open": [],
"variables": [
"{F ι α β β' γ : Type*}",
"[CommMonoid α] [CommMonoid β] {s t : Multiset α} {a : α} {m : Multiset ι} {f g : ι → α}",
"[AddCommMonoid α]",
"[DivisionCommMonoid α] {m : Multiset ι} {f g : ι → α}"
]
} | [
{
"line": "focus\n induction s using Multiset.induction\n with_annotate_state\"<;>\" skip\n all_goals simp [Nat.mul_mod, *]",
"before_state": "s : Multiset ℕ\nn : ℕ\n⊢ s.prod % n = (Multiset.map (fun x => x % n) s).prod % n",
"after_state": "No Goals!"
},
{
"line": "induction s using Multiset... |
theorem sum_int_mod (s : Multiset ℤ) (n : ℤ) : s.sum % n = (s.map (· % n)).sum % n := by
induction s using Multiset.induction <;> simp [Int.add_emod, *]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Group/Multiset/Basic.lean | {
"open": [],
"variables": [
"{F ι α β β' γ : Type*}",
"[CommMonoid α] [CommMonoid β] {s t : Multiset α} {a : α} {m : Multiset ι} {f g : ι → α}",
"[AddCommMonoid α]",
"[DivisionCommMonoid α] {m : Multiset ι} {f g : ι → α}"
]
} | [
{
"line": "focus\n induction s using Multiset.induction\n with_annotate_state\"<;>\" skip\n all_goals simp [Int.add_emod, *]",
"before_state": "s : Multiset ℤ\nn : ℤ\n⊢ s.sum % n = (Multiset.map (fun x => x % n) s).sum % n",
"after_state": "No Goals!"
},
{
"line": "induction s using Multiset.... |
theorem prod_int_mod (s : Multiset ℤ) (n : ℤ) : s.prod % n = (s.map (· % n)).prod % n := by
induction s using Multiset.induction <;> simp [Int.mul_emod, *]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Group/Multiset/Basic.lean | {
"open": [],
"variables": [
"{F ι α β β' γ : Type*}",
"[CommMonoid α] [CommMonoid β] {s t : Multiset α} {a : α} {m : Multiset ι} {f g : ι → α}",
"[AddCommMonoid α]",
"[DivisionCommMonoid α] {m : Multiset ι} {f g : ι → α}"
]
} | [
{
"line": "focus\n induction s using Multiset.induction\n with_annotate_state\"<;>\" skip\n all_goals simp [Int.mul_emod, *]",
"before_state": "s : Multiset ℤ\nn : ℤ\n⊢ s.prod % n = (Multiset.map (fun x => x % n) s).prod % n",
"after_state": "No Goals!"
},
{
"line": "induction s using Multise... |
lemma prod_ite_zero :
(∏ i ∈ s, if p i then f i else 0) = if ∀ i ∈ s, p i then ∏ i ∈ s, f i else 0 := by
split_ifs with h
· exact prod_congr rfl fun i hi => by simp [h i hi]
· push_neg at h
rcases h with ⟨i, hi, hq⟩
exact prod_eq_zero hi (by simp [hq])
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/GroupWithZero/Finset.lean | {
"open": [
"Function"
],
"variables": [
"{ι κ G₀ M₀ : Type*}",
"[CommMonoidWithZero M₀] {p : ι → Prop} [DecidablePred p] {f : ι → M₀} {s : Finset ι}"
]
} | [
{
"line": "split_ifs with h",
"before_state": "ι : Type u_1\nM₀ : Type u_4\ninst✝¹ : CommMonoidWithZero M₀\np : ι → Prop\ninst✝ : DecidablePred p\nf : ι → M₀\ns : Finset ι\n⊢ (∏ i ∈ s, if p i then f i else 0) = if ∀ i ∈ s, p i then ∏ i ∈ s, f i else 0",
"after_state": "case pos\nι : Type u_1\nM₀ : Type ... |
lemma prod_ite_zero : (∏ i, if p i then f i else 0) = if ∀ i, p i then ∏ i, f i else 0 := by
simp [Finset.prod_ite_zero]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/GroupWithZero/Finset.lean | {
"open": [
"Function"
],
"variables": [
"{ι κ G₀ M₀ : Type*}",
"[CommMonoidWithZero M₀] {p : ι → Prop} [DecidablePred p] {f : ι → M₀} {s : Finset ι}",
"[Nontrivial M₀] [NoZeroDivisors M₀]",
"[Fintype ι] [CommMonoidWithZero M₀] {p : ι → Prop} [DecidablePred p] {f : ι → M₀}"
]
} | [
{
"line": "simp [Finset.prod_ite_zero]",
"before_state": "ι : Type u_1\nM₀ : Type u_4\ninst✝⁵ : CommMonoidWithZero M₀\ninst✝⁴ : Nontrivial M₀\ninst✝³ : NoZeroDivisors M₀\ninst✝² : Fintype ι\ninst✝¹ : CommMonoidWithZero M₀\np : ι → Prop\ninst✝ : DecidablePred p\nf : ι → M₀\n⊢ (∏ i, if p i then f i else 0) = ... |
lemma prod_boole : ∏ i, (ite (p i) 1 0 : M₀) = ite (∀ i, p i) 1 0 := by simp [Finset.prod_boole]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/GroupWithZero/Finset.lean | {
"open": [
"Function"
],
"variables": [
"{ι κ G₀ M₀ : Type*}",
"[CommMonoidWithZero M₀] {p : ι → Prop} [DecidablePred p] {f : ι → M₀} {s : Finset ι}",
"[Nontrivial M₀] [NoZeroDivisors M₀]",
"[Fintype ι] [CommMonoidWithZero M₀] {p : ι → Prop} [DecidablePred p] {f : ι → M₀}"
]
} | [
{
"line": "simp [Finset.prod_boole]",
"before_state": "ι : Type u_1\nM₀ : Type u_4\ninst✝⁵ : CommMonoidWithZero M₀\ninst✝⁴ : Nontrivial M₀\ninst✝³ : NoZeroDivisors M₀\ninst✝² : Fintype ι\ninst✝¹ : CommMonoidWithZero M₀\np : ι → Prop\ninst✝ : DecidablePred p\n⊢ (∏ i, if p i then 1 else 0) = if ∀ (i : ι), p i... |
lemma list_sum_right (a : R) (l : List R) (h : ∀ b ∈ l, Commute a b) : Commute a l.sum := by
induction l with
| nil => exact Commute.zero_right _
| cons x xs ih =>
rw [List.sum_cons]
exact (h _ mem_cons_self).add_right (ih fun j hj ↦ h _ <| mem_cons_of_mem _ hj)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Ring/List.lean | {
"open": [
"MulOpposite List"
],
"variables": [
"{ι κ M M₀ R : Type*}",
"[NonUnitalNonAssocSemiring R]"
]
} | [
{
"line": "induction l with\n| nil => exact Commute.zero_right _\n| cons x xs ih =>\n rw [List.sum_cons]\n exact (h _ mem_cons_self).add_right (ih fun j hj ↦ h _ <| mem_cons_of_mem _ hj)",
"before_state": "R : Type u_5\ninst✝ : NonUnitalNonAssocSemiring R\na : R\nl : List R\nh : ∀ b ∈ l, Commute a b\n⊢ Co... |
lemma prod_map_neg (l : List M) :
(l.map Neg.neg).prod = (-1) ^ l.length * l.prod := by
induction l <;> simp [*, pow_succ, ((Commute.neg_one_left _).pow_left _).left_comm]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Ring/List.lean | {
"open": [
"MulOpposite List"
],
"variables": [
"{ι κ M M₀ R : Type*}",
"[NonUnitalNonAssocSemiring R]",
"[Monoid M] [HasDistribNeg M]"
]
} | [
{
"line": "focus\n induction l\n with_annotate_state\"<;>\" skip\n all_goals simp [*, pow_succ, ((Commute.neg_one_left _).pow_left _).left_comm]",
"before_state": "M : Type u_3\ninst✝¹ : Monoid M\ninst✝ : HasDistribNeg M\nl : List M\n⊢ (map Neg.neg l).prod = (-1) ^ l.length * l.prod",
"after_state": ... |
lemma prod_eq_zero : ∀ {l : List M₀}, (0 : M₀) ∈ l → l.prod = 0
-- | absurd h (not_mem_nil _)
| a :: l, h => by
rw [prod_cons]
rcases mem_cons.1 h with ha | hl
exacts [mul_eq_zero_of_left ha.symm _, mul_eq_zero_of_right _ (prod_eq_zero hl)]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Ring/List.lean | {
"open": [
"MulOpposite List"
],
"variables": [
"{ι κ M M₀ R : Type*}",
"[NonUnitalNonAssocSemiring R]",
"[Monoid M] [HasDistribNeg M]",
"[MonoidWithZero M₀] {l : List M₀}"
]
} | [
{
"line": "rw [prod_cons]",
"before_state": "M₀ : Type u_4\ninst✝ : MonoidWithZero M₀\na : M₀\nl : List M₀\nh : 0 ∈ a :: l\n⊢ (a :: l).prod = 0",
"after_state": "M₀ : Type u_4\ninst✝ : MonoidWithZero M₀\na : M₀\nl : List M₀\nh : 0 ∈ a :: l\n⊢ a * l.prod = 0"
},
{
"line": "rewrite [prod_cons]",
... |
lemma dvd_sum [NonUnitalSemiring R] {a} {l : List R} (h : ∀ x ∈ l, a ∣ x) : a ∣ l.sum := by
induction l with
| nil => exact dvd_zero _
| cons x l ih =>
rw [List.sum_cons]
exact dvd_add (h _ mem_cons_self) (ih fun x hx ↦ h x (mem_cons_of_mem _ hx))
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Ring/List.lean | {
"open": [
"MulOpposite List"
],
"variables": [
"{ι κ M M₀ R : Type*}",
"[NonUnitalNonAssocSemiring R]",
"[Monoid M] [HasDistribNeg M]",
"[MonoidWithZero M₀] {l : List M₀}",
"[Nontrivial M₀] [NoZeroDivisors M₀]",
"[NonUnitalNonAssocSemiring R] (l : List ι) (f : ι → R) (r : R)"
]
} | [
{
"line": "induction l with\n| nil => exact dvd_zero _\n| cons x l ih =>\n rw [List.sum_cons]\n exact dvd_add (h _ mem_cons_self) (ih fun x hx ↦ h x (mem_cons_of_mem _ hx))",
"before_state": "R : Type u_5\ninst✝² inst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NonUnitalSemiring R\na : R\nl : List R\nh : ∀ x... |
lemma dvd_sum (h : ∀ i ∈ s, a ∣ f i) : a ∣ ∑ i ∈ s, f i :=
Multiset.dvd_sum fun y hy => by rcases Multiset.mem_map.1 hy with ⟨x, hx, rfl⟩; exact h x hx
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Ring/Finset.lean | {
"open": [
"Fintype"
],
"variables": [
"{ι ι' α β γ : Type*} {κ : ι → Type*} {s s₁ s₂ : Finset ι} {i : ι} {a : α} {f g : ι → α}",
"[AddCommMonoidWithOne α]",
"[NonUnitalNonAssocSemiring α]",
"[NonUnitalSemiring α]"
]
} | [
{
"line": "rcases Multiset.mem_map.1 hy with ⟨x, hx, rfl⟩",
"before_state": "ι : Type u_1\nα : Type u_3\ns : Finset ι\na : α\nf : ι → α\ninst✝² : AddCommMonoidWithOne α\ninst✝¹ : NonUnitalNonAssocSemiring α\ninst✝ : NonUnitalSemiring α\nh : ∀ i ∈ s, a ∣ f i\ny : ?m.1062\nhy : y ∈ ?m.1064\n⊢ ?m.1065 ∣ y",
... |
lemma sum_pow' (s : Finset ι') (f : ι' → α) (n : ℕ) :
(∑ a ∈ s, f a) ^ n = ∑ p ∈ piFinset fun _i : Fin n ↦ s, ∏ i, f (p i) := by
convert @prod_univ_sum (Fin n) _ _ _ _ _ (fun _i ↦ s) fun _i d ↦ f d; simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Ring/Finset.lean | {
"open": [
"Fintype"
],
"variables": [
"{ι ι' α β γ : Type*} {κ : ι → Type*} {s s₁ s₂ : Finset ι} {i : ι} {a : α} {f g : ι → α}",
"[AddCommMonoidWithOne α]",
"[NonUnitalNonAssocSemiring α]",
"[NonUnitalSemiring α]",
"[NonAssocSemiring α] [DecidableEq ι]",
"[CommSemiring α]",
"[Dec... | [
{
"line": "convert @prod_univ_sum (Fin n) _ _ _ _ _ (fun _i ↦ s) fun _i d ↦ f d",
"before_state": "ι' : Type u_2\nα : Type u_3\ninst✝⁴ : AddCommMonoidWithOne α\ninst✝³ : NonUnitalNonAssocSemiring α\ninst✝² : NonUnitalSemiring α\ninst✝¹ : NonAssocSemiring α\ninst✝ : CommSemiring α\ns : Finset ι'\nf : ι' → α\... |
theorem prod_add (f g : ι → α) (s : Finset ι) :
∏ i ∈ s, (f i + g i) = ∑ t ∈ s.powerset, (∏ i ∈ t, f i) * ∏ i ∈ s \ t, g i := by
classical
calc
∏ i ∈ s, (f i + g i) =
∏ i ∈ s, ∑ p ∈ ({True, False} : Finset Prop), if p then f i else g i := by simp
_ = ∑ p ∈ (s.pi fun _ => {True, False} : Finset (... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Ring/Finset.lean | {
"open": [
"Fintype"
],
"variables": [
"{ι ι' α β γ : Type*} {κ : ι → Type*} {s s₁ s₂ : Finset ι} {i : ι} {a : α} {f g : ι → α}",
"[AddCommMonoidWithOne α]",
"[NonUnitalNonAssocSemiring α]",
"[NonUnitalSemiring α]",
"[NonAssocSemiring α] [DecidableEq ι]",
"[CommSemiring α]",
"[Dec... | [
{
"line": "classical\n calc\n ∏ i ∈ s, (f i + g i) = ∏ i ∈ s, ∑ p ∈ ({ True, False } : Finset Prop), if p then f i else g i := by simp\n _ =\n ∑ p ∈ (s.pi fun _ => { True, False } : Finset (∀ a ∈ s, Prop)),\n ∏ a ∈ s.attach, if p a.1 a.2 then f a.1 else g a.1 :=\n (prod_sum _ _ _)\n _ = ∑ t ∈... |
lemma prod_sub_ordered [LinearOrder ι] (s : Finset ι) (f g : ι → α) :
∏ i ∈ s, (f i - g i) =
(∏ i ∈ s, f i) -
∑ i ∈ s, g i * (∏ j ∈ s with j < i, (f j - g j)) * ∏ j ∈ s with i < j, f j := by
simp only [sub_eq_add_neg]
convert prod_add_ordered s f fun i => -g i
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Ring/Finset.lean | {
"open": [
"Fintype"
],
"variables": [
"{ι ι' α β γ : Type*} {κ : ι → Type*} {s s₁ s₂ : Finset ι} {i : ι} {a : α} {f g : ι → α}",
"[AddCommMonoidWithOne α]",
"[NonUnitalNonAssocSemiring α]",
"[NonUnitalSemiring α]",
"[NonAssocSemiring α] [DecidableEq ι]",
"[CommSemiring α]",
"[Dec... | [
{
"line": "simp only [sub_eq_add_neg]",
"before_state": "ι : Type u_1\nα : Type u_3\ninst✝⁸ : AddCommMonoidWithOne α\ninst✝⁷ : NonUnitalNonAssocSemiring α\ninst✝⁶ : NonUnitalSemiring α\ninst✝⁵ : NonAssocSemiring α\ninst✝⁴ : DecidableEq ι\ninst✝³ : CommSemiring α\ninst✝² : DecidableEq ι\ninst✝¹ : CommRing α\... |
lemma sum_pow (f : ι → α) (n : ℕ) : (∑ a, f a) ^ n = ∑ p : Fin n → ι, ∏ i, f (p i) := by
simp [sum_pow']
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Ring/Finset.lean | {
"open": [
"Fintype",
"Finset"
],
"variables": [
"{ι ι' α β γ : Type*} {κ : ι → Type*} {s s₁ s₂ : Finset ι} {i : ι} {a : α} {f g : ι → α}",
"[AddCommMonoidWithOne α]",
"[NonUnitalNonAssocSemiring α]",
"[NonUnitalSemiring α]",
"[NonAssocSemiring α] [DecidableEq ι]",
"[CommSemiring ... | [
{
"line": "simp [sum_pow']",
"before_state": "ι : Type u_7\nα : Type u_9\ninst✝¹ : Fintype ι\ninst✝ : CommSemiring α\nf : ι → α\nn : ℕ\n⊢ (∑ a, f a) ^ n = ∑ p, ∏ i, f (p i)",
"after_state": "No Goals!"
}
] |
lemma prod_add (f g : ι → α) : ∏ a, (f a + g a) = ∑ t, (∏ a ∈ t, f a) * ∏ a ∈ tᶜ, g a := by
simpa [compl_eq_univ_sdiff] using Finset.prod_add f g univ
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Ring/Finset.lean | {
"open": [
"Fintype",
"Finset"
],
"variables": [
"{ι ι' α β γ : Type*} {κ : ι → Type*} {s s₁ s₂ : Finset ι} {i : ι} {a : α} {f g : ι → α}",
"[AddCommMonoidWithOne α]",
"[NonUnitalNonAssocSemiring α]",
"[NonUnitalSemiring α]",
"[NonAssocSemiring α] [DecidableEq ι]",
"[CommSemiring ... | [
{
"line": "simpa [compl_eq_univ_sdiff] using Finset.prod_add f g univ",
"before_state": "ι : Type u_7\nα : Type u_9\ninst✝² : Fintype ι\ninst✝¹ : CommSemiring α\ninst✝ : DecidableEq ι\nf g : ι → α\n⊢ ∏ a, (f a + g a) = ∑ t, (∏ a ∈ t, f a) * ∏ a ∈ tᶜ, g a",
"after_state": "No Goals!"
}
] |
theorem multiset_sum_right (a : α) (h : ∀ b ∈ s, Commute a b) : Commute a s.sum := by
induction s using Quotient.inductionOn
rw [quot_mk_to_coe]
rw [sum_coe]
exact Commute.list_sum_right _ _ h
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/BigOperators/Ring/Multiset.lean | {
"open": [
"Multiset"
],
"variables": [
"{ι α β : Type*}",
"[CommMonoid α] [HasDistribNeg α]",
"[CommMonoidWithZero α] {s : Multiset α}",
"[NoZeroDivisors α] [Nontrivial α] {s : Multiset α}",
"[NonUnitalNonAssocSemiring α] {a : α} {s : Multiset ι} {f : ι → α}",
"[NonUnitalSemiring α] ... | [
{
"line": "induction s using Quotient.inductionOn",
"before_state": "α : Type u_2\ninst✝⁸ : CommMonoid α\ninst✝⁷ : HasDistribNeg α\ninst✝⁶ : CommMonoidWithZero α\ninst✝⁵ : NoZeroDivisors α\ninst✝⁴ : Nontrivial α\ninst✝³ : NonUnitalNonAssocSemiring α\ninst✝² : NonUnitalSemiring α\ninst✝¹ : CommSemiring α\nin... |
lemma id_apply (A : AlgebraCat.{v} R) (a : A) :
(𝟙 A : A ⟶ A) a = a := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/AlgebraCat/Basic.lean | {
"open": [
"CategoryTheory Limits"
],
"variables": [
"(R : Type u) [CommRing R]",
"{R} in",
"{R} in",
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R : Type u\ninst✝ : CommRing R\nA : AlgebraCat R\na : ↑A\n⊢ (ConcreteCategory.hom (𝟙 A)) a = a",
"after_state": "No Goals!"
}
] |
lemma comp_apply {A B C : AlgebraCat.{v} R} (f : A ⟶ B) (g : B ⟶ C) (a : A) :
(f ≫ g) a = g (f a) := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/AlgebraCat/Basic.lean | {
"open": [
"CategoryTheory Limits"
],
"variables": [
"(R : Type u) [CommRing R]",
"{R} in",
"{R} in",
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R : Type u\ninst✝ : CommRing R\nA B C : AlgebraCat R\nf : A ⟶ B\ng : B ⟶ C\na : ↑A\n⊢ (ConcreteCategory.hom (f ≫ g)) a = (ConcreteCategory.hom g) ((ConcreteCategory.hom f) a)",
"after_state": "No Goals!"
}
] |
theorem isZero_of_subsingleton (G : Grp) [Subsingleton G] : IsZero G := by
refine ⟨fun X => ⟨⟨⟨1⟩, fun f => ?_⟩⟩, fun X => ⟨⟨⟨1⟩, fun f => ?_⟩⟩⟩
· ext x
have : x = 1 := Subsingleton.elim _ _
rw [this]
rw [map_one]
rw [map_one]
· ext
subsingleton
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Zero.lean | {
"open": [
"CategoryTheory",
"CategoryTheory.Limits"
],
"variables": []
} | [
{
"line": "refine ⟨fun X => ⟨⟨⟨1⟩, fun f => ?_⟩⟩, fun X => ⟨⟨⟨1⟩, fun f => ?_⟩⟩⟩",
"before_state": "G : Grp\ninst✝ : Subsingleton ↑G\n⊢ IsZero G",
"after_state": "case refine_1\nG : Grp\ninst✝ : Subsingleton ↑G\nX : Grp\nf : G ⟶ X\n⊢ f = default\n---\ncase refine_2\nG : Grp\ninst✝ : Subsingleton ↑G\nX :... |
theorem isZero_of_subsingleton (G : CommGrp) [Subsingleton G] : IsZero G := by
refine ⟨fun X => ⟨⟨⟨1⟩, fun f => ?_⟩⟩, fun X => ⟨⟨⟨1⟩, fun f => ?_⟩⟩⟩
· ext x
have : x = 1 := Subsingleton.elim _ _
rw [this]
rw [map_one]
rw [map_one]
· ext
subsingleton
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Zero.lean | {
"open": [
"CategoryTheory",
"CategoryTheory.Limits"
],
"variables": []
} | [
{
"line": "refine ⟨fun X => ⟨⟨⟨1⟩, fun f => ?_⟩⟩, fun X => ⟨⟨⟨1⟩, fun f => ?_⟩⟩⟩",
"before_state": "G : CommGrp\ninst✝ : Subsingleton ↑G\n⊢ IsZero G",
"after_state": "case refine_1\nG : CommGrp\ninst✝ : Subsingleton ↑G\nX : CommGrp\nf : G ⟶ X\n⊢ f = default\n---\ncase refine_2\nG : CommGrp\ninst✝ : Subs... |
lemma id_apply (X : Grp) (x : X) :
(𝟙 X : X ⟶ X) x = x := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "X : Grp\nx : ↑X\n⊢ (ConcreteCategory.hom (𝟙 X)) x = x",
"after_state": "No Goals!"
}
] |
lemma comp_apply {X Y T : Grp} (f : X ⟶ Y) (g : Y ⟶ T) (x : X) :
(f ≫ g) x = g (f x) := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "X Y T : Grp\nf : X ⟶ Y\ng : Y ⟶ T\nx : ↑X\n⊢ (ConcreteCategory.hom (f ≫ g)) x = (ConcreteCategory.hom g) ((ConcreteCategory.hom f) x)",
"after_state": "No Goals!"
}
] |
lemma inv_hom_apply {X Y : Grp} (e : X ≅ Y) (x : X) : e.inv (e.hom x) = x := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "X Y : Grp\ne : X ≅ Y\nx : ↑X\n⊢ (ConcreteCategory.hom e.inv) ((ConcreteCategory.hom e.hom) x) = x",
"after_state": "No Goals!"
}
] |
lemma hom_inv_apply {X Y : Grp} (e : X ≅ Y) (s : Y) : e.hom (e.inv s) = s := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "X Y : Grp\ne : X ≅ Y\ns : ↑Y\n⊢ (ConcreteCategory.hom e.hom) ((ConcreteCategory.hom e.inv) s) = s",
"after_state": "No Goals!"
}
] |
example {R S : Grp} (i : R ⟶ S) (r : R) (h : r = 1) : i r = 1 := by simp [h]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp [h]",
"before_state": "R✝ : ?m.5\nR S : Grp\ni : R ⟶ S\nr : ↑R\nh : r = 1\n⊢ (ConcreteCategory.hom i) r = 1",
"after_state": "No Goals!"
}
] |
lemma id_apply (X : CommGrp) (x : X) :
(𝟙 X : X ⟶ X) x = x := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "X : CommGrp\nx : ↑X\n⊢ (ConcreteCategory.hom (𝟙 X)) x = x",
"after_state": "No Goals!"
}
] |
lemma comp_apply {X Y T : CommGrp} (f : X ⟶ Y) (g : Y ⟶ T) (x : X) :
(f ≫ g) x = g (f x) := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "X Y T : CommGrp\nf : X ⟶ Y\ng : Y ⟶ T\nx : ↑X\n⊢ (ConcreteCategory.hom (f ≫ g)) x = (ConcreteCategory.hom g) ((ConcreteCategory.hom f) x)",
"after_state": "No Goals!"
}
] |
lemma inv_hom_apply {X Y : CommGrp} (e : X ≅ Y) (x : X) : e.inv (e.hom x) = x := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "X Y : CommGrp\ne : X ≅ Y\nx : ↑X\n⊢ (ConcreteCategory.hom e.inv) ((ConcreteCategory.hom e.hom) x) = x",
"after_state": "No Goals!"
}
] |
lemma hom_inv_apply {X Y : CommGrp} (e : X ≅ Y) (s : Y) : e.hom (e.inv s) = s := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "X Y : CommGrp\ne : X ≅ Y\ns : ↑Y\n⊢ (ConcreteCategory.hom e.hom) ((ConcreteCategory.hom e.inv) s) = s",
"after_state": "No Goals!"
}
] |
example {R S : CommGrp} (i : R ⟶ S) (r : R) (h : r = 1) : i r = 1 := by simp [h]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp [h]",
"before_state": "R✝ : ?m.5\nR S : CommGrp\ni : R ⟶ S\nr : ↑R\nh : r = 1\n⊢ (ConcreteCategory.hom i) r = 1",
"after_state": "No Goals!"
}
] |
theorem μ_forget_apply {G H : Grp.{u}} (p : G) (q : H) :
Functor.LaxMonoidal.μ (forget Grp.{u}) G H (p, q) = (p, q) := by
apply Prod.ext
· exact congrFun (Functor.Monoidal.μ_fst (forget Grp.{u}) G H) (p, q)
· exact congrFun (Functor.Monoidal.μ_snd (forget Grp.{u}) G H) (p, q)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/ChosenFiniteProducts.lean | {
"open": [
"CategoryTheory Limits MonoidalCategory"
],
"variables": []
} | [
{
"line": "apply Prod.ext",
"before_state": "G H : Grp\np : ↑G\nq : ↑H\n⊢ Functor.LaxMonoidal.μ (forget Grp) G H (p, q) = (p, q)",
"after_state": "case fst\nG H : Grp\np : ↑G\nq : ↑H\n⊢ (Functor.LaxMonoidal.μ (forget Grp) G H (p, q)).1 = (p, q).1\n---\ncase snd\nG H : Grp\np : ↑G\nq : ↑H\n⊢ (Functor.Lax... |
theorem μ_forget_apply {G H : AddGrp.{u}} (p : G) (q : H) :
Functor.LaxMonoidal.μ (forget AddGrp.{u}) G H (p, q) = (p, q) := by
apply Prod.ext
· exact congrFun (Functor.Monoidal.μ_fst (forget AddGrp.{u}) G H) (p, q)
· exact congrFun (Functor.Monoidal.μ_snd (forget AddGrp.{u}) G H) (p, q)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/ChosenFiniteProducts.lean | {
"open": [
"CategoryTheory Limits MonoidalCategory"
],
"variables": []
} | [
{
"line": "apply Prod.ext",
"before_state": "G H : AddGrp\np : ↑G\nq : ↑H\n⊢ Functor.LaxMonoidal.μ (forget AddGrp) G H (p, q) = (p, q)",
"after_state": "case fst\nG H : AddGrp\np : ↑G\nq : ↑H\n⊢ (Functor.LaxMonoidal.μ (forget AddGrp) G H (p, q)).1 = (p, q).1\n---\ncase snd\nG H : AddGrp\np : ↑G\nq : ↑H\... |
theorem μ_forget_apply {G H : CommGrp.{u}} (p : G) (q : H) :
Functor.LaxMonoidal.μ (forget CommGrp.{u}) G H (p, q) = (p, q) := by
apply Prod.ext
· exact congrFun (Functor.Monoidal.μ_fst (forget CommGrp.{u}) G H) (p, q)
· exact congrFun (Functor.Monoidal.μ_snd (forget CommGrp.{u}) G H) (p, q)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/ChosenFiniteProducts.lean | {
"open": [
"CategoryTheory Limits MonoidalCategory"
],
"variables": []
} | [
{
"line": "apply Prod.ext",
"before_state": "G H : CommGrp\np : ↑G\nq : ↑H\n⊢ Functor.LaxMonoidal.μ (forget CommGrp) G H (p, q) = (p, q)",
"after_state": "case fst\nG H : CommGrp\np : ↑G\nq : ↑H\n⊢ (Functor.LaxMonoidal.μ (forget CommGrp) G H (p, q)).1 = (p, q).1\n---\ncase snd\nG H : CommGrp\np : ↑G\nq ... |
theorem g_ne_h (x : B) (hx : x ∉ f.hom.range) : g ≠ h := by
intro r
apply fromCoset_ne_of_nin_range _ hx
replace r :=
DFunLike.congr_fun (DFunLike.congr_fun r x) (fromCoset ⟨f.hom.range, ⟨1, one_leftCoset _⟩⟩)
simpa [g_apply_fromCoset, «h», tau, g_apply_infinity] using r
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/EpiMono.lean | {
"open": [
"scoped Pointwise",
"QuotientGroup",
"CategoryTheory",
"XWithInfinity Equiv.Perm"
],
"variables": [
"{A : Type u} {B : Type v}",
"[Group A] [Group B]",
"[CommGroup A] [CommGroup B]",
"{A B : Grp.{u}} (f : A ⟶ B)"
]
} | [
{
"line": "intro r",
"before_state": "A B : Grp\nf : A ⟶ B\nα✝ : Sort u_1\ng h : α✝\nx : ↑B\nhx : x ∉ (Grp.Hom.hom f).range\n⊢ g ≠ h",
"after_state": "A B : Grp\nf : A ⟶ B\nα✝ : Sort u_1\ng h : α✝\nx : ↑B\nhx : x ∉ (Grp.Hom.hom f).range\nr : g = h\n⊢ False"
},
{
"line": "apply fromCoset_ne_of_ni... |
theorem surjective_of_epi [Epi f] : Function.Surjective f := by
by_contra r
dsimp [Function.Surjective] at r
push_neg at r
rcases r with ⟨b, hb⟩
exact
SurjectiveOfEpiAuxs.g_ne_h f b (fun ⟨c, hc⟩ => hb _ hc)
(congr_arg Grp.Hom.hom ((cancel_epi f).1 (SurjectiveOfEpiAuxs.comp_eq f)))
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/EpiMono.lean | {
"open": [
"scoped Pointwise",
"QuotientGroup",
"CategoryTheory",
"XWithInfinity Equiv.Perm"
],
"variables": [
"{A : Type u} {B : Type v}",
"[Group A] [Group B]",
"[CommGroup A] [CommGroup B]",
"{A B : Grp.{u}} (f : A ⟶ B)"
]
} | [
{
"line": "by_contra r",
"before_state": "A B : Grp\nf : A ⟶ B\ninst✝ : Epi f\n⊢ Function.Surjective ⇑(ConcreteCategory.hom f)",
"after_state": "A B : Grp\nf : A ⟶ B\ninst✝ : Epi f\nr : ¬Function.Surjective ⇑(ConcreteCategory.hom f)\n⊢ False"
},
{
"line": "first\n| guard_target = Not✝ _; intro r... |
theorem epi_iff_surjective : Epi f ↔ Function.Surjective f := by
have i1 : Epi f ↔ Epi (groupAddGroupEquivalence.inverse.map f) := by
refine ⟨?_, groupAddGroupEquivalence.inverse.epi_of_epi_map⟩
intro e'
apply groupAddGroupEquivalence.inverse.map_epi
rwa [Grp.epi_iff_surjective] at i1
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/EpiMono.lean | {
"open": [
"scoped Pointwise",
"QuotientGroup",
"CategoryTheory",
"XWithInfinity Equiv.Perm"
],
"variables": [
"{A : Type u} {B : Type v}",
"[Group A] [Group B]",
"[CommGroup A] [CommGroup B]",
"{A B : Grp.{u}} (f : A ⟶ B)",
"{A B : AddGrp.{u}} (f : A ⟶ B)"
]
} | [
{
"line": "have i1 : Epi f ↔ Epi (groupAddGroupEquivalence.inverse.map f) :=\n by\n refine ⟨?_, groupAddGroupEquivalence.inverse.epi_of_epi_map⟩\n intro e'\n apply groupAddGroupEquivalence.inverse.map_epi",
"before_state": "A B : AddGrp\nf : A ⟶ B\n⊢ Epi f ↔ Function.Surjective ⇑(ConcreteCategory.hom f)... |
lemma hasLimit_iff_small_sections :
HasLimit F ↔ Small.{u} (F ⋙ forget Grp).sections := by
constructor
· apply Concrete.small_sections_of_hasLimit
· intro
infer_instance
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Limits.lean | {
"open": [
"CategoryTheory CategoryTheory.Limits"
],
"variables": [
"{J : Type v} [Category.{w} J]",
"(F : J ⥤ Grp.{u})",
"[Small.{u} (Functor.sections (F ⋙ forget Grp))]"
]
} | [
{
"line": "constructor",
"before_state": "J : Type v\ninst✝¹ : Category.{w, v} J\nF : J ⥤ Grp\ninst✝ : Small.{u, max u v} ↑(F ⋙ forget Grp).sections\n⊢ HasLimit F ↔ Small.{u, max u v} ↑(F ⋙ forget Grp).sections",
"after_state": "case mp\nJ : Type v\ninst✝¹ : Category.{w, v} J\nF : J ⥤ Grp\ninst✝ : Small... |
lemma hasLimit_iff_small_sections :
HasLimit F ↔ Small.{u} (F ⋙ forget CommGrp).sections := by
constructor
· apply Concrete.small_sections_of_hasLimit
· intro
infer_instance
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Limits.lean | {
"open": [
"CategoryTheory CategoryTheory.Limits"
],
"variables": [
"{J : Type v} [Category.{w} J]",
"(F : J ⥤ Grp.{u})",
"[Small.{u} (Functor.sections (F ⋙ forget Grp))]",
"(F : J ⥤ CommGrp.{u})",
"[Small.{u} (Functor.sections (F ⋙ forget CommGrp))]"
]
} | [
{
"line": "constructor",
"before_state": "J : Type v\ninst✝¹ : Category.{w, v} J\nF : J ⥤ CommGrp\ninst✝ : Small.{u, max u v} ↑(F ⋙ forget CommGrp).sections\n⊢ HasLimit F ↔ Small.{u, max u v} ↑(F ⋙ forget CommGrp).sections",
"after_state": "case mp\nJ : Type v\ninst✝¹ : Category.{w, v} J\nF : J ⥤ CommGr... |
example (f : ℕ → AddCommGrp) : HasProduct f := by infer_instance
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Grp/Limits.lean | {
"open": [
"CategoryTheory CategoryTheory.Limits"
],
"variables": [
"{J : Type v} [Category.{w} J]",
"(F : J ⥤ Grp.{u})",
"[Small.{u} (Functor.sections (F ⋙ forget Grp))]",
"(F : J ⥤ CommGrp.{u})",
"[Small.{u} (Functor.sections (F ⋙ forget CommGrp))]"
]
} | [
{
"line": "infer_instance",
"before_state": "J : Type v\ninst✝² : Category.{w, v} J\nF✝ : J ⥤ Grp\ninst✝¹ : Small.{u, max u v} ↑(F✝ ⋙ forget Grp).sections\nF : J ⥤ CommGrp\ninst✝ : Small.{u, max u v} ↑(F ⋙ forget CommGrp).sections\nf : ℕ → AddCommGrp\n⊢ HasProduct f",
"after_state": "No Goals!"
},
{... |
example (R : Type u) [Ring R] : HasCoequalizers (ModuleCat.{u} R) := by
infer_instance
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Colimits.lean | {
"open": [
"CategoryTheory Category Limits"
],
"variables": [
"{R : Type w} [Ring R]",
"{J : Type u} [Category.{v} J] (F : J ⥤ ModuleCat.{w'} R)",
"[HasColimit (F ⋙ forget₂ _ AddCommGrp)]",
"(J R)"
]
} | [
{
"line": "infer_instance",
"before_state": "R✝ : Type w\ninst✝³ : Ring R✝\nJ : Type u\ninst✝² : Category.{v, u} J\nF : J ⥤ ModuleCat R✝\ninst✝¹ : HasColimit (F ⋙ forget₂ (ModuleCat R✝) AddCommGrp)\nR : Type u\ninst✝ : Ring R\n⊢ HasCoequalizers (ModuleCat R)",
"after_state": "No Goals!"
},
{
"li... |
theorem mono_iff_ker_eq_bot : Mono f ↔ LinearMap.ker f.hom = ⊥ :=
⟨fun _ => ker_eq_bot_of_mono _, fun hf =>
ConcreteCategory.mono_of_injective _ <| by convert LinearMap.ker_eq_bot.1 hf⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/EpiMono.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R : Type u} [Ring R] {X Y : ModuleCat.{v} R} (f : X ⟶ Y)",
"{M : Type v} [AddCommGroup M] [Module R M]"
]
} | [
{
"line": "convert LinearMap.ker_eq_bot.1 hf",
"before_state": "R : Type u\ninst✝ : Ring R\nX Y : ModuleCat R\nf : X ⟶ Y\nhf : LinearMap.ker (ModuleCat.Hom.hom f) = ⊥\n⊢ Function.Injective ⇑(ConcreteCategory.hom f)",
"after_state": "No Goals!"
}
] |
theorem epi_iff_range_eq_top : Epi f ↔ LinearMap.range f.hom = ⊤ :=
⟨fun _ => range_eq_top_of_epi _, fun hf =>
ConcreteCategory.epi_of_surjective _ <| by convert LinearMap.range_eq_top.1 hf⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/EpiMono.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R : Type u} [Ring R] {X Y : ModuleCat.{v} R} (f : X ⟶ Y)",
"{M : Type v} [AddCommGroup M] [Module R M]"
]
} | [
{
"line": "convert LinearMap.range_eq_top.1 hf",
"before_state": "R : Type u\ninst✝ : Ring R\nX Y : ModuleCat R\nf : X ⟶ Y\nhf : LinearMap.range (ModuleCat.Hom.hom f) = ⊤\n⊢ Function.Surjective ⇑(ConcreteCategory.hom f)",
"after_state": "No Goals!"
}
] |
theorem injective_module_of_injective_object
[inj : CategoryTheory.Injective <| ModuleCat.of R M] :
Module.Injective R M where
out X Y _ _ _ _ f hf g := by
have : CategoryTheory.Mono (ModuleCat.ofHom f) := (ModuleCat.mono_iff_injective _).mpr hf
obtain ⟨l, h⟩ := inj.factors (ModuleCat.ofHom g) (Module... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Injective.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"(R : Type u) (M : Type v) [Ring R] [AddCommGroup M] [Module R M]"
]
} | [
{
"line": "have : CategoryTheory.Mono (ModuleCat.ofHom f) := (ModuleCat.mono_iff_injective _).mpr hf",
"before_state": "R : Type u\nM : Type v\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\ninj : Injective (ModuleCat.of R M)\nX Y : Type v\nx✝³ : AddCommGroup X\nx✝² : AddCommGroup Y\nx✝¹ : Mo... |
theorem cokernel_π_ext {M N : ModuleCat.{u} R} (f : M ⟶ N) {x y : N} (m : M) (w : x = y + f m) :
cokernel.π f x = cokernel.π f y := by
subst w
simpa only [map_add,add_eq_left] using cokernel.condition_apply f m
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Kernels.lean | {
"open": [
"CategoryTheory CategoryTheory.Limits",
"ModuleCat"
],
"variables": [
"{R : Type u} [Ring R]",
"{M N : ModuleCat.{v} R} (f : M ⟶ N)",
"{G H : ModuleCat.{v} R} (f : G ⟶ H)"
]
} | [
{
"line": "subst w",
"before_state": "R : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\nx y : ↑N\nm : ↑M\nw : x = y + (ConcreteCategory.hom f) m\n⊢ (ConcreteCategory.hom (cokernel.π f)) x = (ConcreteCategory.hom (cokernel.π f)) y",
"after_state": "R : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf... |
theorem cokernel_π_imageSubobject_ext {L M N : ModuleCat.{v} R} (f : L ⟶ M) [HasImage f]
(g : (imageSubobject f : ModuleCat.{v} R) ⟶ N) [HasCokernel g] {x y : N} (l : L)
(w : x = y + g (factorThruImageSubobject f l)) : cokernel.π g x = cokernel.π g y := by
subst w
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Subobject.lean | {
"open": [
"CategoryTheory",
"CategoryTheory.Subobject",
"CategoryTheory.Limits",
"ModuleCat"
],
"variables": [
"{R : Type u} [Ring R] (M : ModuleCat.{v} R)"
]
} | [
{
"line": "subst w",
"before_state": "R : Type u\ninst✝² : Ring R\nL M N : ModuleCat R\nf : L ⟶ M\ninst✝¹ : HasImage f\ng : underlying.obj (imageSubobject f) ⟶ N\ninst✝ : HasCokernel g\nx y : ↑N\nl : ↑L\nw : x = y + (ConcreteCategory.hom g) ((ConcreteCategory.hom (factorThruImageSubobject f)) l)\n⊢ (Concret... |
theorem single_comp_single {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) (r s : R) :
(single f r ≫ single g s : Free.of R X ⟶ Free.of R Z) = single (f ≫ g) (r * s) := by
dsimp [CategoryTheory.categoryFree]; simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean | {
"open": [
"CategoryTheory",
"MonoidalCategory",
"FreeMonoidal in",
"Functor.LaxMonoidal Functor.OplaxMonoidal",
"Finsupp"
],
"variables": [
"(R : Type u)",
"[Ring R]",
"{R}",
"(R)",
"[CommRing R]",
"(R : Type*) [CommRing R] (C : Type u) [Category.{v} C]"
]
} | [
{
"line": "dsimp [CategoryTheory.categoryFree]",
"before_state": "R : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nr s : R\n⊢ ((fun₀ | f => r) ≫ fun₀ | g => s) = fun₀ | f ≫ g => r * s",
"after_state": "R : Type u_1\ninst✝¹ : CommRing R\nC : Type ... |
lemma id_apply (M : ModuleCat.{v} R) (x : M) :
(𝟙 M : M ⟶ M) x = x := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Basic.lean | {
"open": [
"CategoryTheory",
"CategoryTheory.Limits",
"CategoryTheory.Limits.WalkingParallelPair"
],
"variables": [
"(R : Type u) [Ring R]",
"{R} in",
"{R}"
]
} | [
{
"line": "simp",
"before_state": "R : Type u\ninst✝ : Ring R\nM : ModuleCat R\nx : ↑M\n⊢ (ConcreteCategory.hom (𝟙 M)) x = x",
"after_state": "No Goals!"
}
] |
lemma comp_apply {M N O : ModuleCat.{v} R} (f : M ⟶ N) (g : N ⟶ O) (x : M) :
(f ≫ g) x = g (f x) := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Basic.lean | {
"open": [
"CategoryTheory",
"CategoryTheory.Limits",
"CategoryTheory.Limits.WalkingParallelPair"
],
"variables": [
"(R : Type u) [Ring R]",
"{R} in",
"{R}"
]
} | [
{
"line": "simp",
"before_state": "R : Type u\ninst✝ : Ring R\nM N O : ModuleCat R\nf : M ⟶ N\ng : N ⟶ O\nx : ↑M\n⊢ (ConcreteCategory.hom (f ≫ g)) x = (ConcreteCategory.hom g) ((ConcreteCategory.hom f) x)",
"after_state": "No Goals!"
}
] |
lemma inv_hom_apply {M N : ModuleCat.{v} R} (e : M ≅ N) (x : M) : e.inv (e.hom x) = x := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Basic.lean | {
"open": [
"CategoryTheory",
"CategoryTheory.Limits",
"CategoryTheory.Limits.WalkingParallelPair"
],
"variables": [
"(R : Type u) [Ring R]",
"{R} in",
"{R}"
]
} | [
{
"line": "simp",
"before_state": "R : Type u\ninst✝ : Ring R\nM N : ModuleCat R\ne : M ≅ N\nx : ↑M\n⊢ (ConcreteCategory.hom e.inv) ((ConcreteCategory.hom e.hom) x) = x",
"after_state": "No Goals!"
}
] |
lemma hom_inv_apply {M N : ModuleCat.{v} R} (e : M ≅ N) (x : N) : e.hom (e.inv x) = x := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Basic.lean | {
"open": [
"CategoryTheory",
"CategoryTheory.Limits",
"CategoryTheory.Limits.WalkingParallelPair"
],
"variables": [
"(R : Type u) [Ring R]",
"{R} in",
"{R}"
]
} | [
{
"line": "simp",
"before_state": "R : Type u\ninst✝ : Ring R\nM N : ModuleCat R\ne : M ≅ N\nx : ↑N\n⊢ (ConcreteCategory.hom e.hom) ((ConcreteCategory.hom e.inv) x) = x",
"after_state": "No Goals!"
}
] |
lemma smul_naturality {M N : ModuleCat.{v} R} (f : M ⟶ N) (r : R) :
(forget₂ (ModuleCat R) AddCommGrp).map f ≫ N.smul r =
M.smul r ≫ (forget₂ (ModuleCat R) AddCommGrp).map f := by
ext x
exact (f.hom.map_smul r x).symm
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Basic.lean | {
"open": [
"CategoryTheory",
"CategoryTheory.Limits",
"CategoryTheory.Limits.WalkingParallelPair",
"ModuleCat"
],
"variables": [
"(R : Type u) [Ring R]",
"{R} in",
"{R}",
"{R}",
"{R}",
"{X₁ X₂ : Type v}",
"{M N : ModuleCat.{v} R}",
"{M N : ModuleCat.{v} R} {S : Typ... | [
{
"line": "ext x",
"before_state": "R : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\nr : R\n⊢ (forget₂ (ModuleCat R) AddCommGrp).map f ≫ N.smul r = M.smul r ≫ (forget₂ (ModuleCat R) AddCommGrp).map f",
"after_state": "case hf.h\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\nr : R\nx... |
theorem linearIndependent_shortExact {w : ι' → S.X₃} (hw : LinearIndependent R w) :
LinearIndependent R (Sum.elim (S.f ∘ v) (S.g.hom.toFun.invFun ∘ w)) := by
apply linearIndependent_leftExact hS'.exact hv _ hS'.mono_f rfl
dsimp
convert hw
ext
apply Function.rightInverse_invFun ((epi_iff_surjective _).mp h... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Free.lean | {
"open": [
"CategoryTheory Module",
"CategoryTheory Submodule Set"
],
"variables": [
"{ι ι' R : Type*} [Ring R] {S : ShortComplex (ModuleCat R)}",
"(hv : LinearIndependent R v) {u : ι ⊕ ι' → S.X₂}"
]
} | [
{
"line": "apply linearIndependent_leftExact hS'.exact hv _ hS'.mono_f rfl",
"before_state": "ι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nS : ShortComplex (ModuleCat R)\nα✝ : Type u_4\nv : α✝ → ↑S.X₁\nw : ι' → ↑S.X₃\nhw : LinearIndependent R w\n⊢ LinearIndependent R (Sum.elim (⇑(ConcreteCategory.hom S.f) ∘... |
theorem span_exact {β : Type*} {u : ι ⊕ β → S.X₂} (huv : u ∘ Sum.inl = S.f ∘ v)
(hv : ⊤ ≤ span R (range v))
(hw : ⊤ ≤ span R (range (S.g ∘ u ∘ Sum.inr))) :
⊤ ≤ span R (range u) := by
intro m _
have hgm : S.g m ∈ span R (range (S.g ∘ u ∘ Sum.inr)) := hw mem_top
rw [Finsupp.mem_span_range_iff_exists_fin... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Free.lean | {
"open": [
"CategoryTheory Module",
"CategoryTheory Submodule Set"
],
"variables": [
"{ι ι' R : Type*} [Ring R] {S : ShortComplex (ModuleCat R)}",
"(hv : LinearIndependent R v) {u : ι ⊕ ι' → S.X₂}"
]
} | [
{
"line": "intro m _",
"before_state": "ι : Type u_1\nR : Type u_3\ninst✝ : Ring R\nS : ShortComplex (ModuleCat R)\nv : ι → ↑S.X₁\nβ : Type u_4\nu : ι ⊕ β → ↑S.X₂\nhuv : u ∘ Sum.inl = ⇑(ConcreteCategory.hom S.f) ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (⇑(ConcreteCategory.hom S.g) ∘ u ∘ Sum.in... |
theorem span_rightExact {w : ι' → S.X₃} (hv : ⊤ ≤ span R (range v))
(hw : ⊤ ≤ span R (range w)) (hE : Epi S.g) :
⊤ ≤ span R (range (Sum.elim (S.f ∘ v) (S.g.hom.toFun.invFun ∘ w))) := by
refine span_exact hS ?_ hv ?_
· simp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, Sum.elim_comp_inl]
· convert hw
... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Free.lean | {
"open": [
"CategoryTheory Module",
"CategoryTheory Submodule Set"
],
"variables": [
"{ι ι' R : Type*} [Ring R] {S : ShortComplex (ModuleCat R)}",
"(hv : LinearIndependent R v) {u : ι ⊕ ι' → S.X₂}"
]
} | [
{
"line": "refine span_exact hS ?_ hv ?_",
"before_state": "ι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nS : ShortComplex (ModuleCat R)\nι✝ : Type u_4\nv : ι✝ → ↑S.X₁\nw : ι' → ↑S.X₃\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range w)\nhE : Epi S.g\n⊢ ⊤ ≤ span R (range (Sum.elim (⇑(ConcreteCategory.hom S.... |
lemma hasLimitsOfShape [Small.{w} J] : HasLimitsOfShape J (ModuleCat.{w} R) where
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Limits.lean | {
"open": [
"CategoryTheory",
"CategoryTheory.Limits",
"HasLimits"
],
"variables": [
"{R : Type u} [Ring R]",
"{J : Type v} [Category.{t} J] (F : J ⥤ ModuleCat.{w} R)",
"[Small.{w} (Functor.sections (F ⋙ forget (ModuleCat R)))]"
]
} | [
{
"line": "infer_instance",
"before_state": "R : Type u\ninst✝² : Ring R\nJ : Type v\ninst✝¹ : Category.{t, v} J\ninst✝ : Small.{w, v} J\n⊢ ∀ (F : J ⥤ ModuleCat R), HasLimit F",
"after_state": "No Goals!"
},
{
"line": "exact inferInstance✝",
"before_state": "R : Type u\ninst✝² : Ring R\nJ : ... |
lemma comp_app {M₁ M₂ M₃ : PresheafOfModules R} (f : M₁ ⟶ M₂) (g : M₂ ⟶ M₃) (X : Cᵒᵖ) :
(f ≫ g).app X = f.app X ≫ g.app X := by
rfl
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Presheaf.lean | {
"open": [
"CategoryTheory LinearMap Opposite"
],
"variables": [
"{C : Type u₁} [Category.{v₁} C] {R : Cᵒᵖ ⥤ RingCat.{u}}",
"(R) in",
"(M M₁ M₂ : PresheafOfModules.{v} R)",
"{M₁ M₂}"
]
} | [
{
"line": "rfl",
"before_state": "C : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR : Cᵒᵖ ⥤ RingCat\nM₁ M₂ M₃ : PresheafOfModules R\nf : M₁ ⟶ M₂\ng : M₂ ⟶ M₃\nX : Cᵒᵖ\n⊢ (f ≫ g).app X = f.app X ≫ g.app X",
"after_state": "No Goals!"
},
{
"line": "eq_refl",
"before_state": "C : Type u₁\ninst✝ : Cat... |
lemma sections_ext {M : PresheafOfModules.{v} R} (s t : M.sections)
(h : ∀ (X : Cᵒᵖ), s.val X = t.val X) : s = t :=
Subtype.ext (by ext; apply h)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Presheaf.lean | {
"open": [
"CategoryTheory LinearMap Opposite"
],
"variables": [
"{C : Type u₁} [Category.{v₁} C] {R : Cᵒᵖ ⥤ RingCat.{u}}",
"(R) in",
"(M M₁ M₂ : PresheafOfModules.{v} R)",
"{M₁ M₂}",
"(R) in",
"(M : Cᵒᵖ ⥤ Ab.{v}) [∀ X, Module (R.obj X) (M.obj X)]",
"(M₁ M₂) in",
"(R)",
"{... | [
{
"line": "ext",
"before_state": "C : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR : Cᵒᵖ ⥤ RingCat\nM : PresheafOfModules R\ns t : M.sections\nh : ∀ (X : Cᵒᵖ), ↑s X = ↑t X\n⊢ ↑s = ↑t",
"after_state": "case h\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR : Cᵒᵖ ⥤ RingCat\nM : PresheafOfModules R\ns t : M.sectio... |
theorem projective_of_free {ι : Type w} (b : Basis ι R M) : Projective M := by
letI : Module.Projective R (ModuleCat.of R M) := Module.Projective.of_basis b
refine ⟨fun E X epi => ?_⟩
obtain ⟨f, h⟩ := Module.projective_lifting_property X.hom E.hom
((ModuleCat.epi_iff_surjective _).mp epi)
exact ⟨ofHom f, ho... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Projective.lean | {
"open": [
"CategoryTheory LinearMap ModuleCat"
],
"variables": [
"{R : Type u} [Ring R] {M : ModuleCat.{v} R}"
]
} | [
{
"line": "letI : Module.Projective R (ModuleCat.of R M) := Module.Projective.of_basis b",
"before_state": "R : Type u\ninst✝ : Ring R\nM : ModuleCat R\nι : Type w\nb : Basis ι R ↑M\n⊢ Projective M",
"after_state": "R : Type u\ninst✝ : Ring R\nM : ModuleCat R\nι : Type w\nb : Basis ι R ↑M\nthis : Module... |
lemma d_add (b b' : B) : D.d (b + b') = D.d b + D.d b' := by simp [d]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Differentials/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{A B : CommRingCat.{u}} (M : ModuleCat.{v} B) (f : A ⟶ B)",
"{M f}",
"(D : M.Derivation f)"
]
} | [
{
"line": "simp [d]",
"before_state": "A B : CommRingCat\nM : ModuleCat ↑B\nf : A ⟶ B\nD : M.Derivation f\nb b' : ↑B\n⊢ D.d (b + b') = D.d b + D.d b'",
"after_state": "No Goals!"
}
] |
lemma d_mul (b b' : B) : D.d (b * b') = b • D.d b' + b' • D.d b := by simp [d]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Differentials/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{A B : CommRingCat.{u}} (M : ModuleCat.{v} B) (f : A ⟶ B)",
"{M f}",
"(D : M.Derivation f)"
]
} | [
{
"line": "simp [d]",
"before_state": "A B : CommRingCat\nM : ModuleCat ↑B\nf : A ⟶ B\nD : M.Derivation f\nb b' : ↑B\n⊢ D.d (b * b') = b • D.d b' + b' • D.d b",
"after_state": "No Goals!"
}
] |
lemma tensor_ext₃ {f g : M₁ ⊗ (M₂ ⊗ M₃) ⟶ M₄}
(h : ∀ m₁ m₂ m₃, f (m₁ ⊗ₜ (m₂ ⊗ₜ m₃)) = g (m₁ ⊗ₜ (m₂ ⊗ₜ m₃))) :
f = g := by
rw [← cancel_epi (α_ _ _ _).hom]
exact tensor_ext₃' h
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean | {
"open": [
"CategoryTheory",
"TensorProduct",
"MonoidalCategory"
],
"variables": [
"{R : Type u} [CommRing R]",
"{M₁ M₂ M₃ M₄ : ModuleCat.{u} R}",
"(f : M₁ → M₂ → M₃) (h₁ : ∀ m₁ m₂ n, f (m₁ + m₂) n = f m₁ n + f m₂ n)"
]
} | [
{
"line": "rw [← cancel_epi (α_ _ _ _).hom]",
"before_state": "R : Type u\ninst✝ : CommRing R\nM₁ M₂ M₃ M₄ : ModuleCat R\nf g : M₁ ⊗ M₂ ⊗ M₃ ⟶ M₄\nh :\n ∀ (m₁ : ↑M₁) (m₂ : ↑M₂) (m₃ : ↑M₃),\n (ConcreteCategory.hom f) (m₁ ⊗ₜ[R] m₂ ⊗ₜ[R] m₃) = (ConcreteCategory.hom g) (m₁ ⊗ₜ[R] m₂ ⊗ₜ[R] m₃)\n⊢ f = g",
... |
theorem braiding_naturality {X₁ X₂ Y₁ Y₂ : ModuleCat.{u} R} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂) :
(f ⊗ g) ≫ (Y₁.braiding Y₂).hom = (X₁.braiding X₂).hom ≫ (g ⊗ f) := by
ext : 1
apply TensorProduct.ext'
intro x y
rfl
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Monoidal/Symmetric.lean | {
"open": [
"CategoryTheory MonoidalCategory"
],
"variables": [
"{R : Type u} [CommRing R]"
]
} | [
{
"line": "ext : 1",
"before_state": "R : Type u\ninst✝ : CommRing R\nX₁ X₂ Y₁ Y₂ : ModuleCat R\nf : X₁ ⟶ Y₁\ng : X₂ ⟶ Y₂\n⊢ (f ⊗ g) ≫ (Y₁.braiding Y₂).hom = (X₁.braiding X₂).hom ≫ (g ⊗ f)",
"after_state": "case hf\nR : Type u\ninst✝ : CommRing R\nX₁ X₂ Y₁ Y₂ : ModuleCat R\nf : X₁ ⟶ Y₁\ng : X₂ ⟶ Y₂\n⊢ M... |
lemma fromFreeYoneda_app_apply (m : M.Elements) :
m.fromFreeYoneda.app m.1 (ModuleCat.freeMk (𝟙 _)) = m.2 := by
apply freeYonedaEquiv_symm_app
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Presheaf/Generator.lean | {
"open": [
"CategoryTheory Limits"
],
"variables": [
"{C : Type u} [Category.{v} C] {R : Cᵒᵖ ⥤ RingCat.{v}}",
"(R) in",
"(R)",
"{C : Type u} [Category.{v} C] {R : Cᵒᵖ ⥤ RingCat.{v}} {M : PresheafOfModules.{v} R}"
]
} | [
{
"line": "apply freeYonedaEquiv_symm_app",
"before_state": "C : Type u\ninst✝ : Category.{v, u} C\nR : Cᵒᵖ ⥤ RingCat\nM : PresheafOfModules R\nm : M.Elements\n⊢ (ConcreteCategory.hom (m.fromFreeYoneda.app m.fst)) (ModuleCat.freeMk (𝟙 (Opposite.unop m.fst))) = m.snd",
"after_state": "No Goals!"
}
] |
lemma ι_fromFreeYonedaCoproduct (m : M.Elements) :
M.ιFreeYonedaCoproduct m ≫ M.fromFreeYonedaCoproduct = m.fromFreeYoneda := by
apply Sigma.ι_desc
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Presheaf/Generator.lean | {
"open": [
"CategoryTheory Limits"
],
"variables": [
"{C : Type u} [Category.{v} C] {R : Cᵒᵖ ⥤ RingCat.{v}}",
"(R) in",
"(R)",
"{C : Type u} [Category.{v} C] {R : Cᵒᵖ ⥤ RingCat.{v}} {M : PresheafOfModules.{v} R}",
"{C : Type u} [SmallCategory.{u} C] {R : Cᵒᵖ ⥤ RingCat.{u}} (M : PresheafOf... | [
{
"line": "apply Sigma.ι_desc",
"before_state": "C : Type u\ninst✝ : SmallCategory C\nR : Cᵒᵖ ⥤ RingCat\nM : PresheafOfModules R\nm : M.Elements\n⊢ M.ιFreeYonedaCoproduct m ≫ M.fromFreeYonedaCoproduct = m.fromFreeYoneda",
"after_state": "No Goals!"
}
] |
lemma fromFreeYonedaCoproduct_app_mk (m : M.Elements) :
M.fromFreeYonedaCoproduct.app _ (M.freeYonedaCoproductMk m) = m.2 := by
dsimp [freeYonedaCoproductMk]
erw [M.ι_fromFreeYonedaCoproduct_apply m]
rw [m.fromFreeYoneda_app_apply]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Presheaf/Generator.lean | {
"open": [
"CategoryTheory Limits"
],
"variables": [
"{C : Type u} [Category.{v} C] {R : Cᵒᵖ ⥤ RingCat.{v}}",
"(R) in",
"(R)",
"{C : Type u} [Category.{v} C] {R : Cᵒᵖ ⥤ RingCat.{v}} {M : PresheafOfModules.{v} R}",
"{C : Type u} [SmallCategory.{u} C] {R : Cᵒᵖ ⥤ RingCat.{u}} (M : PresheafOf... | [
{
"line": "dsimp [freeYonedaCoproductMk]",
"before_state": "C : Type u\ninst✝ : SmallCategory C\nR : Cᵒᵖ ⥤ RingCat\nM : PresheafOfModules R\nm : M.Elements\n⊢ (ConcreteCategory.hom (M.fromFreeYonedaCoproduct.app m.fst)) (M.freeYonedaCoproductMk m) = m.snd",
"after_state": "C : Type u\ninst✝ : SmallCateg... |
lemma toFreeYonedaCoproduct_fromFreeYonedaCoproduct :
M.toFreeYonedaCoproduct ≫ M.fromFreeYonedaCoproduct = 0 := by
simp [toFreeYonedaCoproduct]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/ModuleCat/Presheaf/Generator.lean | {
"open": [
"CategoryTheory Limits"
],
"variables": [
"{C : Type u} [Category.{v} C] {R : Cᵒᵖ ⥤ RingCat.{v}}",
"(R) in",
"(R)",
"{C : Type u} [Category.{v} C] {R : Cᵒᵖ ⥤ RingCat.{v}} {M : PresheafOfModules.{v} R}",
"{C : Type u} [SmallCategory.{u} C] {R : Cᵒᵖ ⥤ RingCat.{u}} (M : PresheafOf... | [
{
"line": "simp [toFreeYonedaCoproduct]",
"before_state": "C : Type u\ninst✝ : SmallCategory C\nR : Cᵒᵖ ⥤ RingCat\nM : PresheafOfModules R\n⊢ M.toFreeYonedaCoproduct ≫ M.fromFreeYonedaCoproduct = 0",
"after_state": "No Goals!"
}
] |
lemma id_apply (M : MonCat) (x : M) :
(𝟙 M : M ⟶ M) x = x := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/MonCat/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "M : MonCat\nx : ↑M\n⊢ (ConcreteCategory.hom (𝟙 M)) x = x",
"after_state": "No Goals!"
}
] |
lemma comp_apply {M N T : MonCat} (f : M ⟶ N) (g : N ⟶ T) (x : M) :
(f ≫ g) x = g (f x) := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/MonCat/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "M N T : MonCat\nf : M ⟶ N\ng : N ⟶ T\nx : ↑M\n⊢ (ConcreteCategory.hom (f ≫ g)) x = (ConcreteCategory.hom g) ((ConcreteCategory.hom f) x)",
"after_state": "No Goals!"
}
] |
lemma inv_hom_apply {M N : MonCat} (e : M ≅ N) (x : M) : e.inv (e.hom x) = x := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/MonCat/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "M N : MonCat\ne : M ≅ N\nx : ↑M\n⊢ (ConcreteCategory.hom e.inv) ((ConcreteCategory.hom e.hom) x) = x",
"after_state": "No Goals!"
}
] |
lemma hom_inv_apply {M N : MonCat} (e : M ≅ N) (s : N) : e.hom (e.inv s) = s := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/MonCat/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "M N : MonCat\ne : M ≅ N\ns : ↑N\n⊢ (ConcreteCategory.hom e.hom) ((ConcreteCategory.hom e.inv) s) = s",
"after_state": "No Goals!"
}
] |
lemma id_apply (M : CommMonCat) (x : M) :
(𝟙 M : M ⟶ M) x = x := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/MonCat/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "M : CommMonCat\nx : ↑M\n⊢ (ConcreteCategory.hom (𝟙 M)) x = x",
"after_state": "No Goals!"
}
] |
lemma comp_apply {M N T : CommMonCat} (f : M ⟶ N) (g : N ⟶ T) (x : M) :
(f ≫ g) x = g (f x) := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/MonCat/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "M N T : CommMonCat\nf : M ⟶ N\ng : N ⟶ T\nx : ↑M\n⊢ (ConcreteCategory.hom (f ≫ g)) x = (ConcreteCategory.hom g) ((ConcreteCategory.hom f) x)",
"after_state": "No Goals!"
}
] |
lemma inv_hom_apply {M N : CommMonCat} (e : M ≅ N) (x : M) : e.inv (e.hom x) = x := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/MonCat/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "M N : CommMonCat\ne : M ≅ N\nx : ↑M\n⊢ (ConcreteCategory.hom e.inv) ((ConcreteCategory.hom e.hom) x) = x",
"after_state": "No Goals!"
}
] |
lemma hom_inv_apply {M N : CommMonCat} (e : M ≅ N) (s : N) : e.hom (e.inv s) = s := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/MonCat/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "M N : CommMonCat\ne : M ≅ N\ns : ↑N\n⊢ (ConcreteCategory.hom e.hom) ((ConcreteCategory.hom e.inv) s) = s",
"after_state": "No Goals!"
}
] |
lemma nontrivial_of_isPushout_of_isField {A B C D : CommRingCat.{u}}
(hA : IsField A) {f : A ⟶ B} {g : A ⟶ C} {inl : B ⟶ D} {inr : C ⟶ D}
[Nontrivial B] [Nontrivial C]
(h : IsPushout f g inl inr) : Nontrivial D := by
letI : Field A := hA.toField
algebraize [f.hom, g.hom]
let e : D ≅ .of (B ⊗[A] C) :=
... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/LinearAlgebra.lean | {
"open": [
"CategoryTheory Limits TensorProduct"
],
"variables": []
} | [
{
"line": "letI : Field A := hA.toField",
"before_state": "A B C D : CommRingCat\nhA : IsField ↑A\nf : A ⟶ B\ng : A ⟶ C\ninl : B ⟶ D\ninr : C ⟶ D\ninst✝¹ : Nontrivial ↑B\ninst✝ : Nontrivial ↑C\nh : IsPushout f g inl inr\n⊢ Nontrivial ↑D",
"after_state": "A B C D : CommRingCat\nhA : IsField ↑A\nf : A ⟶ B... |
lemma id_apply (R : SemiRingCat) (r : R) :
(𝟙 R : R ⟶ R) r = r := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R : SemiRingCat\nr : ↑R\n⊢ (ConcreteCategory.hom (𝟙 R)) r = r",
"after_state": "No Goals!"
}
] |
lemma comp_apply {R S T : SemiRingCat} (f : R ⟶ S) (g : S ⟶ T) (r : R) :
(f ≫ g) r = g (f r) := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R S T : SemiRingCat\nf : R ⟶ S\ng : S ⟶ T\nr : ↑R\n⊢ (ConcreteCategory.hom (f ≫ g)) r = (ConcreteCategory.hom g) ((ConcreteCategory.hom f) r)",
"after_state": "No Goals!"
}
] |
lemma inv_hom_apply {R S : SemiRingCat} (e : R ≅ S) (r : R) : e.inv (e.hom r) = r := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R S : SemiRingCat\ne : R ≅ S\nr : ↑R\n⊢ (ConcreteCategory.hom e.inv) ((ConcreteCategory.hom e.hom) r) = r",
"after_state": "No Goals!"
}
] |
lemma hom_inv_apply {R S : SemiRingCat} (e : R ≅ S) (s : S) : e.hom (e.inv s) = s := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R S : SemiRingCat\ne : R ≅ S\ns : ↑S\n⊢ (ConcreteCategory.hom e.hom) ((ConcreteCategory.hom e.inv) s) = s",
"after_state": "No Goals!"
}
] |
lemma id_apply (R : RingCat) (r : R) :
(𝟙 R : R ⟶ R) r = r := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R : RingCat\nr : ↑R\n⊢ (ConcreteCategory.hom (𝟙 R)) r = r",
"after_state": "No Goals!"
}
] |
lemma comp_apply {R S T : RingCat} (f : R ⟶ S) (g : S ⟶ T) (r : R) :
(f ≫ g) r = g (f r) := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R S T : RingCat\nf : R ⟶ S\ng : S ⟶ T\nr : ↑R\n⊢ (ConcreteCategory.hom (f ≫ g)) r = (ConcreteCategory.hom g) ((ConcreteCategory.hom f) r)",
"after_state": "No Goals!"
}
] |
lemma inv_hom_apply {R S : RingCat} (e : R ≅ S) (r : R) : e.inv (e.hom r) = r := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R S : RingCat\ne : R ≅ S\nr : ↑R\n⊢ (ConcreteCategory.hom e.inv) ((ConcreteCategory.hom e.hom) r) = r",
"after_state": "No Goals!"
}
] |
lemma hom_inv_apply {R S : RingCat} (e : R ≅ S) (s : S) : e.hom (e.inv s) = s := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R S : RingCat\ne : R ≅ S\ns : ↑S\n⊢ (ConcreteCategory.hom e.hom) ((ConcreteCategory.hom e.inv) s) = s",
"after_state": "No Goals!"
}
] |
lemma id_apply (R : CommSemiRingCat) (r : R) :
(𝟙 R : R ⟶ R) r = r := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in",
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R : CommSemiRingCat\nr : ↑R\n⊢ (ConcreteCategory.hom (𝟙 R)) r = r",
"after_state": "No Goals!"
}
] |
lemma comp_apply {R S T : CommSemiRingCat} (f : R ⟶ S) (g : S ⟶ T) (r : R) :
(f ≫ g) r = g (f r) := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in",
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R S T : CommSemiRingCat\nf : R ⟶ S\ng : S ⟶ T\nr : ↑R\n⊢ (ConcreteCategory.hom (f ≫ g)) r = (ConcreteCategory.hom g) ((ConcreteCategory.hom f) r)",
"after_state": "No Goals!"
}
] |
lemma inv_hom_apply {R S : CommSemiRingCat} (e : R ≅ S) (r : R) : e.inv (e.hom r) = r := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in",
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R S : CommSemiRingCat\ne : R ≅ S\nr : ↑R\n⊢ (ConcreteCategory.hom e.inv) ((ConcreteCategory.hom e.hom) r) = r",
"after_state": "No Goals!"
}
] |
lemma hom_inv_apply {R S : CommSemiRingCat} (e : R ≅ S) (s : S) : e.hom (e.inv s) = s := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in",
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R S : CommSemiRingCat\ne : R ≅ S\ns : ↑S\n⊢ (ConcreteCategory.hom e.hom) ((ConcreteCategory.hom e.inv) s) = s",
"after_state": "No Goals!"
}
] |
lemma id_apply (R : CommRingCat) (r : R) :
(𝟙 R : R ⟶ R) r = r := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in",
"{R} in",
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R : CommRingCat\nr : ↑R\n⊢ (ConcreteCategory.hom (𝟙 R)) r = r",
"after_state": "No Goals!"
}
] |
lemma comp_apply {R S T : CommRingCat} (f : R ⟶ S) (g : S ⟶ T) (r : R) :
(f ≫ g) r = g (f r) := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in",
"{R} in",
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\nr : ↑R\n⊢ (ConcreteCategory.hom (f ≫ g)) r = (ConcreteCategory.hom g) ((ConcreteCategory.hom f) r)",
"after_state": "No Goals!"
}
] |
lemma inv_hom_apply {R S : CommRingCat} (e : R ≅ S) (r : R) : e.inv (e.hom r) = r := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in",
"{R} in",
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R S : CommRingCat\ne : R ≅ S\nr : ↑R\n⊢ (ConcreteCategory.hom e.inv) ((ConcreteCategory.hom e.hom) r) = r",
"after_state": "No Goals!"
}
] |
lemma hom_inv_apply {R S : CommRingCat} (e : R ≅ S) (s : S) : e.hom (e.inv s) = s := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in",
"{R} in",
"{R} in",
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "R S : CommRingCat\ne : R ≅ S\ns : ↑S\n⊢ (ConcreteCategory.hom e.hom) ((ConcreteCategory.hom e.inv) s) = s",
"after_state": "No Goals!"
}
] |
theorem subsingleton_of_isTerminal {X : CommRingCat} (hX : IsTerminal X) : Subsingleton X :=
(hX.uniqueUpToIso punitIsTerminal).commRingCatIsoToRingEquiv.toEquiv.subsingleton_congr.mpr
(show Subsingleton PUnit by infer_instance)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Ring/Constructions.lean | {
"open": [
"CategoryTheory Limits TensorProduct"
],
"variables": [
"(R A B : Type u) [CommRing R] [CommRing A] [CommRing B]",
"[Algebra R A] [Algebra R B]",
"(A B : CommRingCat.{u})"
]
} | [
{
"line": "infer_instance",
"before_state": "X : CommRingCat\nhX : IsTerminal X\n⊢ Subsingleton PUnit.{?u.2368}",
"after_state": "No Goals!"
},
{
"line": "exact inferInstance✝",
"before_state": "X : CommRingCat\nhX : IsTerminal X\n⊢ Subsingleton PUnit.{?u.2368}",
"after_state": "No Goals... |
lemma id_apply (M : MagmaCat) (x : M) :
(𝟙 M : M ⟶ M) x = x := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Semigrp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "M : MagmaCat\nx : ↑M\n⊢ (ConcreteCategory.hom (𝟙 M)) x = x",
"after_state": "No Goals!"
}
] |
lemma comp_apply {M N T : MagmaCat} (f : M ⟶ N) (g : N ⟶ T) (x : M) :
(f ≫ g) x = g (f x) := by simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Semigrp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "M N T : MagmaCat\nf : M ⟶ N\ng : N ⟶ T\nx : ↑M\n⊢ (ConcreteCategory.hom (f ≫ g)) x = (ConcreteCategory.hom g) ((ConcreteCategory.hom f) x)",
"after_state": "No Goals!"
}
] |
lemma inv_hom_apply {M N : MagmaCat} (e : M ≅ N) (x : M) : e.inv (e.hom x) = x := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Semigrp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "M N : MagmaCat\ne : M ≅ N\nx : ↑M\n⊢ (ConcreteCategory.hom e.inv) ((ConcreteCategory.hom e.hom) x) = x",
"after_state": "No Goals!"
}
] |
lemma hom_inv_apply {M N : MagmaCat} (e : M ≅ N) (s : N) : e.hom (e.inv s) = s := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Category/Semigrp/Basic.lean | {
"open": [
"CategoryTheory"
],
"variables": [
"{R} in"
]
} | [
{
"line": "simp",
"before_state": "M N : MagmaCat\ne : M ≅ N\ns : ↑N\n⊢ (ConcreteCategory.hom e.hom) ((ConcreteCategory.hom e.inv) s) = s",
"after_state": "No Goals!"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.