-
Notifications
You must be signed in to change notification settings - Fork 242
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
Fix the syntax for symmetric equality reasoning combinator #1138
Comments
I like the shorter alternatives. If we have to put in the relation wrt which we're working, I'm wondering about putting it in the other order, i.e. I think having these as aliases (or the current ones as aliases) could be an interesting experiment. Let a couple of versions go by, and see what people tend to use the most, then deprecate the other. |
+1 for putting the direction indicator after the relation symbol. Regarding the direction indicator, would horizontal arrows (of some style) make more sense or be more likely to be confused with the many other uses of horizontal arrows? |
Equality reasoning proves are usually code-set vertically. 🤷♂️ |
I like the idea of vertical arrows. My only comment is that I also like having the angle brackets aligned on the page, which is one of things that I find very distressing about the current sym notation. This proposal would partially fix it as the sym and non-sym-ed versions would now align, but it still wouldn't align with other operators, e.g. inequalities: begin
(m / n) * n ≤⟨ ... ⟩
(m / n) * n + m % n ≡↑⟨ ... ⟩
m % n + (m / n) * n ≡↓⟨ ... ⟩
m ∎ Would people hate it if we moved the arrows inside the brackets? i.e. begin
(m / n) * n ≤⟨ ... ⟩
(m / n) * n + m % n ≡⟨↑ ... ⟩
m % n + (m / n) * n ≡⟨↓ ... ⟩
m ∎ |
Yes. 😉 If you want them inside, you can also define Having the arrows after the closing hint bracket looks more acceptable to me:
Or, even better: 😉
|
I also would dislike the arrows inside the brackets. Having them after is better than inside [though not necessarily the best choice]. |
A trailing character at the far right of the line is easy to miss. We dismissed What about a modified Or if we want to merge the idea of an arrow and an equality sign, we have the Note that |
Yeah I think using different symbols to denote the same equality is more confusing than necessary. It looks like we're mixing pragmatics and aesthetics. The pragmatics seem to be:
Additionally it would be nice if it is notation that is portable to other reasoning combinators? |
Oh, that is embarrassing, there is standard notation for this!
|
A (perhaps mischievous) thought:
The tragedy is that it clashes with our existing conventions (sigh ;-)), but it has always seemed to me a cognitive overload to insist that The tragedy is compounded by the choices for |
On second thoughts, it seems that I prefer to reverse the 'bracket orientation':
I'll fix this up when I'm not writing on my phone... |
I really like this suggestion 👍 The only one I've seen I'd be happy implementing! And it would be backwards compatible as we could leave the old names in place. |
I could definitely warm up to this too. |
I'd want to check how it interacts with emacs' parenthesis-matching tools; I think |
Looking at Orestis' talk this morning, I realise we could do the following:
|
Given @Taneb's objections to my 'non-well-bracketed' proposals, this seems like a palatable alternative! UPDATED: I suppose that @MatthewDaggitt 's support for my suggestion, and his comment about backwards compatibility, means that @Taneb wouldn't be committed, except by (eventual? immediate?) weight of convention, to adopt the new syntax (or will UPDATED: For v2.0? Or for later? |
The problem is that @gallais suggestion would also interact badly with a parens matching algorithm. To be honest I'm not very convinced that the parens matching problem is really a huge issue. It must be configurable for which unicode symbols it counts as parantheses. There are so many of them that could definition be used for other purposes apart from parens. My vote would be to implement @jamesmckinna 's suggestion v2.0. The only change I'd suggest is that we have: _≡⟨_⟩_ for LHS to RHS appeal to an equation
_≡⟨_⟨_ for the sym direction... so that only the right most paren would indicate direction. This would have two minor advantages. Firstly, we'd only change the sym operator and not the main operator. Secondly, the main operator would still interact nicely with parens matching, so if people wanted to prioritise matching parens they could always just apply |
If vertical alignment is the problem, then you can always get that for example by inserting a "visible space":
I prefer this since I like to think of the angle brackets as "hint brackets" delimiting the justification for the relationship via
Since not all uses of calculational presentation will involve symmetric relations, I think that just keeping the whole relation in front of the hint brackets is more consistent. (Many informal users of calculational presentation, as well as CalcCheck, allow an arbitrary number of spaces between the relation and the hint opening bracket; this can also be used to achieve vertical alignment:
) |
Thanks for the interesting suggestion and context @WolframKahl!
Unfortunately, vertical alignment is just one of the issues. The other two issues included at the top of this issue are "difficulty to type" and "convey the notion of symmetry/direction". We're also looking ideally for something that doesn't involve us renaming the existing standard operator.
I agree, which is why I think we shouldn't change the forward direction combinator so that we don't have any effects on non-symmetric theories. |
To be honest the more I think about it, the more I'm on board with
I think we're going to be hard pressed to beat that! |
Regarding parenthesis matching (of which, in
and those pairs are unambiguous for the lexer, by contrast with forward reasoning in terms of |
Quoting @MatthewDaggitt
Here are a few proposals to get the discussion going:
_↑≡⟨_⟩_
and_↓≡⟨_⟩_
, stolen from the categories library (at least they used to be there when I used it way back). The arrow indicates the direction in which we are applying the equality._↑⟨_⟩_
and_↓⟨_⟩_
as shorter alternatives.The text was updated successfully, but these errors were encountered: