I have to express some basic Prolog code in classical first order logic (FOL). In Prolog i use lists, together with member/2 and append/3 a lot. Could you give me some tips for writing clauses like the ones in the toy example below in FOL? The xs are intended as variables...
Family(Parents(marge, homer), Kids(bart, lisa, maggie))
Family(Parents(kirk, luann), Kids(milhouse))
Family(Parents(_, _), Kids(x1)) ^ Member(x2, x1) -> SomeKid(x2)
Family(Parents(x1, x2), Kids(x3)) ^ Append(x1, x2, x3, xresult) -> WholeFamily(xresult)
Expected output SomeKid(x) x = bart (and so on)
Expected output WholeFamily(x) x = marge, homer, bart, lisa, maggie and so on
I know i could do parent(bart, homer), parent(lisa, homer) and so on, but in my application I have to write predicates and functions that take lists of variable arity, where any list could contain functions (e.g. [Person(Name(bart), Age(12)), ..., Person(Name(lisa), Age(10))].
Thank you in advance!