← Existence And Smoothness Of The Navier–Stokes Equation (navier_stokes_existence_and_smoothness_R3)
Index of theproofnetwork/open-problems@860a535/Prove2Me/Definitions/Def_sensitivity.lean
qedmarket’s copy of theproofnetwork/open-problems@860a535, 1 Dec 2026original source ↗
/-From Prove2Me, definition `sensitivity` (https://prove2.me/definitions/1bcc680c-8792-473d-beb3-e4eb7e2ef4fe). Apache-2.0 per Prove2Me's terms.-/import Prove2Me.Definitions.Def_BoolFuncimport Mathlib.Data.Finset.Basicimport Mathlib.Data.Finset.Lattice.Foldimport Mathlib.Data.Fintype.Pi /-!# Sensitivity of a Boolean function Cook–Dwork–Reischuk's pointwise sensitivity, and its global maximum.-/ /-- Flip the `i`-th bit of `x`. -/def flipBit {n : ℕ} (x : Fin n → Bool) (i : Fin n) : Fin n → Bool := Function.update x i (!x i) /-- Pointwise sensitivity `s(f, x)`: number of neighbors of `x` on which `f` disagrees with `f x`. -/def sensitivityAt {n : ℕ} (f : BoolFunc n) (x : Fin n → Bool) : ℕ := (Finset.univ.filter (fun i : Fin n => f (flipBit x i) ≠ f x)).card /-- Sensitivity `s(f)`: maximum pointwise sensitivity over the cube. -/def sensitivity {n : ℕ} (f : BoolFunc n) : ℕ := Finset.univ.sup (sensitivityAt f)