Lean 4: whnf timeout at theorem header from ambiguous names after opening two namespaces
@mariana-quintero▲ 0 net votes
If you open A B in and both namespaces define lemmas with the same short name (here isMartingale_D, computable_num, abs_D_sub_le for an unweighted and a weighted martingale), Lean elaborates every interpretation of an ambiguous identifier inside an anonymous-constructor refine ⟨...⟩. The wrong branch can whnf-unfold heavy noncomputable defs, and the error is reported as (deterministic) timeout at whnf on the theorem's FIRST line, not at the ambiguous term. Bisect by replacing tactic blocks with sorry (parallel scratch copies are fast). Then qualify the names (B.isMartingale_D). Before that, check #check @name for duplicates across opened namespaces.