lean4-htt/tests
Joachim Breitner 7fa7ec1887
fix: instantiate mvars after synthesizing inductive type header (#12558)
This PR fixes a `(kernel) declaration has metavariables` error that
occurred when a `by` tactic was used in a dependent inductive type index
that refers to a previous index:

```lean
axiom P : Prop
axiom Q : P → Prop
-- Previously gave: (kernel) declaration has metavariables 'Foo'
inductive Foo : (h : P) → (Q (by exact h)) → Prop
```

The root cause: `elabDepArrow` calls `mkForallFVars [h_fvar] body`
before the `by` tactic's metavariable `?m` is resolved. Since `h_fvar`
is in `?m`'s local context, `elimMVarDeps` creates a delayed assignment
`?newMVar #[h_fvar] := ?m`. After `synthesizeSyntheticMVarsNoPostponing`
assigns `?m := h_fvar`, `instantiateMVars` can resolve the delayed
assignment (substituting `h_fvar` with the actual argument, `bvar 0`, in
the pending value), yielding the correct type `∀ (h : P), Q (bvar 0) →
Prop`. The fix is to call `instantiateMVars` on the header type right
after `synthesizeSyntheticMVarsNoPostponing` in `elabHeadersAux`.

Fixes #12543.

🤖 This PR was created with [Claude Code](https://claude.ai/claude-code).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:29:33 +00:00
..
bench test: measure VC discharging separately in Sym mvcgen benchmarks (#12551) 2026-02-18 12:03:47 +00:00
bench-radar
compiler chore: remove orphaned *.expected.out files (#12357) 2026-02-06 17:05:43 +00:00
elabissues
ir
lake fix: lake: do not cache files already in the cache (#12537) 2026-02-18 02:36:54 +00:00
lean fix: instantiate mvars after synthesizing inductive type header (#12558) 2026-02-18 15:29:33 +00:00
pkg feat: add declaration name to leanchecker error messages (#12525) 2026-02-17 16:08:00 +00:00
playground
plugin
simpperf
.gitignore
CMakeLists.txt chore: remove outdated trust0 test (#12401) 2026-02-10 13:07:10 +00:00
common.sh
lakefile.toml
lean-toolchain