Commit graph

26061 commits

Author SHA1 Message Date
Sebastian Ullrich
d3eb5deeea chore: Nix: fix macOS build 2021-09-22 16:00:13 +02:00
Sebastian Ullrich
5a4309e599 refactor: bootstrap.nix 2021-09-22 14:43:32 +02:00
Chris Lovett
ad7c5b26a7
fix: UTF-8 file path support for lean on Windows
* fix msys2 windows build so the windows apps support utf-8 file paths.

* use windres to compile default-manifest.o

* windres is in binutils.

* stop modifying default-manifest.o

* copy to stage0

* fix semicolon joining of lists in add_custom_target

* undo changes to stage0 as per CR feedback.

* fix makefile

* fix: revert cmakelists.txt COMMAND_EXPAND_LISTS  change

* fix: msys2 dependencies

* add unit test for decoding UTF-8 chars to prove "lean.exe" can read utf-8 encoded files where utf-8 is also used in the file name.

* fix: utf-8 test by using windows-2022

* fix: do we really need cmake 3.11 or will 3.10 do?

* nope, really does require cmake 11.
2021-09-22 12:21:52 +02:00
Leonardo de Moura
6b1bed5c38 chore: fix test output 2021-09-21 20:37:23 -07:00
Leonardo de Moura
07fb8504a1 fix: bug introduced today 2021-09-21 20:36:18 -07:00
Leonardo de Moura
a909e8cf26 feat: arity mismatch error message at well-founded recursion 2021-09-21 20:34:15 -07:00
Leonardo de Moura
ed47091691 chore: add extra trace messages and document issue 2021-09-21 20:33:44 -07:00
Leonardo de Moura
c41b3d6928 fix: reset local context at addPreDefinitions 2021-09-21 20:18:59 -07:00
Leonardo de Moura
ee2bdc1f84 feat: add WF/PackDomain.lean 2021-09-21 19:38:43 -07:00
Leonardo de Moura
6a880fecc9 chore: modify findDocString? 2021-09-21 17:29:40 -07:00
Leonardo de Moura
5a301d8c3b refactor: add src/Lean/Elab/PreDefinition/WF directory 2021-09-21 15:44:21 -07:00
Leonardo de Moura
640fc964b6 feat: basic termination_by bookkeeping 2021-09-21 15:24:42 -07:00
Leonardo de Moura
d43876ac2d chore: fix test 2021-09-21 14:54:45 -07:00
Leonardo de Moura
b8ca5ff280 chore: update stage0 2021-09-21 13:19:20 -07:00
Leonardo de Moura
6211b95e06 feat: add termination_by parser 2021-09-21 13:19:01 -07:00
Leonardo de Moura
bb98057098 refactor: avoid wf suffix 2021-09-21 12:57:08 -07:00
Leonardo de Moura
10a38aef3c chore: remove class WellFoundedRelation
It is dead code.
2021-09-21 12:57:08 -07:00
Leonardo de Moura
9085167872 test: Fin match test that relies heavily on contradiction
This example is based on a Lean 3 issue described at
https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/equation.20compiler.20help.20me.20plz
2021-09-21 12:57:08 -07:00
Leonardo de Moura
59ed4dea7b feat: add runTactic for running tactic Syntax in MetaM 2021-09-21 12:57:08 -07:00
Mauricio Collares
245d36147e chore: lean4-mode: support native elisp compilation 2021-09-21 16:23:52 +02:00
Leonardo de Moura
0351c96831 feat: better error message for induction tactic on mutually inductives 2021-09-21 06:56:17 -07:00
Sebastian Ullrich
15109b5f23 chore: remove obsolete file 2021-09-21 15:54:16 +02:00
Leonardo de Moura
2cbf0ba8e9 test: add "parameters" that are fixed in all equations 2021-09-20 12:58:22 -07:00
Leonardo de Moura
06a741be5c feat: ensure equational theorem conditions occur after the main variables 2021-09-20 11:41:33 -07:00
Leonardo de Moura
5fe40fbccf refactor: add sortFVarIds to Meta/Basic.lean 2021-09-20 11:32:53 -07:00
Leonardo de Moura
41a58459d7 test: equational theorem generation 2021-09-20 11:12:42 -07:00
Sebastian Ullrich
0a6778d05f chore: silence clang warning when exporting Lean function declared in lean.h 2021-09-20 18:41:46 +02:00
Sebastian Ullrich
6eca75ddbd fix: include exported declarations in defining file 2021-09-20 18:41:46 +02:00
Sebastian Ullrich
b13d3e6ca5 fix: dllexport functions not already annotated in header 2021-09-20 18:41:46 +02:00
Sebastian Ullrich
60ffdd094c fix: annotate lean.h functions with LEAN_SHARED 2021-09-20 18:41:46 +02:00
Sebastian Ullrich
da516f5aa7 fix: write .c output file in binary mode for reproducibility 2021-09-20 18:41:46 +02:00
Sebastian Ullrich
23c3dc335b chore: avoid cmake -E env
It was calling into WSL bash on my machine...
2021-09-20 18:41:46 +02:00
Sebastian Ullrich
0fcc2a0fff chore: remove --export-all 2021-09-20 18:41:46 +02:00
Sebastian Ullrich
f5aa8ea4f5 chore: update stage0 2021-09-20 18:41:46 +02:00
Sebastian Ullrich
35ffae6f54 feat: Windows: explicitly export Lean functions only 2021-09-20 18:41:46 +02:00
Leonardo de Moura
1868cea536 fix: "stuck at universe contraint" issues 2021-09-20 07:22:14 -07:00
Leonardo de Moura
11cdc65820 chore: update stage0 2021-09-20 07:14:24 -07:00
Leonardo de Moura
9e980b2a78 fix: bug at decAux?
We are getting a few "stuck at universe constraint" errors after the
fix. We may need to add some kind of approximation in the future.
2021-09-20 07:12:57 -07:00
Sebastian Ullrich
585fba69e8 refactor: remove redundancy from common register_parser_alias case
/cc @leodemoura
2021-09-20 13:20:23 +02:00
Sebastian Ullrich
83c2e8bf75 feat: expose many(1)Indent as parser aliases 2021-09-20 13:20:23 +02:00
Leonardo de Moura
f2a418a7ae chore: smartUnfolding cleanup
We remove dead code, update comments, and add new tests

