introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
935 Bytes
import Mathlib
namespace OAI
/-!
# A robust four-row permanent inequality
`Fin 4` labels four sites. A law is represented by real probability masses;
`IsProbability` asserts nonnegativity and total mass one. All row norms use
the uniform counting normalization.
-/
noncomputable section
namespace FourRow
open scoped BigOperators
abbrev Site := Fin 4
abbrev Perm := Equiv.Perm Site
abbrev Law := Perm β†’ ℝ
abbrev Functions := Site β†’ Site β†’ ℝ
def IsProbability (Ξ½ : Law) : Prop :=
(βˆ€ Ο€, 0 ≀ Ξ½ Ο€) ∧ βˆ‘ Ο€, Ξ½ Ο€ = 1
def UniformMarginals (Ξ½ : Law) : Prop :=
βˆ€ i j : Site, βˆ‘ Ο€, (if Ο€ i = j then Ξ½ Ο€ else 0) = 1 / 4
def totalVariation (Ξ½ : Law) : ℝ :=
(βˆ‘ Ο€, |Ξ½ Ο€ - 1 / 24|) / 2
def lpNorm (p : ℝ) (f : Site β†’ ℝ) : ℝ :=
((βˆ‘ j, (f j) ^ p) / 4) ^ (1 / p)
def permanentExpectation (Ξ½ : Law) (f : Functions) : ℝ :=
βˆ‘ Ο€, Ξ½ Ο€ * ∏ i, f i (Ο€ i)
end FourRow
end
end OAI