Download benchmarks/Algorithms/maximum_subarray/rocq/spec_lib.v from PV-SJTU/PV-Bench: direct link, hf CLI and curl.
- Browser
- Download file 593 Bytes
-
https://huggingface.co/datasets/PV-SJTU/PV-Bench/resolve/main/benchmarks/Algorithms/maximum_subarray/rocq/spec_lib.v
- Command line
-
hf download hf://datasets/PV-SJTU/PV-Bench/benchmarks/Algorithms/maximum_subarray/rocq/spec_lib.v
-
curl -L -o spec_lib.v https://huggingface.co/datasets/PV-SJTU/PV-Bench/resolve/main/benchmarks/Algorithms/maximum_subarray/rocq/spec_lib.v
593 Bytes
| Require Import Coq.ZArith.ZArith. | |
| Require Import Coq.Lists.List. | |
| From AUXLib Require Import ListLib. | |
| From MaxMinLib Require Import MaxMin Interface. | |
| Import ListNotations. | |
| Local Open Scope Z_scope. | |
| Local Open Scope list_scope. | |
| Definition MaxSubarraySumPrefix (l : list Z) (i ans : Z) : Prop := | |
| max_value_of_subset Z.le | |
| (fun p : Z * Z => | |
| let '(lo, hi) := p in | |
| 0 <= lo /\ lo < hi /\ hi <= i) | |
| (fun p : Z * Z => | |
| let '(lo, hi) := p in | |
| sum (sublist lo hi l)) | |
| ans. | |
| Require Import Coq.micromega.Lia. | |
| Require Import SetsClass.SetsClass. | |
| Import SetsNotation. | |