lean4-htt/src
Kim Morrison 642bcdf55a
fix: handle universe polymorphism in ground grind theorems (#12226)
This PR fixes a bug where `grind [foo]` fails when the theorem `foo` has
a different universe variable name than the goal, even though universe
polymorphism should allow the universes to unify.

The issue was in `instantiateGroundTheorem` (used for theorems with no
quantified parameters), which was passing `thm.proof` directly instead
of calling `getProofWithFreshMVarLevels`. This meant ground theorems
retained their original universe level params instead of getting fresh
level metavariables that could unify with the goal's universe levels.

Fixes
https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/grind.20fails.20because.20of.20universe.20variable.20name

🤖 Prepared with Claude Code

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-17 01:51:37 +00:00
..
bin
cmake chore: reformat all cmake files (#12218) 2026-01-28 18:23:08 +00:00
include/lean chore: delete commented code (#12498) 2026-02-16 10:27:46 +00:00
Init fix: add mem_eraseDups lemma for List deduplication (#11811) 2026-02-16 23:11:14 +00:00
initialize feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
kernel perf: cache unfold_definition in the kernel (#12259) 2026-01-31 03:44:50 +00:00
lake fix: type class resolution cache (#12286) 2026-02-15 03:07:15 +00:00
Lean fix: handle universe polymorphism in ground grind theorems (#12226) 2026-02-17 01:51:37 +00:00
LeanChecker feat: re-integrate lean4checker as leanchecker (#11887) 2026-01-08 09:41:33 +00:00
library refactor: don't use shared_timed_mutex when not required anymore (#12434) 2026-02-11 12:53:42 +00:00
runtime fix: handle 0 sized reads from handles correctly (#12466) 2026-02-13 10:56:00 +00:00
shell chore: move test suite setup to tests/CMakeLists.txt (#12278) 2026-02-03 13:22:20 +00:00
Std chore: cleanup backwards compat annotations in the LRAT checker (#12511) 2026-02-16 20:23:27 +00:00
util chore: update to c++20 (#12117) 2026-02-11 01:17:40 +00:00
cadical.mk
CMakeLists.txt chore: update to c++20 (#12117) 2026-02-11 01:17:40 +00:00
config.h.in
githash.h.in
Init.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
lakefile.toml.in feat: re-integrate lean4checker as leanchecker (#11887) 2026-01-08 09:41:33 +00:00
lean-toolchain
Lean.lean refactor: move getOriginalConstKind? into its own module to avoid future import cycle (#12265) 2026-02-01 16:18:51 +00:00
lean.mk.in chore: further split libleanshared on Windows to avoid symbol limit (#10136) 2025-08-26 16:01:57 +00:00
Leanc.lean fix: Unicode path support for Lean Windows executables (#10133) 2025-08-27 11:28:55 +00:00
LeanChecker.lean feat: re-integrate lean4checker as leanchecker (#11887) 2026-01-08 09:41:33 +00:00
out feat: ac normalization in grind (#10146) 2025-08-27 03:28:30 +00:00
Std.lean chore: more module system fixes and refinements for finishing batteries port (#10819) 2025-10-21 08:19:50 +00:00
stdlib.make.in perf: strip unneeded symbols from libleanshared* (#12060) 2026-02-16 22:48:20 +00:00
stdlib_flags.h Revert "chore: temporarily disable proofs for bootstrap" 2026-02-05 13:41:34 +11:00
version.h.in