結果 : first order logic code in python