combinatorics.simple_graph.finsubgraphMathlib.Combinatorics.SimpleGraph.Finsubgraph

This file has been ported!

Changes since the initial port

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.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

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

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -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)
Diff
@@ -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)
Diff
@@ -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"
 
Diff
@@ -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
 
Diff
@@ -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
Diff
@@ -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
Diff
@@ -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
Diff
@@ -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.
 
Diff
@@ -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
 
Diff
@@ -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

Changes in mathlib4

mathlib3
mathlib4
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -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]
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -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
 
feat: CompletelyDistribLattice (#5238)

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.

  • Product/pi/order dual instances for completely distributive lattices, etc.
  • Every complete linear order is a completely distributive lattice.
  • Every atomic complete Boolean algebra is a complete atomic Boolean algebra.
  • Every complete atomic Boolean algebra is indeed (co)atom(ist)ic.
  • Atom(ist)ic orders are closed under pis.
  • All existing types with CompleteDistribLattice instances are upgraded to CompletelyDistribLattice.
  • All existing types with CompleteBooleanAlgebra instances are upgraded to CompleteAtomicBooleanAlgebra.

See related discussion on Zulip.

Diff
@@ -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. -/
chore: scope notations from category theory. (#5685)

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.

Diff
@@ -36,7 +36,7 @@ finite subgraphs `G'' ≤ G'`, the inverse system `finsubgraphHomFunctor` restri
 -/
 
 
-open Set
+open Set CategoryTheory
 
 universe u v
 
feat: port Combinatorics.SimpleGraph.Finsubgraph (#4010)

Co-authored-by: Moritz Firsching <firsching@google.com>

Dependencies 8 + 404

405 files ported (98.1%)
167660 lines ported (97.1%)
Show graph

The unported dependencies are