Gabriel Ebner
eda3eae18e
perf: implement Expr.update* in Lean
2022-07-19 05:55:13 -07:00
Sebastian Ullrich
987785242f
fix: disable auto implicits in structure field default values
2022-07-18 21:09:56 -07:00
Leonardo de Moura
73fce217f6
test: for issue #1321
2022-07-18 23:50:41 -04:00
Leonardo de Moura
3325987be4
chore: fix tests
2022-07-18 23:18:59 -04:00
Gabriel Ebner
3edf22f3f5
fix: crash in binop%
2022-07-17 09:57:56 -07:00
Gabriel Ebner
ff3c67d1ad
feat: recover from errors in attributes
2022-07-16 06:19:54 -07:00
Gabriel Ebner
69da058c03
fix: tests/lean/625.lean
2022-07-16 06:19:54 -07:00
Leonardo de Moura
fb9b093cf9
chore: update example
2022-07-13 15:15:00 -07:00
Leonardo de Moura
94df25e99b
chore: update example
2022-07-13 15:13:31 -07:00
Leonardo de Moura
cce2d3500e
test: for issue #1301
...
closes #1301
2022-07-13 06:05:12 -07:00
larsk21
15f9c0585a
fix: consider macro expansions in unused variables linter
2022-07-13 10:35:37 +02:00
larsk21
ced8df3e86
fix: references of variables with equal ranges
2022-07-13 10:35:37 +02:00
Leonardo de Moura
b6860968ff
fix: catch exception at elabMutualDef
...
closes #1301
2022-07-12 18:39:30 -07:00
Leonardo de Moura
fdef55339f
fix: use binop% for elaborating ^
...
closes #1298
2022-07-12 18:20:02 -07:00
Leonardo de Moura
5e333191a2
feat: improve binop% and binrel% elaboration functions
...
Add support for operators that may not have homogeneous instances for
all types. For example, we have `HPow Nat Nat Nat` and `HPow Int Nat Int`,
but we don't have `HPow Int Int Int`.
2022-07-12 18:12:20 -07:00
Leonardo de Moura
d1f0db7072
fix: resumePostponed backtracking
...
Note that test for issue #1200 broke.
The bug fixed by this commit was allowing the example to be elaborated
correctly :(
Initially, the type of the discriminant is not available, and
`.none (α:=α)` can only be elaborated when the expected type is of the
form `C ...`. Lean then tries to elaborate the alternatives, learn
that the discriminant should be `Option ?m`, and fails because the
patterns still have metavariables after elaboration. Before the bug
fix, `resumePostpone` was **not** restoring the metavariable context,
and the assingnment would stay there. With this information, Lean
can now elaborate `.none (α:=α)`.
Although the bug had a positive impact in this case, it produced
incorrect behavior in other examples.
The fixed example looks reasonable. Thus, we will not reopen
issue #1200
2022-07-12 16:52:45 -07:00
Leonardo de Moura
b8ed579289
fix: fixes #1300
2022-07-12 14:08:47 -07:00
Leonardo de Moura
5bd1f7bba1
fix: special support for higher order output parameters at isDefEqArgs
...
closes #1299
2022-07-11 19:05:24 -07:00
Gabriel Ebner
a8cab84735
refactor: use computed fields for Expr
2022-07-11 14:19:41 -07:00
Gabriel Ebner
eba400543d
refactor: use computed fields for Name
2022-07-11 14:19:41 -07:00
Gabriel Ebner
3176943750
refactor: use computed fields for Level
2022-07-11 14:19:41 -07:00
Gabriel Ebner
c100f45b77
feat: add simp lemmas and instances for LawfulBEq
2022-07-11 14:19:41 -07:00
Gabriel Ebner
a7e8a82e89
chore: require @[computedField] attribute
2022-07-11 12:26:53 -07:00
Gabriel Ebner
6fe3e36804
feat: support extern computed fields
2022-07-11 12:26:53 -07:00
Gabriel Ebner
243439a75c
feat: support modifiers in computed fields
2022-07-11 12:26:53 -07:00
Gabriel Ebner
b1eb022027
feat: computed fields
2022-07-11 12:26:53 -07:00
Leonardo de Moura
c568f11ddf
feat: use default transparency at isDefEqProofIrrel
...
closes #1302
2022-07-11 12:11:10 -07:00
Leonardo de Moura
451abdf79d
fix: Level.update* functions
...
see #1291
2022-07-10 09:16:02 -07:00
Leonardo de Moura
ba606debf7
fix: Expr.update* issue
...
See #1291
2022-07-10 08:33:14 -07:00
Leonardo de Moura
4b543d5edd
feat: add option for disabling dsimp during simp
2022-07-10 07:57:41 -07:00
Leonardo de Moura
7553dc12c0
chore: fix tests
2022-07-10 07:43:01 -07: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
881589fc46
chore: remove parser workarounds
2022-07-09 16:42:39 -07:00
Leonardo de Moura
aa52eebcdc
feat: add instance GetElem (Array α) USize α fun xs i => LT.lt i.toNat xs.size where
2022-07-09 16:18:29 -07:00
Leonardo de Moura
1caff852fb
chore: remove getOp functions
2022-07-09 16:09:28 -07:00
Leonardo de Moura
36ebccb822
chore: fix tests
2022-07-09 15:59:44 -07:00
Leonardo de Moura
4c707d3b3c
feat: use binop% to elaborate %-applications
...
Motivation: make sure the behavior is consistent with other arithmetic
operators.
This commit also removes the instance
```
instance : HMod (Fin n) Nat (Fin n) where
hMod := Fin.modn
```
because we have a coercion from `Fin n` to `Nat`.
Thus, given `a : Fin n` and `b : Nat`, `a % b` is ambiguous.
2022-07-09 14:38:35 -07:00
Leonardo de Moura
305630cc23
fix: ElabAppArgs.finalize bug
2022-07-09 13:53:15 -07:00
Leonardo de Moura
0074038405
fix: missing term info
2022-07-09 12:19:10 -07:00
Leonardo de Moura
bdaabd4e7b
feat: propagate return type to for-in block
2022-07-08 17:29:30 -07:00
Leonardo de Moura
d50b33175d
feat: improve forIn elaborator element type propagation
2022-07-08 16:34:42 -07:00
Leonardo de Moura
e4e0f775d6
feat: improve outParam as result type support
2022-07-08 15:29:48 -07:00
Sebastian Ullrich
d7bcc271be
refactor: avoid nested sequence in simpleBinder
2022-07-08 19:06:10 +02:00
Leonardo de Moura
bf91956449
fix: add workaround for issue #1293
...
This is a temporary hack until we port the C++ code to Lean.
closes #1293
2022-07-07 23:39:35 -07:00
Leonardo de Moura
6ef81e1cdf
fix: bug at the code specialization cache
...
closes #1292
2022-07-07 22:59:18 -07:00
Leonardo de Moura
58619291e9
feat: better qualified name support in recursive definitions
2022-07-07 20:15:25 -07:00
Leonardo de Moura
db47664d4a
fix: discrepancy between isDefEq and whnf for transparency mode instances
2022-07-07 15:39:58 -07:00
Leonardo de Moura
fce7697151
fix: def _root_ and dotted notation in recursive definitions
...
closes #1289
2022-07-07 07:57:51 -07:00
Sebastian Ullrich
29bdc0ceac
fix: bound syntax kind at v:(ppSpace ident) etc.
2022-07-07 11:49:35 +02:00
Leonardo de Moura
0425fabf8f
test: test for output parameter + coercion issue
2022-07-06 16:55:08 -07:00