{"action":"created","comment":{"url":"https://api.github.com/repos/leanprover/mathlib/pulls/comments/221116444","pull_request_review_id":159689314,"id":221116444,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTExNjQ0NA==","diff_hunk":"@@ -696,3 +696,16 @@ calc f (a - b) = f (a + -b)   : rfl\n            ... = f a - f b    : by  simp[neg f]\n \n end is_add_group_hom\n+\n+namespace units\n+variables [monoid α] [monoid β] (f : α → β) [is_monoid_hom f]\n+\n+definition map : units α → units β :=\n+λ u, ⟨f u.val, f u.inv,\n+by rw [← is_monoid_hom.map_mul f, u.val_inv, is_monoid_hom.map_one f],\n+by rw [← is_monoid_hom.map_mul f, u.inv_val, is_monoid_hom.map_one f] ⟩","path":"algebra/group.lean","position":11,"original_position":11,"commit_id":"bb97073dfc00408c5c0e6ef971e0eeefbe006b50","original_commit_id":"bb97073dfc00408c5c0e6ef971e0eeefbe006b50","user":{"login":"cipher1024","id":71008,"node_id":"MDQ6VXNlcjcxMDA4","avatar_url":"https://avatars0.githubusercontent.com/u/71008?v=4","gravatar_id":"","url":"https://api.github.com/users/cipher1024","html_url":"https://github.com/cipher1024","followers_url":"https://api.github.com/users/cipher1024/followers","following_url":"https://api.github.com/users/cipher1024/following{/other_user}","gists_url":"https://api.github.com/users/cipher1024/gists{/gist_id}","starred_url":"https://api.github.com/users/cipher1024/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cipher1024/subscriptions","organizations_url":"https://api.github.com/users/cipher1024/orgs","repos_url":"https://api.github.com/users/cipher1024/repos","events_url":"https://api.github.com/users/cipher1024/events{/privacy}","received_events_url":"https://api.github.com/users/cipher1024/received_events","type":"User","site_admin":false},"body":"I would would align `by` with `f u.val`","created_at":"2018-09-28T00:44:08Z","updated_at":"2018-09-28T00:44:08Z","html_url":"https://github.com/leanprover/mathlib/pull/374#discussion_r221116444","pull_request_url":"https://api.github.com/repos/leanprover/mathlib/pulls/374","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/leanprover/mathlib/pulls/comments/221116444"},"html":{"href":"https://github.com/leanprover/mathlib/pull/374#discussion_r221116444"},"pull_request":{"href":"https://api.github.com/repos/leanprover/mathlib/pulls/374"}}},"pull_request":{"url":"https://api.github.com/repos/leanprover/mathlib/pulls/374","id":218547191,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4NTQ3MTkx","html_url":"https://github.com/leanprover/mathlib/pull/374","diff_url":"https://github.com/leanprover/mathlib/pull/374.diff","patch_url":"https://github.com/leanprover/mathlib/pull/374.patch","issue_url":"https://api.github.com/repos/leanprover/mathlib/issues/374","number":374,"state":"open","locked":false,"title":"feat(algebra/group): add units.map and prove that it is a group hom","user":{"login":"jcommelin","id":5636705,"node_id":"MDQ6VXNlcjU2MzY3MDU=","avatar_url":"https://avatars2.githubusercontent.com/u/5636705?v=4","gravatar_id":"","url":"https://api.github.com/users/jcommelin","html_url":"https://github.com/jcommelin","followers_url":"https://api.github.com/users/jcommelin/followers","following_url":"https://api.github.com/users/jcommelin/following{/other_user}","gists_url":"https://api.github.com/users/jcommelin/gists{/gist_id}","starred_url":"https://api.github.com/users/jcommelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcommelin/subscriptions","organizations_url":"https://api.github.com/users/jcommelin/orgs","repos_url":"https://api.github.com/users/jcommelin/repos","events_url":"https://api.github.com/users/jcommelin/events{/privacy}","received_events_url":"https://api.github.com/users/jcommelin/received_events","type":"User","site_admin":false},"body":"TO CONTRIBUTORS:\r\n\r\nMake sure you have:\r\n\r\n * [x] reviewed and applied the coding style: [coding](./docs/style.md), [naming](./docs/naming.md)\r\n * [x] make sure definitions and lemmas are put in the right files\r\n * [x] make sure definitions and lemmas are not redundant\r\n\r\nFor reviewers: [code review check list](./docs/code-review.md)\r\n","created_at":"2018-09-27T07:15:51Z","updated_at":"2018-09-28T00:44:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0591d5d487728d42ceb44e8d97b083d625887c0f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/leanprover/mathlib/pulls/374/commits","review_comments_url":"https://api.github.com/repos/leanprover/mathlib/pulls/374/comments","review_comment_url":"https://api.github.com/repos/leanprover/mathlib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/leanprover/mathlib/issues/374/comments","statuses_url":"https://api.github.com/repos/leanprover/mathlib/statuses/bb97073dfc00408c5c0e6ef971e0eeefbe006b50","head":{"label":"leanprover-community:monoid_stuff","ref":"monoid_stuff","sha":"bb97073dfc00408c5c0e6ef971e0eeefbe006b50","user":{"login":"leanprover-community","id":41703605,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNzAzNjA1","avatar_url":"https://avatars3.githubusercontent.com/u/41703605?v=4","gravatar_id":"","url":"https://api.github.com/users/leanprover-community","html_url":"https://github.com/leanprover-community","followers_url":"https://api.github.com/users/leanprover-community/followers","following_url":"https://api.github.com/users/leanprover-community/following{/other_user}","gists_url":"https://api.github.com/users/leanprover-community/gists{/gist_id}","starred_url":"https://api.github.com/users/leanprover-community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leanprover-community/subscriptions","organizations_url":"https://api.github.com/users/leanprover-community/orgs","repos_url":"https://api.github.com/users/leanprover-community/repos","events_url":"https://api.github.com/users/leanprover-community/events{/privacy}","received_events_url":"https://api.github.com/users/leanprover-community/received_events","type":"Organization","site_admin":false},"repo":{"id":143964213,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM5NjQyMTM=","name":"mathlib","full_name":"leanprover-community/mathlib","private":false,"owner":{"login":"leanprover-community","id":41703605,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNzAzNjA1","avatar_url":"https://avatars3.githubusercontent.com/u/41703605?v=4","gravatar_id":"","url":"https://api.github.com/users/leanprover-community","html_url":"https://github.com/leanprover-community","followers_url":"https://api.github.com/users/leanprover-community/followers","following_url":"https://api.github.com/users/leanprover-community/following{/other_user}","gists_url":"https://api.github.com/users/leanprover-community/gists{/gist_id}","starred_url":"https://api.github.com/users/leanprover-community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leanprover-community/subscriptions","organizations_url":"https://api.github.com/users/leanprover-community/orgs","repos_url":"https://api.github.com/users/leanprover-community/repos","events_url":"https://api.github.com/users/leanprover-community/events{/privacy}","received_events_url":"https://api.github.com/users/leanprover-community/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/leanprover-community/mathlib","description":"Lean mathematical components library","fork":true,"url":"https://api.github.com/repos/leanprover-community/mathlib","forks_url":"https://api.github.com/repos/leanprover-community/mathlib/forks","keys_url":"https://api.github.com/repos/leanprover-community/mathlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leanprover-community/mathlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leanprover-community/mathlib/teams","hooks_url":"https://api.github.com/repos/leanprover-community/mathlib/hooks","issue_events_url":"https://api.github.com/repos/leanprover-community/mathlib/issues/events{/number}","events_url":"https://api.github.com/repos/leanprover-community/mathlib/events","assignees_url":"https://api.github.com/repos/leanprover-community/mathlib/assignees{/user}","branches_url":"https://api.github.com/repos/leanprover-community/mathlib/branches{/branch}","tags_url":"https://api.github.com/repos/leanprover-community/mathlib/tags","blobs_url":"https://api.github.com/repos/leanprover-community/mathlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leanprover-community/mathlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leanprover-community/mathlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/leanprover-community/mathlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leanprover-community/mathlib/statuses/{sha}","languages_url":"https://api.github.com/repos/leanprover-community/mathlib/languages","stargazers_url":"https://api.github.com/repos/leanprover-community/mathlib/stargazers","contributors_url":"https://api.github.com/repos/leanprover-community/mathlib/contributors","subscribers_url":"https://api.github.com/repos/leanprover-community/mathlib/subscribers","subscription_url":"https://api.github.com/repos/leanprover-community/mathlib/subscription","commits_url":"https://api.github.com/repos/leanprover-community/mathlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/leanprover-community/mathlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/leanprover-community/mathlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/leanprover-community/mathlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/leanprover-community/mathlib/contents/{+path}","compare_url":"https://api.github.com/repos/leanprover-community/mathlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leanprover-community/mathlib/merges","archive_url":"https://api.github.com/repos/leanprover-community/mathlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leanprover-community/mathlib/downloads","issues_url":"https://api.github.com/repos/leanprover-community/mathlib/issues{/number}","pulls_url":"https://api.github.com/repos/leanprover-community/mathlib/pulls{/number}","milestones_url":"https://api.github.com/repos/leanprover-community/mathlib/milestones{/number}","notifications_url":"https://api.github.com/repos/leanprover-community/mathlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leanprover-community/mathlib/labels{/name}","releases_url":"https://api.github.com/repos/leanprover-community/mathlib/releases{/id}","deployments_url":"https://api.github.com/repos/leanprover-community/mathlib/deployments","created_at":"2018-08-08T05:15:22Z","updated_at":"2018-09-27T08:19:58Z","pushed_at":"2018-09-27T21:48:19Z","git_url":"git://github.com/leanprover-community/mathlib.git","ssh_url":"git@github.com:leanprover-community/mathlib.git","clone_url":"https://github.com/leanprover-community/mathlib.git","svn_url":"https://github.com/leanprover-community/mathlib","homepage":"","size":5095,"stargazers_count":4,"watchers_count":4,"language":"Lean","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":0,"watchers":4,"default_branch":"master"}},"base":{"label":"leanprover:master","ref":"master","sha":"6434658c6f59377afbee48dfa7158dbd4d91d46e","user":{"login":"leanprover","id":7233018,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyMzMwMTg=","avatar_url":"https://avatars3.githubusercontent.com/u/7233018?v=4","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":97922418,"node_id":"MDEwOlJlcG9zaXRvcnk5NzkyMjQxOA==","name":"mathlib","full_name":"leanprover/mathlib","private":false,"owner":{"login":"leanprover","id":7233018,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyMzMwMTg=","avatar_url":"https://avatars3.githubusercontent.com/u/7233018?v=4","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},"html_url":"https://github.com/leanprover/mathlib","description":"Lean mathematical components library","fork":false,"url":"https://api.github.com/repos/leanprover/mathlib","forks_url":"https://api.github.com/repos/leanprover/mathlib/forks","keys_url":"https://api.github.com/repos/leanprover/mathlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leanprover/mathlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leanprover/mathlib/teams","hooks_url":"https://api.github.com/repos/leanprover/mathlib/hooks","issue_events_url":"https://api.github.com/repos/leanprover/mathlib/issues/events{/number}","events_url":"https://api.github.com/repos/leanprover/mathlib/events","assignees_url":"https://api.github.com/repos/leanprover/mathlib/assignees{/user}","branches_url":"https://api.github.com/repos/leanprover/mathlib/branches{/branch}","tags_url":"https://api.github.com/repos/leanprover/mathlib/tags","blobs_url":"https://api.github.com/repos/leanprover/mathlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leanprover/mathlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leanprover/mathlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/leanprover/mathlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leanprover/mathlib/statuses/{sha}","languages_url":"https://api.github.com/repos/leanprover/mathlib/languages","stargazers_url":"https://api.github.com/repos/leanprover/mathlib/stargazers","contributors_url":"https://api.github.com/repos/leanprover/mathlib/contributors","subscribers_url":"https://api.github.com/repos/leanprover/mathlib/subscribers","subscription_url":"https://api.github.com/repos/leanprover/mathlib/subscription","commits_url":"https://api.github.com/repos/leanprover/mathlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/leanprover/mathlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/leanprover/mathlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/leanprover/mathlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/leanprover/mathlib/contents/{+path}","compare_url":"https://api.github.com/repos/leanprover/mathlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leanprover/mathlib/merges","archive_url":"https://api.github.com/repos/leanprover/mathlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leanprover/mathlib/downloads","issues_url":"https://api.github.com/repos/leanprover/mathlib/issues{/number}","pulls_url":"https://api.github.com/repos/leanprover/mathlib/pulls{/number}","milestones_url":"https://api.github.com/repos/leanprover/mathlib/milestones{/number}","notifications_url":"https://api.github.com/repos/leanprover/mathlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leanprover/mathlib/labels{/name}","releases_url":"https://api.github.com/repos/leanprover/mathlib/releases{/id}","deployments_url":"https://api.github.com/repos/leanprover/mathlib/deployments","created_at":"2017-07-21T08:02:10Z","updated_at":"2018-09-27T14:01:06Z","pushed_at":"2018-09-27T21:50:02Z","git_url":"git://github.com/leanprover/mathlib.git","ssh_url":"git@github.com:leanprover/mathlib.git","clone_url":"https://github.com/leanprover/mathlib.git","svn_url":"https://github.com/leanprover/mathlib","homepage":"","size":4498,"stargazers_count":68,"watchers_count":68,"language":"Lean","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"archived":false,"open_issues_count":38,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":36,"open_issues":38,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/leanprover/mathlib/pulls/374"},"html":{"href":"https://github.com/leanprover/mathlib/pull/374"},"issue":{"href":"https://api.github.com/repos/leanprover/mathlib/issues/374"},"comments":{"href":"https://api.github.com/repos/leanprover/mathlib/issues/374/comments"},"review_comments":{"href":"https://api.github.com/repos/leanprover/mathlib/pulls/374/comments"},"review_comment":{"href":"https://api.github.com/repos/leanprover/mathlib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/leanprover/mathlib/pulls/374/commits"},"statuses":{"href":"https://api.github.com/repos/leanprover/mathlib/statuses/bb97073dfc00408c5c0e6ef971e0eeefbe006b50"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cipher1024"}}