See #445
2021-09-19 15:29:11 -07:00
Leonardo de Moura
2395bb3b35 chore: update stage0 2021-09-19 15:19:12 -07:00
Leonardo de Moura
5b0a1c2b2f feat: smart unfolding support for nested match-expressions
See #445
2021-09-19 15:17:56 -07:00
Leonardo de Moura
35d9589401 feat: add MonadControl m (OptionT m) 2021-09-19 14:20:26 -07:00
Leonardo de Moura
fe55205105 test: equational theorem test 2021-09-19 09:34:08 -07:00
Leonardo de Moura
82f3042fa4 fix: equational theorem generation for structural recursion 2021-09-19 08:48:40 -07:00
Leonardo de Moura
233a262c03 feat: improve whnfReducibleLHS? 2021-09-19 08:33:51 -07:00
Leonardo de Moura
35c7081377 feat: improve casesOnStuckLHS 2021-09-19 08:28:10 -07:00
Leonardo de Moura
c2d33a1a58 fix: bug at addSmartUnfoldingDef
The approach using `matcherBelowDep : NameSet` was not correct because
we "reuse" matcher-declarations. For example, in the definition
```
def f : Nat → Bool
  | 0 => true
  | n + 1 => (match n with
    | 0 => true
    | _ + 1 => true) && f n
```
we have to `match`-expressions but they can be compiled the same
matcher `f.match_1`. Thus, the set `matcherBelowDep` would contain
`f.match_1` since the first occurence refined the `Nat.below` argument
at `mkBRecOn`. Thus, `addSmartUnfoldingDef` was incorrectly assuming the second
`match` was refined too.

We fixed this issue by simulating `mkBRecOn` behavior.

fixes #445
2021-09-18 19:15:38 -07:00
Leonardo de Moura
e8cd32ff24 chore: add mkBelowName 2021-09-18 18:37:29 -07:00