lean4-htt/src
Leonardo de Moura f8cdb03352
fix: add CommRing.Expr.intCast k and CommRing.Expr.natCast k (#9670)
This PR add constructors `.intCast k` and `.natCast k` to
`CommRing.Expr`. We need them because terms such as `Nat.cast (R := α)
1` and `(1 : α)` are not definitionally equal. This is pervaise in
Mathlib for the numerals `0` and `1`.

```lean
import Mathlib

example {α : Type} [AddMonoidWithOne α] : Nat.cast (R := α) 0 = (0 : α) := rfl -- not defeq
example {α : Type} [AddMonoidWithOne α] : Nat.cast (R := α) 1 = (1 : α) := rfl -- not defeq
example {α : Type} [AddMonoidWithOne α] : Nat.cast (R := α) 2 = (2 : α) := rfl -- defeq from here
-- Similarly for everything past `AddMonoidWithOne` in the Mathlib hierarchy, e.g. `Ring`.
```
2025-08-01 19:35:13 +00:00
..
bin
cmake
include/lean perf: inline lean_inc_ref_cold (#4978) 2025-06-27 15:58:00 +00:00
Init fix: add CommRing.Expr.intCast k and CommRing.Expr.natCast k (#9670) 2025-08-01 19:35:13 +00:00
initialize feat: remove the old compiler (#9275) 2025-07-09 06:00:46 +00:00
kernel perf: add missing std::moves (#9107) 2025-07-01 12:39:12 +00:00
lake fix: lake: use server header for workspace modules (#9559) 2025-08-01 05:08:44 +00:00
Lean fix: add CommRing.Expr.intCast k and CommRing.Expr.natCast k (#9670) 2025-08-01 19:35:13 +00:00
library chore: remove unused FnBody.mdata constructor (#9564) 2025-07-26 15:20:13 +00:00
runtime fix: handle NUL bytes in IO functions (#9616) 2025-08-01 06:12:53 +00:00
shell
Std chore: library style cleanup (#9654) 2025-07-31 21:28:59 +00:00
util chore: have shell.cpp use library/util.h rather than library/compiler… (#9269) 2025-07-09 01:41:04 +00:00
cadical.mk
CMakeLists.txt chore: disable artifacts cache for building stage2+ (#9482) 2025-07-23 08:44:08 +00:00
config.h.in
githash.h.in
Init.lean chore: module-ize Init.lean 2025-06-29 16:52:13 +02:00
lakefile.toml.in chore: benchmark using USE_LAKE (#9361) 2025-07-17 18:44:29 +00:00
lean-toolchain
Lean.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
lean.mk.in
Leanc.lean
Std.lean feat: Upstream MPL.SPred.* from mpl (#8928) 2025-06-26 11:15:11 +00:00
stdlib.make.in chore: benchmark using USE_LAKE (#9361) 2025-07-17 18:44:29 +00:00
stdlib_flags.h chore: remove old documentation site (#7974) 2025-05-14 14:31:33 +00:00
version.h.in