Skip to content

fix(lean): make lake build actually compile and pass + gitignore build artifacts - #24

Merged
Kairose-master merged 1 commit into
experimentfrom
claude/lean-ci-fix-experiment
Aug 30, 2026
Merged

fix(lean): make lake build actually compile and pass + gitignore build artifacts#24
Kairose-master merged 1 commit into
experimentfrom
claude/lean-ci-fix-experiment

Conversation

@Kairose-master

Copy link
Copy Markdown
Owner

Summary

Same CI investigation as #22 (feature/gemini-proposal) and #23 (main), applied to experiment. This branch's Core/EpsFunctor.lean and Core.lean are 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 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 ≫ f when f : A ⟶ B, g : B ⟶ C₁ don't compose that way) — swapped to f ≫ g.
  • EpsFunctor: dropped an 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 { ..., ?_, ?_ } (mixing named and 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.

Test plan

  • Ran lake update && lake build locally 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 → .lean generator emits — same gap noted on the other two branches. Left for a follow-up.


Generated by Claude Code

`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.
@Kairose-master
Kairose-master merged commit 332f48f into experiment Aug 30, 2026
2 checks passed
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