Several circuit metadata fields rely on default tactics, but those defaults often fail when the circuit body is hidden behind a local main definition. During the SubcircuitsLawful spike, adding a narrow local unfold step:
try dsimp only [main]
simp only [circuit_norm]
made the default proof work for most circuits that previously needed explicit subcircuitsLawful fields. The number of remaining explicit proofs was surprisingly small and mostly limited to genuinely special cases, such as finite if trees, recursive circuits, or circuits whose proof needs unfolding of additional named helper mains.
We should investigate applying the same idea to other default fields, especially:
localLength_eq
output_eq
subcircuitsConsistent
- defaults in
ExplicitCircuit / ExplicitCircuits
The goal is not to make the defaults aggressive proof search. They should stay predictable and structural: unfold locally named circuit definitions such as main, then normalize with circuit_norm, and stop. This is similar in spirit to what circuit_proof_start already does for proof goals.
Things to check:
- Whether
try dsimp only [main] is sufficient in structure default-field contexts, or whether we should use a quoted/unhygienic identifier approach like the tactic code.
- Which existing explicit field proofs become unnecessary after adding local unfolding.
- Whether this causes timeout/regression in large circuits.
- Whether the behavior should live as a shared tactic/helper instead of being duplicated across default field proofs.
Success criterion: fewer boilerplate explicit metadata proofs, no broad conjunction-splitting defaults, and full lake build still passing.
Several circuit metadata fields rely on default tactics, but those defaults often fail when the circuit body is hidden behind a local
maindefinition. During theSubcircuitsLawfulspike, adding a narrow local unfold step:made the default proof work for most circuits that previously needed explicit
subcircuitsLawfulfields. The number of remaining explicit proofs was surprisingly small and mostly limited to genuinely special cases, such as finiteiftrees, recursive circuits, or circuits whose proof needs unfolding of additional named helper mains.We should investigate applying the same idea to other default fields, especially:
localLength_eqoutput_eqsubcircuitsConsistentExplicitCircuit/ExplicitCircuitsThe goal is not to make the defaults aggressive proof search. They should stay predictable and structural: unfold locally named circuit definitions such as
main, then normalize withcircuit_norm, and stop. This is similar in spirit to whatcircuit_proof_startalready does for proof goals.Things to check:
try dsimp only [main]is sufficient in structure default-field contexts, or whether we should use a quoted/unhygienic identifier approach like the tactic code.Success criterion: fewer boilerplate explicit metadata proofs, no broad conjunction-splitting defaults, and full
lake buildstill passing.