{"action":"created","comment":{"url":"https://api.github.com/repos/opencog/opencog/pulls/comments/37170124","id":37170124,"diff_hunk":"@@ -0,0 +1,110 @@\n+; =============================================================================\n+; Evaluation Implication Rule\n+;\n+; AndLink\n+;   EvaluationLink\n+;       A\n+;       B\n+;   ImplicationLink\n+;       A\n+;       C\n+; |-\n+; EvaluationLink\n+;   C\n+;   B\n+; -----------------------------------------------------------------------------\n+; Based on Chapter 10: Higher Order Extensional Inference\n+; This rule handles some cases of PLN higher order logic that don't\n+; require quantifiers\n+\n+; ImplicationLink PredicateNode:A PredicateNode:A\n+; can be handled trivially using the existing first-order PLN rules.\n+; This is where we handle a special case.\n+\n+\n+(load \"formulas.scm\")\n+\n+(define pln-rule-evaluation-implication\n+    (BindLink\n+        (VariableList\n+            (VariableNode \"$A\")\n+            (VariableNode \"$B\")\n+            (VariableNode \"$C\"))\n+        (AndLink\n+            (VariableNode \"$A\")\n+            (VariableNode \"$B\")\n+            (VariableNode \"$C\")\n+            (EvaluationLink\n+                (VariableNode \"$A\")\n+                (VariableNode \"$B\"))\n+            (ImplicationLink\n+                (VariableNode \"$A\")\n+                (VariableNode \"$C\")))\n+        (ExecutionOutputLink\n+            (GroundedSchemaNode \"scm: pln-formula-evaluation-implication\")\n+            (ListLink\n+                (VariableNode \"$A\")\n+                (VariableNode \"$B\")\n+                (VariableNode \"$C\")\n+                (EvaluationLink\n+                    (VariableNode \"$A\")\n+                    (VariableNode \"$B\"))\n+                (ImplicationLink\n+                    (VariableNode \"$A\")\n+                    (VariableNode \"$C\"))\n+                (EvaluationLink\n+                    (VariableNode \"$C\")\n+                    (VariableNode \"$B\"))))))\n+\n+(define (pln-formula-evaluation-implication A B C AB AC CB)\n+    (cog-set-tv!\n+        CB\n+        (stv\n+            (simple-deduction-formula \n+                (cog-stv-strength B)\n+                (cog-stv-strength A)\n+                (cog-stv-strength C)\n+                (cog-stv-strength AB)\n+                (cog-stv-strength AC))\n+            (*\n+                0.9\n+                (min\n+                    (cog-stv-confidence B)\n+                    (cog-stv-confidence A)\n+                    (cog-stv-confidence C)\n+                    (cog-stv-confidence AC)\n+                    (* 0.9 (cog-stv-confidence AB)))))))\n+","path":"opencog/reasoning/pln/rules/evaluation-implication-rule.scm","position":77,"original_position":77,"commit_id":"18815c83b6d7f2bbf8ab486f030f3f766b907953","original_commit_id":"18815c83b6d7f2bbf8ab486f030f3f766b907953","user":{"login":"prateeksaxena2809","id":7004450,"avatar_url":"https://avatars.githubusercontent.com/u/7004450?v=3","gravatar_id":"","url":"https://api.github.com/users/prateeksaxena2809","html_url":"https://github.com/prateeksaxena2809","followers_url":"https://api.github.com/users/prateeksaxena2809/followers","following_url":"https://api.github.com/users/prateeksaxena2809/following{/other_user}","gists_url":"https://api.github.com/users/prateeksaxena2809/gists{/gist_id}","starred_url":"https://api.github.com/users/prateeksaxena2809/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateeksaxena2809/subscriptions","organizations_url":"https://api.github.com/users/prateeksaxena2809/orgs","repos_url":"https://api.github.com/users/prateeksaxena2809/repos","events_url":"https://api.github.com/users/prateeksaxena2809/events{/privacy}","received_events_url":"https://api.github.com/users/prateeksaxena2809/received_events","type":"User","site_admin":false},"body":"Yes, sorry my bad. ","created_at":"2015-08-17T09:17:09Z","updated_at":"2015-08-17T09:17:09Z","html_url":"https://github.com/opencog/opencog/pull/1723#discussion_r37170124","pull_request_url":"https://api.github.com/repos/opencog/opencog/pulls/1723","_links":{"self":{"href":"https://api.github.com/repos/opencog/opencog/pulls/comments/37170124"},"html":{"href":"https://github.com/opencog/opencog/pull/1723#discussion_r37170124"},"pull_request":{"href":"https://api.github.com/repos/opencog/opencog/pulls/1723"}}},"pull_request":{"url":"https://api.github.com/repos/opencog/opencog/pulls/1723","id":42503505,"html_url":"https://github.com/opencog/opencog/pull/1723","diff_url":"https://github.com/opencog/opencog/pull/1723.diff","patch_url":"https://github.com/opencog/opencog/pull/1723.patch","issue_url":"https://api.github.com/repos/opencog/opencog/issues/1723","number":1723,"state":"open","locked":false,"title":"Added predicate rule","user":{"login":"prateeksaxena2809","id":7004450,"avatar_url":"https://avatars.githubusercontent.com/u/7004450?v=3","gravatar_id":"","url":"https://api.github.com/users/prateeksaxena2809","html_url":"https://github.com/prateeksaxena2809","followers_url":"https://api.github.com/users/prateeksaxena2809/followers","following_url":"https://api.github.com/users/prateeksaxena2809/following{/other_user}","gists_url":"https://api.github.com/users/prateeksaxena2809/gists{/gist_id}","starred_url":"https://api.github.com/users/prateeksaxena2809/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateeksaxena2809/subscriptions","organizations_url":"https://api.github.com/users/prateeksaxena2809/orgs","repos_url":"https://api.github.com/users/prateeksaxena2809/repos","events_url":"https://api.github.com/users/prateeksaxena2809/events{/privacy}","received_events_url":"https://api.github.com/users/prateeksaxena2809/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-14T22:21:25Z","updated_at":"2015-08-17T09:17:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ecb32d0cec5bf4319e1223e962e74c632c88b0d7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opencog/opencog/pulls/1723/commits","review_comments_url":"https://api.github.com/repos/opencog/opencog/pulls/1723/comments","review_comment_url":"https://api.github.com/repos/opencog/opencog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencog/opencog/issues/1723/comments","statuses_url":"https://api.github.com/repos/opencog/opencog/statuses/18815c83b6d7f2bbf8ab486f030f3f766b907953","head":{"label":"prateeksaxena2809:add_pln_predicate_and_quantifier_rules","ref":"add_pln_predicate_and_quantifier_rules","sha":"18815c83b6d7f2bbf8ab486f030f3f766b907953","user":{"login":"prateeksaxena2809","id":7004450,"avatar_url":"https://avatars.githubusercontent.com/u/7004450?v=3","gravatar_id":"","url":"https://api.github.com/users/prateeksaxena2809","html_url":"https://github.com/prateeksaxena2809","followers_url":"https://api.github.com/users/prateeksaxena2809/followers","following_url":"https://api.github.com/users/prateeksaxena2809/following{/other_user}","gists_url":"https://api.github.com/users/prateeksaxena2809/gists{/gist_id}","starred_url":"https://api.github.com/users/prateeksaxena2809/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateeksaxena2809/subscriptions","organizations_url":"https://api.github.com/users/prateeksaxena2809/orgs","repos_url":"https://api.github.com/users/prateeksaxena2809/repos","events_url":"https://api.github.com/users/prateeksaxena2809/events{/privacy}","received_events_url":"https://api.github.com/users/prateeksaxena2809/received_events","type":"User","site_admin":false},"repo":{"id":32343933,"name":"opencog","full_name":"prateeksaxena2809/opencog","owner":{"login":"prateeksaxena2809","id":7004450,"avatar_url":"https://avatars.githubusercontent.com/u/7004450?v=3","gravatar_id":"","url":"https://api.github.com/users/prateeksaxena2809","html_url":"https://github.com/prateeksaxena2809","followers_url":"https://api.github.com/users/prateeksaxena2809/followers","following_url":"https://api.github.com/users/prateeksaxena2809/following{/other_user}","gists_url":"https://api.github.com/users/prateeksaxena2809/gists{/gist_id}","starred_url":"https://api.github.com/users/prateeksaxena2809/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateeksaxena2809/subscriptions","organizations_url":"https://api.github.com/users/prateeksaxena2809/orgs","repos_url":"https://api.github.com/users/prateeksaxena2809/repos","events_url":"https://api.github.com/users/prateeksaxena2809/events{/privacy}","received_events_url":"https://api.github.com/users/prateeksaxena2809/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prateeksaxena2809/opencog","description":"A framework for integrated Artificial Intelligence & Artificial General Intelligence (AGI)","fork":true,"url":"https://api.github.com/repos/prateeksaxena2809/opencog","forks_url":"https://api.github.com/repos/prateeksaxena2809/opencog/forks","keys_url":"https://api.github.com/repos/prateeksaxena2809/opencog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prateeksaxena2809/opencog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prateeksaxena2809/opencog/teams","hooks_url":"https://api.github.com/repos/prateeksaxena2809/opencog/hooks","issue_events_url":"https://api.github.com/repos/prateeksaxena2809/opencog/issues/events{/number}","events_url":"https://api.github.com/repos/prateeksaxena2809/opencog/events","assignees_url":"https://api.github.com/repos/prateeksaxena2809/opencog/assignees{/user}","branches_url":"https://api.github.com/repos/prateeksaxena2809/opencog/branches{/branch}","tags_url":"https://api.github.com/repos/prateeksaxena2809/opencog/tags","blobs_url":"https://api.github.com/repos/prateeksaxena2809/opencog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prateeksaxena2809/opencog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prateeksaxena2809/opencog/git/refs{/sha}","trees_url":"https://api.github.com/repos/prateeksaxena2809/opencog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prateeksaxena2809/opencog/statuses/{sha}","languages_url":"https://api.github.com/repos/prateeksaxena2809/opencog/languages","stargazers_url":"https://api.github.com/repos/prateeksaxena2809/opencog/stargazers","contributors_url":"https://api.github.com/repos/prateeksaxena2809/opencog/contributors","subscribers_url":"https://api.github.com/repos/prateeksaxena2809/opencog/subscribers","subscription_url":"https://api.github.com/repos/prateeksaxena2809/opencog/subscription","commits_url":"https://api.github.com/repos/prateeksaxena2809/opencog/commits{/sha}","git_commits_url":"https://api.github.com/repos/prateeksaxena2809/opencog/git/commits{/sha}","comments_url":"https://api.github.com/repos/prateeksaxena2809/opencog/comments{/number}","issue_comment_url":"https://api.github.com/repos/prateeksaxena2809/opencog/issues/comments{/number}","contents_url":"https://api.github.com/repos/prateeksaxena2809/opencog/contents/{+path}","compare_url":"https://api.github.com/repos/prateeksaxena2809/opencog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prateeksaxena2809/opencog/merges","archive_url":"https://api.github.com/repos/prateeksaxena2809/opencog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prateeksaxena2809/opencog/downloads","issues_url":"https://api.github.com/repos/prateeksaxena2809/opencog/issues{/number}","pulls_url":"https://api.github.com/repos/prateeksaxena2809/opencog/pulls{/number}","milestones_url":"https://api.github.com/repos/prateeksaxena2809/opencog/milestones{/number}","notifications_url":"https://api.github.com/repos/prateeksaxena2809/opencog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prateeksaxena2809/opencog/labels{/name}","releases_url":"https://api.github.com/repos/prateeksaxena2809/opencog/releases{/id}","created_at":"2015-03-16T18:13:50Z","updated_at":"2015-05-06T08:51:22Z","pushed_at":"2015-08-17T07:07:03Z","git_url":"git://github.com/prateeksaxena2809/opencog.git","ssh_url":"git@github.com:prateeksaxena2809/opencog.git","clone_url":"https://github.com/prateeksaxena2809/opencog.git","svn_url":"https://github.com/prateeksaxena2809/opencog","homepage":"http://wiki.opencog.org/w/Development","size":139933,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"opencog:master","ref":"master","sha":"7f3734e4852827bd2ba421e21bd6e30a7d752601","user":{"login":"opencog","id":2109913,"avatar_url":"https://avatars.githubusercontent.com/u/2109913?v=3","gravatar_id":"","url":"https://api.github.com/users/opencog","html_url":"https://github.com/opencog","followers_url":"https://api.github.com/users/opencog/followers","following_url":"https://api.github.com/users/opencog/following{/other_user}","gists_url":"https://api.github.com/users/opencog/gists{/gist_id}","starred_url":"https://api.github.com/users/opencog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencog/subscriptions","organizations_url":"https://api.github.com/users/opencog/orgs","repos_url":"https://api.github.com/users/opencog/repos","events_url":"https://api.github.com/users/opencog/events{/privacy}","received_events_url":"https://api.github.com/users/opencog/received_events","type":"Organization","site_admin":false},"repo":{"id":6365343,"name":"opencog","full_name":"opencog/opencog","owner":{"login":"opencog","id":2109913,"avatar_url":"https://avatars.githubusercontent.com/u/2109913?v=3","gravatar_id":"","url":"https://api.github.com/users/opencog","html_url":"https://github.com/opencog","followers_url":"https://api.github.com/users/opencog/followers","following_url":"https://api.github.com/users/opencog/following{/other_user}","gists_url":"https://api.github.com/users/opencog/gists{/gist_id}","starred_url":"https://api.github.com/users/opencog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencog/subscriptions","organizations_url":"https://api.github.com/users/opencog/orgs","repos_url":"https://api.github.com/users/opencog/repos","events_url":"https://api.github.com/users/opencog/events{/privacy}","received_events_url":"https://api.github.com/users/opencog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencog/opencog","description":"A framework for integrated Artificial Intelligence & Artificial General Intelligence (AGI)","fork":false,"url":"https://api.github.com/repos/opencog/opencog","forks_url":"https://api.github.com/repos/opencog/opencog/forks","keys_url":"https://api.github.com/repos/opencog/opencog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencog/opencog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencog/opencog/teams","hooks_url":"https://api.github.com/repos/opencog/opencog/hooks","issue_events_url":"https://api.github.com/repos/opencog/opencog/issues/events{/number}","events_url":"https://api.github.com/repos/opencog/opencog/events","assignees_url":"https://api.github.com/repos/opencog/opencog/assignees{/user}","branches_url":"https://api.github.com/repos/opencog/opencog/branches{/branch}","tags_url":"https://api.github.com/repos/opencog/opencog/tags","blobs_url":"https://api.github.com/repos/opencog/opencog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencog/opencog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencog/opencog/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencog/opencog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencog/opencog/statuses/{sha}","languages_url":"https://api.github.com/repos/opencog/opencog/languages","stargazers_url":"https://api.github.com/repos/opencog/opencog/stargazers","contributors_url":"https://api.github.com/repos/opencog/opencog/contributors","subscribers_url":"https://api.github.com/repos/opencog/opencog/subscribers","subscription_url":"https://api.github.com/repos/opencog/opencog/subscription","commits_url":"https://api.github.com/repos/opencog/opencog/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencog/opencog/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencog/opencog/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencog/opencog/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencog/opencog/contents/{+path}","compare_url":"https://api.github.com/repos/opencog/opencog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencog/opencog/merges","archive_url":"https://api.github.com/repos/opencog/opencog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencog/opencog/downloads","issues_url":"https://api.github.com/repos/opencog/opencog/issues{/number}","pulls_url":"https://api.github.com/repos/opencog/opencog/pulls{/number}","milestones_url":"https://api.github.com/repos/opencog/opencog/milestones{/number}","notifications_url":"https://api.github.com/repos/opencog/opencog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencog/opencog/labels{/name}","releases_url":"https://api.github.com/repos/opencog/opencog/releases{/id}","created_at":"2012-10-24T06:10:15Z","updated_at":"2015-08-16T15:57:11Z","pushed_at":"2015-08-17T08:17:36Z","git_url":"git://github.com/opencog/opencog.git","ssh_url":"git@github.com:opencog/opencog.git","clone_url":"https://github.com/opencog/opencog.git","svn_url":"https://github.com/opencog/opencog","homepage":"http://wiki.opencog.org/w/Development","size":152144,"stargazers_count":661,"watchers_count":661,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":313,"mirror_url":null,"open_issues_count":110,"forks":313,"open_issues":110,"watchers":661,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencog/opencog/pulls/1723"},"html":{"href":"https://github.com/opencog/opencog/pull/1723"},"issue":{"href":"https://api.github.com/repos/opencog/opencog/issues/1723"},"comments":{"href":"https://api.github.com/repos/opencog/opencog/issues/1723/comments"},"review_comments":{"href":"https://api.github.com/repos/opencog/opencog/pulls/1723/comments"},"review_comment":{"href":"https://api.github.com/repos/opencog/opencog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencog/opencog/pulls/1723/commits"},"statuses":{"href":"https://api.github.com/repos/opencog/opencog/statuses/18815c83b6d7f2bbf8ab486f030f3f766b907953"}}}}