Download data/lean/OAI/LinearAlgebra/MatrixMultiplication/Recovery/InverseLinearRecovery.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.21 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/LinearAlgebra/MatrixMultiplication/Recovery/InverseLinearRecovery.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/LinearAlgebra/MatrixMultiplication/Recovery/InverseLinearRecovery.lean
-
curl -L -o InverseLinearRecovery.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/LinearAlgebra/MatrixMultiplication/Recovery/InverseLinearRecovery.lean
3.21 kB
| 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 : ((.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 | |