Skip to content

feat(PFunctor): redefine PFunctor.FreeM in terms of PFunctor.W#731

Open
dtumad wants to merge 2 commits into
leanprover:mainfrom
dtumad:dtumad/pfunctor-w
Open

feat(PFunctor): redefine PFunctor.FreeM in terms of PFunctor.W#731
dtumad wants to merge 2 commits into
leanprover:mainfrom
dtumad:dtumad/pfunctor-w

Conversation

@dtumad

@dtumad dtumad commented Jul 18, 2026

Copy link
Copy Markdown

Currently PFunctor.FreeM P A and PFunctor.W (P.add (.const A)) are equivalent but not definitionally equal, so proofs about one can't be translated over to the other automatically, they need to factor through a FreeM.toW and FreeM.ofW definition.

This PR redefines PFunctor.FreeM so that they are the same by construction. Case analysis lemmas are tagged with @[cases_eliminator] and @[induction_eliminator] so those tactics don't break (although manual pattern matching does). It also adds definitions of PFunctor.monomial and PFunctor.add that are used in the definition, and a short test file checking that cases and induction don't break.

Definitions in Basic.lean mostly come from downstream PolyFun library.

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.

1 participant