File size: 3,368 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import Mathlib

namespace OAI

noncomputable section
open scoped BigOperators
namespace BinaryCoordinateSweeps

/-- The positions of a binary deck of dimension d. -/
abbrev Slot (d : β„•) := Fin d β†’ Bool

/-- Independent switches on the edges parallel to one coordinate. -/
def coordinateLayer (d : β„•) (j : Fin d)
    (c : (({i : Fin d // i β‰  j} β†’ Bool)) β†’ Bool) : Equiv.Perm (Slot d) :=
  let e := Equiv.piSplitAt j (fun _ : Fin d => Bool)
  let sw : Equiv.Perm (Bool Γ— ({i : Fin d // i β‰  j} β†’ Bool)) :=
    { toFun := fun x => (x.1 ^^ c x.2, x.2)
      invFun := fun x => (x.1 ^^ c x.2, x.2)
      left_inv := fun x => by simp
      right_inv := fun x => by simp }
  e.trans (sw.trans e.symm)

abbrev SweepCoins (d : β„•) :=
  (j : Fin d) β†’ ({i : Fin d // i β‰  j} β†’ Bool) β†’ Bool

/-- The coordinate layers are applied in increasing coordinate order. -/
def binarySweep (d : β„•) (c : SweepCoins d) : Equiv.Perm (Slot d) :=
  (List.ofFn (fun j => coordinateLayer d j (c j))).reverse.prod

def finiteLaw {Ξ© G : Type*} [Fintype Ξ©] [Fintype G] (f : Ξ© β†’ G) (g : G) : ℝ := by
  classical
  exact βˆ‘ Ο‰, if f Ο‰ = g then (Fintype.card Ξ© : ℝ)⁻¹ else 0

/-- Half the unnormalized sum of absolute probability-mass differences. -/
def totalVariation {G : Type*} [Fintype G] (p q : G β†’ ℝ) : ℝ :=
  (1 / ((2 : β„•) : ℝ)) * βˆ‘ g, |p g - q g|

def uniformLaw (G : Type*) [Fintype G] : G β†’ ℝ :=
  fun _ => (Fintype.card G : ℝ)⁻¹

def binaryLaw (d : β„•) : Equiv.Perm (Slot d) β†’ ℝ :=
  finiteLaw (binarySweep d)

abbrev RepSpace (D : β„•) := EuclideanSpace β„‚ (Fin D)

def IsUnitaryRep {G : Type*} [Monoid G]
    {D : β„•} (ρ : Representation β„‚ G (RepSpace D)) : Prop :=
  βˆ€ g x, ‖ρ g xβ€– = β€–xβ€–

def averageOperator {G : Type*} [Fintype G] [Monoid G] {D : β„•}
    (p : G β†’ ℝ) (ρ : Representation β„‚ G (RepSpace D)) :
    RepSpace D β†’L[β„‚] RepSpace D :=
  LinearMap.toContinuousLinearMap (βˆ‘ g, (p g : β„‚) β€’ ρ g)

def BinaryContractionTarget : Prop :=
  βˆƒ g : ℝ, 0 < g ∧ βˆƒ dβ‚€ : β„•, βˆ€ d β‰₯ dβ‚€, βˆ€ D : β„•,
    βˆ€ ρ : Representation β„‚ (Equiv.Perm (Slot d)) (RepSpace D),
      ρ.IsIrreducible β†’ IsUnitaryRep ρ β†’
      β€–averageOperator (binaryLaw d) ρ‖ ≀ (D : ℝ) ^ (-g)

def realSign {Ξ± : Type*} [Fintype Ξ±] [DecidableEq Ξ±] : Equiv.Perm Ξ± β†’* ℝ :=
  (Int.castRingHom ℝ).toMonoidHom.comp ((Units.coeHom β„€).comp Equiv.Perm.sign)

section FiniteLaws
variable {G : Type*} [Fintype G] [Group G]

def convolution (p q : G β†’ ℝ) (g : G) : ℝ := βˆ‘ x, p x * q (x⁻¹ * g)

def pointMassOne (g : G) : ℝ := by
  classical
  exact if g = 1 then 1 else 0

/-- The law of independent repetitions, with the empty product at the identity. -/
def convolutionPower (p : G β†’ ℝ) : β„• β†’ G β†’ ℝ
  | 0 => pointMassOne
  | n + 1 => convolution p (convolutionPower p n)

end FiniteLaws

def sweepLaw (d t : β„•) : Equiv.Perm (Slot d) β†’ ℝ :=
  convolutionPower (binaryLaw d) t

/-- A single number of sweeps works uniformly over deterministic initial decks. -/
def UniformSweepMixingTarget : Prop :=
  βˆƒ w : β„•, βˆ€ Ξ΅ : ℝ, 0 < Ξ΅ β†’ βˆƒ dβ‚€ : β„•, βˆ€ d β‰₯ dβ‚€,
    βˆ€ Ο„ : Equiv.Perm (Slot d),
      totalVariation (fun g => sweepLaw d w (g * τ⁻¹))
        (uniformLaw (Equiv.Perm (Slot d))) ≀ Ξ΅

end BinaryCoordinateSweeps
end

end OAI