Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

further corrections(?) #137

wants to merge 3 commits into from

Conversation

darijgr
Copy link
Contributor

@darijgr darijgr commented Jul 15, 2021

  • 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.

tex/chProgramming.tex Outdated Show resolved Hide resolved
@gares
Copy link
Member

gares commented Jul 16, 2021

Thanks, I'll carefully review this pr later today

tex/chProgramming.tex Outdated Show resolved Hide resolved
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
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Contributor

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 Show resolved Hide resolved
@@ -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
Copy link
Member

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.

Copy link
Contributor Author

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").

Copy link
Member

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.

Copy link
Member

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.

tex/chProgramming.tex Outdated Show resolved Hide resolved
@gares
Copy link
Member

gares commented Jul 19, 2021

@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.
@darijgr
Copy link
Contributor Author

darijgr commented Jul 19, 2021

@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 .

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.
Copy link
Member

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.

Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants