Skip to content

feat(AlgebraicTopology): homology of contractible spaces#37480

Open
erdOne wants to merge 10 commits intoleanprover-community:masterfrom
erdOne:erd1/contractible
Open

feat(AlgebraicTopology): homology of contractible spaces#37480
erdOne wants to merge 10 commits intoleanprover-community:masterfrom
erdOne:erd1/contractible

Conversation

@erdOne
Copy link
Copy Markdown
Member

@erdOne erdOne commented Apr 1, 2026


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

PR summary 5289bf289a

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.AlgebraicTopology.SingularHomology.HomotopyInvarianceTopCat 1717 1720 +3 (+0.17%)
Import changes for all files
Files Import difference
Mathlib.AlgebraicTopology.SingularHomology.HomotopyInvarianceTopCat 3

Declarations diff

+ instance (X : TopCat.{w}) [ContractibleSpace X] (R : C) (n : ℕ) :
+ instance : Unique (⊤_ TopCat.{u})
+ isZero_singularHomologyFunctor_of_contractibleSpace
+ singularHomologyFunctorHomotopyEquiv
+ singularHomologyFunctorZeroOfContractibleSpace
+ singularHomologyFunctor_obj_map_eq

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

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

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


No changes to technical debt.

You can run this locally as

./scripts/reporting/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).

@erdOne erdOne added the t-algebraic-topology Algebraic topology label Apr 1, 2026
Define singular homology functor for contractible spaces.
@dagurtomas dagurtomas self-requested a review April 2, 2026 14:56
@dagurtomas dagurtomas self-assigned this Apr 2, 2026
Comment thread Mathlib/AlgebraicTopology/SingularHomology/HomotopyInvarianceTopCat.lean Outdated
Comment on lines +75 to +76
hom := ((singularHomologyFunctor C n).obj R).map (TopCat.ofHom H.toFun)
inv := ((singularHomologyFunctor C n).obj R).map (TopCat.ofHom H.invFun)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The docstring of HomotopyEquiv.toFun/invFun says explicitly DO NOT USE, use coercion instead. However, there appears to be no coercion from X ≃ₕ Y to C(X, Y), only to plain functions. Could you add that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do you mean using toContinuousMap via ContinuousMapClass or just tag toFun with @[coe]?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

invFun should definitely be switched to symm.toFun though so I did that for now.

But for toFun perhaps we should just rename toFun to toContinuousMap and remove the DO NOT USE.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

But for toFun perhaps we should just rename toFun to toContinuousMap and remove the DO NOT USE.

I think this is reasonable

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll open a PR to do that soon-ish.

Comment thread Mathlib/AlgebraicTopology/SingularHomology/HomotopyInvarianceTopCat.lean Outdated
Comment thread Mathlib/AlgebraicTopology/SingularHomology/HomotopyInvarianceTopCat.lean Outdated
@dagurtomas dagurtomas added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 2, 2026
Comment thread Mathlib/AlgebraicTopology/SingularHomology/HomotopyInvarianceTopCat.lean Outdated
Comment thread Mathlib/AlgebraicTopology/SingularHomology/HomotopyInvarianceTopCat.lean Outdated
erdOne and others added 4 commits April 3, 2026 11:04
…opCat.lean

Co-authored-by: Dagur Asgeirsson <dagurtomas@gmail.com>
…opCat.lean

Co-authored-by: Dagur Asgeirsson <dagurtomas@gmail.com>
@erdOne erdOne added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Apr 3, 2026
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Apr 3, 2026
Comment thread Mathlib/AlgebraicTopology/SingularHomology/HomotopyInvarianceTopCat.lean Outdated
…opCat.lean

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>

end TopCat.Homotopy

namespace AlgebraicTopology
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All the declarations use some TopCat as an input:

Suggested change
namespace AlgebraicTopology
namespace TopCat

I believe we should remove the namespace AlgebraicTopology globally (while keeping the folder Mathlib/AlgebraicTopology/), and move the declarations to CategoryTheory.SimplicialObject, SSet, TopCat.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

singularHomologyFunctor is in AlgebraicTopology and these declarations are mainly about singularHomologyFunctor so I believe the current namespace is the more sensible one.

In general I would tend to argue the opposite, that we should use theory names as top level namespaces more (e.g. Topology or AlgebraicGeometry or CategoryTheory).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Probably, singularHomologyFunctor should be in the TopCat namespace. I disagree about using theory names more as top level namespaces. It will just make dot notation harder to use when mixing different theories.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I am failing to see how using theory namespaces as top level namespaces cause issues with dot notation. E.g. is the CategoryTheory namespace causing any trouble?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would say the point is not very much about root namespaces. TopCat happens to be a root namespace. If it were CategoryTheory.TopCat or Topology.TopCat, I would still argue that singularHomologyFunctor should be *.TopCat.singularHomologyFunctor, because singular homology is a homology theory for topological spaces.

@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 4, 2026
@erdOne erdOne removed the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 4, 2026
@dagurtomas dagurtomas added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 9, 2026
noncomputable def singularHomologyFunctorZeroOfContractibleSpace
(X : TopCat.{w}) [ContractibleSpace X] (R : C) :
((singularHomologyFunctor C 0).obj R).obj X ≅ R :=
asIso (((singularHomologyFunctor C 0).obj R).map (terminal.from X)) ≪≫
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
asIso (((singularHomologyFunctor C 0).obj R).map (terminal.from X)) ≪≫
asIso (((singularHomologyFunctor C 0).obj R).map (terminal.from X)) ≪≫

@mathlib-merge-conflicts
Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts mathlib-merge-conflicts bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes. merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-algebraic-topology Algebraic topology

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants