{"action":"created","issue":{"url":"https://api.github.com/repos/leanprover/lean/issues/532","labels_url":"https://api.github.com/repos/leanprover/lean/issues/532/labels{/name}","comments_url":"https://api.github.com/repos/leanprover/lean/issues/532/comments","events_url":"https://api.github.com/repos/leanprover/lean/issues/532/events","html_url":"https://github.com/leanprover/lean/issues/532","id":66269162,"number":532,"title":"ability to make parameters implicit / explicit","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":[{"url":"https://api.github.com/repos/leanprover/lean/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"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},"milestone":null,"comments":1,"created_at":"2015-04-04T03:27:20Z","updated_at":"2015-04-20T15:26:20Z","closed_at":null,"body":"If you have a parameter `A` in a context, you typically want it to be implicit in some definitions and explicit in others. There should be a way to do this. Maybe using the following syntax?\r\n```lean\r\ncontext\r\n  parameters {A : Type₁} (B : Type₁)\r\n\r\n  definition foo1         (a : A) := a -- A implicit, B explicit\r\n  definition foo2 (A)     (a : A) := a -- A and B both explicit\r\n  definition foo3 {B}     (a : A) := a -- A and B both implicit\r\n  definition foo4 (A) {B} (a : A) := a -- A explicit, B implicit\r\nend\r\n```\r\nI know that currently the `(A)` and `{B}` are parsed as fresh variables, so maybe this is not the best notation, but I couldn't think of something better.\r\n\r\n(this should also be implemented for `variables`, but with `variables` there is an easy workaround (just give a fresh variable as argument))"},"comment":{"url":"https://api.github.com/repos/leanprover/lean/issues/comments/94483336","html_url":"https://github.com/leanprover/lean/issues/532#issuecomment-94483336","issue_url":"https://api.github.com/repos/leanprover/lean/issues/532","id":94483336,"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-04-20T15:26:20Z","updated_at":"2015-04-20T15:26:20Z","body":"This is a useful feature, but we have to come up with a clean and uniform semantics.\r\nAs you pointed out, it must work uniformly for parameters and variables.\r\nWhat about lambdas? Suppose we write `foo2` as\r\n```lean\r\ndefinition foo2 := fun (A) (a : A), a\r\n```\r\nWhat about variables introduced by `match-expressions`?\r\nAnother issue: suppose `A` is used in a nested lambda, and it contains references to other parameters that are not available in the context. We would have to sign an error.\r\n\r\nPotential problem: a uniform treatment may generate more confusion.\r\n"}}