{"action":"created","issue":{"url":"https://api.github.com/repos/leanprover/lean/issues/770","labels_url":"https://api.github.com/repos/leanprover/lean/issues/770/labels{/name}","comments_url":"https://api.github.com/repos/leanprover/lean/issues/770/comments","events_url":"https://api.github.com/repos/leanprover/lean/issues/770/events","html_url":"https://github.com/leanprover/lean/issues/770","id":99192123,"number":770,"title":"strange error location","user":{"login":"fpvandoorn","id":7376012,"avatar_url":"https://avatars.githubusercontent.com/u/7376012?v=3","gravatar_id":"","url":"https://api.github.com/users/fpvandoorn","html_url":"https://github.com/fpvandoorn","followers_url":"https://api.github.com/users/fpvandoorn/followers","following_url":"https://api.github.com/users/fpvandoorn/following{/other_user}","gists_url":"https://api.github.com/users/fpvandoorn/gists{/gist_id}","starred_url":"https://api.github.com/users/fpvandoorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpvandoorn/subscriptions","organizations_url":"https://api.github.com/users/fpvandoorn/orgs","repos_url":"https://api.github.com/users/fpvandoorn/repos","events_url":"https://api.github.com/users/fpvandoorn/events{/privacy}","received_events_url":"https://api.github.com/users/fpvandoorn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-05T12:18:26Z","updated_at":"2015-08-06T22:16:36Z","closed_at":null,"body":"In the following example, the error in the definition `encode` is reported in the definition of `code`:\r\n\r\n```lean\r\n-- HoTT\r\nopen nat unit equiv eq\r\n  definition code : ℕ → ℕ → Type₀\r\n  | code 0 0 := unit\r\n  | code (succ n) 0 := empty\r\n  | code 0 (succ m) := empty\r\n  | code (succ n) (succ m) := code n m\r\n\r\n  definition refl : Πn, code n n\r\n  | refl 0 := star\r\n  | refl (succ n) := refl n\r\n\r\n  definition encode (n m : ℕ) : (n = m) ≃ code n m :=\r\n  equiv.MK (λp, p ▸ refl n)\r\n           (match n m with\r\n             | 0 0 := sorry\r\n            end)\r\n           _\r\n           _\r\n```\r\n\r\nAside: is there a way to match multiple variables in a single `match-with` expression?"},"comment":{"url":"https://api.github.com/repos/leanprover/lean/issues/comments/128524610","html_url":"https://github.com/leanprover/lean/issues/770#issuecomment-128524610","issue_url":"https://api.github.com/repos/leanprover/lean/issues/770","id":128524610,"user":{"login":"leodemoura","id":2778936,"avatar_url":"https://avatars.githubusercontent.com/u/2778936?v=3","gravatar_id":"","url":"https://api.github.com/users/leodemoura","html_url":"https://github.com/leodemoura","followers_url":"https://api.github.com/users/leodemoura/followers","following_url":"https://api.github.com/users/leodemoura/following{/other_user}","gists_url":"https://api.github.com/users/leodemoura/gists{/gist_id}","starred_url":"https://api.github.com/users/leodemoura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leodemoura/subscriptions","organizations_url":"https://api.github.com/users/leodemoura/orgs","repos_url":"https://api.github.com/users/leodemoura/repos","events_url":"https://api.github.com/users/leodemoura/events{/privacy}","received_events_url":"https://api.github.com/users/leodemoura/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T22:16:36Z","updated_at":"2015-08-06T22:16:36Z","body":"```lean\r\ndefinition eq_char2 :=\r\nshow ℕ → ℕ → Prop\r\n| 0 0               := true\r\n| (succ n) 0        := false\r\n| 0 (succ m)        := false\r\n| (succ n) (succ m) := H_show n m\r\n```\r\nWe should use `this` instead of `H_show` to make it consistent with `have`-expression."}}