Commit graph

3587 commits

Author SHA1 Message Date
Leonardo de Moura
b6ef65d8fd fix: where structure instance parser
closes #753
2021-12-12 07:52:52 -08:00
Leonardo de Moura
a3361e7d86 fix: missing universe assignments made during TC resolution
closes #796
2021-12-12 07:07:13 -08:00
Leonardo de Moura
483f32edd8 feat: in pure code, do use assume Id monad at do notation
This feature produced counterintuitive behavior and confused users.
See discussion at #770.

As pointed out by @tydeu, it is not too much work to write `Id.run <|`
before the `do` when we want to use the `do` notation in pure code.

closes #770
2021-12-10 12:55:14 -08:00
Leonardo de Moura
96e0e1db98 fix: nontermination at simp [OfNat.ofNat]
closes #788
2021-12-10 12:29:33 -08:00
Leonardo de Moura
e64cfbb9b2 test: well-founded recursion example
see #860
2021-12-09 14:32:06 -08:00
Leonardo de Moura
41040a81de fix: auxiliary matcher definitions should be treated as abbreviations
The motivation is to prevent performance problems such as the one
described at issue #854.

Fixes #854 after a update stage0
2021-12-07 16:43:20 -08:00
Leonardo de Moura
b0fe1e5d10 feat: add Tomas Skrivan's TC resolution improvement
This commit implements the TC resolution improvement suggested by
Tomas at #815.

Closes #815.
2021-12-06 17:46:11 -08:00
Sebastian Ullrich
80c3d88e3e refactor: optimize critical import path 2021-12-06 08:05:24 -08:00
Leonardo de Moura
b2d88f7bcc fix: bug at saveEqn 2021-12-02 17:38:39 -08:00
Leonardo de Moura
bb768b06cd feat: add PersistentArray.foldrM 2021-12-02 17:17:55 -08:00
Leonardo de Moura
c42196440f fix: give preference to non-indices at findRecArg
fixes #837
2021-12-01 16:45:19 -08:00
Sebastian Ullrich
465913c391 fix: this must be a keyword 2021-11-29 10:06:15 -08:00
Sebastian Ullrich
531eefb7db chore: adapt syntax 2021-11-29 10:06:15 -08:00
Leonardo de Moura
0aa32d643e fix: eta struct and proof irrelevance issue
see #777
2021-11-27 07:15:57 -08:00
Leonardo de Moura
2d113e83f9 feat: eta struct support for unit-like datatypes
For example, given `a b : Unit`, we have that `a` and `b` are
definitionally equal by `etaStruct`.

See #777
2021-11-26 08:36:25 -08:00
Sebastian Ullrich
e9f7c88299 feat: record doc strings of builtin parsers & elaborators 2021-11-26 17:13:19 +01:00
Leonardo de Moura
0fc8c1da77 feat: eta for structures at recursors
see #777
2021-11-25 11:31:00 -08:00
Leonardo de Moura
a8f4146070 feat: support eta struct recursively
Addresses issues raised by @gebner at #777
2021-11-23 17:38:48 -08:00
Gabriel Ebner
7537fa7795 fix: unfold x<y in discrimination tree module 2021-11-23 07:34:51 -08:00
Leonardo de Moura
e15a656fd2 fix: remove @[reducible] annotation from Function.comp and Function.const
closes #813
2021-11-23 07:29:25 -08:00
Leonardo de Moura
d685c545b4 feat: eta for structures 2021-11-23 06:21:25 -08:00
Leonardo de Moura
d9b057af03 fix: fixes #793 2021-11-22 13:28:08 -08:00
Gabriel Ebner
f55649f81b fix: prefer simp lemmas with *higher* priority 2021-11-22 11:52:45 -08:00
Leonardo de Moura
2a7b33089a fix: transparency settings at simp TC check
fixes #790
2021-11-15 18:09:31 -08:00
Leonardo de Moura
4b2fa38cb8 fix: #check_failure command should succeed if there are stuck TC problems 2021-11-15 16:56:55 -08:00
Leonardo de Moura
9a152d2051 fix: use withSynthesize at elabStructInstance
fixes #783
2021-11-15 16:45:26 -08:00
Leonardo de Moura
743810b77a feat: use binrel_no_prop% to define == notation
fixes #764
2021-11-09 07:46:10 -08:00
Sebastian Ullrich
177d45a752 chore: fail without decreasing proof 2021-11-06 18:29:59 +01:00
Sebastian Ullrich
03551487ad chore: simplify test 2021-11-05 10:45:27 +01:00
Sebastian Ullrich
6e45685310 fix: propositions should never be considered enum types 2021-11-04 15:27:15 -07:00
Leonardo de Moura
3367501511 fix: inaccessible annotations at isDefEq issue
Issue was reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Change.20in.20pattern.20matching.3B.20expected.20behaviour.3F/near/259059096

