Skip to content

feat(Combinatorics/SimpleGraph/Subgraph): a couple of subgraphOfAdj lemmas#36308

Open
SnirBroshi wants to merge 1 commit intoleanprover-community:masterfrom
SnirBroshi:feature/simple-graph/subgraph/of-adj-iff
Open

feat(Combinatorics/SimpleGraph/Subgraph): a couple of subgraphOfAdj lemmas#36308
SnirBroshi wants to merge 1 commit intoleanprover-community:masterfrom
SnirBroshi:feature/simple-graph/subgraph/of-adj-iff

Conversation

@SnirBroshi
Copy link
Copy Markdown
Collaborator

@SnirBroshi SnirBroshi commented Mar 7, 2026

Also golf a lemma (it's one line longer but it looks simpler to me).


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 7, 2026

PR summary 6e9770b320

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ subgraphOfAdj_adj_self
+ subgraphOfAdj_le_iff

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

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.

Thanks!

maintainer delegate

Comment on lines +945 to +950
refine ⟨fun u ↦ ?_, fun v' w' ↦ ?_⟩
· rintro (rfl | rfl)
exacts [h.fst_mem, h.snd_mem]
· rw [subgraphOfAdj_adj, Sym2.eq_iff]
rintro (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)
exacts [h, h.symm]
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.

Maybe grind can golf this even further?

Copy link
Copy Markdown
Collaborator Author

@SnirBroshi SnirBroshi Apr 14, 2026

Choose a reason for hiding this comment

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

This is the best I got:

Suggested change
refine ⟨fun u ↦ ?_, fun v' w' ↦ ?_⟩
· rintro (rfl | rfl)
exacts [h.fst_mem, h.snd_mem]
· rw [subgraphOfAdj_adj, Sym2.eq_iff]
rintro (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)
exacts [h, h.symm]
constructor
· grind [subgraphOfAdj_verts, h.fst_mem, h.snd_mem]
· grind [subgraphOfAdj_adj, h.symm]

Do you prefer it? I'm not sure how robust it is.
If we had some Subgraph.le_iff definitional theorem we might be able to do grind [subgraphOfAdj, H.le_iff, H.edge_vert, h.symm] for the entire theorem (doesn't work for some reason)

@github-actions
Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@mathlib-triage mathlib-triage bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. t-combinatorics Combinatorics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants