@prefix math: . @prefix e: . @prefix rdf: . @prefix rpo: . @prefix : . (:Ann :Fever) rpo:mu 0.8. (:Ann :AllergyForAspirin) rpo:mu 0.001. (:Joe :AcuteMyocardialInfarction) rpo:mu 0.9. (:Joe :ActivePepticUlcerDisease) rpo:mu 0.006. (:Joe :AllergyForAspirin) rpo:mu 0.001. (:Joe :SevereAsthma) rpo:mu 0.001. (:Joe :ChronicObstructivePumonaryDisease) rpo:mu 0.001. :aspirinHighDose :prescribedFor :Fever. :aspirinLowDose :prescribedFor :AcuteMyocardialInfarction. :betaBlocker :prescribedFor :AcuteMyocardialInfarction. :aspirinHighDose :excludedFor (:ActivePepticUlcerDisease :AllergyForAspirin). :aspirinLowDose :excludedFor (:ActivePepticUlcerDisease :AllergyForAspirin). :betaBlocker :excludedFor (:SevereAsthma :ChronicObstructivePumonaryDisease). {?X :excludedFor ?L} => {?L a rdf:List}. {?X rdf:rest ?L; a rdf:List} => {?L a rdf:List}. {(?W ?D) rpo:mu ?N. ?N math:lessThan 0.01. ?L a rdf:List; rdf:first ?D; rdf:rest rdf:nil} => {?W :fineWith ?L}. {(?W ?D) rpo:mu ?N. ?N math:lessThan 0.01. ?L a rdf:List; rdf:first ?D; rdf:rest ?R. ?W :fineWith ?R} => {?W :fineWith ?L}. {(?W ?D) rpo:mu ?N. ?N math:greaterThan 0.7. ?M :prescribedFor ?D. ?M :excludedFor ?L. ?W :fineWith ?L} => {?W :isPrescribed ?M}.