{"id":51428382,"url":"https://github.com/leanprover/hex-bareiss-mathlib","last_synced_at":"2026-07-05T03:00:28.871Z","repository":{"id":368301519,"uuid":"1283548711","full_name":"leanprover/hex-bareiss-mathlib","owner":"leanprover","description":"Mathlib correspondence proofs for hex-bareiss. Published from hex-dev.","archived":false,"fork":false,"pushed_at":"2026-07-04T04:42:14.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-04T06:25:06.198Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://kim-em.github.io/hex-dev/find/?domain=Verso.Genre.Manual.section\u0026name=hex-bareiss","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-29T02:59:55.000Z","updated_at":"2026-07-04T04:42:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leanprover/hex-bareiss-mathlib","commit_stats":null,"previous_names":["kim-em/hex-bareiss-mathlib","leanprover/hex-bareiss-mathlib"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/leanprover/hex-bareiss-mathlib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fhex-bareiss-mathlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fhex-bareiss-mathlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fhex-bareiss-mathlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fhex-bareiss-mathlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leanprover","download_url":"https://codeload.github.com/leanprover/hex-bareiss-mathlib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Fhex-bareiss-mathlib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35141966,"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-05T02:00:06.290Z","response_time":100,"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-05T03:00:22.012Z","updated_at":"2026-07-05T03:00:28.861Z","avatar_url":"https://github.com/leanprover.png","language":"Lean","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hex-bareiss-mathlib\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-bareiss-mathlib` is the Mathlib bridge for\n[`hex-bareiss`](https://github.com/leanprover/hex-bareiss). It proves the\nrow-pivoted Bareiss determinant correct, both against Mathlib's `Matrix.det`\nand against the executable Leibniz determinant from\n[`hex-determinant`](https://github.com/leanprover/hex-determinant). It depends on\n[`hex-bareiss`](https://github.com/leanprover/hex-bareiss),\n[`hex-determinant-mathlib`](https://github.com/leanprover/hex-determinant-mathlib),\nand Mathlib.\n\n# Quickstart\n\nAdd to your `lakefile.toml`:\n\n```toml\n[[require]]\nname = \"hex-bareiss-mathlib\"\ngit = \"https://github.com/leanprover/hex-bareiss-mathlib.git\"\nrev = \"main\"\n```\n\n```lean\nimport HexBareissMathlib\n\nopen HexMatrixMathlib\n\n-- The executable Bareiss determinant equals the Leibniz determinant.\n#check @bareiss_eq_det\n-- @bareiss_eq_det : ∀ {n : ℕ} (M : Hex.Matrix ℤ n n), M.bareiss = M.det\n\n-- ... and equals Mathlib's determinant of the corresponding matrix.\n#check @bareissDet_eq_det\n-- @bareissDet_eq_det : ∀ {n : ℕ} (M : Hex.Matrix ℤ n n), M.bareiss = (matrixEquiv M).det\n```\n\n# Functionality\n\n- `bareiss_eq_det`: the row-pivoted Bareiss determinant equals the\n  executable Leibniz `Hex.Matrix.det`;\n- `bareissDet_eq_det` (also `bareiss_eq_mathlib_det`): it equals Mathlib's\n  `Matrix.det` of the corresponding matrix `matrixEquiv M`;\n- `bareissNoPivot_eq_det` and the bordered-minor invariant\n  (`BareissNoPivotInvariant`, `NonzeroBareissPivots`): the Desnanot-Jacobi\n  argument that drives the no-pivot correctness proof.\n\n# Verification\n\nThe correspondence is fully proven on integer square matrices. The two\nheadline theorems are the preferred surface for Mathlib-side callers; both\nhold outright, with no hypothesis to discharge.\n\nThe executable Bareiss determinant equals the Leibniz determinant,\n`bareiss_eq_det`:\n\n```lean\ntheorem bareiss_eq_det (M : Hex.Matrix Int n n) :\n    Hex.Matrix.bareiss M = Hex.Matrix.det M\n```\n\nIt also equals Mathlib's determinant, `bareissDet_eq_det`:\n\n```lean\ntheorem bareissDet_eq_det (M : Hex.Matrix Int n n) :\n    Hex.Matrix.bareiss M = Matrix.det (matrixEquiv M)\n```\n\nThe Mathlib statement is proven directly by running the Bareiss loop and\ntracking the bordered-minor invariant step by step, `bareiss_eq_mathlib_det`:\n\n```lean\ntheorem bareiss_eq_mathlib_det (M : Hex.Matrix Int n n) :\n    Hex.Matrix.bareiss M = Matrix.det (matrixEquiv M)\n```\n\nThe executable algorithm itself lives in\n[`hex-bareiss`](https://github.com/leanprover/hex-bareiss); these theorems are on\nthat Mathlib-free library's forbidden list and live here by design.\n\n# Reference manual\n\nThe hex reference manual covers this library and its computational base at\n\u003chttps://kim-em.github.io/hex-dev/find/?domain=Verso.Genre.Manual.section\u0026name=hex-bareiss\u003e.\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-bareiss-mathlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleanprover%2Fhex-bareiss-mathlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover%2Fhex-bareiss-mathlib/lists"}