Skip to content

[Merged by Bors] - feat(Combinatorics/SimpleGraph/Clique): add clique number#18446

Closed
ooovi wants to merge 30 commits intomasterfrom
feat-clique-number
Closed

[Merged by Bors] - feat(Combinatorics/SimpleGraph/Clique): add clique number#18446
ooovi wants to merge 30 commits intomasterfrom
feat-clique-number

Conversation

@ooovi
Copy link
Copy Markdown
Collaborator

@ooovi ooovi commented Oct 30, 2024

add clique number, maximal and maximum cliques, and theorems about the relationship between clique number and the cardinality of cliques.


Open in Gitpod

@github-actions github-actions bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Oct 30, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 30, 2024

PR summary cc625ef21f

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Combinatorics.SimpleGraph.Clique 562 570 +8 (+1.42%)
Import changes for all files
Files Import difference
Mathlib.Combinatorics.SimpleGraph.Triangle.Counting Mathlib.Combinatorics.SimpleGraph.Turan 6
Mathlib.Combinatorics.SimpleGraph.Triangle.Basic Mathlib.Combinatorics.SimpleGraph.Triangle.Tripartite 7
Mathlib.Combinatorics.SimpleGraph.Clique 8

Declarations diff

+ IsClique.card_le_cliqueNum
+ IsMaximumClique
+ IsMaximumClique.isMaximalClique
+ cliqueNum
+ exists_isNClique_cliqueNum
+ isMaximalClique_iff
+ isMaximumClique_iff
+ maximumClique_card_eq_cliqueNum
+ maximumClique_exists

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.

@github-actions github-actions bot added the t-combinatorics Combinatorics label Oct 30, 2024
@ooovi ooovi marked this pull request as ready for review October 30, 2024 17:38
@ooovi ooovi requested a review from YaelDillies October 30, 2024 17:39
@FordUniver
Copy link
Copy Markdown
Collaborator

@YaelDillies @kmill We are now defining IsMaximumClique and IsMaximalClique as structures, following IsNClique. Two things were unclear to me: why / when is the I at the beginning capitalized? Is it upper case for structures and lower case for lemmas? And why do we go for (s : Finset α) (smc : G.IsMaximumClique s) rather than (s : G.MaximumClique), i.e., why don't we redefine the structures to have the set as an attribute rather than an argument?

Besides that, is there anything this PR is missing in terms of fundamental statements that you can think of?

@FordUniver FordUniver requested a review from kmill November 1, 2024 09:33
@leanprover-community-bot-assistant leanprover-community-bot-assistant added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Nov 1, 2024
/-- A maximal clique in a graph `G` is a clique that cannot be extended by adding more vertices. -/
structure IsMaximalClique (G : SimpleGraph α) (s : Finset α) : Prop where
(clique : G.IsClique s)
(maximal : ∀ t : Finset α, G.IsClique t → s ⊆ t → t = s)
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies Nov 2, 2024

Choose a reason for hiding this comment

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

What is the use case of these predicates?

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.

You mean why define maximal cliques? Seemed sensible to include it when defining maximum cliques, but I don't think we need it for our particular application right now (unless @ooovi disagrees).

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 mean both maximal and maximum cliques

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.

Right now @ooovi was working on the AM-GM proof of Mantel which needs this notion. We have also in the past needed the clique number when doing some auxiliary stuff for the hypercube / sensitivity conjecture and I want to clean that up as well.

Actually both of these need the independence number (which requires a notion of independence set in the first place), for which we are preparing another PR that's intended to build on this.

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.

Right now @ooovi was working on the AM-GM proof of Mantel which needs this notion. We have also in the past needed the clique number when doing some auxiliary stuff for the hypercube / sensitivity conjecture and I want to clean that up as well.

How much do you need it? Is it like one lemma or two, or do you a full API about them

Copy link
Copy Markdown
Collaborator Author

@ooovi ooovi Nov 6, 2024

Choose a reason for hiding this comment

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

For my specific proof, I need the dual of lemma maximumClique_card_eq_cliqueNum (s : Finset α) (sm : G.IsMaximumClique s) : #s = G.cliqueNum and lemma maximumClique_exists : ∃ (s : Finset α), G.IsMaximumClique s, which are the corresponding statements about maximum independent sets and the coclique number. The dualization is in a seperate PR, #18608.

Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

I have strain injuries to both wrists, hence must not type much. Please apologise the poor spelling, vague indications and general conciseness.

@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 2, 2024
@FordUniver
Copy link
Copy Markdown
Collaborator

I have strain injuries to both wrists, hence must not type much. Please apologise the poor spelling, vague indications and general conciseness.

Thanks for the review and get better!

@YaelDillies YaelDillies requested a review from b-mehta November 10, 2024 10:02
Copy link
Copy Markdown
Contributor

@b-mehta b-mehta left a comment

Choose a reason for hiding this comment

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

This is looking in pretty good shape!

Copy link
Copy Markdown
Contributor

@b-mehta b-mehta 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 d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 12, 2024

✌️ ooovi can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Nov 12, 2024
Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
@ooovi
Copy link
Copy Markdown
Collaborator Author

ooovi commented Nov 12, 2024

bors r+

@ooovi ooovi closed this Nov 12, 2024
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 12, 2024

Already running a review

@ooovi ooovi reopened this Nov 12, 2024
@ooovi
Copy link
Copy Markdown
Collaborator Author

ooovi commented Nov 12, 2024

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Nov 12, 2024
add clique number, maximal and maximum cliques, and theorems about the relationship between clique number and the cardinality of cliques.



Co-authored-by: Christoph Spiegel <christophspiegel.berlin@gmail.comm>
Co-authored-by: FordUniver <61389961+FordUniver@users.noreply.github.com>
Co-authored-by: ooovi <79147175+ooovi@users.noreply.github.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 12, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Combinatorics/SimpleGraph/Clique): add clique number [Merged by Bors] - feat(Combinatorics/SimpleGraph/Clique): add clique number Nov 12, 2024
@mathlib-bors mathlib-bors bot closed this Nov 12, 2024
@mathlib-bors mathlib-bors bot deleted the feat-clique-number branch November 12, 2024 10:47
mathlib-bors bot pushed a commit that referenced this pull request Nov 12, 2024
Jun2M pushed a commit that referenced this pull request Nov 17, 2024
add clique number, maximal and maximum cliques, and theorems about the relationship between clique number and the cardinality of cliques.



Co-authored-by: Christoph Spiegel <christophspiegel.berlin@gmail.comm>
Co-authored-by: FordUniver <61389961+FordUniver@users.noreply.github.com>
Co-authored-by: ooovi <79147175+ooovi@users.noreply.github.com>
Jun2M pushed a commit that referenced this pull request Nov 17, 2024
TobiasLeichtfried pushed a commit that referenced this pull request Nov 21, 2024
add clique number, maximal and maximum cliques, and theorems about the relationship between clique number and the cardinality of cliques.



Co-authored-by: Christoph Spiegel <christophspiegel.berlin@gmail.comm>
Co-authored-by: FordUniver <61389961+FordUniver@users.noreply.github.com>
Co-authored-by: ooovi <79147175+ooovi@users.noreply.github.com>
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. delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-combinatorics Combinatorics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants