Commit graph

1210 commits

Author SHA1 Message Date
Leonardo de Moura
e8b58abdb2 chore: remove dead code 2022-07-18 22:16:32 -04:00
Leonardo de Moura
7331fdf310 doc: Expr.lean 2022-07-17 17:28:28 -04:00
Leonardo de Moura
309f8d6bf9 fix: implicit arguments must be processed with at least default transparency
see #1299
2022-07-11 19:11:46 -07:00
Leonardo de Moura
5bd1f7bba1 fix: special support for higher order output parameters at isDefEqArgs
closes #1299
2022-07-11 19:05:24 -07:00
Leonardo de Moura
4d81c609cc chore: cleanup 2022-07-11 18:52:55 -07:00
Leonardo de Moura
3fd2250799 feat: add higherOrderOutParam to ParamInfo
Helper info for #1299
2022-07-11 18:52:01 -07:00
Leonardo de Moura
709f22c8e4 feat: add field dependsOnHigherOrderOutParam to ParamInfo
See issue #1299
2022-07-11 17:49:49 -07:00
Leonardo de Moura
dfc88ef99f chore: use a[i] 2022-07-11 16:44:52 -07:00
Gabriel Ebner
a8cab84735 refactor: use computed fields for Expr 2022-07-11 14:19:41 -07:00
Gabriel Ebner
eba400543d refactor: use computed fields for Name 2022-07-11 14:19:41 -07:00
Gabriel Ebner
3176943750 refactor: use computed fields for Level 2022-07-11 14:19:41 -07:00
Leonardo de Moura
c568f11ddf feat: use default transparency at isDefEqProofIrrel
closes #1302
2022-07-11 12:11:10 -07:00
Leonardo de Moura
0c5dfd78d7 chore: style 2022-07-10 15:26:26 -07:00
Leonardo de Moura
f1d84a5096 perf: use dsimp := false in split tactic and while proving equation theorems
It is just a waste in these two cases.

It now takes 0.78 secs to process example on issue #1287.

closes #1287
2022-07-10 08:03:42 -07:00
Leonardo de Moura
4b543d5edd feat: add option for disabling dsimp during simp 2022-07-10 07:57:41 -07:00
Leonardo de Moura
23bae264fd perf: add cache for check (e : Expr) : MetaM Unit
Address one of the performance problems exposed by #1287
2022-07-09 20:09:15 -07:00
Leonardo de Moura
c9771fa1b2 chore: unused variables 2022-07-07 20:24:18 -07:00
Leonardo de Moura
db47664d4a fix: discrepancy between isDefEq and whnf for transparency mode instances 2022-07-07 15:39:58 -07:00
Leonardo de Moura
0c30372f93 doc: add todo for expandDelayedAssigned 2022-07-06 20:08:12 -07:00
Leonardo de Moura
01d0ca8cfe doc: coeAtOutParam todo's 2022-07-06 18:58:40 -07:00
Leonardo de Moura
55ad7beb8d feat: add coercion placeholder for applications that return an output parameter of a local instance 2022-07-06 15:42:39 -07:00
Leonardo de Moura
e7bc114ba2 fix: bug at withAssignableSyntheticOpaque 2022-07-06 15:24:17 -07:00
Leonardo de Moura
608a306ef0 refactor: simplify/cleanup DelayedMetavarAssignment 2022-07-06 15:24:17 -07:00
Leonardo de Moura
81ed8b0b32 chore: cleanup 2022-07-06 15:24:17 -07:00
Leonardo de Moura
2446c64a99 chore: cleanup 2022-07-04 07:15:04 -07:00
Leonardo de Moura
f77ebae87f fix: withResetUsedAssignment 2022-07-04 06:33:42 -07:00
Leonardo de Moura
05a28af429 fix: skipDefEqCache 2022-07-04 06:33:32 -07:00
Leonardo de Moura
88fc0b2503 fix: isAssigned-like functions should set usedAssignment 2022-07-04 06:20:37 -07:00
Leonardo de Moura
6b2d2ffac6 fix: preserve usedAssignment flag when replacing MetavarContext 2022-07-04 05:49:54 -07:00
Leonardo de Moura
64d46272c2 fix: do not cache when smart unfolding is disabled 2022-07-04 05:48:35 -07:00
Leonardo de Moura
a1413b8fa1 feat: cache failures at isDefEq
We can compile Lean with these changes, but 3 tests are still broken.
This cache is used to address a performance issue reported at
  https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/deterministic.20timeout.20with.20structures/near/288180087
