chore: lean 3 behavior for apply
This commit is contained in:
parent
544a6cbb94
commit
5baa162713
3 changed files with 9 additions and 1 deletions
|
|
@ -399,6 +399,9 @@ def elimMVarDeps (xs : Array Expr) (e : Expr) (preserveOrder : Bool := false) :
|
|||
@[inline] def withTransparency {α} (mode : TransparencyMode) : n α → n α :=
|
||||
mapMetaM <| withConfig (fun config => { config with transparency := mode })
|
||||
|
||||
@[inline] def withDefault {α} (x : n α) : n α :=
|
||||
withTransparency TransparencyMode.default x
|
||||
|
||||
@[inline] def withReducible {α} (x : n α) : n α :=
|
||||
withTransparency TransparencyMode.reducible x
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Lean.Meta
|
|||
(?m ...) where ?m is an unassigned metavariable.
|
||||
-/
|
||||
private def getExpectedNumArgsAux (e : Expr) : MetaM (Nat × Bool) :=
|
||||
withReducible $ forallTelescopeReducing e fun xs body =>
|
||||
withDefault <| forallTelescopeReducing e fun xs body =>
|
||||
pure (xs.size, body.getAppFn.isMVar)
|
||||
|
||||
private def getExpectedNumArgs (e : Expr) : MetaM Nat := do
|
||||
|
|
|
|||
5
tests/lean/run/applytransp.lean
Normal file
5
tests/lean/run/applytransp.lean
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
theorem ex1 (h₁ : ¬ p) (h₂ : q → p) : ¬ q := by
|
||||
intro h
|
||||
apply h₁
|
||||
apply h₂
|
||||
apply h
|
||||
Loading…
Add table
Reference in a new issue