Solve Symbolic Logic Reasoning (SLR) tasks, specifically formulating a Prolog rule to classify eastbound vs. westbound trains based on their composition.
Approach
Analyze Train Composition: Review the ground facts (like has_car, car_color, car_len, has_wall) for positive (eastbound) and negative (westbound) examples.
Find Mappings: Locate a property or combination of properties that is true for all eastbound trains and false for all westbound trains.
Formulate Prolog Rule: Formulate the rule as eastbound(T) :- Body. (e.g. eastbound(Train) :- has_car(Train, Car), car_len(Car, short).).
Minimize Body Literals: Make the rule body as short and general as possible without sacrificing accuracy.
Known constraints
The rule must perfectly separate positive and negative examples.
Must use only predefined predicates and constants.
1---2name: symbolic-logic-reasoning3description: Symbolic Logic Reasoning4---5# Symbolic Logic Reasoning67## When to use this skill8Solve Symbolic Logic Reasoning (SLR) tasks, specifically formulating a Prolog rule to classify eastbound vs. westbound trains based on their composition.910## Approach111. **Analyze Train Composition**: Review the ground facts (like `has_car`, `car_color`, `car_len`, `has_wall`) for positive (eastbound) and negative (westbound) examples.122. **Find Mappings**: Locate a property or combination of properties that is true for all eastbound trains and false for all westbound trains.133. **Formulate Prolog Rule**: Formulate the rule as `eastbound(T) :- Body.` (e.g. `eastbound(Train) :- has_car(Train, Car), car_len(Car, short).`).144. **Minimize Body Literals**: Make the rule body as short and general as possible without sacrificing accuracy.1516## Known constraints17- The rule must perfectly separate positive and negative examples.18- Must use only predefined predicates and constants.1920## Examples21### Good rule pattern22`eastbound(Train):- has_car(Train, Car1), car_color(Car1, yellow).`
Run npx skillmds@latest add siddhu1716/symbolic-logic-reasoning in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Symbolic Logic Reasoning It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
siddhu1716 (@siddhu1716) published this skill. Their other Agent Skills are listed on their SkillMD profile.