File: Mathlib/Combinatorics/SimpleGraph/Partition.lean

full_name: SimpleGraph.Partition.isPartition
code: /-- A `Partition` of a simple graph `G` is a structure constituted by
* `parts`: a set of subsets of the vertices `V` of `G`
* `isPartition`: a proof that `parts` is a proper partition of `V`
* `independent`: a proof that each element of `parts` doesn't have a pair of adjacent vertices
-/
structure Partition where
  /-- `parts`: a set of subsets of the vertices `V` of `G`. -/
  parts : Set (Set V)
  /-- `isPartition`: a proof that `parts` is a proper partition of `V`. -/
  isPartition : Setoid.IsPartition parts
  /-- `independent`: a proof that each element of `parts` doesn't have a pair of adjacent vertices.
-/
  independent : ∀ s ∈ parts, IsAntichain G.Adj s
goal: Setoid.IsPartition self.parts

full_name: SimpleGraph.Partition.parts
code: /-- A `Partition` of a simple graph `G` is a structure constituted by
* `parts`: a set of subsets of the vertices `V` of `G`
* `isPartition`: a proof that `parts` is a proper partition of `V`
* `independent`: a proof that each element of `parts` doesn't have a pair of adjacent vertices
-/
structure Partition where
  /-- `parts`: a set of subsets of the vertices `V` of `G`. -/
  parts : Set (Set V)
  /-- `isPartition`: a proof that `parts` is a proper partition of `V`. -/
  isPartition : Setoid.IsPartition parts
  /-- `independent`: a proof that each element of `parts` doesn't have a pair of adjacent vertices.
-/
  independent : ∀ s ∈ parts, IsAntichain G.Adj s
goal: Set (Set V)

full_name: SimpleGraph.Partition.independent
code: /-- A `Partition` of a simple graph `G` is a structure constituted by
* `parts`: a set of subsets of the vertices `V` of `G`
* `isPartition`: a proof that `parts` is a proper partition of `V`
* `independent`: a proof that each element of `parts` doesn't have a pair of adjacent vertices
-/
structure Partition where
  /-- `parts`: a set of subsets of the vertices `V` of `G`. -/
  parts : Set (Set V)
  /-- `isPartition`: a proof that `parts` is a proper partition of `V`. -/
  isPartition : Setoid.IsPartition parts
  /-- `independent`: a proof that each element of `parts` doesn't have a pair of adjacent vertices.
-/
  independent : ∀ s ∈ parts, IsAntichain G.Adj s
goal: s ∈ self.parts → IsAntichain G.Adj s

full_name: SimpleGraph.Partition
code: /-- A `Partition` of a simple graph `G` is a structure constituted by
* `parts`: a set of subsets of the vertices `V` of `G`
* `isPartition`: a proof that `parts` is a proper partition of `V`
* `independent`: a proof that each element of `parts` doesn't have a pair of adjacent vertices
-/
structure Partition where
  /-- `parts`: a set of subsets of the vertices `V` of `G`. -/
  parts : Set (Set V)
  /-- `isPartition`: a proof that `parts` is a proper partition of `V`. -/
  isPartition : Setoid.IsPartition parts
  /-- `independent`: a proof that each element of `parts` doesn't have a pair of adjacent vertices.
-/
  independent : ∀ s ∈ parts, IsAntichain G.Adj s
goal: Type u

full_name: SimpleGraph.Partition.PartsCardLe
code: /-- Whether a partition `P` has at most `n` parts. A graph with a partition
satisfying this predicate called `n`-partite. (See `SimpleGraph.Partitionable`.) -/
def Partition.PartsCardLe {G : SimpleGraph V} (P : G.Partition) (n : ℕ) : Prop 
goal: Prop

full_name: SimpleGraph.Partitionable
code: /-- Whether a graph is `n`-partite, which is whether its vertex set
can be partitioned in at most `n` independent sets. -/
def Partitionable (n : ℕ) : Prop 
goal: Prop

full_name: SimpleGraph.Partition.partOfVertex
code: /-- The part in the partition that `v` belongs to -/
def partOfVertex (v : V) : Set V 
goal: Set V

full_name: SimpleGraph.Partition.partOfVertex_mem
code: theorem partOfVertex_mem (v : V) : P.partOfVertex v ∈ P.parts 
goal: P.partOfVertex v ∈ P.parts

full_name: SimpleGraph.Partition.mem_partOfVertex
code: theorem mem_partOfVertex (v : V) : v ∈ P.partOfVertex v 
goal: v ∈ P.partOfVertex v

full_name: SimpleGraph.Partition.partOfVertex_ne_of_adj
code: theorem partOfVertex_ne_of_adj {v w : V} (h : G.Adj v w) : P.partOfVertex v ≠ P.partOfVertex w 
goal: P.partOfVertex v ≠ P.partOfVertex w

full_name: SimpleGraph.Partition.toColoring
code: /-- Create a coloring using the parts themselves as the colors.
Each vertex is colored by the part it's contained in. -/
def toColoring : G.Coloring P.parts 
goal: G.Coloring ↑P.parts

full_name: SimpleGraph.Partition.toColoring'
code: /-- Like `SimpleGraph.Partition.toColoring` but uses `Set V` as the coloring type. -/
def toColoring' : G.Coloring (Set V) 
goal: G.Coloring (Set V)

full_name: SimpleGraph.Partition.colorable
code: theorem colorable [Fintype P.parts] : G.Colorable (Fintype.card P.parts) 
goal: G.Colorable (Fintype.card ↑P.parts)

full_name: SimpleGraph.Coloring.toPartition_parts
code: /-- Creates a partition from a coloring. -/
@[simps]
def Coloring.toPartition {α : Type v} (C : G.Coloring α) : G.Partition 
goal: C.toPartition.parts = C.colorClasses

full_name: SimpleGraph.Coloring.toPartition
code: /-- Creates a partition from a coloring. -/
@[simps]
def Coloring.toPartition {α : Type v} (C : G.Coloring α) : G.Partition 
goal: G.Partition

full_name: SimpleGraph.instInhabitedPartition_default
code: /-- The partition where every vertex is in its own part. -/
@[simps]
instance : Inhabited (Partition G) 
goal: default = G.selfColoring.toPartition

full_name: SimpleGraph.instInhabitedPartition
code: /-- The partition where every vertex is in its own part. -/
@[simps]
instance : Inhabited (Partition G) 
goal: Inhabited G.Partition

full_name: SimpleGraph.partitionable_iff_colorable
code: theorem partitionable_iff_colorable {n : ℕ} : G.Partitionable n ↔ G.Colorable n 
goal: G.Partitionable n ↔ G.Colorable n