cfahlgren1's picture
download
raw
3.75 kB
import OAI.Combinatorics.Sensitivity.Composition
namespace OAI
/-! Balancing the zero and one sensitivities by an OR of disjoint copies. -/
noncomputable section
open scoped Classical BigOperators
namespace Paper320
variable {I K : Type} [Fintype K]
def orBits (x : K → Bool) : Bool := decide (∃ k, x k = true)
@[simp] theorem orBits_eq_true (x : K → Bool) : orBits x = true ↔ ∃ k, x k = true := by
simp [orBits]
@[simp] theorem orBits_eq_false (x : K → Bool) : orBits x = false ↔ ∀ k, x k = false := by
simp [orBits]
@[simp] theorem orBits_zero : orBits (fun _ : K => false) = false := by
simp [orBits]
theorem orBits_flip_of_witness (x : K → Bool) {i j : K}
(hji : j ≠ i) (hj : x j = true) : orBits (flip x {i}) = orBits x := by
have h₁ : orBits x = true := (orBits_eq_true x).mpr ⟨j, hj⟩
have h₂ : orBits (flip x {i}) = true :=
(orBits_eq_true _).mpr ⟨j, by rw [flip_singleton_other x hji, hj]⟩
exact h₂.trans h₁.symm
def orCopies (f : (I → Bool) → Bool) : (K × I → Bool) → Bool := compose orBits f
theorem orCopies_zero (f : (I → Bool) → Bool) (hf : f (fun _ => false) = false) :
orCopies (K := K) f (fun _ => false) = false := by
rw [orCopies, compose_zero _ _ hf, orBits_zero]
variable [Fintype I]
theorem sensitivity_orCopies_le (f : (I → Bool) → Bool) (S₀ S₁ : ℕ)
(h₀ : ∀ x, f x = false → sensitivityAt f x ≤ S₀)
(h₁ : ∀ x, f x = true → sensitivityAt f x ≤ S₁) :
sensitivity (orCopies (K := K) f) ≤ max (Fintype.card K * S₀) S₁ := by
apply sensitivity_le
intro x
change sensitivityAt (compose orBits f) x ≤ _
rw [sensitivityAt_compose]
let y : K → Bool := fun k => f (fun a => x (k, a))
let s : Finset K := Finset.univ.filter fun i => orBits (flip y {i}) ≠ orBits y
change (∑ i ∈ s, sensitivityAt f (fun a => x (i, a))) ≤ _
by_cases hy : orBits y = false
· have hall := (orBits_eq_false y).mp hy
calc
_ ≤ ∑ _i ∈ s, S₀ := Finset.sum_le_sum fun i _ => h₀ _ (hall i)
_ = s.card * S₀ := by simp
_ ≤ Fintype.card K * S₀ := Nat.mul_le_mul_right _ (Finset.card_le_univ _)
_ ≤ max (Fintype.card K * S₀) S₁ := le_max_left _ _
· have htrue : orBits y = true := by cases h : orBits y <;> simp_all
obtain ⟨i, hi⟩ := (orBits_eq_true y).mp htrue
have hs : s ⊆ {i} := by
intro j hj
have hc := (Finset.mem_filter.mp hj).2
by_contra hji
have hij : i ≠ j := Ne.symm (by simpa only [Finset.mem_singleton] using hji)
exact hc (orBits_flip_of_witness y hij hi)
calc
_ ≤ ∑ j ∈ ({i} : Finset K), sensitivityAt f (fun a => x (j, a)) :=
Finset.sum_le_sum_of_subset_of_nonneg hs (by intros; exact Nat.zero_le _)
_ = sensitivityAt f (fun a => x (i, a)) := by simp
_ ≤ S₁ := h₁ _ hi
_ ≤ max (Fintype.card K * S₀) S₁ := le_max_right _ _
theorem card_le_blockSensitivityAt_orBits_zero :
Fintype.card K ≤ blockSensitivityAt (orBits (K := K)) (fun _ => false) := by
apply le_blockSensitivityAt_of_family orBits (fun _ => false) (fun k : K => {k})
· intro k
simp
· intro k l hkl
simpa using hkl
· intro k
have h : orBits (flip (fun _ : K => false) {k}) = true :=
(orBits_eq_true _).mpr ⟨k, by simp⟩
simp [h]
theorem blockSensitivityAt_orCopies_zero (f : (I → Bool) → Bool)
(hf : f (fun _ => false) = false) :
Fintype.card K * blockSensitivityAt f (fun _ => false) ≤
blockSensitivityAt (orCopies (K := K) f) (fun _ => false) := by
exact (Nat.mul_le_mul_right _ card_le_blockSensitivityAt_orBits_zero).trans
(blockSensitivityAt_compose_zero_le orBits f hf)
end Paper320
end
end OAI

Xet Storage Details

Size:
3.75 kB
·
Xet hash:
f2c067716ba98e05c9f74f5b41d14ee91dd773bd9321fb47cdb065c387e49dde

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.