combinatorics.simple_graph.finsubgraph
⟷
Mathlib.Combinatorics.SimpleGraph.Finsubgraph
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -148,7 +148,7 @@ theorem nonempty_hom_of_forall_finite_subgraph_hom [Finite W]
by
intro G'
haveI : Fintype ↥G'.unop.val.verts := G'.unop.property.fintype
- haveI : Fintype (↥G'.unop.val.verts → W) := by classical
+ haveI : Fintype (↥G'.unop.val.verts → W) := by classical exact Pi.fintype
exact Fintype.ofInjective (fun f => f.toFun) RelHom.coe_fn_injective
-- Use compactness to obtain a section.
obtain ⟨u, hu⟩ := nonempty_sections_of_finite_inverse_system (finsubgraph_hom_functor G F)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -148,7 +148,7 @@ theorem nonempty_hom_of_forall_finite_subgraph_hom [Finite W]
by
intro G'
haveI : Fintype ↥G'.unop.val.verts := G'.unop.property.fintype
- haveI : Fintype (↥G'.unop.val.verts → W) := by classical exact Pi.fintype
+ haveI : Fintype (↥G'.unop.val.verts → W) := by classical
exact Fintype.ofInjective (fun f => f.toFun) RelHom.coe_fn_injective
-- Use compactness to obtain a section.
obtain ⟨u, hu⟩ := nonempty_sections_of_finite_inverse_system (finsubgraph_hom_functor G F)
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2022 Joanna Choules. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joanna Choules
-/
-import Mathbin.CategoryTheory.CofilteredSystem
-import Mathbin.Combinatorics.SimpleGraph.Subgraph
+import CategoryTheory.CofilteredSystem
+import Combinatorics.SimpleGraph.Subgraph
#align_import combinatorics.simple_graph.finsubgraph from "leanprover-community/mathlib"@"50251fd6309cca5ca2e747882ffecd2729f38c5d"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2022 Joanna Choules. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joanna Choules
-
-! This file was ported from Lean 3 source module combinatorics.simple_graph.finsubgraph
-! leanprover-community/mathlib commit 50251fd6309cca5ca2e747882ffecd2729f38c5d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.CategoryTheory.CofilteredSystem
import Mathbin.Combinatorics.SimpleGraph.Subgraph
+#align_import combinatorics.simple_graph.finsubgraph from "leanprover-community/mathlib"@"50251fd6309cca5ca2e747882ffecd2729f38c5d"
+
/-!
# Homomorphisms from finite subgraphs
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -60,7 +60,6 @@ abbrev FinsubgraphHom (G' : G.Finsubgraph) (F : SimpleGraph W) :=
#align simple_graph.finsubgraph_hom SimpleGraph.FinsubgraphHom
-/
--- mathport name: «expr →fg »
local infixl:50 " →fg " => FinsubgraphHom
instance : OrderBot G.Finsubgraph where
@@ -103,17 +102,22 @@ def finsubgraphOfAdj {u v : V} (e : G.adj u v) : G.Finsubgraph :=
#align simple_graph.finsubgraph_of_adj SimpleGraph.finsubgraphOfAdj
-/
+#print SimpleGraph.singletonFinsubgraph_le_adj_left /-
-- Lemmas establishing the ordering between edge- and vertex-generated subgraphs.
theorem singletonFinsubgraph_le_adj_left {u v : V} {e : G.adj u v} :
singletonFinsubgraph u ≤ finsubgraphOfAdj e := by
simp [singleton_finsubgraph, finsubgraph_of_adj]
#align simple_graph.singleton_finsubgraph_le_adj_left SimpleGraph.singletonFinsubgraph_le_adj_left
+-/
+#print SimpleGraph.singletonFinsubgraph_le_adj_right /-
theorem singletonFinsubgraph_le_adj_right {u v : V} {e : G.adj u v} :
singletonFinsubgraph v ≤ finsubgraphOfAdj e := by
simp [singleton_finsubgraph, finsubgraph_of_adj]
#align simple_graph.singleton_finsubgraph_le_adj_right SimpleGraph.singletonFinsubgraph_le_adj_right
+-/
+#print SimpleGraph.FinsubgraphHom.restrict /-
/-- Given a homomorphism from a subgraph to `F`, construct its restriction to a sub-subgraph. -/
def FinsubgraphHom.restrict {G' G'' : G.Finsubgraph} (h : G'' ≤ G') (f : G' →fg F) : G'' →fg F :=
by
@@ -121,13 +125,16 @@ def FinsubgraphHom.restrict {G' G'' : G.Finsubgraph} (h : G'' ≤ G') (f : G'
rintro ⟨u, hu⟩ ⟨v, hv⟩ huv
exact f.map_rel' (h.2 huv)
#align simple_graph.finsubgraph_hom.restrict SimpleGraph.FinsubgraphHom.restrict
+-/
+#print SimpleGraph.finsubgraphHomFunctor /-
/-- The inverse system of finite homomorphisms. -/
def finsubgraphHomFunctor (G : SimpleGraph V) (F : SimpleGraph W) : G.Finsubgraphᵒᵖ ⥤ Type max u v
where
obj G' := G'.unop →fg F
map G' G'' g f := f.restrict (CategoryTheory.leOfHom g.unop)
#align simple_graph.finsubgraph_hom_functor SimpleGraph.finsubgraphHomFunctor
+-/
#print SimpleGraph.nonempty_hom_of_forall_finite_subgraph_hom /-
/-- If every finite subgraph of a graph `G` has a homomorphism to a finite graph `F`, then there is
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -103,35 +103,17 @@ def finsubgraphOfAdj {u v : V} (e : G.adj u v) : G.Finsubgraph :=
#align simple_graph.finsubgraph_of_adj SimpleGraph.finsubgraphOfAdj
-/
-/- warning: simple_graph.singleton_finsubgraph_le_adj_left -> SimpleGraph.singletonFinsubgraph_le_adj_left is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {e : SimpleGraph.Adj.{u1} V G u v}, LE.le.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.hasLe.{u1} (SimpleGraph.Subgraph.{u1} V G) (Preorder.toHasLe.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.completeDistribLattice.{u1} V G))))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))) (SimpleGraph.singletonFinsubgraph.{u1} V G u) (SimpleGraph.finsubgraphOfAdj.{u1} V G u v e)
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {e : SimpleGraph.Adj.{u1} V G u v}, LE.le.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.le.{u1} (SimpleGraph.Subgraph.{u1} V G) (Preorder.toLE.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instCompleteDistribLatticeSubgraph.{u1} V G))))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))) (SimpleGraph.singletonFinsubgraph.{u1} V G u) (SimpleGraph.finsubgraphOfAdj.{u1} V G u v e)
-Case conversion may be inaccurate. Consider using '#align simple_graph.singleton_finsubgraph_le_adj_left SimpleGraph.singletonFinsubgraph_le_adj_leftₓ'. -/
-- Lemmas establishing the ordering between edge- and vertex-generated subgraphs.
theorem singletonFinsubgraph_le_adj_left {u v : V} {e : G.adj u v} :
singletonFinsubgraph u ≤ finsubgraphOfAdj e := by
simp [singleton_finsubgraph, finsubgraph_of_adj]
#align simple_graph.singleton_finsubgraph_le_adj_left SimpleGraph.singletonFinsubgraph_le_adj_left
-/- warning: simple_graph.singleton_finsubgraph_le_adj_right -> SimpleGraph.singletonFinsubgraph_le_adj_right is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {e : SimpleGraph.Adj.{u1} V G u v}, LE.le.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.hasLe.{u1} (SimpleGraph.Subgraph.{u1} V G) (Preorder.toHasLe.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.completeDistribLattice.{u1} V G))))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))) (SimpleGraph.singletonFinsubgraph.{u1} V G v) (SimpleGraph.finsubgraphOfAdj.{u1} V G u v e)
-but is expected to have type
- forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {e : SimpleGraph.Adj.{u1} V G u v}, LE.le.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.le.{u1} (SimpleGraph.Subgraph.{u1} V G) (Preorder.toLE.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instCompleteDistribLatticeSubgraph.{u1} V G))))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))) (SimpleGraph.singletonFinsubgraph.{u1} V G v) (SimpleGraph.finsubgraphOfAdj.{u1} V G u v e)
-Case conversion may be inaccurate. Consider using '#align simple_graph.singleton_finsubgraph_le_adj_right SimpleGraph.singletonFinsubgraph_le_adj_rightₓ'. -/
theorem singletonFinsubgraph_le_adj_right {u v : V} {e : G.adj u v} :
singletonFinsubgraph v ≤ finsubgraphOfAdj e := by
simp [singleton_finsubgraph, finsubgraph_of_adj]
#align simple_graph.singleton_finsubgraph_le_adj_right SimpleGraph.singletonFinsubgraph_le_adj_right
-/- warning: simple_graph.finsubgraph_hom.restrict -> SimpleGraph.FinsubgraphHom.restrict is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {W : Type.{u2}} {G : SimpleGraph.{u1} V} {F : SimpleGraph.{u2} W} {G' : SimpleGraph.Finsubgraph.{u1} V G} {G'' : SimpleGraph.Finsubgraph.{u1} V G}, (LE.le.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.hasLe.{u1} (SimpleGraph.Subgraph.{u1} V G) (Preorder.toHasLe.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.completeDistribLattice.{u1} V G))))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))) G'' G') -> (SimpleGraph.FinsubgraphHom.{u1, u2} V W G G' F) -> (SimpleGraph.FinsubgraphHom.{u1, u2} V W G G'' F)
-but is expected to have type
- forall {V : Type.{u1}} {W : Type.{u2}} {G : SimpleGraph.{u1} V} {F : SimpleGraph.{u2} W} {G' : SimpleGraph.Finsubgraph.{u1} V G} {G'' : SimpleGraph.Finsubgraph.{u1} V G}, (LE.le.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.le.{u1} (SimpleGraph.Subgraph.{u1} V G) (Preorder.toLE.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instCompleteDistribLatticeSubgraph.{u1} V G))))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))) G'' G') -> (SimpleGraph.FinsubgraphHom.{u1, u2} V W G G' F) -> (SimpleGraph.FinsubgraphHom.{u1, u2} V W G G'' F)
-Case conversion may be inaccurate. Consider using '#align simple_graph.finsubgraph_hom.restrict SimpleGraph.FinsubgraphHom.restrictₓ'. -/
/-- Given a homomorphism from a subgraph to `F`, construct its restriction to a sub-subgraph. -/
def FinsubgraphHom.restrict {G' G'' : G.Finsubgraph} (h : G'' ≤ G') (f : G' →fg F) : G'' →fg F :=
by
@@ -140,12 +122,6 @@ def FinsubgraphHom.restrict {G' G'' : G.Finsubgraph} (h : G'' ≤ G') (f : G'
exact f.map_rel' (h.2 huv)
#align simple_graph.finsubgraph_hom.restrict SimpleGraph.FinsubgraphHom.restrict
-/- warning: simple_graph.finsubgraph_hom_functor -> SimpleGraph.finsubgraphHomFunctor is a dubious translation:
-lean 3 declaration is
- forall {V : Type.{u1}} {W : Type.{u2}} (G : SimpleGraph.{u1} V), (SimpleGraph.{u2} W) -> (CategoryTheory.Functor.{u1, max u1 u2, u1, succ (max u1 u2)} (Opposite.{succ u1} (SimpleGraph.Finsubgraph.{u1} V G)) (CategoryTheory.Category.opposite.{u1, u1} (SimpleGraph.Finsubgraph.{u1} V G) (Preorder.smallCategory.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.preorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.completeDistribLattice.{u1} V G)))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))))) Type.{max u1 u2} CategoryTheory.types.{max u1 u2})
-but is expected to have type
- forall {V : Type.{u1}} {W : Type.{u2}} (G : SimpleGraph.{u1} V), (SimpleGraph.{u2} W) -> (CategoryTheory.Functor.{u1, max u1 u2, u1, max (succ u1) (succ u2)} (Opposite.{succ u1} (SimpleGraph.Finsubgraph.{u1} V G)) (CategoryTheory.Category.opposite.{u1, u1} (SimpleGraph.Finsubgraph.{u1} V G) (Preorder.smallCategory.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.preorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instCompleteDistribLatticeSubgraph.{u1} V G)))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))))) Type.{max u1 u2} CategoryTheory.types.{max u1 u2})
-Case conversion may be inaccurate. Consider using '#align simple_graph.finsubgraph_hom_functor SimpleGraph.finsubgraphHomFunctorₓ'. -/
/-- The inverse system of finite homomorphisms. -/
def finsubgraphHomFunctor (G : SimpleGraph V) (F : SimpleGraph W) : G.Finsubgraphᵒᵖ ⥤ Type max u v
where
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -175,10 +175,7 @@ theorem nonempty_hom_of_forall_finite_subgraph_hom [Finite W]
refine' ⟨⟨fun v => _, _⟩⟩
·-- Map each vertex using the homomorphism provided for its singleton subgraph.
exact
- (u (Opposite.op (singleton_finsubgraph v))).toFun
- ⟨v, by
- unfold singleton_finsubgraph
- simp⟩
+ (u (Opposite.op (singleton_finsubgraph v))).toFun ⟨v, by unfold singleton_finsubgraph; simp⟩
· -- Prove that the above mapping preserves adjacency.
intro v v' e
/- The homomorphism for each edge's singleton subgraph agrees with those for its source and
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joanna Choules
! This file was ported from Lean 3 source module combinatorics.simple_graph.finsubgraph
-! leanprover-community/mathlib commit c6ef6387ede9983aee397d442974e61f89dfd87b
+! leanprover-community/mathlib commit 50251fd6309cca5ca2e747882ffecd2729f38c5d
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.Combinatorics.SimpleGraph.Subgraph
/-!
# Homomorphisms from finite subgraphs
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file defines the type of finite subgraphs of a `simple_graph` and proves a compactness result
for homomorphisms to a finite codomain.
mathlib commit https://github.com/leanprover-community/mathlib/commit/f8c79b0a623404854a2902b836eac32156fd7712
@@ -43,15 +43,19 @@ variable {V : Type u} {W : Type v} {G : SimpleGraph V} {F : SimpleGraph W}
namespace SimpleGraph
+#print SimpleGraph.Finsubgraph /-
/-- The subtype of `G.subgraph` comprising those subgraphs with finite vertex sets. -/
abbrev Finsubgraph (G : SimpleGraph V) :=
{ G' : G.Subgraph // G'.verts.Finite }
#align simple_graph.finsubgraph SimpleGraph.Finsubgraph
+-/
+#print SimpleGraph.FinsubgraphHom /-
/-- A graph homomorphism from a finite subgraph of G to F. -/
abbrev FinsubgraphHom (G' : G.Finsubgraph) (F : SimpleGraph W) :=
G'.val.coe →g F
#align simple_graph.finsubgraph_hom SimpleGraph.FinsubgraphHom
+-/
-- mathport name: «expr →fg »
local infixl:50 " →fg " => FinsubgraphHom
@@ -82,27 +86,49 @@ instance [Finite V] : CompleteDistribLattice G.Finsubgraph :=
Subtype.coe_injective.CompleteDistribLattice _ (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl)
(fun _ => rfl) rfl rfl
+#print SimpleGraph.singletonFinsubgraph /-
/-- The finite subgraph of G generated by a single vertex. -/
def singletonFinsubgraph (v : V) : G.Finsubgraph :=
⟨SimpleGraph.singletonSubgraph _ v, by simp⟩
#align simple_graph.singleton_finsubgraph SimpleGraph.singletonFinsubgraph
+-/
+#print SimpleGraph.finsubgraphOfAdj /-
/-- The finite subgraph of G generated by a single edge. -/
def finsubgraphOfAdj {u v : V} (e : G.adj u v) : G.Finsubgraph :=
⟨SimpleGraph.subgraphOfAdj _ e, by simp⟩
#align simple_graph.finsubgraph_of_adj SimpleGraph.finsubgraphOfAdj
+-/
+/- warning: simple_graph.singleton_finsubgraph_le_adj_left -> SimpleGraph.singletonFinsubgraph_le_adj_left is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {e : SimpleGraph.Adj.{u1} V G u v}, LE.le.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.hasLe.{u1} (SimpleGraph.Subgraph.{u1} V G) (Preorder.toHasLe.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.completeDistribLattice.{u1} V G))))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))) (SimpleGraph.singletonFinsubgraph.{u1} V G u) (SimpleGraph.finsubgraphOfAdj.{u1} V G u v e)
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {e : SimpleGraph.Adj.{u1} V G u v}, LE.le.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.le.{u1} (SimpleGraph.Subgraph.{u1} V G) (Preorder.toLE.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instCompleteDistribLatticeSubgraph.{u1} V G))))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))) (SimpleGraph.singletonFinsubgraph.{u1} V G u) (SimpleGraph.finsubgraphOfAdj.{u1} V G u v e)
+Case conversion may be inaccurate. Consider using '#align simple_graph.singleton_finsubgraph_le_adj_left SimpleGraph.singletonFinsubgraph_le_adj_leftₓ'. -/
-- Lemmas establishing the ordering between edge- and vertex-generated subgraphs.
theorem singletonFinsubgraph_le_adj_left {u v : V} {e : G.adj u v} :
singletonFinsubgraph u ≤ finsubgraphOfAdj e := by
simp [singleton_finsubgraph, finsubgraph_of_adj]
#align simple_graph.singleton_finsubgraph_le_adj_left SimpleGraph.singletonFinsubgraph_le_adj_left
+/- warning: simple_graph.singleton_finsubgraph_le_adj_right -> SimpleGraph.singletonFinsubgraph_le_adj_right is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {e : SimpleGraph.Adj.{u1} V G u v}, LE.le.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.hasLe.{u1} (SimpleGraph.Subgraph.{u1} V G) (Preorder.toHasLe.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.completeDistribLattice.{u1} V G))))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))) (SimpleGraph.singletonFinsubgraph.{u1} V G v) (SimpleGraph.finsubgraphOfAdj.{u1} V G u v e)
+but is expected to have type
+ forall {V : Type.{u1}} {G : SimpleGraph.{u1} V} {u : V} {v : V} {e : SimpleGraph.Adj.{u1} V G u v}, LE.le.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.le.{u1} (SimpleGraph.Subgraph.{u1} V G) (Preorder.toLE.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instCompleteDistribLatticeSubgraph.{u1} V G))))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))) (SimpleGraph.singletonFinsubgraph.{u1} V G v) (SimpleGraph.finsubgraphOfAdj.{u1} V G u v e)
+Case conversion may be inaccurate. Consider using '#align simple_graph.singleton_finsubgraph_le_adj_right SimpleGraph.singletonFinsubgraph_le_adj_rightₓ'. -/
theorem singletonFinsubgraph_le_adj_right {u v : V} {e : G.adj u v} :
singletonFinsubgraph v ≤ finsubgraphOfAdj e := by
simp [singleton_finsubgraph, finsubgraph_of_adj]
#align simple_graph.singleton_finsubgraph_le_adj_right SimpleGraph.singletonFinsubgraph_le_adj_right
+/- warning: simple_graph.finsubgraph_hom.restrict -> SimpleGraph.FinsubgraphHom.restrict is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {W : Type.{u2}} {G : SimpleGraph.{u1} V} {F : SimpleGraph.{u2} W} {G' : SimpleGraph.Finsubgraph.{u1} V G} {G'' : SimpleGraph.Finsubgraph.{u1} V G}, (LE.le.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.hasLe.{u1} (SimpleGraph.Subgraph.{u1} V G) (Preorder.toHasLe.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.completeDistribLattice.{u1} V G))))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))) G'' G') -> (SimpleGraph.FinsubgraphHom.{u1, u2} V W G G' F) -> (SimpleGraph.FinsubgraphHom.{u1, u2} V W G G'' F)
+but is expected to have type
+ forall {V : Type.{u1}} {W : Type.{u2}} {G : SimpleGraph.{u1} V} {F : SimpleGraph.{u2} W} {G' : SimpleGraph.Finsubgraph.{u1} V G} {G'' : SimpleGraph.Finsubgraph.{u1} V G}, (LE.le.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.le.{u1} (SimpleGraph.Subgraph.{u1} V G) (Preorder.toLE.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instCompleteDistribLatticeSubgraph.{u1} V G))))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))) G'' G') -> (SimpleGraph.FinsubgraphHom.{u1, u2} V W G G' F) -> (SimpleGraph.FinsubgraphHom.{u1, u2} V W G G'' F)
+Case conversion may be inaccurate. Consider using '#align simple_graph.finsubgraph_hom.restrict SimpleGraph.FinsubgraphHom.restrictₓ'. -/
/-- Given a homomorphism from a subgraph to `F`, construct its restriction to a sub-subgraph. -/
def FinsubgraphHom.restrict {G' G'' : G.Finsubgraph} (h : G'' ≤ G') (f : G' →fg F) : G'' →fg F :=
by
@@ -111,6 +137,12 @@ def FinsubgraphHom.restrict {G' G'' : G.Finsubgraph} (h : G'' ≤ G') (f : G'
exact f.map_rel' (h.2 huv)
#align simple_graph.finsubgraph_hom.restrict SimpleGraph.FinsubgraphHom.restrict
+/- warning: simple_graph.finsubgraph_hom_functor -> SimpleGraph.finsubgraphHomFunctor is a dubious translation:
+lean 3 declaration is
+ forall {V : Type.{u1}} {W : Type.{u2}} (G : SimpleGraph.{u1} V), (SimpleGraph.{u2} W) -> (CategoryTheory.Functor.{u1, max u1 u2, u1, succ (max u1 u2)} (Opposite.{succ u1} (SimpleGraph.Finsubgraph.{u1} V G)) (CategoryTheory.Category.opposite.{u1, u1} (SimpleGraph.Finsubgraph.{u1} V G) (Preorder.smallCategory.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.preorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.completeDistribLattice.{u1} V G)))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))))) Type.{max u1 u2} CategoryTheory.types.{max u1 u2})
+but is expected to have type
+ forall {V : Type.{u1}} {W : Type.{u2}} (G : SimpleGraph.{u1} V), (SimpleGraph.{u2} W) -> (CategoryTheory.Functor.{u1, max u1 u2, u1, max (succ u1) (succ u2)} (Opposite.{succ u1} (SimpleGraph.Finsubgraph.{u1} V G)) (CategoryTheory.Category.opposite.{u1, u1} (SimpleGraph.Finsubgraph.{u1} V G) (Preorder.smallCategory.{u1} (SimpleGraph.Finsubgraph.{u1} V G) (Subtype.preorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (PartialOrder.toPreorder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteSemilatticeInf.toPartialOrder.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteLattice.toCompleteSemilatticeInf.{u1} (SimpleGraph.Subgraph.{u1} V G) (Order.Coframe.toCompleteLattice.{u1} (SimpleGraph.Subgraph.{u1} V G) (CompleteDistribLattice.toCoframe.{u1} (SimpleGraph.Subgraph.{u1} V G) (SimpleGraph.Subgraph.instCompleteDistribLatticeSubgraph.{u1} V G)))))) (fun (G' : SimpleGraph.Subgraph.{u1} V G) => Set.Finite.{u1} V (SimpleGraph.Subgraph.verts.{u1} V G G'))))) Type.{max u1 u2} CategoryTheory.types.{max u1 u2})
+Case conversion may be inaccurate. Consider using '#align simple_graph.finsubgraph_hom_functor SimpleGraph.finsubgraphHomFunctorₓ'. -/
/-- The inverse system of finite homomorphisms. -/
def finsubgraphHomFunctor (G : SimpleGraph V) (F : SimpleGraph W) : G.Finsubgraphᵒᵖ ⥤ Type max u v
where
@@ -118,6 +150,7 @@ def finsubgraphHomFunctor (G : SimpleGraph V) (F : SimpleGraph W) : G.Finsubgrap
map G' G'' g f := f.restrict (CategoryTheory.leOfHom g.unop)
#align simple_graph.finsubgraph_hom_functor SimpleGraph.finsubgraphHomFunctor
+#print SimpleGraph.nonempty_hom_of_forall_finite_subgraph_hom /-
/-- If every finite subgraph of a graph `G` has a homomorphism to a finite graph `F`, then there is
a homomorphism from the whole of `G` to `F`. -/
theorem nonempty_hom_of_forall_finite_subgraph_hom [Finite W]
@@ -156,6 +189,7 @@ theorem nonempty_hom_of_forall_finite_subgraph_hom [Finite W]
-- `v` and `v'` are definitionally adjacent in `finsubgraph_of_adj e`
simp [finsubgraph_of_adj]
#align simple_graph.nonempty_hom_of_forall_finite_subgraph_hom SimpleGraph.nonempty_hom_of_forall_finite_subgraph_hom
+-/
end SimpleGraph
mathlib commit https://github.com/leanprover-community/mathlib/commit/195fcd60ff2bfe392543bceb0ec2adcdb472db4c
@@ -4,11 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joanna Choules
! This file was ported from Lean 3 source module combinatorics.simple_graph.finsubgraph
-! leanprover-community/mathlib commit da083dad7f7b82ebc6194306e9abfbff35fda260
+! leanprover-community/mathlib commit c6ef6387ede9983aee397d442974e61f89dfd87b
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
-import Mathbin.Topology.Category.Top.Limits
+import Mathbin.CategoryTheory.CofilteredSystem
import Mathbin.Combinatorics.SimpleGraph.Subgraph
/-!
@@ -29,12 +29,14 @@ for homomorphisms to a finite codomain.
## Implementation notes
-The proof here uses compactness as formulated in `nonempty_sections_of_fintype_inverse_system`. For
+The proof here uses compactness as formulated in `nonempty_sections_of_finite_inverse_system`. For
finite subgraphs `G'' ≤ G'`, the inverse system `finsubgraph_hom_functor` restricts homomorphisms
`G' →fg F` to domain `G''`.
-/
+open Set
+
universe u v
variable {V : Type u} {W : Type v} {G : SimpleGraph V} {F : SimpleGraph W}
@@ -54,6 +56,32 @@ abbrev FinsubgraphHom (G' : G.Finsubgraph) (F : SimpleGraph W) :=
-- mathport name: «expr →fg »
local infixl:50 " →fg " => FinsubgraphHom
+instance : OrderBot G.Finsubgraph where
+ bot := ⟨⊥, finite_empty⟩
+ bot_le _ := bot_le
+
+instance : Sup G.Finsubgraph :=
+ ⟨fun G₁ G₂ => ⟨G₁ ⊔ G₂, G₁.2.union G₂.2⟩⟩
+
+instance : Inf G.Finsubgraph :=
+ ⟨fun G₁ G₂ => ⟨G₁ ⊓ G₂, G₁.2.Subset <| inter_subset_left _ _⟩⟩
+
+instance : DistribLattice G.Finsubgraph :=
+ Subtype.coe_injective.DistribLattice _ (fun _ _ => rfl) fun _ _ => rfl
+
+instance [Finite V] : Top G.Finsubgraph :=
+ ⟨⟨⊤, finite_univ⟩⟩
+
+instance [Finite V] : SupSet G.Finsubgraph :=
+ ⟨fun s => ⟨⨆ G ∈ s, ↑G, Set.toFinite _⟩⟩
+
+instance [Finite V] : InfSet G.Finsubgraph :=
+ ⟨fun s => ⟨⨅ G ∈ s, ↑G, Set.toFinite _⟩⟩
+
+instance [Finite V] : CompleteDistribLattice G.Finsubgraph :=
+ Subtype.coe_injective.CompleteDistribLattice _ (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl)
+ (fun _ => rfl) rfl rfl
+
/-- The finite subgraph of G generated by a single vertex. -/
def singletonFinsubgraph (v : V) : G.Finsubgraph :=
⟨SimpleGraph.singletonSubgraph _ v, by simp⟩
@@ -98,12 +126,6 @@ theorem nonempty_hom_of_forall_finite_subgraph_hom [Finite W]
-- Obtain a `fintype` instance for `W`.
cases nonempty_fintype W
-- Establish the required interface instances.
- haveI : IsDirected G.finsubgraph (· ≤ ·) :=
- ⟨fun i j : G.finsubgraph =>
- ⟨⟨SimpleGraph.Subgraph.union ↑i ↑j, Set.Finite.union i.property j.property⟩,
- by
- simp_rw [← Subtype.coe_le_coe, Subtype.coe_mk]
- exact ⟨le_sup_left, le_sup_right⟩⟩⟩
haveI : ∀ G' : G.finsubgraphᵒᵖ, Nonempty ((finsubgraph_hom_functor G F).obj G') := fun G' =>
⟨h G'.unop G'.unop.property⟩
haveI : ∀ G' : G.finsubgraphᵒᵖ, Fintype ((finsubgraph_hom_functor G F).obj G') :=
@@ -113,7 +135,7 @@ theorem nonempty_hom_of_forall_finite_subgraph_hom [Finite W]
haveI : Fintype (↥G'.unop.val.verts → W) := by classical exact Pi.fintype
exact Fintype.ofInjective (fun f => f.toFun) RelHom.coe_fn_injective
-- Use compactness to obtain a section.
- obtain ⟨u, hu⟩ := nonempty_sections_of_fintype_inverse_system (finsubgraph_hom_functor G F)
+ obtain ⟨u, hu⟩ := nonempty_sections_of_finite_inverse_system (finsubgraph_hom_functor G F)
refine' ⟨⟨fun v => _, _⟩⟩
·-- Map each vertex using the homomorphism provided for its singleton subgraph.
exact
mathlib commit https://github.com/leanprover-community/mathlib/commit/4c586d291f189eecb9d00581aeb3dd998ac34442
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -147,7 +147,7 @@ theorem nonempty_hom_of_forall_finite_subgraph_hom [Finite W]
have hv' : Opposite.op (finsubgraphOfAdj e) ⟶ Opposite.op (singletonFinsubgraph v') :=
Quiver.Hom.op (CategoryTheory.homOfLE singletonFinsubgraph_le_adj_right)
rw [← hu hv, ← hu hv']
- -- porting note: was `apply Hom.map_adj`
+ -- Porting note: was `apply Hom.map_adj`
refine' Hom.map_adj (u (Opposite.op (finsubgraphOfAdj e))) _
-- `v` and `v'` are definitionally adjacent in `finsubgraphOfAdj e`
simp [finsubgraphOfAdj]
@@ -2,15 +2,12 @@
Copyright (c) 2022 Joanna Choules. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joanna Choules
-
-! This file was ported from Lean 3 source module combinatorics.simple_graph.finsubgraph
-! leanprover-community/mathlib commit c6ef6387ede9983aee397d442974e61f89dfd87b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.CategoryTheory.CofilteredSystem
import Mathlib.Combinatorics.SimpleGraph.Subgraph
+#align_import combinatorics.simple_graph.finsubgraph from "leanprover-community/mathlib"@"c6ef6387ede9983aee397d442974e61f89dfd87b"
+
/-!
# Homomorphisms from finite subgraphs
Adds new CompletelyDistribLattice
/CompleteAtomicBooleanAlgebra
classes for complete lattices / complete atomic Boolean algebras that are also completely distributive, and removes the misleading claim that CompleteDistribLattice
/CompleteBooleanAlgebra
are completely distributive.
CompleteDistribLattice
instances are upgraded to CompletelyDistribLattice
.CompleteBooleanAlgebra
instances are upgraded to CompleteAtomicBooleanAlgebra
.@@ -78,8 +78,8 @@ instance [Finite V] : SupSet G.Finsubgraph :=
instance [Finite V] : InfSet G.Finsubgraph :=
⟨fun s => ⟨⨅ G ∈ s, ↑G, Set.toFinite _⟩⟩
-instance [Finite V] : CompleteDistribLattice G.Finsubgraph :=
- Subtype.coe_injective.completeDistribLattice _ (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl)
+instance [Finite V] : CompletelyDistribLattice G.Finsubgraph :=
+ Subtype.coe_injective.completelyDistribLattice _ (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl)
(fun _ => rfl) rfl rfl
/-- The finite subgraph of G generated by a single vertex. -/
Make sure in particular one can import Mathlib.Tactic for teaching without getting category theory notations in scope. Note that only two files needed an extra open.
@@ -36,7 +36,7 @@ finite subgraphs `G'' ≤ G'`, the inverse system `finsubgraphHomFunctor` restri
-/
-open Set
+open Set CategoryTheory
universe u v
The unported dependencies are