feat: Port algebra/proofmode_classes.v (IsOp and related type classes)#401
feat: Port algebra/proofmode_classes.v (IsOp and related type classes)#401alvinylt wants to merge 14 commits into
Conversation
| open CMRA | ||
|
|
||
| @[rocq_alias IsOp] | ||
| class IsOp [CMRA α] (a b1 b2 : α) where |
There was a problem hiding this comment.
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.
| open CMRA | ||
|
|
||
| @[rocq_alias IsOp] | ||
| class IsOp [CMRA α] (a b1 b2 : α) where |
There was a problem hiding this comment.
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.
| open CMRA | ||
|
|
||
| @[rocq_alias IsOp] | ||
| class IsOp [CMRA α] (a b1 b2 : α) where |
There was a problem hiding this comment.
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..
Instead of using multiple type classes, utilise InOut for type class synthesis
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.
algebra/lib/frac_auth.v:frac_auth_is_op,frac_auth_is_op_core_idbase_logic/lib/own.v:into_sep_own,into_and_own,from_sep_own,combineSepAs_iOwn,from_and_own_persistentalgebra/dfrac.v:dfrac_is_opalgebra/view.v:view_frag_is_op,view_auth_dfrac_is_opalgebra/auth.v:auth_frag_is_op,auth_auth_dfrac_is_opThe following files are yet to be ported but includes instances of
IsOpor relevant type classes.algebra/gmap.valgebra/numbers.valgebra/frac.valgebra/lib/gmap_view.valgebra/lib/mono_list.valgebra/lib/mono_nat.valgebra/lib/mono_Z.valgebra/lib/ufrac_auth.vbase_logic/lib/ghost_var.valgebra/dyn_reservation_map.valgebra/reservation_map.valgebra/ufrac.vbase_logic/proofmode.vChecklist
PORTING.mdas appropriateauthorssection of any appropriate files