test: add test for binder caching issue
This commit is contained in:
parent
cadaecb40a
commit
d556ebbdc6
2 changed files with 27 additions and 0 deletions
23
tests/lean/binderCacheIssue.lean
Normal file
23
tests/lean/binderCacheIssue.lean
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
universes u v w
|
||||
|
||||
class Funtype (N : Sort u) (O : outParam (Sort v)) (T : outParam (Sort w)) :=
|
||||
pack : O -> N
|
||||
unpack : N -> O
|
||||
apply : N -> T
|
||||
|
||||
class LNot {P : Sort u} (L : P -> Prop) :=
|
||||
toFun : (p : P) -> Not (L p)
|
||||
|
||||
namespace LNot
|
||||
variable {P : Sort u} {L : P -> Prop}
|
||||
abbrev applyFun (K : LNot L) {p} := K.toFun p
|
||||
abbrev unpackFun (K : LNot L) := K.toFun
|
||||
instance isFuntype : Funtype (LNot L)
|
||||
((p : P) -> Not (L p)) ({p : P} -> Not (L p)) :=
|
||||
{pack := mk, unpack := unpackFun, apply := applyFun}
|
||||
end LNot
|
||||
|
||||
#check LNot.unpackFun
|
||||
#check LNot.isFuntype.unpack
|
||||
#check LNot.applyFun
|
||||
#check LNot.isFuntype.apply
|
||||
4
tests/lean/binderCacheIssue.lean.expected.out
Normal file
4
tests/lean/binderCacheIssue.lean.expected.out
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
LNot.unpackFun : LNot ?m → ∀ (p : ?m), ¬?m p
|
||||
Funtype.unpack : LNot ?m → ∀ (p : ?m), ¬?m p
|
||||
LNot.applyFun : LNot ?m → ∀ {p : ?m}, ¬?m p
|
||||
Funtype.apply : LNot ?m → ∀ {p : ?m}, ¬?m p
|
||||
Loading…
Add table
Reference in a new issue