lean4-htt/tests
Eric Wieser ae1ab94992
fix: replace bad simp lemmas for Id (#7352)
This PR reworks the `simp` set around the `Id` monad, to not elide or
unfold `pure` and `Id.run`

In particular, it stops encoding the "defeq abuse" of `Id X = X` in the
statements of theorems, instead using `Id.run` and `pure` to pass back
and forth between these two spellings. Often when writing these with
`pure`, they generalize to other lawful monads; though such changes were
split off to other PRs.

This fixes the problem with the current simp set where `Id.run (pure x)`
is simplified to `Id.run x`, instead of the desirable `x`.
This is particularly bad because the` x` is sometimes inferred with type
`Id X` instead of `X`, which prevents other `simp` lemmas about `X` from
firing.

Making `Id` reducible instead is not an option, as then the `Monad`
instances would have nothing to key on.

---------

Co-authored-by: Sebastian Graf <sg@lean-fro.org>
Co-authored-by: Kim Morrison <kim@tqft.net>
Co-authored-by: Paul Reichert <6992158+datokrat@users.noreply.github.com>
2025-05-22 22:45:35 +00:00
..
bench chore: try refining some benchmark settings (#8377) 2025-05-16 11:24:11 +00:00
compiler feat: optimize lean_nat_shiftr for scalars (#8268) 2025-05-11 01:39:59 +00:00
elabissues
ir
lean fix: replace bad simp lemmas for Id (#7352) 2025-05-22 22:45:35 +00:00
pkg feat: do not export def bodies by default (#8221) 2025-05-15 12:16:54 +00:00
playground chore: adjust BEq classes (#7855) 2025-04-16 13:24:23 +00:00
plugin
simpperf
.gitignore
common.sh chore: normalize URLs to the language reference in test results (#7782) 2025-04-02 06:17:31 +00:00
lean-toolchain