These modules extend the existing v2 template scenarios. Run ./check.sh lovejoin-any-tx;
its modules are also imported by Lovejoin.lean (the Lovejoin/Every/ ones below aren’t: run
./check.sh lovejoin-every). A Blaster Valid is an SMT result,
not a kernel proof term. The CEK controls are concrete checks, not a substitute for the
symbolic results. The template and its extracted bytes must still match the launch under
review, and transaction validity and execution budgets are ledger assumptions.
BoxPurposesAll.every_context_iff is a kernel-checked characterization of the
compiled mix_box template for every typed V3 ScriptContext and any template
parameter. It has no fixed limit on inputs or withdrawals. For a spending purpose,
it finds the first input whose encoded reference matches the spending reference. A
missing match errors; otherwise a non-inline or malformed box datum is recoverable,
while a well-formed inline box requires a withdrawal for the mix_logic script
credential. The withdrawal amount and all unrelated transaction fields are arbitrary.
All five non-spending purposes error. The theorem characterizes eventual CEK success;
ledger execution budgets can still reject a transaction before an eventual result.
The proof follows the compiled input and withdrawal loops by induction (BoxSearch
and WithdrawSearch), covers all inline datum shapes (BoxInlineAll), and connects
the result to typed ledger encodings (BoxCover, BoxSemantics). Its guarded axiom
check permits only propext, Classical.choice and Quot.sound; in particular it
does not use Blaster’s SMT axiom. BoxAllControls runs long concrete searches. The
16 shape lemmas in BoxMalformedShapes are generated by
python3 gen-lovejoin-box-shapes.py.
This is complete behavior for the individual mix_box script in this ledger model, not a proof of the whole protocol: actual safety still relies on the ledger running mix_logic for the withdrawal, on mix_logic’s own behavior, and on the applicable ledger and cryptographic assumptions.
PurposesKernel.reference_holder_every_context_errors also proves, with the same
allowed axioms, that the compiled reference holder errors for every typed V3 script
context. PurposesKernel additionally proves that mix_logic, one_shot_mint and
fee_contract reject their unsupported purposes, with arbitrary transaction fields
and purpose payloads. LogicPublishKernel.publish_iff_registration characterizes
mix_logic publishing over arbitrary raw certificate data: only constructor-zero
certificates pass. Its withdrawal handler and one_shot_mint’s mint handler are
characterized in Lovejoin/Every/ (below).
Lovejoin/Every/)Lovejoin.Every.Readable.mix_logic_accepts_iff characterizes the compiled mix_logic
template, at any pool NFT policy and the name lovejoin (the one every v2 launch mints), for
every typed V3 ScriptContext whose reference inputs’ values the ledger accepts: it returns unit exactly when mixLogicAccepts holds, in the Aiken
source’s terms.
withdrawOk. The redeemer is an Owner or a Mix, and
read_reference_datum finds the reference datum. An Owner then needs validate_owner
(validateOwner): at least one box, and each box’s proof passes schnorr.ak’s verify
against ctx. A Mix needs validate_mix (validateMix): at least two boxes and as many
proofs, then walk_outputs (walkOutputs), then at most 255 boxes, then each box’s proof
passes sigma_or.ak’s verify_pre (verifyPre).RegisterCredential.Lovejoin.Every.Readable.one_shot_mint_accepts_iff does the same for one_shot_mint, at any
seed and reference holder, for every context whose mint and output values the ledger accepts.
A mint passes by launchOk:
output_at_reference_holder (the holder’s script, no stake
credential, no reference script, one of the token) has an inline ReferenceDatum;lovejoin, the quantity 1, and the datum passes datum_sane
and token_sane.Every other purpose errors. Run ./check.sh lovejoin-every (16 GB, 30 min per module by
default). How these proofs are built, and how to change one: Lovejoin/Every/README.md.
Those two are the results to cite: their hypotheses are value rules the ledger enforces. The
_valid forms take the ledger model’s whole validScriptContext instead, which is stricter than
the ledger. Its isBalanced has no term for deposits, refunds, withdrawals or treasury
donations, so it rejects every real RegisterCredential (a deposit) and every Owner or Mix
whose transaction withdraws a non-zero reward balance, pays a deposit, takes a refund or
donates; the _valid forms say nothing about those.
These are kernel-checked, with no list-length bound and no step limit: the guarded axiom checks
permit only propext, Classical.choice and Quot.sound. The method differs from the
Blaster families above, in two layers:
Data, none for the script’s error, in the compiled evaluation order. One CEK theorem per
region says the program computes it, both directions at once; loops are by induction over
their lists. Lovejoin.Every.every_context_iff and mint_every_context_iff put them
together as withdrawResult and launchResult: what the bytes do, written as Lean.Readable*.lean restates those functions over the ledger’s typed
TxInfo, one Aiken function at a time (readReferenceDatum,
collectWellFormedMixInputs, validateOwner, RefDatum.boxValue, outputAtScript,
walkOutputs, verifyPre, validateMix, launchOk, datumSane), and proves each equal
to the raw function on IsData.toData of the typed value. walkOutputs_eq reads
walk_outputs whole: at least n outputs, each of the first n a box out, none after them
passing output_at_script.What the restatement makes visible:
uncompress(compress(A')), not A' (branchHolds). No crypto
fact is assumed to remove it.box_value’s edges, as the bytes have them. No ADA entry at box_lovelace = 0, and no
token at token_quantity = 0. one_shot_mint’s datum_sane rules both out at launch.valueOf (ReadableBase.lean). Nothing
else about the transaction is assumed.The same limits as above apply: IOG’s CEK model, on our fork; the crypto builtins,
serialise_data, byteStringToInteger and xorByteString opaque (serialise_data and
xorByteString through our PlutusCoreBlaster fork’s aliases, byteStringToInteger upstream’s
too), so a result holds for any interpretation of them, which says what the bytes check, not
that the crypto is hard to break; eventual CEK success, not execution budgets. The rest of
where the claim stops is in CLAIMS.md.
The complete results above supersede this section’s partial ones, which stay as independent cross-checks.
LogicLength.length_all proves the compiled list-length loop for arbitrary data
lists. LogicInputRefs.ledger_refs proves that the Owner input-reference traversal
returns every typed input reference in order. The Owner proof parser and both levels
of the Mix proof parser are proved for arbitrary lengths, including an error
continuation for arbitrary raw Mix proof and branch data.
LogicProofPairs.wrapper_all_partial proves the compiled pairwise verification loop
for lists of arbitrary lengths and an arbitrary supplied verifier closure, including
verifier errors. Its success condition is equal list lengths and success of each
aligned verifier call (allPairsPartial_true_iff). This isolates the shared Owner/Mix
pairing loop; connecting the supplied closure to the actual cryptographic verifier
and the whole validator remains open.
LogicInputHelpers.supported_with_compiled_helpers proves that the compiled box-input
collector handles arbitrary interleavings and numbers of well-formed boxes, key inputs,
foreign-script inputs, and mix-script inputs with no datum or a datum hash. It keeps
the well-formed box datums in order. It also skips non-constructor inline data at the
mix script. This uses the actual compiled selector and byte classifier closures;
malformed constructor-shaped inline data and the connection to whole-validator
acceptance remain to be proved.
LaunchSeedSearch.search_ledger proves that the one-shot policy’s compiled seed
search finds exactly the matching output reference in any typed input list, with any
number of other inputs. LaunchSeedSlots provides an adapter for connecting it to the
validator. The general mint, output and datum checks and whole-validator composition
remain open; the seed-search lemma by itself does not establish launch correctness.
LaunchOutputSearch.search_all separately proves the compiled output traversal finds
the first match for an arbitrary output list, conditional on the result of its extracted
destination predicate. The destination predicate itself still needs a general proof.
LogicOwnerNoCarrier and LogicMixNoCarrier prove whole-validator rejection for
every raw proof list when no reference inputs exist, for any pool policy. Their
typed no-carrier variants cover arbitrary interleavings of empty-value and ADA-only
reference inputs when the NFT policy sorts after the empty ADA policy.
LogicOwnerShape proves independently that any successful typed Owner withdrawal
has a proof list made entirely of the expected two-bytestring encodings, for arbitrary
transaction fields. This is a structural result, not proof of ownership.
LogicMixShape proves that any successful Mix withdrawal has an outer proof list
where every proof contains exactly one branch list, including when malformed raw proofs
precede it. It does not yet establish the shape or cryptographic validity of every branch.
LogicPolicyLookup and LogicNameLookup prove the compiled ordered lookups for
arbitrary prefixes. LogicCarrierFilterExact proves that, for the represented asset
map layouts, the filter retains exactly the references with target NFT quantity one.
LogicWrongQuantity and LogicDuplicateCarrier connect this to the full validator for
any raw proof list. LogicVariableNecessary proves that successful Owner and Mix
withdrawals require exactly one such carrier even when each candidate has independently
varying map prefixes and suffixes. These results require the stated ordering assumptions
and an explicit target policy and name entry for each candidate; they do not cover every
possible reference-input value layout. LogicBadCarrierDatum proves that the sole
carrier must not have a missing or hashed datum, for either withdrawal and arbitrary
proof data in the same independently varying map family.
LogicCarrierCover combines target-present, absent-name and absent-policy search
shapes, including arbitrary unchecked map tails. LogicLedgerValueCover proves that
every reference input accepted by the V3 ledger model falls into this cover. Thus
LogicLedgerCarrier proves, for fully valid V3 contexts and arbitrary raw Owner or Mix
proof lists, that successful mix_logic execution requires a reference output containing
the target NFT entry at quantity one. LogicValueOf strengthens this to quantity one
according to the ledger model’s valueOf. LogicSortedValue and LogicLedgerUniqueness
connect that compiled search to the ledger model’s ordering rules: a successful Owner or
Mix execution with valid reference inputs requires exactly one actual reference input
with ledger valueOf equal to one for the NFT, for any raw proof list. This is a transaction-local
condition; it does not establish global NFT supply or the remaining authorization checks.
The cover classifies how the compiled ordered search behaves even for unsorted
unchecked tails; it does not claim those tails cannot contain duplicate keys.
LogicLedgerInline extends the carrier result to all ledger-valid reference values:
the unique NFT-bearing input must carry an inline datum. LogicInlineMalformed proves
that this datum must have a constructor shape, rejecting integers, bytestrings, lists and
maps for both Owner and Mix and arbitrary raw proof lists. Its constructor tag and fields
are not yet characterized, and this is not yet an authorization proof.
ReferenceHolderPersistence connects the reference holder’s compiled rejection to a
transaction-level consequence: an accepted transaction cannot consume an input at the
holder credential, assuming the ledger routes it to this exact script. The reference-specific
form additionally assumes correct UTxO resolution. This does not establish launch
correctness, chain-level persistence, or global NFT supply.
LogicBoxComposition joins this result to mix_box on the same TxInfo. A successful
well-formed box spend requires a matching withdrawal; if the explicitly assumed ledger
routing executes the specified mix_logic template successfully, the transaction must
contain a reference input whose ledger valueOf for the NFT is one. This is a necessary
condition, not yet a complete proof of Owner or Mix authorization. Of its five theorems, the four
about the NFT (owner_routed_box_spend_requires_nft, mix_routed_box_spend_requires_nft and their
_value_one forms) assume the spending context is one the ledger model fully accepts
(validScriptContext), so, as with the _valid forms above, they say nothing of a transaction
with a deposit, a refund, a non-zero withdrawal or a donation; the first, that a box spend needs
the withdrawal, assumes nothing. LogicLedgerUniqueness states the NFT condition under the
ledger’s rule for reference inputs alone (validReferenceInputs: sorted by output reference, each
value as the ledger forms it).
LogicProofBoundary proves both branches reject a non-constructor proof after any
structurally valid proof prefix, and LogicMixBoundary covers a non-constructor Mix
branch after arbitrary valid proof and branch prefixes. LogicLongControls and
LogicWrongQuantityControls exercise long proof lists and zero, one and multiple
carriers; these are concrete evaluator checks and do not assert ledger validity.
Within this family, the complete Owner and Mix proofs would still need general box-input
filtering, proof verification, Mix output traversal, and their connection to the whole
validator; Lovejoin/Every/ has them (above). Protocol-level composition, cryptographic
assumptions, ledger routing and execution budgets remain beyond the necessary-condition
theorem above.
| Module | Transaction cases |
|---|---|
FeePurpose |
The fee template rejects minting, rewarding, certifying, voting and proposing for arbitrary context fields. |
LogicEmpty |
Owner and Mix fail with a single key input, no box, no proofs, and one pool reference input; Mix also fails with a single possible box and no proofs. |
LogicControls |
A malformed, long proof exhausts a 5,000-step run and reaches error by 20,000 steps. |
OwnerOne |
One box and one key input: invalid proofs fail for arbitrary outputs and input references; a valid proof passes when the policy is nonempty. One carrier reference, with fixed value and datum fields. |
OwnerControls |
A real proof passes; a changed proof, output, or input reference fails. |
BoxGate |
One input precedes the box; no withdrawal, a different script, a matching script, and a key followed by the matching script. Also characterizes malformed byte pairs when no withdrawal exists. |
BoxBoundary |
Missing own input fails; no datum and a datum hash are recoverable; arbitrary input and withdrawal suffixes after matches. |
BoxSuffix |
One input and one different script withdrawal precede the matches, with arbitrary suffixes; no withdrawal with arbitrary inline data and arbitrary later inputs; key plus different script do not authorize the box. |
BoxDatum |
Any inline Data, with no withdrawals, is recoverable exactly when the datum is not a well-formed box. |
BoxControls |
Eleven concrete evaluator checks for authorized, unauthorized, malformed, non-inline and missing-input transactions. |
| Modules | Coverage added |
|---|---|
OwnerLayouts, OwnerTwo, Owner3, Owner4 |
Owner withdrawals with one box alone, a key before one box, or two to four boxes followed by a key. Output data and all input references are arbitrary; each well-formed box requires its own proof, the correct proofs pass, and the two-to-four box layouts reject a missing proof. |
OwnerIff, MixIff |
Kernel-checked assembly of the one- and two-box Owner and the two-box ADA and token Mix success/failure results into iff statements. The components still rely on Blaster. |
OwnerOtherInputs |
One box plus a script input with a datum hash, in either order. The script hash may be mix_box’s; the other input is skipped as a box but its reference is bound into the Owner proof. |
Reference |
Missing, foreign, wrong-name, wrong-quantity, non-inline and duplicate carriers fail in the single-box Owner layout. An extra ADA-only reference before or after the carrier preserves the proof check. |
MixTwo, MixTokenTwo |
ADA and token Mixes with two boxes, a key input, two box outputs and a key output. Both challenges and all four branches are required, and the correct proofs pass, while input references and the uninspected transaction fields vary. |
MixAda3, MixAda4, MixToken3, MixToken4 |
Three- and four-box ADA and token Mixes with a key input and output. Every challenge and branch is required, valid proofs pass, and all uninspected transaction fields and input references vary. |
MixAda3Output, MixAda4Output, MixToken3Output, MixToken4Output |
In those layouts, changing the value of any prefix box output fails. The token families check exact value, covering token identity, quantity and extra assets. |
MixOutputs, MixTokenOutputs |
In those layouts either box output with the wrong value fails. The ADA family also rejects wrong credentials, a stake part or reference script, missing or hashed datums, and a third box output. The token-value theorem covers policy, name, quantity and extra assets through exact value equality. |
FeeMix |
Both validators execute over one shared three-box ADA Mix transaction that spends a fee shard. It has a zero withdrawal, both redeemers and one fee output: wrong fees fail fee_contract, every failed Mix challenge or branch fails mix_logic, and both pass under the stated assumptions. The accompanying controls demonstrate that either script can reject while the other passes. |
FeeSpend, FeeRecovery |
Fixed shard layouts with arbitrary uninspected transaction fields: exact fee and cap, Mix redeemer and at least three boxes, and strictly increasing replenishment. On either recognized redeemer, a missing or byte-string resolved datum is recoverable. |
Launch |
The one-input, one-output launch layout with arbitrary uninspected transaction fields and mint redeemer: seed, NFT name and amount, destination, unique name and reference datum checks. |
The accompanying *Controls modules run passing vectors and changed transactions, and each
failure builder at its passing point, where it passes, so a failure comes from what it changes
(the root README’s rule 3). FalsifiedBox and FalsifiedOwner hold a negative control for the
box, reference, launch and one- and two-box Owner families: each family’s first theorem with the
outcome turned around, which Blaster must falsify (rule 8). A control probes only the builder it
names, so they reach 11 of those families’ 32 builders, one a family. The Mix families, Owner3
and Owner4 have none yet: posed the same way, Owner3’s and Owner4’s came back Undetermined
in the solver’s 540 seconds, and the Mix families’ runs are longer still. Nor has
Template.AnyTxPurposes (16 builders), whose statements are kernel-checked again in
PurposesKernel and LogicPublishKernel. fee_contract’s families have none.
Owner3 and Owner4 are generated by python3 gen-lovejoin-anytx-owners.py. The
three- and four-box Mix families and their controls are generated by
python3 gen-lovejoin-anytx-mixes.py and python3 gen-lovejoin-anytx-mix-outputs.py.
The fee recovery behavior applies to the datum delivered to the spend handler: a hash
with a witness and an inline datum can both resolve to it. These are explicit scenario
families; their carrier, input and output list shapes remain fixed except where stated.
The input search cases with a prior input assume its reference differs from the spent
reference. Every other TxInfo field, the redeemer, resolved datum, values and addresses
that the relevant case does not inspect are arbitrary Data. Some scenario proofs also quantify over arbitrary list suffixes. The separate
kernel-checked mix_box result above covers arbitrary numbers of preceding inputs and
withdrawals. A gate acceptance only establishes that
mix_box lets the spend through; safety also requires the ledger to invoke mix_logic for
the withdrawal and mix_logic itself to accept the corresponding proof and outputs.
The complete results above supersede this section too: mix_logic_accepts_iff is the
whole validator, Owner and Mix, and one_shot_mint_accepts_iff the whole launch, with no
list bound. What follows stays as independent cross-checks.
LogicOwnerBoundaryPartial joins the compiled Owner count gates, transaction hash,
and pairwise Schnorr verifier for arbitrary-length aligned lists at an internal
execution boundary. A true result there requires at least one box, the same number
of proofs and boxes, and a successful Schnorr equation for every pair, bound to
all input references, all outputs and the mix-script hash. Its verifier model
covers arbitrary point and scalar bytes: invalid encodings or scalar values cause
an error. The theorem still assumes the relevant execution environment, transaction
hash, collected boxes, and aligned constructor shapes; it is not yet a theorem
from full-validator success.
LogicInputExtended covers key inputs, foreign scripts, missing and hashed
datums, and every form of inline datum, including malformed constructors and
invalid point lengths. LogicInputCover proves that every typed V3 ledger input
list has an order-preserving representation in this model and connects it to the
compiled collector wrapper. LogicOwnerShapesJoin combines that input cover with
whole-validator Owner acceptance to derive the aligned datum and proof shapes.
These results still need to be connected to the Owner boundary as part of a single
whole-validator execution proof. LogicOwnerEntry proves that the compiled collector/dispatch junction reaches
the Owner prologue on an arbitrary CEK stack, and LogicOwnerProgramBoundary
connects acceptance of the surrounding program to the transaction-bound proofs.
That program-level theorem still assumes that execution reaches the junction,
that its environment has the specified values, and that its continuation rejects
false; those hypotheses are not yet proved from full-validator execution.
The launch seed and output search loops have unbounded subterm proofs here; the
whole launch is one_shot_mint_accepts_iff’s (above), not this family’s. A direct
whole-launch seed proof in one module needs more than 16 GB: it has to be split, as
Lovejoin/Every/’s Mint* modules are. This family’s Mix proof and output checks
stay bounded to the stated layouts.
For mix_box, mix_logic, one_shot_mint and reference_holder, the complete results above
leave no transaction layout to cover: the scenario families here, with their fixed input,
reference and output layouts, stay as cross-checks. fee_contract has no such result, only
its rejected purposes (FeePurpose, PurposesKernel) and fixed layouts (FeeMix,
FeeSpend and FeeRecovery here, more in Template/ and Audit/), and it’s out of the
claim: no Seedelf transaction uses it. The audit suites add more layouts, but their own
status and assumptions need checking before relying on them. These proofs say what each
script checks, not that the cryptography can’t be broken, within the limits
CLAIMS.md states.
These were test or proof targets, not results. Whether mix_box, mix_logic and one_shot_mint
accept, in any transaction the ledger can form, is now the complete results above, so the
rows stay as cross-check targets, and the Fee shard rows as fee_contract’s, which is out
of the claim. Some have narrower counterparts in the existing V2/ and Audit/ modules;
the purpose here is to vary their surrounding transaction and ordering, then check the
results against those modules’ actual hypotheses.
The broader one-box Mix statement with an arbitrary proof was falsified when it required
isUnsuccessful (an error state) within 5,000 steps. The solver gave a long proof in a
malformed context. LogicControls reconstructs that proof: the evaluator is still running
at 5,000 steps and errors by 20,000. This illustrates the step bound for that instance; it
does not prove that all arbitrary proof payloads are rejected.
The rule for every Lovejoin proof, this folder’s and every other one under Lovejoin/:
concrete/ does.SECURITY.md says, and to no one else.serialise_data alias on our forks and upstream. A fix that a finding motivated waits
with the finding.