-
Notifications
You must be signed in to change notification settings - Fork 25
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
further corrections(?) #137
base: master
Are you sure you want to change the base?
Conversation
Thanks, I'll carefully review this pr later today |
case, the result of the function is zero. Another possible view on | ||
\C{subn} it to see it as a subtraction operation on natural numbers, | ||
made total by providing a default value in the ``exceptional'' cases. | ||
case, the result of the function is zero. We can view |
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 don't approve this change
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 change goes on for a few more lines -- I reworded rather than removed this sentence. I was trying to remove the word "exceptional" since I found it somewhat counterintuitive to think of 1/2 of all possible inputs as "exceptional". But I don't have a strong preference either way.
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 way to state this behavior precisely is saying that the subtraction is truncated at 0. See monus.
tex/chProgramming.tex
Outdated
@@ -1375,7 +1386,7 @@ \subsection{The (polymorphic) sequence data type} | |||
|
|||
|
|||
The name \C{seq} refers to (finite) ``sequences'', also called | |||
``lists''. This definition actually describes the type | |||
``lists''. This definition describes the type |
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 don't approve this change.
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 does the word "actually" mean for you? To me it means that we are making things more correct or more precise, so I don't understand its meaning in this sentence (there is nothing wrong about "sequences" or "lists").
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.
Sorry, one of my comment was misplaced. I hope it is correct now.
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" refers to the fact "seq" is only a synonym for "list".
The situation is not very satisfactory, because if we type "Print list." in Coq, we get the following text:
Inductive list (A : Type) : Type := nil : seq A | cons : A -> seq A -> seq A
So "list" is used in the first part, and "seq" is used after the ":=" characters. This is messy at best.
@darijgr I had a little chat with @ybertot and we believe that the best way forward for this PR is that you split into two parts: one containing the minor fixes, typos, etc which can be merged fast, and another one with the last big chunk which requires more thinking, especially on our side (the book was written a long ago, we need to put your change into context to review it). Thanks again for your contribution. |
…derstanding. * Again, \C{compute} -> \C{Compute} since the two are not the same (right?) and it is the latter that is being used.
@gares Done what you said. Now this branch has the relatively straightforward edits, whereas the implicit argument rewrite is at https://github.com/darijgr/mcb/tree/sugg2b . |
tex/chProgramming.tex
Outdated
case, the result of the function is zero. We can view | ||
\C{subn} as a subtraction operation on natural numbers, artificially | ||
made total by providing a default value in the cases where it would | ||
normally produce a negative number. |
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.
This is misleading, IMO, because "subtraction operation on natural numbers" cannot "produce a negative number".
I think that both "made total" and "truncated" are good ways to express what it does.
As a CS person, I clearly see total as more natural, but if a reference to truncated subtraction can help the Math inclined reader I suggest we have both.
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 do you think of the new version?
More little examples and parentheticals to help the reader check understanding.
Again, \C{compute} -> \C{Compute} since the two are not the same (right?) and it is the latter that is being used.
I think the syntactic sugar in the definition of same_bool is expanded more like I suggest than like the previous text suggests (even though the resulting functions, of course, are
equivalent). Is that so?
Experimental rewrite of the paragraphs on implicit argument. Currently, "About cons" does NOT say anything about "implicit" or "maximally inserted" arguments (at least not on my
installation). Thus I removed the mention of "About" here (it should be introduced somewhere, maybe in a separate subsection about Evaluate, Search, About and friends). On the
other hand, I have added the (A := U) notation for manually providing implicit arguments.