Download benchmarks/Algorithms/integer_divide/rocq/helper_lib.v from PV-SJTU/PV-Bench: direct link, hf CLI and curl.
- Browser
- Download file 757 Bytes
-
https://huggingface.co/datasets/PV-SJTU/PV-Bench/resolve/main/benchmarks/Algorithms/integer_divide/rocq/helper_lib.v
- Command line
-
hf download hf://datasets/PV-SJTU/PV-Bench/benchmarks/Algorithms/integer_divide/rocq/helper_lib.v
-
curl -L -o helper_lib.v https://huggingface.co/datasets/PV-SJTU/PV-Bench/resolve/main/benchmarks/Algorithms/integer_divide/rocq/helper_lib.v
757 Bytes
| Require Export PVbench.Algorithms.integer_divide.rocq.spec_lib. | |
| From Coq Require Import ZArith List Znumtheory Sorting.Sorted. | |
| Import ListNotations. | |
| Local Open Scope Z_scope. | |
| From Coq Require Import Lia. | |
| (** Internal mathematical state shared by both trial-division loop heads. | |
| Machine ranges, [cnt]/list-length bindings, modulo guards, and array | |
| ownership deliberately remain visible in the C annotation. *) | |
| Definition FactorizationProgress | |
| (original : Z) (factors : list Z) (remaining candidate : Z) : Prop := | |
| fold_right Z.mul 1 factors * remaining = original /\ | |
| Forall prime factors /\ | |
| Sorted Z.le factors /\ | |
| Forall (fun factor => factor <= candidate) factors /\ | |
| (forall d : Z, | |
| 2 <= d < candidate -> ~ Z.divide d remaining). | |