Documentation

Complexitylib.Classes.PCP.Internal.PermCount

Counting permutations that keep a set inside a set #

The expander existence proof needs one combinatorial estimate: of the n! permutations of Fin n, at most descFactorial s k · (n - k)! map a given k-element set inside a given s-element set.

The proof is the obvious one, made precise. Restricting a permutation to K gives an injection into S; there are descFactorial s k of those. Two permutations with the same restriction differ only outside K, where they are injections from an (n - k)-set into the complement of the common image — another (n - k)-set — so each restriction is shared by at most (n - k)! permutations.

Main results #

noncomputable def Complexity.escape {n : } (σ : Equiv.Perm (Fin n)) (S : Finset (Fin n)) :

How many points of S the permutation σ sends outside S.

Equations
Instances For

    Restrictions of a permutation #

    noncomputable def Complexity.permsInto {n : } (S K : Finset (Fin n)) :

    The permutations mapping K into S.

    Equations
    Instances For
      noncomputable def Complexity.restrs {n : } (S K : Finset (Fin n)) :
      Finset (KFin n)

      The restrictions that can occur: injective maps of K into S.

      Equations
      Instances For
        theorem Complexity.mem_restrs {n : } {S K : Finset (Fin n)} {f : KFin n} (hf : f restrs S K) :
        Function.Injective f ∀ (v : K), f v S

        There are few restrictions.

        noncomputable def Complexity.restrImage {n : } {K : Finset (Fin n)} (f : KFin n) :

        The values of a restriction.

        Equations
        Instances For
          theorem Complexity.card_restrImage {n : } {S K : Finset (Fin n)} {f : KFin n} (hf : f restrs S K) :
          theorem Complexity.card_fiber_le {n : } (S K : Finset (Fin n)) (f : KFin n) (hf : f restrs S K) :
          {σpermsInto S K | (fun (v : K) => σ v) = f}.card (n - K.card).factorial

          Each restriction is shared by few permutations.

          The estimate.

          Permutations with little escape #

          theorem Complexity.card_perm_escape_le {n : } (S : Finset (Fin n)) (t : ) :
          {σ : Equiv.Perm (Fin n) | escape σ S t}.card S.card.choose (S.card - t) * (S.card.descFactorial (S.card - t) * (n - (S.card - t)).factorial)

          Few permutations move only a little of S out of S. Such a permutation keeps a (s - t)-element subset of S inside S, and there are few subsets and, by card_perm_mapsTo_le, few permutations for each.