Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimize Mathlib imports #31

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Minimize Mathlib imports #31

merged 1 commit into from
Jan 8, 2025

Conversation

mpenciak
Copy link
Contributor

@mpenciak mpenciak commented Jan 8, 2025

This PR minimizes the usage of import Mathlib and replaces it with more targeted Mathlib imports

I noticed some slow compilation issues (likely related to this Zulip thread) while I was going through and first getting familiar with the library structure, and this fixes it to a certain extent.

Some downsides of this:

  • There are some unexpected outcomes in downstream files when one takes away import Mathlib
  • Certain typeclass instance/coercions were unexpectedly being used in certain places
    • One in particular was OfNat ((Fp p) × Unit) 5 which went through deducing CommRing Unit in
      Lampe.Builtin.Struct was a surprising one.

The only occurence of import Mathlib that remains is in Lampe.lean which has a bunch of examples. That rely on aesop to function. Perhaps these examples could be moved to a separate example file, and Lampe.lean could be the root of the library for end-users to import?

@mpenciak mpenciak merged commit 4531c50 into main Jan 8, 2025
6 checks passed
@mpenciak mpenciak deleted the mp/mathlib_imports branch January 8, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants