{"action":"created","issue":{"url":"https://api.github.com/repos/gapt/gapt/issues/448","labels_url":"https://api.github.com/repos/gapt/gapt/issues/448/labels{/name}","comments_url":"https://api.github.com/repos/gapt/gapt/issues/448/comments","events_url":"https://api.github.com/repos/gapt/gapt/issues/448/events","html_url":"https://github.com/gapt/gapt/issues/448","id":119061591,"number":448,"title":"LKToExpansionProof is incorrect","user":{"login":"gebner","id":313929,"avatar_url":"https://avatars.githubusercontent.com/u/313929?v=3","gravatar_id":"","url":"https://api.github.com/users/gebner","html_url":"https://github.com/gebner","followers_url":"https://api.github.com/users/gebner/followers","following_url":"https://api.github.com/users/gebner/following{/other_user}","gists_url":"https://api.github.com/users/gebner/gists{/gist_id}","starred_url":"https://api.github.com/users/gebner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gebner/subscriptions","organizations_url":"https://api.github.com/users/gebner/orgs","repos_url":"https://api.github.com/users/gebner/repos","events_url":"https://api.github.com/users/gebner/events{/privacy}","received_events_url":"https://api.github.com/users/gebner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gapt/gapt/labels/Bug","name":"Bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-26T15:10:54Z","updated_at":"2015-11-27T06:42:58Z","closed_at":null,"body":"This happens because `LKToExpansionProof` merges subtrees instead of the whole expansion sequent:\r\n```scala\r\nval Seq(x,y) = Seq(\"x\",\"y\") map {FOLVar(_)}\r\nval Seq(p,q) = Seq(\"p\",\"q\") map {FOLAtomConst(_,1)}\r\n\r\nval proof = (ProofBuilder\r\n  c LogicalAxiom(p(x))\r\n  c LogicalAxiom(p(y))\r\n  b (OrLeftRule(_, Ant(0), _, Ant(0)))\r\n  u (ForallLeftBlock(_, All(x, All(y, p(x) | p(y))), Seq(x,y)))\r\n  u (ForallRightRule(_, All(x, p(x)), x))\r\n  u (ForallRightRule(_, All(x, p(x)), y))\r\n  u (ContractionRightRule(_, Suc(0), Suc(1)))\r\n  qed)\r\n\r\nval expansion = LKToExpansionProof(proof)\r\n\r\nprintln(proof)\r\nprintln(toDeep(expansion))\r\nprintln(s\"isValid(toDeep) = ${VeriT isValid toDeep(expansion)}\")\r\n```\r\nprints\r\n```\r\n[p8] ∀x.∀y.(p(x)∨p(y)) :- ∀x.p(x)    (ContractionRightRule(p7, Suc(0), Suc(1)))\r\n[p7] ∀x.∀y.(p(x)∨p(y)) :- ∀x.p(x), ∀x.p(x)    (ForallRightRule(p6, Suc(0), y, x))\r\n[p6] ∀x.∀y.(p(x)∨p(y)) :- p(y), ∀x.p(x)    (ForallRightRule(p5, Suc(0), x, x))\r\n[p5] ∀x.∀y.(p(x)∨p(y)) :- p(x), p(y)    (ForallLeftRule(p4, Ant(0), ∀y.(p(x)∨p(y)), x, x))\r\n[p4] ∀y.(p(x)∨p(y)) :- p(x), p(y)    (ForallLeftRule(p3, Ant(0), (p(x)∨p(y)), y, y))\r\n[p3] (p(x)∨p(y)) :- p(x), p(y)    (OrLeftRule(p2, Ant(0), p1, Ant(0)))\r\n[p2] p(x) :- p(x)    (LogicalAxiom(p(x)))\r\n[p1] p(y) :- p(y)    (LogicalAxiom(p(y)))\r\n\r\n(p(x)∨p(y)) :- p(x)\r\nisValid(toDeep) = false\r\n```"},"comment":{"url":"https://api.github.com/repos/gapt/gapt/issues/comments/160053725","html_url":"https://github.com/gapt/gapt/issues/448#issuecomment-160053725","issue_url":"https://api.github.com/repos/gapt/gapt/issues/448","id":160053725,"user":{"login":"gebner","id":313929,"avatar_url":"https://avatars.githubusercontent.com/u/313929?v=3","gravatar_id":"","url":"https://api.github.com/users/gebner","html_url":"https://github.com/gebner","followers_url":"https://api.github.com/users/gebner/followers","following_url":"https://api.github.com/users/gebner/following{/other_user}","gists_url":"https://api.github.com/users/gebner/gists{/gist_id}","starred_url":"https://api.github.com/users/gebner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gebner/subscriptions","organizations_url":"https://api.github.com/users/gebner/orgs","repos_url":"https://api.github.com/users/gebner/repos","events_url":"https://api.github.com/users/gebner/events{/privacy}","received_events_url":"https://api.github.com/users/gebner/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T06:42:58Z","updated_at":"2015-11-27T06:42:58Z","body":"Looking through the old LK code, I believe this bug is not present there.  As far as I can tell, there was even a unit test for it, so this seems to be a regression."}}