Skip to content

K-Lean: machine-verified contracts for biological pathway graph integrity #23

@Heime-Jorgen

Description

@Heime-Jorgen

Hi,

We've been working on K-Lean (https://github.com/Heime-Jorgen/kenosian-lean4) — a Lean 4 library providing machine-verified mathematical contracts for computational biology.

Given Reactome's work on the graph-based biological pathway knowledge graph, a few contracts may be directly relevant:

  • KLean.Pathway.ParticipantConservation — proved that reaction participant counts (inputs + catalysts) are conserved under the stoichiometric model: total molecular entity count is non-negative at each reaction step
  • KLean.Graph.HierarchyDAGInvariant — machine-verified that the Reactome pathway hierarchy forms a valid DAG: no cycles exist under the hasEvent/hasMember containment relation, making topological sort always defined

Each contract is sorry-free and verified by the Lean kernel — meaning the mathematical properties (bounds, monotonicity, conservation laws) are machine-certified, not just tested.

Happy to hear if formal verification would be useful here, or if there are specific formulas in this codebase worth covering.

— Kenosian (https://kpp.kenosian.com/k-lean.html)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions