lean4-htt/src/Lean
Wojciech Rozowski eb013fb90d
fix: construction of CompleteLattice instance for eta-reduced definitions (#10144)
This PR changes the construction of a `CompleteLattice` instance on
predicates (maps intro `Prop`) inside of
`coinductive_fixpoint`/`inductive_fixpoint` machinery.

Consider a following endomap on predicates of the type ` α → Prop`:
```lean4
def DefFunctor (r : α → α → Prop) (infSeq : α → Prop) : α → Prop :=
   λ x : α => ∃ y, r x y ∧ infSeq y
```
The following eta-reduced expression failed to elaborate:
```lean4
def def1 (r : α → α → Prop) : α → Prop := DefFunctor r (def1 r)
  coinductive_fixpoint monotonicity sorry
```

At the same time, eta-expanded variant would elaborate correctly:
```lean4
def def2 (r : α → α → Prop) : α → Prop := fun x => DefFunctor r (def2 r) x
  coinductive_fixpoint monotonicity sorry
```

This PR fixes the above issue, by changing the way how `CompleteLattice`
instance on the space of predicates is constructed, to allow for the
eta-reduced case, as outlined above.
2025-08-28 12:27:53 +00:00
..
Compiler perf: do not export opaque bodies (#10119) 2025-08-27 20:59:59 +00:00
Data test: sort messages (#10116) 2025-08-25 15:08:11 +00:00
DocString chore: error messages consistency (#10143) 2025-08-26 17:55:43 +00:00
Elab fix: construction of CompleteLattice instance for eta-reduced definitions (#10144) 2025-08-28 12:27:53 +00:00
ErrorExplanations feat: add explanations for large elimination errors (#9653) 2025-07-31 23:33:38 +00:00
Language feat: add a stop position field to the parser (#10043) 2025-08-23 18:29:51 +00:00
Linter feat: deprecate .toCtorIdx for .ctorIdx (#10113) 2025-08-25 14:32:05 +00:00
Meta fix: construction of CompleteLattice instance for eta-reduced definitions (#10144) 2025-08-28 12:27:53 +00:00
Parser chore: error messages consistency (#10143) 2025-08-26 17:55:43 +00:00
ParserCompiler chore: error messages consistency (#10143) 2025-08-26 17:55:43 +00:00
PrettyPrinter fix: pretty print dot notation for private definitions on public types (#10122) 2025-08-27 03:30:52 +00:00
Server refactor: port more of shell.cpp to Lean (#10086) 2025-08-26 20:02:42 +00:00
Util refactor: port more of shell.cpp to Lean (#10086) 2025-08-26 20:02:42 +00:00
Widget fix: do not allow access to private primitives in public scope (#9890) 2025-08-14 15:34:54 +00:00
AddDecl.lean perf: do not export opaque bodies (#10119) 2025-08-27 20:59:59 +00:00
Attributes.lean chore: use ofConstName in error messages (#10121) 2025-08-25 23:20:36 +00:00
AuxRecursor.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
BuiltinDocAttr.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Class.lean refactor: update and consolidate attribute-related error messages (#9495) 2025-07-26 02:03:18 +00:00
Compiler.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
CoreM.lean chore: error messages consistency (#10143) 2025-08-26 17:55:43 +00:00
Data.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Declaration.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
DeclarationRange.lean feat: default let rec and where decls to private under the module system (#9759) 2025-08-06 15:53:51 +00:00
DefEqAttrib.lean perf: clarify and granularize access to async env ext state (#9587) 2025-08-02 17:01:08 +00:00
DocString.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Elab.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
EnvExtension.lean feat: .ctorIdx for all inductives (#9951) 2025-08-25 10:47:06 +00:00
Environment.lean feat: deprecate .toCtorIdx for .ctorIdx (#10113) 2025-08-25 14:32:05 +00:00
ErrorExplanation.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
ErrorExplanations.lean feat: add explanations for large elimination errors (#9653) 2025-07-31 23:33:38 +00:00
Exception.lean chore: improve error message on trying to access an identifier imported privately from the public scope (#10153) 2025-08-27 13:43:56 +00:00
Expr.lean chore: minimize Lean.Expr import (#10112) 2025-08-25 13:35:21 +00:00
HeadIndex.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Hygiene.lean perf: make macro scope numbering less dependent on surrounding context (#10027) 2025-08-22 13:16:02 +00:00
ImportingFlag.lean chore: miscellaneous documentation typos (#10009) 2025-08-20 21:39:03 +00:00
InternalExceptionId.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
KeyedDeclsAttribute.lean chore: use ofConstName in error messages (#10121) 2025-08-25 23:20:36 +00:00
LabelAttribute.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Level.lean perf: normalizeLevels in grind (#9814) 2025-08-10 00:51:20 +00:00
Linter.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
LoadDynlib.lean fix: do not allow access to private primitives in public scope (#9890) 2025-08-14 15:34:54 +00:00
LocalContext.lean feat: clean up type annotations when elaborating declaration bodies (#9674) 2025-08-18 04:43:20 +00:00
Log.lean feat: add explanations for large elimination errors (#9653) 2025-07-31 23:33:38 +00:00
Message.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Meta.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
MetavarContext.lean perf: make macro scope numbering less dependent on surrounding context (#10027) 2025-08-22 13:16:02 +00:00
Modifiers.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
MonadEnv.lean chore: error messages consistency (#10143) 2025-08-26 17:55:43 +00:00
Namespace.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Parser.lean feat: adds rawIdent parser alias (#10085) 2025-08-23 17:24:33 +00:00
ParserCompiler.lean chore: error messages consistency (#10143) 2025-08-26 17:55:43 +00:00
PremiseSelection.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
PrettyPrinter.lean perf: shorten rebuild critical path by 19% (#9626) 2025-08-01 11:18:21 +00:00
PrivateName.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
ProjFns.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
ReducibilityAttrs.lean chore: use ofConstName in error messages (#10121) 2025-08-25 23:20:36 +00:00
Replay.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
ReservedNameAction.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
ResolveName.lean chore: error messages consistency (#10143) 2025-08-26 17:55:43 +00:00
Runtime.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
ScopedEnvExtension.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Server.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Setup.lean feat: deriving BEq, Hashable for Lean.Import (#10018) 2025-08-21 07:53:30 +00:00
Shell.lean refactor: port more of shell.cpp to Lean (#10086) 2025-08-26 20:02:42 +00:00
Structure.lean chore: error messages consistency (#10143) 2025-08-26 17:55:43 +00:00
SubExpr.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Syntax.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
ToExpr.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
ToLevel.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Util.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Widget.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00