Skip to content

Commit

Permalink
WIP: failing test case for universe polymorphism in Arrow.lean
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkeizer committed May 23, 2024
1 parent 95acafe commit 35e4f2f
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions Test/Arrow.lean
Original file line number Diff line number Diff line change
@@ -1,16 +1,35 @@
import Qpf

universe u v w

/-- info: MvQPF.Arrow ?α : CurriedTypeFun 1 -/
#guard_msgs in
#check MvQPF.Arrow ?α

data Arrow (α : Type _) β
data Arrow (α : Type) β : Type u
| mk : (α → β) → Arrow α β

/-- info: Arrow : Type → CurriedTypeFun 1 -/
#guard_msgs in
#check (Arrow : TypeTypeType)

-- Types generated by `data` are not as polymorphic as they could/should be,
-- so the following does not yet work:
-- `#check (Arrow : Type 1 → Type 1 → Type 1)`
/-- info: Arrow.Shape : Type u → Type v → Type w → Type w -/
#guard_msgs in #check (Arrow.Shape : Type u → Type v → Type w → Type w)

/-- info: Arrow.Base : Type → TypeFun 2 -/
#guard_msgs in #check (Arrow.Base : Type → TypeFun.{u, u} 2)

#synth MvQPF (Arrow.Base _ : TypeFun.{0} 2)
-- ^^^ We know that the `Base` is a QPF for universe 0

#synth MvQPF (Arrow.Base _ : TypeFun.{1} 2)
-- ^^^ But, somehow we can't synthesize this fact for higher universes

#check (Arrow.Uncurried : Type → TypeFun.{1} 1)
-- ^^^ Which, presumably, is why `Uncurried` is *not* polymorphic



/-- info: Arrow : Type → CurriedTypeFun 1 -/
#guard_msgs in
#check (Arrow : TypeType u → Type u)

0 comments on commit 35e4f2f

Please sign in to comment.