leanprover-community / leanprover-community/mathlib4
IsMatching is only defined on subgraphs of a simple graph, rather than on simple graphs
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 4.2k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
In Combinatorics.SimpleGraph.Matching, there is the following definition:
def Subgraph.IsMatching {V : Type u} {G : SimpleGraph V} (M : Subgraph G) : Prop := ∀ ⦃v⦄, v ∈ M.verts → ∃! w, M.Adj v w
This definition doesn't use G at all. So I think that M.IsMatching should be defined for all M : SimpleGraph V, rather than for M : Subgraph G, and the dependence on G should be removed. If this change were made, I believe that it would still be possible to write M.IsMatching for M : Subgraph G, because M would get coerced to a graph on the vertex set M.verts.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Mathlib/Combinatorics/SimpleGraph/Matching.lean at Subgraph.IsMatching, then inspect references to the definition and the relevant coercions. The change is complete when IsMatching is available for simple graphs without depending on G, affected uses still elaborate, and the mathlib build passes.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100