-
Notifications
You must be signed in to change notification settings - Fork 246
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
Adds unary disjoint relation #2595
base: master
Are you sure you want to change the base?
Conversation
Before I fix the build errors (due to overloaded |
src/Relation/Unary.agda
Outdated
@@ -207,7 +207,7 @@ infixr 8 _⇒_ | |||
infixr 7 _∩_ | |||
infixr 6 _∪_ | |||
infixr 6 _∖_ | |||
infix 4 _≬_ | |||
infix 4 _≬_ _#_ _#′_ |
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.
What about \perp
/⊥
instead? (not \bot
BTW, but indistinguishable in many fonts, alas...)
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.
That's Ok by me. That said, I already find some of the symbols used in Relation.Unary
to be difficult to distinguish.
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.
paging in @WolframKahl who might also have a suggestion.
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.
Because \bot
and \perp
are so hard to distinguish, I'm not pro. I think using the same symbol as apartness
makes sense.
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 just pushed a version using \perp
, so folks can look at it.
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.
Actually, at least in github
, I find I can distinguish it from \bot
.
FWIW, I think I'd rather have a distinct symbol than need to have hiding
directives/qualified import
s for the sake of reusing _#_
...
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.
Another option is to be more verbose as in _IsDisjointFrom_
.
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.
Perhaps, 'ideally', use of a 'fat \perp' might be best, but I don't think we can shoehorn that into the agda-input-mode
...?
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.
that would be nice (fat perp)
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.
We can definitely add ⫫
to the input mode if you want it
(in lieu of my (now deleted) comment, I took the liberty of adding the link myself to your OP... hope that's OK) |
Of course, thanks! |
cf. #2594 ... Can you also add some properties of these relations? Or other extensions, eg.:
All of these strictly go outside the scope of what you have so far, but might also give life to the new definitions. You also alluded to how they are part of your basic toolkit when developing in Agda, so what's a specimen client application/deployment context which might also be generally useful as an addition to the library? |
Yes, will do. Those are good suggestions. |
I'm working on formalizing parts probability/statistics/causal inference wherein disjoint "events" or sets are sometimes a precondition in a theorem, e.g. Pearl's definition of d-separation. |
Nice! But not sure quite how in scope (yet) that might be for |
I wouldn't expect most of what I'm noodling on to be in scope for |
Thanks for the reference -- looks quite interesting. |
Done in f77d38b |
Trying to import |
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.
Thanks very much for the PR, it looks in good shape for merging once the CHANGELOG
is fixed.
I'm happy with \perp
as the symbol, but I'll leave it to the other maintainers to rule on this.
On Tue, Feb 25, 2025 at 05:20:24PM -0800, Jacques Carette wrote:
that would be nice (fat perp)
Fat perp is apparently not on offer by Unicode, but see:
https://www.fileformat.info/info/unicode/char/search.htm?q=perp&han=Y
https://www.fileformat.info/info/unicode/char/search.htm?q=tack&han=Y
|
In favour of
In favour of
Regarding @WolframKahl 's links to Unicode, I wonder if perhaps we should make every module preamble comment include the new (infix/mixfix) symbols introduced with their character encodings ( |
That seems like a good idea. |
Agreed. |
Co-authored-by: jamesmckinna <[email protected]>
On Wed, Feb 26, 2025 at 03:58:22AM -0800, jamesmckinna wrote:
In favour of `\perp`:
* [...]
* mildly distinct visually from `\bot`
With my current fonts, I can see that when they are side-by-side,
but I wouldn't be able to distinguish individual occurrences.
I'd therefore argue against using both symbols in Agda.
|
Hmm... that's a shame, I think. I'd maybe try to influence things further by adding
But I'd better stop beating this particular donkey now. |
I have no strong opinions on the choice of symbol. We use quite a lot of close cognates in the library already, but I can understand the urge not to add more. |
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 will relent on the name.
@bsaul I've made a couple of suggestions, and additions, happy to commit those if you don't have time, along with fixing up the merge conflicts. |
@jamesmckinna looks good to me. I can make the changes later today. But if you have time sooner, please feel free to make the commits and fix up. |
Refactor to achieve greater level polymorphism
Simplify types
Merge conflicts resolved; additions improve level polymorphism, but also (hopefully) avoid potential unsolved metas when applying the |
My extensive additions mean that I'm no longer independent, so fresh eyes required.
We discussed using the bbot in agda/agda-stdlib#2595
I've opened https://github.com/agda/agda/pull/7791/files to add the relevant unicode symbols |
So maybe we should hold off on this, so that the new symbol(s) can be used? |
Very happy/happier still with fat perp over perp... however we end up supporting it? |
Oh I see, |
Once we can and do agree on the symbol, suggest updating the declaration of the symbol in the spirit of #2690 ... |
* [ new ] unicode symbols for various 'tacks' We discussed using the bbot in agda/agda-stdlib#2595 * Fix silly mistake * [ changelog ] for the emacs mode extension
This PR adds the relation between two predicates expressing disjointness.
I am not at all wedded to the
_#_
notation.See the discussion on the Agda Zulip for more background.