File size: 3,210 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
import OAI.LinearAlgebra.MatrixMultiplication.Recovery.OrbitRecovery
import OAI.LinearAlgebra.MatrixMultiplication.Recovery.RecoveryGrowth

namespace OAI

/-! Finite orbit symmetries, masks and exact recovery operations. -/

open MatrixMultiplication.Foundation

namespace MatrixMultiplication.InverseLinearRecovery

abbrev MaskRectangles (L : β„•) := Finset (Fin L) Γ— Finset (Fin L) Γ— Finset (Fin L)

def RecoveredBy {K X Y Z : Type*} [CommSemiring K]
    [Fintype X] [Fintype Y] [Fintype Z]
    (Q H : Tensor K X Y Z) (L : β„•) : Prop :=
  βˆƒ (a : X β†’ (MaskRectangles L Γ— X) β†’ K)
    (b : Y β†’ (MaskRectangles L Γ— Y) β†’ K)
    (c : Z β†’ (MaskRectangles L Γ— Z) β†’ K),
    Tensor.restrict a b c (Tensor.directSum (fun _ : MaskRectangles L => H)) = Q

theorem repair_inverse_linear
    {K G X Y Z : Type*} [CommSemiring K] [Group G] [Fintype G]
    [MulAction G X] [MulAction G Y] [MulAction G Z]
    [Fintype X] [Fintype Y] [Fintype Z]
    [DecidableEq X] [DecidableEq Y] [DecidableEq Z]
    (Q : Tensor K X Y Z)
    (px : X β†’ Prop) (py : Y β†’ Prop) (pz : Z β†’ Prop)
    [DecidablePred px] [DecidablePred py] [DecidablePred pz]
    (hpreserve : βˆ€ (g : G) x y z, Q (g β€’ x) (g β€’ y) (g β€’ z) = Q x y z)
    {b C : ℝ} {N : β„•} (hb : 0 ≀ b) (hC : 0 < C) (hN : 3 * C < (N : ℝ))
    (hsupport : ((@Finset.filter (X Γ— Y Γ— Z)
      (fun p => Q p.1 p.2.1 p.2.2 β‰  0) (Classical.decPred _) Finset.univ).card : ℝ) ≀
      Real.exp (b * N))
    (hx : βˆ€ x, (βˆƒ y z, Q x y z β‰  0) β†’ (((OrbitCounting.orbitSet (G := G) x).filter fun v => Β¬px v).card : ℝ) /
      (OrbitCounting.orbitSet (G := G) x).card ≀ C / N)
    (hy : βˆ€ y, (βˆƒ x z, Q x y z β‰  0) β†’ (((OrbitCounting.orbitSet (G := G) y).filter fun v => Β¬py v).card : ℝ) /
      (OrbitCounting.orbitSet (G := G) y).card ≀ C / N)
    (hz : βˆ€ z, (βˆƒ x y, Q x y z β‰  0) β†’ (((OrbitCounting.orbitSet (G := G) z).filter fun v => Β¬pz v).card : ℝ) /
      (OrbitCounting.orbitSet (G := G) z).card ≀ C / N) :
    RecoveredBy Q (ExactRecovery.delete Q px py pz) (RecoveryGrowth.shiftCount b C N) := by
  classical
  apply OrbitRecovery.repair_from_orbit_loss Q px py pz hpreserve (C / N) hx hy hz
    (RecoveryGrowth.shiftCount b C N) (RecoveryGrowth.shiftCount_pos hb hC hN)
  apply RecoveryGrowth.cardinal_budget hC hN Fintype.card_pos hsupport
  simpa only [mul_div_assoc] using
    OrbitRecovery.floor_loss_fraction (G := G) (C / N)
      (div_nonneg hC.le (Nat.cast_nonneg N))

theorem card_recovery_copies (b C : ℝ) (N : β„•) :
    Fintype.card (MaskRectangles (RecoveryGrowth.shiftCount b C N)) =
      RecoveryGrowth.replicationCount b C N := by
  simpa only [MaskRectangles, Fintype.card_fin, RecoveryGrowth.replicationCount] using
    (ExactRecovery.card_mask_rectangles (I := Fin (RecoveryGrowth.shiftCount b C N)))

theorem subexponential_copies {b C : ℝ} (hb : 0 < b) (hC : 0 < C) :
    Filter.Tendsto (fun N : β„• =>
      Real.log (Fintype.card (MaskRectangles (RecoveryGrowth.shiftCount b C N))) / N)
      Filter.atTop (nhds 0) := by
  simp_rw [card_recovery_copies]
  exact RecoveryGrowth.tendsto_log_replicationCount_div_nat hb hC

end MatrixMultiplication.InverseLinearRecovery

end OAI