-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Raw
bundles to Relation.Binary.*
hierarchy
#2491
base: master
Are you sure you want to change the base?
Conversation
This looks pretty good, but I do think that the changes to |
UPDATED: Please ignore this comment! The latest round of debugging commits suggest that the I'm not clear about the history of these things, but why do we have the |
Now added, and manifest at the top updated to reflect those additions. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm somewhat undecided if this is the right thing to do. The code seems fine. It is definitely more consistent with what has been done elsewhere, so as a default, this is moving in a coherent direction. I'm just not quite ready to 'approve'.
@JacquesCarette writes:
Beyond your comments on the originating issue #2274 can you say (more) about why you are/might be hesitating? (UPDATED: have just seen your more recent comment there... interesting!) |
Teaching with PLFA right now, have updated to agda-2.7 and stdlib-2.2, and some things have gotten worse. I've got some issues to bring up when I have the time. One example: having |
Are these issues to do with this PR, or general comments deserving a separate issue for v2.1/v2.2, or even on the PLFA tracker? hard to see how |
The example is of the latter kind. But the reason I'm hesitating is related to me finding teaching with post-v2.0 stdlib a bit awkward compared to 1.7. |
Still: suggest you move this thread off this PR? |
Could you submit this as a separate issue, so that we can discuss these issues in detail? |
@wenkokke wrote:
planning to! I've been swamped, so this is still in my ToDo queue. |
Yes, in retrospect it wasn't the best idea, but at the time, it was the only way to add them that preserved backwards compatibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other refactorings look good though!
src/Relation/Binary/Bundles/Raw.agda
Outdated
-- RawPreorder | ||
------------------------------------------------------------------------ | ||
|
||
record RawPreorder c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm so following the pattern of Algebra.Bundles.Raw
, then bundle equivalence is determined not by the names of the relation, but by their signature. For example both CommutativeMonoid
and Monoid
both have a single RawMonoid
base.
Therefore to be consistent I think RawPreorder
, RawPartialOrder
, RawStrictPartialOrder
and RawApartness
relation should all be a single record... With what name I don't know...
If the purpose of this is to introduce syntax, then I think we need to use some other mechanism other than Raw
bundles...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things:
- good point about shared signatures (and
_∼_
would be the 'canonical' choice of symbol here?), and then let the correspondingRaw
sub bundles inBundles
handle the renaming to orthodox/rectified syntax? - as with discussions with @JacquesCarette , for me the issue is one of being able, for a given raw signature, to enrich it with 'obvious' derived operations which allow smoother treatment of subsequent properties etc. The 'syntax' aspect here is really about standardising notation for these otherwise useful/important derived notions...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest commit introduces RawRelation
in Relation.Binary.Bundles.Raw
and associated rawRelation
fields in Relation.Binary.Bundles
, together with all the relevant hiding
/renaming
directives to fix the syntax.
Is this an improvement?
So, while I would still be happy/happier to see this merged (despite @JacquesCarette 's hesitation about doing so), it's somewhat ironic that we seem, via this route, to have reinstated the 'old' vocabulary (and then erased it via |
This addresses the
Relation.Binary.Bundles.Raw
part of #2274 ahead of any subsequent refactoring of theAlgebra
hierarchy in earnest, to exploit the standardisation of vocabulary/fixity envisaged there.Adds:
RawX
bundles systematically to mirror those inRelation.Binary.Bundles.X
rawX
manifest fields to each of those inRelation.Binary.Bundles.X
NB. Possible issues:
Relation.Bundles
definitions, this introducesrawSetoid
fields at the top level to eachRawX
bundle, in order to also introduce the negated equality symbol_≉_
uniformly.DecX
hierarchy is not mirrored with a parallelRawDecX
hierarchy... which might otherwise violate the proposed alternative dependency structure outlined in [DRY] Reconciling the indices ofIsX
with those of the correspondingRawX
#2252 ._≉_
defined both forAlgebra.Bundles.Raw.RawX
bundles, and viaSetoid
instances, forAlgebra.Bundles.X
? #2274 the current design forApartnessRelation
introduces its negated relation symbol in theStructures
hierarchy (cf.Algebra.Structures.IsGroup
...), moreover without any fixity declaration; so there are/might be opportunities to rectify this design viapublic
re-export...?