Skip to content

Commit 3820f2f

Browse files
2 parents 71d87ec + 34f7a6c commit 3820f2f

40 files changed

Lines changed: 660 additions & 148 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,6 +2469,7 @@ public import Mathlib.CategoryTheory.Adjunction.Limits
24692469
public import Mathlib.CategoryTheory.Adjunction.Mates
24702470
public import Mathlib.CategoryTheory.Adjunction.Opposites
24712471
public import Mathlib.CategoryTheory.Adjunction.Parametrized
2472+
public import Mathlib.CategoryTheory.Adjunction.ParametrizedLimits
24722473
public import Mathlib.CategoryTheory.Adjunction.PartialAdjoint
24732474
public import Mathlib.CategoryTheory.Adjunction.Quadruple
24742475
public import Mathlib.CategoryTheory.Adjunction.Reflective

Mathlib/Algebra/Group/Submonoid/Operations.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,11 @@ theorem submonoidMap_surjective (f : M →* N) (M' : Submonoid M) :
867867
rintro ⟨_, x, hx, rfl⟩
868868
exact ⟨⟨x, hx⟩, rfl⟩
869869

870+
@[to_additive (attr := grind inj)]
871+
theorem submonoidMap_injective {f : M →* N} (hf : Injective f) (M' : Submonoid M) :
872+
Injective (f.submonoidMap M') := by
873+
grind [Injective, submonoidMap_apply_coe]
874+
870875
end MonoidHom
871876

872877
namespace Submonoid

Mathlib/Algebra/Homology/ExactSequence.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,11 @@ lemma exact_of_δlast {n : ℕ} (S : ComposableArrows C (n + 2))
319319
rw [exact_iff_δlast]
320320
constructor <;> assumption
321321

322+
theorem natAddLEFunctor_obj_exact {n k l : ℕ} (h : k + l ≤ n) {R : ComposableArrows C n}
323+
(hR : R.Exact) :
324+
((natAddLEFunctor h).obj R).Exact :=
325+
⟨⟨fun i _ => hR.1.1 (k + i)⟩, fun i _ => hR.exact (k + i)⟩
326+
322327
lemma Exact.isIso_map' {C : Type*} [Category* C] [Preadditive C]
323328
[Balanced C] {n : ℕ} {S : ComposableArrows C n} (hS : S.Exact) (k : ℕ) (hk : k + 3 ≤ n)
324329
(h₀ : S.map' k (k + 1) = 0) (h₁ : S.map' (k + 2) (k + 3) = 0) :

Mathlib/Algebra/Lie/InvariantForm.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ theorem isSemisimple_of_nondegenerate : IsSemisimple K L := by
202202
intro J hJ hJI
203203
rw [← lie_eq_self_of_isAtom_of_nonabelian J hJ (hL J hJ), lieIdeal_oper_eq_span, lieSpan_le]
204204
rintro _ ⟨x, y, rfl⟩
205-
simp only [orthogonal_carrier, Φ.isOrtho_def, Set.mem_setOf_eq]
205+
simp only [orthogonal_carrier, LinearMap.IsOrtho, Set.mem_setOf_eq]
206206
intro z hz
207207
rw [← neg_eq_zero, ← hΦ_inv]
208208
suffices ⁅(x : L), z⁆ = 0 by simp only [this, map_zero, LinearMap.zero_apply]

Mathlib/Algebra/Lie/Submodule.lean

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ instance : Zero (LieSubmodule R L M) :=
7373
instance : Inhabited (LieSubmodule R L M) :=
7474
0
7575

76-
instance (priority := high) coeSort : CoeSort (LieSubmodule R L M) (Type w) where
77-
coe N := { x : M // x ∈ N }
78-
7976
instance (priority := mid) coeSubmodule : CoeOut (LieSubmodule R L M) (Submodule R M) :=
8077
⟨toSubmodule⟩
8178

Mathlib/Algebra/Module/Submodule/Ker.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ variable {f : M →ₛₗ[τ₁₂] M₂}
171171

172172
open Submodule
173173

174+
@[simp] theorem ker_neg (f : M →ₛₗ[τ₁₂] M₂) : (-f).ker = f.ker := by ext; simp
175+
174176
theorem ker_toAddSubgroup (f : M →ₛₗ[τ₁₂] M₂) : (ker f).toAddSubgroup = f.toAddMonoidHom.ker :=
175177
rfl
176178

Mathlib/Algebra/Module/Submodule/Map.lean

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,10 @@ theorem submoduleComap_surjective_of_surjective (f : M →ₗ[R] M₁) (q : Subm
649649
/-- A linear map between two modules restricts to a linear map from any submodule p of the
650650
domain onto the image of that submodule.
651651
652-
This is the linear version of `AddMonoidHom.addSubmonoidMap` and `AddMonoidHom.addSubgroupMap`. -/
652+
This is the linear version of `AddMonoidHom.addSubmonoidMap` and `AddMonoidHom.addSubgroupMap`.
653+
654+
TODO: Consider making this an `abbrev`, dropping its API, and renaming to something like
655+
`restrictSubmodule`. -/
653656
def submoduleMap (f : M →ₗ[R] M₁) (p : Submodule R M) : p →ₗ[R] p.map f :=
654657
f.restrict fun x hx ↦ Submodule.mem_map.mpr ⟨x, hx, rfl⟩
655658

@@ -660,6 +663,11 @@ theorem submoduleMap_coe_apply (f : M →ₗ[R] M₁) {p : Submodule R M} (x : p
660663
theorem submoduleMap_surjective (f : M →ₗ[R] M₁) (p : Submodule R M) :
661664
Function.Surjective (f.submoduleMap p) := f.toAddMonoidHom.addSubmonoidMap_surjective _
662665

666+
@[grind inj]
667+
theorem submoduleMap_injective {f : M →ₗ[R] M₁} (hf : Injective f) (p : Submodule R M) :
668+
Injective (f.submoduleMap p) :=
669+
f.toAddMonoidHom.addSubmonoidMap_injective hf _
670+
663671
variable [Semiring R₂] [AddCommMonoid M₂] [Module R₂ M₂] {σ₂₁ : R₂ →+* R}
664672

665673
open Submodule

Mathlib/CategoryTheory/Abelian/DiagramLemmas/Four.lean

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ include hR₁ hR₂
136136

137137
/-- The five lemma. -/
138138
theorem isIso_of_epi_of_isIso_of_isIso_of_mono (h₀ : Epi (app' φ 0)) (h₁ : IsIso (app' φ 1))
139-
(h : IsIso (app' φ 3)) (h : Mono (app' φ 4)) : IsIso (app' φ 2) := by
140-
dsimp at h₀ h₁ h₂ h₃
139+
(h : IsIso (app' φ 3)) (h : Mono (app' φ 4)) : IsIso (app' φ 2) := by
140+
dsimp at h₀ h₁ h₃ h₄
141141
have : Mono (app' φ 2) := by
142142
apply mono_of_epi_of_mono_of_mono (δlastFunctor.map φ) (R₁.exact_iff_δlast.1 hR₁).1
143143
(R₂.exact_iff_δlast.1 hR₂).1 <;> dsimp <;> infer_instance
@@ -148,6 +148,61 @@ theorem isIso_of_epi_of_isIso_of_isIso_of_mono (h₀ : Epi (app' φ 0)) (h₁ :
148148

149149
end Five
150150

151+
section Four
152+
153+
variable {n k : ℕ} (h : k + 3 ≤ n) {R₁ R₂ : ComposableArrows C n}
154+
(hR₁ : R₁.Exact) (hR₂ : R₂.Exact) (φ : R₁ ⟶ R₂)
155+
156+
include hR₁ hR₂ in
157+
/-- Variant of the first 4-lemma for complexes of any size -/
158+
theorem mono_of_epi_of_mono_of_mono'' (k₀ k₁ k₂ k₃ : ℕ)
159+
(hk₀ : k₀ = k) (hk₁ : k₁ = k + 1)
160+
(hk₂ : k₂ = k + 2) (hk₃ : k₃ = k + 3)
161+
(h₀ : Epi (app' φ k₀)) (h₁ : Mono (app' φ k₁))
162+
(h₃ : Mono (app' φ k₃)) : Mono (app' φ k₂) := by
163+
subst_vars
164+
change Epi (app' φ (k₀ + 0)) at h₀
165+
rw [← natAddLEFunctor_app' h] at h₀ h₁ h₃ ⊢
166+
exact mono_of_epi_of_mono_of_mono _ (natAddLEFunctor_obj_exact h hR₁)
167+
(natAddLEFunctor_obj_exact h hR₂) h₀ h₁ h₃
168+
169+
include hR₁ hR₂ in
170+
/-- Variant of the second 4-lemma for complexes of any size -/
171+
theorem epi_of_epi_of_epi_of_mono'' (k₀ k₁ k₂ k₃ : ℕ)
172+
(hk₀ : k₀ = k) (hk₁ : k₁ = k + 1)
173+
(hk₂ : k₂ = k + 2) (hk₃ : k₃ = k + 3)
174+
(h₀ : Epi (app' φ k₀)) (h₂ : Epi (app' φ k₂))
175+
(h₃ : Mono (app' φ k₃)) : Epi (app' φ k₁) := by
176+
subst_vars
177+
change Epi (app' φ (k₀ + 0)) at h₀
178+
rw [← natAddLEFunctor_app' h] at h₀ h₂ h₃ ⊢
179+
exact epi_of_epi_of_epi_of_mono _ (natAddLEFunctor_obj_exact h hR₁)
180+
(natAddLEFunctor_obj_exact h hR₂) h₀ h₂ h₃
181+
182+
end Four
183+
184+
section Five
185+
186+
variable {n k : ℕ} (h : k + 4 ≤ n) {R₁ R₂ : ComposableArrows C n}
187+
(hR₁ : R₁.Exact) (hR₂ : R₂.Exact) (φ : R₁ ⟶ R₂)
188+
189+
include hR₁ hR₂ in
190+
/-- Variant of the 5-lemma for complexes of any size -/
191+
theorem isIso_of_epi_of_isIso_of_isIso_of_mono' (k₀ k₁ k₂ k₃ k₄ : ℕ)
192+
(hk₀ : k₀ = k) (hk₁ : k₁ = k + 1)
193+
(hk₂ : k₂ = k + 2) (hk₃ : k₃ = k + 3)
194+
(hk₄ : k₄ = k + 4) (h₀ : Epi (app' φ k₀))
195+
(h₁ : IsIso (app' φ k₁)) (h₃ : IsIso (app' φ k₃))
196+
(h₄ : Mono (app' φ k₄)) :
197+
IsIso (app' φ k₂) := by
198+
subst_vars
199+
change Epi (app' φ (k₀ + 0)) at h₀
200+
rw [← natAddLEFunctor_app' h] at h₀ h₁ h₃ h₄ ⊢
201+
exact isIso_of_epi_of_isIso_of_isIso_of_mono (natAddLEFunctor_obj_exact h hR₁)
202+
(natAddLEFunctor_obj_exact h hR₂) _ h₀ h₁ h₃ h₄
203+
204+
end Five
205+
151206
/-! The following "three lemmas" for morphisms in `ComposableArrows C 2` are
152207
special cases of "four lemmas" applied to diagrams where some of the
153208
leftmost or rightmost maps (or objects) are zero. -/
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/-
2+
Copyright (c) 2026 Joël Riou. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Joël Riou
5+
-/
6+
module
7+
8+
public import Mathlib.CategoryTheory.Adjunction.Parametrized
9+
public import Mathlib.CategoryTheory.Limits.Opposites
10+
public import Mathlib.CategoryTheory.Limits.Preserves.Basic
11+
12+
/-!
13+
# Parametrized adjunctions and limits
14+
15+
Given bifunctors `F : C₁ ⥤ C₂ ⥤ C₃`, `G : C₁ᵒᵖ ⥤ C₃ ⥤ C₂` and
16+
a paremetrized adjunction `adj₂ : F ⊣₂ G`, we show that for any `X₃ : C₃`,
17+
the functor `G.flip.obj X₃ : C₁ᵒᵖ ⥤ C₃` preserves limits of shape `J`
18+
if for any `X₂ : C₂`, the functor `F.flip.obj X₂ : C₁ ⥤ C₃`
19+
preserves colimits of shape `Jᵒᵖ`.
20+
21+
-/
22+
23+
@[expose] public section
24+
25+
namespace CategoryTheory.ParametrizedAdjunction
26+
27+
open Limits Opposite
28+
29+
variable {C₁ C₂ C₃ : Type*} [Category* C₁] [Category* C₂] [Category* C₃]
30+
{F : C₁ ⥤ C₂ ⥤ C₃} {G : C₁ᵒᵖ ⥤ C₃ ⥤ C₂}
31+
(adj₂ : F ⊣₂ G) {J : Type*} [Category* J]
32+
33+
include adj₂
34+
35+
set_option backward.isDefEq.respectTransparency false in
36+
lemma preservesLimit_flip_obj (P : J ⥤ C₁ᵒᵖ)
37+
[∀ (X₂ : C₂), PreservesColimit P.leftOp (F.flip.obj X₂)] (X₃ : C₃) :
38+
PreservesLimit P (G.flip.obj X₃) where
39+
preserves {c} hc := ⟨by
40+
let cocone (s : Cone (P ⋙ G.flip.obj X₃)) :
41+
Cocone (P.leftOp ⋙ F.flip.obj s.pt) :=
42+
{ pt := X₃
43+
ι.app j := adj₂.homEquiv.symm (s.π.app j.unop)
44+
ι.naturality _ _ f := by
45+
simp [← s.w f.unop, dsimp% adj₂.homEquiv_symm_naturality_one (P.map f.unop).unop] }
46+
let hc' (s : Cone (P ⋙ G.flip.obj X₃)) :=
47+
isColimitOfPreserves (F.flip.obj s.pt) (isColimitCoconeLeftOpOfCone _ hc)
48+
exact {
49+
lift s := adj₂.homEquiv ((hc' s).desc (cocone s))
50+
fac s j := by
51+
dsimp
52+
rw [← dsimp% adj₂.homEquiv_naturality_one (c.π.app j).unop,
53+
dsimp% (hc' s).fac (cocone s) (op j)]
54+
simp [cocone]
55+
uniq s m hm := adj₂.homEquiv.symm.injective (by
56+
simp only [op_unop, Equiv.symm_apply_apply]
57+
refine (hc' s).uniq (cocone s) _ (fun j ↦ ?_)
58+
simp [cocone, ← hm,
59+
dsimp% adj₂.homEquiv_symm_naturality_one (c.π.app j.unop).unop]) }⟩
60+
61+
variable (J) in
62+
lemma preservesLimitsOfShape_flip_obj
63+
[∀ (X₂ : C₂), PreservesColimitsOfShape Jᵒᵖ (F.flip.obj X₂)] (X₃ : C₃) :
64+
PreservesLimitsOfShape J (G.flip.obj X₃) where
65+
preservesLimit := preservesLimit_flip_obj adj₂ _ _
66+
67+
end CategoryTheory.ParametrizedAdjunction

Mathlib/CategoryTheory/ComposableArrows/Basic.lean

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,27 @@ def _root_.Fin.succFunctor (n : ℕ) : Fin n ⥤ Fin (n + 1) where
474474
obj i := i.succ
475475
map {_ _} hij := homOfLE (Fin.succ_le_succ_iff.2 (leOfHom hij))
476476

477+
/-- The functor `Fin (l + 1) ⥤ Fin (n + 1)` which sends `i` to `k + i` -/
478+
@[simps!]
479+
def _root_.Fin.natAddLEFunctor {n k l : ℕ} (h : k + l ≤ n) : Fin (l + 1) ⥤ Fin (n + 1) where
480+
obj := fun ⟨i, _⟩ => ⟨k + i , by lia⟩
481+
map {_ _} hij := homOfLE (by rw [Fin.le_iff_val_le_val]; simpa using (leOfHom hij))
482+
483+
/-- The functor `ComposableArrows C n ⥤ ComposableArrows C l` obtained by precomposition with
484+
the functor `Fin.natAddLEFunctor`. -/
485+
@[simps!]
486+
def natAddLEFunctor {n k l : ℕ} (h : k + l ≤ n) :
487+
ComposableArrows C n ⥤ ComposableArrows C l :=
488+
whiskerLeftFunctor (Fin.natAddLEFunctor h)
489+
490+
lemma natAddLEFunctor_obj' {n k l i : ℕ} (h : k + l ≤ n) (R : ComposableArrows C n)
491+
(_ : i ≤ l := by lia) :
492+
((natAddLEFunctor h).obj R).obj' i = R.obj' (k + i) := rfl
493+
494+
lemma natAddLEFunctor_app' {n k l i : ℕ} (h : k + l ≤ n) {R₁ R₂ : ComposableArrows C n}
495+
(φ : R₁ ⟶ R₂) (_ : i ≤ l := by lia) :
496+
app' ((natAddLEFunctor h).map φ) i = app' φ (k + i) := rfl
497+
477498
/-- The functor `ComposableArrows C (n + 1) ⥤ ComposableArrows C n` which forgets
478499
the first arrow. -/
479500
@[simps!]

0 commit comments

Comments
 (0)