Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(Combinatorics/SimpleGraph): define Copy #20658

Closed
wants to merge 25 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ee3e2db
Add SubgraphIso.lean
mitchell-horner Jan 11, 2025
197db7f
Update docstring
mitchell-horner Jan 12, 2025
5469b9f
Update Mathlib/Combinatorics/SimpleGraph/SubgraphIso.lean
mitchell-horner Feb 6, 2025
0df5c9b
Add newline
mitchell-horner Feb 6, 2025
e3448e9
Merge branch 'master' into mitchell-horner/subgraph-iso
mitchell-horner Feb 24, 2025
29b294a
Rename `SubgraphIso` to `Copy`
mitchell-horner Mar 4, 2025
f3471a5
Update docstrings
mitchell-horner Mar 5, 2025
012c41a
Move Subgraph.coeCopy
mitchell-horner Mar 5, 2025
280cd43
Refactor `Copy`
mitchell-horner Mar 5, 2025
d9d99ca
Updates to `IsIsoSubgraph`
mitchell-horner Mar 5, 2025
17de839
Refactor `Free`
mitchell-horner Mar 5, 2025
c6ec739
Add implicit vars
mitchell-horner Mar 6, 2025
d6ed572
`ofLE` is functorial
mitchell-horner Mar 6, 2025
d042f2a
Golfing
mitchell-horner Mar 6, 2025
846d162
Rename to `IsContained`
mitchell-horner Mar 8, 2025
cdb6c5c
Impl `free_bot`
mitchell-horner Mar 8, 2025
bac6934
Update docstring
mitchell-horner Mar 9, 2025
acae0fd
Misc. renaming/refactoring
mitchell-horner Mar 9, 2025
5878c9b
Rename to `IsContained.of_le`
mitchell-horner Mar 12, 2025
fa1397e
Impl `bot_isContained_of_card_le`
mitchell-horner Mar 12, 2025
820c6c5
Rename to `Subgraph.Copy.map`
mitchell-horner Mar 12, 2025
cb40389
Impl `bot_isContained_iff_card_le`
mitchell-horner Mar 13, 2025
c34a8f8
Refactor Copy.lean
mitchell-horner Mar 13, 2025
fdf85ac
Remove `bot_isContained_iff_nonempty`
mitchell-horner Mar 14, 2025
ea7425d
Golfing Copy.lean
mitchell-horner Mar 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Golfing
mitchell-horner committed Mar 6, 2025
commit d042f2a0c2086f7164b4e7eca9a71258439c7e2c
7 changes: 3 additions & 4 deletions Mathlib/Combinatorics/SimpleGraph/Copy.lean
Original file line number Diff line number Diff line change
@@ -161,8 +161,8 @@ theorem isIsoSubgraph_congr (e : A ≃g B) : A ⊑ C ↔ B ⊑ C :=
⟨isIsoSubgraph_trans ⟨e.symm.toCopy⟩, isIsoSubgraph_trans ⟨e.toCopy⟩⟩

/-- A simple graph having no vertices is contained in any simple graph. -/
lemma isIsoSubgraph_of_isEmpty [IsEmpty α] : A ⊑ B := by
use ⟨isEmptyElim, fun {a} ↦ isEmptyElim a⟩, isEmptyElim
lemma isIsoSubgraph_of_isEmpty [IsEmpty α] : A ⊑ B :=
⟨⟨isEmptyElim, fun {a} ↦ isEmptyElim a⟩, isEmptyElim

/-- A simple graph having no edges is contained in any simple graph having sufficent vertices. -/
theorem isIsoSubgraph_of_isEmpty_edgeSet [IsEmpty A.edgeSet] [Fintype α] [Fintype β]
@@ -171,8 +171,7 @@ theorem isIsoSubgraph_of_isEmpty_edgeSet [IsEmpty A.edgeSet] [Fintype α] [Finty
let ι : α ↪ β := Classical.arbitrary (α ↪ β)
exact ⟨⟨ι, isEmptyElim ∘ fun hadj ↦ (⟨s(_, _), hadj⟩ : A.edgeSet)⟩, ι.injective⟩

lemma bot_isIsoSubgraph (f : α ↪ β) : (⊥ : SimpleGraph α) ⊑ B := by
use ⟨f, False.elim⟩, f.injective
lemma bot_isIsoSubgraph (f : α ↪ β) : (⊥ : SimpleGraph α) ⊑ B := ⟨⟨f, False.elim⟩, f.injective⟩

/-- A simple graph `G` contains all `Subgraph G` coercions. -/
lemma Subgraph.coe_isIsoSubgraph (G' : G.Subgraph) : G'.coe ⊑ G := ⟨G'.coeCopy⟩