Skip to main content

inets-kernel

A Jupyter kernel for interaction nets, built on inets. Write a table of rules, draw a net, and watch it reduce.

pip install inets-kernel
python -m inets_kernel.install --sys-prefix     # into this Python environment; or --user
jupyter lab

Choose "Interaction nets" for a notebook. jupyter kernelspec uninstall inets removes the kernel again. The pictures need Graphviz's dot program; without it a cell shows the Graphviz text instead.

A cell is one of three things

A net. Equations between ports, written as the right-hand side of a rule is:

con (a b) = dup (era era)

con (a b) is a node and stands for its principal port. A name that is not an agent is a wire if it occurs twice and a free port if it occurs once. An agent with a parameter takes it after its name, as in atom 3. The net is drawn, reduced by the current schedule, and drawn again, with why it stopped and what it cost. The kernel starts with the table of the symmetric interaction combinators (con, dup, era).

A table. Lines beginning agent or rule are added to the current table, in the format of inets, and the table is checked:

agent zero +
agent succ + -
agent add  - - +

rule add (y r) >< zero
  => r = y
  count add

Commands, one to a line:

Command Does
%system NAME start from a bundled table (combinators, ski, lazy), or new for none
%table, %check, %rules show the current table; check it; list its rules, marking those that are not local
%schedule HOW stack (the default), queue, random, rounds, or need PORT: by need for the free port named PORT (default out), in a table with signs
%cap N stop a run after N interactions (default 10000)
%trace on / off with rounds, draw the net after each round, up to twelve
%ski TERM [--rounds | --lazy] reduce a term of S, K and I in prefix form, by need unless said
%demo one term, K I Ω, reduced three ways
%help this list

A net of more than 80 nodes is described, not drawn.

Notebooks

Three are in notebooks/ of the repository: the three rules of the combinators; a system of your own, for adding numbers; and one term reaching three ends.

Tests

pip install -e '.[test]'      # in kernel/, with inets installed
pytest

The tests run what a cell means without Jupyter, and one notebook through the kernel itself.

Licence

MIT.

Metadata

Release files for inets-kernel 0.1.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 inets-kernel 0.1.0
File Size Uploaded Provenance Actions
inets_kernel-0.1.0.tar.gz 12.4 kB Without provenance Details for inets_kernel-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for inets-kernel 0.1.0
File Interpreter ABI Platform Actions
inets_kernel-0.1.0-py3-none-any.whl Python 3 none any Details for inets_kernel-0.1.0-py3-none-any.whl

Total release size: 23.4 kB

Release files / inets_kernel-0.1.0.tar.gz

Download URL inets_kernel-0.1.0.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0a1e451217550533921b5c6eaff0aeb3c40ed297e5fd1777bbe3c131c1b39c36
BLAKE2b-256 checksum
How to use checksums
de069507bcb706aaa0ceb963516e83fc53df363b60c1ab5e580008d8310dc6b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release files / inets_kernel-0.1.0-py3-none-any.whl

Download URL inets_kernel-0.1.0-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b79a353087bad035a6ba826cac40160c78f32fca3a69fee750a1a0a2f667c869
BLAKE2b-256 checksum
How to use checksums
466e7bec5c2f9ad8d8516ccc7e0e8ad0d8a5cb646229fc1b5fff648dbadf0583
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Security for inets-kernel 0.1.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.

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