Commit graph

3267 commits

Author SHA1 Message Date
Leonardo de Moura
83eaa47e0a chore: move MatchEqs 2021-08-17 21:32:32 -07:00
Leonardo de Moura
158636b8c0 feat: add spliIfGoal
TODO: remove unnecessary complexity, `MatchEqs` doesn't need all this
complexity, and we should not recurse here.
2021-08-17 21:32:32 -07:00
Leonardo de Moura
bb755d6245 feat: add commitIfNoEx 2021-08-17 21:32:32 -07:00
Leonardo de Moura
e04976614f feat: check if metavar is not assigned at simp tactics
and make sure `simpLocalDecl` does not change the goal if it didn't simplify
2021-08-17 21:32:32 -07:00
Leonardo de Moura
60d38606e7 fix: missing instantiateMVars 2021-08-17 21:32:32 -07:00
Leonardo de Moura
a5b9306e04 fix: deep recursion at contradiction 2021-08-17 21:32:32 -07:00
Leonardo de Moura
4cfbe6030f feat: add simpLocalDecl 2021-08-17 21:32:32 -07:00
Leonardo de Moura
52b52b22ef fix: to do unfold matcher applications that cannot be reduced when smartUnfolding is true
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/How.20to.20WHNF.20without.20exposing.20recursors.3F
2021-08-17 21:32:32 -07:00
Leonardo de Moura
4635c3afd1 chore: add notNot? 2021-08-17 21:32:32 -07:00
Leonardo de Moura
60ff468a8b feat: add simpGoal helper method
chore: rename `simpGoal?`
2021-08-17 21:32:32 -07:00
Leonardo de Moura
5a76f70bc8 feat: add optional argument discharge? to simp basic methods 2021-08-17 21:32:32 -07:00
Sebastian Ullrich
94437bcfbb fix: import hint 2021-08-17 11:14:42 +02:00
Leonardo de Moura
d775dc6195 feat: add flag for controlling the execution of initialize commands when importing modules programmatically
Fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Environment.20extensions.20in.20importModules
2021-08-16 17:43:28 -07:00
Leonardo de Moura
6ced2cdece refactor: move lean_name_eq to runtime, add lean_name_hash in C 2021-08-16 16:13:55 -07:00
Leonardo de Moura
571a0491ee feat: add Meta.byCases helper tactic 2021-08-16 14:58:51 -07:00
Leonardo de Moura
fcbd807c9d chore: some Expr constructors 2021-08-16 13:58:48 -07:00
Leonardo de Moura
f59b9813fb feat: add environment extension for caching Simp.Context for splitIf 2021-08-16 13:05:01 -07:00
Leonardo de Moura
34b092700e feat: add LazyInitExtension 2021-08-16 12:54:50 -07:00
Leonardo de Moura
ca0c205389 feat: add registerSimpAttr 2021-08-16 09:59:58 -07:00
Leonardo de Moura
9182ebd4c1 feat: elaborate * simp argument 2021-08-15 08:02:21 -07:00
Leonardo de Moura
3c68703f39 feat: elaborate <- modifier at simp arguments 2021-08-15 07:07:58 -07:00
Leonardo de Moura
7c5ab8b4c9 chore: prepare to add <- as simp argument 2021-08-14 06:59:55 -07:00
Leonardo de Moura
cbd36e897b chore: remove ToExpr Expr 2021-08-14 06:16:46 -07:00
Leonardo de Moura
d8340f55a5 doc: document new binop% elaborator 2021-08-13 20:10:30 -07:00
Leonardo de Moura
d52de3392b chore: remove workaround 2021-08-13 19:35:47 -07:00
Leonardo de Moura
a15a36b8d3 chore: cleanup Subarray instances 2021-08-13 19:29:09 -07:00
Leonardo de Moura
ddec62f77b feat: synthesize pending metavariables created before binop% too
Reason: some of the `binop%` arguments may be let-variables, and the
values assigned to the let-variables may be in the pending list.
2021-08-13 19:25:45 -07:00
Leonardo de Moura
2994747ed9 chore: remove workaround 2021-08-13 18:25:32 -07:00
Leonardo de Moura
4ee2f80d66 fix: improve binop% elaborator 2021-08-13 17:33:32 -07:00
Leonardo de Moura
4b58c4cc02 refactor: instances that "hide" coercions
Example:
```
instance [CoeHTCT α β] [Add β] : HAdd α β β where
  hAdd a b := Add.add a b
```
2021-08-13 17:18:55 -07:00
Leonardo de Moura
3418eb7e1f fix: check whether CoeHTCT has already been defined or not at hasCoe 2021-08-13 17:00:59 -07:00
Leonardo de Moura
be23709737 chore: use binop% to define ++ notation 2021-08-13 16:26:35 -07:00
Leonardo de Moura
d3d03df83c feat: new elaborator for binop%
cc @gebner.
2021-08-13 15:44:59 -07:00
Sebastian Ullrich
16026e9edd perf: restore monad instance specialization hack 2021-08-12 21:09:09 +02:00
Leonardo de Moura
a6b6d61b39 chore: simplify mkProjStx? 2021-08-12 09:50:43 -07:00
Leonardo de Moura
da03262937 fix: check redundant sources at structure instance notation 2021-08-12 09:16:30 -07:00
Sebastian Ullrich
9c15f94be3 perf: do not use parsers from the current stage inside quotations by default 2021-08-12 07:51:50 -07:00
Sebastian Ullrich
20accf5105 feat: revise macro parameter syntax 2021-08-12 07:48:42 -07:00
Leonardo de Moura
c68882ca67 feat: structure instance notation with multiple sources
closes #462
closes #463
2021-08-12 06:18:47 -07:00
Leonardo de Moura
a02a490a10 feat: add mkProjStx? 2021-08-12 05:41:00 -07:00
Leonardo de Moura
2dfde4637f fix: index out of bounds 2021-08-12 05:39:19 -07:00
Leonardo de Moura
accf198a88 feat: add ExplicitSourceInfo 2021-08-12 04:29:19 -07:00
Leonardo de Moura
c591902547 refactor: add structure to Source.explicit 2021-08-12 04:10:47 -07:00
Leonardo de Moura
45e4dc26e1 refactor: simplify Source.explicit 2021-08-12 03:40:30 -07:00
Daniel Selsam
5952a857cd feat: pp.analyze improve heuristics for fun binders 2021-08-12 09:37:57 +02:00
Daniel Selsam
638d0ca8ed feat: pp.instances and pp.instanceTypes 2021-08-12 09:33:30 +02:00
Leonardo de Moura
67103f54a9 chore: add TODOs for multiple sources 2021-08-11 19:28:49 -07:00
Leonardo de Moura
74bd537465 fix: generation of to* field names 2021-08-11 17:25:02 -07:00
Leonardo de Moura
d78101f00d chore: remove mutual recursion workaround
It was a leftover hack for the old frontend.
2021-08-11 16:57:53 -07:00
Leonardo de Moura
4abbb3d74c chore: cleanup 2021-08-11 16:05:07 -07:00