Skip to content

[Merged by Bors] - feat(Combinatorics/SimpleGraph): add independent sets#18608

Closed
ooovi wants to merge 35 commits intomasterfrom
feat-independent-set
Closed

[Merged by Bors] - feat(Combinatorics/SimpleGraph): add independent sets#18608
ooovi wants to merge 35 commits intomasterfrom
feat-independent-set

Conversation

@ooovi
Copy link
Copy Markdown
Collaborator

@ooovi ooovi commented Nov 4, 2024

dualize the clique API to obtain independent sets, prove theorems about the dual relationship to cliques, dualize and add some theorems.


we only commit dual versions of theorems about the coclique number because we require them for a proof of mantels theorem. i have dualizations of most other theorems in the clique file, in case you also want those in this (or a subsequent) PR. give word if there are any other results you would like to see (maybe a refactor of graph partitions or a theorem about antichains?).

lemma compl_independentSet_meets_every_edge and theorem isIndependentSet_neighborSet_if_triangleFree are also required for our proof and included in this PR, but might be too specific for mathlib.

Open in Gitpod

@ooovi ooovi requested a review from YaelDillies November 4, 2024 14:34
@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 Nov 4, 2024
@ooovi ooovi requested a review from kmill November 4, 2024 14:34
@github-actions github-actions bot added the t-combinatorics Combinatorics label Nov 4, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 4, 2024

PR summary 48c66754cc

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ IndepSetFree
+ IndepSetFreeOn
+ IsIndepSet
+ IsIndepSet.card_le_indepNum
+ IsIndepSet.nonempty_mem_compl_mem_edge
+ IsMaximumIndepSet
+ IsMaximumIndepSet.isMaximalIndepSet
+ IsNIndepSet
+ cliqueFree_compl
+ cliqueNum_compl
+ exists_isNIndepSet_indepNum
+ indepNum
+ indepNum_compl
+ indepSetFinset
+ indepSetFree_compl
+ indepSetSet
+ instance [DecidableEq α] [DecidableRel G.Adj] {n : ℕ} {s : Finset α} :
+ instance [DecidableEq α] [DecidableRel G.Adj] {s : Finset α} : Decidable (G.IsIndepSet s)
+ isClique_compl
+ isIndepSet_compl
+ isIndepSet_iff
+ isIndepSet_neighborSet_of_triangleFree
+ isMaximalClique_compl
+ isMaximalIndepSet_compl
+ isMaximalIndepSet_iff
+ isMaximumClique_compl
+ isMaximumIndepSet_compl
+ isNClique_compl
+ isNIndepSet_compl
+ maximumIndepSet_card_eq_indepNum
+ maximumIndepSet_exists
+ mem_indepSetFinset_iff
+ mem_indepSetSet_iff

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

@ooovi ooovi changed the base branch from feat-clique-number to master November 4, 2024 14:41
@FordUniver FordUniver force-pushed the feat-independent-set branch from b4255fb to 9de4667 Compare November 5, 2024 07:56
@YaelDillies
Copy link
Copy Markdown
Contributor

Don't forget to remove awaiting-author once you have addressed all comments 😉

@ooovi ooovi removed the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 13, 2024
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.

Looks good to me. Will leave it to you, @b-mehta

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@b-mehta b-mehta added the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Nov 26, 2024
@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 Nov 26, 2024
@b-mehta b-mehta added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 26, 2024
@YaelDillies
Copy link
Copy Markdown
Contributor

You can merge master to fix the weird CI error

@ooovi
Copy link
Copy Markdown
Collaborator Author

ooovi commented Nov 27, 2024

You can merge master to fix the weird CI error

I did, then the weird error appeared 😅

@YaelDillies
Copy link
Copy Markdown
Contributor

YaelDillies commented Nov 27, 2024

Are you sure you did git fetch before running git merge origin/master? If so, then I am afraid we will have to let Damiano know!

@ooovi ooovi removed the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 27, 2024
@ooovi
Copy link
Copy Markdown
Collaborator Author

ooovi commented Nov 27, 2024

Are you sure you did git fetch before running git merge origin/master? If so, then I am afraid we will have to let Damiano know!

I was sure, albeit unrightly so! Sorry.

@b-mehta b-mehta self-assigned this Nov 27, 2024
@ooovi ooovi requested a review from b-mehta December 4, 2024 14:43
@b-mehta
Copy link
Copy Markdown
Contributor

b-mehta commented Jan 11, 2025

Nice work, thank you!

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Jan 11, 2025
mathlib-bors bot pushed a commit that referenced this pull request Jan 11, 2025
dualize the clique API to obtain independent sets, prove theorems about the dual relationship to cliques, dualize and add some theorems.



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