fixes #742
2021-10-27 09:26:12 -07:00
Gabriel Ebner
bfc74decde feat: add info field to Syntax.node 2021-10-26 20:19:27 +02:00
Leonardo de Moura
3d1f682144 feat: missing whnf at checkParamsAndResultType 2021-10-25 13:08:43 -07:00
Leonardo de Moura
57f02804f3 feat: use forallTelescopeReducing
This is needed now that we allow definitions at `inductive`.
2021-10-25 13:05:23 -07:00
Leonardo de Moura
80a73dd903 feat: basic support for definitions at inductive declarations 2021-10-25 12:44:35 -07:00
Leonardo de Moura
1bd78590e6 test: for Lean 3 nocomputable issue
Issue reported at
https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/noncomputable.20tainting/near/258174927
2021-10-19 07:15:55 -07:00
Leonardo de Moura
1d372ed7e3 test: well-founded recursion for unary function 2021-10-19 06:47:59 -07:00
Leonardo de Moura
c425397b45 feat: Hashable instances for UInt8 and UInt16 2021-10-18 17:19:39 -07:00
Leonardo de Moura
e336ff5f93 feat: indentation sensitiviy for macro and elab commands
This commit fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Command.20terminator/near/257674790
2021-10-18 17:16:09 -07:00
Leonardo de Moura
284177a80a feat: missing instances and getOp for byte/float arrays 2021-10-18 16:54:56 -07:00
Leonardo de Moura
6b2303b243 fix: bug at tryLemmaCore when numExtraArgs > 1
Fixes bug reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Simp.20bug.20-.20produces.60application.20type.20mismatch.60/near/257711901
2021-10-18 13:59:19 -07:00
Sebastian Ullrich
d3cf0b8098 fix: deriving Ord on parameterized types
Fixes #732
2021-10-18 10:08:13 +02:00
Leonardo de Moura
81729d96f9 fix: make sure Quot primitives stay in eta expanded form
fixes #716
2021-10-08 09:36:06 -07:00
Leonardo de Moura
15ac3c2542 test: small repro for issue #716 2021-10-08 09:36:06 -07:00
Leonardo de Moura
85150731b7 test: put unit back, but rename it to someVal
It is the simple and more efficient.
We just set `someVal` with the first value of `vars`.
Recall that `vars` is never empty.
2021-10-06 18:09:06 -07:00
Leonardo de Moura
f64753c106 test: simplify ac_expr.lean
We don't want to avoid proofs at `List.getIdx` and `Expr` when doing proofs by reflection.
The new encoding avoids that by using the fact that `vars` in
`Context` should never be empty.

To be honest, the best approach is still the old `unit`. We can just
rename it to `inhabitant` to make sure users don't assume it is the
unit of the AC operator. Then, we can just set it with the first element
of `vars` and avoid proofs at `denote`.
2021-10-06 17:56:26 -07:00
Leonardo de Moura
079ad47f02 fix: mixed unary and non-unary functions 2021-10-06 17:33:51 -07:00
Leonardo de Moura
790a22c5df test: mutual recursion by well-founded recursion 2021-10-06 16:38:42 -07:00
Leonardo de Moura
7f660af4c6 feat: add repeat tactic to conv mode 2021-10-06 14:05:44 -07:00
Leonardo de Moura
8ec9fda6c4 fix: improve widening operator used at the ElimDeadBranches abstract interpreter 2021-10-06 12:54:07 -07:00