Skip to content

[Merged by Bors] - feat(Topology/CWComplex): 1-skeleton Graph of CWComplex#37915

Closed
Jun2M wants to merge 4 commits intoleanprover-community:masterfrom
Jun2M:GraphofCWComplex
Closed

[Merged by Bors] - feat(Topology/CWComplex): 1-skeleton Graph of CWComplex#37915
Jun2M wants to merge 4 commits intoleanprover-community:masterfrom
Jun2M:GraphofCWComplex

Conversation

@Jun2M
Copy link
Copy Markdown
Collaborator

@Jun2M Jun2M commented Apr 10, 2026

This PR introduces CWComplex.OneSkeletonGraph, a graph with 0-dim cells as vertices and 1-dim cells as edges.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

PR summary ade87df682

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Topology.CWComplex.Classical.Graph (new file) 1408

Declarations diff

+ CWComplex.OneSkeletonGraph
+ CWComplex.exists_cellFrontier_one_eq
+ RelCWComplex.cellFrontier_one_eq
+ RelCWComplex.closedCell_zero_injective
+ RelCWComplex.injective_map_zero
+ RelCWComplex.map_zero_eq_self_iff
+ RelCWComplex.nonempty_cellFrontier
+ RelCWComplex.openCell_zero_injective
+ adj_iff
+ exists_isLoopAt_iff
+ exists_isLoopAt_iff_subsingleton
+ isLink_iff_pair
+ not_exists_isLoopAt_iff_nontrivial

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).

@github-actions github-actions bot added the t-topology Topological spaces, uniform spaces, metric spaces, filters label Apr 10, 2026
@Jun2M Jun2M requested a review from scholzhannah April 12, 2026 17:45
Copy link
Copy Markdown
Collaborator

@scholzhannah scholzhannah left a comment

Choose a reason for hiding this comment

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

Thank you for your PR! This looks fun. Purely out of interest: are you planning to use this for anything?

Comment thread Mathlib/Topology/CWComplex/Classical/Basic.lean Outdated
Comment thread Mathlib/Topology/CWComplex/Classical/Basic.lean Outdated
Comment thread Mathlib/Topology/CWComplex/Classical/Basic.lean Outdated
Comment thread Mathlib/Topology/CWComplex/Classical/Basic.lean Outdated
Comment thread Mathlib/Topology/CWComplex/Classical/Basic.lean Outdated
Comment thread Mathlib/Topology/CWComplex/Classical/Basic.lean Outdated
Comment thread Mathlib/Topology/CWComplex/Classical/Graph.lean Outdated
Comment thread Mathlib/Topology/CWComplex/Classical/Graph.lean Outdated

variable {C : Set X} [CWComplex C]

lemma OneSkeletonGraph.isLink_iff_pair (e : cell C 1) (x y : cell C 0) :
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.

Do you maybe want this to be a simp lemma?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

There is a simps tag to the def of OneSkeletonGraph which auto-creates (OneSkeletonGraph C).IsLink e x y = (cellFrontier 1 e = closedCell 0 x ∪ closedCell 0 y) as a simp lemma. Do you think this lemma is preferable as simp lemma than the other?

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.

Ah, I see. Then I guess whichever you think will be more useful. I cannot really judge that.

Comment thread Mathlib/Topology/CWComplex/Classical/Graph.lean Outdated
@scholzhannah scholzhannah added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 13, 2026
@Jun2M
Copy link
Copy Markdown
Collaborator Author

Jun2M commented Apr 13, 2026

Thank you for your review, @scholzhannah!

This looks fun. Purely out of interest: are you planning to use this for anything?

I am currently working with Graph planarity. One way to define that is to say R^2 is a CW-complex with the given graph as 1-skeleton. Also, topological minor of a graph come from existence of one graph embedding to another, it would be good to formalize that. The big milestone for me is to prove Kuratowski's theorem.

@Jun2M Jun2M 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 13, 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 13, 2026
@Jun2M Jun2M requested a review from scholzhannah April 14, 2026 12:59
@jcommelin
Copy link
Copy Markdown
Member

Nice work. Regarding planar graphs, are you aware of the notion of combinatorial hypermap? It seems that was a very useful concept in the formalization of the four colour theorem. See https://www.ams.org/notices/200811/tx081101382p.pdf

@Jun2M
Copy link
Copy Markdown
Collaborator Author

Jun2M commented Apr 15, 2026

Thank you, @jcommelin! I am aware of combinatorial hypermap. However, Peter and I think that the planarity of a graph should "be" about ability to draw a graph on a plane, that is either defined as that property or explicitly shown equivalence to it, rather than contending with just the combinatorial side. I believe this should not be too difficult. Combinatorial hypermap will probably act as a steping stone/ an interface between the combinatorial description and analytical description of planarity.

Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@mathlib-triage mathlib-triage bot added the ready-to-merge This PR has been sent to bors. label Apr 17, 2026
mathlib-bors bot pushed a commit that referenced this pull request Apr 17, 2026
This PR introduces `CWComplex.OneSkeletonGraph`, a graph with 0-dim cells as vertices and 1-dim cells as edges.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Apr 17, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Topology/CWComplex): 1-skeleton Graph of CWComplex [Merged by Bors] - feat(Topology/CWComplex): 1-skeleton Graph of CWComplex Apr 17, 2026
@mathlib-bors mathlib-bors bot closed this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-topology Topological spaces, uniform spaces, metric spaces, filters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants