Predicate Logic

VerifiedSafe

Problem-solving strategies for predicate logic in mathematical logic. Covers quantifier analysis, prenex normal form, Skolemization, and resolution-based proofs.

Sby Skills Guide Bot
DevelopmentAdvanced
3/8/2026
Claude CodeCodex
#predicate-logic#formal-verification#z3#theorem-proving#first-order-logic

Recommended for

Automated summary

Guides an agent through solving predicate-logic problems — quantifier analysis, prenex normal form, Skolemization, resolution proofs and model construction — using Z3 and SymPy scripts.

Strengths

  • Five-step decision tree chaining quantifier analysis, prenex form, Skolemization, resolution and model theory
  • Concrete ready-to-run commands to prove, check satisfiability, instantiate a universal quantifier and extract a model with Z3
  • Explicitly covers refutation via countermodels, not just proof attempts
  • Flags classic pitfalls: quantifier scope, free vs. bound variables, and variable capture

Limitations

  • Assumes a local harness (runtime.harness) and z3_solve.py / sympy_compute.py scripts that are not described in the file
  • Bounded by what Z3 actually supports: no non-classical logics and no informal reasoning about complex theories
  • Supplies commands but little pedagogical explanation of the inference rules themselves
When to use it

Use it when you need to prove or refute a first-order statement, check the validity of a quantified argument, or exhibit a model that invalidates it.

When not to use it

Avoid it for modal, temporal or intuitionistic logic, or when a hand-written mathematical proof is expected rather than automated checking.

Security analysis

Safe
Quality score82/100

The skill only provides predicate-logic problem-solving guidance and invokes local Python/Z3 helper scripts through bash. There are no destructive commands, network calls, secret handling, obfuscation, or safety-disabling instructions.

No concerns found

How this analysis is made

Examples

Preuve par instanciation universelle
Montre que ∀x (P(x) → Q(x)) et P(a) impliquent Q(a), puis donne la forme prénexe de la formule.
Réfutation par contre-modèle
L'argument (∃x P(x)) ∧ (∃x Q(x)) → ∃x (P(x) ∧ Q(x)) est-il valide ? Si non, construis un modèle fini qui l'invalide.
Skolémisation et résolution
Convertis ∀x P(x) → ∃y Q(x,y) en CNF après skolémisation, puis donne la preuve par résolution de sa négation.

name: predicate-logic description: "Problem-solving strategies for predicate logic in mathematical logic" allowed-tools: [Bash, Read]

Predicate Logic

When to Use

Use this skill when working on predicate-logic problems in mathematical logic.

Decision Tree

  1. Quantifier Analysis

    • Identify: ForAll (universal), Exists (existential)
    • Scope of quantifiers and free/bound variables
    • z3_solve.py prove "ForAll([x], P(x)) implies P(a)"
  2. Prenex Normal Form

    • Move all quantifiers to front
    • Standardize variables to avoid capture
    • sympy_compute.py simplify "prenex(formula)"
  3. Skolemization (for Exists)

    • Replace existential quantifiers with Skolem functions
    • Exists x. P(x) -> P(c) or P(f(y)) depending on scope
    • Needed for resolution-based proofs
  4. Resolution Proof

    • Convert to CNF, negate conclusion
    • Apply resolution rule until empty clause or saturation
    • z3_solve.py prove "resolution_valid"
  5. Model Theory

    • Construct countermodel to refute invalid argument
    • Finite model for finite domain
    • z3_solve.py model "Exists([x], P(x) & Not(Q(x)))"

Tool Commands

Z3_Forall

uv run python -m runtime.harness scripts/z3_solve.py prove "ForAll([x], Implies(P(x), Q(x)))"

Z3_Exists

uv run python -m runtime.harness scripts/z3_solve.py sat "Exists([x], And(P(x), Not(Q(x))))"

Z3_Universal_Instantiation

uv run python -m runtime.harness scripts/z3_solve.py prove "Implies(ForAll([x], P(x)), P(a))"

Z3_Model

uv run python -m runtime.harness scripts/z3_solve.py model "Exists([x], P(x))"

Cognitive Tools Reference

See .maestro/skills/math-mode/SKILL.md for full tool documentation.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/predicate-logic-mmh8qqp1/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/predicate-logic-mmh8qqp1' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/predicate-logic-mmh8qqp1/download' --output '.skill-downloads/predicate-logic-mmh8qqp1/SKILL.md.part' && mv '.skill-downloads/predicate-logic-mmh8qqp1/SKILL.md.part' '.skill-downloads/predicate-logic-mmh8qqp1/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/predicate-logic-mmh8qqp1/SKILL.md' && test -s '.skill-downloads/predicate-logic-mmh8qqp1/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/predicate-logic' && cp -R '.skill-downloads/predicate-logic-mmh8qqp1' '.claude/skills/predicate-logic'

Codex
test -f '.skill-downloads/predicate-logic-mmh8qqp1/SKILL.md' && test -s '.skill-downloads/predicate-logic-mmh8qqp1/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/predicate-logic' && cp -R '.skill-downloads/predicate-logic-mmh8qqp1' '.agents/skills/predicate-logic'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/predicate-logic-mmh8qqp1'

openskills read 'predicate-logic-mmh8qqp1'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/predicate-logic-mmh8qqp1/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills