# Documentation

Mathlib.Combinatorics.SetFamily.Compression.UV

# UV-compressions #

This file defines UV-compression. It is an operation on a set family that reduces its shadow.

UV-compressing a : α along u v : α means replacing a by (a ⊔ u) \ v if a and u are disjoint and v ≤ a. In some sense, it's moving a from v to u.

UV-compressions are immensely useful to prove the Kruskal-Katona theorem. The idea is that compressing a set family might decrease the size of its shadow, so iterated compressions hopefully minimise the shadow.

## Main declarations #

• UV.compress: compress u v a is a compressed along u and v.
• UV.compression: compression u v s is the compression of the set family s along u and v. It is the compressions of the elements of s whose compression is not already in s along with the element whose compression is already in s. This way of splitting into what moves and what does not ensures the compression doesn't squash the set family, which is proved by UV.card_compression.
• UV.card_shadow_compression_le: Compressing reduces the size of the shadow. This is a key fact in the proof of Kruskal-Katona.

## Notation #

𝓒 (typed with \MCC) is notation for UV.compression in locale FinsetFamily.

## Notes #

Even though our emphasis is on Finset α, we define UV-compressions more generally in a generalized boolean algebra, so that one can use it for Set α.

## References #

• https://github.com/b-mehta/maths-notes/blob/master/iii/mich/combinatorics.pdf

## Tags #

theorem sup_sdiff_injOn {α : Type u_1} (u : α) (v : α) :
Set.InjOn (fun x => (x u) \ v) {x | Disjoint u x v x}

UV-compression is injective on the elements it moves. See UV.compress.

### UV-compression in generalized boolean algebras #

def UV.compress {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] (u : α) (v : α) (a : α) :
α

UV-compressing a means removing v from it and adding u if a and u are disjoint and v ≤ a (it replaces the v part of a by the u part). Else, UV-compressing a doesn't do anything. This is most useful when u and v are disjoint finsets of the same size.

Instances For
def UV.compression {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] (u : α) (v : α) (s : ) :

To UV-compress a set family, we compress each of its elements, except that we don't want to reduce the cardinality, so we keep all elements whose compression is already present.

Instances For

To UV-compress a set family, we compress each of its elements, except that we don't want to reduce the cardinality, so we keep all elements whose compression is already present.

Instances For
def UV.IsCompressed {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] (u : α) (v : α) (s : ) :

IsCompressed u v s expresses that s is UV-compressed.

Instances For
theorem UV.compress_of_disjoint_of_le {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] {u : α} {v : α} {a : α} (hua : Disjoint u a) (hva : v a) :
UV.compress u v a = (a u) \ v
theorem UV.compress_of_disjoint_of_le' {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] {u : α} {v : α} {a : α} (hva : Disjoint v a) (hua : u a) :
UV.compress u v ((a v) \ u) = a
theorem UV.mem_compression {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] {s : } {u : α} {v : α} {a : α} :
a a s UV.compress u v a s ¬a s b, b s UV.compress u v b = a

a is in the UV-compressed family iff it's in the original and its compression is in the original, or it's not in the original but it's the compression of something in the original.

theorem UV.IsCompressed.eq {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] {s : } {u : α} {v : α} (h : ) :
= s
@[simp]
theorem UV.compress_self {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] (u : α) (a : α) :
UV.compress u u a = a
@[simp]
theorem UV.compression_self {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] (u : α) (s : ) :
= s
theorem UV.is_compressed_self {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] (u : α) (s : ) :

Any family is compressed along two identical elements.

@[simp]
theorem UV.compress_sdiff_sdiff {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] (a : α) (b : α) :
UV.compress (a \ b) (b \ a) b = a

An element can be compressed to any other element by removing/adding the differences.

theorem UV.compress_disjoint {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] {s : } (u : α) (v : α) :
Disjoint (Finset.filter (fun a => UV.compress u v a s) s) (Finset.filter (fun a => ¬a s) (Finset.image () s))
@[simp]
theorem UV.compress_idem {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] (u : α) (v : α) (a : α) :

Compressing an element is idempotent.

theorem UV.compress_mem_compression {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] {s : } {u : α} {v : α} {a : α} (ha : a s) :
theorem UV.compress_mem_compression_of_mem_compression {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] {s : } {u : α} {v : α} {a : α} (ha : a ) :
@[simp]
theorem UV.compression_idem {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] (u : α) (v : α) (s : ) :

Compressing a family is idempotent.

theorem UV.card_compression {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] (u : α) (v : α) (s : ) :

Compressing a family doesn't change its size.

theorem UV.le_of_mem_compression_of_not_mem {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] {s : } {u : α} {v : α} {a : α} (h : a ) (ha : ¬a s) :
u a
theorem UV.disjoint_of_mem_compression_of_not_mem {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] {s : } {u : α} {v : α} {a : α} (h : a ) (ha : ¬a s) :
theorem UV.sup_sdiff_mem_of_mem_compression_of_not_mem {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] {s : } {u : α} {v : α} {a : α} (h : a ) (ha : ¬a s) :
(a v) \ u s
theorem UV.sup_sdiff_mem_of_mem_compression {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] {s : } {u : α} {v : α} {a : α} (ha : a ) (hva : v a) (hua : Disjoint u a) :
(a u) \ v s

If a is in the family compression and can be compressed, then its compression is in the original family.

theorem UV.mem_of_mem_compression {α : Type u_1} [DecidableRel Disjoint] [DecidableRel fun x x_1 => x x_1] {s : } {u : α} {v : α} {a : α} (ha : a ) (hva : v a) (hvu : v = u = ) :
a s

If a is in the u, v-compression but v ≤ a, then a must have been in the original family.

### UV-compression on finsets #

TODO: Make a proper instance

Instances For
theorem UV.card_compress {α : Type u_1} [] {u : } {v : } (huv : ) (a : ) :

Compressing a finset doesn't change its size.

theorem UV.shadow_compression_subset_compression_shadow {α : Type u_1} [] {𝒜 : Finset ()} (u : ) (v : ) (huv : ∀ (x : α), x uy, y v UV.IsCompressed () () 𝒜) :

UV-compression reduces the size of the shadow of 𝒜 if, for all x ∈ u there is y ∈ v such that 𝒜 is (u.erase x, v.erase y)-compressed. This is the key fact about compression for Kruskal-Katona.

theorem UV.card_shadow_compression_le {α : Type u_1} [] {𝒜 : Finset ()} (u : ) (v : ) (huv : ∀ (x : α), x uy, y v UV.IsCompressed () () 𝒜) :

UV-compression reduces the size of the shadow of 𝒜 if, for all x ∈ u there is y ∈ v such that 𝒜 is (u.erase x, v.erase y)-compressed. This is the key UV-compression fact needed for Kruskal-Katona.