-
Notifications
You must be signed in to change notification settings - Fork 0
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
introduces a function called multiplicity to replace card[Ω](μ) #110
Conversation
@afs @kasei @Tpt @rubensworks This PR has been around for a while without attracting any discussion. Perhaps that is because I marked the PR as WIP? The reason why I did so is because the PR is not (yet) complete regarding the changes implied by the proposal that I am making here. I just wanted to first get your initial opinions on the proposal before I spend the time implementing the rest of the changes that would follow from the proposal. Therefore, can you please take a look at the preview of this PR and let me know what you think. The current changes are in particular in Section 18.3 and in the definition of the Filter operator (as an example to illustrate how the new multiplicity function would be used in the definitions of the algebra operators). |
It looks great to me! Using "multiplicityΩ(μ)" confused me a bit during a first reading because I read the function name as just "Ω(μ)" and "multiplicity" as a sentence word. What about finding a way with typography (italics?) to make clear that "multiplicity" is here part of the function name and not part of the sentence? |
Good point. I have pushed commit a98dac6 which uses the feature of ReSpec to explicitly markup symbols in math formulas. Now the function name is rendered in italic font. Additionally, if you look at the HTML locally (it doesn't work in the preview), you can even click on every symbol within the definition to have other occurrences of the symbol highlighted within the definition. |
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.
Should the <var>
magic not be applied throughout, rather than being confined to the definition?
Yes it should. However, I see that as something that is orthogonal to the proposal in this PR. Instead, I see it as something that we should do systematically across the whole document, as per issues #102 and #103. |
Given that If it must be done in separate PR(s), can you confirm that I applied it correctly to the complex expressions? I'm not sure I understand how things nest with it. |
I was just working on replies to your two change suggestions ;-) These replies should be visible now. |
I agree that changing "cardinality" to "multiplicity" is an improvement. It is difficult to have helpful styling here. Using the superscripts is one way but text does become small which may be an accessibility issue. Choosing the presentation should not stop this PR because we can change the presentation later.
There is more significant text in the the superscripts. |
That's a good start ;-)
Yes, I can see this being a problem, in particular because, as you say, the text in the superscripts can be quite significant.
Given that my proposed change needs to be applied to quite a number of definitions (all in Section 18.5 SPARQL Algebra), and considering that switching from my currently proposed superscript-based presentation to some other presentation may not be easily done with a search-and-replace, I would prefer we agree on a presentation before I implement the rest of this PR. So, here is an alternative to the superscript-based presentation: How's about we write multiplicity( μ | Ω ) to denote the multiplicity of μ in Ω? With this presentation, your example for LeftJoin would then be: multiplicity( μ | LeftJoin(Ω1, Ω2, expr) ) = Is that better? |
Yes. I came back to this PR to suggest using a word |
I have implemented the change to the presentation of the multiplicity function, using I am planning to extend this PR to apply the proposal to all relevant parts of the document. |
Thank you! |
…nges the terminology accordingly
This PR is now ready for the actual review. I have extended it by applying the proposal to all relevant parts of the document, and I have also switched to the correct terminology (cardinality -> multiplicity) in all the relevant places (see commit 7e6e6f9). There are still a few mentions of "cardinality" but these really refer to the notion of cardinality of some set or some sequence, rather than to the multiplicity of an element within a multiset or sequence. |
Co-authored-by: Ted Thibodeau Jr <[email protected]>
Co-authored-by: Ted Thibodeau Jr <[email protected]>
Now we have an example rendering issue — The above is seen in Chrome Version 116.0.5845.187 (Official Build) (x86_64) on macOS Mojave version 10.14.6 (18G9323). This would be resolved by my previous suggestion to add a space between all |
I think the only remaining point in this PR is the rendering issue that @TallTed has in his browser (whereas it looks perfectly fine on my end, in different browsers). Ted, given that this issue is not really related to the actual content of this PR, are you okay if I merge the PR? |
For the record, the rendering issue I posted above is seen in Chrome Version 116.0.5845.187 (Official Build) (x86_64) on macOS Mojave version 10.14.6 (18G9323). (I'm also adding these details to the comment with that screencap.) I'm fine with merging this PR as is, and treating the rendering issue as distinct. |
Thanks @TallTed. |
In the context of discussing the new Card(..) function introduced in PR #108, @afs writes:
This PR here is a proposal to address this comment. In particular, this PR introduces a function called 'multiplicity' with a definition that can be cross-referenced, and (currently) one place where this function is used (namely, in the definition of Filter). The latter is to demonstrate how it would look like to use this functions instead of the notation
card[Ω](μ)
. My proposal is to replace all occurrences ofcard[Ω](μ)
in this way.Preview | Diff