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.
13 lines
503 B
Text
13 lines
503 B
Text
def DefFunctor (r : α → α → Prop) (infSeq : α → Prop) : α → Prop :=
|
||
λ x : α => ∃ y, r x y ∧ infSeq y
|
||
|
||
def def1 (r : α → α → Prop) : α → Prop := DefFunctor r (def1 r)
|
||
coinductive_fixpoint monotonicity sorry
|
||
|
||
def def2 (r : α → α → Prop) : α → Prop := fun x => DefFunctor r (def2 r) x
|
||
coinductive_fixpoint monotonicity sorry
|
||
|
||
def Set α := α → Prop
|
||
|
||
def def3 (r : α → α → Prop) : Set α := DefFunctor r (def3 r)
|
||
coinductive_fixpoint monotonicity sorry
|