lean4-htt/src/Init/Data/Nat
Paul Reichert 0725349bbd
feat: high-level order typeclasses (#9729)
This PR introduces a canonical way to endow a type with an order
structure. The basic operations (`LE`, `LT`, `Min`, `Max`, and in later
PRs `BEq`, `Ord`, ...) and any higher-level property (a preorder, a
partial order, a linear order etc.) are then put in relation to `LE` as
necessary. The PR provides `IsLinearOrder` instances for many core types
and updates the signatures of some lemmas.

**BREAKING CHANGES:**

* The requirements of the `lt_of_le_of_lt`/`le_trans` lemmas for
`Vector`, `List` and `Array` are simplified. They now require an
`IsLinearOrder` instance. The new requirements are logically equivalent
to the old ones, but the `IsLinearOrder` instance is not automatically
inferred from the smaller typeclasses.
* Hypotheses of type `Std.Total (¬ · < · : α → α → Prop)` are replaced
with the equivalent class `Std.Asymm (· < · : α → α → Prop)`. Breakage
should be limited because there is now an instance that derives the
latter from the former.
* In `Init.Data.List.MinMax`, multiple theorem signatures are modified,
replacing explicit parameters for antisymmetry, totality, `min_ex_or`
etc. with corresponding instance parameters.
2025-08-11 14:55:17 +00:00
..
Bitwise chore: library style cleanup (#9654) 2025-07-31 21:28:59 +00:00
Div fix: change the proof of Nat.zero_mod to rfl (#9391) 2025-07-22 13:21:48 +00:00
Basic.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Bitwise.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Compare.lean chore: library style cleanup (#9654) 2025-07-31 21:28:59 +00:00
Control.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Div.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Dvd.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Fold.lean feat: default let rec and where decls to private under the module system (#9759) 2025-08-06 15:53:51 +00:00
Gcd.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Lcm.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Lemmas.lean chore: library style cleanup (#9654) 2025-07-31 21:28:59 +00:00
Linear.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Log2.lean chore: library style cleanup (#9654) 2025-07-31 21:28:59 +00:00
MinMax.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Mod.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Order.lean feat: high-level order typeclasses (#9729) 2025-08-11 14:55:17 +00:00
Power2.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Simproc.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
SOM.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00