Skip to main content

Non-Monotonic Multi-Succedent sequent calculus — propositional NMMS from Hlobil & Brandom 2025

Project description

pyNMMS

PyPI Python License Docs

Non-Monotonic Multi-Succedent sequent calculus — propositional NMMS from Hlobil & Brandom 2025, Ch. 3.

Documentation | PyPI | GitHub

Installation

pip install pyNMMS

For development:

git clone https://github.com/bradleypallen/nmms-reasoner.git
cd nmms-reasoner
pip install -e ".[dev]"

Quick Start

from pynmms import MaterialBase, NMMSReasoner

# Create a material base with defeasible inferences
base = MaterialBase(
    language={"A", "B", "C"},
    consequences={
        (frozenset({"A"}), frozenset({"B"})),  # A |~ B
        (frozenset({"B"}), frozenset({"C"})),  # B |~ C
    },
)

reasoner = NMMSReasoner(base)

# A derives B (base consequence)
result = reasoner.derives(frozenset({"A"}), frozenset({"B"}))
assert result.derivable  # True

# A does NOT derive C (nontransitivity — no [Mixed-Cut])
result = reasoner.derives(frozenset({"A"}), frozenset({"C"}))
assert not result.derivable  # False

# A, C does NOT derive B (nonmonotonicity — no [Weakening])
result = reasoner.derives(frozenset({"A", "C"}), frozenset({"B"}))
assert not result.derivable  # False

# Classical tautologies still hold (supraclassicality)
result = reasoner.derives(frozenset(), frozenset({"A | ~A"}))
assert result.derivable  # True

CLI

# Create a base and add consequences
pynmms tell -b base.json --create "A |~ B"
pynmms tell -b base.json "B |~ C"

# Query derivability
pynmms ask -b base.json "A => B"        # DERIVABLE
pynmms ask -b base.json "A => C"        # NOT DERIVABLE
pynmms ask -b base.json "A, C => B"     # NOT DERIVABLE

# Interactive REPL
pynmms repl -b base.json

Key Properties

  • Nonmonotonicity: Adding premises can defeat inferences (no Weakening)
  • Nontransitivity: Chaining good inferences can yield bad ones (no Mixed-Cut)
  • Supraclassicality: All classically valid sequents are derivable
  • Conservative Extension: Logical vocabulary doesn't change base-level relations
  • Explicitation Conditions: DD, II, AA, SS biconditionals hold

Theoretical Background

This implements the NMMS sequent calculus from:

  • Hlobil, U. & Brandom, R. B. (2025). Reasons for Logic, Logic for Reasons. Ch. 3: "Introducing Logical Vocabulary."

NMMS codifies open reason relations — consequence relations where Monotonicity and Transitivity can fail. The material base encodes defeasible material inferences among atomic sentences, and the Ketonen-style logical rules extend this to compound sentences while preserving nonmonotonicity.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynmms-0.1.1.tar.gz (45.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pynmms-0.1.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file pynmms-0.1.1.tar.gz.

File metadata

  • Download URL: pynmms-0.1.1.tar.gz
  • Upload date:
  • Size: 45.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for pynmms-0.1.1.tar.gz
Algorithm Hash digest
SHA256 df39dc5bf63e0f01cb9910f14e2712817948c5e8ea84da2b94b7559a25d38118
MD5 7493078381663dce34ba73a219012fa0
BLAKE2b-256 3d6eea9e69933ed4518d6f94cd09b7ff9c7fd7d126aa709589c675053fbbfdef

See more details on using hashes here.

File details

Details for the file pynmms-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pynmms-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for pynmms-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e8e8194c68b06b448b07a01a244c61109d961705455f5c0fbf48157f4227bc6
MD5 8de0359b8ac9a009e78a95e9c6ac0774
BLAKE2b-256 a3b041d9c768c5b6a5e1fa49af34dc99173890c13b070ea84b453c63bc1463d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page