- 16 Posts
- 3 Comments
Joined 2 years ago
Cake day: June 19th, 2023
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
sebastiancarlos@lemmy.sdf.orgOPto Programmer Humor@lemmy.ml•The Christian and Traditional Family propaganda of Prolog examples1·6 months agomother can be used in several ways. If both X and Y variables are uninitialized, then it looks for all mother relationships. If one of them is initialized, it looks for matching relationships. If both are initialized, it returns true if such a relationship exists.
sebastiancarlos@lemmy.sdf.orgOPto Programmer Humor@lemmy.ml•The Christian and Traditional Family propaganda of Prolog examples1·6 months agoDepends on how you want to define your domain knowledge.
The thing you need to define for sure is the predicate
mother/2
(Which has arity 2, or in other words, two arguments). From then on, multiple options are available:- Take
mother(X, Y)
as an “axiom”, and define mother terms for all elements:
mother(abel, eve). mother(isaac, sarah).
- Derive
mother(X, Y)
fromfemale(X)
andparent(X, Y)
terms.
mother(X, Y) :- parent(X, Y), female(Y).
- Smash the institutional gender power structures and define only
parent/2
terms instead ofmother/2
andfather/2
.
- Take
Thanks! I borrowed the open source katana bit from unix surrealism