leanprover-community / leanprover-community/mathlib4

Graph theory def: Maximal/maximum cliques & independent sets

Open
#34,962 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help-wanted t-combinatorics
Dominant language
Lean
Stars
4.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

We have SimpleGraph.IsClique and SimpleGraph.IsIndepSet for cliques & independent sets in simple graphs.

We also have SimpleGraph.IsMaximumClique and SimpleGraph.IsMaximumIndepSet for the maximum versions.

The file Mathlib.Combinatorics.SimpleGraph.Clique also proves things about the maximal versions, using Maximal G.IsClique s and Maximal G.IsIndepSet s inline while naming theorems with "isMaximalClique" and "isMaximalIndepSet".

I suggest we're missing the following defs:

open Cardinal

def IsMaximalClique (G : SimpleGraph V) (s : Set V) :=
  Maximal G.IsClique s

def IsMaximumClique (G : SimpleGraph V) (s : Set V) :=
  MaximalFor G.IsClique (#·) s

def IsMaximalIndepSet (G : SimpleGraph V) (s : Set V) :=
  Maximal G.IsIndepSet s

def IsMaximumIndepSet (G : SimpleGraph V) (s : Set V) :=
  MaximalFor G.IsIndepSet (#·) s

where the maximum versions are intended to replace the existing structures with the same name.

I think not having the maximal versions is hurting Loogle-ability, and that we should use Maximal/MaximalFor where possible to gain access to useful API.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Mathlib/Combinatorics/SimpleGraph/Clique, where maximal clique and independent-set properties are currently used inline and maximum versions already exist. Review the existing theorems and structures, then check references to the current maximum definitions before adding the proposed names and updating their uses. Done means the definitions are available for Loogle and the relevant mathlib checks pass.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.