-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(CategoryTheory/ObjectProperty/HasFiniteResolution): relation with projective dimension #41925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mbkybky
wants to merge
9
commits into
leanprover-community:master
Choose a base branch
from
mbkybky:projective
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+181
−0
Open
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
be064fb
Create Basic.lean
mbkybky ef24993
Update Mathlib.lean
mbkybky 4d2cf99
Merge branch 'master' into HasFiniteResolution
mbkybky 4fd2da6
Merge branch 'master' into HasFiniteResolution
mbkybky 431f6fa
Apply suggestions from code review
mbkybky 0673ab9
Update Basic.lean
mbkybky 657395a
Create Projective.lean
mbkybky e7b10c0
Update Projective.lean
mbkybky 5913fd1
Apply suggestion from @joelriou
mbkybky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 134 additions & 0 deletions
134
Mathlib/CategoryTheory/ObjectProperty/HasFiniteResolution/Basic.lean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| /- | ||
| Copyright (c) 2026 Yongle Hu. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Yongle Hu | ||
| -/ | ||
| module | ||
|
|
||
| public import Mathlib.CategoryTheory.ObjectProperty.EpiMono | ||
|
|
||
| /-! | ||
| # Finite resolutions by objects satisfying `P : ObjectProperty A` | ||
|
|
||
| ## Main definitions | ||
|
|
||
| Let `C` be a category, `P : ObjectProperty C` be a property of objects in `C`. | ||
|
|
||
| * `CategoryTheory.ObjectProperty.HasFiniteResolutionOfLength`: | ||
| We say that `X : C` has a `P`-resolution of length `n` if there exists an | ||
| exact sequence `0 ⟶ Eₙ ⟶ ⋯ ⟶ E₀ ⟶ X ⟶ 0` such that each `Eᵢ : C` satisfies `P`. | ||
| * `CategoryTheory.ObjectProperty.HasFiniteResolution`: | ||
| We say that `X : C` has a finite `P`-resolution if it has a `P`-resolution of some finite length. | ||
|
|
||
| ## TODO | ||
|
|
||
| * Construct a chain complex `K` whose terms satisfy `P` with a quasi-isomorphism from `K` to the | ||
| single complex on `X` when `C` is abelian and `X` has a finite `P`-resolution. | ||
| -/ | ||
|
|
||
| public section | ||
|
|
||
| universe v' v u' u | ||
|
|
||
| namespace CategoryTheory.ObjectProperty | ||
|
|
||
| open Limits | ||
|
|
||
| variable {C : Type u} [Category.{v} C] [HasZeroMorphisms C] | ||
|
|
||
| /-- Let `C` be a category, `P : ObjectProperty C` be a property of objectsin `C`. | ||
| We say that `X : C` has a `P`-resolution of length `n` if there exists an | ||
| exact sequence `0 ⟶ Eₙ ⟶ ⋯ ⟶ E₀ ⟶ X ⟶ 0` such that each `Eᵢ : C` satisfies `P`. -/ | ||
| inductive HasFiniteResolutionOfLength (P : ObjectProperty C) : C → ℕ → Prop | ||
| | zero (X : C) (hX : P X) : HasFiniteResolutionOfLength P X 0 | ||
| | succ (S : ShortComplex C) (n : ℕ) (hS : S.ShortExact) (h₂ : P S.X₂) | ||
| (h₁ : HasFiniteResolutionOfLength P S.X₁ n) : HasFiniteResolutionOfLength P S.X₃ (n + 1) | ||
|
|
||
| /-- Let `C` be a category, `P : ObjectProperty C` be a property of objects in `C`. | ||
| We say that `X : C` has a finite `P`-resolution if it has a `P`-resolution of some finite length. -/ | ||
| class HasFiniteResolution (P : ObjectProperty C) (X : C) : Prop where | ||
| out (P X) : ∃ n : ℕ, P.HasFiniteResolutionOfLength X n | ||
|
|
||
| variable {P Q : ObjectProperty C} {X : C} {n : ℕ} | ||
|
|
||
| namespace HasFiniteResolutionOfLength | ||
|
|
||
| theorem property (hX : P.HasFiniteResolutionOfLength X 0) : P X := by | ||
| cases hX with | ||
| | zero _ hX => exact hX | ||
|
|
||
| theorem monotone (hPQ : P ≤ Q) (hX : P.HasFiniteResolutionOfLength X n) : | ||
| Q.HasFiniteResolutionOfLength X n := by | ||
| induction hX with | ||
| | zero X hX => exact HasFiniteResolutionOfLength.zero X (hPQ X hX) | ||
| | succ S n hS h₂ _ ih => exact HasFiniteResolutionOfLength.succ S n hS (hPQ S.X₂ h₂) ih | ||
|
|
||
| theorem property_of_isClosedUnderQuotients [P.IsClosedUnderQuotients] | ||
| (hX : P.HasFiniteResolutionOfLength X n) : P X := by | ||
| cases hX with | ||
| | zero _ hX => exact hX | ||
| | succ S _ hS h₂ _ => exact P.prop_X₃_of_shortExact hS h₂ | ||
|
|
||
| theorem of_iso [P.IsClosedUnderIsomorphisms] {Y : C} (e : X ≅ Y) | ||
| (hX : P.HasFiniteResolutionOfLength X n) : P.HasFiniteResolutionOfLength Y n := by | ||
| cases hX with | ||
| | zero _ hX => exact HasFiniteResolutionOfLength.zero Y (P.prop_of_iso e hX) | ||
| | succ S n hS h₂ h₁ => | ||
| let T : ShortComplex C := ShortComplex.mk S.f (S.g ≫ e.hom) (by simp) | ||
| let eS : S ≅ T := ShortComplex.isoMk (Iso.refl _) (Iso.refl _) e (by simp [T]) (by simp [T]) | ||
| exact HasFiniteResolutionOfLength.succ T n (ShortComplex.shortExact_of_iso eS hS) h₂ h₁ | ||
|
|
||
| theorem map_exactFunctor {D : Type u'} [Category.{v'} D] [HasZeroMorphisms D] | ||
| {Q : ObjectProperty D} (F : C ⥤ D) [F.PreservesZeroMorphisms] | ||
| [PreservesFiniteLimits F] [PreservesFiniteColimits F] | ||
| (hF : P ≤ Q.inverseImage F) (hX : P.HasFiniteResolutionOfLength X n) : | ||
| Q.HasFiniteResolutionOfLength (F.obj X) n := by | ||
| induction hX with | ||
| | zero X hX => | ||
| exact HasFiniteResolutionOfLength.zero (F.obj X) (hF X hX) | ||
| | succ S n hS h₂ _ ih => | ||
| exact HasFiniteResolutionOfLength.succ (S.map F) n (hS.map_of_exact F) (hF S.X₂ h₂) ih | ||
|
|
||
| theorem hasFiniteResolution (hX : P.HasFiniteResolutionOfLength X n) : P.HasFiniteResolution X := | ||
| ⟨n, hX⟩ | ||
|
|
||
| end HasFiniteResolutionOfLength | ||
|
|
||
| namespace HasFiniteResolution | ||
|
|
||
| theorem of_property (hX : P X) : P.HasFiniteResolution X := | ||
| ⟨0, HasFiniteResolutionOfLength.zero X hX⟩ | ||
|
|
||
| instance [P.Is X] : P.HasFiniteResolution X := | ||
| of_property (P.prop_of_is X) | ||
|
|
||
| theorem monotone (hPQ : P ≤ Q) [P.HasFiniteResolution X] : Q.HasFiniteResolution X := by | ||
| obtain ⟨_, hX⟩ := HasFiniteResolution.out P X | ||
| exact (hX.monotone hPQ).hasFiniteResolution | ||
|
|
||
| theorem property_of_isClosedUnderQuotients [P.IsClosedUnderQuotients] [P.HasFiniteResolution X] : | ||
| P X := by | ||
| obtain ⟨_, hX⟩ := HasFiniteResolution.out P X | ||
| exact hX.property_of_isClosedUnderQuotients | ||
|
|
||
| theorem of_iso [P.IsClosedUnderIsomorphisms] [P.HasFiniteResolution X] {Y : C} (e : X ≅ Y) : | ||
| P.HasFiniteResolution Y := by | ||
| obtain ⟨_, hX⟩ := HasFiniteResolution.out P X | ||
| exact (hX.of_iso e).hasFiniteResolution | ||
|
|
||
| theorem of_shortExact {S : ShortComplex C} (hS : S.ShortExact) (h₂ : P S.X₂) | ||
| [P.HasFiniteResolution S.X₁] : P.HasFiniteResolution S.X₃ := by | ||
| obtain ⟨n, h₁⟩ := HasFiniteResolution.out P S.X₁ | ||
| exact (HasFiniteResolutionOfLength.succ S n hS h₂ h₁).hasFiniteResolution | ||
|
|
||
| theorem map_exactFunctor {D : Type u'} [Category.{v'} D] [HasZeroMorphisms D] | ||
| {Q : ObjectProperty D} (F : C ⥤ D) [F.PreservesZeroMorphisms] | ||
| [PreservesFiniteLimits F] [PreservesFiniteColimits F] | ||
| (hF : P ≤ Q.inverseImage F) [P.HasFiniteResolution X] : | ||
| Q.HasFiniteResolution (F.obj X) := by | ||
| obtain ⟨_, hX⟩ := HasFiniteResolution.out P X | ||
| exact (hX.map_exactFunctor F hF).hasFiniteResolution | ||
|
|
||
| end HasFiniteResolution | ||
|
|
||
| end CategoryTheory.ObjectProperty |
45 changes: 45 additions & 0 deletions
45
Mathlib/CategoryTheory/ObjectProperty/HasFiniteResolution/Projective.lean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| /- | ||
| Copyright (c) 2026 Yongle Hu. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Yongle Hu | ||
| -/ | ||
| module | ||
|
|
||
| public import Mathlib.CategoryTheory.Abelian.Projective.Dimension | ||
| public import Mathlib.CategoryTheory.ObjectProperty.HasFiniteResolution.Basic | ||
|
|
||
| /-! | ||
| # `X` has a projective resolution of length `n` if and only if `X` has projective dimension `≤ n` | ||
| -/ | ||
|
|
||
| public section | ||
|
|
||
| universe v u | ||
|
|
||
| namespace CategoryTheory.ObjectProperty.HasFiniteResolutionOfLength | ||
|
|
||
| open Limits | ||
|
|
||
| variable {A : Type u} [Category.{v} A] [Abelian A] {X : A} {n : ℕ} | ||
|
|
||
| theorem hasProjectiveDimensionLE (hX : (isProjective A).HasFiniteResolutionOfLength X n) : | ||
| HasProjectiveDimensionLE X n := by | ||
| induction hX with | ||
| | zero X hX => infer_instance | ||
| | succ S n hS h₂ _ ih => exact (hS.hasProjectiveDimensionLT_X₃_iff n h₂).2 ih | ||
|
|
||
| theorem iff_hasProjectiveDimensionLE_of_enoughProjectives [EnoughProjectives A] : | ||
| (isProjective A).HasFiniteResolutionOfLength X n ↔ HasProjectiveDimensionLE X n := by | ||
| refine ⟨fun hX ↦ hX.hasProjectiveDimensionLE, fun hX ↦ ?_⟩ | ||
| induction n generalizing X with | ||
| | zero => | ||
| rw [← projective_iff_hasProjectiveDimensionLE_zero X] at hX | ||
| exact HasFiniteResolutionOfLength.zero X hX | ||
| | succ n ih => | ||
| let f : Projective.over X ⟶ X := Projective.π X | ||
| let S : ShortComplex A := ShortComplex.mk (kernel.ι f) f (kernel.condition f) | ||
| have hS : S.ShortExact := ShortComplex.ShortExact.mk (ShortComplex.exact_kernel f) | ||
| exact HasFiniteResolutionOfLength.succ S n hS inferInstance <| ih <| | ||
| (hS.hasProjectiveDimensionLT_X₃_iff n inferInstance).1 hX | ||
|
|
||
| end CategoryTheory.ObjectProperty.HasFiniteResolutionOfLength | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.