{"action":"closed","number":726,"pull_request":{"url":"https://api.github.com/repos/leanprover/lean/pulls/726","id":39738222,"html_url":"https://github.com/leanprover/lean/pull/726","diff_url":"https://github.com/leanprover/lean/pull/726.diff","patch_url":"https://github.com/leanprover/lean/pull/726.patch","issue_url":"https://api.github.com/repos/leanprover/lean/issues/726","number":726,"state":"closed","locked":false,"title":"choose, and varia","user":{"login":"avigad","id":2783534,"avatar_url":"https://avatars.githubusercontent.com/u/2783534?v=3","gravatar_id":"","url":"https://api.github.com/users/avigad","html_url":"https://github.com/avigad","followers_url":"https://api.github.com/users/avigad/followers","following_url":"https://api.github.com/users/avigad/following{/other_user}","gists_url":"https://api.github.com/users/avigad/gists{/gist_id}","starred_url":"https://api.github.com/users/avigad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avigad/subscriptions","organizations_url":"https://api.github.com/users/avigad/orgs","repos_url":"https://api.github.com/users/avigad/repos","events_url":"https://api.github.com/users/avigad/events{/privacy}","received_events_url":"https://api.github.com/users/avigad/received_events","type":"User","site_admin":false},"body":"\r\nThe file `choose.lean` gives a recursive description of `choose n k` and proves it is equivalent to the usual definition with factorials. (There is a lot more to do in that file.) The name currently conflicts with `nat.choose` in `/library/data/nat/choose.lean`, so we cannot load both at once.\r\n\r\nQuestions:\r\n- Should we change the other `choose` to `find`?\r\n- Should we introduce infix notation for `choose`?\r\n\r\n@htzh: this pull request includes the two theorems you asked for, with two small changes:\r\n- I reoriented the equation in `image_compose` (nso it agrees with the corresponding theorem for sets)\r\n- The theorem `Union_const` was false as you stated it (this is why we have formal proof!). I added the hypothesis `s ≠ ∅`.\r\nBy the way, I also changed the theorem `non_empty_of_card_succ` to `ne_empty_of_card_eq_succ`. I think you use that theorem?\r\n\r\nI changed the notation `{[a, b, c]}` to `'{a, b, c}`, to avoid notational conflicts. Anyhow I like the new notation better.\r\n\r\nBy the way, `choose.lean` contains some more examples of proofs with induction and cases. It would be interesting to know if they can be made more readable with better support for induction and cases in proof term mode.","created_at":"2015-07-11T02:20:21Z","updated_at":"2015-07-11T23:35:42Z","closed_at":"2015-07-11T23:35:42Z","merged_at":null,"merge_commit_sha":"7421d33f02b3e0a0d9fefcf52eef3c237d3f61e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/leanprover/lean/pulls/726/commits","review_comments_url":"https://api.github.com/repos/leanprover/lean/pulls/726/comments","review_comment_url":"https://api.github.com/repos/leanprover/lean/pulls/comments{/number}","comments_url":"https://api.github.com/repos/leanprover/lean/issues/726/comments","statuses_url":"https://api.github.com/repos/leanprover/lean/statuses/eb759efe6279192f51db7d59648452888ca9309c","head":{"label":"avigad:master","ref":"master","sha":"eb759efe6279192f51db7d59648452888ca9309c","user":{"login":"avigad","id":2783534,"avatar_url":"https://avatars.githubusercontent.com/u/2783534?v=3","gravatar_id":"","url":"https://api.github.com/users/avigad","html_url":"https://github.com/avigad","followers_url":"https://api.github.com/users/avigad/followers","following_url":"https://api.github.com/users/avigad/following{/other_user}","gists_url":"https://api.github.com/users/avigad/gists{/gist_id}","starred_url":"https://api.github.com/users/avigad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avigad/subscriptions","organizations_url":"https://api.github.com/users/avigad/orgs","repos_url":"https://api.github.com/users/avigad/repos","events_url":"https://api.github.com/users/avigad/events{/privacy}","received_events_url":"https://api.github.com/users/avigad/received_events","type":"User","site_admin":false},"repo":{"id":22361408,"name":"lean","full_name":"avigad/lean","owner":{"login":"avigad","id":2783534,"avatar_url":"https://avatars.githubusercontent.com/u/2783534?v=3","gravatar_id":"","url":"https://api.github.com/users/avigad","html_url":"https://github.com/avigad","followers_url":"https://api.github.com/users/avigad/followers","following_url":"https://api.github.com/users/avigad/following{/other_user}","gists_url":"https://api.github.com/users/avigad/gists{/gist_id}","starred_url":"https://api.github.com/users/avigad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avigad/subscriptions","organizations_url":"https://api.github.com/users/avigad/orgs","repos_url":"https://api.github.com/users/avigad/repos","events_url":"https://api.github.com/users/avigad/events{/privacy}","received_events_url":"https://api.github.com/users/avigad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/avigad/lean","description":"Lean Theorem Prover","fork":true,"url":"https://api.github.com/repos/avigad/lean","forks_url":"https://api.github.com/repos/avigad/lean/forks","keys_url":"https://api.github.com/repos/avigad/lean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avigad/lean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avigad/lean/teams","hooks_url":"https://api.github.com/repos/avigad/lean/hooks","issue_events_url":"https://api.github.com/repos/avigad/lean/issues/events{/number}","events_url":"https://api.github.com/repos/avigad/lean/events","assignees_url":"https://api.github.com/repos/avigad/lean/assignees{/user}","branches_url":"https://api.github.com/repos/avigad/lean/branches{/branch}","tags_url":"https://api.github.com/repos/avigad/lean/tags","blobs_url":"https://api.github.com/repos/avigad/lean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avigad/lean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avigad/lean/git/refs{/sha}","trees_url":"https://api.github.com/repos/avigad/lean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avigad/lean/statuses/{sha}","languages_url":"https://api.github.com/repos/avigad/lean/languages","stargazers_url":"https://api.github.com/repos/avigad/lean/stargazers","contributors_url":"https://api.github.com/repos/avigad/lean/contributors","subscribers_url":"https://api.github.com/repos/avigad/lean/subscribers","subscription_url":"https://api.github.com/repos/avigad/lean/subscription","commits_url":"https://api.github.com/repos/avigad/lean/commits{/sha}","git_commits_url":"https://api.github.com/repos/avigad/lean/git/commits{/sha}","comments_url":"https://api.github.com/repos/avigad/lean/comments{/number}","issue_comment_url":"https://api.github.com/repos/avigad/lean/issues/comments{/number}","contents_url":"https://api.github.com/repos/avigad/lean/contents/{+path}","compare_url":"https://api.github.com/repos/avigad/lean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avigad/lean/merges","archive_url":"https://api.github.com/repos/avigad/lean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avigad/lean/downloads","issues_url":"https://api.github.com/repos/avigad/lean/issues{/number}","pulls_url":"https://api.github.com/repos/avigad/lean/pulls{/number}","milestones_url":"https://api.github.com/repos/avigad/lean/milestones{/number}","notifications_url":"https://api.github.com/repos/avigad/lean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avigad/lean/labels{/name}","releases_url":"https://api.github.com/repos/avigad/lean/releases{/id}","created_at":"2014-07-28T23:29:27Z","updated_at":"2015-05-08T10:35:50Z","pushed_at":"2015-07-11T04:43:50Z","git_url":"git://github.com/avigad/lean.git","ssh_url":"git@github.com:avigad/lean.git","clone_url":"https://github.com/avigad/lean.git","svn_url":"https://github.com/avigad/lean","homepage":null,"size":21209,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"leanprover:master","ref":"master","sha":"554a42b40735d1b2bc76a8612aaae02054536b69","user":{"login":"leanprover","id":7233018,"avatar_url":"https://avatars.githubusercontent.com/u/7233018?v=3","gravatar_id":"","url":"https://api.github.com/users/leanprover","html_url":"https://github.com/leanprover","followers_url":"https://api.github.com/users/leanprover/followers","following_url":"https://api.github.com/users/leanprover/following{/other_user}","gists_url":"https://api.github.com/users/leanprover/gists{/gist_id}","starred_url":"https://api.github.com/users/leanprover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leanprover/subscriptions","organizations_url":"https://api.github.com/users/leanprover/orgs","repos_url":"https://api.github.com/users/leanprover/repos","events_url":"https://api.github.com/users/leanprover/events{/privacy}","received_events_url":"https://api.github.com/users/leanprover/received_events","type":"Organization","site_admin":false},"repo":{"id":11463670,"name":"lean","full_name":"leanprover/lean","owner":{"login":"leanprover","id":7233018,"avatar_url":"https://avatars.githubusercontent.com/u/7233018?v=3","gravatar_id":"","url":"https://api.github.com/users/leanprover","html_url":"https://github.com/leanprover","followers_url":"https://api.github.com/users/leanprover/followers","following_url":"https://api.github.com/users/leanprover/following{/other_user}","gists_url":"https://api.github.com/users/leanprover/gists{/gist_id}","starred_url":"https://api.github.com/users/leanprover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leanprover/subscriptions","organizations_url":"https://api.github.com/users/leanprover/orgs","repos_url":"https://api.github.com/users/leanprover/repos","events_url":"https://api.github.com/users/leanprover/events{/privacy}","received_events_url":"https://api.github.com/users/leanprover/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/leanprover/lean","description":"Lean Theorem Prover","fork":false,"url":"https://api.github.com/repos/leanprover/lean","forks_url":"https://api.github.com/repos/leanprover/lean/forks","keys_url":"https://api.github.com/repos/leanprover/lean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leanprover/lean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leanprover/lean/teams","hooks_url":"https://api.github.com/repos/leanprover/lean/hooks","issue_events_url":"https://api.github.com/repos/leanprover/lean/issues/events{/number}","events_url":"https://api.github.com/repos/leanprover/lean/events","assignees_url":"https://api.github.com/repos/leanprover/lean/assignees{/user}","branches_url":"https://api.github.com/repos/leanprover/lean/branches{/branch}","tags_url":"https://api.github.com/repos/leanprover/lean/tags","blobs_url":"https://api.github.com/repos/leanprover/lean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leanprover/lean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leanprover/lean/git/refs{/sha}","trees_url":"https://api.github.com/repos/leanprover/lean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leanprover/lean/statuses/{sha}","languages_url":"https://api.github.com/repos/leanprover/lean/languages","stargazers_url":"https://api.github.com/repos/leanprover/lean/stargazers","contributors_url":"https://api.github.com/repos/leanprover/lean/contributors","subscribers_url":"https://api.github.com/repos/leanprover/lean/subscribers","subscription_url":"https://api.github.com/repos/leanprover/lean/subscription","commits_url":"https://api.github.com/repos/leanprover/lean/commits{/sha}","git_commits_url":"https://api.github.com/repos/leanprover/lean/git/commits{/sha}","comments_url":"https://api.github.com/repos/leanprover/lean/comments{/number}","issue_comment_url":"https://api.github.com/repos/leanprover/lean/issues/comments{/number}","contents_url":"https://api.github.com/repos/leanprover/lean/contents/{+path}","compare_url":"https://api.github.com/repos/leanprover/lean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leanprover/lean/merges","archive_url":"https://api.github.com/repos/leanprover/lean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leanprover/lean/downloads","issues_url":"https://api.github.com/repos/leanprover/lean/issues{/number}","pulls_url":"https://api.github.com/repos/leanprover/lean/pulls{/number}","milestones_url":"https://api.github.com/repos/leanprover/lean/milestones{/number}","notifications_url":"https://api.github.com/repos/leanprover/lean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leanprover/lean/labels{/name}","releases_url":"https://api.github.com/repos/leanprover/lean/releases{/id}","created_at":"2013-07-17T00:42:34Z","updated_at":"2015-07-08T03:34:44Z","pushed_at":"2015-07-11T23:35:27Z","git_url":"git://github.com/leanprover/lean.git","ssh_url":"git@github.com:leanprover/lean.git","clone_url":"https://github.com/leanprover/lean.git","svn_url":"https://github.com/leanprover/lean","homepage":"http://leanprover.github.io/","size":30392,"stargazers_count":213,"watchers_count":213,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":35,"forks":32,"open_issues":35,"watchers":213,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/leanprover/lean/pulls/726"},"html":{"href":"https://github.com/leanprover/lean/pull/726"},"issue":{"href":"https://api.github.com/repos/leanprover/lean/issues/726"},"comments":{"href":"https://api.github.com/repos/leanprover/lean/issues/726/comments"},"review_comments":{"href":"https://api.github.com/repos/leanprover/lean/pulls/726/comments"},"review_comment":{"href":"https://api.github.com/repos/leanprover/lean/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/leanprover/lean/pulls/726/commits"},"statuses":{"href":"https://api.github.com/repos/leanprover/lean/statuses/eb759efe6279192f51db7d59648452888ca9309c"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":3,"review_comments":0,"commits":5,"additions":159,"deletions":19,"changed_files":9}}