# Pinned to the revision PhysLib v4.35.0 locks in its lake-manifest.json; a dependent's # `lake build` accepts an installed package only at that exact commit, so this # moves together with lean4-mathlib and lean4. %global commit 56a005855ea17e0b0958f73ec801ae140b0a1679 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapdate 20261013 %global lean_version 4.35.0 %global lakename mathlib Name: lean4-mathlib Version: 4.35.0 Release: 1%{?dist} Summary: Mathlib: the mathematical library of Lean 4 License: Apache-2.0 URL: https://github.com/leanprover-community/mathlib4 Source0: %{url}/archive/%{commit}/mathlib4-%{commit}.tar.gz # `git cat-file commit %%{commit}`: %%lean4_git_init rebuilds the checkout # Lake expects from the tarball (see macros.lean4). Source1: mathlib-%{commit}.commit BuildArch: noarch BuildRequires: lean4 = %{lean_version} BuildRequires: lean4-rpm-macros BuildRequires: git-core BuildRequires: lean4-package(batteries) = 66e469188fe07963e5cf666c7d4433f45b8131c5 BuildRequires: lean4-package(Qq) = dce0ad79c486cb1fb504af04f953c3466b0c6db8 BuildRequires: lean4-package(aesop) = 4a174c490d8707121c4a9290800489f105d85e07 BuildRequires: lean4-package(proofwidgets) = df72b022e558978a1c50264cfc4d7fec86fa8e04 BuildRequires: lean4-package(importGraph) = a41f0e9a4dea23188ea9cc1c41ac9f8bbafe0b93 BuildRequires: lean4-package(LeanSearchClient) = d6b4c7be5be75ec4917c873ac50c756dc1436372 BuildRequires: lean4-package(plausible) = dfa4f38190d07c37e315953e08b90fe2d95b3c24 BuildRequires: lean4-package(Cli) = c24fe6078c630e89b489bffe59b3e20ac30d12c8 Requires: lean4 = %{lean_version} Requires: lean4-package(batteries) = 66e469188fe07963e5cf666c7d4433f45b8131c5 Requires: lean4-package(Qq) = dce0ad79c486cb1fb504af04f953c3466b0c6db8 Requires: lean4-package(aesop) = 4a174c490d8707121c4a9290800489f105d85e07 Requires: lean4-package(proofwidgets) = df72b022e558978a1c50264cfc4d7fec86fa8e04 Requires: lean4-package(importGraph) = a41f0e9a4dea23188ea9cc1c41ac9f8bbafe0b93 Requires: lean4-package(LeanSearchClient) = d6b4c7be5be75ec4917c873ac50c756dc1436372 Requires: lean4-package(plausible) = dfa4f38190d07c37e315953e08b90fe2d95b3c24 Requires: lean4-package(Cli) = c24fe6078c630e89b489bffe59b3e20ac30d12c8 # what a dependent's spec pins: the Lake package name at its exact revision Provides: lean4-package(%{lakename}) = %{commit} %description Mathlib is the community mathematical library for Lean 4: algebra, analysis, topology, geometry, combinatorics, probability and the tactics that go with them, in several hundred thousand formally verified declarations. This package is the `Mathlib` library only (not Archive, Counterexamples or the test suite), built with the system lean4 and installed for Lake to use as a dependency without a network. %prep %autosetup -n mathlib4-%{commit} %lean4_git_init %{SOURCE1} %{url} %lean4_dep batteries %lean4_dep Qq %lean4_dep aesop %lean4_dep proofwidgets %lean4_dep importGraph %lean4_dep LeanSearchClient %lean4_dep plausible %lean4_dep Cli %build %lean4_build Mathlib %check # the installed oleans load and elaborate against this toolchain cat > %{_builddir}/check-%{lakename}.lean <<'EOF' import Mathlib example (a b : ℕ) : a + b = b + a := by ring EOF lake env lean %{_builddir}/check-%{lakename}.lean %install %lean4_install %{lakename} %files %license LICENSE %doc README.md %{_lean4_pkgdir}/%{lakename}/ %changelog * Mon Nov 02 2026 Morgan Hough - 4.35.0-1 - Initial package: the revision PhysLib v4.35.0 pins