math / data /lean /OAI /Combinatorics /BalancedRyser /Selection /SelectionKernel2.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
1.67 kB
import OAI.Combinatorics.BalancedRyser.Selection.SelectionKernel
import OAI.Combinatorics.BalancedRyser.Selection.SelectionPushforward2
namespace OAI
namespace Balanced.DeletionLaw
theorem sum_kernelOfSlotWeights {q n : β„•}
(w : Offset q n β†’ Offset q n β†’ ((Fin 2 Γ— Fin n) β†’ Fin q) β†’ ℝ)
(mβ‚€ m₁ : Offset q n) :
βˆ‘ s, kernelOfSlotWeights w mβ‚€ m₁ s = βˆ‘ t, w mβ‚€ m₁ t := by
exact Fintype.sum_equiv (Equiv.curry (Fin 2) (Fin n) (Fin q)).symm
(fun s => kernelOfSlotWeights w mβ‚€ m₁ s) (w mβ‚€ m₁) (fun _ => rfl)
theorem kernelOfSlotWeights_subprobability {q n : β„•}
(w : Offset q n β†’ Offset q n β†’ ((Fin 2 Γ— Fin n) β†’ Fin q) β†’ ℝ)
(hw : βˆ€ mβ‚€ m₁ t, 0 ≀ w mβ‚€ m₁ t)
(hmass : βˆ€ mβ‚€ m₁, βˆ‘ t, w mβ‚€ m₁ t ≀ 1) :
IsSubprobabilityKernel (kernelOfSlotWeights w) := by
constructor
Β· intro mβ‚€ m₁ s
exact hw mβ‚€ m₁ _
Β· intro mβ‚€ m₁
rw [sum_kernelOfSlotWeights]
exact hmass mβ‚€ m₁
theorem kernelOfSlotWeights_cylinders {q n : β„•}
(w : Offset q n β†’ Offset q n β†’ ((Fin 2 Γ— Fin n) β†’ Fin q) β†’ ℝ) (K : ℝ)
(hbound : βˆ€ mβ‚€ m₁ J t,
FinitePushforward.cylinderMass (w mβ‚€ m₁) J t ≀ (K / q) ^ J.card) :
CylinderBound (kernelOfSlotWeights w) K := by
intro mβ‚€ m₁ J t
calc
(βˆ‘ s, if βˆ€ j ∈ J, s j.1 j.2 = t j then kernelOfSlotWeights w mβ‚€ m₁ s else 0) =
FinitePushforward.cylinderMass (w mβ‚€ m₁) J t := by
exact Fintype.sum_equiv (Equiv.curry (Fin 2) (Fin n) (Fin q)).symm
_ _ (fun _ => rfl)
_ ≀ (K / q) ^ J.card := hbound mβ‚€ m₁ J t
end Balanced.DeletionLaw
end OAI