Download lean/OAI/Computability/DepthThree/EntropyBits.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 778 Bytes
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Computability/DepthThree/EntropyBits.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Computability/DepthThree/EntropyBits.lean
-
curl -L -o EntropyBits.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Computability/DepthThree/EntropyBits.lean
778 Bytes
| import Mathlib.Algebra.BigOperators.Ring.Finset | |
| import Mathlib.Data.Fintype.BigOperators | |
| import Mathlib.Basic.Real.Basic | |
| namespace OAI | |
| namespace DepthThreeLowerBound | |
| open scoped BigOperators | |
| def trueCount {N : ℕ} (z : Fin N → Bool) : ℕ := | |
| (Finset.univ.filter fun i => z i = true).card | |
| theorem trueCount_le {N : ℕ} (z : Fin N → Bool) : trueCount z ≤ N := by | |
| simpa only [trueCount, Finset.card_univ, Fintype.card_fin] using | |
| (Finset.card_filter_le (s := (Finset.univ : Finset (Fin N))) | |
| (p := fun i => z i = true)) | |
| theorem trueCount_cast {N : ℕ} (z : Fin N → Bool) : | |
| (trueCount z : ℝ) = ∑ i, if z i = true then (1 : ℝ) else 0 := by | |
| exact Finset.natCast_card_filter (fun i => z i = true) Finset.univ | |
| end DepthThreeLowerBound | |
| end OAI | |