Skip to content

Commit 9262e11

Browse files
committed
update
1 parent c133609 commit 9262e11

2 files changed

Lines changed: 7 additions & 13 deletions

File tree

Mathlib/Lean/Expr/Basic.lean

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -513,12 +513,6 @@ where
513513
let allNotPx ← mkForallFVars #[x] notPx
514514
return (allNotPx, hAllNotPx)
515515

516-
/-- Given two levels `u v`, create `fun (α : Sort u) (β : α → Sort v) => ∀ (x : α), β x`. -/
517-
def mkLambdaForall (u v : Level) : Expr :=
518-
mkLambda .anonymous .default (.sort u) <|
519-
mkLambda .anonymous .default (mkForall .anonymous .default (.bvar 0) (.sort v)) <|
520-
mkForall .anonymous .default (.bvar 1) (mkApp (.bvar 1) (.bvar 0))
521-
522516
end Expr
523517

524518
/-- Get the projections that are projections to parent structures. Similar to `getParentStructures`,

Mathlib/Tactic/FunProp/Mor.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public import Mathlib.Init
99
public meta import Lean.Meta.CoeAttr
1010
public import Lean.Meta.CoeAttr
1111

12+
import Mathlib.Tactic.TypeStar
13+
1214
/-!
1315
## `funProp` Meta programming functions like in Lean.Expr.* but for working with bundled morphisms.
1416
@@ -31,6 +33,10 @@ open Lean Meta
3133

3234
namespace Meta.FunProp
3335

36+
/-- An abbreviation of `∀ x, p x`. It is used by `fun_prop` to represent Pi types as function
37+
applications and should not occur in any place other than the implementation of `fun_prop`. -/
38+
abbrev Forall {α : Sort*} (p : α → Sort*) := ∀ x, p x
39+
3440
namespace Mor
3541

3642
/-- Is `name` a coercion from some function space to functions? -/
@@ -136,9 +142,7 @@ where
136142
go (.app (.app c f) x) as
137143
| .app f a, as => go f (as.push { expr := a })
138144
| .forallE x t b bi, _ => do
139-
let u ← getLevel t
140-
let v ← withLocalDecl x bi t fun x => getLevel (b.instantiate1 x)
141-
k (.const `_Forall [u, v]) #[{ expr := t }, { expr := .lam x t b bi }]
145+
go (← mkAppM ``Forall #[.lam x t b bi]) #[]
142146
| f, as => k f as.reverse
143147

144148

@@ -163,10 +167,6 @@ def getAppArgs (e : Expr) : MetaM (Array Arg) := withApp e fun _ xs => return xs
163167

164168
/-- `mkAppN f #[a₀, ..., aₙ]` ==> `f a₀ a₁ .. aₙ` where `f` can be bundled morphism. -/
165169
def mkAppN (f : Expr) (xs : Array Arg) : Expr :=
166-
let f :=
167-
if f.isConstOf `_Forall then
168-
Expr.mkLambdaForall f.constLevels![0]! f.constLevels![1]!
169-
else f
170170
xs.foldl (init := f) (fun f x =>
171171
match x with
172172
| ⟨x, .none⟩ => (f.app x)

0 commit comments

Comments
 (0)