Accompanies QEDGen/solana-skills#12.
Single-finding followup on v2.7.1 F5 (axiom emission for uninterpreted
helpers in Expr::App position). The axioms now land — but they emit as
→ Prop and requires position needs a computable, Decidable guard,
so lake build rejects the transition function.
| File | Role |
|---|---|
repro-f5-axiom-decidability.qedspec |
13-line minimal repro. Handler with requires foo(state.c) else E and a non-empty effect. |
Spec.generated.lean |
Full generated Lean from the repro — shows axiom foo : Nat → Prop at line 15 and the if-guard at line 27 that can't resolve Decidable. |
lake-build-error.txt |
Full lake build output for copy-paste reference. |
QEDGEN="$HOME/.agents/skills/qedgen/tools/qedgen"
mkdir repro && cd repro && git init -q
cp ../repro-f5-axiom-decidability.qedspec spec.qedspec
"$QEDGEN" init --name ReproF5 --spec spec.qedspec --output-dir .
"$QEDGEN" codegen --lean --lean-output Spec.lean
rm -rf programs
lake buildExpected output (excerpt):
error: Spec.lean:27:2: failed to synthesize instance of type class
Decidable (s.status = Status.Active ∧ foo s.c)
lean_gen.rs emits uninterpreted helpers as:
axiom foo : Nat → Proprequires clauses lower to the transition's if-guard:
def hTransition (s : State) (signer : Pubkey) : Option State :=
if s.status = Status.Active ∧ foo s.c then -- ← needs Decidable
some { s with c := 1 }
else noneaxiom … → Prop is opaque and has no Decidable instance, so Lean
rejects the if-expression. open Classical + Classical.propDecidable
moves past that but makes the definition noncomputable, which
applyOp / applyOps pattern-matching downstream doesn't accept.
- Emit as
→ Boolinstead of→ Prop— auto-decidable,if-guards work naturally. Shortest diff. My recommendation. - Pair each axiom with a
Decidableinstance — typechecks viaClassical.propDecidablebut noncomputable; breaks downstreamapplyOpuse. Not viable. - Emit both a
Propaxiom (for proofs) and aBoolcompanion (for lowering) with a reflection axiom tying them together. Richer but heavier scaffolding.
- qedgen v2.7.1 (release binary, sha256-verified)
- Lean 4.15.0 / Lake 5.0.0-1165156