mathlib-bors bot commented Jan 11, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Combinatorics/SimpleGraph): add independent sets [Merged by Bors] - feat(Combinatorics/SimpleGraph): add independent sets Jan 11, 2025
@mathlib-bors mathlib-bors bot closed this Jan 11, 2025
@mathlib-bors mathlib-bors bot deleted the feat-independent-set branch January 11, 2025 19:03
Julian added a commit that referenced this pull request Jan 12, 2025
* origin/master: (88 commits)
  chore(scripts): update nolints.json (#20672)
  chore: de-simp `map_eq_zero_iff_eq_one` (#20662)
  feat(Combinatorics/SimpleGraph): add independent sets (#18608)
  chore(CategoryTheory/Limits/Cones): functoriality of `mapCone` (#20641)
  feat(Algebra/Category/ModuleCat): pullback of presheaves of modules (#17366)
  feat(AlgebraicTopology): model categories (#19158)
  chore(CategoryTheory): make NormalEpi/MonoCategory and RegularEpi/MonoCategory props (#19548)
  feat(Data/List/ReduceOption): add replicate theorems (#20644)
  feat: approximate subgroups (#20050)
  feat: use scoped trace nodes in linarith (#19855)
  feat: disjoint union of charted spaces (#20619)
  feat: add some term elaborators for reduction (#15192)
  feat(Topology/Category): category of delta-generated spaces (#19499)
  add a variable_alias for Quantale and AddQuantale (#19282)
  feat(Computability/DFA): implement `isRegular_iff` (#19940)
  chore: unpin and bump batteries and importgraph (#20651)
  chore: split `Mathlib/Algebra/Group/Int` (#20624)
  feat: three lemmas related to Hausdorff distance (#20585)
  chore: `initialize_simps_projections` for `Submodule` (#20582)
  feat(Order): Boolean algebra structure on idempotents (#20618)
  chore(CategoryTheory): moving/renaming Subpresheaf (#20583)
  refactor(IntermediateField/Adjoin): Split off relation to `Algebra.adjoin` (#20630)
  feat: sets of doubling strictly less than 3/2 (#20572)
  chore(TensorProduct): universe polymorphism in EquationalCriterion (#20452)
  feat: `s \ t ∩ u = (s ∩ u) \ t` (#20298)
  feat: product of subalgebras (#20202)
  feat: `Submodule.restrictScalars` commutes with `pow` (#20581)
  feat: `a ∈ s ^ n` iff there exists a sequence `f` of `n` elements of `s` such that `∏ i, f i = a` (#20580)
  chore: make `FooHom.coe_id` a `norm_cast` lemma (#20576)
  chore: use ofNat more (#20546)
  feat(CategoryTheory/Shift/Opposite and CategoryTheory/Shift/Pullback): `CommShift` structures on adjunctions are compatible with opposites and pullbacks (#20363)
  feat(FieldTheory/Differential/Liouville): prove the algebraic case of Liouville's theorem (#16797)
  refactor: remove the `CompactSpace` field from `Unique{NonUnital}ContinuousFunctionalCalculus` (#20590)
  feat: Make `PNat.recOn` induction eliminator (#20617)
  feat(Analysis/SpecialFunctions/Pow/Real): add some lemmas (#20608)
  feat: If `s ∆ t` is finite, then `s ∆ u` is finite iff `t ∆ u` is (#20574)
  feat: `⨅ i, f i ≤ ⨆ i, f i` (#20573)
  chore(Geometry/Manifold): move SmoothManifoldWithCorners.lean to IsManifold.lean (#20611)
  feat: AbsoluteValue.IsNontrivial (#20588)
  chore(Data/Finsupp): split off extensionality from `Defs.lean` (#19092)
  chore(Data/Set): split the `CoeSort` instance to its own file (#19031)
  feat(Algebra/Order/Archimedean/Basic): powers between two elements (#20612)
  feature(Algebra/Ring/Idempotents): product of an idempotent and its complement (#20286)
  chore: cleanup more `erw` (#20601)
  chore(GroupTheory/CoprodI): shorten proof of lift_word_prod_nontrivial_of_not_empty (#20587)
  chore: cleanup imports in PrimePow/Divisors (#20626)
  chore: split Algebra/BigOperators/Group/List (#20625)
  chore: reduce Topology->Order imports by moving content (#20627)
  chore(Algebra/Lie/DirectSum): shorten proof of lieAlgebraOf.map_lie' (#20592)
  refactor: Split `FieldTheory/Adjoin.lean` into `Defs.lean` and `Basic.lean` (#20333)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! ready-to-merge This PR has been sent to bors. t-combinatorics Combinatorics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants