Buckets:
| import OAI.Combinatorics.Sensitivity.RecursiveSets | |
| namespace OAI | |
| /-! The two recurrences for inputs at which the parent predicates accept. -/ | |
| noncomputable section | |
| open scoped Classical | |
| namespace Paper320 | |
| theorem recursive_sensitivity_one_at {k r h : ℕ} {I : Type} [Fintype I] | |
| (T : Tournament k) (label : Fin k → Fin k → Fin r) | |
| (F : Fin (h + 1) → (I → Bool) → Bool) (o : ℕ) | |
| (ho : ∀ i, (Finset.univ.filter (T.Adj i)).card = o) | |
| (q : Fin h) (x : ((Fin k × Fin r) × I) → Bool) | |
| (hx : recursiveFamily T label F q x = true) : | |
| sensitivityAt (recursiveFamily T label F q) x ≤ | |
| o * sideSensitivity F false + r * sideSensitivity F true := by | |
| obtain ⟨i, hi⟩ := (recursiveFamily_eq_true_iff T label F q x).mp hx | |
| have hcond := (rowClause_eq_true_iff T label F q x i).mp hi | |
| let U := Finset.univ.biUnion fun c => childChanges F (Fin.last h) x i c | |
| let V := (Finset.univ.filter (T.Adj i)).biUnion fun j => | |
| childChanges F (gateIndex q) x j (label i j) | |
| have hsub : (Finset.univ.filter fun p => | |
| recursiveFamily T label F q (flip x {p}) ≠ recursiveFamily T label F q x) ⊆ U ∪ V := by | |
| rintro ⟨⟨j, c⟩, a⟩ hp | |
| have hchange := (Finset.mem_filter.mp hp).2 | |
| have hf : recursiveFamily T label F q (flip x {((j, c), a)}) = false := by | |
| cases hy : recursiveFamily T label F q (flip x {((j, c), a)}) | |
| · rfl | |
| · exact False.elim (hchange (hy.trans hx.symm)) | |
| have hif := (recursiveFamily_eq_false_iff T label F q _).mp hf i | |
| have hic : rowClause T label F q (flip x {((j, c), a)}) i ≠ rowClause T label F q x i := by | |
| simp [hi, hif] | |
| rcases rowClause_flip_change T label F q x i j c a hic with ⟨rfl, ht⟩ | ⟨hij, rfl, hg⟩ | |
| · apply Finset.mem_union_left | |
| apply Finset.mem_biUnion.mpr | |
| exact ⟨c, Finset.mem_univ _, by simpa [childChanges] using ht⟩ | |
| · apply Finset.mem_union_right | |
| apply Finset.mem_biUnion.mpr | |
| exact ⟨j, Finset.mem_filter.mpr ⟨Finset.mem_univ _, hij⟩, | |
| by simpa [childChanges] using hg⟩ | |
| have hU : U.card ≤ r * sideSensitivity F true := by | |
| simpa [U] using card_biUnion_le_mul Finset.univ | |
| (fun c => childChanges F (Fin.last h) x i c) (sideSensitivity F true) | |
| (fun c _ => by | |
| rw [childChanges_card] | |
| exact sensitivityAt_le_sideSensitivity F true _ _ (hcond.1 c)) | |
| have hV : V.card ≤ o * sideSensitivity F false := by | |
| simpa only [V, ho i] using card_biUnion_le_mul (Finset.univ.filter (T.Adj i)) | |
| (fun j => childChanges F (gateIndex q) x j (label i j)) (sideSensitivity F false) | |
| (fun j hj => by | |
| rw [childChanges_card] | |
| exact sensitivityAt_le_sideSensitivity F false _ _ | |
| (hcond.2 j (Finset.mem_filter.mp hj).2)) | |
| calc | |
| sensitivityAt (recursiveFamily T label F q) x ≤ (U ∪ V).card := Finset.card_le_card hsub | |
| _ ≤ U.card + V.card := Finset.card_union_le _ _ | |
| _ ≤ r * sideSensitivity F true + o * sideSensitivity F false := Nat.add_le_add hU hV | |
| _ = _ := Nat.add_comm _ _ | |
| theorem recursive_side_one {k r h : ℕ} {I : Type} [Fintype I] | |
| (T : Tournament k) (label : Fin k → Fin k → Fin r) | |
| (F : Fin (h + 1) → (I → Bool) → Bool) (o : ℕ) | |
| (ho : ∀ i, (Finset.univ.filter (T.Adj i)).card = o) : | |
| sideSensitivity (recursiveFamily T label F) true ≤ | |
| o * sideSensitivity F false + r * sideSensitivity F true := by | |
| apply sideSensitivity_le | |
| exact fun q x hx => recursive_sensitivity_one_at T label F o ho q x hx | |
| theorem recursive_joint_one_at {k r h : ℕ} {I : Type} [Fintype I] | |
| (T : Tournament k) (label : Fin k → Fin k → Fin r) | |
| (F : Fin (h + 1) → (I → Bool) → Bool) (hF : NestedFamily F) (o : ℕ) | |
| (ho : ∀ i, (Finset.univ.filter (T.Adj i)).card = o) | |
| (q q' : Fin h) (hqq : q < q') (x : ((Fin k × Fin r) × I) → Bool) | |
| (hx : recursiveFamily T label F q x = true) | |
| (hx' : recursiveFamily T label F q' x = true) : | |
| jointSensitivityAt (recursiveFamily T label F q) (recursiveFamily T label F q') x ≤ | |
| o * jointSensitivity F false + r * sideSensitivity F true := by | |
| obtain ⟨i, hi'⟩ := (recursiveFamily_eq_true_iff T label F q' x).mp hx' | |
| have hi := rowClause_nested T label F hF hqq.le x i hi' | |
| have hcond := (rowClause_eq_true_iff T label F q x i).mp hi | |
| have hcond' := (rowClause_eq_true_iff T label F q' x i).mp hi' | |
| let U := Finset.univ.biUnion fun c => childChanges F (Fin.last h) x i c | |
| let V := (Finset.univ.filter (T.Adj i)).biUnion fun j => | |
| childJointChanges F (gateIndex q') (gateIndex q) x j (label i j) | |
| have hsub : (Finset.univ.filter fun p => | |
| recursiveFamily T label F q (flip x {p}) ≠ recursiveFamily T label F q x ∧ | |
| recursiveFamily T label F q' (flip x {p}) ≠ recursiveFamily T label F q' x) ⊆ U ∪ V := by | |
| rintro ⟨⟨j, c⟩, a⟩ hp | |
| have hchange := (Finset.mem_filter.mp hp).2 | |
| have hf : recursiveFamily T label F q (flip x {((j, c), a)}) = false := by | |
| cases hy : recursiveFamily T label F q (flip x {((j, c), a)}) | |
| · rfl | |
| · exact False.elim (hchange.1 (hy.trans hx.symm)) | |
| have hf' : recursiveFamily T label F q' (flip x {((j, c), a)}) = false := by | |
| cases hy : recursiveFamily T label F q' (flip x {((j, c), a)}) | |
| · rfl | |
| · exact False.elim (hchange.2 (hy.trans hx'.symm)) | |
| have hif := (recursiveFamily_eq_false_iff T label F q _).mp hf i | |
| have hif' := (recursiveFamily_eq_false_iff T label F q' _).mp hf' i | |
| have hic : rowClause T label F q (flip x {((j, c), a)}) i ≠ rowClause T label F q x i := by | |
| simp [hi, hif] | |
| have hic' : rowClause T label F q' (flip x {((j, c), a)}) i ≠ rowClause T label F q' x i := by | |
| simp [hi', hif'] | |
| rcases rowClause_joint_flip_change T label F q q' x i j c a hic hic' with | |
| ⟨rfl, ht⟩ | ⟨hij, rfl, hg, hg'⟩ | |
| · apply Finset.mem_union_left | |
| apply Finset.mem_biUnion.mpr | |
| exact ⟨c, Finset.mem_univ _, by simpa [childChanges] using ht⟩ | |
| · apply Finset.mem_union_right | |
| apply Finset.mem_biUnion.mpr | |
| exact ⟨j, Finset.mem_filter.mpr ⟨Finset.mem_univ _, hij⟩, | |
| by simpa [childJointChanges] using And.intro hg' hg⟩ | |
| have hU : U.card ≤ r * sideSensitivity F true := by | |
| simpa [U] using card_biUnion_le_mul Finset.univ | |
| (fun c => childChanges F (Fin.last h) x i c) (sideSensitivity F true) | |
| (fun c _ => by | |
| rw [childChanges_card] | |
| exact sensitivityAt_le_sideSensitivity F true _ _ (hcond.1 c)) | |
| have hV : V.card ≤ o * jointSensitivity F false := by | |
| simpa only [V, ho i] using card_biUnion_le_mul (Finset.univ.filter (T.Adj i)) | |
| (fun j => childJointChanges F (gateIndex q') (gateIndex q) x j (label i j)) | |
| (jointSensitivity F false) (fun j hj => by | |
| have hij := (Finset.mem_filter.mp hj).2 | |
| rw [childJointChanges_card] | |
| exact jointSensitivityAt_le_jointSensitivity F false _ _ _ | |
| (gateIndex_strictAnti hqq) (hcond'.2 j hij) (hcond.2 j hij)) | |
| calc | |
| jointSensitivityAt (recursiveFamily T label F q) (recursiveFamily T label F q') x ≤ | |
| (U ∪ V).card := Finset.card_le_card hsub | |
| _ ≤ U.card + V.card := Finset.card_union_le _ _ | |
| _ ≤ r * sideSensitivity F true + o * jointSensitivity F false := Nat.add_le_add hU hV | |
| _ = _ := Nat.add_comm _ _ | |
| theorem recursive_joint_one {k r h : ℕ} {I : Type} [Fintype I] | |
| (T : Tournament k) (label : Fin k → Fin k → Fin r) | |
| (F : Fin (h + 1) → (I → Bool) → Bool) (hF : NestedFamily F) (o : ℕ) | |
| (ho : ∀ i, (Finset.univ.filter (T.Adj i)).card = o) : | |
| jointSensitivity (recursiveFamily T label F) true ≤ | |
| o * jointSensitivity F false + r * sideSensitivity F true := by | |
| apply jointSensitivity_le | |
| exact fun q q' x hqq hx hx' => recursive_joint_one_at T label F hF o ho q q' hqq x hx hx' | |
| end Paper320 | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 7.84 kB
- Xet hash:
- bcd4fe550b1ed66f5a70688354af8d5538e588b31804cefb01fb2d2b571d6200
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.