Skip to main content

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

Project description

pyNMMS

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

Installation

pip install pyNMMS

For development:

git clone https://github.com/bradleyallen/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.0.tar.gz (45.3 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.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pynmms-0.1.0.tar.gz
  • Upload date:
  • Size: 45.3 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.0.tar.gz
Algorithm Hash digest
SHA256 55b84bfbd68cd1dcf375c719e99aba2953f976e738629ce6bfceee04a8d71042
MD5 cde277c60c89197e6ebc03e9a989a45f
BLAKE2b-256 486d9c75182d8b18db3d102e887058ed2d5874b9f9eaafdd2b11ec098fe914cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pynmms-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47f680be54e0a34593104a07c06cab7780f74bfa14bc605b21417691e6713d32
MD5 03950e85ba5c57c4498bac0765cc1fbf
BLAKE2b-256 8e053c4e961a3f470e30b2a1aba0b85f9876e4be01bcc2cfaff3fe40b2760055

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