Documentation

Verification.Shuffle

← Mathematical handbook

Finite shuffles with increasing strips #

The construction is a sum of actual uniform segment laws. The tiling conditions state that the horizontal and vertical strips partition the unit interval; zero-width strips are allowed throughout.

noncomputable def Verification.stripCut (s a u : ℝ) :
Equations
Instances For
    theorem Verification.stripCut_eq_min_sub {s a u : ℝ} (hs : 0 ≤ s) :
    stripCut s a u = min u (a + s) - min u a
    theorem Verification.stripCut_zero {s a u : ℝ} (hs : 0 ≤ s) (hu : u ≤ a) :
    stripCut s a u = 0
    theorem Verification.stripCut_full {s a u : ℝ} (hu : a + s ≤ u) :
    stripCut s a u = s
    theorem Verification.stripCut_inside {s a u : ℝ} (h0 : a ≤ u) (h1 : u ≤ a + s) :
    stripCut s a u = u - a
    Instances For
      noncomputable def Verification.ShuffleStrip.point (S : ShuffleStrip) (u : ↑unitInterval) :
      Fin 2 → ↑unitInterval
      Equations
      Instances For
        theorem Verification.ShuffleStrip.law_Iic (S : ShuffleStrip) (u : Fin 2 → ↑unitInterval) :
        S.law (Set.Iic u) = ENNReal.ofReal (min (stripCut S.width S.x ↑(u 0)) (stripCut S.width S.y ↑(u 1)))
        theorem Verification.ShuffleStrip.integral_law (S : ShuffleStrip) {f : (Fin 2 → ↑unitInterval) → ℝ} (hf : Continuous f) :
        ∫ (x : Fin 2 → ↑unitInterval), f x ∂S.law = S.width * ∫ (u : ↑unitInterval), f (S.point u)
        Instances For
          Equations
          Instances For
            theorem Verification.PositiveShuffle.law_Iic {n : ℕ} (S : PositiveShuffle n) (u : Fin 2 → ↑unitInterval) :
            S.law (Set.Iic u) = ENNReal.ofReal (∑ i : Fin n, min (stripCut (S.strip i).width (S.strip i).x ↑(u 0)) (stripCut (S.strip i).width (S.strip i).y ↑(u 1)))
            Equations
            Instances For
              theorem Verification.PositiveShuffle.cdf {n : ℕ} (S : PositiveShuffle n) (u : Fin 2 → ↑unitInterval) :
              S.copula.cdf u = ∑ i : Fin n, min (stripCut (S.strip i).width (S.strip i).x ↑(u 0)) (stripCut (S.strip i).width (S.strip i).y ↑(u 1))
              theorem Verification.PositiveShuffle.integral_copula {n : ℕ} (S : PositiveShuffle n) {f : (Fin 2 → ↑unitInterval) → ℝ} (hf : Continuous f) :
              ∫ (x : Fin 2 → ↑unitInterval), f x ∂S.copula.toMeasure = ∑ i : Fin n, (S.strip i).width * ∫ (u : ↑unitInterval), f ((S.strip i).point u)
              theorem Verification.PositiveShuffle.cdf_point {n : ℕ} (S : PositiveShuffle n) (π : Equiv.Perm (Fin n)) (hx : ∀ (i j : Fin n), i < j → (S.strip i).x + (S.strip i).width ≤ (S.strip j).x) (hy : ∀ (i j : Fin n), π i < π j → (S.strip i).y + (S.strip i).width ≤ (S.strip j).y) (i : Fin n) (u : ↑unitInterval) :
              S.copula.cdf ((S.strip i).point u) = (S.strip i).width * ↑u + ∑ j : Fin n, if j < i ∧ π j < π i then (S.strip j).width else 0
              theorem Verification.PositiveShuffle.tau {n : ℕ} (S : PositiveShuffle n) (π : Equiv.Perm (Fin n)) (hx : ∀ (i j : Fin n), i < j → (S.strip i).x + (S.strip i).width ≤ (S.strip j).x) (hy : ∀ (i j : Fin n), π i < π j → (S.strip i).y + (S.strip i).width ≤ (S.strip j).y) :
              S.copula.kendallTau = 4 * ∑ i : Fin n, (S.strip i).width * ((S.strip i).width / 2 + ∑ j : Fin n, if j < i ∧ π j < π i then (S.strip j).width else 0) - 1