lean4-htt/tests
Kim Morrison 1c1bd8e064
fix: handle dot notation on local variables in grind parameters (#11573)
This PR fixes `grind` rejecting dot notation terms, mistaking them for
local hypotheses.

When a grind parameter like `n.triv` is given, where `n` is a local
variable and `triv` is a theorem that takes `n` as an argument (so
`n.triv` means `Nat.triv n`), grind was incorrectly rejecting it with
"redundant parameter" because it detected that the identifier resolved
to a local variable via `resolveLocalName`.

The fix checks if `resolveLocalName` returns field projections
(non-empty list), indicating dot notation. In that case, we process the
parameter as a term expression to let elaboration resolve the dot
notation properly, rather than trying to resolve it as a global constant
name.

### Minimal reproducer

```lean
theorem Nat.triv (n : Nat) : n = n := rfl

example (n : Nat) : n = n := by
  grind [n.triv]  -- Previously: "redundant parameter `n.triv`"
```

This also fixes the issue where `grind [x.exp_pos]` was rejected even
though `x.exp_pos` elaborates to `Real.exp_pos x`, a valid theorem
application.

🤖 Prepared with Claude Code
2025-12-11 01:28:22 +00:00
..
bench feat: remove Finite conditions from iterator consumers relying on a new fixpoint combinator (#11038) 2025-12-08 16:03:22 +00:00
bench-radar chore: update and add benchmark metrics (#11420) 2025-11-28 14:40:43 +00:00
compiler chore: minor String API improvements (#11439) 2025-12-01 11:44:14 +00:00
elabissues
ir
lake refactor: lake: disambiguate packages by workspace index (#11500) 2025-12-09 02:07:24 +00:00
lean fix: handle dot notation on local variables in grind parameters (#11573) 2025-12-11 01:28:22 +00:00
pkg chore: switch the association of stored suggestions (#11590) 2025-12-10 21:42:05 +00:00
playground
plugin chore: re-enable tests (#10923) 2025-10-23 08:38:57 +00:00
simpperf
.gitignore
common.sh chore: make workspaceSymbol benchmarks modules (#11094) 2025-11-05 18:40:39 +00:00
lakefile.toml
lean-toolchain