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.2.tar.gz (56.1 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.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pynmms-0.1.2.tar.gz
  • Upload date:
  • Size: 56.1 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.2.tar.gz
Algorithm Hash digest
SHA256 ceb1b52e7bc30c643f280ed3ee6de064d2aa7c33c540ab4e4eeb0627de8df698
MD5 c00f4b4054f041aad707e94513f5e2c5
BLAKE2b-256 5229647c2e6b5d7a3370baa3c0e0a6183074eea2ebc99cc365a89802b196c090

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pynmms-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6052a72658fe9416b396d259ff2f55da293dde6d9c077fa263bdb48ff3ae53c6
MD5 ad8e57804444cf6f01f04fa52011ce06
BLAKE2b-256 c23a6d2c5b907b8ad70ba89d9117dd855617e3c481055687e22e58e4454a5a1d

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