I'm new to Prolog so I'm completely unaware of the errors i get. I'm making a code that describes the relationship between any two family members. i.e if two are married, sisters, brothers, sister and brother...etc.
wife(hussein,amina).
mother(amina,amira).
mother(amina,amany).
mother(amina,amna).
mother(amina,hassan).
mother(amina,hossam).
father(hussein,amira).
father(hussein,amany).
father(hussein,amna).
father(hussein,hassan).
father(hussein,hossam).
parent(X,Y):-
mother(X,Y) ; father(X,Y).
married(X,Y) :- wife(X,Y).
sibling(X,Y) :-
mother(Out1,X),
father(Out2,X),
mother(Out3,Y),
father(Out4,Y),
Out1 is Out3,Out2 is Out4.
The code works fine for the parent,married rules but i can't get why the sibling isn't working. I get for X and Y variables their mothers and make sure they're the same, their fathers and make sure they're the same to confirm they're siblings. but i get this error :
ERROR: is/2: Arithmetic: `amina/0' is not a function