Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lean/main/03_expressions.lean
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ def addOne : Expr :=
BinderInfo.default

def mapAddOneNil : Expr :=
mkAppN (.const ``List.map [levelOne, levelOne])
#[nat, nat, addOne, .app (.const ``List.nil [levelOne]) nat]
mkAppN (.const ``List.map [levelZero, levelZero])
#[nat, nat, addOne, .app (.const ``List.nil [levelZero]) nat]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the universe output differ from what's shown below a few lines down on line 304:

-- @List.map.{1, 1} Nat Nat (fun x => Nat.add x 1) (@List.nil.{1} Nat) : List.{1} Nat

I fully defer to the Zulip thread that this change is right though -- can you just update that line so its output now has the right universes in it as well, and then this should be good to merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about missing this and great you noticed! Updated.


/-!
With a little trick (more about which in the Elaboration chapter),
Expand All @@ -301,7 +301,7 @@ elab "mapAddOneNil" : term => return mapAddOneNil
set_option pp.universes true in
set_option pp.explicit true in
#check mapAddOneNil
-- @List.map.{1, 1} Nat Nat (fun x => Nat.add x 1) (@List.nil.{1} Nat) : List.{1} Nat
-- @List.map.{0, 0} Nat Nat (fun x => x.add 1) (@List.nil.{0} Nat) : List.{0} Nat

#reduce mapAddOneNil
-- []
Expand Down
Loading