File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,9 +135,8 @@ where
135135 go (.app (.app c f) x) as
136136 | .app f a, as => go f (as.push { expr := a })
137137 | .forallE x t b bi, _ => do
138- let u := (← inferType t).sortLevel!
139- let v := (← withLocalDecl x bi t fun x => do
140- return (← inferType (b.instantiate1 x)).sortLevel!)
138+ let u ← getLevel t
139+ let v ← withLocalDecl x bi t fun x => getLevel (b.instantiate1 x)
141140 k (.const `_Forall [u, v]) #[{ expr := t }, { expr := .lam x t b bi }]
142141 | f, as => k f as.reverse
143142
@@ -163,11 +162,11 @@ def getAppArgs (e : Expr) : MetaM (Array Arg) := withApp e fun _ xs => return xs
163162
164163/-- `mkAppN f #[a₀, ..., aₙ]` ==> `f a₀ a₁ .. aₙ` where `f` can be bundled morphism. -/
165164def mkAppN (f : Expr) (xs : Array Arg) : Expr :=
166- let fn :=
165+ let f :=
167166 if f.isConstOf `_Forall then
168167 Expr.mkLambdaForall f.constLevels![0 ]! f.constLevels![1 ]!
169168 else f
170- xs.foldl (init := fn ) (fun f x =>
169+ xs.foldl (init := f ) (fun f x =>
171170 match x with
172171 | ⟨x, .none⟩ => (f.app x)
173172 | ⟨x, some coe⟩ => (coe.app f).app x)
You can’t perform that action at this time.
0 commit comments