Commit graph

33954 commits

Author SHA1 Message Date
Leonardo de Moura
989d8f04e1 chore: fix tests 2022-06-14 17:27:13 -07:00
Leonardo de Moura
f6d1e48cb8 fix: constant => opaque issues 2022-06-14 17:19:54 -07:00
Leonardo de Moura
fb55ec29e1 chore: update stage0 2022-06-14 17:14:44 -07:00
Leonardo de Moura
22c8f10b12 chore: remove constant command 2022-06-14 17:14:28 -07:00
Leonardo de Moura
02c4e548df feat: replace constant with opaque 2022-06-14 17:02:59 -07:00
Leonardo de Moura
ac33193b30 chore: update stage0 2022-06-14 16:45:20 -07:00
Leonardo de Moura
3b259afaf0 chore: fix tests 2022-06-14 16:43:22 -07:00
Leonardo de Moura
346c4beb70 feat: elaborate opaque command 2022-06-14 16:36:24 -07:00
Leonardo de Moura
794021b9e4 chore: adjust codebase
`opaque` is now a command keyword
2022-06-14 16:32:53 -07:00
Leonardo de Moura
5193c6d0ef chore: update stage0 2022-06-14 16:23:49 -07:00
Leonardo de Moura
05778565ab feat: add opaque command
It will replace the `constant` command. See
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/What.20is.20.60opaque.60.3F/near/284926171
2022-06-14 16:22:36 -07:00
Jakob von Raumer
d7cb93e9e4 feat: allow conv mode's arg command to access implicit arguments 2022-06-14 16:15:38 -07:00
tydeu
8dc3133244 chore: use bash shebang in test scripts 2022-06-14 18:56:20 -04:00
tydeu
38fc7192ed chore: fix new shell scripts' premissions 2022-06-14 18:39:04 -04:00
tydeu
8faafb7ef6 test: reorg + regression tests 2022-06-14 18:33:01 -04:00
Leonardo de Moura
d78e7cd011 feat: macro expand cases and induction tactics multiple LHSs 2022-06-14 14:18:52 -07:00
tydeu
4ff44fb050 fix: don't require know expected type for __dir__/__args__ 2022-06-14 16:59:13 -04:00
tydeu
854b154a5f fix: lake serve fallback regression
closes leanprover/lake#76
2022-06-14 15:54:07 -04:00
Leonardo de Moura
3a1dc5e066 fix: support new inductionAlt syntax at Linter/Basic.lean 2022-06-14 11:31:49 -07:00
Leonardo de Moura
bd2cccf287 chore: use double tick 2022-06-14 11:30:55 -07:00
Leonardo de Moura
2dad133208 chore: update stage0 2022-06-14 11:26:06 -07:00
Leonardo de Moura
daeb271678 feat: update induction and cases syntax
We can now write
```
induction x with
| foo | bar => ...
| boo => ...
```

TODO: expand alternatives containing multiple LHSs.
2022-06-14 11:25:15 -07:00
Leonardo de Moura
05a72a9e00 chore: update stage0 2022-06-14 11:17:33 -07:00
Leonardo de Moura
7c9b5b7147 feat: prepare to support multi-cases at cases and induction
We want to be able to write
```
induction x with
| foo | bar => ...
| boo => ...
```
2022-06-14 11:16:58 -07:00
tydeu
1996d6710b chore: update Lean version 2022-06-14 13:07:42 -04:00
Sebastian Ullrich
43b08239b0 fix: further conv goal state refinements 2022-06-14 11:09:47 +02:00
Sebastian Ullrich
7bb94abb62 feat: trace.Elab.input
Unlike Elab.command, it does not contain macro expansions
2022-06-14 10:41:56 +02:00
Leonardo de Moura
77ae79be46 chore: use let/if in do blocks 2022-06-13 17:10:14 -07:00
tydeu
7bbe6cfce8 feat: different package templates 2022-06-13 20:01:43 -04:00
Leonardo de Moura
7dbdfa090a chore: remove debugging leftovers 2022-06-13 16:37:31 -07:00
E.W.Ayers
13e286f545 doc: fix docstring for InteractiveGoal 2022-06-13 16:32:01 -07:00
E.W.Ayers
2edf02544e chore: rm ExprWithCtx
We will make this a separate PR
2022-06-13 16:32:01 -07:00
E.W.Ayers
367bde3601 chore: revert "refactor: replace InfoWithCtx with ExprWithCtx"
This reverts commit db342793d53c986b8794084196552c33711f9091.
2022-06-13 16:32:01 -07:00
E.W.Ayers
f64cb95eca refactor: replace InfoWithCtx with ExprWithCtx
This is potentially controversial. There are still some [todo]s that need sorting.
2022-06-13 16:32:01 -07:00
E.W.Ayers
3d561a3ab0 doc: add docstrings for interactive 2022-06-13 16:32:01 -07:00
E.W.Ayers
e3d2080232 refactor: PPExprTaggedRequest -> PPExprTaggedParams 2022-06-13 16:32:01 -07:00
E.W.Ayers
fd66e70d1e fix: explicit structure for PPExprTaggedRequest 2022-06-13 16:32:01 -07:00
E.W.Ayers
69facfbe8e fix: remove Optional from InteractiveHypothesisBundle.fvarIds 2022-06-13 16:32:01 -07:00
E.W.Ayers
45e3c72be7 refactor: InteractiveHypothesis → InteractiveHypothesisBundle 2022-06-13 16:32:01 -07:00
Ed Ayers
5130da82a8 doc: src/Lean/Widget/InteractiveGoal.lean
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2022-06-13 16:32:01 -07:00
E.W.Ayers
cea53fc53e fix: tests
Caused by a classic imperative programming bug oops
2022-06-13 16:32:01 -07:00
E.W.Ayers
f2a874ebaa fix: handle inaccessible fvar names correctly 2022-06-13 16:32:01 -07:00
E.W.Ayers
675147dcfc fix: make InteractiveHyp.fvarIds optional
This is for backwards compat.
2022-06-13 16:32:01 -07:00
E.W.Ayers
0f61d1dc59 refactor: key fields are now f/mvarid fields 2022-06-13 16:32:01 -07:00
E.W.Ayers
4165b7e8ba doc: ToHide.collect 2022-06-13 16:32:01 -07:00
E.W.Ayers
6e1c9653d9 feat: Add a key field to InteractiveGoal
This is used to uniquely identify InteractiveGoals and
InteractiveHypotheses. This makes it easier to do
contextual suggestions: eg the infoview can send a message
saying "the user clicked on subexpression 5 in hypothesis N in goal G"
where N and G are unique identifiers for a goal rather than pretty names
which may be non-unique or indices which may be difficult to compute
(eg in infoview there is a mode where hypotheses are reversed or filtered).

While adding these I also refactored the InteractiveGoal generating function.
I unwrapped a fold in to a for/in loop with mutating variables which is a
little easier to read.
2022-06-13 16:32:01 -07:00
Wojciech Nawrocki
351be06a21 feat: ppExprTagged RPC call 2022-06-13 16:32:01 -07:00
Wojciech Nawrocki
4972f214be fix: sorried errors in rpcServerMethod 2022-06-13 16:32:01 -07:00
Leonardo de Moura
c2fdcad443 chore: update stage0 2022-06-13 16:23:53 -07:00
Leonardo de Moura
e52a7bdf42 feat: let/if indentation in do blocks
closes #1120
2022-06-13 16:18:49 -07:00