Documentation

Verification.PermutationShuffle

← Mathematical handbook

Equal-width permutation shuffles #

The parameter n denotes n+1 strips. Every permutation is allowed, including the one-strip case. The construction uses uniform laws on the actual segments.

theorem Verification.PositiveShuffle.rho {n : ℕ} (S : PositiveShuffle n) :
S.copula.spearmanRho = 1 - 6 * ∑ i : Fin n, (S.strip i).width * ((S.strip i).x - (S.strip i).y) ^ 2
noncomputable def Verification.PermutationShuffle.strip (n : ℕ) (π : Equiv.Perm (Fin (n + 1))) (i : Fin (n + 1)) :
Equations
Instances For
    theorem Verification.PermutationShuffle.tile (n : ℕ) (u : ↑unitInterval) :
    ∑ i : Fin (n + 1), stripCut (1 / (↑n + 1)) (↑↑i / (↑n + 1)) ↑u = ↑u
    noncomputable def Verification.PermutationShuffle.shuffle (n : ℕ) (π : Equiv.Perm (Fin (n + 1))) :
    Equations
    Instances For
      theorem Verification.PermutationShuffle.ordered_x (n : ℕ) (π : Equiv.Perm (Fin (n + 1))) (i j : Fin (n + 1)) (h : i < j) :
      ((shuffle n π).strip i).x + ((shuffle n π).strip i).width ≤ ((shuffle n π).strip j).x
      theorem Verification.PermutationShuffle.ordered_y (n : ℕ) (π : Equiv.Perm (Fin (n + 1))) (i j : Fin (n + 1)) (h : π i < π j) :
      ((shuffle n π).strip i).y + ((shuffle n π).strip i).width ≤ ((shuffle n π).strip j).y
      theorem Verification.PermutationShuffle.rho (n : ℕ) (π : Equiv.Perm (Fin (n + 1))) :
      (copula n π).spearmanRho = 1 - (6 * ∑ i : Fin (n + 1), (↑↑(π i) - ↑↑i) ^ 2) / (↑n + 1) ^ 3
      noncomputable def Verification.PermutationShuffle.graphMap (n : ℕ) (π : Equiv.Perm (Fin (n + 1))) (u : ↑unitInterval) :
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Verification.PermutationShuffle.graphMap_point (n : ℕ) (π : Equiv.Perm (Fin (n + 1))) (i : Fin (n + 1)) (u : ↑unitInterval) (hu0 : 0 < u) (hu1 : u < 1) :
        graphMap n π ((strip n π i).point u 0) = (strip n π i).point u 1

        Number of inverted pairs, using zero-based strip indices.

        Equations
        Instances For
          theorem Verification.PermutationShuffle.tau (n : ℕ) (π : Equiv.Perm (Fin (n + 1))) :
          (copula n π).kendallTau = 1 - 4 * ↑(inversions n π) / (↑n + 1) ^ 2
          theorem Verification.PermutationShuffle.diagonal_lower (n : ℕ) (π : Equiv.Perm (Fin (n + 1))) (t : ↑unitInterval) (ht : ↑t ≤ 1 / (↑n + 1)) :
          (copula n π).diagonal t = if π 0 = 0 then ↑t else 0
          theorem Verification.PermutationShuffle.diagonal_upper (n : ℕ) (π : Equiv.Perm (Fin (n + 1))) (t : ↑unitInterval) (ht : ↑t ≤ 1 / (↑n + 1)) :
          (copula n π).diagonal (unitInterval.symm t) = 1 - 2 * ↑t + if π (Fin.last n) = Fin.last n then ↑t else 0