Leonardo de Moura
25c9727a92
feat: add TermInfo for LVal
...
@Vtec234 Added the missing info.
Given
```lean
def f3 (s : Nat × Array (Array Nat)) : Array Nat :=
s.2[1].push s.1
```
We produce the following `InfoTree` for the body (originally at line 30)
```
Array.push (Array.getOp s.snd 1) s.fst : Array Nat @ ⟨30, 2⟩-⟨30, 17⟩
s : Nat × Array (Array Nat) @ ⟨30, 2⟩-⟨30, 3⟩
Prod.snd : {α β : Type} → α × β → β @ ⟨30, 4⟩-⟨30, 5⟩
Array.getOp : {α : Type} → [inst : Inhabited α] → Array α → Nat → α @ ⟨30, 5⟩-⟨30, 6⟩
1 : Nat @ ⟨30, 6⟩-⟨30, 7⟩
Array.push : {α : Type} → Array α → α → Array α @ ⟨30, 9⟩-⟨30, 13⟩
s.fst : Nat @ ⟨30, 14⟩-⟨30, 17⟩
s : Nat × Array (Array Nat) @ ⟨30, 14⟩-⟨30, 15⟩
Prod.fst : {α β : Type} → α × β → α @ ⟨30, 16⟩-⟨30, 17⟩
```
2021-01-14 12:19:21 -08:00
Leonardo de Moura
fb52ec8ef5
feat: store binder information in the InfoTree
...
@Vtec234 I am storing the binder information using `TermInfo`.
If it helps, I can add a custom `Info` constructor.
Example: `| Info.ofBinderInfo (i : BinderInfo)`.
2021-01-14 12:19:21 -08:00
Leonardo de Moura
e5b93783b0
test: TC issue repro
2021-01-13 18:41:01 -08:00
Leonardo de Moura
6e3792e995
chore: fix tests
2021-01-13 18:31:50 -08:00
Leonardo de Moura
b5fdc5e364
fix: expand abbreviations at isClass?
2021-01-12 06:56:23 -08:00
Leonardo de Moura
36008271ea
feat: ensure no unassigned metavariables in the declaration header when type is explicitly provided
2021-01-11 16:40:14 -08:00
Leonardo de Moura
7dec568ef6
fix: missing withDeclName
2021-01-11 06:50:55 -08:00
Leonardo de Moura
300fcc3321
fix: bug at getStuckMVar?
2021-01-11 06:43:08 -08:00
Leonardo de Moura
873634be7e
feat: hierarchical InfoTree
2021-01-09 14:10:11 -08:00
Leonardo de Moura
11c7ca40c3
fix: missing case at Match.lean
2021-01-07 17:38:22 -08:00
Leonardo de Moura
5baa162713
chore: lean 3 behavior for apply
2021-01-05 12:29:29 -08:00
Leonardo de Moura
93f3c98780
test: add partial/unsafe tests
2021-01-01 18:46:12 -08:00
Leonardo de Moura
e517d72bee
feat: simpForall
2021-01-01 17:24:56 -08:00
Leonardo de Moura
244b72befd
feat: simpArrow
2021-01-01 17:15:15 -08:00
Leonardo de Moura
15c052d44a
feat: basic simpLet
2021-01-01 15:54:29 -08:00
Leonardo de Moura
493d089878
feat: add support for simp { contextual := true }
2021-01-01 15:39:41 -08:00
Leonardo de Moura
e742dd1348
feat: allow user to set Simp.Config at simp
2021-01-01 15:12:18 -08:00
Leonardo de Moura
ac394e4fdf
fix: simp at hypotheses and using hypotheses
2021-01-01 12:05:38 -08:00
Leonardo de Moura
ce09e795b9
feat: finalizeProof at rewrite step
2021-01-01 11:33:34 -08:00
Leonardo de Moura
3a369938c8
feat: simpLambda
2021-01-01 09:52:01 -08:00
Leonardo de Moura
b756562d4a
feat: simp beta/proj/recursor/matcher
2021-01-01 08:29:21 -08:00
Leonardo de Moura
90428cc09b
feat: expand let-decls at decide!
2020-12-31 09:47:05 -08:00
Leonardo de Moura
a32c45a515
feat: simp infrastructure
2020-12-30 18:00:04 -08:00
Leonardo de Moura
34f6f8ef5d
feat: pre/post simp lemmas
2020-12-30 13:46:14 -08:00
Leonardo de Moura
03cc69f1db
feat: track permutation simp lemmas
2020-12-30 13:46:14 -08:00
Leonardo de Moura
eba3983658
feat: use binrel! gadget to define >, <, ... notations
...
It has better support for applying coercions.
2020-12-29 16:53:10 -08:00
Leonardo de Moura
51e2db9850
feat: elaborate binrel! macro
2020-12-29 16:37:43 -08:00
Leonardo de Moura
479da7b914
feat: elaborate noindex! annotation
2020-12-28 17:49:54 -08:00
Leonardo de Moura
7165d50c93
feat: simp lemmas of the form not p
2020-12-28 17:03:32 -08:00
Leonardo de Moura
5a772e58d3
test: simp extension
2020-12-28 16:52:15 -08:00
Leonardo de Moura
4f4c8f45cd
chore: fix tests
2020-12-28 16:27:38 -08:00
Leonardo de Moura
19a3f8e5e5
chore: fix typo
2020-12-28 09:01:23 -08:00
Sebastian Ullrich
837d6a1529
chore: fix test
2020-12-26 21:12:51 +01:00
Leonardo de Moura
4450b8567d
fix: sigma notation precedence
2020-12-26 09:35:40 -08:00
Leonardo de Moura
edb51b8977
test: implicit lambdas in action
2020-12-23 10:24:00 -08:00
Leonardo de Moura
e74ba14f4c
feat: modify structSimpleBinder parser
...
@Kha It felt odd that we can write
```
map f x := ...
```
in instances, but we had to write
```
map (f x) := ...
```
when setting the field default value in a class.
2020-12-23 08:23:14 -08:00
Leonardo de Moura
7720b843bb
feat: allow users to use binders when setting default value for parent fields
2020-12-23 08:12:29 -08:00
Leonardo de Moura
800b4af15d
test: indentation
2020-12-22 14:53:03 -08:00
Leonardo de Moura
839017fdae
feat: add macro tactical solve
2020-12-22 14:36:20 -08:00
Leonardo de Moura
832c7412d6
feat: add first tactical
...
@Kha It has a few advantages over `<or>` (`<|>`).
- It is not an infix operator.
- It takes tactic sequences instead of tactics as arguments
For example, we can write
```
first
| apply h1; assumption
| exact y; exact h3; assumption
```
or
```
first apply h1; assumption | exact y; exact h3; assumption
```
instead of
```
(apply h1; assumption) <|> (exact y; exact h3; assumption)
```
2020-12-22 14:10:07 -08:00
Leonardo de Moura
69d83ecb86
chore: make sure term and tactic parsers have disjoint infix operators
2020-12-22 14:10:07 -08:00
Leonardo de Moura
18aee9de30
fix: precedence issues at tactic DSL
2020-12-22 14:10:06 -08:00
Leonardo de Moura
289ed6485d
feat: eval allGoals
2020-12-22 09:52:54 -08:00
Leonardo de Moura
f638269a71
fix: name resolution at syntax command
...
This commit also cleans up `toParserDescr`+`toParserDescrAux`.
2020-12-22 08:40:00 -08:00
Leonardo de Moura
1d5df4f28b
test: matrix notation example
...
- Heterogeneous `*` for matrix and scalar multiplication
- Homogeneous `+` for matrix addition
- Whitespace sensitive `x[i, j]` notation
2020-12-21 16:40:52 -08:00
Leonardo de Moura
4fc06bfcca
feat: add optional (priority := <prio>) to instance command
2020-12-21 10:02:12 -08:00
Leonardo de Moura
43284cc5fa
feat: improve notation for setting parser names and priorities
2020-12-21 09:11:12 -08:00
Sebastian Ullrich
756d7643f0
chore: rename syntaxMaxDepth option for consistency and discoverability
...
/cc @leodemoura
2020-12-21 16:25:01 +01:00
Leonardo de Moura
340cade575
fix: bug at specialize.cpp
2020-12-20 17:48:46 -08:00
Sebastian Ullrich
90f747e346
fix: don't change antiquotations semantics in do if
2020-12-20 17:51:37 +01:00