Skip to content

feat: Port algebra/proofmode_classes.v (IsOp and related type classes)#401

Draft
alvinylt wants to merge 14 commits into
leanprover-community:masterfrom
ISTA-PLV:IsOp
Draft

feat: Port algebra/proofmode_classes.v (IsOp and related type classes)#401
alvinylt wants to merge 14 commits into
leanprover-community:masterfrom
ISTA-PLV:IsOp

Conversation

@alvinylt
Copy link
Copy Markdown
Contributor

@alvinylt alvinylt commented May 20, 2026

Description

Ports algebra/proofmode_classes.v by implementing IsOp, its relevant type classes and type class instances.

Addresses #229.

Instances of these type classes exist in the following files but are yet to be ported.

The following files are yet to be ported but includes instances of IsOp or relevant type classes.

Checklist

  • My code follows the mathlib naming and code style conventions
  • I have updated PORTING.md as appropriate
  • I have added my name to the authors section of any appropriate files

Comment thread Iris/Iris/Algebra/IsOp.lean Outdated
open CMRA

@[rocq_alias IsOp]
class IsOp [CMRA α] (a b1 b2 : α) where
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having all these different versions of the IsOp typeclass as in Rocq, I think it should work to have a single IsOp typeclass if one is careful about how to set the input and output parameters using InOut. See here for an explanation how the input output handling works in the proof mode TC synthesis.

Comment thread Iris/Iris/Algebra/IsOp.lean Outdated
open CMRA

@[rocq_alias IsOp]
class IsOp [CMRA α] (a b1 b2 : α) where
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add instances for the IsOp typeclass and also the instances that use IsOp such that one can test whether it does the right thing.

Comment thread Iris/Iris/Algebra/IsOp.lean Outdated
open CMRA

@[rocq_alias IsOp]
class IsOp [CMRA α] (a b1 b2 : α) where
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add a comment here how IsOp can be used (i.e. both for merging and for splitting). You can base it on the comment in the Rocq version, but note that the details of TC search are different..

@alvinylt alvinylt marked this pull request as draft May 21, 2026 07:46
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