File size: 4,574 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 95 96 97 98 99 | import OAI.LinearAlgebra.MatrixMultiplication.Recovery.InverseLinearRecovery
import OAI.LinearAlgebra.MatrixMultiplication.Recovery.OrbitLoss
import OAI.LinearAlgebra.MatrixMultiplication.Recovery.RecoverySupport
import OAI.LinearAlgebra.MatrixMultiplication.Recovery.EquivOrbitTransport
namespace OAI
/-! Joint tensor extraction, compatibility and entropy estimates. -/
open MatrixMultiplication.Foundation
namespace MatrixMultiplication.JointOrbitRecovery
variable {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]
def SeparatedLoss {V : Type*} [DecidableEq V] [MulAction G V]
(pass assigned : V β Prop) [DecidablePred pass] [DecidablePred assigned]
(C : β) (N : β) (v : V) : Prop :=
(((OrbitCounting.orbitSet (G := G) v).filter fun w => Β¬pass w).card : β) /
(OrbitCounting.orbitSet (G := G) v).card β€ C / N β§
(((OrbitCounting.orbitSet (G := G) v).filter fun w => pass w β§ Β¬assigned w).card : β) /
(OrbitCounting.orbitSet (G := G) v).card β€ 1 / N
theorem separatedLoss_transport {U V : Type*} [DecidableEq U] [DecidableEq V]
[MulAction G V] (e : U β V)
(pass assigned : U β Prop) [DecidablePred pass] [DecidablePred assigned]
(C : β) (N : β) (u : U) :
letI : MulAction G U := EquivOrbitTransport.action e
SeparatedLoss (G := G) pass assigned C N u β
SeparatedLoss (G := G) (pass β e.symm) (assigned β e.symm) C N (e u) := by
let : MulAction G U := EquivOrbitTransport.action e
unfold SeparatedLoss
rw [EquivOrbitTransport.rejected_fraction e (fun w => Β¬pass w) u,
EquivOrbitTransport.rejected_fraction e (fun w => pass w β§ Β¬assigned w) u]
simp only [Function.comp_def]
theorem combined_loss {V : Type*} [DecidableEq V] [MulAction G V]
(pass assigned : V β Prop) [DecidablePred pass] [DecidablePred assigned]
(C : β) (N : β) (v : V) (h : SeparatedLoss (G := G) pass assigned C N v) :
(((OrbitCounting.orbitSet (G := G) v).filter fun w => Β¬(assigned w β§ pass w)).card : β) /
(OrbitCounting.orbitSet (G := G) v).card β€ (C + 1) / N := by
simpa only [and_comm] using
OrbitLoss.combined_inverse_linear (OrbitCounting.orbitSet (G := G) v)
pass assigned C N h.1 h.2
theorem repair_of_separated_losses
(Q H : Tensor K X Y Z)
(passX assignedX : X β Prop) (passY assignedY : Y β Prop)
(passZ assignedZ : Z β Prop)
[DecidablePred passX] [DecidablePred assignedX]
[DecidablePred passY] [DecidablePred assignedY]
[DecidablePred passZ] [DecidablePred assignedZ]
(hhole : H = ExactRecovery.delete Q
(fun x => assignedX x β§ passX x) (fun y => assignedY y β§ passY y)
(fun z => assignedZ z β§ passZ z))
(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 + 1) < (N : β))
(hsupport : ((RecoverySupport.support Q).card : β) β€ Real.exp (b * N))
(hx : β x, (β y z, Q x y z β 0) β
SeparatedLoss (G := G) passX assignedX C N x)
(hy : β y, (β x z, Q x y z β 0) β
SeparatedLoss (G := G) passY assignedY C N y)
(hz : β z, (β x y, Q x y z β 0) β
SeparatedLoss (G := G) passZ assignedZ C N z) :
InverseLinearRecovery.RecoveredBy Q H (RecoveryGrowth.shiftCount b (C + 1) N) := by
classical
rw [hhole]
apply InverseLinearRecovery.repair_inverse_linear Q
(fun x => assignedX x β§ passX x) (fun y => assignedY y β§ passY y)
(fun z => assignedZ z β§ passZ z) hpreserve hb (by linarith) hN
Β· have heq : (@Finset.filter (X Γ Y Γ Z)
(fun p => Q p.1 p.2.1 p.2.2 β 0) (Classical.decPred _) Finset.univ) =
RecoverySupport.support Q := by
ext p
simp only [RecoverySupport.support, Finset.mem_filter]
rw [heq]
exact hsupport
Β· intro x hused
exact combined_loss passX assignedX C N x (hx x hused)
Β· intro y hused
exact combined_loss passY assignedY C N y (hy y hused)
Β· intro z hused
exact combined_loss passZ assignedZ C N z (hz z hused)
theorem subexponential_copies {b C : β} (hb : 0 < b) (hC : 0 β€ C) :
Filter.Tendsto (fun N : β =>
Real.log (Fintype.card
(InverseLinearRecovery.MaskRectangles (RecoveryGrowth.shiftCount b (C + 1) N))) / N)
Filter.atTop (nhds 0) :=
InverseLinearRecovery.subexponential_copies hb (by linarith)
end MatrixMultiplication.JointOrbitRecovery
end OAI
|