Documentation

CslibFrontier.Probability.UniformOrder

Extreme elements of uniform random orders #

For any finite set S of size k > 0 in α and any finite linear order β, a bijection σ : α ≃ β puts each element u ∈ S least among S for exactly a 1 / k fraction of all bijections (card_filter_least_mul_card). By transposition symmetry, swapping u and v in α gives a bijection between the orders putting u least and those putting v least. Since every order has a unique minimum on the nonempty set S, these fibers partition α ≃ β.

The dual statements for greatest elements (card_filter_greatest_mul_card) and for permutations (card_filter_perm_least_mul_card, card_filter_perm_greatest_mul_card, card_filter_perm_symm_greatest_mul_card) follow immediately.

Main results #

theorem Cslib.Probability.card_filter_least_mul_card {α : Type u_1} {β : Type u_2} [Fintype α] [DecidableEq α] [Fintype β] [DecidableEq β] [LinearOrder β] {S : Finset α} {u : α} (hu : u ∈ S) :
{σ : α ≃ β | ∀ w ∈ S, w ≠ u → σ u < σ w}.card * S.card = Fintype.card (α ≃ β)

In a uniform random bijection σ : α ≃ β into a linear order β, each element of a nonempty subset S ⊆ α is the least element of S for exactly a 1 / |S| fraction of the bijections.

theorem Cslib.Probability.card_filter_greatest_mul_card {α : Type u_1} {β : Type u_2} [Fintype α] [DecidableEq α] [Fintype β] [DecidableEq β] [LinearOrder β] {S : Finset α} {u : α} (hu : u ∈ S) :
{σ : α ≃ β | ∀ w ∈ S, w ≠ u → σ w < σ u}.card * S.card = Fintype.card (α ≃ β)

In a uniform random bijection σ : α ≃ β into a linear order β, each element of a nonempty subset S ⊆ α is the greatest element of S for exactly a 1 / |S| fraction of the bijections.

theorem Cslib.Probability.card_filter_perm_least_mul_card {α : Type u_1} [Fintype α] [DecidableEq α] [LinearOrder α] {S : Finset α} {u : α} (hu : u ∈ S) :
{σ : Equiv.Perm α | ∀ w ∈ S, w ≠ u → σ u < σ w}.card * S.card = (Fintype.card α).factorial

In a uniform random permutation of a finite linear order α, each element of a nonempty subset S is least among S for a 1 / |S| fraction of the permutations.

theorem Cslib.Probability.card_filter_perm_greatest_mul_card {α : Type u_1} [Fintype α] [DecidableEq α] [LinearOrder α] {S : Finset α} {u : α} (hu : u ∈ S) :
{σ : Equiv.Perm α | ∀ w ∈ S, w ≠ u → σ w < σ u}.card * S.card = (Fintype.card α).factorial

In a uniform random permutation of a finite linear order α, each element of a nonempty subset S is greatest among S for a 1 / |S| fraction of the permutations.

theorem Cslib.Probability.card_filter_perm_symm_greatest_mul_card {α : Type u_1} [Fintype α] [DecidableEq α] [LinearOrder α] {S : Finset α} {u : α} (hu : u ∈ S) :
{π : Equiv.Perm α | ∀ w ∈ S, w ≠ u → (Equiv.symm π) w < (Equiv.symm π) u}.card * S.card = (Fintype.card α).factorial

In a uniform random permutation of a finite linear order α, each element of a nonempty subset S is mapped to the greatest position by its inverse for a 1 / |S| fraction of the permutations.