lean4-htt/src
Luisa Cicolini bc032eec8d
feat: add BitVec.sdivOverflow definition and lemmas for overflow in signed and unsigned division (#7671)
This PR contains the theorem proving that signed division x.toInt /
y.toInt only overflows when `x = intMin w` and `y = allOnes w` (for `0 <
w`).
To show that this is the *only* case in which overflow happens, we refer
to overflow for negation
(`BitVec.sdivOverflow_eq_negOverflow_of_neg_one`): in fact,
`x.toInt/(allOnes w).toInt = - x.toInt`, i.e., the overflow conditions
are the same as `negOverflow` for `x`, and then reason about the signs
of the operands with the respective theorems.
These BitVec theorems themselves rely on numerous `Int.ediv_*` theorems,
that carefully set the bounds of signed division for integers.

co-authored by @bollu, @tobiasgrosser
2025-04-24 15:27:18 +00:00
..
bin feat: API to avoid deadlocks from dropped promises (#6958) 2025-02-07 15:33:10 +00:00
cmake chore: fix spelling mistakes (#7328) 2025-04-07 01:15:48 +00:00
include/lean chore: clarify m_cs_sz use with mimalloc (#8058) 2025-04-23 07:39:01 +00:00
Init feat: add BitVec.sdivOverflow definition and lemmas for overflow in signed and unsigned division (#7671) 2025-04-24 15:27:18 +00:00
initialize fix: explicitly initialize Std in lean_initialize (#4668) 2024-07-06 13:17:30 +00:00
kernel fix: reducing Nat.pow, kernel interprets constant as Nat literal (#8060) 2025-04-23 13:55:20 +00:00
lake chore: do not use the coercion α → Option α in Init and Std (#8085) 2025-04-24 13:35:01 +00:00
Lean fix: simp?! and variants to do auto-unfolding (#8076) 2025-04-24 14:04:39 +00:00
library feat: allow use of experimental module system in Init (#7919) 2025-04-22 09:09:27 +00:00
runtime feat: enable experimental module system in Init (#8047) 2025-04-23 17:21:33 +00:00
shell fix: lake: import-related bugs (#8026) 2025-04-19 21:02:38 +00:00
Std feat: add BitVec.sdivOverflow definition and lemmas for overflow in signed and unsigned division (#7671) 2025-04-24 15:27:18 +00:00
util feat: allow use of experimental module system in Init (#7919) 2025-04-22 09:09:27 +00:00
cadical.mk feat: ship cadical (#4325) 2024-08-23 09:13:27 +00:00
CMakeLists.txt chore: fix reldebug preset (#8051) 2025-04-23 10:05:11 +00:00
config.h.in perf: use mimalloc by default (#7710) 2025-03-30 22:40:41 +00:00
githash.h.in
Init.lean feat: allow async elab tasks to contribute to info trees reported to linters and request handlers (#7457) 2025-03-13 15:09:00 +00:00
lakefile.toml.in chore: lake: bootstrap Lean include directory (#7967) 2025-04-15 23:15:53 +00:00
lean-toolchain doc: VS Code dev setup (#2961) 2023-11-30 08:35:03 +00:00
Lean.lean refactor: split Lean.EnvironmentExtension from Lean.Environment (#7794) 2025-04-02 16:19:12 +00:00
lean.mk.in chore: USE_LAKE: integrate into CMake (#4466) 2025-03-15 08:58:01 +00:00
Leanc.lean feat: expose flags for the bundled C compiler (#4477) 2024-06-22 01:23:33 +00:00
Std.lean chore: test that there are no orphaned modules (#8082) 2025-04-24 11:55:07 +00:00
stdlib.make.in chore: remove lakefile copy in root and tests/ (#8054) 2025-04-22 16:03:12 +00:00
stdlib_flags.h refactor: WF: add eq_def theorem for ._unary (#8063) 2025-04-24 09:59:08 +00:00
version.h.in feat: language reference links and examples in docstrings (#7240) 2025-03-12 09:17:27 +00:00