{"id":51369440,"url":"https://github.com/leanprover/hex-test-kit","last_synced_at":"2026-07-03T05:01:57.170Z","repository":{"id":368210596,"uuid":"1279141121","full_name":"leanprover/hex-test-kit","owner":"leanprover","description":"Mathlib-free test and oracle helpers for the hex libraries.","archived":false,"fork":false,"pushed_at":"2026-07-02T00:54:30.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-02T02:25:26.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://kim-em.github.io/hex-dev/","language":"Lean","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leanprover.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-24T12:12:43.000Z","updated_at":"2026-07-02T00:54:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leanprover/hex-test-kit","commit_stats":null,"previous_names":["kim-em/hex-test-kit","leanprover/hex-test-kit"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/leanprover/hex-test-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fhex-test-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fhex-test-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fhex-test-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fhex-test-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leanprover","download_url":"https://codeload.github.com/leanprover/hex-test-kit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fhex-test-kit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35072845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-03T05:00:44.268Z","updated_at":"2026-07-03T05:01:57.100Z","avatar_url":"https://github.com/leanprover.png","language":"Lean","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hex-test-kit\n\nPart of [`hex`](https://github.com/kim-em/hex-dev), a computer algebra\nlibrary for Lean 4. The aim is fast executable code, fully verified, built\nwith spec-driven development.\n\n`hex-test-kit` provides the shared conformance and benchmark helpers used by\nthe other Hex libraries' test and bench harnesses. It is tooling rather than\na user-facing algebra library, so it ships no algebraic operations of its own.\n\n# Quickstart\n\nAdd to your `lakefile.toml`:\n\n```toml\n[[require]]\nname = \"hex-test-kit\"\ngit = \"https://github.com/leanprover/hex-test-kit.git\"\nrev = \"main\"\n```\n\n```lean\nimport Hex.Conformance.Emit\nimport Hex.BenchOracle.Flint\n\nopen Hex.Conformance.Emit\nopen Hex.BenchOracle.Flint\nopen Lean (Json)\n\n-- A conformance emit driver writes one JSONL fixture per case, then\n-- emits Lean's computed result for each operation under test.\n#check (emitMatrixFixture : String → String → List (List Int) → IO Unit)\n#check (emitResult : String → String → String → String → IO Unit)\n\n-- A bench driver runs one FLINT comparator op through the shared\n-- persistent subprocess and decodes the reply.\n#check (runOp : String → String → Array (String × Json) → IO Json)\n#check (jsonToInts : Json → IO (List Int))\n```\n\n# Functionality\n\n- `Hex.Conformance.Emit`: `IO` helpers that write JSONL records consumed by\n  the external oracles (`emitMatrixFixture`, `emitPolyFixture`,\n  `emitLatticeFixture`, `emitPrimeFixture`, `emitGfqFieldFixture`, and the\n  other per-kind emitters), plus `emitResult` and the result-value builders\n  `intMatrixValue`, `polyValue`, `divModValue`, and `latticeValue`. Output\n  goes to stdout or to the file named by `HEX_FIXTURE_OUTPUT`.\n- `Hex.BenchOracle.Flint`: the persistent-subprocess driver for FLINT\n  comparators. `runOp` sends one JSON request through a cached child process\n  and returns the unwrapped result; `PersistentComparator` owns the child and\n  its stdin handle, and `intsToJson` / `jsonToInts` convert coefficient lists\n  to and from JSON.\n\n# Verification\n\nThis library is test and bench tooling, so it carries no proofs; everything\nit provides is for executable use. The JSON serializer in\n`Hex.Conformance.Emit` is hand-rolled to keep the library dependency-free,\nand the FLINT driver in `Hex.BenchOracle.Flint` depends only on\n`Lean.Data.Json`. Correctness of the data these helpers move is checked\nend to end by the conformance and bench harnesses of the libraries that use\nthem, against the external oracles.\n\n# Contributing\n\nDevelopment happens in the [`hex-dev`](https://github.com/kim-em/hex-dev)\nmonorepo, not in this published mirror. Contributions are welcome as pull\nrequests to the `SPEC/` directory: describe the behaviour you want, and\nleave the implementation to the maintainer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover%2Fhex-test-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleanprover%2Fhex-test-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover%2Fhex-test-kit/lists"}