Description
I have been thinking about ImplicationScope to Implication conversion (and the reverse) and found some issues.
Let's say we have:
(ImplicationScopeLink (stv 1.0 1.0)
(VariableList
(VariableNode "$A")
(VariableNode "$B"))
(EvaluationLink
(PredicateNode "does")
(ListLink
(VariableNode "$A")
(VariableNode "$B")))
(EvaluationLink
(PredicateNode "isbeingdone")
(VariableNode "$B")))
(ImplicationScopeLink (stv 1.0 1.0)
(VariableList
(VariableNode "$A"))
(EvaluationLink
(PredicateNode "isbeingdone")
(VariableNode "$A"))
(EvaluationLink
(PredicateNode "willbedone")
(VariableNode "$A")))
It seems reasonable to think that we can infer the following:
(ImplicationScopeLink (stv 1.0 1.0)
(VariableList
(VariableNode "$A")
(VariableNode "$B"))
(EvaluationLink
(PredicateNode "does")
(ListLink
(VariableNode "$A")
(VariableNode "$B")))
(EvaluationLink
(PredicateNode "willbedone")
(VariableNode "$B")))
But atm this does not work. Let's try to do it and see where we fail. First we will have to use the implication-scope-to-implication-rule
as the deduction-implication-rule
we want to use only works on normal ImplicationLinks. This results in the following:
(ImplicationLink (stv 1 1)
(LambdaLink
(VariableList
(VariableNode "$A")
(VariableNode "$B"))
(EvaluationLink
(PredicateNode "does")
(ListLink
(VariableNode "$A")
(VariableNode "$B"))))
(LambdaLink
(VariableList
(VariableNode "$A")
(VariableNode "$B"))
(EvaluationLink
(PredicateNode "isbeingdone")
(VariableNode "$B"))))
(ImplicationLink (stv 1 1)
(LambdaLink
(VariableList
(VariableNode "$A"))
(EvaluationLink
(PredicateNode "isbeingdone")
(VariableNode "$A")))
(LambdaLink
(VariableList
(VariableNode "$A"))
(EvaluationLink
(PredicateNode "willbedone")
(VariableNode "$A"))))
And here we can see the issue. Namely that the LambdaLink wrapping the "isbeingdone" Predicate has 2 variables in one case and 1 in the other which stops the decuction-implication-rule
from doing anything.
And if I understand this correctly can't change the implication-scope-to-implication-rule
to just drop the extra Variable as that would break the equivalence between ImplicationScopeLink and the ImplicationLink.
So i think the correct solution would be to create a decuction-implication-scope-rule
that can handle ImplicationScopeLinks by doing unification to get the mappings between variables and then using alpha-conversion to get 2 Links where the Variables Names line up correctly and then doing normal deduction.