Skip to content
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

refactor(AlgebraicTopology/SimplicialSet): use the Subpresheaf API #21090

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

joelriou
Copy link
Collaborator

@joelriou joelriou commented Jan 26, 2025

The type of subcomplexes SSet.Subcomplex of a simplicial set is defined as an abbreviation for Subpresheaf, and boundaries and horns are redefined as subcomplexes of the standard simplex.


Open in Gitpod

@joelriou joelriou added the t-category-theory Category theory label Jan 26, 2025
@github-actions github-actions bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Jan 26, 2025
Copy link

github-actions bot commented Jan 26, 2025

PR summary b57907dbe6

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.AlgebraicTopology.SimplicialSet.Horn 842 850 +8 (+0.95%)
Mathlib.AlgebraicTopology.SimplicialSet.KanComplex 843 851 +8 (+0.95%)
Mathlib.AlgebraicTopology.SimplicialSet.Path 843 851 +8 (+0.95%)
Mathlib.AlgebraicTopology.Quasicategory.Basic 844 852 +8 (+0.95%)
Mathlib.AlgebraicTopology.SimplicialSet.StrictSegal 849 857 +8 (+0.94%)
Mathlib.AlgebraicTopology.Quasicategory.StrictSegal 852 860 +8 (+0.94%)
Mathlib.AlgebraicTopology.SimplicialSet.StdSimplex 841 848 +7 (+0.83%)
Mathlib.AlgebraicTopology.SimplicialSet.Boundary 842 849 +7 (+0.83%)
Mathlib.AlgebraicTopology.ExtraDegeneracy 1071 1078 +7 (+0.65%)
Import changes for all files
Files Import difference
4 files Mathlib.RepresentationTheory.GroupCohomology.Basic Mathlib.RepresentationTheory.GroupCohomology.Hilbert90 Mathlib.RepresentationTheory.GroupCohomology.LowDegree Mathlib.RepresentationTheory.GroupCohomology.Resolution
6
3 files Mathlib.AlgebraicTopology.ExtraDegeneracy Mathlib.AlgebraicTopology.SimplicialSet.Boundary Mathlib.AlgebraicTopology.SimplicialSet.StdSimplex
7
9 files Mathlib.AlgebraicTopology.Quasicategory.Basic Mathlib.AlgebraicTopology.Quasicategory.Nerve Mathlib.AlgebraicTopology.Quasicategory.StrictSegal Mathlib.AlgebraicTopology.SimplicialSet.Coskeletal Mathlib.AlgebraicTopology.SimplicialSet.HomotopyCat Mathlib.AlgebraicTopology.SimplicialSet.Horn Mathlib.AlgebraicTopology.SimplicialSet.KanComplex Mathlib.AlgebraicTopology.SimplicialSet.Path Mathlib.AlgebraicTopology.SimplicialSet.StrictSegal
8
Mathlib.Order.Fin.SuccAboveOrderIso (new file) 457
Mathlib.AlgebraicTopology.SimplicialSet.Subcomplex (new file) 838

Declarations diff

+ Fin.succAboveOrderIso
+ Subcomplex
+ Subcomplex.liftPath
+ Subcomplex.map_ι_liftPath
+ Subcomplex.toSSet
+ Subcomplex.ι
+ asOrderHom
+ comp_const
+ const_comp
+ const_val_apply
+ ext
+ faceRepresentableBy
+ face_eq_ofSimplex
+ face_inter_face
+ face_le_subcomplexHorn
+ instance (A : X.Subcomplex) :
+ instance (n i : ℕ) : DFunLike (Δ[n] _[i]) (Fin (i + 1)) (fun _ ↦ Fin (n + 1))
+ instance : CoeOut X.Subcomplex SSet.{u}
+ isLocallySurjective_iff_range_sheafify_eq_top
+ isLocallySurjective_iff_range_sheafify_eq_top'
+ isoOfRepresentableBy
+ mem_face_iff
+ mem_ofSimplex_obj
+ objEquiv_symm_apply
+ objEquiv_symm_comp
+ objEquiv_toOrderHom_apply
+ objMk_apply
+ obj₀Equiv
+ ofSimplex
+ ofSimplex_le_iff
+ ofSimplex_yonedaEquiv_δ
+ range_eq_ofSimplex
+ range_δ
+ stdSimplex.spineId_arrow_apply_one
+ stdSimplex.spineId_arrow_apply_zero
+ stdSimplex.spineId_vertex
+ subcomplexBoundary
+ subcomplexBoundary_eq_iSup
+ subcomplexHorn
+ subcomplexHorn.spineId
+ subcomplexHorn.spineId_map_hornInclusion
+ subcomplexHorn_eq_iSup
+ subcomplexHorn_obj_zero
+ succ_succAbove_predAbove
+ yonedaEquiv_coe
+ yonedaEquiv_comp
+ yonedaEquiv_map
++- face
+-+ const

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) label Jan 26, 2025
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 27, 2025
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 27, 2025
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 29, 2025
@github-actions github-actions bot removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) large-import Automatically added label for PRs with a significant increase in transitive imports labels Jan 29, 2025
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 29, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) label Jan 31, 2025
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 31, 2025
@joelriou joelriou added the WIP Work in progress label Jan 31, 2025
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 31, 2025
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 31, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) label Jan 31, 2025
intro hj
exact Set.range_comp_subset_range _ _ hj⟩
@[simps (config := .lemmasOnly)]
def subcomplexHorn (n : ℕ) (i : Fin (n + 1)) : (Δ[n] : SSet.{u}).Subcomplex where
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be useful to add these to a new namespace, SSet.subcomplex.horn and SSet.subcomplex.boundary? Potentially the lemmas could also then become, e.g., SSet.subcomplex.horn.eq_iSup and SSet.subcomplex.boundary.eq_iSup.

@[simps]
def horn.spineId {n : ℕ} (i : Fin (n + 3))
@[simps! vertex_coe arrow_coe]
def subcomplexHorn.spineId {n : ℕ} (i : Fin (n + 3))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This went from an ugly proof to an elegant one. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) t-category-theory Category theory WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants