Skip to content

Tree#3

Open
yzll0 wants to merge 6 commits into
mainfrom
tree
Open

Tree#3
yzll0 wants to merge 6 commits into
mainfrom
tree

Conversation

@yzll0
Copy link
Copy Markdown
Collaborator

@yzll0 yzll0 commented May 6, 2026

Add core graph-walk infrastructure and tree-related results for undirected simple graphs.

Split core walk definitions into VertexSeq and Walk
Add helper lemmas for walk edge sets, vertex sequences, and walks in graphs
Add deleteEdge for simple graphs
Add component helper lemmas
Add bridge definitions and bridge-related lemmas
Add tree/forest definitions and tree's equivalence theorems

Set.MapsTo f (components (deleteEdge G e))
((components G).disjSum {()}) ∧
Set.InjOn f (components (deleteEdge G e)) := by
classical
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why this line is needed?


/-- The subgraph induced by a finite vertex set. -/
@[simp, grind] noncomputable def inducedSubgraph (G : SimpleGraph α) (C : Finset α) :
SimpleGraph α := by classical
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

redundant

/-! ## Induced subgraphs and component-wise counting identities -/

/-- The subgraph induced by a finite vertex set. -/
@[simp, grind] noncomputable def inducedSubgraph (G : SimpleGraph α) (C : Finset α) :
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Can we avoid noncomputability? I want it to be computable by default.


/- `componentOf G v` is the connected component containing `v`. -/
/-- The connected component containing `v`. -/
@[simp, grind] noncomputable def componentOf (G : SimpleGraph α) (v : Vertex G) : Finset α := by
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Can we avoid noncomputable?

Reachable G u v → Reachable H u v)
(hNum : numComponents G = numComponents H):
∀ u v : α,
u ∈ G.vertexSet → v ∈ G.vertexSet → Reachable H u v → Reachable G u v := by classical
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Suggested change
u ∈ G.vertexSet → v ∈ G.vertexSet → Reachable H u v → Reachable G u v := by classical
u ∈ V(G), ∀ v ∈ V(G), H.Reachable u v → G.Reachable u v := by classical

Try to use notation more. My general comment is that try to make sure that the statement looks like English.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This comment applies broadly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants