Documentation

CslibFrontier.Foundations.ModelTheory.Graph

Graph maps as maps of Language.graph-structures #

A simple graph G on V is a structure of Mathlib's language of graphs FirstOrder.Language.graph through SimpleGraph.structure. This file adds the missing IsEmpty and Finite instances on the relation symbols of Language.graph and translates between the graph maps of Mathlib/Combinatorics/SimpleGraph/Maps.lean and the maps of Language.graph-structures: a graph isomorphism G ≃g H is exactly an equivalence V ≃[Language.graph] W of the structures G.structure and H.structure, and an induced embedding G ↪g H is exactly an embedding V ↪[Language.graph] W. Isomorphisms therefore transfer the realization of every first-order formula, and isomorphic graphs satisfy the same sentences.

Main definitions #

Main results #

The graph language has no nullary relation symbols, matching the analogous instance for Language.order in Mathlib/ModelTheory/Order.lean.

The graph language has finitely many relation symbols.

An induced embedding of simple graphs is an embedding of the Language.graph-structures.

An embedding of the Language.graph-structures of two simple graphs is an induced embedding of the graphs.

@[simp]
theorem SimpleGraph.Embedding.coe_toLanguageEmbedding {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} (f : G ↪g H) :

A graph isomorphism is an equivalence of the Language.graph-structures.

An equivalence of the Language.graph-structures of two simple graphs is a graph isomorphism.

@[simp]
theorem SimpleGraph.Iso.coe_toLanguageEquiv {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} (e : G ≃g H) :
⇑e.toLanguageEquiv = ⇑e
@[simp]
theorem SimpleGraph.Iso.coe_ofLanguageEquiv {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} (f : FirstOrder.Language.graph.Equiv V W) :
⇑(ofLanguageEquiv f) = ⇑f
theorem SimpleGraph.Iso.realize_boundedFormula_iff {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} (e : G ≃g H) {α : Type u_3} {n : ℕ} (φ : FirstOrder.Language.graph.BoundedFormula α n) (v : α → V) (xs : Fin n → V) :
φ.Realize (⇑e ∘ v) (⇑e ∘ xs) ↔ φ.Realize v xs

A graph isomorphism transfers the realization of bounded formulas of the language of graphs: φ holds in H at the image under e of an assignment exactly when it holds in G at the assignment.

theorem SimpleGraph.Iso.realize_formula_iff {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} (e : G ≃g H) {α : Type u_3} (φ : FirstOrder.Language.graph.Formula α) (v : α → V) :
φ.Realize (⇑e ∘ v) ↔ φ.Realize v

A graph isomorphism transfers the realization of formulas of the language of graphs: φ holds in H at the image under e of an assignment exactly when it holds in G at the assignment.

theorem SimpleGraph.Iso.realize_sentence_iff {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} (e : G ≃g H) (φ : FirstOrder.Language.graph.Sentence) :
V ⊨ φ ↔ W ⊨ φ

Isomorphic simple graphs satisfy the same sentences of the language of graphs.