{"action":"created","comment":{"url":"https://api.github.com/repos/rlepigre/lambdapi/pulls/comments/206481519","pull_request_review_id":141900090,"id":206481519,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjQ4MTUxOQ==","diff_hunk":"@@ -73,41 +73,92 @@ eq : !a, T a -> T a -> Prop.\n \n refl : !a, !x, P (eq a x x).\n \n-eqind : !a, !x, !y, P (eq a x y) -> !p : T a -> Prop, P (p x) -> P (p y).\n+eqind : !a, !x, !y, P (eq a x y) -> !p : T a -> Prop, P (p y) -> P (p x).\n (; FIXME: try to infer the type of p. ;)\n \n-(; s is compatible with Leibniz equality ;)\n+(; Symmetry of the equality ;)\n+#PROOF eq_sym : !a, !x, !y, P (eq a x y) -> P (eq a y x).\n+#REFINE a => x => y => H => _.\n+(; First option, doing the proof via rewrite ;)\n+#REWRITE H.\n+#REFINE (refl a y).\n+#QED.\n+(; Second option, by hand, and full ;)\n+(;\n+#REFINE eqind a x y H (z => eq a y z) (refl a y).\n+#QED.\n+;)\n+(; Third option, by hand, with a wildcard ;)\n+(;\n+#REFINE eqind a x y H (z => eq a y z) _.\n+#SIMPL.\n+#REFINE refl a y.\n+#QED.\n+;)\n+\n \n+(; s is compatible with Leibniz equality ;)\n #PROOF s_eq : !x, !y, P (eq nat x y) -> P (eq nat (s x) (s y)).\n #REFINE x => y => xy => _.\n-#REFINE eqind nat x y xy (z => eq nat (s x) (s z)) (refl nat (s x)).\n+#REFINE eqind nat x y xy (z => eq nat (s z) (s y)) (refl nat (s y)).\n #QED.\n \n-(; 0 is right neutral for add. ;)\n \n+(; 0 is right neutral for add. ;)\n #PROOF add0r : !n, P (eq nat (add n 0) n).\n (;FIXME: try to infer nat. ;)\n-\n #INFER nat_ind.\n #REFINE (nat_ind (n => eq nat (add n 0) n) ?case0 ?caseS).\n (;FIXME: try to infer predicate. ;) #PRINT.\n-\n #FOCUS 1. #PRINT.\n #FOCUS 1. #PRINT.\n-\n (; Case 0 ;)\n #SIMPL. #PRINT.\n #REFINE (refl nat 0). #PRINT.\n-\n (; Case S ;)\n #REFINE n => hn => _. #PRINT.\n #SIMPL. #PRINT.\n #REFINE s_eq (add n 0) n hn.\n+#QED.\n \n+\n+(; forall n m, n + S m = S (n+m) ;)\n+#PROOF add_succ_r : !n, !m, P (eq nat (add n (s m)) (s (add n m))).\n+#REFINE n => m => _.\n+#REFINE (nat_ind (n:N => eq nat (add n (s m)) (s (add n m))) ?case0[n,m] ?caseS[n,m] n).\n+(; Case 0 ;)\n+#SIMPL.\n+#REFINE refl nat (s m). (; TO DO : ADD a #REFL tactic ;)\n+(; Case S ;)\n+#SIMPL.\n+#REFINE pn => ih => _.\n+#REWRITE ih.\n+#SIMPL.\n+#REFINE refl nat (s (s (add pn m))).\n #QED.\n \n \n+(; Commutativity of the addition ;)\n #PROOF addcomm : !n, !m, P (eq nat (add n m) (add m n)).\n #REFINE n => m => _.\n-#REFINE (nat_ind (n:N => eq nat (add n m) (add m n)) ?case0[m,n] ?caseS[m,n] n).\n+#REFINE (nat_ind (n:N => eq nat (add n m) (add m n)) ?case0[n,m] ?caseS[n,m] n).\n+(; Case 0 ;)\n+#SIMPL.\n+#REFINE eq_sym nat (add m 0) m (add0r m). (; TO DO : Add a #SYM tactic ;)\n+(; Case S ;)\n #SIMPL.\n+#REFINE n => ih => _.\n+#REWRITE ih.\n+#REWRITE add_succ_r m n0.\n+#REFINE refl nat (s (add m n0)).\n+#QED.\n+\n+\n+(; At the moment, we can unfortunately prove anything in the proof mode","path":"examples/proof.dk","position":null,"original_position":94,"commit_id":"121d6b5b79d11e4eb8f477266bda2939fa61a0d3","original_commit_id":"a01a045175988f149b7774bf06ad3cdda5f574ec","user":{"login":"rlepigre","id":1555539,"node_id":"MDQ6VXNlcjE1NTU1Mzk=","avatar_url":"https://avatars0.githubusercontent.com/u/1555539?v=4","gravatar_id":"","url":"https://api.github.com/users/rlepigre","html_url":"https://github.com/rlepigre","followers_url":"https://api.github.com/users/rlepigre/followers","following_url":"https://api.github.com/users/rlepigre/following{/other_user}","gists_url":"https://api.github.com/users/rlepigre/gists{/gist_id}","starred_url":"https://api.github.com/users/rlepigre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlepigre/subscriptions","organizations_url":"https://api.github.com/users/rlepigre/orgs","repos_url":"https://api.github.com/users/rlepigre/repos","events_url":"https://api.github.com/users/rlepigre/events{/privacy}","received_events_url":"https://api.github.com/users/rlepigre/received_events","type":"User","site_admin":false},"body":"If you are talking about the `Parser` module in `src/lambdapi.odocl` then you are right. I removed the line in master, so you can merge again.","created_at":"2018-07-31T10:55:11Z","updated_at":"2018-07-31T10:55:12Z","html_url":"https://github.com/rlepigre/lambdapi/pull/58#discussion_r206481519","pull_request_url":"https://api.github.com/repos/rlepigre/lambdapi/pulls/58","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/rlepigre/lambdapi/pulls/comments/206481519"},"html":{"href":"https://github.com/rlepigre/lambdapi/pull/58#discussion_r206481519"},"pull_request":{"href":"https://api.github.com/repos/rlepigre/lambdapi/pulls/58"}},"in_reply_to_id":206315471},"pull_request":{"url":"https://api.github.com/repos/rlepigre/lambdapi/pulls/58","id":204504304,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NTA0MzA0","html_url":"https://github.com/rlepigre/lambdapi/pull/58","diff_url":"https://github.com/rlepigre/lambdapi/pull/58.diff","patch_url":"https://github.com/rlepigre/lambdapi/pull/58.patch","issue_url":"https://api.github.com/repos/rlepigre/lambdapi/issues/58","number":58,"state":"open","locked":false,"title":"Rewrite Tactic","user":{"login":"arisPapadop","id":25638971,"node_id":"MDQ6VXNlcjI1NjM4OTcx","avatar_url":"https://avatars1.githubusercontent.com/u/25638971?v=4","gravatar_id":"","url":"https://api.github.com/users/arisPapadop","html_url":"https://github.com/arisPapadop","followers_url":"https://api.github.com/users/arisPapadop/followers","following_url":"https://api.github.com/users/arisPapadop/following{/other_user}","gists_url":"https://api.github.com/users/arisPapadop/gists{/gist_id}","starred_url":"https://api.github.com/users/arisPapadop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arisPapadop/subscriptions","organizations_url":"https://api.github.com/users/arisPapadop/orgs","repos_url":"https://api.github.com/users/arisPapadop/repos","events_url":"https://api.github.com/users/arisPapadop/events{/privacy}","received_events_url":"https://api.github.com/users/arisPapadop/received_events","type":"User","site_admin":false},"body":"Initial implementation of rewrite tactic in src/rewrite.ml. Some additions in examples/proof.dk and small changes to accommodate for the new tactic. ","created_at":"2018-07-27T18:17:24Z","updated_at":"2018-07-31T10:55:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b558a0562caf0b73fd70dfb27c72aef4586c9bd0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rlepigre/lambdapi/pulls/58/commits","review_comments_url":"https://api.github.com/repos/rlepigre/lambdapi/pulls/58/comments","review_comment_url":"https://api.github.com/repos/rlepigre/lambdapi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rlepigre/lambdapi/issues/58/comments","statuses_url":"https://api.github.com/repos/rlepigre/lambdapi/statuses/121d6b5b79d11e4eb8f477266bda2939fa61a0d3","head":{"label":"arisPapadop:master","ref":"master","sha":"121d6b5b79d11e4eb8f477266bda2939fa61a0d3","user":{"login":"arisPapadop","id":25638971,"node_id":"MDQ6VXNlcjI1NjM4OTcx","avatar_url":"https://avatars1.githubusercontent.com/u/25638971?v=4","gravatar_id":"","url":"https://api.github.com/users/arisPapadop","html_url":"https://github.com/arisPapadop","followers_url":"https://api.github.com/users/arisPapadop/followers","following_url":"https://api.github.com/users/arisPapadop/following{/other_user}","gists_url":"https://api.github.com/users/arisPapadop/gists{/gist_id}","starred_url":"https://api.github.com/users/arisPapadop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arisPapadop/subscriptions","organizations_url":"https://api.github.com/users/arisPapadop/orgs","repos_url":"https://api.github.com/users/arisPapadop/repos","events_url":"https://api.github.com/users/arisPapadop/events{/privacy}","received_events_url":"https://api.github.com/users/arisPapadop/received_events","type":"User","site_admin":false},"repo":{"id":139419946,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk0MTk5NDY=","name":"lambdapi","full_name":"arisPapadop/lambdapi","owner":{"login":"arisPapadop","id":25638971,"node_id":"MDQ6VXNlcjI1NjM4OTcx","avatar_url":"https://avatars1.githubusercontent.com/u/25638971?v=4","gravatar_id":"","url":"https://api.github.com/users/arisPapadop","html_url":"https://github.com/arisPapadop","followers_url":"https://api.github.com/users/arisPapadop/followers","following_url":"https://api.github.com/users/arisPapadop/following{/other_user}","gists_url":"https://api.github.com/users/arisPapadop/gists{/gist_id}","starred_url":"https://api.github.com/users/arisPapadop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arisPapadop/subscriptions","organizations_url":"https://api.github.com/users/arisPapadop/orgs","repos_url":"https://api.github.com/users/arisPapadop/repos","events_url":"https://api.github.com/users/arisPapadop/events{/privacy}","received_events_url":"https://api.github.com/users/arisPapadop/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arisPapadop/lambdapi","description":"Minimal implementation of the λΠ-calculus modulo","fork":true,"url":"https://api.github.com/repos/arisPapadop/lambdapi","forks_url":"https://api.github.com/repos/arisPapadop/lambdapi/forks","keys_url":"https://api.github.com/repos/arisPapadop/lambdapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arisPapadop/lambdapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arisPapadop/lambdapi/teams","hooks_url":"https://api.github.com/repos/arisPapadop/lambdapi/hooks","issue_events_url":"https://api.github.com/repos/arisPapadop/lambdapi/issues/events{/number}","events_url":"https://api.github.com/repos/arisPapadop/lambdapi/events","assignees_url":"https://api.github.com/repos/arisPapadop/lambdapi/assignees{/user}","branches_url":"https://api.github.com/repos/arisPapadop/lambdapi/branches{/branch}","tags_url":"https://api.github.com/repos/arisPapadop/lambdapi/tags","blobs_url":"https://api.github.com/repos/arisPapadop/lambdapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arisPapadop/lambdapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arisPapadop/lambdapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/arisPapadop/lambdapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arisPapadop/lambdapi/statuses/{sha}","languages_url":"https://api.github.com/repos/arisPapadop/lambdapi/languages","stargazers_url":"https://api.github.com/repos/arisPapadop/lambdapi/stargazers","contributors_url":"https://api.github.com/repos/arisPapadop/lambdapi/contributors","subscribers_url":"https://api.github.com/repos/arisPapadop/lambdapi/subscribers","subscription_url":"https://api.github.com/repos/arisPapadop/lambdapi/subscription","commits_url":"https://api.github.com/repos/arisPapadop/lambdapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/arisPapadop/lambdapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/arisPapadop/lambdapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/arisPapadop/lambdapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/arisPapadop/lambdapi/contents/{+path}","compare_url":"https://api.github.com/repos/arisPapadop/lambdapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arisPapadop/lambdapi/merges","archive_url":"https://api.github.com/repos/arisPapadop/lambdapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arisPapadop/lambdapi/downloads","issues_url":"https://api.github.com/repos/arisPapadop/lambdapi/issues{/number}","pulls_url":"https://api.github.com/repos/arisPapadop/lambdapi/pulls{/number}","milestones_url":"https://api.github.com/repos/arisPapadop/lambdapi/milestones{/number}","notifications_url":"https://api.github.com/repos/arisPapadop/lambdapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arisPapadop/lambdapi/labels{/name}","releases_url":"https://api.github.com/repos/arisPapadop/lambdapi/releases{/id}","deployments_url":"https://api.github.com/repos/arisPapadop/lambdapi/deployments","created_at":"2018-07-02T09:18:19Z","updated_at":"2018-07-31T01:28:28Z","pushed_at":"2018-07-31T01:28:27Z","git_url":"git://github.com/arisPapadop/lambdapi.git","ssh_url":"git@github.com:arisPapadop/lambdapi.git","clone_url":"https://github.com/arisPapadop/lambdapi.git","svn_url":"https://github.com/arisPapadop/lambdapi","homepage":"","size":34955,"stargazers_count":0,"watchers_count":0,"language":"OCaml","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rlepigre:master","ref":"master","sha":"58583d8d7fa9b4c47c8c6be9f4fa1fd11c18b37e","user":{"login":"rlepigre","id":1555539,"node_id":"MDQ6VXNlcjE1NTU1Mzk=","avatar_url":"https://avatars0.githubusercontent.com/u/1555539?v=4","gravatar_id":"","url":"https://api.github.com/users/rlepigre","html_url":"https://github.com/rlepigre","followers_url":"https://api.github.com/users/rlepigre/followers","following_url":"https://api.github.com/users/rlepigre/following{/other_user}","gists_url":"https://api.github.com/users/rlepigre/gists{/gist_id}","starred_url":"https://api.github.com/users/rlepigre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlepigre/subscriptions","organizations_url":"https://api.github.com/users/rlepigre/orgs","repos_url":"https://api.github.com/users/rlepigre/repos","events_url":"https://api.github.com/users/rlepigre/events{/privacy}","received_events_url":"https://api.github.com/users/rlepigre/received_events","type":"User","site_admin":false},"repo":{"id":103059740,"node_id":"MDEwOlJlcG9zaXRvcnkxMDMwNTk3NDA=","name":"lambdapi","full_name":"rlepigre/lambdapi","owner":{"login":"rlepigre","id":1555539,"node_id":"MDQ6VXNlcjE1NTU1Mzk=","avatar_url":"https://avatars0.githubusercontent.com/u/1555539?v=4","gravatar_id":"","url":"https://api.github.com/users/rlepigre","html_url":"https://github.com/rlepigre","followers_url":"https://api.github.com/users/rlepigre/followers","following_url":"https://api.github.com/users/rlepigre/following{/other_user}","gists_url":"https://api.github.com/users/rlepigre/gists{/gist_id}","starred_url":"https://api.github.com/users/rlepigre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlepigre/subscriptions","organizations_url":"https://api.github.com/users/rlepigre/orgs","repos_url":"https://api.github.com/users/rlepigre/repos","events_url":"https://api.github.com/users/rlepigre/events{/privacy}","received_events_url":"https://api.github.com/users/rlepigre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rlepigre/lambdapi","description":"Minimal implementation of the λΠ-calculus modulo","fork":false,"url":"https://api.github.com/repos/rlepigre/lambdapi","forks_url":"https://api.github.com/repos/rlepigre/lambdapi/forks","keys_url":"https://api.github.com/repos/rlepigre/lambdapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rlepigre/lambdapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rlepigre/lambdapi/teams","hooks_url":"https://api.github.com/repos/rlepigre/lambdapi/hooks","issue_events_url":"https://api.github.com/repos/rlepigre/lambdapi/issues/events{/number}","events_url":"https://api.github.com/repos/rlepigre/lambdapi/events","assignees_url":"https://api.github.com/repos/rlepigre/lambdapi/assignees{/user}","branches_url":"https://api.github.com/repos/rlepigre/lambdapi/branches{/branch}","tags_url":"https://api.github.com/repos/rlepigre/lambdapi/tags","blobs_url":"https://api.github.com/repos/rlepigre/lambdapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rlepigre/lambdapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rlepigre/lambdapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/rlepigre/lambdapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rlepigre/lambdapi/statuses/{sha}","languages_url":"https://api.github.com/repos/rlepigre/lambdapi/languages","stargazers_url":"https://api.github.com/repos/rlepigre/lambdapi/stargazers","contributors_url":"https://api.github.com/repos/rlepigre/lambdapi/contributors","subscribers_url":"https://api.github.com/repos/rlepigre/lambdapi/subscribers","subscription_url":"https://api.github.com/repos/rlepigre/lambdapi/subscription","commits_url":"https://api.github.com/repos/rlepigre/lambdapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/rlepigre/lambdapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/rlepigre/lambdapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/rlepigre/lambdapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/rlepigre/lambdapi/contents/{+path}","compare_url":"https://api.github.com/repos/rlepigre/lambdapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rlepigre/lambdapi/merges","archive_url":"https://api.github.com/repos/rlepigre/lambdapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rlepigre/lambdapi/downloads","issues_url":"https://api.github.com/repos/rlepigre/lambdapi/issues{/number}","pulls_url":"https://api.github.com/repos/rlepigre/lambdapi/pulls{/number}","milestones_url":"https://api.github.com/repos/rlepigre/lambdapi/milestones{/number}","notifications_url":"https://api.github.com/repos/rlepigre/lambdapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rlepigre/lambdapi/labels{/name}","releases_url":"https://api.github.com/repos/rlepigre/lambdapi/releases{/id}","deployments_url":"https://api.github.com/repos/rlepigre/lambdapi/deployments","created_at":"2017-09-10T20:32:16Z","updated_at":"2018-07-31T10:54:11Z","pushed_at":"2018-07-31T10:54:09Z","git_url":"git://github.com/rlepigre/lambdapi.git","ssh_url":"git@github.com:rlepigre/lambdapi.git","clone_url":"https://github.com/rlepigre/lambdapi.git","svn_url":"https://github.com/rlepigre/lambdapi","homepage":"","size":34902,"stargazers_count":5,"watchers_count":5,"language":"OCaml","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":13,"license":null,"forks":6,"open_issues":13,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rlepigre/lambdapi/pulls/58"},"html":{"href":"https://github.com/rlepigre/lambdapi/pull/58"},"issue":{"href":"https://api.github.com/repos/rlepigre/lambdapi/issues/58"},"comments":{"href":"https://api.github.com/repos/rlepigre/lambdapi/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/rlepigre/lambdapi/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/rlepigre/lambdapi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rlepigre/lambdapi/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/rlepigre/lambdapi/statuses/121d6b5b79d11e4eb8f477266bda2939fa61a0d3"}},"author_association":"NONE"}}
{"actor":{"display_login":"rlepigre"}}