Download data/lean/OAI/Combinatorics/Permanent/Model.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 935 Bytes
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/Permanent/Model.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/Permanent/Model.lean
-
curl -L -o Model.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/Permanent/Model.lean
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 | |