Thanks for the link. ProbLog is built around logic statements, while SDB is a type of triple store. So, in general ProbLog examples are not going to translate cleanly at all, but we can approximate the example given on the problog page: Here is the ProbLog we are trying to reproduce:

```
0.3::stress(X) :- person(X).
0.2::influences(X,Y) :- person(X), person(Y).
smokes(X) :- stress(X).
smokes(X) :- friend(X,Y), influences(Y,X), smokes(Y).
0.4::asthma(X) :- smokes(X).
person(angelika).
person(joris).
person(jonas).
person(dimitar).
friend(joris,jonas).
friend(joris,angelika).
friend(joris,dimitar).
friend(angelika,jonas).
```

Let’s approximately (I couldn’t find a way to do it exactly) do that in SDB:

Also, assumes I understod the ProbLog correctly!

```
-- first define our people:
-- by default, an object is not a person:
is-a-person |*> #=> |no>
-- list objects that are actually people:
is-a-person |angelika> => |yes>
is-a-person |joris> => |yes>
is-a-person |jonas> => |yes>
is-a-person |dimitar> => |yes>
-- learn the set of friends:
friend |joris> +=> |jonas>
friend |joris> +=> |angelika>
friend |joris> +=> |dimitar>
friend |angelika> +=> |jonas>
-- if a person, then 30% chance of being stressed:
is-stressed |*> #=> 0.3 is-a-person |_self>
-- if a person smokes, then 40% chance of them having asthma:
has-asthma |*> #=> 0.4 smokes |_self>
-- joris is 20% influenced by dimitar:
influences |joris> => 0.2|dimitar>
-- dimitar smokes:
smokes |dimitar> => |yes>
-- define our general smokes operator:
smokes |*> #=> is-a-person intersection(such-that[smokes] friend |_self>, influences |_self>)
```

Now ask some simple questions:

```
sa: smokes |dimitar>
|yes>
sa: has-asthma |dimitar>
0.4|yes>
sa: smokes |joris>
0.2|yes>
sa: has-asthma |joris>
0.08|yes>
sa: smokes |jonas>
|no>
sa: has-asthma |jonas>
0.4|no>
```

Finally, we store the data as superpositions, not full matrices. In general superpositions are too sparse for full matrices to be practical.

Sorry, I don’t have a paper on the theory. I wouldn’t even know how to start writing one, to be frank.