Commit graph

63 commits

Author SHA1 Message Date
Sebastian Ullrich
a44472962d fix: replace uses of token antiquotations in tactics with with_annotate_state 2022-08-02 04:54:48 -07:00
Mario Carneiro
25aea1b723 doc: document all the tactics 2022-08-01 08:08:03 -07:00
Mario Carneiro
c952c69690 feat: add missingDocs linter 2022-07-31 18:18:21 -07:00
Leonardo de Moura
feb71271e9 fix: remove redundant alternatives 2022-07-31 05:28:14 -07:00
Sebastian Ullrich
f1f0f60768 fix: linter warnings 2022-07-29 10:31:19 -07:00
Leonardo de Moura
5e877b115b feat: improve calc tactic
> Heather suggested changing the calc tactic (not the term) such that if
the final RHS does not defeq match the goal RHS, it returns a final
inequality as a subgoal.

Closes #1342
2022-07-24 14:30:15 -07:00
Leonardo de Moura
22d37af5c9 feat: improve calc syntax
See #1342
2022-07-24 08:32:20 -07:00
Sebastian Ullrich
5160cb7b0f refactor: remove some unnecessary antiquotation kind annotations 2022-07-23 17:09:32 +02:00
Sebastian Ullrich
cf380956a3 fix: regression from previous commit 2022-07-23 17:09:32 +02:00
Mario Carneiro
f6211b1a74
chore: convert doc/mod comments from /- to /--//-! (#1354) 2022-07-22 12:05:31 -07:00
Sebastian Ullrich
1f081ee6cb feat: doc comment support for unif_hint 2022-07-22 14:30:49 +02:00
Andrés Goens
b36b50adb2
feat: syntax for using while condition in proofs 2022-07-21 16:57:35 +00:00
Leonardo de Moura
35018dbea2 feat: unexpanders for a[i], a[i]' h, a[i]!, and a[i]? 2022-07-10 06:47:23 -07:00
Leonardo de Moura
2ebcf29cde chore: use a[i]! for array accesses that may panic 2022-07-02 15:12:05 -07:00
Sebastian Ullrich
89a101e9b8 refactor: remove group(·)s 2022-06-28 11:50:59 +02:00
Sebastian Ullrich
22475b8669 refactor: introduce common TSyntax abbreviations 2022-06-27 22:37:02 +02:00
Sebastian Ullrich
8b4d8b8dc9 feat: TSyntax singleton kind unexpanders 2022-06-27 22:37:02 +02:00
Sebastian Ullrich
6af00ff23e chore: changes to placate coercions 2022-06-27 22:37:02 +02:00
Sebastian Ullrich
d9cfda4893 refactor: make more use of quotations
Automatically fixes many TSyntax type errors
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
5e334b3e90 chore: postpone TSyntax adoption for some parts
The namespace `TSyntax.Compat` can be opened for a coercion
`Syntax -> TSyntax k` for any `k`, as otherwise this PR would never be done.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
498c7a6a97 refactor: remove some unnecessary antiquotation kind annotations
These are just the ones I stumbled upon, there should be a lot more now
rendered obsolete by the coercions.
2022-06-27 22:37:02 +02:00
Leonardo de Moura
041827bed5 chore: unused variables 2022-06-07 17:54:10 -07:00
Sebastian Ullrich
0b264889ae fix: goal state on ; after · 2022-06-03 13:41:04 +02:00
Leonardo de Moura
9de6961906 chore: to doc string 2022-04-07 07:29:23 -07:00
Leonardo de Moura
16523647b8 doc: add doc strings to some tactics 2022-04-05 06:27:09 -07:00
Sebastian Ullrich
c4d3c74837 feat: accept multiple patterns after matches 2022-03-21 17:59:02 +01:00
Leonardo de Moura
bdea43a52a feat: while and repeat macros 2022-02-24 16:26:07 -08:00
Gabriel Ebner
f43f74e78f chore: suppress newline after . 2021-12-23 13:56:22 +01:00
Gabriel Ebner
25714a8ee1 fix: calc syntax roundtrip 2021-12-23 13:56:22 +01:00
Gabriel Ebner
34eda689a1 fix: use eraseMacroScopes on trace classes 2021-10-08 11:13:19 -07:00
Leonardo de Moura
b7281e9fe2 fix: instruct pretty printer to add a line break after each calc step
It should fix https://github.com/leanprover/mathport/issues/26
2021-10-02 11:38:10 -07:00
Leonardo de Moura
c491f829e0 feat: elaborator for the calc notation
- It produces better error messages.
- It tweaks the elaboration order.
- It adds a checkpoint after each step.
- It avoids the `show .. from ..` workaround.
2021-08-31 09:56:49 -07:00
Leonardo de Moura
f4c72025ee feat: add calc tactic macro 2021-08-30 09:33:32 -07:00
Leonardo de Moura
34d8ecc066 fix: use show .. from .. to implement calc
Recall that `show .. from ..` ensures that proof has exactly the type
provided by the user.
In the new test, `rw [ih]` without this change because the goal would
be
```
... |- 0 + succ n = succ n
```
2021-08-29 11:33:50 -07:00
Sebastian Ullrich
f9fd0b3de4 feat: calc 2021-08-25 06:57:09 -07:00
Daniel Selsam
040141f137 feat: unexpander for Subtype 2021-08-12 09:32:33 +02:00
Leonardo de Moura
a821dcbff2 chore: enforce naming convention for theorems
see issue #402

fix: `ElabTerm.lean`
2021-08-07 12:48:38 -07:00
Daniel Selsam
0036111db9 feat: pp.analyze original mvars are not unknown 2021-08-03 09:13:18 +02:00
Daniel Selsam
db4d33487a fix: unexpanders can't specify exact names 2021-08-03 09:13:18 +02:00
Daniel Selsam
9744b51c1b fix: unexpand pairs 2021-08-03 09:13:18 +02:00
Daniel Selsam
b3bb82ee7e feat: turn more delaborators into unexpanders 2021-08-03 09:13:18 +02:00
Daniel Selsam
89364b802b feat: top-down heuristic delaboration 2021-08-03 09:13:18 +02:00
Mario Carneiro
0cf306eb49
chore: fix typo 2021-07-16 10:52:28 +02:00
Mac Malone
a6dc9e4ef3 feat: class abbrev now supports a type spec (+ test) 2021-05-20 15:23:30 -07:00
Mac Malone
6c07536b33 feat: simplified, improved class abbrev (+ tests) 2021-05-20 15:23:29 -07:00
Leonardo de Moura
b52edf1259 fix: fixes #452
The new syntax is similar to `matchAlts` and uses `colGe`.
The first `|` is not optional anymore.
2021-05-10 17:28:10 -07:00
Leonardo de Moura
6efb058e2c refactor: add Name.modifyBase 2021-05-03 10:06:20 -07:00
Leonardo de Moura
d70f9c232c feat: trace support for MacroM
closes #184
2021-04-23 19:15:14 -07:00
Sebastian Ullrich
bdf7b15a41 feat: basic unexpanders for Exists & Sigma
A bit brittle and not quite complete, but probably good enough in practice
2021-02-04 11:04:37 +01:00
Sebastian Ullrich
462e1d54a3 chore: replace uses of copyInfo with automatic position copying in syntax quotations
We could introduce a `copyPos` alternative, but turns out we don't need it right now
2021-01-20 16:48:50 +01:00