Commit graph

3302 commits

Author SHA1 Message Date
Wojciech Nawrocki
72df64e8fe chore: move RpcSession 2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
2a20d41cd9 feat: BEq Json 2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
690a152275 feat: interactive goals 2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
dae1a94d53 feat: misc server additions 2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
2f16d5f121 feat: expressions with bundled environments for RPC 2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
6eaa536595 feat: pretty-printer with tags 2021-08-24 08:57:41 -07:00
Leonardo de Moura
269a3478e0 refactor: cleanup mkEquationsFor
and build eliminator type where alternatives have the extra
conditions that ensure none of the previous alternatives are applicable.
2021-08-23 20:19:24 -07:00
Leonardo de Moura
4f45a514fc fix: TC issue introduced by recent bug fix
This commit fixes the issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/instance.20not.20synthesizing.20issue.3F
2021-08-23 17:32:19 -07:00
Leonardo de Moura
79e6732fc6 fix: update tokenTable at withNamespace parser combinator
It also moves `withOpen` and `withOpenDecl` applications to simplify
their definitions and make sure we do not need to reset the cache.
2021-08-23 09:41:36 -07:00
Leonardo de Moura
7edc42fdfc fix: scoped command after open command
The issue was reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Ending.20a.20command
2021-08-23 08:29:30 -07:00
Leonardo de Moura
5a7044365b feat: add instances Alternative MetaM and Alternative TacticM 2021-08-22 22:29:09 -07:00
Leonardo de Moura
d93c4317d1 feat: add withOpenDecl and withOpen parsers
It allow us to process `open .. in ..` while parsing.
This is useful for activating a scoped parser while parsing.
TODO: `openOnly` and `openHiding`, these two cases are rarely used
with `open .. in ..`

closes #529
2021-08-22 20:50:35 -07:00
Leonardo de Moura
ca747e9b27 feat: use contradiction at leaves
closes #644
2021-08-22 18:41:02 -07:00
Leonardo de Moura
48e6188e89 feat: use exfalso at ElimEmptyInductive 2021-08-22 18:16:14 -07:00
Leonardo de Moura
e5c380fd4f feat: add exfalso 2021-08-22 18:14:49 -07:00
Leonardo de Moura
ec20725cfb feat: use searchFuel instead of searchDepth at contradiction 2021-08-22 17:41:12 -07:00
Leonardo de Moura
21c68a49e3 feat: elaborate nonrec modifier 2021-08-21 17:02:54 -07:00
Leonardo de Moura
54316fabb4 feat: add nonrec parser 2021-08-21 16:39:18 -07:00
Leonardo de Moura
46a5f06121 feat: do not consider dot notation when isAuxDecl is true 2021-08-21 16:35:32 -07:00
Leonardo de Moura
71e0ff40c2 feat: add basic support for csimp 2021-08-21 11:58:51 -07:00
Leonardo de Moura
e8d23f305d chore: elaborate open scoped 2021-08-21 07:16:24 -07:00
Leonardo de Moura
519bb1e7d4 feat: add open scoped parser 2021-08-21 07:06:50 -07:00
Leonardo de Moura
49520aa2ee feat: generate conditional equation theorems for match expressions 2021-08-19 19:33:31 -07:00
Leonardo de Moura
37f2f7d472 fix: bug at processGenDiseq
We should not assign metavar from outer depth inside `withNewMCtxDepth`
2021-08-19 19:33:26 -07:00
Leonardo de Moura
3c519887d1 chore: generate error message when MatchEqs fail
TODO: we currently do not generate equation theorems
for `match` expressions using array literals.
2021-08-19 17:04:52 -07:00
Leonardo de Moura
1624e42a5d chore: cleaup 2021-08-19 14:39:58 -07:00
Leonardo de Moura
bffefa61bd feat: extend contradiction for MatchEqs.lean 2021-08-19 12:52:50 -07:00
Leonardo de Moura
7b881b6020 chore: add Contradiction.Config 2021-08-19 11:43:12 -07:00
Leonardo de Moura
a6529a795b feat: add casesOnStuckLHS 2021-08-19 11:22:13 -07:00
Leonardo de Moura
1b60d54814 feat: make sure Eq.ndrec and Eq.ndrecOn are "tagged" as auxiliary recursors 2021-08-19 11:22:13 -07:00
Leonardo de Moura
7c9158a50e fix: structure command diamond support
Fixes issue described at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Structure.20diamond.20error
2021-08-19 07:45:21 -07:00
Leonardo de Moura
015df19808 feat: add trySubst 2021-08-19 07:08:02 -07:00
Leonardo de Moura
d0d7799a7b doc: document (and rename) the new configuration option ignoreLevelMVarDepth 2021-08-18 20:38:18 -07:00
Leonardo de Moura
99e8a98f06 feat: allow universes metavariables from any depth to be assigned when ignoreLevelDepth is true
We set `ignoreLevelDepth` to true during type class resolution.
2021-08-18 20:20:51 -07:00
Leonardo de Moura
45d3b85d5a refactor: cleanup MatchEqs and simplify SplitIf 2021-08-18 18:34:34 -07:00
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