Leonardo de Moura
6cdc6cb1d0
feat: add contradiction
2021-03-03 17:00:54 -08:00
Leonardo de Moura
40c340d1a0
feat: helper match methods
2021-03-03 16:16:34 -08:00
Leonardo de Moura
4a095a7da6
feat: helper methods
2021-03-03 16:16:17 -08:00
Leonardo de Moura
7df503c4e4
refactor: add findLocalDeclWithType?
2021-03-03 15:44:32 -08:00
Leonardo de Moura
728418aa9d
feat: add ForIn instance for LocalContext
2021-03-03 15:43:48 -08:00
Leonardo de Moura
4aec7579db
test: add do equivalence examples
2021-03-03 13:44:30 -08:00
Leonardo de Moura
f1245f9dc7
fix: bug at isDefEqOffset
...
fixes #326
2021-03-02 17:28:40 -08:00
Leonardo de Moura
12e9d1f7d2
chore: use double backticks
2021-03-02 17:28:40 -08:00
Sebastian Ullrich
6d00fcf1d6
chore: revert release bit
2021-03-02 19:16:35 +01:00
Sebastian Ullrich
26dda3f63d
feat: release 4.0.0-m2
2021-03-02 18:37:05 +01:00
Leonardo de Moura
5626b537c7
chore: move nondet to Std/Control/Nondet.lean
2021-03-02 07:57:25 -08:00
Leonardo de Moura
228bc2dd54
refactor: Traversable => ForM
2021-03-02 06:22:22 -08:00
Leonardo de Moura
81ba5485dd
refactor: StateCpsT
...
Define `run` and `run'` using `runK`.
Write auxiliary simp lemmas using `runK`.
2021-03-02 06:22:22 -08:00
Leonardo de Moura
bbf158005f
chore: make sure it matches the paper
2021-02-28 17:57:00 -08:00
Leonardo de Moura
35e1f5ad97
refactor: Foldable => Traversable
2021-02-28 16:11:20 -08:00
Leonardo de Moura
9234145955
chore: disable test on Windows
...
See comment
2021-02-28 11:11:53 -08:00
Leonardo de Moura
9d9f14cd5e
chore: mark List.foldlM as protected
2021-02-28 09:14:37 -08:00
Leonardo de Moura
ef4d5950ae
feat: add Foldable typeclass
...
We use it in the "`do` unchained" paper.
It will eventually replace `ForIn`.
2021-02-28 09:00:52 -08:00
Leonardo de Moura
fdbb87c1fd
fix: specialize.cpp
2021-02-28 08:29:50 -08:00
Leonardo de Moura
f9483a8068
feat: add ExceptCpsT.runCatch
2021-02-27 18:59:58 -08:00
Leonardo de Moura
481189bcf4
feat: add ExceptCpsT
2021-02-27 18:44:24 -08:00
Leonardo de Moura
238f96b616
feat: add StateCpsT
2021-02-27 18:21:19 -08:00
Leonardo de Moura
df9cde94e6
feat: add support for re-specialization
2021-02-27 16:44:34 -08:00
Leonardo de Moura
6a6f68f6cc
feat: missing lemmas
2021-02-27 10:42:30 -08:00
Leonardo de Moura
b9ef6f89a4
chore: cleanup
2021-02-26 19:34:39 -08:00
Leonardo de Moura
1c50603112
fix: ReplaceLocalDecl
2021-02-26 19:31:40 -08:00
Leonardo de Moura
f329726711
fix: missing withMainMVarContext
2021-02-26 19:00:09 -08:00
Leonardo de Moura
5662e2e745
refactor: move ToString Syntax and BEq Syntax to Init
2021-02-26 13:21:04 -08:00
Sebastian Ullrich
e2a8ee8520
feat: highlight corresponding do (if any) when hovering over return
2021-02-26 14:58:09 +01:00
Sebastian Ullrich
a519f723cd
chore: improve watchdog error message on file worker crash
2021-02-26 14:58:09 +01:00
Sebastian Ullrich
7c73ff072f
chore: print unhandled file worker errors to stderr
2021-02-26 14:58:09 +01:00
Sebastian Ullrich
8b20a939aa
fix: Reader
2021-02-26 14:58:09 +01:00
Leonardo de Moura
597635c074
fix: is_recursive_fn
2021-02-25 19:48:12 -08:00
Leonardo de Moura
6e950ff216
chore: compilation time
2021-02-25 18:00:58 -08:00
Leonardo de Moura
0c1c6c0a73
feat: convert universe metavariables into parameters after elaborating theorem header
...
closes #318
Like Lean 3, we are doing it only for theorems.
@Kha, we talked about doing it for definitions too, it sounded like a
good idea, and it would make the system's behavior more uniform, but
unfortunately it creates too many problems. There are so many trivial
cases where it breaks. Here are some examples.
1- Definitions that take multiple bundled structures
```
def foo (s1 : Group) (s2 : CommRing) ...
```
They are universe polymorphic, and the different structures must be in
the same universe, but we don't know it when we elaborate the header,
that is, we need to elaborate the body.
An extreme case is `PUnit` occurring in the header. It is universe
polymorphic, but we only lear the constraints on this universe after
we elaborate the body.
2- All files containing unification hints broke.
Again, there are universe constraints on the header that we only learn
after we elaborate the body.
3- Many `CoeSort` and `CoeFun` examples broke.
Example:
```
structure Group :=
(carrier : Type u) (mul : carrier → carrier → carrier) (one : carrier)
instance GroupToType : CoeSort Group (Type u) :=
CoeSort.mk (fun g => g.carrier)
```
We would have to write
```
instance GroupToType : CoeSort Group.{u} (Type u) :=
CoeSort.mk (fun g => g.carrier)
```
We would have to provide universe level parameters manually in this
kind of instance. I think it would be too annoying.
2021-02-25 16:53:58 -08:00
Leonardo de Moura
352337479b
chore: remove duplicate
2021-02-25 16:20:12 -08:00
Zygimantas Straznickas
49ebd30fd5
fix: fix deriving Repr for structure-like inductives
...
The deriving code currently uses isStructureLike when choosing whether to use
Inductive or Structure logic, which fails for inductives that are
structure-like. The commit changes the code to use isStructure.
2021-02-25 13:38:33 -08:00
Leonardo de Moura
1b16f9b33c
fix: make sure kernel checks examples
...
We discard the resulting environment for examples.
closes #309
cc @Kha
2021-02-25 13:34:27 -08:00
Leonardo de Moura
d770c55326
feat: universe level parameters in instances are outParam by default
...
This commit makes sure Lean 4 treats universe level parameters in
instances as `outParam`s. This the behavior in Lean 3.
fixes #319
2021-02-25 13:21:53 -08:00
Leonardo de Moura
d9d948087f
fix: use TransparencyMode.instances at SynthInstance
2021-02-25 13:08:51 -08:00
Leonardo de Moura
d3a914c1ff
chore: cleanup
2021-02-23 12:52:14 -08:00
Leonardo de Moura
162062b3de
feat: improve Lawful.lean
2021-02-23 12:38:00 -08:00
Leonardo de Moura
506602c650
chore: remove unnecessary let
2021-02-23 11:35:50 -08:00
Leonardo de Moura
98348dfe7f
feat: add ExceptT.run_bind_lift and ExceptT.bind_throw
...
Remove `[simp]` attribute from `ExceptT.run_bind`
2021-02-23 08:17:11 -08:00
Leonardo de Moura
c1231b1b43
fix: fixes #317
...
BTW, I had to add the auxiliary `loop` fuction to workaround a bug in the
old compiler C++ code.
cc @Kha
2021-02-22 11:09:19 -08:00
Leonardo de Moura
3850b1a9aa
perf: workaround for increasing the number of destructive updates
...
See 4908eaf396
2021-02-21 16:22:53 -08:00
Leonardo de Moura
322fc79d84
perf: cache inferConstType
2021-02-21 15:48:36 -08:00
Leonardo de Moura
50b6561f8f
chore: cleanup
2021-02-21 14:04:00 -08:00
Leonardo de Moura
4908eaf396
perf: add workaround for destructive update issue
2021-02-21 13:03:45 -08:00
Leonardo de Moura
d0574d8eb1
feat: add LawfulMonad for StateT
2021-02-21 10:52:53 -08:00