Index of theproofnetwork/open-problems@860a535/Prove2Me/Definitions/Def_SensitivitySeparation.lean
qedmarket’s copy of theproofnetwork/open-problems@860a535, 1 Dec 2026original source ↗
/-From Prove2Me, definition `SensitivitySeparation` (https://prove2.me/definitions/641a29d6-5fe9-45d5-a3cd-f88a8ee1259d). Apache-2.0 per Prove2Me's terms.-/import Mathlib -- Generated from openai/math @ adc7f1241b42e322a6451854ab7e4b4c146bf78a-- Source: lean/ComparatorChallenges/SensitivitySeparation.lean; bytes 16..927-- Kind: block; original declaration names and bodies preserved.-- Source groups are independent. Target: Lean 4.33.1; see compilation.json. namespace OAI noncomputable sectionopen scoped Classical namespace Paper320 def flip {I : Type} (x : I → Bool) (B : Finset I) : I → Bool := fun i => if i ∈ B then !(x i) else x i def sensitivityAt {I : Type} [Fintype I] (f : (I → Bool) → Bool) (x : I → Bool) : ℕ := (Finset.univ.filter fun i => f (flip x {i}) ≠ f x).card def sensitivity {I : Type} [Fintype I] (f : (I → Bool) → Bool) : ℕ := Finset.univ.sup (sensitivityAt f) def blockSensitivityAt {I : Type} [Fintype I] (f : (I → Bool) → Bool) (x : I → Bool) : ℕ := Finset.univ.sup fun blocks : Finset (Finset I) => if (∀ A ∈ blocks, ∀ B ∈ blocks, A ≠ B → Disjoint A B) ∧ (∀ B ∈ blocks, B.Nonempty ∧ f (flip x B) ≠ f x) then blocks.card else 0 def blockSensitivity {I : Type} [Fintype I] (f : (I → Bool) → Bool) : ℕ := Finset.univ.sup (blockSensitivityAt f) end Paper320endend OAI