opencog/opencog — pull request #904 by sebastianruder (2014-06-30 14:31:10+00:00)
Title: Rule to create AndLinks inside other links (specifically InheritanceLinks) to be used with context rules

@cosmoharrigan, @bgoertzel, following what I asked and what you, Ben, pointed out [here](https://groups.google.com/forum/#!topic/opencog/HMnBl7qodV0), I created such a rule for the PatternMatcher and the Python PLN.
I think this is necessary in order to work with the context rules as they are supposed to be used at the moment. They require AndLinks inside of InheritanceLinks (or other link types). We can create an arbitrary number of AndLinks with the AndCreationRule, but we're not able to incorporate them based on other relationships that already exist.
This rule at the moment would put an AndLink in the second argument position of an InheritanceLink based on two InheritanceLinks which share the first argument. I think we also should be able to put an AndLink in the first argument position. I don't see, though, how this can be incorporated into the current rule with the current PLN syntax. Does this necessitate then another, separate rule such as the following?
```
(ImplicationLink
(AndLink
(InheritanceLink A C)
(InheritanceLink B C))
(InheritanceLink
(AndLink A B) C))
```
I'm looking forward to your advice and feedback.