Skip to main content

No project description provided

Project description

prop-logic-kernel

This repo contains:

  • Main.lean: a tiny proposition-logic tactic kernel wrapped in a REPL.run loop
  • py_repl/: a small Python package that can drive any REPL.run-based binary via stdin/stdout/stderr
  • py_prop_logic_kernel/: the Python package you publish; it parses the kernel output into structured steps such as goals_remaining

REPL protocol spec (REPL.run)

The executable produced by lake build (see .lake/build/bin/Main-lean) implements a simple line-based protocol driven by REPL.run in REPL/REPL.lean.

Each step:

  • stderr (error/status stream): write zero or more lines of status/errors.
    • In this repo, status lines are typically prefixed with -- (e.g. -- goals remaining 2).
  • stdout (output stream): write zero or more lines of “main output” (e.g. the rendered goal state).
  • stderr (prompt): write the prompt string (default > ) without a trailing newline.
  • stdin (input): read exactly one line (newline-terminated). That line is passed to the transition function.

Then the next step repeats forever.

Notes for clients

  • Do not assume stdout and stderr are synchronized; a robust client should read both streams until it observes the prompt on stderr.
  • Flush matters: REPL/REPL.lean flushes stdout/stderr after writes so subprocess-driven clients do not hang on buffered output.

AI-generated code disclaimer

The following files were written by Cursor AI:

  • py_prop_logic_kernel/__init__.py
  • py_prop_logic_kernel/repl.py
  • py_repl/__init__.py
  • py_repl/repl.py
  • PropLogicKernel/Parser.lean

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

py_prop_logic_kernel-0.0.2.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_prop_logic_kernel-0.0.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file py_prop_logic_kernel-0.0.2.tar.gz.

File metadata

  • Download URL: py_prop_logic_kernel-0.0.2.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for py_prop_logic_kernel-0.0.2.tar.gz
Algorithm Hash digest
SHA256 84a15af5dc92c4228dce13c257611adce5068f57b9b3211c038f5ca17f40a4e8
MD5 06ac3b30640e0406111feabc1d508c1a
BLAKE2b-256 9ab6fef691b5a299d4aace18710945f0d7707e6a9a60d799b57f52ed1b91e7aa

See more details on using hashes here.

File details

Details for the file py_prop_logic_kernel-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: py_prop_logic_kernel-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for py_prop_logic_kernel-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 57968753b6d8ef16ddefb8db2cfce575ffcc7367e6c4225bb86f8d1e67619133
MD5 268668f33db57118151d9dfa405c3fd5
BLAKE2b-256 8625da25318dc863ab292f47308c0ab862ab58d31c2a136685f76daaad9fd76d

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