Suppose you have a disease diagnosis Prolog program that starts with many relations between diseases and symptons:
causes_of(symptom1, Disease) :-
Disease = disease1;
Disease = disease2.
causes_of(symptom2, Disease) :-
Disease = disease2;
Disease = disease3.
causes_of(symptom3, Disease) :-
Disease = disease4.
has_symptom(person1, symptom1).
has_symptom(person1, symptom2).
How can I create a rule with the head 'has_disease(Person, Disease)' that will return true if the person has all the symptoms from that disease? Using the example above the following would a sample output:
has_disease(person1, Disease).
Disease = disease2.