prolog-unification

Community

Master Prolog unification and occurs check.

Authorhafley66
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Unification is the single operation that drives all of Prolog's computation. Given two terms, unification finds a substitution -- a set of variable bindings -- that makes the two terms syntactically identical. If no such substitution exists, unification fails.

Core Features & Use Cases

  • Bidirectional variable binding and aliasing, enabling both sides to carry unbound variables that resolve during solving.
  • Handling constants, variables, and compound terms (including lists) with recursive, structural matching and backtracking support.
  • Occurs check discussion and practical tradeoffs used to prevent infinite terms, with guidance on when to enable a full occurs check.
  • Substitution environment semantics: write-once bindings, transitive resolution, and backtracking rollback.

Quick Start

Demonstrate unifying f(X, g(Y, a)) with f(h(Z), g(b, Z)) and display the final substitution.

Dependency Matrix

Required Modules

None required

Components

Standard package

đŸ’» Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: prolog-unification
Download link: https://github.com/hafley66/claude-research/archive/main.zip#prolog-unification

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.