You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a parent circuit composing several verified subcircuits, circuit_proof_start's one-shot simp only [circuit_norm, h_input, ...] at h_env can produce a rewrite cast the kernel cannot re-check: (kernel) deep recursion detected at the theorem header as soon as h_env is referenced.
The manual recipe that works (used in the Orchard scalar-mul entry circuit):
circuit_proof_start_core
dsimp only [main, circuit_norm] at h_env (definitional, so no cast)
bind each conjunct with have hX := h_env.2.….1 projections (an obtain re-embeds the giant tail in every casesOn motive — also kernel-fatal)
clear h_env
simp only [circuit_norm, h_input, <child circuits>] on each small component separately — each per-component cast is kernel-checkable.
It would be valuable to have a circuit_proof_start variant (or a flag) that applies this dsimp-then-project-then-per-component strategy to h_env automatically.
Even with the manual recipe, a big enough parent stays on a kernel size cliff; the durable fix is subcircuit boundaries (now documented in AGENTS.md and doc/performance-problems.md). This issue is about making the intermediate regime workable without manual surgery.
(Extracted from the retired doc/circuit-proof-friction.md feedback list.)
For a parent circuit composing several verified subcircuits,
circuit_proof_start's one-shotsimp only [circuit_norm, h_input, ...] at h_envcan produce a rewrite cast the kernel cannot re-check:(kernel) deep recursion detectedat the theorem header as soon ash_envis referenced.The manual recipe that works (used in the Orchard scalar-mul entry circuit):
circuit_proof_start_coredsimp only [main, circuit_norm] at h_env(definitional, so no cast)have hX := h_env.2.….1projections (anobtainre-embeds the giant tail in everycasesOnmotive — also kernel-fatal)clear h_envsimp only [circuit_norm, h_input, <child circuits>]on each small component separately — each per-component cast is kernel-checkable.It would be valuable to have a
circuit_proof_startvariant (or a flag) that applies this dsimp-then-project-then-per-component strategy toh_envautomatically.Notes:
h_envpressure considerably, so the cliff now hits later — but very large parents still sit on it.(Extracted from the retired doc/circuit-proof-friction.md feedback list.)
🤖 Generated with Claude Code