2022-07-03 21:52:01 -07:00
Leonardo de Moura
aae657571f doc: docstrings for src/Lean/Meta/Basic.lean 2022-07-03 15:32:15 -07:00
Leonardo de Moura
03ce7cb17c fix: dependent pattern matching bug
closes #1279
Originally reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/case.20in.20dependent.20match.20not.20triggering.20.28.3F.29/near/288328239
2022-07-03 13:25:12 -07:00
Leonardo de Moura
68024b11a4 fix: simp_all bug when goal has duplicate hypotheses 2022-07-03 12:44:53 -07:00
Leonardo de Moura
54c60d4c2d feat: a[i] and a[i]! notation for Subarrays 2022-07-02 15:54:34 -07:00
Leonardo de Moura
2ebcf29cde chore: use a[i]! for array accesses that may panic 2022-07-02 15:12:05 -07:00
Leonardo de Moura
a639eb185c fix: dsimp zeta issue 2022-07-01 06:42:09 -07:00
Leonardo de Moura
dba1f79170 feat: improve isDefEq for projections
When solving `a.i =?= b.i`, we first reduce `a` and `b` without using
delta reduction. If at least one become a structure, we reduce the
projection. Otherwise, we try to solve `a =?= b`, only reduce `a.i`
and `b.i` if it fails.
2022-06-30 17:00:43 -07:00
Leonardo de Moura
f3bb0be045 feat: add flag to control projection reduction at whnfCore 2022-06-30 16:48:00 -07:00
Leonardo de Moura
2c152dae7d chore: remove unnecessary partial 2022-06-30 15:47:31 -07:00
Leonardo de Moura
e9e75af834 doc: Lean/Meta/Basic.lean
Add some docstrings
2022-06-30 13:32:19 -07:00
Leonardo de Moura
98b8e300e1 feat: add evalTerm and Meta.evalExpr
These functions were in Mathlib 4.
2022-06-28 19:14:40 -07:00
Leonardo de Moura
c498285d94 chore: add missing double backtick 2022-06-27 09:56:47 -07:00
E.W.Ayers
cc9293af09 doc: isDefEq explain mvar levels 2022-06-24 15:24:52 -07:00
Leonardo de Moura
1fd2b17a92 fix: bug at addDependencies
closes #1247
2022-06-24 06:20:00 -07:00
Leonardo de Moura
69a446c8d1 feat: add field all to DefinitionVal and TheoremVal
Remark: we need an update stage0, and the field is not being updated
correctly set yet.
2022-06-23 16:13:26 -07:00
Leonardo de Moura
96a72d67f2 fix: avoid unnecessary dependencies at mkMatcher
fixes #1237
2022-06-23 10:21:32 -07:00
Leonardo de Moura
17fa60e1ec chore: remove dead code 2022-06-23 09:31:52 -07:00
Leonardo de Moura
a802544c90 fix: intro tactic at let-expr 2022-06-22 16:10:33 -07:00
Leonardo de Moura
2a940dd4ae feat: add Expr.collectFVars, LocalDecl.collectFVars, Pattern.collectFVars, and AltLHS.collectFVars
They are all in `MetaM`.

These are helper functions for issue #1237. We need to "cleanup" the
local context before trying to compile the match-expression.

see issue #1237
2022-06-22 15:53:43 -07:00