Download benchmarks/Algorithms/majority_element/lean/helper_lib.lean from PV-SJTU/PV-Bench: direct link, hf CLI and curl.
- Browser
- Download file 386 Bytes
-
https://huggingface.co/datasets/PV-SJTU/PV-Bench/resolve/main/benchmarks/Algorithms/majority_element/lean/helper_lib.lean
- Command line
-
hf download hf://datasets/PV-SJTU/PV-Bench/benchmarks/Algorithms/majority_element/lean/helper_lib.lean
-
curl -L -o helper_lib.lean https://huggingface.co/datasets/PV-SJTU/PV-Bench/resolve/main/benchmarks/Algorithms/majority_element/lean/helper_lib.lean
386 Bytes
| import Algorithms.majority_element.lean.spec_lib | |
| namespace Algorithms.majority_element.lean | |
| open AUXLib | |
| def repeated (candidate vote : Int) : List Int := List.replicate vote.toNat candidate | |
| def MajorityOnReduced (major candidate vote : Int) (rest : List Int) : Prop := | |
| 0 ≤ vote ∧ IsMajorityElement major (repeated candidate vote ++ rest) | |
| end Algorithms.majority_element.lean | |