Skip to main content

zongyuan-axiom 枢纽公理

公理裁决内核:立法在册、推导在册、溯源断链即拒、重放可验,纯标准库。

|元枢体系 YUANSHU

定名语义

  • 道统出处:枢纽定枢,公理立极——万法之源,裁决之基;公理者,不证自明之约,万命题溯之而后立
  • 工程映射:纯标准库的公理裁决内核——重复立法即现形,溯源断链即拒,历史可重演

这是什么

一个纯标准库的公理裁决内核:公理与推导之法在册管理(注册制),命题只能从已立公理或已证命题按在册之法推导而来,前提缺失即拒;任何命题可回溯至公理链,断链即伪;同号两判即现形,绝不静默吞并;任意时刻可从操作账目重放整册,逐位一致——「历史可重演」是本内核的第一契约。

道统映射

道统名 内核对象 职责
立法 enact 公理注册:编号重复即拒,空言即拒
立法 register_rule 推导之法注册:法名重复即拒
推导 derive 命题推导:前提须在册,推导之法须已立
溯源 trace / verify 命题回溯至公理链,断链即伪
矛盾 编号唯一性 同号两判即现形,不静默吞并
摘要 digest SHA-256(canonical 册态),册面一字被改必现形

快速开始

from zongyuan_axiom import AxiomCodex

codex = AxiomCodex()
codex.register_rule("合取")
codex.enact("A1", "端有真态")
codex.enact("A2", "真态可验")
codex.derive("C1", ["A1", "A2"], "合取", "端之真态可验")

print(codex.trace("C1"))    # 溯源:['A1', 'A2']
print(codex.verify("C1"))   # 核验:True
print(codex.digest())       # 摘要:SHA-256

命令行:

python tools/zongyuan_axiom.py stats  ledger.json
python tools/zongyuan_axiom.py digest ledger.json
python tools/zongyuan_axiom.py verify ledger.json C1

MCP 门面

内核随长随开放:mcp_server/ 提供 stdio 门面,十件工具——register_rule(立推导之法)、enact(立法)、derive(推导)、trace(溯源)、verify(核验)、replay(重放)、ledger(操作序快照)、digest(摘要)、stats(清点)、describe(自述)。

python run_mcp_server.py   # 一键启动 stdio MCP 服务器

门面依赖 mcp>=1.0(仅门面需要,内核保持纯标准库)。server.json 登记 io.github.tanbopiao/zongyuan-axiom。

设计约定

  • 纯标准库(json/hashlib),无第三方依赖。
  • 在册从严:重复立法、空言、前提缺失、推导之法未立一律 AxiomError,不静默。
  • 编号全局唯一:公理与命题同册占号,越号即拒。
  • 摘要基于册态:账目任何一字被改,重放摘要必不一致——「篡改现形」是本内核的第一契约。
  • 防篡改前提(统一声明):本链可发现局部或单点篡改;持有全量记录的攻击者可整体重写并重算通过——链头哈希需带外留存(或对链头签名)方可对抗整体重写。

回归

regression.md 登记回归铁律(立法、推导、溯源、矛盾、摘要五域契约)。运行:

python3 -m unittest discover -s . -p "test_*.py"

许可证

MIT。仓库:https://github.com/tanbopiao/zongyuan-axiom


生态导航:本作品属于 元枢工具货架(21 件 MCP,自动聚合)。 同门:tanze(深研) · pialuo(网页提取) · wengu(跨会话记忆) · jiwei(像素特效) · constraint-runtime(约束治理) · agent-eval-engine(可验证评测) · 全部作品

Metadata

Release files for zongyuan-axiom 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zongyuan-axiom 0.2.0
File Size Uploaded Provenance Actions
zongyuan_axiom-0.2.0.tar.gz 7.2 kB Without provenance Details for zongyuan_axiom-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zongyuan-axiom 0.2.0
File Interpreter ABI Platform Actions
zongyuan_axiom-0.2.0-py3-none-any.whl Python 3 none any Details for zongyuan_axiom-0.2.0-py3-none-any.whl

Total release size: 15.9 kB

Release files / zongyuan_axiom-0.2.0.tar.gz

Download URL zongyuan_axiom-0.2.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
74f035ca30f2842ae760288d67559c9dea8e902861458c281eed131c0579a034
BLAKE2b-256 checksum
How to use checksums
75d8cac27770695a71ca72d56b06e22cb91f06e1d59c6ec18d22a787272ce6e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / zongyuan_axiom-0.2.0-py3-none-any.whl

Download URL zongyuan_axiom-0.2.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ef598ad3549dd383d46c1d8d72d815ef4a5c9b63f9057e4da9f7ca036b3de46
BLAKE2b-256 checksum
How to use checksums
c894cce23744a90c38d8f97a9b9ea3da403dc2627aa99b09c52df81db5b2f896
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for zongyuan-axiom 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page