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

Fix terminology in L02rw.lean #81

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DecimalTurn
Copy link

This pull request includes a small change to the Game/Levels/Tutorial/L02rw.lean file. The change clarifies the language by replacing "proof" with "assumption" in the context of rewriting with the rw tactic.

@DecimalTurn
Copy link
Author

After reading this another time, perhaps the best would just be to say "We do this in Lean by rewriting the proof, using the rw tactic.", since we are not rewriting h in this case, but the proof.

@@ -164,7 +164,7 @@ your list of assumptions. Lean thinks of `h` as being a secret proof of the
assumption, rather like `x` is a secret number.

Before we can use `rfl`, we have to \"substitute in for $y$\".
We do this in Lean by *rewriting* the assumption `h`,
We do this in Lean by *rewriting* the proof with `h`,
Copy link
Member

@kbuzzard kbuzzard Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We do this in Lean by *rewriting* the proof with `h`,
We do this in Lean by *rewriting* `h`,

How about that? Although I feel like I now want to change it back to "rewriting the assumption h".

The point is that the rw tactic eats a list of assumptions, and it rewrites them, so "rewriting the assumption h" sounds completely accurate to me.

@DecimalTurn
Copy link
Author

@kbuzzard @joneugster thanks for both of your reviews. I see that we haven't come to a consensus yet. However, due to the way GitHub creates a separate thread for each review, I suggest that we discuss the wording in this main thread to make the discussion easier to follow.

From my understanding (and correct me if this is inaccurate), in Lean we start by stating a goal as a statement and transform this goal into a new statement each time we use a tactic. This then becomes our new current goal. We stop when we reach the statement "true" which indicates that we've accomplished our goal. The whole process, including all the intermediary goals, constitutes the proof.

Hence, when we use the rewrite tactic with the assumption h (ie. rw[h]), we are rewriting the current goal by "substituting in" all instances of the left-hand side of the assumption with the right-hand side. Based on that interpretation, the phrasing could be:

- We do this in Lean by *rewriting* the proof `h`, [...]
+ We do this in Lean by *rewriting* the goal with `h`, [...]

This wording makes it clear to me that we are rewriting the goal and not the entire proof nor h (since h is an assumption that which remains unchanged).

Let me know if this works and I'll make the change. I see that there is also some files in the .i18n that I haven't edited. I can also fix that.

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.

3 participants