fix(lean): make lake build actually compile and pass + gitignore build artifacts - #24
Merged
Merged
Conversation
`lake build` (CI's proof-check step) was failing against the pinned
mathlib (v4.21.0-rc2). This branch's Core/EpsFunctor.lean is yet another
distinct revision of the design (Core.lean here imports Core.RawPrefunctor/
EpsFunctor/Tactics directly, unlike main's single-file version or
feature/gemini-proposal's CatPrism.lean aggregator), so the fixes are
specific to this variant:
- EpsFunctor.comp_ok: composition order was backwards (`g ≫ f` when
f : A ⟶ B, g : B ⟶ C₁ don't compose that way) - swapped to `f ≫ g`.
- EpsFunctor: dropped the incorrect manual `Type (u+1)` universe
ascription, letting Lean infer the correct universe.
- EpsFunctor.fromStrict: took `Decidable (d f f = 0)`, which only
proves the equality is decidable, not that it holds - replaced with
an actual reflexivity hypothesis `(hd : ∀ {A B} (f : A ⟶ B), d f f = 0)`.
Also fixed a broken anonymous-constructor `refine { ..., ?_, ?_ }`
(mixed named/unnamed fields is invalid syntax) by switching to a
`where` clause, and made C/D explicit via `@EpsFunctor C D _ _ d 0`
since they were left as stuck metavariables during typeclass search.
- Core.lean: `open Core.EpsFunctor` referenced a namespace that doesn't
exist - Core/EpsFunctor.lean declares `namespace EpsFunctor`, not
`namespace Core.EpsFunctor` - fixed to `open EpsFunctor`.
Also adds .gitignore for build artifacts (parser/target/,
core/lean/.lake/, core/lean/AutoGen/) - the repo had none, so
reproducing CI locally left them as untracked output.
Verified with a clean `lake update && lake build` locally - green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Same CI investigation as #22 (
feature/gemini-proposal) and #23 (main), applied toexperiment. This branch'sCore/EpsFunctor.leanandCore.leanare yet another distinct revision of the design (Core.leanhere importsCore.RawPrefunctor/EpsFunctor/Tacticsdirectly, unlikemain's single-file version orfeature/gemini-proposal'sCatPrism.leanaggregator), so the fixes are specific to this variant rather than a copy-paste of the earlier ones.lake build(CI's proof-check step) was failing against the pinned mathlib (v4.21.0-rc2):EpsFunctor.comp_ok: composition order was backwards (g ≫ fwhenf : A ⟶ B,g : B ⟶ C₁don't compose that way) — swapped tof ≫ g.EpsFunctor: dropped an incorrect manualType (u+1)universe ascription, letting Lean infer the correct universe.EpsFunctor.fromStrict: tookDecidable (d f f = 0), which only proves the equality is decidable, not that it holds — replaced with an actual reflexivity hypothesis(hd : ∀ {A B} (f : A ⟶ B), d f f = 0). Also fixed a broken anonymous-constructorrefine { ..., ?_, ?_ }(mixing named and unnamed fields is invalid syntax) by switching to awhereclause, and madeC/Dexplicit via@EpsFunctor C D _ _ d 0since they were left as stuck metavariables during typeclass search.Core.lean:open Core.EpsFunctorreferenced a namespace that doesn't exist —Core/EpsFunctor.leandeclaresnamespace EpsFunctor, notnamespace Core.EpsFunctor— fixed toopen EpsFunctor.Also adds
.gitignorefor build artifacts (parser/target/,core/lean/.lake/,core/lean/AutoGen/) — the repo had none, so reproducing CI locally left them as untracked output.Test plan
lake update && lake buildlocally on this branch — clean build (one harmless unused-variable warning only).Known remaining gap (out of scope here)
CatPrism_examples.lean(not a CI default target) still references names that don't match what the.cat → .leangenerator emits — same gap noted on the other two branches. Left for a follow-up.Generated by Claude Code