Expand description
Composition wires (§17, §19, §26 — legal_logic.md) — wiring existing real primitives into the legal-logic path:
- §17 ZK-gated eligibility — an obligation/permission gated on a zero-knowledge proof
(the proof itself is
zk_proofs::ZkProofSystem, real Groth16); this is the deontic gate over its verification result + selective disclosure of credential claims. - §26 proportionality — composes the CAS (
specialized_libs::symbolic_algebra): differentiate a harm expression, evaluate the marginal harm, and require it strictly below the advantage (the legal proportionality test). - §19 sense-translation gate — enforces the Curation Directive on cross-cultural
mapping: the machine may propose
skos:closeMatch; only a human attestsskos:exactMatch; an untranslatable concept routes to human review (never force-flattened).
Enums§
- Eligibility
- Whether a ZK-gated obligation/permission is eligible to apply.
- Match
Status - The status of a cross-cultural / cross-lexical mapping.
- Translation
- The result of translating a natural-language term to a machine-logic construct.
Functions§
- anchored_
to_ instrument - Is a legal composition anchored to a cited instrument at all? (A composition citing
0is ungrounded and must be routed to human review rather than asserted.) - composition_
valid - A composition (and its proportionality test) is valid only when it is anchored to an
established human-rights
instrument(a non-zero instrument hash) AND is proportionate. This is the structural bind: legal reasoning may not float free of a cited instrument, and a restriction must pass proportionality. (proportionateis theproportionality_metverdict.) - marginal_
harm - The marginal harm
d/d(wrt) harm_exprevaluated atat— parses + differentiates + evaluates viasymbolic_algebra.Noneif the expression won’t parse/evaluate. - proportionality_
met - Proportionality test: an act is proportionate iff its marginal harm is strictly less
than the
advantageit secures (∂Harm/∂x < Advantage).Noneif the harm model is unparseable. The legal proportionality / necessity calculus. - selective_
disclosure - Selective disclosure: reveal only the chosen
revealclaim ids out ofall_claims, intoout(the rest of the credential graph stays undisclosed). Returns the count. Zero-heap. - translate_
via_ matrix - Translate a natural-language term to its machine-logic construct via a
matrixof(nl_term_hash, machine_construct_hash)rows, gated by the Curation Directive: a mapping is only used ifhuman_attested(the machine may propose, but only a human ratifies a definitive NL→logic equivalence). An unmapped or unattested term routes to human review. - translation_
status - Enforce the Curation Directive on a sense mapping: a human attestation yields
ExactMatch; absent that, a machine proposal yieldsCloseMatch; an untranslatable concept (or nothing proposed) yieldsRequiresHumanReview. - zk_
eligibility - Gate an obligation on a ZK proof’s verification result (
O(p | ZK(...))). The proof is produced/verified byzk_proofs::ZkProofSystem(real Groth16); this maps that boolean to the deontic eligibility, keeping the attribute value itself private.