The areas / V30. Combinatorics
Mathlib.Combinatorics.Design.Defs
42 declarations. Mathlib docs · Source
def IncidenceSystem.ctorIdx E1 #
{α : Type u_1} → {β : Type u_2} → IncidenceSystem α β → ℕ
theorem IncidenceSystem.mk.inj E1 #
∀ {α : Type u_1} {β : Type u_2} {carrier : Set α} {blockSet : Set β} {block : β → Set α}
{block_subset : autoParam (∀ {b : β}, b ∈ blockSet → block b ⊆ carrier) IncidenceSystem.block_subset._autoParam}
{carrier_1 : Set α} {blockSet_1 : Set β} {block_1 : β → Set α}
{block_subset_1 :
autoParam (∀ {b : β}, b ∈ blockSet_1 → block_1 b ⊆ carrier_1) IncidenceSystem.block_subset._autoParam},
{ carrier := carrier, blockSet := blockSet, block := block, block_subset := block_subset } =
{ carrier := carrier_1, blockSet := blockSet_1, block := block_1, block_subset := block_subset_1 } →
carrier = carrier_1 ∧ blockSet = blockSet_1 ∧ block = block_1
theorem IncidenceSystem.mk.injEq E0 #
∀ {α : Type u_1} {β : Type u_2} (carrier : Set α) (blockSet : Set β) (block : β → Set α)
(block_subset : autoParam (∀ {b : β}, b ∈ blockSet → block b ⊆ carrier) IncidenceSystem.block_subset._autoParam)
(carrier_1 : Set α) (blockSet_1 : Set β) (block_1 : β → Set α)
(block_subset_1 :
autoParam (∀ {b : β}, b ∈ blockSet_1 → block_1 b ⊆ carrier_1) IncidenceSystem.block_subset._autoParam),
({ carrier := carrier, blockSet := blockSet, block := block, block_subset := block_subset } =
{ carrier := carrier_1, blockSet := blockSet_1, block := block_1, block_subset := block_subset_1 }) =
(carrier = carrier_1 ∧ blockSet = blockSet_1 ∧ block = block_1)
structure IncidenceSystem E1 #
Type u_1 → Type u_2 → Type (max u_1 u_2)
An incidence system consists of a carrier set and subsets called blocks. We index our blocks
by a subset of an indexing type β to make it easy to add and remove blocks if desired.
Duplicate blocks are permitted unless IncidenceSystem.IsSimple is imposed.
ctor IncidenceSystem.mk E0 #
{α : Type u_1} →
{β : Type u_2} →
(carrier : Set α) →
(blockSet : Set β) →
(block : β → Set α) →
autoParam (∀ {b : β}, b ∈ blockSet → block b ⊆ carrier) IncidenceSystem.block_subset._autoParam →
IncidenceSystem α β
abbrev IncidenceSystem.carrier E1 #
{α : Type u_1} → {β : Type u_2} → IncidenceSystem α β → Set α
The ambient set for the incidence system.
abbrev IncidenceSystem.blockSet E1 #
{α : Type u_1} → {β : Type u_2} → IncidenceSystem α β → Set β
The indexing set for the blocks.
abbrev IncidenceSystem.block E1 #
{α : Type u_1} → {β : Type u_2} → IncidenceSystem α β → β → Set α
The function from the indexing type β to the blocks in α.
theorem IncidenceSystem.block_subset E1 #
∀ {α : Type u_1} {β : Type u_2} (self : IncidenceSystem α β) {b : β}, b ∈ self.blockSet → self.block b ⊆ self.carrier
The blocks must be subsets of the ambient set.
theorem IncidenceSystem.biUnion_block_subset E1 #
∀ {α : Type u_1} {β : Type u_2} (d : IncidenceSystem α β), ⋃ b ∈ d.blockSet, d.block b ⊆ d.carrier
theorem IncidenceSystem.mem_of_mem_block E0 #
∀ {α : Type u_1} {β : Type u_2} (d : IncidenceSystem α β) {b : β} {x : α},
x ∈ d.block b → b ∈ d.blockSet → x ∈ d.carrier
def IncidenceSystem.ofHypergraph E1 #
{α : Type u_1} → Hypergraph α → IncidenceSystem α (Set α)
Every hypergraph can be viewed as an incidence system where the hyperedges become the blocks.
theorem IncidenceSystem.blockSet_ofHypergraph E0 #
∀ {α : Type u_1} (H : Hypergraph α), (IncidenceSystem.ofHypergraph H).blockSet = H.edgeSet
theorem IncidenceSystem.carrier_ofHypergraph E0 #
∀ {α : Type u_1} (H : Hypergraph α), (IncidenceSystem.ofHypergraph H).carrier = H.vertexSet
theorem IncidenceSystem.block_ofHypergraph E0 #
∀ {α : Type u_1} (H : Hypergraph α) (x : Set α), (IncidenceSystem.ofHypergraph H).block x = x
def IncidenceSystem.toHypergraph E1 #
{α : Type u_1} → {β : Type u_2} → IncidenceSystem α β → Hypergraph α
Every incidence system can be viewed as a hypergraph where the blocks become the hyperedges. Note that hypergraphs are simple in mathlib, so this function will collapse duplicate blocks.
theorem IncidenceSystem.toHypergraph_vertexSet E0 #
∀ {α : Type u_1} {β : Type u_2} (d : IncidenceSystem α β), d.toHypergraph.vertexSet = d.carrier
theorem IncidenceSystem.toHypergraph_edgeSet E0 #
∀ {α : Type u_1} {β : Type u_2} (d : IncidenceSystem α β), d.toHypergraph.edgeSet = d.block '' d.blockSet
theorem IncidenceSystem.toHypergraph_ofHypergraph E0 #
∀ {α : Type u_1} (H : Hypergraph α), (IncidenceSystem.ofHypergraph H).toHypergraph = H
def IncidenceSystem.discrete E1 #
{α : Type u_1} → Set α → IncidenceSystem α α
The discrete incidence system consists of singleton blocks.
theorem IncidenceSystem.blockSet_discrete E0 #
∀ {α : Type u_1} (s : Set α), (IncidenceSystem.discrete s).blockSet = s
theorem IncidenceSystem.block_discrete E0 #
∀ {α : Type u_1} (s : Set α) (x : α), (IncidenceSystem.discrete s).block x = {x}
theorem IncidenceSystem.carrier_discrete E0 #
∀ {α : Type u_1} (s : Set α), (IncidenceSystem.discrete s).carrier = s
def IncidenceSystem.indiscrete E1 #
{α : Type u_1} → {β : Type u_2} → Set α → β → IncidenceSystem α β
The indiscrete incidence system consists of the carrier as a single block.
theorem IncidenceSystem.block_indiscrete E0 #
∀ {α : Type u_1} {β : Type u_2} (s : Set α) (b x : β), (IncidenceSystem.indiscrete s b).block x = s
theorem IncidenceSystem.carrier_indiscrete E0 #
∀ {α : Type u_1} {β : Type u_2} (s : Set α) (b : β), (IncidenceSystem.indiscrete s b).carrier = s
theorem IncidenceSystem.blockSet_indiscrete E0 #
∀ {α : Type u_1} {β : Type u_2} (s : Set α) (b : β), (IncidenceSystem.indiscrete s b).blockSet = {b}
class IncidenceSystem.IsSimple E1 #
{α : Type u_1} → {β : Type u_2} → IncidenceSystem α β → Prop
An incidence system is simple if there are no duplicate blocks.
theorem IncidenceSystem.isSimple_iff E0 #
∀ {α : Type u_1} {β : Type u_2} (d : IncidenceSystem α β),
d.IsSimple ↔ autoParam (Set.InjOn d.block d.blockSet) IncidenceSystem.IsSimple.block_injOn_blockSet._autoParam
ctor IncidenceSystem.IsSimple.mk E0 #
∀ {α : Type u_1} {β : Type u_2} {d : IncidenceSystem α β},
autoParam (Set.InjOn d.block d.blockSet) IncidenceSystem.IsSimple.block_injOn_blockSet._autoParam → d.IsSimple
theorem IncidenceSystem.IsSimple.block_injOn_blockSet E1 #
∀ {α : Type u_1} {β : Type u_2} {d : IncidenceSystem α β} [self : d.IsSimple], Set.InjOn d.block d.blockSet
theorem IncidenceSystem.IsSimple.ofHypergraph E0 #
∀ {α : Type u_1} (H : Hypergraph α), (IncidenceSystem.ofHypergraph H).IsSimple
theorem IncidenceSystem.IsSimple.discrete E0 #
∀ {α : Type u_1} (s : Set α), (IncidenceSystem.discrete s).IsSimple
theorem IncidenceSystem.IsSimple.indiscrete E0 #
∀ {α : Type u_1} {β : Type u_2} (s : Set α) (b : β), (IncidenceSystem.indiscrete s b).IsSimple
structure IncidenceSystem.IsUniform E1 #
{α : Type u_1} → {β : Type u_2} → IncidenceSystem α β → ℕ → Prop
An incidence system is k-uniform if every block has size k.
theorem IncidenceSystem.isUniform_iff E0 #
∀ {α : Type u_1} {β : Type u_2} (d : IncidenceSystem α β) (k : ℕ),
d.IsUniform k ↔ ∀ {b : β}, b ∈ d.blockSet → (d.block b).ncard = k
ctor IncidenceSystem.IsUniform.mk E0 #
∀ {α : Type u_1} {β : Type u_2} {d : IncidenceSystem α β} {k : ℕ},
(∀ {b : β}, b ∈ d.blockSet → (d.block b).ncard = k) → d.IsUniform k
theorem IncidenceSystem.IsUniform.uniform E1 #
∀ {α : Type u_1} {β : Type u_2} {d : IncidenceSystem α β} {k : ℕ},
d.IsUniform k → ∀ {b : β}, b ∈ d.blockSet → (d.block b).ncard = k
theorem IncidenceSystem.IsUniform.discrete E0 #
∀ {α : Type u_1} (s : Set α), (IncidenceSystem.discrete s).IsUniform 1
theorem IncidenceSystem.IsUniform.indiscrete E0 #
∀ {α : Type u_1} {β : Type u_2} (s : Set α) (b : β), (IncidenceSystem.indiscrete s b).IsUniform s.ncard
theorem IncidenceSystem.IsUniform.nonempty_block E1 #
∀ {α : Type u_1} {β : Type u_2} {d : IncidenceSystem α β} {k : ℕ},
d.IsUniform k → k ≠ 0 → ∀ {b : β}, b ∈ d.blockSet → (d.block b).Nonempty
theorem IncidenceSystem.IsUniform.finite_block E1 #
∀ {α : Type u_1} {β : Type u_2} {d : IncidenceSystem α β} {k : ℕ},
d.IsUniform k → k ≠ 0 → ∀ {b : β}, b ∈ d.blockSet → (d.block b).Finite