lean4-htt/src/Lean/Elab
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
..
Deriving feat: make delta deriving more robust and handle binders (#9800) 2025-08-10 21:21:54 +00:00
InfoTree refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
PreDefinition feat: default let rec and where decls to private under the module system (#9759) 2025-08-06 15:53:51 +00:00
Quotation refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Tactic feat: high-level order typeclasses (#9729) 2025-08-11 14:55:17 +00:00
App.lean feat: use name resolution for dot identifier notation (#9634) 2025-08-01 02:27:40 +00:00
Arg.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Attributes.lean refactor: update and consolidate attribute-related error messages (#9495) 2025-07-26 02:03:18 +00:00
AutoBound.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
AuxDef.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
BinderPredicates.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Binders.lean fix: mark __x patterns as impl details in match and intro (#9702) 2025-08-04 22:54:39 +00:00
BindersUtil.lean fix: mark __x patterns as impl details in match and intro (#9702) 2025-08-04 22:54:39 +00:00
BuiltinCommand.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
BuiltinEvalCommand.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
BuiltinNotation.lean fix: have unsafe term produce an opaqueDecl (#9819) 2025-08-10 09:30:55 +00:00
BuiltinTerm.lean fix: function field notation errors when head is an fvar (#9595) 2025-07-28 23:07:02 +00:00
Calc.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
CheckTactic.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Command.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
ComputedFields.lean feat: Add List.zipWithM and Array.zipWithM (#9528) 2025-07-28 08:39:52 +00:00
Config.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Declaration.lean fix: macros unfolding to multiple commands inside mutual (#9649) 2025-07-31 21:00:53 +00:00
DeclarationRange.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
DeclModifiers.lean feat: allow combining private/public and protected 2025-08-09 12:35:07 +02:00
DeclNameGen.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
DeclUtil.lean fix: more deriving handlers under the module system (#9647) 2025-07-31 15:00:58 +00:00
DefView.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Deriving.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Do.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
ElabRules.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
ErrorExplanation.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Eval.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Exception.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Extra.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Frontend.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
GenInjective.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
GuardMsgs.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Import.lean refactor: move import validation to parser & Lake (#9716) 2025-08-05 22:36:54 +00:00
Inductive.lean feat: allow combining private/public and protected 2025-08-09 12:35:07 +02:00
InfoTree.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
InfoTrees.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
InheritDoc.lean refactor: update and consolidate attribute-related error messages (#9495) 2025-07-26 02:03:18 +00:00
LetRec.lean feat: default let rec and where decls to private under the module system (#9759) 2025-08-06 15:53:51 +00:00
Level.lean chore: break up universe level error message (#9637) 2025-07-30 23:52:53 +00:00
Macro.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
MacroArgUtil.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
MacroRules.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Match.lean fix: mark __x patterns as impl details in match and intro (#9702) 2025-08-04 22:54:39 +00:00
MatchAltView.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
MatchExpr.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Mixfix.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
MutualDef.lean feat: make delta deriving more robust and handle binders (#9800) 2025-08-10 21:21:54 +00:00
MutualInductive.lean feat: allow combining private/public and protected 2025-08-09 12:35:07 +02:00
Notation.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Open.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
ParseImportsFast.lean refactor: move import validation to parser & Lake (#9716) 2025-08-05 22:36:54 +00:00
PatternVar.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
PreDefinition.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Print.lean chore: show @[expose] attribute in #print (#9722) 2025-08-05 15:59:49 +00:00
Quotation.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
RecAppSyntax.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
RecommendedSpelling.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
SetOption.lean feat: improve set_option error messages (#9496) 2025-07-26 02:04:45 +00:00
StructInst.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
StructInstHint.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Structure.lean feat: allow combining private/public and protected 2025-08-09 12:35:07 +02:00
Syntax.lean feat: Add List.zipWithM and Array.zipWithM (#9528) 2025-07-28 08:39:52 +00:00
SyntheticMVars.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Tactic.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Term.lean refactor: update built-in tactic error messages (#9633) 2025-07-31 14:16:57 +00:00
Time.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Util.lean perf: shorten rebuild critical path by 19% (#9626) 2025-08-01 11:18:21 +00:00
WhereFinally.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00