Skip to main content

Crate pr4xis

Crate pr4xis 

Source
Expand description

§pr4xis — Axiomatic Intelligence

Substrate crate for the pr4xis runtime. Defines the core traits that every domain ontology composes against:

  • category::Arrow — directed structure between concepts, carrying a relation-kind tag and per-instance provenance. Grounded in Mac Lane (1971) Categories for the Working Mathematician Ch. I §1 and Awodey (2010) Category Theory 2nd ed.
  • category::Concept — closed-world enum of named objects in a category. Grounded in Guarino (2009) What is an Ontology?
  • logic::Axiom — verifiable claim returning a typed logic::proof::Verdict (Ok = Proof witness, Err = Counterexample refutation, per Martin-Löf 1984). Required companion: logic::Axiom::citation — every axiom traces to published literature.
  • ontology::Ontologytype Cat, type Qual, and fn axioms(). Structural axioms come from ontology::reasoning::structural_axioms_for (the catalog).

Authoring shortcut: the ontology! proc macro takes a declarative shape (name, source, concepts, labels, is_a: / has_a: / causes: / opposes: sugar clauses, optional inline axioms: block) and emits the full impl chain at compile time.

See docs/understand/architecture.md for the layered design and docs/learn/get-started.md for a guided walk-through.

Re-exports§

pub use entity_ref::EntityRef;

Modules§

category
codegen_data
Ontology-agnostic data produced by codegen.
constitution
The Constitution — pr4xis’s five guarantees, and the machinery that binds the test suite to them.
engine
entity_ref
Typed const-constructable handles into an ontology corpus.
logic
ontology
xml_grammar
W3C XML 1.0 EBNF grammar — runtime types + parser for the Notation defined in Appendix B of the spec.

Macros§

adjunction
Declare an adjunction F ⊣ G, with Lemon-style metadata.
axiom_meta
Unified helper: write the meta() associated function for a hand-written impl Functor, impl Adjunction, or impl NaturalTransformation with a literature citation in one line. Replaces the three parallel helpers (functor_meta!, adjunction_meta!, natural_transformation_meta!) — all three cell-levels of Cat share one metadata shape now (issue #153).
constitution_coverage_gate
Emit this test binary’s registered tag set, for the completeness gate.
define_category
Define a kinded category with explicit relation types.
functor
Declare a functor between two categories, with Lemon-style metadata.
natural_transformation
Declare a natural transformation η: F ⇒ G, with Lemon-style metadata.
ontology
Define an ontology with compile-time validation and static code generation.
register_adjunction
Register a hand-written impl Adjunction for X into the ADJUNCTIONS slice — and its connection constructor into ADJUNCTION_CONSTRUCTORS.
register_axiom
Register a hand-written impl Axiom for X into the global AXIOMS distributed slice so the Lemon lexicon sees it without rewriting the impl block itself.
register_functor
Register a hand-written impl Functor for X into the FUNCTORS slice — and its connection constructor into FUNCTOR_CONSTRUCTORS, so the functor is serialized as a content-addressed Connection (mirrors register_axiom!’s constructor arm).
register_manual
Manually register an ontology’s Vocabulary into the global registry.
register_natural_transformation
Register a hand-written impl NaturalTransformation for X into the slice — and its connection constructor into NATURAL_TRANSFORMATION_CONSTRUCTORS.
register_praxis_value
Register a test’s constitutional guarantee(s) without an attribute.
relationship_meta

Attribute Macros§

praxis_value
Declare which constitutional guarantee(s) a test witnesses.