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

Broken div example proof chapter 8 #139

Open
ketilwright opened this issue Nov 24, 2024 · 0 comments
Open

Broken div example proof chapter 8 #139

ketilwright opened this issue Nov 24, 2024 · 0 comments

Comments

@ketilwright
Copy link

This example generates errors

example (x y : Nat) : div x y = if 0 < y ∧ y ≤ x then div (x - y) y + 1 else 0 := by
  conv => lhs; unfold div -- unfold occurrence in the left-hand-side of the equation

In spite of the text saying "the defining example for div does not hold definitionally. . ", I was able to rw [div]; rfl

example (x y : Nat) : div x y = if 0 < y ∧ y ≤ x then div (x - y) y + 1 else 0 := by
  rw [div]; rfl
  

lean --version
Lean (version 4.12.0, x86_64-apple-darwin22.6.0, commit dc2533473114, Release)

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

No branches or pull requests

1 participant