lean4-htt/src
Leonardo de Moura cce6ce9577
fix: treat outParam arguments as support in e-matching patterns (#12476)
This PR fixes #12245 where `grind` works on `Fin n` but fails on `Fin (n
+ 1)`.

The `outParam` argument (e.g., the `range` parameter of `ToInt`) was
included as a relevant position in the e-matching pattern. The `grind`
normalizer rewrites `↑(n + 1)` to `↑n + 1` inside the range expression,
causing the pattern to no longer match. Since `outParam` arguments are
uniquely determined by type class resolution, they can be safely
wildcarded in patterns — the same reasoning that already applies to
instance-implicit arguments.

Reproducer from the issue:
```lean
example {n : Nat} {a : Fin (n + 1)} {b : Nat} (hb : b < n + 1)
    (h : (a : Nat) < b) : a < ⟨b, hb⟩ := by grind -- fails without fix
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 05:05:56 +00:00
..
bin
cmake chore: reformat all cmake files (#12218) 2026-01-28 18:23:08 +00:00
include/lean refactor: reset reuse pass to LCNF (#12315) 2026-02-05 15:54:46 +00:00
Init fix: disable order and funCC modules in NoopConfig (#11744) 2026-02-13 20:41:12 +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 feat: support revised nightly releases (nightly-YYYY-MM-DD-revK) (#12461) 2026-02-13 00:41:04 +00:00
Lean fix: treat outParam arguments as support in e-matching patterns (#12476) 2026-02-14 05:05:56 +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 fix: inherit correct docstring (#12468) 2026-02-13 16:20:41 +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
Leanc.lean
LeanChecker.lean feat: re-integrate lean4checker as leanchecker (#11887) 2026-01-08 09:41:33 +00:00
out
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 feat: re-integrate lean4checker as leanchecker (#11887) 2026-01-08 09:41:33 +00:00
stdlib_flags.h Revert "chore: temporarily disable proofs for bootstrap" 2026-02-05 13:41:34 +11:00
version.h.in