# Is this a bug in datalog symbol resolution with \`not\`?

**URL:** <https://forum.datomic.com/t/is-this-a-bug-in-datalog-symbol-resolution-with-not/613>\
**Category:** General\
**Created:** [September 13, 2018, 3:29pm UTC](https://forum.datomic.com/t/is-this-a-bug-in-datalog-symbol-resolution-with-not/613 "2018-09-13T15:29:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dustingetz](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/dustingetz/32/56_2.png) [@dustingetz](https://forum.datomic.com/u/dustingetz)\
**Post date:** [September 13, 2018, 3:29pm UTC](https://forum.datomic.com/t/is-this-a-bug-in-datalog-symbol-resolution-with-not/613/1 "2018-09-13T15:29:17Z")

</div>

Setup

```
(defn foo [$ attr] true)
=> #'user/foo

```

this works

```
(->> (d/q '[:find [(pull ?attr [*]) ...]
            :where
            [:db.part/db :db.install/attribute ?attr]
            [(user/foo $ ?attr)]] $)
     count)
=> 146

```

Introducing `not` fails

```
(d/q '[:find [(pull ?attr [*]) ...]
       :where
       [:db.part/db :db.install/attribute ?attr]
       (not [(user/foo $ ?attr)])] $)
CompilerException java.lang.RuntimeException: 
Unable to resolve symbol: $ in this context, compiling: 
(/private/var/folders/md/5r84ml295t78h14qbtd016yr0000gn/T/form-init2062554035579474257.clj:4:14)
```
