Scott Morrison
54de6271fd
merge master
2024-02-14 12:14:04 +11:00
Scott Morrison
fdc64def1b
feat: upstream 'Try this:' widgets ( #3266 )
...
There is a test file in Std that should later be reunited with this
code.
---------
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2024-02-13 21:58:36 +00:00
Leonardo de Moura
644d4263f1
fix: #eval command was leaking auxiliary declarations into the environment ( #3323 )
2024-02-13 21:44:52 +00:00
Leonardo de Moura
eb7951e872
chore: replace tactic builtin
2024-02-13 13:39:34 -08:00
Mario Carneiro
56d703db8e
fix: trailing whitespace in location formatter ( #3318 )
...
This causes problems when used in conjunction with `#guard_msgs` (which
checks whitespace) and trailing whitespace removal. Discovered by
@PatrickMassot in verbose-lean4.
2024-02-13 15:53:29 +00:00
Henrik Böving
50d661610d
perf: LLVM backend, put all allocas in the first BB to enable mem2reg ( #3244 )
...
Again co-developed with @bollu.
Based on top of: #3225
While hunting down the performance discrepancy on qsort.lean between C
and LLVM we noticed there was a single, trivially optimizeable, alloca
(LLVM's stack memory allocation instruction) that had load/stores in the
hot code path. We then found:
https://groups.google.com/g/llvm-dev/c/e90HiFcFF7Y .
TLDR: `mem2reg`, the pass responsible for getting rid of allocas if
possible, only triggers on an alloca if it is in the first BB. The
allocas of the current implementation get put right at the location
where they are needed -> they are ignored by mem2reg.
Thus we decided to add functionality that allows us to push all allocas
up into the first BB.
We initially wanted to write `buildPrologueAlloca` in a `withReader`
style so:
1. get the current position of the builder
2. jump to first BB and do the thing
3. revert position to the original
However the LLVM C API does not expose an option to obtain the current
position of an IR builder. Thus we ended up at the current
implementation which resets the builder position to the end of the BB
that the function was called from. This is valid because we never
operate anywhere but the end of the current BB in the LLVM emitter.
The numbers on the qsort benchmark got improved by the change as
expected, however we are not fully there yet:
```
C:
Benchmark 1: ./qsort.lean.out 400
Time (mean ± σ): 2.005 s ± 0.013 s [User: 1.996 s, System: 0.003 s]
Range (min … max): 1.993 s … 2.036 s 10 runs
LLVM before aligning the types
Benchmark 1: ./qsort.lean.out 400
Time (mean ± σ): 2.151 s ± 0.007 s [User: 2.146 s, System: 0.001 s]
Range (min … max): 2.142 s … 2.161 s 10 runs
LLVM after aligning the types
Benchmark 1: ./qsort.lean.out 400
Time (mean ± σ): 2.073 s ± 0.011 s [User: 2.067 s, System: 0.002 s]
Range (min … max): 2.060 s … 2.097 s 10 runs
LLVM after this
Benchmark 1: ./qsort.lean.out 400
Time (mean ± σ): 2.038 s ± 0.009 s [User: 2.032 s, System: 0.001 s]
Range (min … max): 2.027 s … 2.052 s 10 runs
```
Note: If you wish to merge this PR independently from its predecessor,
there is no technical dependency between the two, I'm merely stacking
them so we can see the performance impacts of each more clearly.
2024-02-13 14:54:40 +00:00
Eric Wieser
0554ab39aa
doc: Add a docstring to Simp.Result and its fields ( #3319 )
2024-02-13 13:57:24 +00:00
Scott Morrison
3a6ebd88bb
chore: upstream repeat/split_ands/subst_eqs ( #3305 )
...
Small tactics used in the implementation of `ext`.
---------
Co-authored-by: Leonardo de Moura <leomoura@amazon.com >
2024-02-13 12:21:14 +00:00
Scott Morrison
e601cdb193
chore: upstream replace tactic
2024-02-13 22:57:16 +11:00
Henrik Böving
06f73d621b
fix: type mismatches in the LLVM backend ( #3225 )
...
Debugged and authored in collaboration with @bollu.
This PR fixes several performance regressions of the LLVM backend
compared to the C backend
as described in #3192 . We are now at the point where some benchmarks
from `tests/bench` achieve consistently equal and sometimes ever so
slightly better performance when using LLVM instead of C. However there
are still a few testcases where we are lacking behind ever so slightly.
The PR contains two changes:
1. Using the same types for `lean.h` runtime functions in the LLVM
backend as in `lean.h` it turns out that:
a) LLVM does not throw an error if we declare a function with a
different type than it actually has. This happened on multiple occasions
here, in particular when the function used `unsigned`, as it was
wrongfully assumed to be `size_t` sized.
b) Refuses to inline a function to the call site if such a type mismatch
occurs. This means that we did not inline important functionality such
as `lean_ctor_set` and were thus slowed down compared to the C backend
which did this correctly.
2. While developing this change we noticed that LLVM does treat the
following as invalid: Having a function declared with a certain type but
called with integers of a different type. However this will manifest in
completely nonsensical errors upon optimizing the bitcode file through
`leanc` such as:
```
error: Invalid record (Producer: 'LLVM15.0.7' Reader: 'LLVM 15.0.7')
```
Presumably because the generate .bc file is invalid in the first place.
Thus we added a call to `LLVMVerifyModule` before serializing the module
into a bitcode file. This ended producing the expected type errors from
LLVM an aborting the bitcode file generation as expected.
We manually checked each function in `lean.h` that is mentioned in
`EmitLLVM.lean` to make sure that all of their types align correctly
now.
Quick overview of the fast benchmarks as measured on my machine, 2 runs
of LLVM and 2 runs of C to get a feeling for how far the averages move:
- binarytrees: basically equal performance
- binarytrees.st: basically equal performance
- const_fold: equal if not slightly better for LLVM
- deriv: LLVM has 8% more instructions than C but same wall clock time
- liasolver: basically equal performance
- qsort: LLVM is slower by 7% instructions, 4% time. We have identified
why the generated code is slower (there is a store/load in a hot loop in
LLVM that is not in C) but not figured out why that happens/how to
address it.
- rbmap: LLVM has 3% less instructions and 13% less wall-clock time than
C (woop woop)
- rbmap_1 and rbmap_10 show similar behavior
- rbmap_fbip: LLVM has 2% more instructions but 2% better wall time
- rbmap_library: equal if not slightly better for LLVM
- unionfind: LLVM has 5% more instructions but 4% better wall time
Leaving out benchmarks related to the compiler itself as I was too lazy
to keep recompiling it from scratch until we are on a level with C.
Summing things up, it appears that LLVM has now caught up or surpassed
the C backend in the microbenchmarks for the most part. Next steps from
our side are:
- trying to win the qsort benchmark
- figuring out why/how LLVM runs more instructions for less wall-clock
time. My current guesses would be measurement noise and/or better use of
micro architecture?
- measuring the larger benchmarks as well
2024-02-13 10:57:35 +00:00
Scott Morrison
c27474341e
chore: upstream change tactic ( #3308 )
...
We previously had the syntax for `change` and `change at`, but no
implementation.
This moves Kyle's implementation from Std.
This also changes the `changeLocalDecl` function to push nodes to the
infotree about FVar aliases.
---------
Co-authored-by: Leonardo de Moura <leomoura@amazon.com >
Co-authored-by: David Thrane Christiansen <david@davidchristiansen.dk >
2024-02-13 04:47:11 +00:00
Scott Morrison
27b962f14d
chore: upstream liftCommandElabM ( #3304 )
...
These are used in the implementation of `ext`.
2024-02-13 04:17:19 +00:00
Scott Morrison
2032ffa3fc
chore: DiscrTree helper functions ( #3303 )
...
`DiscrTree` helper functions from `Std`, used in `ext`, `exact?`, and
`aesop`.
(There are a few more to follow later, with other Std dependencies.)
2024-02-13 03:46:31 +00:00
Scott Morrison
c424d99cc9
chore: upstream left/right tactics ( #3307 )
...
Co-authored-by: Joachim Breitner <mail@joachim-breitner.de >
2024-02-13 03:45:59 +00:00
Mario Carneiro
fbedb79b46
fix: add_decl_doc should check that declarations are local ( #3311 )
...
This was causing a panic previously, [reported on
Zulip](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/CI.20errors.20that.20are.20not.20local.20errors/near/420986393 ).
2024-02-12 12:04:51 +00:00
Eric Wieser
1965a022eb
doc: fix typos around inductiveCheckResultingUniverse ( #3309 )
...
The unpaired backtick was causing weird formatting in vscode doc hovers.
Also closes an unpaired `(` in an error message.
2024-02-12 10:11:50 +00:00
Scott Morrison
90b08ef22e
feat: upstream guard_expr ( #3297 )
...
Co-authored-by: Leonardo de Moura <leomoura@amazon.com >
2024-02-11 23:25:04 +00:00
Wojciech Nawrocki
66e8cb7966
doc: implicit type arguments are indexed in the discrtree ( #3301 )
...
A small fix to the `DiscrTree` documentation to reflect the fact that
implicit type arguments *are* indexed and do not become `star` or
`other`. The following is a reproduction:
```lean
import Lean
open Lean Meta Elab Tactic
elab "test_tac" t:term : tactic => do
Tactic.withMainContext do
let e ← Term.elabTerm t none
let a : DiscrTree Nat ← DiscrTree.empty.insert e 1 {}
logInfo m!"{a}"
example (α : Type) (ringAdd : Add α) : True := by
/- (Add.add => (node (Nat => (node (* => (node (0 => (node (1 => (node #[1])))))))))) -/
test_tac @Add.add Nat instAddNat 0 1
/- (Add.add => (node (_uniq.1154 => (node (* => (node (◾ => (node (◾ => (node #[1])))))))))) -/
test_tac @Add.add α ringAdd ?_ ?_
```
2024-02-11 21:42:54 +00:00
Scott Morrison
4718af5474
chore: upstream rcases ( #3292 )
...
This moves the `rcases` and `obtain` tactics from Std, and makes them
built-in tactics.
We will separately move the test cases from Std after #3297
(`guard_expr`).
---------
Co-authored-by: Leonardo de Moura <leomoura@amazon.com >
2024-02-10 05:22:02 +00:00
Leonardo de Moura
c138801c3a
chore: rwa tactic macro ( #3299 )
2024-02-10 04:59:24 +00:00
Leonardo de Moura
5b4c24ff97
chore: add nomatch tactic ( #3294 )
2024-02-10 04:59:06 +00:00
Leonardo de Moura
1cb7450f40
fix: nomatch regression ( #3296 )
2024-02-10 04:58:48 +00:00
Leonardo de Moura
02d1ebb564
fix: extended coe notation and delaborator ( #3295 )
2024-02-10 04:58:28 +00:00
Lean stage0 autoupdater
488bfe2128
chore: update stage0
2024-02-09 12:46:12 +00:00
Sebastian Ullrich
55402a5899
feat: add [builtin_code_action_provider] ( #3289 )
2024-02-09 11:51:40 +00:00
Sebastian Ullrich
659218cf17
feat: add [builtin_widget_module] ( #3288 )
2024-02-09 11:20:46 +00:00
Scott Morrison
904239ae61
feat: upstream some Syntax/Position helper functions used in code actions in Std ( #3260 )
...
Co-authored-by: David Thrane Christiansen <david@davidchristiansen.dk >
2024-02-09 10:50:19 +00:00
Sebastian Ullrich
b548b4faae
refactor: make Promise implementation opaque ( #3273 )
...
This follows the standard `Ref` recipe and moves the `unsafeCast` into
C++
2024-02-09 10:43:41 +00:00
Scott Morrison
a7364499d2
chore: update line numbers in test after rebase
2024-02-09 10:05:54 +01:00
Leonardo de Moura
003835111d
chore: fix tests
2024-02-09 18:23:46 +11:00
Scott Morrison
61a8695ab1
chore: update stage0
2024-02-09 18:23:46 +11:00
Leonardo de Moura
127214bd18
chore: cleanup and move unsafe term elaborator to BuiltinNotation
2024-02-09 18:23:46 +11:00
Scott Morrison
b1944b662c
chore: update stage0
2024-02-09 18:23:46 +11:00
Leonardo de Moura
a17832ba14
chore: add unsafe term builtin parser
2024-02-09 18:23:46 +11:00
Scott Morrison
561ac09d61
chore: make mkAuxName private, add comment about alternatives
2024-02-09 18:23:46 +11:00
Scott Morrison
f68429d3a7
chore: move syntax to Init/Notation, make builtin_term_elab
2024-02-09 18:23:46 +11:00
Scott Morrison
a58232b820
core: upstream Std.Util.TermUnsafe
2024-02-09 18:23:46 +11:00
Scott Morrison
696b08dca2
chore: upstream Std.Tactic.CoeExt to Lean.Elab.CoeExt ( #3280 )
...
Moves the `@[coe]` attribute and associated elaborators/delaborators
from Std to Lean.
---------
Co-authored-by: Leonardo de Moura <leomoura@amazon.com >
2024-02-09 04:55:49 +00:00
Scott Morrison
3a63b72eea
chore: update stage0
2024-02-09 15:56:57 +11:00
Leonardo de Moura
9c160b8030
feat: nofun tactic and term
...
closes #3279
2024-02-09 15:56:57 +11:00
Scott Morrison
4bd75825b4
chore: update stage0
2024-02-09 15:56:57 +11:00
Leonardo de Moura
709e9909e7
feat: add nofun term parser
...
This new syntax suggested by @semorrison for the `fun.` Std macro.
2024-02-09 15:56:57 +11:00
Scott Morrison
83dd720337
chore: upstream MetavarContext helpers ( #3284 )
...
These are from Std, but mostly used in Aesop.
2024-02-09 03:58:10 +00:00
Scott Morrison
ac631f4736
feat: allow overriding getSimpTheorems in mkSimpContext ( #3281 )
...
The `push_cast` tactic in Std currently uses a copy-paste version of
`mkSimpContext` that allows overriding `getSimpTheorems`. However it has
been diverging from the version in Lean.
This is one way of generalizing `mkSimpContext` in Lean to allow what is
needed downstream., but I'm not at all set on this one. As far as I can
see there are no other tactics currently using this.
`push_cast` itself just replaces `getSimpTheorems` with
`pushCastExt.getTheorems`, where `pushCastExt` is a simp extension. If
there is another approach that suits that situation it would be fine.
I've tested that the change in this PR works downstream.
2024-02-09 03:57:40 +00:00
Leonardo de Moura
1f547225d1
feat: nary nomatch ( #3285 )
...
Base for https://github.com/leanprover/lean4/pull/3279
---------
Co-authored-by: Scott Morrison <scott.morrison@gmail.com >
2024-02-09 00:28:34 +00:00
Leonardo de Moura
09a43990aa
refactor: move if-then-else tactic to Init
2024-02-09 09:57:57 +11:00
Leonardo de Moura
819848a0db
chore: update stage0
2024-02-09 09:57:57 +11:00
Leonardo de Moura
8f8b0a8322
chore: fix proofs and test
2024-02-09 09:57:57 +11:00
Leonardo de Moura
9f633dcba2
chore: add register_parser_alias for matchRhs
2024-02-09 09:57:57 +11:00
Leonardo de Moura
cd4c7e4c35
refactor: move by_cases to Init/Classical.lean
2024-02-09 09:57:57 +11:00
Scott Morrison
9908823764
chore: upstream Std.Tactic.ByCases
2024-02-09 09:57:57 +11:00
Joe Hendrix
3e313d38f4
chore: upstream Std.Data.Array.Init.Basic ( #3282 )
...
This migrates the handful of array operations in
[Std.Data.Array.Init.Basic](https://github.com/leanprover/std4/blob/main/Std/Data/Array/Init/Basic.lean ).
2024-02-08 19:30:47 +00:00
Scott Morrison
1b101a3d43
chore: upstream Std.Lean.Tactic ( #3278 )
...
A simple one, a small variant on `evalTacticAt`.
Perhaps a rename is in order?
2024-02-08 19:30:08 +00:00
Joe Hendrix
adcec8e67a
chore: upstream Divides class and syntax ( #3283 )
...
This just upstreams the class and notation. Instances will be provided
with Nat/Int upstream
2024-02-08 08:09:02 +00:00
Scott Morrison
86d032ebf9
chore: upstream Std.Lean.LocalContext ( #3275 )
2024-02-08 07:43:25 +00:00
Scott Morrison
92ca504903
feat: upstreaming the json% term elaborator ( #3265 )
...
This is used in the "Try this:" widget machinery powering `simp?`.
There is a test file in Std, which I am not upstreaming at the same
time, as that relies on more code actions / #guard_msgs material. That
test file will still of course test things from Std, and later it can be
reunited with the code it is testing.
---------
Co-authored-by: Leonardo de Moura <leomoura@amazon.com >
2024-02-08 03:30:41 +00:00
Scott Morrison
021dd2d509
feat: additional options for Format.pretty ( #3264 )
...
These additional options are currently implemented in Std in a function
`Format.prettyExtra` (via `open private`), and used to implement the
`simp?` functionality.
This just adds the options to the core function.
2024-02-07 23:25:21 +00:00
Scott Morrison
2ad3c6406e
feat: upstream TSyntax helper functions ( #3261 )
...
From Std.Lean.Syntax.
2024-02-07 22:53:27 +00:00
Scott Morrison
211770e2f9
feat: upstream helper functions for Name ( #3263 )
...
This does not completely empty `Std.Lean.Name`, as working out how to
document the difference between `Name.isInternalDetail` and
`Name.isImplementationDetail` requires further thought.
2024-02-07 21:51:58 +00:00
Leonardo de Moura
760e824b9f
fix: we should not crash when simp loops ( #3269 )
...
see #3267
2024-02-07 02:30:28 +00:00
Scott Morrison
17722369c6
feat: InfoTree helper function used in code actions ( #3262 )
...
Co-authored-by: David Thrane Christiansen <david@davidchristiansen.dk >
2024-02-06 23:31:28 +00:00
Joachim Breitner
64688d4cee
fix: let induction handle parameters ( #3256 )
...
The induction principle used by `induction` may have explicit parameters
that are
not motive, target or “real” alternatives (that have the `motive` as
conclusion), e.g. restrictions on the `motive` or other parameters.
Previously, `induction` would treat them as normal alternatives, and try
to re-introduce the automatically reverted hypotheses. But this only
works when the `motive` is actually the conclusion in the type of that
alternative.
We now pay attention to that, thread that information through, and only
revert when needed.
Fixes #3212 .
2024-02-06 20:32:12 +00:00
Scott Morrison
69d462623e
fix: don't drop doc-comments on simprocs ( #3259 )
2024-02-06 20:31:36 +00:00
Leonardo de Moura
17520fa0b8
fix: cache issue at split tatic ( #3258 )
...
closes #3229
---------
Co-authored-by: Scott Morrison <scott.morrison@gmail.com >
Co-authored-by: Joachim Breitner <mail@joachim-breitner.de >
2024-02-06 19:44:28 +00:00
Jesse Wright
0055baf73a
doc: add links to folder references ( #3249 )
...
This PR adds links to some folder references in the docs, making them
easier to navigate.
Please advise if these need to be made to be full URIs rather than
relative paths in order to work correctly with the doc generation
tooling that is in place.
2024-02-05 13:30:48 +00:00
Joachim Breitner
f40c999f68
feat: improve termination_by error messages ( #3255 )
...
as suggested in
<https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/termination_by.20regression/near/419786430 >
Also refactored the code a bit and removed the code smell around
`GuessLex`-produced termination arguments (which may not be
surface-syntactically expressible) a bit by introducing an explicit flag
for those.
2024-02-05 13:13:53 +00:00
Leonardo de Moura
cf092e7941
refactor: add helper function evalPropStep ( #3252 )
2024-02-04 21:50:34 +00:00
Scott Morrison
43bbedca46
chore: begin development cycle for v4.7.0 ( #3243 )
2024-02-01 23:29:32 +00:00
Marcus Rossel
509f35df02
doc: fix typos ( #3236 )
2024-02-01 19:03:58 +00:00
Sebastian Ullrich
732b266de0
chore: CI: do not fail on broken links ( #3238 )
2024-02-01 13:40:27 +00:00
Kyle Miller
1d8cf38ff9
feat: pp.numericTypes option for printing number literals with type ascriptions ( #2933 )
...
Implements the pretty printer option `pp.numericTypes` for including a
type ascription for numeric literals. For example, `(2 : Nat)`, `(-2 :
Int)`, and `(-2 / 3 : Rat)`. This is useful for debugging how arithmetic
expressions have elaborated or have been otherwise transformed. For
example, with exponentiation is is helpful knowing whether it is `x ^ (2
: Nat)` or `x ^ (2 : Real)`. This is like the Lean 3 option
`pp.numeralTypes` but it has a wider notion of a numeric literal.
Also implements the pretty printer option `pp.natLit` for including the
`nat_lit` prefix for raw natural number literals.
Closes #3021
2024-02-01 17:23:32 +11:00
Leonardo de Moura
a4226a4f6d
fix: tolerate missing simp and simproc sets
...
When we declare a `simp` set using `register_simp_attr`, we
automatically create `simproc` set. However, users may create `simp`
sets programmatically, and the associated `simproc` set may be missing
and vice-versa.
2024-02-01 16:58:54 +11:00
Leonardo de Moura
76224e409b
fix: Mathlib regressions reported by Scott
2024-02-01 16:58:54 +11:00
Leonardo de Moura
c3383de6ff
feat: add helper method withDischarger
2024-02-01 16:58:54 +11:00
Scott Morrison
e5b1c87606
chore: update stage0
2024-02-01 16:58:54 +11:00
Leonardo de Moura
da072c2ec8
fix: simp cache issue
2024-02-01 16:58:54 +11:00
Leonardo de Moura
d3c71ce2ff
refactor: remove unfoldGround and cacheGround workarounds from simp
2024-02-01 16:58:54 +11:00
Scott Morrison
da21ef4fe8
chore: update stage0
2024-02-01 16:58:54 +11:00
Leonardo de Moura
168217b2bd
chore: remove TODOs
2024-02-01 16:58:54 +11:00
Leonardo de Moura
8deb1838aa
feat: add seval
2024-02-01 16:58:54 +11:00
Leonardo de Moura
3d1b3c6b44
chore: getSimpCongrTheorems to CoreM
2024-02-01 16:58:54 +11:00
Leonardo de Moura
676121c71d
chore: style
2024-02-01 16:58:54 +11:00
Leonardo de Moura
6439d93389
chore: remove dead code
2024-02-01 16:58:54 +11:00
Scott Morrison
e4e6601546
chore: update stage0
2024-02-01 16:58:54 +11:00
Leonardo de Moura
01469bdbd6
refactor: remove workaround
...
We don't need to keep passing `discharge?` method around anymore.
2024-02-01 16:58:54 +11:00
Leonardo de Moura
01750e2139
chore: mark simprocs that are relevant for the symbolic evaluator
2024-02-01 16:58:54 +11:00
Scott Morrison
8037a8733d
chore: update stage0
2024-02-01 16:58:54 +11:00
Leonardo de Moura
c4e6e48690
feat: builtin seval simproc attribute
2024-02-01 16:58:54 +11:00
Leonardo de Moura
9cfca51257
chore: register seval simp set
2024-02-01 16:58:54 +11:00
Leonardo de Moura
de886c617d
feat: simproc sets
...
The command `register_simp_attr` now also declares a `simproc` set.
2024-02-01 16:58:54 +11:00
Leonardo de Moura
755b59c2cf
chore: update RELEASES.md
2024-02-01 16:58:54 +11:00
Leonardo de Moura
266075b8a4
chore: fix tests
2024-02-01 16:58:54 +11:00
Scott Morrison
8db28ac32f
chore: update stage0
2024-02-01 16:58:54 +11:00
Leonardo de Moura
b4a290a203
refactor: simp Step and Simproc types
...
Before this commit, `Simproc`s were defined as `Expr -> SimpM (Option Step)`, where `Step` is inductively defined as follows:
```
inductive Step where
| visit : Result → Step
| done : Result → Step
```
Here, `Result` is a structure containing the resulting expression and a proof demonstrating its equality to the input. Notably, the proof is optional; in its absence, `simp` assumes reflexivity.
A simproc can:
- Fail by returning `none`, indicating its inapplicability. In this case, the next suitable simproc is attempted, along with other simp extensions.
- Succeed and invoke further simplifications using the `.visit`
constructor. This action returns control to the beginning of the
simplification loop.
- Succeed and indicate that the result should not undergo further
simplifications. However, I find the current approach unsatisfactory, as it does not align with the methodology employed in `Transform.lean`, where we have the type:
```
inductive TransformStep where
/-- Return expression without visiting any subexpressions. -/
| done (e : Expr)
/--
Visit expression (which should be different from current expression) instead.
The new expression `e` is passed to `pre` again.
-/
| visit (e : Expr)
/--
Continue transformation with the given expression (defaults to current expression).
For `pre`, this means visiting the children of the expression.
For `post`, this is equivalent to returning `done`. -/
| continue (e? : Option Expr := none)
```
This type makes it clearer what is going on. The new `Simp.Step` type is similar but use `Result` instead of `Expr` because we need a proof.
2024-02-01 16:58:54 +11:00
Matthew Robert Ballard
03f344a35f
feat: use supplied structure fields left to right and eta reduce terms in structure instance elaboration ( #2478 )
...
Modifies the structure instance elaborator to
1. Fill in missing fields from sources in strict left-to-right order. In
`{a, b with}`, sometimes the elaborator
would ignore `a` even if both `a` and `b` provided the same field,
depending on what subobject fields they had.
2. Use the sources, or subobjects of the sources, to fill in entire
subobjects of the target structure as much as possible.
Currently, a field cannot be filled directly by a source itself
resulting in the term being eta expanded.
This change avoids this unnecessary and surprisingly costly extra eta
expansion.
Adds two new tests to illustrate the performance benefit (one courtesy
@semorrison). These are currently failing on master and succeed on this
branch.
There is one additional test to exercise the changes to the elaboration
of structure instances.
Changes to make mathlib build are in leanprover-community/mathlib4#9843
Closes #2451
2024-02-01 03:42:39 +00:00
Mac Malone
a48ca7b0a4
feat: lake: improved platform information & control ( #3226 )
...
This combines a few platform-related changes:
* Add a ternary `platformIndependent` Lean configuration option to
assert whether Lake should assume Lean code is platform-independent. If
`true`, Lake will exclude platform-independent objects like external
libraries or dynlibs created through `precompileModules` from module
traces. If `false`, Lake will add the platform to module traces. If
`none` (the default), Lake will retain the current behavior (modules are
platform-dependent if and only if it depends on native objects).
* Use `System.Platform.target` from #3207 as the platform descriptor in
Lake for the configuration file trace, the cloud release archive, and as
the platform trace in Lean modules and native artifacts (e.g., object
files, and static and shared libraries).
* Do not add the platform descriptor into custom build archive names
(i.e., a user-set `buildArchive` configuration). This allows users to
create cross-platform / platform-independent archives via a name
override should they so desire.
Closes #2754 .
2024-01-31 23:56:33 +00:00
Jon Eugster
1cb1602977
doc: add doc for FileMap ( #3221 )
2024-01-31 21:51:37 +00:00
Mario Carneiro
c98deeb709
feat: @[unused_variables_ignore_fn] attribute ( #3184 )
...
This replaces the no-op `unusedVariablesIgnoreFnsExt` environment
extension with an actual environment extension which can be extended
using either `@[unused_variables_ignore_fn]` or
`@[builtin_unused_variables_ignore_fn]` (although for the present all
the builtin `unused_variables_ignore_fn`s are being added using direct
calls to `builtin_initialize addBuiltinUnusedVariablesIgnoreFn`, because
this also works and a stage0 update is required before the attribute can
be used).
We would like to use this attribute to disable unused variables in
syntaxes defined in std and mathlib, like
[`proof_wanted`](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Unused.20variables.20and.20proof_wanted/near/408554690 ).
2024-01-31 19:27:32 +00:00
Marc Huisinga
cd0be38bb4
feat: elidible subterms ( #3201 )
...
This PR adds two new delaboration settings: `pp.deepTerms : Bool`
(default: `true`) and `pp.deepTerms.threshold : Nat` (default: `20`).
Setting `pp.deepTerms` to `false` will make the delaborator terminate
early after `pp.deepTerms.threshold` layers of recursion and replace the
omitted subterm with the symbol `⋯` if the subterm is deeper than
`pp.deepTerms.threshold / 4` (i.e. it is not shallow). To display the
omitted subterm in the InfoView, `⋯` can be clicked to open a popup with
the delaborated subterm.
<details>
<summary>InfoView with pp.deepTerms set to false (click to show
image)</summary>

</details>
### Implementation
- The delaborator is adjusted to use the new configuration settings and
terminate early if the threshold is exceeded and the corresponding term
to omit is shallow.
- To be able to distinguish `⋯` from regular terms, a new constructor
`Lean.Elab.Info.ofOmissionInfo` is added to `Lean.Elab.Info` that takes
a value of a new type `Lean.Elab.OmissionInfo`.
- `ofOmissionInfo` is needed in `Lean.Widget.makePopup` for the
`Lean.Widget.InteractiveDiagnostics.infoToInteractive` RPC procedure
that is used to display popups when clicking on terms in the InfoView.
It ensures that the expansion of an omitted subterm is delaborated using
`explicit := false`, which is typically set to `true` in popups for
regular terms.
- Several `Info` widget utility functions are adjusted to support
`ofOmissionInfo`.
- The list delaborator is adjusted with special support for `⋯` so that
long lists `[x₁, ..., xₖ, ..., xₙ]` are shortened to `[x₁, ..., xₖ, ⋯]`.
2024-01-31 17:28:29 +00:00
Lean stage0 autoupdater
578a2308b1
chore: update stage0
2024-01-31 15:48:29 +00:00
Joachim Breitner
279607f5f8
refactor: forallAltTelescope to take altNumParams ( #3230 )
...
this way this function does not have to peek at the `altType` to see
when there are no more arguments, which makes it a bit more explicit,
and also a bit more robust should one apply this function to the type of
an alternative with the motive already instantiated.
It seems this uncovered a variable shadow bug, where the counter `i` was
accidentially reset after removing the `i`’th entry in `ys`.
2024-01-31 11:03:03 +00:00
Sebastian Ullrich
456e435fe0
chore: remove unused GH Pages deployment ( #3217 )
2024-01-31 10:39:15 +00:00
Kyle Miller
31981090e4
feat: make intro be aware of let_fun ( #3115 )
...
Adds support for `let_fun` to the `intro` and `intros` tactics. Also
adds support to `intro` for anonymous binder names, since the default
variable name for a `letFun` with an eta reduced body is anonymous.
2024-01-31 08:55:52 +00:00
David Thrane Christiansen
dd77dbdc11
chore: add GitHub token to manual link checker ( #3235 )
...
Hopefully this will avoid [429 errors from
GitHub](da4c46370d )
2024-01-31 06:44:00 +00:00
Kyle Miller
fcb30c269b
doc: expand docstring for intros ( #2777 )
...
The docstring for `intros` did not explain the difference between the
zero-argument and the one-or-more-argument cases.
2024-01-30 22:59:02 +00:00
Sebastian Ullrich
5f59d7f7b4
fix: do not throw C++ heartbeat exceptions in pure functions ( #3224 )
2024-01-29 20:27:27 +00:00
Marc Huisinga
1364157e91
doc: adjust RELEASES.md call hierarchy url ( #3220 )
...
This links a better description of what the call hierarchy does.
2024-01-26 15:54:18 +00:00
David Thrane Christiansen
a524fd4be8
doc: update link target ( #3218 )
...
This fixes a link target found by the link checker CI for lean-lang.org
2024-01-26 10:20:22 +00:00
Joachim Breitner
de23226d0c
refactor: fuse nested mkCongrArg calls ( #3203 )
...
Encouraged by the performance gains from making `rewrite` produce
smaller proof objects
(#3121 ) I am here looking for low-hanging fruit in `simp`.
Consider this typical example:
```
set_option pp.explicit true
theorem test
(a : Nat)
(b : Nat)
(c : Nat)
(heq : a = b)
(h : (c.add (c.add ((c.add b).add c))).add c = c)
: (c.add (c.add ((c.add a).add c))).add c = c
```
We get a rather nice proof term when using
```
:= by rw [heq]; assumption
```
namely
```
theorem test : ∀ (a b c : Nat),
@Eq Nat a b →
@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c b) c))) c) c →
@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c a) c))) c) c :=
fun a b c heq h =>
@Eq.mpr (@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c a) c))) c) c)
(@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c b) c))) c) c)
(@congrArg Nat Prop a b (fun _a => @Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c _a) c))) c) c) heq) h
```
(this is with #3121 ).
But with `by simp only [heq]; assumption`, it looks rather different:
```
theorem test : ∀ (a b c : Nat),
@Eq Nat a b →
@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c b) c))) c) c →
@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c a) c))) c) c :=
fun a b c heq h =>
@Eq.mpr (@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c a) c))) c) c)
(@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c b) c))) c) c)
(@id
(@Eq Prop (@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c a) c))) c) c)
(@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c b) c))) c) c))
(@congrFun Nat (fun a => Prop) (@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c a) c))) c))
(@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c b) c))) c))
(@congrArg Nat (Nat → Prop) (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c a) c))) c)
(Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c b) c))) c) (@Eq Nat)
(@congrFun Nat (fun a => Nat) (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c a) c))))
(Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c b) c))))
(@congrArg Nat (Nat → Nat) (Nat.add c (Nat.add c (Nat.add (Nat.add c a) c)))
(Nat.add c (Nat.add c (Nat.add (Nat.add c b) c))) Nat.add
(@congrArg Nat Nat (Nat.add c (Nat.add (Nat.add c a) c)) (Nat.add c (Nat.add (Nat.add c b) c)) (Nat.add c)
(@congrArg Nat Nat (Nat.add (Nat.add c a) c) (Nat.add (Nat.add c b) c) (Nat.add c)
(@congrFun Nat (fun a => Nat) (Nat.add (Nat.add c a)) (Nat.add (Nat.add c b))
(@congrArg Nat (Nat → Nat) (Nat.add c a) (Nat.add c b) Nat.add
(@congrArg Nat Nat a b (Nat.add c) heq))
c))))
c))
c))
h
```
Since simp uses only single-step `congrArg`/`congrFun` congruence lemmas
here, the proof
term grows very large, likely quadratic in this case.
Can we do better? Every nesting of `congrArg` (and it's little brother
`congrFun`) can be
turned into a single `congrArg` call.
In this PR I make making the smart app builders `Meta.mkCongrArg` and
`Meta.mkCongrFun` a bit
smarter and not only fuse with `Eq.refl`, but also with
`congrArg`/`congrFun`.
Now we get, in this simple example,
```
theorem test : ∀ (a b c : Nat),
@Eq Nat a b →
@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c b) c))) c) c →
@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c a) c))) c) c :=
fun a b c heq h =>
@Eq.mpr (@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c a) c))) c) c)
(@Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c b) c))) c) c)
(@congrArg Nat Prop a b (fun x => @Eq Nat (Nat.add (Nat.add c (Nat.add c (Nat.add (Nat.add c x) c))) c) c) heq) h
```
Let’s see if it works and how much we gain.
2024-01-25 17:48:27 +00:00
Joachim Breitner
550fa6994e
feat: induction using <term> ( #3188 )
...
right now, the `induction` tactic accepts a custom eliminator using the
`using <ident>` syntax, but is restricted to identifiers. This
limitation becomes annoying when the elminator has explicit parameters
that are not targets, and the user (naturally) wants to be able to write
```
induction a, b, c using foo (x := …)
```
This generalizes the syntax to expressions and changes the code
accordingly.
This can be used to instantiate a multi-motive induction:
```
example (a : A) : True := by
induction a using A.rec (motive_2 := fun b => True)
case mkA b IH => exact trivial
case A => exact trivial
case mkB b IH => exact trivial
```
For this to work the term elaborator learned the `heedElabAsElim` flag,
`true` by default. But in the default setting, `A.rec (motive_2 := fun b
=> True)`
would fail to elaborate, because there is no expected type. So the
induction
tactic will elaborate in a mode where that attribute is simply ignored.
As a side effect, the “failed to infer implicit target” error message
is improved and prints the name of the implicit target that could not be
instantiated.
2024-01-25 16:57:41 +00:00
Marc Huisinga
f9e5f1f1fd
feat: add call hierarchy support ( #3082 )
...
This PR adds support for the "call hierarchy" feature of LSP that allows
quickly navigating both inbound and outbound call sites of functions. In
this PR, "call" is taken to mean "usage", so inbound and outbound
references of all kinds of identifiers (e.g. functions or types) can be
navigated. To implement the call hierarchy feature, this PR implements
the LSP requests `textDocument/prepareCallHierarchy`,
`callHierarchy/incomingCalls` and `callHierarchy/outgoingCalls`.
<details>
<summary>Showing the call hierarchy (click to show image)</summary>

</details>
<details>
<summary>Incoming calls (click to show image)</summary>

</details>
<details>
<summary>Outgoing calls (click to show image)</summary>

</details>
It is based on #3159 , which should be merged before this PR.
To route the parent declaration name through to the language server, the
`.ilean` format is adjusted, breaking backwards compatibility with
version 1 of the ILean format and yielding version 2.
This PR also makes the following more minor adjustments:
- `Lean.Server.findModuleRefs` now also combines the identifiers of
constants and FVars and prefers constant over FVars for the combined
identifier. This is necessary because e.g. declarations declared using
`where` yield both a constant (for usage outside of the function) and an
FVar (for usage inside of the function) with the same range, whereas we
would typically like all references to refer to the former. This also
fixes a bug introduced in #2462 where renaming a declaration declared
using `where` would not rename usages outside of the function, as well
as a bug in the unused variable linter where `where` declarations would
be reported as unused even if they were being used outside of the
function.
- The function converting `Lean.Server.RefInfo` to `Lean.Lsp.RefInfo`
now also computes the `Lean.DeclarationRanges` for parent declaration
names via `MetaM` and must hence be in `IO` now.
- Add a utility function `Array.groupByKey` to `HashMap.lean`.
- Stylistic refactoring of `Watchdog.lean` and `LanguageFeatures.lean`.
2024-01-25 14:43:23 +00:00
Sebastian Ullrich
6b0e7e1f46
feat: synchronous execution of task continuations ( #3013 )
...
In the new snapshot design, we have a tree of `Task`s that represents
the asynchronously processed document structure. When transforming this
tree in response to a user edit, we want to quickly run through
reusable, already computed nodes of the tree synchronously and then
spawn new tasks for the new parts. The new flag allows us to do such
mixed sync/async tree transformations uniformly. This flag exists as
e.g.
[`ExecuteSynchronously`](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskcontinuationoptions?view=net-8.0 )
in other runtimes.
2024-01-25 13:54:20 +00:00
Sebastian Ullrich
9fb44fae29
doc: remove nightly and other outdated references ( #3027 )
2024-01-25 13:53:36 +00:00
David Thrane Christiansen
1f4359cc80
fix: broken internal links in the docs ( #3216 )
...
I deleted internal links that seemed to have the character of "TODO". I
think that the residual TODO is of little value, given that we plan a
big revamp and revision soon anyway, but I could do it some other way as
well.
2024-01-25 09:56:20 +00:00
Joe Hendrix
8293fd4e09
feat: cleanups to ACI and Identity classes ( #3195 )
...
This makes changes to the definitions of Associativity, Commutativity,
Idempotence and Identity classes to be more aligned with Mathlib's
versions.
The changes are:
* Move classes are moved from `Lean` to root namespace.
* Drop `Is` prefix from names.
* Rename `IsNeutral` to `LawfulIdentity` and add Left and Right
subclasses.
* Change neutral/identity element to outParam.
* Introduce `HasIdentity` for operations not intended for proofs to
implement
The identity changes are to make this compatible with
[Mathlib](718042db9d/Mathlib/Init/Algebra/Classes.lean )
and to enable nicer fold operations in Std that can use type classes to
infer the identity/initial element on binary operations.
---------
Co-authored-by: Kyle Miller <kmill31415@gmail.com >
2024-01-24 21:46:58 +00:00
Sebastian Ullrich
2beb948a3b
feat: System.Platform.target ( #3207 )
...
Makes the LLVM triple of the current platform available to Lean code
towards a solution for #2754 .
Defaults to the empty string if the compiler is not clang, which can
introduce some divergence between CI and local builds but should not be
noticeable in most cases and is not really possible to avoid.
2024-01-24 12:11:00 +00:00
Joachim Breitner
409c6cac4c
fix: predefinition preprocessing: float .mdata out of non-unary applications ( #3204 )
...
Recursive predefinitions contains “rec app” markers as mdata in the
predefinitions,
but sometimes these get in the way of termination checking, when you
have
```
[mdata (fun x => f)] arg
```
Therefore, the `preprocess` pass floats them out of applications
(originally
only for structural recursion, since #2818 also for well-founded
recursion).
But the code was incomplete: Because `Meta.transform` calls `post` on `f
x y` only
once (and not also on `f x`) one has to float out of nested applications
as well.
A consequence of this can be that in a recursive proof, `rw [foo]` does
not work
although `rw [foo _ _]` does.
Also adding the testcase where @david-christiansen and I stumbled over
this
(Maybe the two preprocess modules can be combined, now that #2973 is
landed, will try that
in a follow-up).
2024-01-24 08:37:16 +00:00
Eric Wieser
ec39de8cae
fix: allow generalization in let ( #3060 )
...
As suggested by @kmill, removing an unnecessary `let` (possibly only
there in the first place for copy/paste reasons) seems to fix the
included test.
This makes `~q()` matching in quote4 noticeably more useful in things
like `norm_num` (as it fixes
https://github.com/leanprover-community/quote4/issues/29 )
It also makes a quote4 bug slightly more visible
(https://github.com/leanprover-community/quote4/issues/30 ), but the bug
there already existed anyway, and isn't caused by this patch.
Fixes #3065
2024-01-23 09:02:05 +00:00
Kyle Miller
586c3f9140
feat: make mkApp, mkApp2, ..., mkApp10 have @[match_pattern] attribute ( #2900 )
...
Give n-ary `Expr.app` constructors such as `mkApp2`, `mkApp3`, ...,
`mkApp10` the `@[match_pattern]` attribute so that it is easier to read
and write pattern matching for applications.
2024-01-23 08:56:15 +00:00
David Renshaw
feda615ed5
doc: add missing 'not' in simprocs example in RELEASES.md ( #3206 )
2024-01-22 16:14:18 +00:00
Marc Huisinga
4f41ccfcbf
doc: update RELEASES.md for #3159 ( #3205 )
2024-01-22 13:47:25 +00:00
Marc Huisinga
e9f69d1068
feat: partial context info ( #3159 )
...
This PR facilitates augmenting the context of an `InfoTree` with
*partial* contexts while elaborating a command. Using partial contexts,
this PR also adds support for tracking the parent declaration name of a
term in the `InfoTree`. The parent declaration name is needed to compute
the call hierarchy in #3082 .
Specifically, the `Lean.Elab.InfoTree.context` constructor is refactored
to take a value of the new type `Lean.Elab.PartialContextInfo` instead
of a `Lean.Elab.ContextInfo`, which now refers to a full `InfoTree`
context. The `PartialContextInfo` is then merged into a `ContextInfo`
while traversing the tree using
`Lean.Elab.PartialContextInfo.mergeIntoOuter?`. The partial context
after executing `liftTermElabM` is stored in values of a new type
`Lean.Elab.CommandContextInfo`.
As a result of this, `Lean.Elab.ContextInfo.save` moves to
`Lean.Elab.CommandContextInfo.save`.
For obtaining the parent declaration for a term, a new typeclass
`MonadParentDecl` is introduced to save the parent declaration in
`Lean.Elab.withSaveParentDeclInfoContext`. `Lean.Elab.Term.withDeclName
x` now calls `withSaveParentDeclInfoContext x` to save the declaration
name.
### Migration
**The changes to the `InfoTree.context` constructor break backwards
compatibility with all downstream users that traverse the `InfoTree`
manually instead of going through the functions in `InfoUtils.lean`.**
To fix this, you can merge the outer `ContextInfo` in a traversal with
the `PartialContextInfo` of an `InfoTree.context` node using
`PartialContextInfo.mergeIntoOuter?`. See e.g.
`Lean.Elab.InfoTree.foldInfo` for an example:
```lean
partial def InfoTree.foldInfo (f : ContextInfo → Info → α → α) (init : α) : InfoTree → α :=
go none init
where go ctx? a
| context ctx t => go (ctx.mergeIntoOuter? ctx?) a t
| node i ts =>
let a := match ctx? with
| none => a
| some ctx => f ctx i a
ts.foldl (init := a) (go <| i.updateContext? ctx?)
| _ => a
```
Downstream users that manually save `InfoTree`s may need to adjust calls
to `ContextInfo.save` to use `CommandContextInfo.save` instead and
potentially wrap their `CommandContextInfo` in a
`PartialContextInfo.commandCtx` constructor when storing it in an
`InfoTree` or `ContextInfo.mk` when creating a full context.
### Motivation
As of now, `ContextInfo`s are always *full* contexts, constructed as if
they were always created in `liftTermElabM` after running the
`TermElabM` action. This is not strictly true; we already create
`ContextInfo`s in several places other than `liftTermElabM` and work
around the limitation that `ContextInfo`s are always full contexts in
certain places (e.g. `Info.updateContext?` is a crux that we need
because we can't always create partial contexts at the term-level), but
it has mostly worked out so far. Note that one must be very careful when
saving a `ContextInfo` in places other than `liftTermElabM` because the
context may not be as complete as we would like (e.g. it may lack
meta-variable assignments, potentially leading to a language server
panic).
Unfortunately, the parent declaration of a term is another example of a
context that cannot be provided in `liftTermElabM`: The parent
declaration is usually set via `withDeclName`, which itself lives in
`TermElabM`. So by the time we are trying to save the full
`ContextInfo`, the declaration name is already gone. There is no easy
fix for this like in the other cases where we would really just like to
augment the context with an extra field.
The refactor that we decided on to resolve the issue is to refactor the
`InfoTree` to take a `PartialContextInfo` instead of a `ContextInfo` and
have code that traverses the `InfoTree` merge inner contexts with outer
contexts to produce a full `ContextInfo` value.
### Bumps for downstream projects
- `lean-pr-testing-3159` branch at Std, not yet opened as a PR
- `lean-pr-testing-3159` branch at Mathlib, not yet opened as a PR
- https://github.com/leanprover/LeanInk/pull/57
- https://github.com/hargoniX/LeanInk/pull/1
- https://github.com/tydeu/lean4-alloy/pull/7
- https://github.com/leanprover-community/repl/pull/29
---------
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2024-01-22 12:34:20 +00:00
Scott Morrison
5cc9f6f9cb
chore: CI creates lean-pr-testing-NNNN branches at Std too ( #3200 )
...
Currently we create `lean-pr-testing-NNNN` branches at Mathlib
automatically for each Lean PR.
We don't automatically create one at Std; mostly simply because Std
fails less often, so it has been okay to do this manually as needed. It
is conceptually simpler, however, if this is done uniformly.
This PR:
* does not proceed with Std/Mathlib CI unless the appropriate
`nightly-testing-YYYY-MM-DD` tag exists at Std (like it already doesn't
proceed if that tag is missing at Mathlib)
* creates `lean-pr-testing-NNNN` branches at Std
* when it creates `lean-pr-testing-NNNN` branches at Mathlib, updates
the Std dependency to use the `lean-pr-testing-NNNN` branch at Std
- [x] depends on #3199
Note that because most users do not have write access at Std, in order
to make updates to `lean-pr-testing-NNNN` branches there they will need
to make PRs. These will be merged with a very low bar, and feel free to
ping me for assistance on this. If this is annoying we will automate.
Also, frequent contributors to Lean may ask @digama0 or @joehendrix for
write access in order to easily work on these branches.
This PR requires that we have a secret here with write access at Std.
I'm arranging that [on
zulip](https://leanprover.zulipchat.com/#narrow/stream/348111-std4/topic/bot.20access/near/416686090 ).
I will update the documentation at
https://leanprover-community.github.io/contribute/tags_and_branches.html
to reflect these changes when they are merged.
---------
Co-authored-by: Joachim Breitner <mail@joachim-breitner.de >
2024-01-22 03:06:59 +00:00
Kyle Miller
09aa845940
doc: clarify and expand docstrings for the instantiate functions ( #3183 )
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2024-01-22 02:58:29 +00:00
Scott Morrison
73b87f2558
chore: CI looks for nightly-testing-YYYY-MM-DD at Mathlib as either a branch or tag ( #3199 )
...
As discussed during the FRO meeting 2024-01-18, we are changing the
`nightly-testing-YYYY-MM-DD` branches at Std and Mathlib from branches
to tags, in:
* https://github.com/leanprover/std4/pull/545
* https://github.com/leanprover-community/mathlib4/pull/9842
This PR updates the script that creates the `lean-pr-testing-NNNN`
branches at Mathlib so it is agnostic about whether
`nightly-testing-YYYY-MM-DD` will be a branch or a tag.
---------
Co-authored-by: Joachim Breitner <mail@joachim-breitner.de >
2024-01-20 23:50:03 +00:00
Joachim Breitner
c0f264ffe0
fix: reducing out-of-bounds swap! should return a, not default ( #3197 )
...
`Array.set!` and `Array.swap!` are fairly similar operations, both
modify an array, both take an index that it out of bounds.
But they behave different; all of these return `true`
```
#eval #[1,2].set! 2 42 == #[1,2] -- with panic
#reduce #[1,2].set! 2 42 == #[1,2] -- no panic
#eval #[1,2].swap! 0 2 == #[1,2] -- with panic
#reduce #[1,2].swap! 0 2 == default -- no panic
```
The implementations are
```
@[extern "lean_array_set"]
def Array.set! (a : Array α) (i : @& Nat) (v : α) : Array α :=
Array.setD a i v
```
but
```
@[extern "lean_array_swap"]
def swap! (a : Array α) (i j : @& Nat) : Array α :=
if h₁ : i < a.size then
if h₂ : j < a.size then swap a ⟨i, h₁⟩ ⟨j, h₂⟩
else panic! "index out of bounds"
else panic! "index out of bounds"
```
It seems to be more consistent to unify the behaviors, and define
```
@[extern "lean_array_swap"]
def swap! (a : Array α) (i j : @& Nat) : Array α :=
if h₁ : i < a.size then
if h₂ : j < a.size then swap a ⟨i, h₁⟩ ⟨j, h₂⟩
else a
else a
```
Also adds docstrings.
Fixes #3196
2024-01-19 18:29:18 +00:00
Joachim Breitner
52d0f715c3
refactor: rewrite: produce simpler proof terms ( #3121 )
...
Consider
```
import Std.Tactic.ShowTerm
opaque a : Nat
opaque b : Nat
axiom a_eq_b : a = b
opaque P : Nat → Prop
set_option pp.explicit true
-- Using rw
example (h : P b) : P a := by show_term rw [a_eq_b]; assumption
```
Before, a typical proof term for `rewrite` looked like this:
```
-- Using the proof term that rw produces
example (h : P b) : P a :=
@Eq.mpr (P a) (P b)
(@id (@Eq Prop (P a) (P b))
(@Eq.ndrec Nat a (fun _a => @Eq Prop (P a) (P _a))
(@Eq.refl Prop (P a)) b a_eq_b))
h
```
which is rather round-about, applying `ndrec` to `refl`. It would be
more direct to write
```
example (h : P b) : P a :=
@Eq.mpr (P a) (P b)
(@id (@Eq Prop (P a) (P b))
(@congrArg Nat Prop a b (fun _a => (P _a)) a_eq_b))
h
```
which this change does.
This makes proof terms smaller, causing mild general speed up throughout
the code; if the brenchmarks don’t lie the highlights are
* olean size -2.034 %
* lint wall-clock -3.401 %
* buildtactic execution s -10.462 %
H'T to @digama0 for advice and help.
NB: One might even expect the even simpler
```
-- Using the proof term that I would have expected
example (h : P b) : P a :=
@Eq.ndrec Nat b (fun _a => P _a) h a a_eq_b.symm
```
but that would require non-local changes to the source code, so one step
at a time.
2024-01-19 07:20:58 +00:00
Leonardo de Moura
ec30da8af7
feat: new implementation for simp (config := { ground := true }) ( #3187 )
2024-01-18 17:39:06 +00:00
Joachim Breitner
27b7002138
fix: checkTargets check for duplicate target ( #3171 )
...
The `checkTargets` function introduced in 4a0f8bf2 as
```
checkTargets (targets : Array Expr) : MetaM Unit := do
let mut foundFVars : FVarIdSet := {}
for target in targets do
unless target.isFVar do
throwError "index in target's type is not a variable (consider using the `cases` tactic instead){indentExpr target}"
if foundFVars.contains target.fvarId! then
throwError "target (or one of its indices) occurs more than once{indentExpr target}"
```
looks like it tries to check for duplicate indices, but it doesn’t
actually, as `foundFVars` is never written to.
This adds
```
foundFVars := foundFVars.insert target.fvarId!
```
and a test case.
Maybe a linter that warns about `let mut` that are never writen to would
be useful?
2024-01-18 09:44:17 +00:00
Arthur Adjedj
a2ed4db562
fix: derive BEq on structure with Prop-fields ( #3191 )
...
Closes #3140
---------
Co-authored-by: Joachim Breitner <mail@joachim-breitner.de >
2024-01-18 02:32:51 +00:00
Joachim Breitner
628633d02e
test: failed to infer implicit target ( #3189 )
...
The `induction` tactic complains if implicit targets cannot be inferred,
let’s test that.
2024-01-17 11:17:34 +00:00
Joachim Breitner
f8edf452de
chore: CI: add actionlint action, fix actions ( #3156 )
...
I keep messing things up, so time for some guard rails, so check them
using
[actionlint](https://github.com/raven-actions/actionlint ).
This also runs [shellcheck](https://www.shellcheck.net/ ) on the files.
Shellcheck
is a bit picky about putting double quotes around variables, and will
flag many
cases where we know it’s safe, but why not simply always write the safer
variant.
Unfortunately, actionlint does not (yet) check `actions/github-script`
scripts, which is
unfortunate. Maybe they will in the future
(https://github.com/rhysd/actionlint/issues/389 )
2024-01-15 17:53:04 +00:00
Marcus Rossel
12dc171c48
doc: fix typos ( #3178 )
2024-01-14 14:02:51 +00:00
Mario Carneiro
42e6214a42
feat: lake: GNU/BSD OS detection in test scripts ( #3180 )
...
fixes #3179
2024-01-14 02:49:38 +00:00
Joachim Breitner
53af5ead53
fix: Fix/GuessLex: refine through more casesOnApp/matcherApp ( #3176 )
...
there was a check
if !Structural.recArgHasLooseBVarsAt recFnName fixedPrefixSize e then
that would avoid going through `.refineThrough`/`.addArg` for
matcher/casesOn applications. It seems it tries to detect when refining
the motive/param is pointless, but it was too eager, and cause confusion
with, for example, this reasonably reasonable function:
def foo : (n : Nat) → (i : Fin n) → Bool
| 0, _ => false
| 1, _ => false
| _+2, _ => foo 1 ⟨0, Nat.zero_lt_one⟩
decreasing_by simp_wf; simp_arith
In particular, the `GuessLex` code later expects that the (implict)
`PProd.casesOn` in the implementation of `foo._unary` will refine the
paramter, because else the (rather picky) `unpackArg` fails. But it also
prevents this from being provable.
So let's try without this shortcut.
Fixing this also revealed that `withRecApps` wasn’t looking in all
corners
of a matcherApp/casesOnApp.
Fixes #3175
2024-01-13 18:02:41 +00:00
Joachim Breitner
b706c0064e
chore: pr-release: more robust comment id recognition ( #3173 )
...
this didn’t recognize the new comments with an intro, and thus the bot
would post multiple comments.
The code was also out of sync with mathlib, fixing.
The `first(…)` in the `jq` program makes it more robust in case this
went wrong once (as on #3171 ) and there are now multiple PRs matching.
2024-01-13 02:48:42 +00:00
Joachim Breitner
8e1b51701b
chore: pr-release.yml: parentheses are significant in jq ( #3169 )
2024-01-12 10:20:53 +00:00
Joe Hendrix
ad068824d0
chore: use termination_by in Nat.gcd ( #3164 )
...
This uses the improved termination_by syntax to give Nat.gcd a cleaner
definition. It removes the last explicit use of WellFounded.fix in Init.
This was also partly motivated by leanprover/std4#520 so that unfold
Nat.gcd gives a sensible definition.
2024-01-11 21:31:27 +00:00
Joe Hendrix
7c4c57759d
chore: use more specific import in OfScientific ( #3165 )
...
This just removes a spurious import of `Init.Data.Nat`. That's the only
non-aggregating import of that file in Init.
2024-01-11 18:23:43 +00:00
Joe Hendrix
1118931516
feat: add bitwise operations to reduceNat? and kernel ( #3134 )
...
This adds bitwise operations to reduceNat? and the kernel. It
incorporates some basic test cases to validate the correct operations
are associated.
2024-01-11 18:12:45 +00:00
Mac Malone
7150638836
feat: lake update from unsupported manifest versions ( #3149 )
...
If the current manifest is from unsupported (or has errors), a bare
`lake update` will now discard it and create a new one from scratch
rather than erroring and requiring you to manually delete the manifest.
Lake will produce warnings noting it is ignoring such invalid manifests.
2024-01-11 00:30:56 +00:00
Joachim Breitner
30693a2dae
doc: mention termination_by and decreasing_by ( #3016 )
...
so far, our reference manual did not mention these at all, this takes
the discussion of recursive definition out of the “equation compiler”
section, put it into its own section, and expands it a bit.
This is more a MVP doc change to at least mention the features briefly,
and not the most polished and thought through didactic exposition. But
it provides a start for more improvements.
---------
Co-authored-by: Arthur Adjedj <arthur.adjedj@gmail.com >
Co-authored-by: Scott Morrison <scott.morrison@gmail.com >
Co-authored-by: David Thrane Christiansen <david@davidchristiansen.dk >
2024-01-10 16:35:19 +00:00
Joachim Breitner
368ead54b2
refactor: termination_by changes in stdlib
2024-01-10 17:27:35 +01:00
Joachim Breitner
7c10415cd8
chore: update stage0
2024-01-10 17:27:35 +01:00
Joachim Breitner
b5122b6a7b
feat: per-function termination hints
...
This change
* moves `termination_by` and `decreasing_by` next to the function they
apply to
* simplify the syntax of `termination_by`
* apply the `decreasing_by` goal to all goals at once, for better
interactive use.
See the section in `RELEASES.md` for more details and migration advise.
This is a hard breaking change, requiring developers to touch every
`termination_by` in their code base. We decided to still do it as a
hard-breaking change, because supporting both old and new syntax at the
same time would be non-trivial, and not save that much. Moreover, this
requires changes to some metaprograms that developers might have
written, and supporting both syntaxes at the same time would make
_their_ migration harder.
2024-01-10 17:27:35 +01:00
Sebastian Ullrich
8bc1a9c4ba
chore: actually include full build in benchmark ( #3158 )
...
I must have reverted too much while testing #3104
2024-01-10 14:33:27 +00:00
Eric Wieser
4169cac51f
fix: do not strip dotted components from lean module names ( #2994 )
...
This introduces `FilePath.addExtension` to take a path that we know has
no prior extension, and append a new extension to it.
As this function is simpler than `FilePath.withExtension`, this change
eagerly replaces uses of the latter with the former, except in a few
cases where stripping the extension really is the right thing to do.
This should fix the bug described at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Import.20file.20with.20multiple.20dots.20in.20file.20name/near/404508048 ,
where `import «A.B».«C.D.lean»` is needed to import `A.B/C.D.lean`.
Closes #2999
---------
Co-authored-by: Mac Malone <tydeu@hatpress.net >
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2024-01-10 14:24:26 +00:00
Kyle Miller
c394a834c3
feat: extract delabAppCore, define withOverApp, and make over-applied projections pretty print ( #3083 )
...
To handle delaborating notations that are functions that can be applied
to arguments, extracts the core function application delaborator as a
separate function that accepts the number of arguments to process and a
delaborator to apply to the "head" of the expression.
Defines `withOverApp`, which has the same interface as the combinator of
the same name from std4, but it uses this core function application
delaborator.
Uses `withOverApp` to improve a number of application delaborators,
notably projections. This means Mathlib can stop using `pp_dot` for
structure fields that have function types.
Incidentally fixes `getParamKinds` to specialize default values to use
supplied arguments, which impacts how default arguments are delaborated.
---------
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2024-01-10 13:24:28 +00:00
Geoffrey Irving
9069c538ad
doc: state that Float is IEEE compliant ( #3157 )
...
Github discussion:
https://github.com/leanprover/lean4/pull/3147#discussion_r1446735973
2024-01-10 12:16:42 +00:00
Scott Morrison
4e16eb0476
chore: fix typo from #3148 in pr-release bot ( #3154 )
2024-01-10 03:14:43 +00:00
Leonardo de Moura
e924ef229c
doc: add simproc release notes
2024-01-09 12:57:15 +01:00
Scott Morrison
8012eedab5
test: timeout in Mathlib.Computability.PartrecCode
2024-01-09 12:57:15 +01:00
Leonardo de Moura
33c53a2418
fix: panic at ite and dite simprocs
2024-01-09 12:57:15 +01:00
Scott Morrison
3b9b13b706
test: test for panic in simprocs
2024-01-09 12:57:15 +01:00
Leonardo de Moura
94d51b2321
chore: cleanup builtin simprocs using OptionT
2024-01-09 12:57:15 +01:00
Leonardo de Moura
0342d62109
chroe: fix tests
2024-01-09 12:57:15 +01:00
Leonardo de Moura
4e5ce6b65d
chore: update stage0
2024-01-09 12:57:15 +01:00
Leonardo de Moura
e11b320cd6
chore: use mathlib naming convention
2024-01-09 12:57:15 +01:00
Leonardo de Moura
cb6bfefc7a
chore: better method names
2024-01-09 12:57:15 +01:00
Leonardo de Moura
25ea5f6fa1
chore: add default parameter value for (simprocs : Simprocs)
2024-01-09 12:57:15 +01:00
Leonardo de Moura
4958404f37
chore: add another simproc test
2024-01-09 12:57:15 +01:00
Leonardo de Moura
3e11b5fe15
fix: trace used builtin simprocs even if they are not in the environment
2024-01-09 12:57:15 +01:00
Leonardo de Moura
57bc058209
chore: fix tests
2024-01-09 12:57:15 +01:00
Leonardo de Moura
610fa69f15
chore: update stage0
2024-01-09 12:57:15 +01:00
Leonardo de Moura
3a9b594fc5
chore: remove staging workaround
2024-01-09 12:57:15 +01:00
Leonardo de Moura
0bc8fe48e3
chore: update stage0
2024-01-09 12:57:15 +01:00
Leonardo de Moura
7350d0a3ff
chore: remove staging workaround
2024-01-09 12:57:15 +01:00
Leonardo de Moura
b376b1594e
test: builtin simproc option that is not in the environment
2024-01-09 12:57:15 +01:00
Leonardo de Moura
88801166b6
chore: update stage0
2024-01-09 12:57:15 +01:00
Leonardo de Moura
ad58deeae3
fix: allow builtin simprocs to be provided to simp even if they are not in the environment
...
Motivation: `simp?`
2024-01-09 12:57:15 +01:00
Leonardo de Moura
666d454b42
test: Int simprocs
2024-01-09 12:57:15 +01:00
Leonardo de Moura
b7efd200f0
chore: typo
2024-01-09 12:57:15 +01:00
Leonardo de Moura
e83e467667
feat: add simprocs for Int
2024-01-09 12:57:15 +01:00
Leonardo de Moura
2efa9de78a
feat: add simprocs for UInt
2024-01-09 12:57:15 +01:00
Leonardo de Moura
25baf73005
feat: replace ite and dite shortcircuit theorems with simproc
...
Motivation: better `simp` cache behavior. Recall that `simp` cache
uses `dischargeDepth`.
2024-01-09 12:57:15 +01:00
Leonardo de Moura
0bd424b5e6
feat: add simprocs for Fin
2024-01-09 12:57:15 +01:00
Leonardo de Moura
d841ef5eb5
chore: update stage0
2024-01-09 12:57:15 +01:00
Leonardo de Moura
188ff2dd20
chore: remove bogus registerSimproc
2024-01-09 12:57:15 +01:00
Leonardo de Moura
7564b204ec
feat: add basic simprocs for Nat
2024-01-09 12:57:15 +01:00
Leonardo de Moura
6fd7350c7b
chore: update stage0
2024-01-09 12:57:15 +01:00
Leonardo de Moura
7ed4d1c432
feat: add builtin simproc support
2024-01-09 12:57:15 +01:00
Leonardo de Moura
5f847c4ce3
chore: missing copyright
2024-01-09 12:57:15 +01:00
Leonardo de Moura
090d158fb9
feat: add simp option - <simproc-name>
...
We can now disable `simproc`s using the same notation we use to
disable rewriting rules in the simplifier.
2024-01-09 12:57:15 +01:00
Leonardo de Moura
81ced3bd0f
feat: trace simprocs
2024-01-09 12:57:15 +01:00
Leonardo de Moura
ab721c64b3
feat: add option simprocs
...
It is true by default. Packages can set it to false to disable
simplification procedue support for backward compatibility.
2024-01-09 12:57:15 +01:00
Leonardo de Moura
93369e8773
chore: fix test
2024-01-09 12:57:15 +01:00
Leonardo de Moura
23f2314da7
chore: update stage0
...
`Origin.decl` constructor has an extra field.
2024-01-09 12:57:15 +01:00
Leonardo de Moura
8a23c294a4
fix: simp.trace missing pre annotation
2024-01-09 12:57:15 +01:00
Leonardo de Moura
a7a3ae13dd
feat: allow extra simprocs to be provided as simp arguments
2024-01-09 12:57:15 +01:00
Leonardo de Moura
5edd59806c
feat: simp only should not use default simproc set
2024-01-09 12:57:15 +01:00
Leonardo de Moura
a2aadee28f
feat: simproc declaration vs simproc attribute
...
Allow `simproc`s to be declared without setting the `[simproc]`
attribute. A `simproc` declaration is function + pattern.
Motivation: allow them to be provided as arguments to `simp` **and** `simp only`.
TODO: track their use in `simp`.
TODO: builtin simprocs
2024-01-09 12:57:15 +01:00
Leonardo de Moura
923216f9a9
feat: add simprocs
...
TODO:
- `builtin_simproc` attribute
- more tests
2024-01-09 12:57:15 +01:00
Leonardo de Moura
0f9702f4b4
chore: address feedback
2024-01-09 12:57:15 +01:00
Leonardo de Moura
df53e6c4cf
refactor: simplify simpImpl
2024-01-09 12:57:15 +01:00
Leonardo de Moura
916c97b625
refactor: simplify match-expressions at pre simp method
2024-01-09 12:57:15 +01:00
Leonardo de Moura
439689b219
chore: simplify mutual at simpImpl
2024-01-09 12:57:15 +01:00
Leonardo de Moura
1d78712b6c
refactor: use unsafe code to break recursion in simp implementation
...
Motivations:
- We can simplify the big mutual recursion and the implementation.
- We can implement the support for `match`-expressions in the `pre` method.
- It is easier to define and simplify `Simprocs`.
2024-01-09 12:57:15 +01:00
Leonardo de Moura
39f716f902
chore: fix regression due to changes in previous commits
...
The example was looping with the new `simp` reduction strategy. Here
is the looping trace.
```
List.reverseAux (List.reverseAux as []) bs
==> rewrite using reverseAux_reverseAux
List.reverseAux [] (List.reverseAux (List.reverseAux as []) bs)
==> unfold reverseAux
List.reverseAux (List.reverseAux as []) bs
==> rewrite using reverseAux_reverseAux
List.reverseAux [] (List.reverseAux (List.reverseAux as []) bs)
==> ...
```
2024-01-09 12:57:15 +01:00
Leonardo de Moura
22c8154811
feat: add pre simp lemmas for if-then-else terms
...
See new test for example that takes exponential time without new simp
theorems.
TODO: replace auxiliary theorems with simprocs as soon as we implement them.
2024-01-09 12:57:15 +01:00
Leonardo de Moura
05e9983e25
feat: better support for match-application in the simplifier
...
The new test exposes a performance problem found in software
verification applications.
2024-01-09 12:57:15 +01:00
Leonardo de Moura
f51b356002
feat: add Expr.getAppArgsN
2024-01-09 12:57:15 +01:00
Leonardo de Moura
ec9570fdd0
feat: add Expr.getAppPrefix
2024-01-09 12:57:15 +01:00
Leonardo de Moura
b37fdea5bf
feat: add reduceStep, and try pre simp steps again if term was reduced
2024-01-09 12:57:15 +01:00
Leonardo de Moura
29c245ceba
perf: (try to) fix regression introduced by #3139
2024-01-09 12:57:15 +01:00
Joachim Breitner
b8b49c50b9
refactor: WF.Eqns: remove unreachable fix-folding ( #3133 )
...
I was about to to address the TODO
/- TODO: check arity of the given function. If it takes a PSigma as the
last argument,
this function will produce incorrect results. -/
because we now have an arity-observing variant of `decodePackedArg?` in
`unpackArg` in `PackMutual`, and it would be prudent to use it here.
But I first wanted to create a test case that would actually exhibit
this corner case, and failed.
This code was added in 096e4eb6d0 and it had a test case, but not even
that test case seems to be actually using the `decodePackedArg?`
function, neither back then nor now.
Also, mathlib works without this code.
So this seems to be dead code, possibly due to other changes to the
system, and thus can be removed. A strategically place comments points
back to this PR in case we need to resurrect that code.
2024-01-09 08:17:36 +00:00
Geoffrey Irving
127b309a0d
doc: Document that Float corresponds to 64-bit double in C ( #3147 )
...
Closes #3142 .
---------
Co-authored-by: Scott Morrison <scott@tqft.net >
2024-01-09 08:07:38 +00:00
Arthur Adjedj
b7c3ff6e6d
fix: manage all declarations in a given derive ( #3058 )
...
Closes #3057
2024-01-09 07:42:06 +00:00
Joachim Breitner
0aa2b83450
chore: pr-release.yml: Suggest nightly-with-mathlib ( #3148 )
...
and suggest rebasing instead of waiting, for a more actionable
suggestion.
2024-01-09 03:11:18 +00:00
Joachim Breitner
684f32fabe
feat: let get_elem_tactic_trivial handle [a]'h.2 ( #3132 )
...
The pattern
```
for h : i in [:xs.size] do
let x := xs[i]'h.2
```
is occassionally useful to iterate over an array with the index in
hand. This PR extends the `get_elem_tactic_trivial` so that one can
simply write
```
for h : i in [:xs.size] do
let x := xs[i]
```
fixes #3032 .
2024-01-08 16:23:09 +00:00
Joachim Breitner
eefcbbb37b
chore: pr-release.yaml: indicate information using github status ( #3137 )
...
When looking at a PR I sometimes wonder which `nightly` release is this
based on, and is used for the mathlib testing.
Right now, the action uses a label (`toolchain-available`) for this, but
a label cannot easily carry more information.
It seems a rather simple way to communicate extra information is by
setting [commit
statuses](https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#create-a-commit-status );
with this change the following statuses will appear in the PR:

One could also use
[checks](https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#create-a-check-run )
to add more information, even with a nicely formatted markdown
description as in [this
example](https://github.com/nomeata/lean4/pull/1/checks?check_run_id=20165137082 ),
but it seems there you can’t set a summary that’s visible without an
extra click, and Github seems to associate these checks to “the first
workflow”, which is odd. So using statuses seems fine here.
Often one uses bots writing PR comments for this purpose, but that's a
bit noisy (extra notifications etc.), especially for stuff that happens
on every PR, but isn’t always interesting/actionable
If this works well, we can use this for more pieces of information, and
a link can be added as well.
2024-01-08 06:44:01 +00:00
Joe Hendrix
903493799d
fix: reduceNat? match terms with free or meta variables ( #3139 )
...
This removes checks in `Lean.Meta.reduceNat?` that caused it to fail on
terms it could handle because they contain meta variables in arguments.
This lead to those operations being reduced using their equational
definitions and slow performance on large patterns:
```
set_option profiler true
set_option profiler.threshold 1
def testMod (x:Nat) :=
match x with
| 128 % 1024 => true
| _ => false
-- elaboration took 3.02ms
def testMul (x:Nat) :=
match x with
| 128 * 1 => true
| _ => false
-- type checking took 11.1ms
-- compilation of testMul.match_1 took 313ms
-- compilation of testMul took 65.7ms
-- elaboration took 58.9ms
```
Performance is slower on `testMul` than `testMod` because `whnf` ends up
evaluateing `128 * 1` using Peano arithmetic while `128 % 1024` is able
to avoid that treatment since `128 < 1024`.
2024-01-05 18:08:26 +00:00
David Thrane Christiansen
7d90b0558e
chore: Netlify deployment for manual ( #3138 )
...
Set up Netlify deployment for our manual in addition to GH Pages
---------
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2024-01-04 18:07:46 +00:00
Scott Morrison
504b6dc93f
feat: do not instantiate metavariables in kabstract/rw for disallowed occurrences ( #2539 )
...
Fixes #2538 .
2024-01-03 00:01:40 +00:00
Joachim Breitner
6998acad66
doc: fix typo “reursive” ( #3131 )
2024-01-02 17:16:24 +00:00
Kyle Miller
cc1dcf8043
feat: delaborate have inside do blocks ( #3116 )
2024-01-02 09:36:39 +00:00
Leonardo de Moura
f54bce2abb
chore: remove unused argument
2023-12-28 10:41:04 -08:00
Joachim Breitner
1145976ff9
test: test “motive is not type correct” ( #3122 )
2023-12-28 15:28:17 +00:00
Marcus Rossel
13d41f82d7
doc: fix typos ( #3114 )
2023-12-23 18:55:48 +00:00
Sebastian Ullrich
caf7a21c6f
chore: include full build in stdlib benchmark ( #3104 )
2023-12-23 16:27:07 +00:00
Wojciech Nawrocki
7c38649527
chore: remove workaround in widgets ( #3105 )
...
This is a follow-up on #2964 that ~~updates stage0,~~ removes a
workaround ~~, and updates release notes.~~
2023-12-22 14:52:53 +00:00
Mario Carneiro
d1a15dea03
fix: hover info for cases h : ... ( #3084 )
...
This makes hover info, go to definition, etc work for the `h` in `cases
h : e`. The implementation is similar to that used for the `generalize h
: e = x` tactic.
2023-12-21 22:39:23 +00:00
Scott Morrison
f1f8db4856
chore: begin development cycle for v4.6.0 ( #3109 )
2023-12-21 22:39:04 +00:00
Scott Morrison
bcc49d1c5f
chore: update tests for #2966 to use test_extern ( #3092 )
...
#2966 was the `@[extern]` bug that prompted development of the
`test_extern` command, but then we merged the fix to #2966 without
updating the tests to use `test_extern`.
2023-12-21 22:22:47 +00:00
Joachim Breitner
63d00ea3c2
doc: avoid universe issue in example type class code ( #3098 )
...
by allowing `Inhabited` to apply to any sort.
fixes #3096 .
2023-12-21 16:57:26 +00:00
Lean stage0 autoupdater
fdc52e0ea9
chore: update stage0
2023-12-21 12:02:01 +00:00
Sebastian Ullrich
767139b235
chore: use all cores in stdlib benchmark
2023-12-21 10:37:18 +01:00
Sebastian Ullrich
bddb2152e5
chore: default compiler.enableNew to false until development restarts ( #3034 )
2023-12-21 07:48:25 +00:00
Wojciech Nawrocki
8d04ac171d
feat: bundle of widget improvements ( #2964 )
...
Implements RFC #2963 .
Leftover tasks:
- [x] Provide companion PR to vscode-lean4 (leanprover/vscode-lean4#376 )
- [x] Companion PR to std4 (leanprover/std4#467 )
- [x] Companion PR to ProofWidgets4
(leanprover-community/ProofWidgets4#36 )
- [X] Companion commit to mathlib4
(0f4660f655 )
- [ ] ~~Update the manual chapter~~ (will do in a follow-up)
2023-12-21 06:24:33 +00:00
Kyle Miller
ae6fe098cb
feat: Rust-style raw string literals ( #2929 )
...
For example, `r"\n"` and `r#"The word "this" is in quotes."#`.
Implements #1422
2023-12-20 16:53:08 +00:00
Joachim Breitner
79c7b27034
chore: pr-release: Also work with older tags ( #3097 )
2023-12-20 10:11:05 +00:00
Wojciech Nawrocki
2644b239a3
feat: snippet extension ( #3054 )
...
# Summary
This makes a small addition to our take on the LSP protocol
in the form of supporting snippet text edits.
It has been discussed
[here](https://github.com/microsoft/language-server-protocol/issues/592 )
on the LSP issue tracker for a while,
but seems unlikely to be added anytime soon.
This feature was requested by @PatrickMassot for the purposes
of supporting Lean code templates in code actions and widgets.
---------
Co-authored-by: David Thrane Christiansen <david@davidchristiansen.dk >
2023-12-20 09:29:19 +00:00
Mac Malone
eb432cd3b7
fix: lake: save config trace before elab ( #3069 )
...
Lake will now delete any old `.olean` and save the new trace before
elaborating a configuration file. This will enable the automatic
reconfiguration of the file if elaboration fails.
Fixes an issue that was [discussed on
Zulip](https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Invalid.20lake.20configuration/near/406717198 ).
2023-12-19 21:29:41 +00:00
lu-bulhoes
312ea12bc2
fix: fixing path of the generated binary in documentation ( #3093 )
...
This PR fixes the documentation error in "Extended Setup Notes", where
the path of builded binary is pointed to
`./build/bin/foo`, but the truly path is `./lake/build/bin/foo`.
---
Closes #3094 (`RFC` or `bug` issue number fixed by this PR, if any)
2023-12-19 17:26:55 +00:00
Kyle Miller
67bfa19ce0
feat: add quot_precheck for expression tree elaborators (binop%, etc.) ( #3078 )
...
There were no `quot_precheck` instances registered for the expression
tree elaborators, which prevented them from being usable in a `notation`
expansion without turning off the quotation prechecker.
Users can evaluate whether `set_option quotPrecheck false` is still
necessary for their `notation` definitions.
2023-12-18 16:52:49 +00:00
Sebastian Ullrich
3335b2a01e
perf: improve avoidance of repeated Expr visits in unused variables linter ( #3076 )
...
-43% linter run time in a big proof case
2023-12-18 15:56:58 +00:00
Joachim Breitner
78816a3ee7
chore: refine PR template ( #3074 )
...
given that we now use the PR description as the commit message, the PR
template should point that out. Also, a `# Summary` is relatively
strange in a commit message, so removed it.
---------
Co-authored-by: Scott Morrison <scott.morrison@gmail.com >
2023-12-18 13:47:04 +00:00
Joachim Breitner
7acbee8ae4
refactor: move unpackArg etc. to WF.PackDomain/WF.PackMutual ( #3077 )
...
extracted from #3040 to keep the diff smaller
2023-12-18 13:46:42 +00:00
Leonardo de Moura
4dd59690e0
refactor: generalize some simp methods ( #3088 )
2023-12-18 04:03:29 -08:00
Kyle Miller
a2226a43ac
feat: encode let_fun using a letFun function ( #2973 )
...
Switches from encoding `let_fun` using an annotated `(fun x : t => b) v`
expression to a function application `letFun v (fun x : t => b)`.
---------
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2023-12-18 09:01:42 +00:00
Hunter Monroe
62c3e56247
doc: Bold "Diaconescu's theorem" ( #3086 )
2023-12-17 19:10:35 +00:00
Marcus Rossel
89d7eb8b78
doc: fix typos/indentation ( #3085 )
2023-12-17 18:41:46 +00:00
Scott Morrison
8475ec7e36
fix: reference implementation ByteArray.copySlice ( #2967 )
...
Fixes reference implementation of `ByteArray.copySlice`, as reported
https://github.com/leanprover/lean4/issues/2966 .
Adds tests.
---------
Co-authored-by: Joachim Breitner <mail@joachim-breitner.de >
2023-12-16 20:26:16 +00:00
Scott Morrison
4497aba1a9
fix: don't panic in leanPosToLspPos ( #3071 )
...
Testing a problem in the REPL.
2023-12-16 04:20:45 +00:00
Joachim Breitner
cddc8089bc
chore: pr-release: revert to originally used action to get PR number ( #3072 )
...
Getting the original PR number from a `workflow_run` cleanly and
reliably seems to be
basically impossible. See
<https://github.com/orgs/community/discussions/25220 > for a discussion.
So for now let’s go back to the working state, even though it’s
deprecated and throws warnings.
2023-12-14 22:53:02 +00:00
Joachim Breitner
ce15b43798
chore: allow updating stage0 via workflow_dispatch ( #3052 )
...
follow-up to #3042
2023-12-14 22:46:32 +00:00
Eric Wieser
430f4d28e4
doc: mention x:h@e variant in docstring of x@e ( #3073 )
...
This was done in 1c1e6d79a7
[Zulip
thread](https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Naming.20equality.20hypothesis.20in.20match.20branch/near/408016140 )
2023-12-14 18:58:14 +00:00
Eric Wieser
d279a4871f
chore: add the lean4 extension to the vscode workspace ( #3059 )
...
This prompts users opening the workspace (on a new device) for the first
time to install the lean extension
# Summary
Link to `RFC` or `bug` issue: N/A
2023-12-14 08:58:21 +00:00
Scott Morrison
f208d7b50f
chore: refactor pr-release.yml to avoid 'await' ( #3070 )
...
#3066 is causing CI failures, e.g.
[here](https://github.com/leanprover/lean4/actions/runs/7202184616/job/19619827364 ).
Although there are plenty of examples of using `await` in a Github
workflow script block, the error *seems* to be about this. This refactor
hopefully works around that, but I'm still uncertain of a root cause.
2023-12-14 04:51:17 +00:00
Joachim Breitner
df18f3f1ff
chore: pr-release.yml: use API to get pull request number ( #3066 )
...
partially reverting 6a629f7d7f . What a
mess.
2023-12-13 19:58:14 +00:00
Mac Malone
fbcfe6596e
fix: lake: leave run options for script ( #3064 )
...
Options passed to `lake script run <name>` / `lake run <name>` after the
`<name>` will now be properly passed on through to the script rather
than being consumed by Lake.
The issue was reported [on
Zulip](https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Lake.20script.20flag.20.22passthrough.22.3F/near/407734447 ).
2023-12-13 17:45:30 +00:00
Joachim Breitner
b5b664e570
chore: pr-release.yaml: remove hardcoded date ( #3061 )
...
This fixe a surprisingly embarrassing bug introduced by me in
fa26d222cb (maybe while testing).
Enable more debug output while we are at it, to find out why sometimes
`context.payload.workflow_run.pull_requests[0]` is undefined.
2023-12-13 13:50:19 +00:00
Mac Malone
2f216b5255
fix: lake: re-elab if config olean is missing ( #3036 )
...
If a user deleted `lakefile.olean` manually without deleting
`lakefile.olean.lock`, Lake would still attempt to load it and thus
produce an error. Now it should properly re-elaborate the configuration
file.
2023-12-13 01:07:57 +00:00
Scott Morrison
d4dca3baac
feat: test_extern command ( #2970 )
...
This adds a `test_extern` command.
Usage:
```
import Lean.Util.TestExtern
test_extern Nat.add 17 37
```
This:
* Checks that the head symbol has an `@[extern]` attribute.
* Writes down `t == t'`, where `t` is the term provided, and `t'` is the
reference implementation (specifically, `t` with the head symbol
unfolded).
* Tries to reduce this to `true`, and complains if this fails.
Note that the type of the term must have a `BEq` instance for this to
work: there's a self-explanatory error message if it isn't available.
2023-12-12 23:33:05 +00:00
Joachim Breitner
de7d78a9f1
chore: do not use actions-ecosystem/action-add-labels ( #3055 )
...
That action seems to be unmaintained and causes warnings
(https://github.com/actions-ecosystem/action-add-labels/issues/459 ).
Let's just use the API directly, like we already do in
`.github/workflows/labels-from-comments.yml`
2023-12-12 22:40:27 +00:00
Joachim Breitner
6a629f7d7f
chore: robustify PR release workflow ( #3051 )
...
the workflow is triggered not only by pull-request-CI-runs but also by
others. These should be skipped.
Also, no need to query the Github API to get the pull request number and
head sha, they are part of the payload, it seems.
2023-12-12 11:23:22 +00:00
Marc Huisinga
f74516a032
doc: update quickstart guide to reference vs code setup guide ( #2968 )
...
Since the vscode-lean4 setup guide allows us to provide information on
setting up Lean 4 tailored to the user's operating system, this PR
adjusts the quickstart guide to reference the vscode-lean4 setup guide
instead.
2023-12-12 08:36:27 +00:00
Sebastian Ullrich
78200b309f
fix: run_task/deactivate_task race condition on m_imp->m_closure ( #2959 )
...
Fixes #2853 , unblocking my work before I get to refactoring this part of
the task manager.
2023-12-12 02:01:40 +00:00
Mario Carneiro
b120080b85
fix: move Lean.List.toSMap to List.toSMap ( #3035 )
...
This definition was clearly meant to be in the `List` namespace, but it
is also in a `namespace Lean` so it ended up as `Lean.List.toSMap`
instead of `List.toSMap`. It would be nice if #3031 made this
unnecessary, but for now this seems to be the convention.
I noticed this because of another side effect: it defines `Lean.List` as
a namespace, which means that
```lean
import Std
namespace Lean
open List
#check [1] <+ [2]
```
does not work as expected, it opens the `Lean.List` namespace instead of
the `List` namespace. Should there be a regression test to ensure that
the `Lean.List` namespace (and maybe others) are not accidentally
created? (Unfortunately this puts a bit of a damper on #3031.)
2023-12-12 01:01:24 +00:00
Scott Morrison
4b8c342833
chore: withLocation * should not fail if it closes the main goal ( #2917 )
...
Arising from discussion at
https://github.com/leanprover/lean4/pull/2909/files#r1398527730 .
2023-12-12 00:45:13 +00:00
Joachim Breitner
fa26d222cb
chore: refactor pr release workflow ( #3020 )
...
In particular:
* Do not use deprecated `potiuk/get-workflow-origin`.
* Use a bare checkout to push PR to `pr-releases`
* Replace `script/most-recent-nightly-tag.sh` by a one-liner inside the
workflow, so that th workflow is self-contained
2023-12-12 00:45:10 +00:00
Jannis Limperg
e2f957109f
fix: omit fvars from simp_all? theorem list ( #2969 )
...
Removes local hypotheses from the simp theorem list generated by
`simp_all?`.
Fixes : #2953
---
Supersedes PR #1862
2023-12-12 00:45:07 +00:00
Scott Morrison
20dd63aabf
chore: fix superfluous lemmas in simp.trace ( #2923 )
...
Fixes an issue reported on Zulip; see the test case.
* Modifies the `MonadBacktrack` instance for `SimpM` to also backtrack
the `UsedSimps` field.
* When calling the discharger, `saveState`, and then `restoreState` if
something goes wrong.
I'm not certain that it makes sense to restore the `MetaM` state if
discharging fails. I can easily change this to more conservatively just
backtrack the `UsedSimps` after failed discharging.
2023-12-11 23:51:31 +00:00
Scott Morrison
c656e71eb8
chore: make List.all and List.any short-circuit ( #2972 )
...
Changes the implementation of `List.all` and `List.any` so they
short-circuit. The implementations are tail-recursive.
This replaces https://github.com/leanprover/std4/pull/392 , which was
going to do this with `@[csimp]`.
2023-12-11 23:48:15 +00:00
Lean stage0 autoupdater
104c92d4f3
chore: update stage0
2023-12-11 18:37:33 +00:00
Joachim Breitner
5cd90f5826
feat: drop support for termination_by' ( #3033 )
...
until around 7fe6881 the way to define well-founded recursions was to
specify a `WellFoundedRelation` on the argument explicitly. This was
rather low-level, for example one had to predict the packing of multiple
arguments into `PProd`s, the packing of mutual functions into `PSum`s,
and the cliques that were calculated.
Then the current `termination_by` syntax was introduced, where you
specify the termination argument at a higher level (one clause per
functions, unpacked arguments), and the `WellFoundedRelation` is found
using type class resolution.
The old syntax was kept around as `termination_by'`. This is not used
anywhere in the lean, std, mathlib or the theorem-proving-in-lean
repositories,
and three occurrences I found in the wild can do without
In particular, it should be possible to express anything that the old
syntax
supported also with the new one, possibly requiring a helper type with a
suitable instance, or the following generic wrapper that now lives in
std
```
def wrap {α : Sort u} {r : α → α → Prop} (h : WellFounded r) (x : α) : {x : α // Acc r x}
```
Since the old syntax is unused, has an unhelpful name and relies on
internals, this removes the support. Now is a good time before the
refactoring that's planned in #2921 .
The test suite was updated without particular surprises.
The parametric `terminationHint` parser is gone, which means we can
match on syntax more easily now, in `expandDecreasingBy?`.
2023-12-11 17:33:17 +00:00
Mario Carneiro
178ab8ef2e
fix: Option.getD eagerly evaluates dflt ( #3043 )
...
Reported [on
Zulip](https://leanprover.zulipchat.com/#narrow/stream/348111-std4/topic/Panics.20in.20Std.2EHashMap.2Efind!/near/406872395 ).
The `dflt` argument of `Option.getD` is not evaluated lazily, as the
documentation says, because even after `macro_inline` the expression
```lean
match opt, dflt with
| some x, _ => x
| none, e => e
```
still has the semantics of evaluating `dflt` when `opt` is `some x`.
2023-12-11 10:07:30 +00:00
Joachim Breitner
e6c0484074
chore: stage0 autoupdater action ( #3042 )
...
This Github action automatically updates `stage0` on `master` if
`src/stdlib_flags.h` and `stage0/src/stdlib_flags.h`
are out of sync there.
It bypasses the merge queue to be quick, this way, an out-of-date stage0
on on
master should only exist for a few minutes.
Needs access to a _deploy SSH key_ with write permission.
2023-12-11 09:50:27 +00:00
Eric Wieser
dd42a0919d
doc: explain how to use custom lexers in the latest minted ( #3047 )
...
v3.0 is not yet released; in the meantime, the previous instructions did
not work in the latest version without some hacks.
[Zulip
thread](https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/XeLaTeX.20with.20minted.20error/near/406959183 )
2023-12-11 09:16:40 +00:00
Joachim Breitner
1b2bbe717d
chore: remove obsolete comment in test ( #3044 )
2023-12-09 13:20:58 +00:00
Joachim Breitner
00359a0347
chore: update stage0 ( #3041 )
2023-12-08 12:14:47 +00:00
Eric Wieser
c474dff38c
doc: document constructors of TransparencyMode ( #3037 )
...
Taken from
https://github.com/leanprover-community/lean4-metaprogramming-book/blob/master/md/main/04_metam.md#transparency
I can never remember which way around `reducible` and `default` go, and
this avoids me needing to leave the editor to find out.
2023-12-07 17:04:40 +00:00
Joachim Breitner
f2a92f3331
fix: GuessLex: deduplicate recursive calls ( #3004 )
...
The elaborator is prone to duplicate terms, including recursive calls,
even if the user only wrote a single one. This duplication is wasteful
if we run the tactics on duplicated calls, and confusing in the output
of GuessLex. So prune the list of recursive calls, and remove those
where another call exists that has the same goal and context that is no
more specific.
2023-12-07 09:08:46 +00:00
Kyle Miller
bcbcf50442
feat: string gaps for continuing string literals across multiple lines ( #2821 )
...
Implements "gaps" in string literals. These are escape sequences of the
form `"\" newline whitespace+` that have the interpretation of an empty
string. For example,
```
"this is \
a string"
```
is equivalent to `"this is a string"`. These are modeled after string
continuations in
[Rust](https://doc.rust-lang.org/beta/reference/tokens.html#string-literals ).
Implements RFC #2838
2023-12-07 08:17:00 +00:00
Joachim Breitner
ec8811a75a
fix: WF.Fix: deduplicate subsumed goals before running tactic ( #3024 )
...
before code like
def dup (a : Nat) (b : Nat := a) := a + b
def rec : Nat → Nat
| 0 => 1
| n+1 => dup (dup (dup (rec n)))
decreasing_by decreasing_tactic
would run the `decreasing_tactic` 8 tims, because the recursive call
`rec n` gets duplicate due to the default paramter. Similar effects can
be observed due to dependent types or tactics like `cases`.
This is wasteful, and is confusing to the user when they use
`decreasing_by` interactively. Therfore, we now go through the proof
obligations (MVars) and if solving one would imply solving another one,
we assign the mvars to each other accordingly.
This PR is a sibling of #3004 .
2023-12-07 08:04:27 +00:00
Sebastian Ullrich
b3a85631d8
chore: set warningAsError in CI only ( #3030 )
...
Don't fail local builds because of this
2023-12-06 08:18:39 +00:00
Joachim Breitner
5d35e9496e
doc: fix MetavarContext markdown ( #3026 )
...
I found the documentation page hard to parse, so I figured I should fix
this. It's mostly indentation (e.g. in lists), some line breaks and
making URLs clickable.
2023-12-06 08:15:45 +00:00
bc²
d4f10bc07e
feat: detail error message about invalid mutual blocks ( #2949 )
...
To prevent user confusion as in this [Zulip
message](https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Matching.20on.20prop/near/341456011 )
2023-12-05 10:50:10 +00:00
Marc Huisinga
feb0cb6fc4
doc: add migration guide for per-package server options ( #3025 )
...
This PR adjusts `RELEASES.md` to match the recently adjusted release
notes.
---------
Co-authored-by: Mario Carneiro <di.gama@gmail.com >
2023-12-05 10:36:53 +00:00
Joachim Breitner
d6c81f8594
feat: GuessLex: print inferred termination argument ( #3012 )
...
With
set_option showInferredTerminationBy true
this prints a message like
Inferred termination argument:
termination_by
ackermann n m => (sizeOf n, sizeOf m)
it tries hard to use names that
* match the names that the user used, if present
* have no daggers (so that it can be copied)
* do not shadow each other
* do not shadow anything from the environment (just to be nice)
it does so by appending sufficient `'` to the name.
Some of the emitted `sizeOf` calls are unnecessary, but they are needed
sometimes with dependent parameters. A follow-up PR will not emit them
for non-dependent arguments, so that in most cases the output is pretty.
Somewhen down the road we also want a code action, maybe triggered by
`termination_by?`. This should come after #2921 , as that simplifies that
feature (no need to merge termination arguments from different cliques
for example.)
2023-12-05 09:41:52 +00:00
Joachim Breitner
17825bf81d
feat: GuessLex: if no measure is found, explain why ( #2960 )
...
by showing the matrix of calls and measures, and what we know about that
call (=, <, ≤, ?), e.g.
guessLexFailures.lean:27:0-33:31: error: Could not find a decreasing
measure.
The arguments relate at each recursive call as follows:
(<, ≤, =: relation proved, ? all proofs failed, _: no proof attempted)
x1 x2 x3
1) 29:6-25 = = =
2) 30:6-23 = ? <
3) 31:6-23 < _ _
Please use `termination_by` to specify a decreasing measure
It’s a bit more verbose for mutual functions.
It will use the user-specified argument names for functions written
```
foo (n : Nat) := …
```
but not with pattern matching like
```
foo : Nat → …
| n => …
```
This can be refined later and separately (and maybe right away in
`expandMatchAltsWhereDecls`).
2023-12-05 08:32:15 +00:00
Joachim Breitner
9290b491bb
refactor: WF.Fix: gather subgoals ( #3017 )
...
This is pure refactoring: Instead of solving each subgoal as we
encounter it while traversing the syntax tree, we leave the `MVar`
there, at the end collect them all using `getMVarsNoDelayed`, and then
solve them.
This is a refactoring preparing for two upcoming changes:
* removing unexpected duplicate goals that can arise from term
duplication
* running interactive tactics on all, not each goal (#2921 )
In order to not regress with error locations, we have to associated the
`TermElabM`’s syntax refernce with the `MVar` somehow. I do this using
the existing `mkRecAppWithSyntax` expression annotation, on the `MVar`’s
type. Alternatives would be stack another `StateT` on the traversal
and accumulate `Array (MVarId, Syntax)` explicitly, but that did not
seem to be more appealing.
2023-12-04 21:42:24 +00:00
Joachim Breitner
c91ece4f58
doc: typo Runnign ( #3018 )
2023-12-04 16:55:07 +00:00
Eric Wieser
93a6279025
chore: add vscode cmake configuration ( #3008 )
...
This sets the build directory to `build/release` for the "CMake Tools
for Visual Studio Code" extension documented at
https://vector-of-bool.github.io/docs/vscode-cmake-tools/settings.html#cmake-builddirectory .
It also sets the generator to `make`, since otherwise it tries `Ninja`
which doesn't work.
Without these settings, the extension runs configure in a bad place at
startup.
This does *not* add the cmake tools extension to the default workspace
configuration; the goal is simply to prevent bad behavior for users who
already have the extension enabled.
# Summary
Screenshot of this in action:

Link to `RFC` or `bug` issue: N/A, this is not a bug nor a user-visible
feature.
2023-12-04 16:35:03 +00:00
Joachim Breitner
5c2292a923
doc: In testing doc, suggest make to pick up new tests ( #2815 )
2023-12-04 10:29:49 +00:00
Sebastian Ullrich
14296ae720
chore: Nix CI: update setup ( #3015 )
...
Now that we're, at least temporarily, relying more on the Nix CI,
replace some old hacks of mine with better solutions people have figured
out in the meantime.
Cachix support could probably be dropped at this point but it doesn't
really hurt.
2023-12-03 17:51:05 +00:00
Joachim Breitner
6d23450642
refactor: rewrite TerminationHint elaborators ( #2958 )
...
In order to familiarize myself with this code, and so that the next
person has an easier time, I
* added docstrings explaining what I found out these things to
* rewrote the syntax expansion functions using syntax pattern matches,
to the extend possible
2023-12-02 10:08:07 +00:00
Joachim Breitner
92f1755e9b
chore: run tests with full-ci ( #3009 )
...
it looks like inter-job outputs are just strings, not boolean values?
2023-12-01 21:14:48 +00:00
Joachim Breitner
465f0feb2d
test: expand tests/lean/issue2981.lean a bit ( #3007 )
2023-12-01 17:52:34 +00:00
Sebastian Ullrich
24466a25f3
doc: widget code owner
2023-12-01 15:46:45 +00:00
Mac Malone
e4eff3bc6e
doc: fix recent issue links in RELEASES.md ( #3000 )
...
These links were broken because the links used `issue` rather than
`issues`.
2023-12-01 14:48:24 +00:00
Arthur Adjedj
66cb44c53c
fix: missing whnf in mkBelowBinder and mkMotiveBinder ( #2991 )
...
Closes #2990
2023-12-01 14:46:09 +00:00
Joachim Breitner
8be3897a8b
chore: improve tests/lean/copy-produced ( #3006 )
...
* do not take an argument, no longer needed
* make it whitespace-in-filenames safe
* copy verbosely when there are changes, for better user feedback
2023-12-01 14:34:52 +00:00
Joachim Breitner
bd89787a87
chore: fix CPP warnings about static_assert ( #3005 )
...
else I see
```
[ 69%] Building CXX object runtime/CMakeFiles/leanrt.dir/platform.cpp.o
/home/jojo/build/lean/lean4/src/runtime/io.cpp:509:75: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
static_assert(sizeof(std::chrono::milliseconds::rep) <= sizeof(uint64));
^
, ""
/home/jojo/build/lean/lean4/src/runtime/io.cpp:517:74: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
static_assert(sizeof(std::chrono::nanoseconds::rep) <= sizeof(uint64));
^
, ""
2 warnings generated.
```
when building
2023-12-01 13:00:01 +00:00
Joachim Breitner
a5af90c724
chore: run CI on new labels ( #3003 )
...
CI will now run on _any_ manually added label; hard to avoid.
Fun fact: Because the `toolchain-available` label is added by a github
action with the default token, it will _not_ trigger the workflow. Lucky
coincidence.
2023-12-01 11:32:05 +00:00
Sebastian Ullrich
5937f4208a
chore: CI: update github-script ( #3002 )
2023-12-01 08:39:51 +00:00
Sebastian Ullrich
ea5b55b8f2
doc: remove Nix docs
2023-12-01 08:32:20 +00:00
Sebastian Ullrich
0fca41ddb2
chore: CI: remove changelog job
2023-12-01 08:28:52 +00:00
Joachim Breitner
f356d8830e
chore: CI: in quick mode, only Nix build runs the tests ( #2998 )
...
Following up on #2986 , stop running the test suite in ci.yml in quick
mode; the test suite is run in the Nix job, and we do not need to run it
twice.
With a cold nix cache, when `lean` is rebuilt, not much changes, as both
jobs take ~20mins. But when `lean` is unchanged, the nix build should
be faster, and shaving off the (currently) 4mins in the CI.yaml run
should get us to a green PR sooner.
Another benefit is that we get the PR release sooner and even get it
when the test suite fails, which can be useful if you want to test
mathlib or other things before fixing the lean test suite.
2023-11-30 17:21:51 +00:00
Sebastian Ullrich
5b6e4faacd
fix: find macOS system libraries in leanc ( #2997 )
...
Fixes #2971
2023-11-30 13:34:24 +00:00
Marcus Rossel
0ad611cf2f
doc: fix typos ( #2996 )
2023-11-30 10:16:33 +00:00
Sebastian Ullrich
3a0edd05e6
doc: VS Code dev setup ( #2961 )
...
* multi-root workspace
* default settings including .lean line length
* tasks `build` and `test`
---------
Co-authored-by: mhuisi <mhuisi@protonmail.com >
2023-11-30 08:35:03 +00:00
Scott Morrison
99331219f9
chore: begin development cycle for v4.5.0 ( #2995 )
2023-11-30 01:27:33 +00:00
Joachim Breitner
18459cb537
refactor: CasesOnApp.refineThrough can return a lambda, not an open term ( #2974 )
...
which also removes an error condition at the use site.
While I am at it, I rename a parameter in `GuessLex` that I forgot to
rename earlier.
The effect will be user-visible (in obscure corner cases) with #2960 , so
I’ll have the test there.
A few places would benefit from a `lambdaTelescopeBounded` that
garantees the result has the right length (eta-expanding when
necessary). I’ll look into that separately, and left TODOs here.
2023-11-29 15:58:03 +00:00
Joachim Breitner
e4f2c39ab2
test: termination checking and duplicated terms ( #2993 )
...
These tests came out of #2981 and #2982 ; let’s have them in master even
if the changes there will not happen right away.
2023-11-29 15:40:57 +00:00
Marc Huisinga
3025a4a9a1
chore: update stage0 ( #2992 )
...
Updates stage-0 so that we can use import auto-completion ourselves.
2023-11-29 15:26:12 +00:00
Joachim Breitner
367ac01279
chore: trim CI set by default ( #2986 )
...
The goal of this change is to run a trimmed-down CI on PRs by default,
but allows opt-in the full CI as necessary.
### Specification
The CI workflow runs in “quick” mode if it was triggered from a pull
request, and that pull request does not have the `full-ci` label set.
In “quick” mode the build matrix contains fewer jobs. At the moment
only:
* Linux-release, to get the PR releases.
In non-quick mode everything should be as before.
### Implementation notes
I created a `configure` job that combines all the previous `set-` jobs,
I guess this is faster than firing up separate jobs.
The matrix is calculated in this job; this seems to be the cleanest way
to get a dynamic matrix going (experiments using `exclude` failed). The
downside is that the matrix is now in JSON rather than Yaml syntax. The
upside is that we can (later) make it’s calculation simpler, e.g. set
default `shell` values etc.
I was not able to make it so that CI runs when the `full-ci` label is
added, but don’t do anything otherwise. I think it can be done with
another workflow listening to `labeled` and then triggering this one,
but let’s do that separately. For now, add the label and then push (or
close and reopen).
The checks
```
if: matrix.build-stage2 || matrix.check-stage3
if: matrix.check-stage3
```
were dead code, we did not have these fields in the matrix anymore, so I
replaced them with
```
if: matrix.test-speedcenter
```
2023-11-29 13:24:45 +00:00
Joachim Breitner
4f2f704962
chore: make PR title check work as a merge_group check ( #2987 )
2023-11-29 12:03:20 +00:00
Joachim Breitner
34264a4b1d
doc: Improve docstrings around Array.mk,.data,.toList ( #2771 )
...
following a discussion at
<https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Understanding.20the.20docstring.20for.20docs.23Array.2Edata/near/398705430 >
---------
Co-authored-by: Mario Carneiro <di.gama@gmail.com >
2023-11-29 08:49:13 +00:00
Scott Morrison
5d22145b83
chore: remove supportInterpreter from lake template ( #2984 )
...
Now that there is a helpful message at the point of use when
`supportInterpreter` is required, we don't need to clutter every
`lakefile` with the advice.
2023-11-29 06:16:34 +00:00
Joachim Breitner
0a6aed61e9
chore: CI: Create an all-builds-ok job ( #2983 )
...
there is a little dance with `if: success()` because otherwise a failed
`build` job would make this new job skipped, not failed, and I fear
skipped means ok when it is a required job.
So let’s make sure this job actually fails.
2023-11-29 00:10:11 +00:00
Joachim Breitner
6c7a765abb
chore: Check PR title, not commit, for commit convention ( #2978 )
...
Also turn this into a proper check, run when a PR is opened or edited.
I took the liberty to rename the workflow file and name, so that one
doesn't have to look inside to guess what the workflow is doing.
2023-11-28 17:48:09 +00:00
Scott Morrison
c1f6daf1ac
fix: remove unnecessary step in pr-release.yml ( #2976 )
...
This step was unnecessary, as the script uses an unauthenticated https
URL anyway, and apparently was causing a [permissions
problem](https://github.com/leanprover/lean4/actions/runs/7005903162/job/19094622187#step:8:7 ).
2023-11-28 13:18:20 +00:00
Joachim Breitner
ffbea840bf
feat: WF.GuessLex: If there is only one plausible measure, use it ( #2954 )
...
If here is only one plausible measure, there is no point having the
`GuessLex` code see if it
is terminating, running all the tactics, only for the `MkFix` code then
run the tactics again.
So if there is only one plausible measure (non-mutual recursion with
only one varying
parameter), just use that measure.
Side benefit: If the function isn’t terminating, more detailed error
messages are shown
(failing proof goals), located at the recursive calls.
2023-11-27 22:41:40 +00:00
Mac Malone
190ac50994
doc: release notes for recent lake changes ( #2938 )
...
Release notes for PRs #2928 , #2930 , #2932 , and #2937 .
2023-11-27 18:30:45 +00:00
Mac Malone
c20d65771c
refactor: lake: simplify math template & test it ( #2930 )
...
Removes the `CI` option from the `math` template. Since the template
does not currently generate a GitHub workflow, it does not do anything
out of the box except add unnecessary complexity.
The `math` template is also now tested in `tests/init` (minus the
Mathlib `require`).
2023-11-27 18:14:00 +00:00
Joachim Breitner
cbba783bcf
feat: Guess lexicographic order for well-founded recursion ( #2874 )
...
This improves Lean’s capabilities to guess the termination measure for
well-founded
recursion, by also trying lexicographic orders. For example:
def ackermann (n m : Nat) := match n, m with
| 0, m => m + 1
| .succ n, 0 => ackermann n 1
| .succ n, .succ m => ackermann n (ackermann (n + 1) m)
now just works.
The module docstring of `Lean.Elab.PreDefinition.WF.GuessLex` tells the
technical story.
Fixes #2837
2023-11-27 16:30:20 +00:00
Mac Malone
a4aaabf396
refactor: reverse pkg/lib search & no exe roots in import ( #2937 )
...
Closes #2548 .
Later packages and libraries in the dependency tree are now preferred
over earlier ones. That is, the later ones "shadow" the earlier ones.
Such an ordering is more consistent with how declarations generally work
in programming languages.
This will break any package that relied on the previous ordering.
Also includes a related fix to `findModule?` that mistakenly treated
executable roots as importable.
2023-11-27 16:12:11 +00:00
Mac Malone
984d55c962
fix: lake: proper exe targets & pkg generation ( #2932 )
...
Improves executable handling in `lake exe` and `lake init`:
* `lake exe <target>` now parses `target` like a build target (as the
help text states it should) rather than as a basic name.
* `lake new foo.bar [std]` now generates executables named `foo-bar`.
* `lake new foo.bar exe` now properly creates `foo/bar.lean`.
2023-11-27 16:11:12 +00:00
Mac Malone
0249a8c15e
fix: untar cloud release if no build dir ( #2928 )
...
Cloud releases will now properly be re-unpacked if the build directory
is removed. This fixes [an issue reported on
Zulip](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Some.20files.20not.20found.20in.20the.20cache/near/402921424 )
with the new `.lake` directory that broke Mathlib's ProofWidgets cache.
2023-11-27 16:09:58 +00:00
Joachim Breitner
6592df52cc
feat: Add MatcherApp. and CasesOnApp.refineThrough ( #2882 )
...
these are compagnions to `MatcherApp.addArg` and `CasesOnApp.addArg`
when one only has an
expression (which may not be a type) to transform, but not a concret
values.
This is a prerequisite for guessing lexicographic order (#2874 ). Keeping
this on a separate PR because it’s sizable, and has a clear independent
specification.
2023-11-27 15:52:32 +00:00
Mario Carneiro
9769ad6572
fix: missing withContext in simp trace ( #2053 )
...
As [reported on
Zulip](https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/simp.3F.20.5B*.5D/near/322724789 ).
---------
Co-authored-by: Scott Morrison <scott.morrison@gmail.com >
2023-11-27 12:02:38 +00:00
Sebastian Ullrich
79251f5fa2
feat: embed and check githash in .olean ( #2766 )
...
This is an additional safety net on top of #2749 : it protects users that
circumvent the build system (e.g. with `lake env`) as well as obviates
the need for TOCTOU-like race condition checks in the build system.
The check is activated by `CHECK_OLEAN_VERSION=ON`, which now defaults
to `OFF` as the sensible default for local development. When activated,
`USE_GITHASH=ON` is also force-enabled for stage 0 in order to make sure
that stage 1 can load its own core library.
2023-11-27 10:24:43 +00:00
Sebastian Ullrich
f142d9f798
fix: ignore errors on IO.FS.Handle finalization ( #2935 )
2023-11-27 08:17:33 +00:00
Marc Huisinga
7ff7cf9b5a
feat: per-package server options ( #2858 )
...
This PR adds per-package server options to resolve #2455 . It is based on
the previous work in #2456 , but takes a different approach: options are
loaded for the specific file in the file worker when `print-paths` is
called, instead of loading them in the watchdog with a separate Lake
command. This change addresses review comments made in #2456 .
In doing so, it introduces two new Lake config fields:
- `leanOptions`: `-D` flag options that are passed to both the language
server and `lean` when building.
- `moreServerOptions`: `-D` flag options that are passed to the language
server.
Since `print-paths` must also accept a file path to compute the options
for that file, this PR is changing the API for `print-paths`. As there
have been numerous complaints about the name `print-paths`, I also
decided to change it to `setup-file` in this PR, since it would break
compatibility with the old Lake API anyways.
This PR deprecates the Lakefile field `moreServerArgs` in favor of
`moreGlobalServerArgs`, as suggested in the review for #2456 .
Fixes #2455
---------
Co-authored-by: digama0 <mcarneir@andrew.cmu.edu >
2023-11-26 13:42:38 +00:00
Kyle Miller
5639302989
feat: pp.beta to apply beta reduction when pretty printing ( #2864 )
...
This was a Lean 3 pretty printer option. While this pretty printer
option tends to lead to confusing situations when set, it has been
frequently requested. [It is
possible](https://github.com/leanprover-community/mathlib4/pull/7910 ) to
implement this pretty printer option as a user, but it comes with some
artifacts -- for instance, expressions in hovers are not beta reduced.
Adding this as a core pp option is cleanest.
(We should consider having hooks into the tactic evaluator to allow
users to transform the tactic state between tactics. This would enable
beta reducing the entire local context for real, which would be useful
for teaching.)
Closes #715
2023-11-24 12:26:31 +00:00
Scott Morrison
5f5d579986
chore: remove unused MonadBacktrack instance for SimpM ( #2943 )
...
We noticed at
https://github.com/leanprover/lean4/pull/2923#discussion_r1400468371
that this instance is not used. It's arguably also incorrect (as it
doesn't backtrack the `usedTheorems` field).
Seems better to just remove to avoid confusion.
Evidence that this is dead code:
* After deleting the instance, calling `saveState` in the `SimpM` monad
raises an error `failed to synthesize instance MonadBacktrack PUnit
SimpM`.
* Understanding the `MonadBacktrack` monad leads one to believe that
would have happened, via the fact that the only instances for
`MonadBacktrack` are either concrete instances (e.g. for `MetaM`,
`TacticM`, etc), or a single lifting instance `instance [MonadBacktrack
s m] [Monad m] : MonadBacktrack s (ExceptT ε m)`. (This is good and
correct behaviour: lifting instances for `MonadBacktrack` would be hard
to model.)
* Mathlib builds after the instance is removed.
Potential evidence that I have not sought, because we don't have
sufficient tooling:
* Compiling Lean/Std/Mathlib with a debugger, breaking on entering this
code.
2023-11-24 08:44:38 +00:00
Marc Huisinga
681fca1f8f
feat: import auto-completion ( #2904 )
...
This PR adds basic auto-completion support for imports. Since it still
lacks Lake support for accurate completion suggestions (cc @tydeu - we
already know what needs to be done), it falls back to traversing the
`LEAN_SRC_PATH` for available imports.
Three kinds of import completion requests are supported:
- Completion of the full `import` command. Triggered when requesting
completions in an empty space within the header.
- Known issue: It is possible to trigger this completion within a
comment in the header. Fixing this would require architecture for
parsing some kind of sub-syntax between individual commands.
- Completion of the full module name after an incomplete `import`
command.
- Completion of a partial module name with a trailing dot.
Since the set of imports is potentially expensive to compute, they are
cached for 10 seconds after the last import auto-completion request.
Closes #2655 .
### Changes
This PR also makes the following changes:
- To support completions on the trailing dot, the `import` syntax was
adjusted to provide partial syntax when a trailing dot is used.
- `FileWorker.lean` was refactored lightly with some larger definitions
being broken apart.
- The `WorkerState` gained two new fields:
- `currHeaderStx` tracks the current header syntax, as opposed to
tracking only the initial header syntax in `initHeaderStx`. When the
header syntax changes, a task is launched that restarts the file worker
after a certain delay to avoid constant restarts while editing the
header. During this time period, we may still want to serve import
auto-completion requests, so we need to know the up-to-date header
syntax.
- `importCachingTask?` contains a task that computes the set of
available imports.
- `determineLakePath` has moved to a new file `Lean/Util/LakePath.lean`
as it is now needed both in `ImportCompletion.lean` and
`FileWorker.lean`.
- `forEachModuleIn` from `Lake/Config/Blob.lean` has moved to
`Lean/Util/Path.lean` as it is a generally useful utility function that
was useful for traversing the `LEAN_SRC_PATH` as well.
### Tests
Unfortunately, this PR lacks tests since the set of imports available in
`tests/lean/interactive` will not be stable. In the future, I will add
support for testing LSP requests in full project setups, which is when
tests for import auto-completion will be added as well.
2023-11-24 07:46:19 +00:00
Joachim Breitner
e34656ce75
doc: Markdown fixes in Lean.Expr ( #2956 )
...
there were wrong italics, missing backticks, missing indentation and I
took the liberty to replace `[here]` links with link targets that better
tell the reader what to expect when clicking there.
2023-11-24 06:54:43 +00:00
Joachim Breitner
5a68ad9ef4
chore: Run CI on all PRs, even base ≠ master ( #2955 )
2023-11-23 21:50:30 +00:00
Scott Morrison
a422f3f2c9
chore: script/most-recent-nightly-tag uses https rather than ssh repo URL ( #2951 )
...
The https URL suffices, and does not require that the caller has an
appropriate ssh key.
2023-11-23 10:27:46 +00:00
Joachim Breitner
260eaebf4e
fix: PackMutual: Eta-Expand as needed ( #2902 )
...
The `packMutual` code ought to reliably replace all recursive calls to
the functions in `preDefs`, even when they are under- or over-applied.
Therefore eta-expand if need rsp. keep extra arguments around.
Needs a tweak to `Meta.transform` to avoid mistaking the `f` in
`f x1 x2` as a zero-arity application.
Includes a test case.
This fixes #2628 and #2883 .
2023-11-22 14:25:56 +00:00
Joachim Breitner
dede354e77
fix: Float RecApp out of applications ( #2818 )
...
This didn't work before
```
def f (n : Nat) : Nat :=
match n with
| 0 => 0
| n + 1 => (f) n
```
because the `RecApp` metadata marker gets in the way. More practically
relevant, such code is to be produced when using `rw` or `simp` in
recursive theorems (see included test case).
We can fix this by preprocessing the definitions and floating the
`.mdata` marker out of applications.
For structural recursion, there already exists a `preprocess` function;
this now also floats out `.mdata` markers.
For well-founded recursion, this introduces an analogous `preprocess`
function.
Fixes #2810 .
One test case output changes: With the `.mdata` out of the way, we get a
different error message. Seems fine.
Alternative approaches are:
* Leaving the `.mdata` marker where it is, and looking around it.
Tried in #2813 , but not nice (many many places where `withApp` etc.
need to be adjusted).
* Moving the `.mdata` _inside_ the application, so that `withApp` still
works. Tried in #2814 . Also not nice, the invariant that the `.mdata`
is around the `.const` is tedious to maintain.
2023-11-22 14:25:09 +00:00
Sebastian Ullrich
5eb4a007a6
chore: CI: pin macos-11 to work around 12.7.1 breakage ( #2946 )
...
Co-authored-by: Joachim Breitner <mail@joachim-breitner.de >
2023-11-22 13:17:27 +00:00
Joachim Breitner
54dd588fc2
fix: Use whnf for mutual recursion with types hiding → ( #2926 )
...
the code stumbled over recursive functions whose type doesn’t have
enough manifest foralls, like:
```
def FunType := Nat → Nat
mutual
def foo : FunType
| .zero => 0
| .succ n => bar n
def bar : FunType
| .zero => 0
| .succ n => foo n
end
termination_by foo n => n; bar n => n
```
This can be fixed by using `whnf` in appropriate places, to expose the
`.forall` constructor.
Fixes #2925 , comes with test case.
2023-11-22 11:31:36 +00:00
Scott Morrison
9efdde23e0
fix: most-recently-nightly-tag does not assume a 'nightly' remote ( #2947 )
...
`script/most-recent-nightly-tag.sh` determines the most recent nightly
release in your current git history.
Previously it was assuming that you had a `nightly` remote, to pull tags
from. Now it just pulls directly from the repository by URL.
2023-11-22 10:56:39 +00:00
Scott Morrison
91917516f1
chore: run CI on merge_group ( #2948 )
...
Per
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#triggering-merge-group-checks-with-github-actions
2023-11-22 11:24:13 +00:00
Joachim Breitner
fb30932ca7
refactor: WF.Fix: Pass all remaining goals to Term.reportUnsolvedGoals ( #2922 )
...
This only really shows up when the `decreasing_tactic` fails with
multiple goals, as in
```
macro_rules
| `(tactic|decreasing_tactic) => `(tactic| by_cases (2 > 1))
def foo (n : Nat) : Nat := foo (n - 1)
termination_by foo n => n
```
where we now get
```
unsolved goals
case inl
n: Nat
h✝: 2 > 1
⊢ (invImage (fun a => a) instWellFoundedRelation).1 (n - 1) n
case inr
n: Nat
h✝: ¬2 > 1
⊢ (invImage (fun a => a) instWellFoundedRelation).1 (n - 1) n
```
rather than
```
LeanProject.lean:3:27
unsolved goals
case inl
n: Nat
h✝: 2 > 1
⊢ (invImage (fun a => a) instWellFoundedRelation).1 (n - 1) n
LeanProject.lean:3:27
unsolved goals
case inr
n: Nat
h✝: ¬2 > 1
⊢ (invImage (fun a => a) instWellFoundedRelation).1 (n - 1) n
```
The effect is neglectible, but the code is a bit nicer, so why not,
before someone looks at it again and wonders whether the goals are
reported separately for a reason.
2023-11-21 19:26:52 +01:00
Joachim Breitner
0adca630cc
chore: update stage0
2023-11-21 18:59:22 +01:00
Joachim Breitner
37362658ab
fix: eq_refl tactic’s name is eqRefl
...
Previously, it has `name := refl`, which looked confusing in
[the
docs](https://leanprover-community.github.io/mathlib4_docs/Init/Tactics.html#Lean.Parser.Tactic.refl ),
as there is no `refl` tactic,
2023-11-21 18:59:22 +01:00
Adrien Champion
66aa2c46a8
doc: mention dite in ite docstring ( #2924 )
...
Some beginners have trouble finding the `if h : c then t else e`
(`dite`) version of `ite`. This augments `ite`'s docstring to mention
the dependent version.
2023-11-21 15:59:35 +01:00
Mario Carneiro
b97b0ad2aa
feat: rename request handler ( #2462 )
...
This implements a request handler for the `textDocument/rename` LSP
request, enabling renames via F2. It handles both local renames (e.g.
`let x := 1; x` to `let y := 1; y`) as well as global renames
(definitions).
Unfortunately it does not work for "orphan" files outside a project, as
it uses ilean data for the current file and this does not seem to be
saved for orphan files. As a result, the test file does not work,
although one can manually test the implementation against a project such
as mathlib. (This issue already exists for the "references" request,
e.g. ctrl click on the first `x` in `let x := 1; x` takes you to the
second one only if you are not in an orphan file.)
* Fixes leanprover-community/mathlib4#7124
2023-11-21 13:10:52 +01:00
Joachim Breitner
fbefbce8c7
doc: Adjust contributor's docs to squash merging ( #2927 )
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2023-11-21 10:13:43 +00:00
Scott Morrison
f1b274279b
feat: helpful error message about supportInterpreter ( #2912 )
...
Following [@Kha's
suggestion](https://github.com/leanprover/lean4/issues/2897#issuecomment-1816043031 )
from #2897 .
---------
Co-authored-by: Mario Carneiro <di.gama@gmail.com >
2023-11-21 10:31:26 +01:00
Kyle Miller
6a33afb745
feat: Lean.MVarId.cleanup configuration ( #2919 )
...
Modifies `cleanup` so that it takes (1) an array of additional fvarids
to preserve and (2) a flag to control whether to include indirect
propositions.
(This is wanted in mathlib for the `extract_goal` tactic.)
2023-11-21 10:09:48 +01:00
Joachim Breitner
9800e066bc
fix: PackMutual: Deal with extra arguments ( #2892 )
...
previously, it would ignore a recursive call that has extra arguments,
which can happen when the recursive functions return something of
function type. Therefore just leave them extra arguments in place.
Fixes #2883 .
2023-11-20 17:07:50 +01:00
Mac Malone
5858549037
doc: release notes for recent lake fixes
...
Co-authored-by: Scott Morrison <scott@tqft.net >
2023-11-20 15:51:31 +00:00
Kyle Miller
4d39a0b0e3
fix: DecidableEq deriving handler could not handle fields whose types start with an implicit argument ( #2918 )
...
Fixes #2914
2023-11-20 20:51:47 +11:00
Sebastian Ullrich
9bf0f5116b
chore: more code owners
2023-11-20 09:30:18 +01:00
Scott Morrison
8b86beeb07
doc: clarify doc-string for Lean.Elab.Tactic.withLocation ( #2909 )
...
In the previous doc-string, the sentence
> "If any of the selected tactic applications fail, it will call
`failed` with the main goal mvar."
was false both for `Location.wildcard` (where it should have said "If
all", not "If any") or for `Location.targets` (where `failed` is never
called).
2023-11-20 09:15:27 +01:00
Mario Carneiro
8881517018
fix: report goals in induction with parse error
2023-11-20 09:15:27 +01:00
Eric Wieser
0668544a35
feat: add an OfNat instance for Level ( #2880 )
...
This allows writing `1 : Level`, which is pretty handy for using `Sort 1` aka `Type`.
Co-authored-by: Scott Morrison <scott@tqft.net >
2023-11-20 09:14:16 +01:00
Marcus Rossel
1362268472
doc: fix typos ( #2915 )
2023-11-19 20:00:47 +00:00
tydeu
65d08fdcdd
chore: ignore forgotten Lake test artifacts
2023-11-17 21:25:41 -05:00
tydeu
e29c3239e3
fix: lake: whitelist loaded config olean env exts
2023-11-17 13:50:14 -05:00
Adrien Champion
ed1a98d5ae
doc: add documentation for universe, open, export, variable
...
Add documentation comments with examples to `universe`, `open`,
`export`, and `variable`.
The documentation shows up when hovering over keywords, hopefully
improving the experience for beginners.
2023-11-17 13:19:10 +00:00
github-actions[bot]
c6e4b98793
doc: update changelog
2023-11-17 12:32:02 +00:00
Leni Aniva
ab36ed477e
feat: allow trailing comma in tuples, lists, and tactics ( #2643 )
2023-11-17 13:31:41 +01:00
tydeu
5d1d493635
feat: bare lake init & validated pkg names
2023-11-16 12:54:52 -05:00
Mac Malone
893d480c77
refactor: lake: use plain lib name for root and native name
2023-11-16 12:49:46 -05:00
tydeu
857ba0a3e5
fix: support non-identifier library names
2023-11-16 12:48:55 -05:00
Joachim Breitner
ad77e7e762
chore: Issue template: Suggest #eval Lean.versionString ( #2884 )
...
as this works also on https://live.lean-lang.org/ or for people
not familiar with the command line.
2023-11-16 18:40:55 +01:00
Scott Morrison
b3e9bb4997
chore: update release notes after v4.3.0-rc2
2023-11-16 21:55:25 +11:00
Sebastian Ullrich
139973217c
chore: more code owners
2023-11-16 10:09:54 +01:00
tydeu
b770060b9e
doc: lakefile.olean compatibility check release note
2023-11-15 19:31:08 -05:00
tydeu
8a2054ca09
fix: stricter lakefile.olean compatibility check
2023-11-15 19:31:08 -05:00
tydeu
171837216a
feat: IO.FS.Handle.lock/tryLock/unlock
2023-11-15 19:31:08 -05:00
tydeu
19c81a19ea
feat: IO.FS.Handle.rewind/truncate
2023-11-15 19:31:08 -05:00
Sebastian Ullrich
7cc2c9f1c9
doc: code owners ( #2875 )
2023-11-15 18:21:23 +01:00
Alexander Bentkamp
7fb7b5c5cb
chore: releases for web assembly and x86 Linux ( #2855 )
2023-11-15 18:18:47 +01:00
tydeu
bbc759522a
doc: lake: flexible manifest release notes
2023-11-15 00:39:06 -05:00
tydeu
712d3c2292
chore: deprecate Lake.PackageConfig.manifestFile
2023-11-15 00:39:06 -05:00
tydeu
73540ecd48
feat: lake: use / in Windows manifest file paths
2023-11-15 00:39:06 -05:00
tydeu
d07e8fd6a4
test: lake: add manifest version upgrade test
2023-11-15 00:39:06 -05:00
tydeu
446d547817
refactor: lake: more flexible manifest
2023-11-15 00:39:06 -05:00
Scott Morrison
37c2ec10e9
chore: fix conditional syntax in pre-release.yml
2023-11-15 12:24:20 +11:00
Eric Wieser
6f2eb3f6b4
doc: fix typo
2023-11-15 12:19:42 +11:00
Kyle Miller
76a7754d08
fix: have parenthesizer copy source info to parenthesized term
...
This causes the info view to have the entire parenthesized expression be hoverable.
2023-11-14 20:24:30 +01:00
Sebastian Ullrich
77ee031172
fix: re-read HTTP header when skipping notification in Ipc.readResponseAs
2023-11-14 17:34:04 +01:00
Sebastian Ullrich
2f35651308
perf: leak environments not freed before process exit
2023-11-14 17:33:04 +01:00
Sebastian Ullrich
62dc8d7308
feat: Runtime.markMultiThreaded/Persistent
2023-11-14 17:33:04 +01:00
tydeu
6d349201b4
doc: add note on .lake to RELEASES.md
2023-11-13 20:31:24 -05:00
tydeu
dcb92296f6
test: use built lake for examples/reverse-ffi
2023-11-13 20:31:24 -05:00
tydeu
4ec3d78afa
chore: update tests to account for .lake
2023-11-13 20:31:24 -05:00
tydeu
2ff4821026
refactor: .lake directory for Lake outputs
2023-11-13 20:31:24 -05:00
tydeu
ffd79a0824
fix: lake: ensure untar output directory exists
2023-11-13 20:31:24 -05:00
Sebastian Ullrich
8cfcf7ce61
fix: look through binop% variants in elabCDotFunctionAlias?
2023-11-12 16:57:51 +11:00
Sebastian Ullrich
dbe1c7f459
fix: make ^ a right action, add NatPow and HomogeneousPow
2023-11-12 16:57:51 +11:00
Kyle Miller
4bd0525a99
chore: update stage0
2023-11-12 16:57:51 +11:00
Sebastian Ullrich
31f234ba3c
feat: leftact%/rightact% binop variants
2023-11-12 16:57:51 +11:00
Kyle Miller
262f213391
chore: update stage0
2023-11-12 16:57:51 +11:00
Sebastian Ullrich
8b145b05e2
feat: add leftact%/rightact% syntax
2023-11-12 16:57:51 +11:00
Scott Morrison
f3c3a1b62d
feat: find Decidable instances via unification ( #2816 )
...
Because `Decidable` carries data,
when writing `@[simp]` lemmas which include a `Decidable` instance on the LHS,
it is best to use `{_ : Decidable p}` rather than `[Decidable p]`
so that non-canonical instances can be found via unification rather than
typeclass search.
(Previously this behaviour was often being hidden by the default `decide :=
true` in `simp`.)
2023-11-12 00:47:13 +00:00
Scott Morrison
1f68dec119
chore: fix commit used for PR release ( #2861 )
...
We were checking out the synthetic merge commit between the PR `HEAD`
and `master`, and this was then breaking the logic to determine which
nightly-testing branches to use in Mathlib and Std.
2023-11-11 00:35:27 +00:00
Joachim Breitner
fd0a209f74
refactor: TerminationHint: Remove duplicted code line ( #2859 )
...
(I sincerely hope that erasing from a map is idempotent :-))
2023-11-10 16:17:27 +00:00
Marcus Rossel
5189578a48
doc: fix typo in Array.Mem docstring ( #2856 )
2023-11-10 11:16:32 +00:00
Leonardo de Moura
dcb40f67c1
chore: update RELEASES.md
2023-11-09 04:06:30 -08:00
Leonardo de Moura
e53952f167
chore: fix tests
2023-11-09 04:06:30 -08:00
Leonardo de Moura
d7c05a5ac4
fix: fixes #2042
2023-11-09 04:06:30 -08:00
Scott Morrison
ac73c8d342
feat: Lean.Linter.logLintIf ( #2852 )
...
A utility function moving from Mathlib.
2023-11-09 23:00:34 +11:00
Scott Morrison
007b1b5979
feat: extend API of KVMap ( #2851 )
2023-11-09 22:59:56 +11:00
Sebastian Ullrich
b278172b7c
chore: add import Lean benchmark
2023-11-07 18:46:28 +01:00
Leonardo de Moura
d9eddc9652
feat: ensure nested proofs having been abstracted in equation and unfold auxiliary theorems
2023-11-07 06:23:45 -08:00
Leonardo de Moura
2099190ad4
chore: do not abstract nested proofs in a proof
2023-11-07 06:23:45 -08:00
Eric Wieser
72f7144403
doc: mention the proof-binding syntax in match
...
This comes up over and over again in the zulip; let's document it!
2023-11-06 11:28:03 -08:00
Joachim Breitner
995725b256
test: C trigraph
...
add a test file that checks that C trigraphs in string literals are not
miscompiled.
2023-11-06 16:31:05 +01:00
Joachim Breitner
b1f2fcf758
fix: Escape ? in C literal strings to avoid trigraphs
...
This fixes #3829
2023-11-06 16:25:00 +01:00
Scott Morrison
37c154b6de
chore: use flow control rather than exit codes in CI scripts ( #2828 )
2023-11-06 06:08:12 +00:00
Scott Morrison
f201f63e49
chore: fix identification of most recent nightly tag ( #2827 )
2023-11-06 03:53:06 +00:00
Scott Morrison
691113ca7c
chore: add Mathlib CI comments using the mathlib bot ( #2824 )
2023-11-06 00:25:41 +00:00
Joachim Breitner
ea20911a85
feat: Better error location in structural recursion ( #2819 )
...
previously, only the WellFounded code was making use of the error
location in the RecApp-metadata. We can do the same for structural
recursion. This way,
```
def f (n : Nat) : Nat :=
match n with
| 0 => 0
| n + 1 => f (n + 1)
```
will show the error with squiggly lines under `f (n + 1)`, and not at
`def f`.
2023-11-05 22:24:17 +01:00
Sebastian Ullrich
b0d1c3b99c
perf: avoid quadratic number of info tree nodes in DecEq deriving handler
2023-11-04 13:59:23 -07:00
Scott Morrison
8cf9d13ca4
chore: still fixing CI ( #2817 )
2023-11-04 06:32:05 +00:00
Leonardo de Moura
47c09ac36c
chore: the previous commit exposed an issue with simp
...
`simp` was previously swallowing runtime exceptions and masking an
issue with this example.
`runT` is defined by well-founded recursion, but reducing the ground
term `runT x` takes a long time when `decide := true`.
Remark PR #2722 changes the `decide` default value to `false`.
When `decide := true`, we should probably have better diagnostics /
error messages for this kind of situation.
2023-11-03 05:56:59 -07:00
Leonardo de Moura
4afcdeb771
fix: fixes #2775
...
fixes #2744
2023-11-03 05:56:59 -07:00
Scott Morrison
e217ad3929
chore: more adjustments to new CI scripts ( #2811 )
2023-11-03 02:34:23 +00:00
Henrik Böving
1d061da98f
fix: --no-build lake test for new naming scheme
2023-11-02 23:21:47 +01:00
Henrik Böving
59d3b3d85a
chore: update stage0
2023-11-02 23:21:47 +01:00
Henrik Böving
433c094e95
feat: LLVM bc separation for CMake
2023-11-02 23:21:47 +01:00
Siddharth Bhat
5980e665a8
test: add test of LLVM integration into lake
2023-11-02 23:21:47 +01:00
Siddharth Bhat
3b175fdb0e
feat: lake LLVM backend support
...
Co-authored-by: Henrik Böving <hargonix@gmail.com >
Co-authored-by: Mac Malone <tydeu@hatpress.net >
2023-11-02 23:21:47 +01:00
Siddharth Bhat
145a4952e5
feat: add internal flag lean_has_llvm_backend
2023-11-02 23:21:47 +01:00
Siddharth Bhat
f165414e13
fix: use -O3 for LLVM tests in common.sh
...
This is the same flag that the C test uses. Previously this was hidden
in the Lean compiler itself but now that the optimization pass is phased
out of the compiler we need to put it here.
Co-authored-by: Henrik Böving <hargonix@gmail.com >
2023-11-02 23:21:47 +01:00
Henrik Böving
1b3799ecde
fix: set LEANC_CC to the CMake CC by default
...
In LLVM builds the Cmake CC is necessarily clang -> leanc will be able
to act on LLVM bitcode files if configured this way.
Co-authored-by: Siddharth <siddu.druid@gmail.com >
2023-11-02 23:21:47 +01:00
Siddharth Bhat
3369356788
fix: remove target triple parameter from FFI that no longer exists in the Lean API
2023-11-02 23:21:47 +01:00
Siddharth Bhat
b8d81e1081
fix: option parsing for bitcode, needs to be -b
2023-11-02 23:21:47 +01:00
Siddharth Bhat
0b37bad2cb
feat: split bitcode optimization and object file building to be outside lean
2023-11-02 23:21:47 +01:00
Mario Carneiro
82196efe94
feat: hovers on open and export decls
2023-11-02 17:01:51 +01:00
Scott Morrison
4934f5c56d
chore: force push to nightly branch when making nightly-YYYY-MM-DD tags ( #2808 )
2023-11-02 12:05:15 +00:00
Scott Morrison
e360544001
chore: don't run irrelevant CI steps ( #2807 )
2023-11-02 11:45:19 +00:00
Joachim Breitner
03b681c056
doc: Add docstrings to dbg_trace and assert! in do blocks ( #2787 )
...
they had doc strings in their term forms, but the doElem variant did
not, as noted [on zulip](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Infoview.20hangs.20after.20using.20.60IO.2Eprintln.60.20in.20.60Delab.60/near/399317734 )
2023-11-02 11:10:42 +01:00
Scott Morrison
1bc07a4e06
chore: fix to Mathlib combined CI ( #2806 )
2023-11-02 09:54:08 +00:00
Scott Morrison
1e915b1248
chore: fix to Mathlib combined CI ( #2804 )
2023-11-02 06:21:19 +00:00
Scott Morrison
da32b5f837
feat: use nightly-testing-YYYY-MM-DD branches on Mathlib for testing PRs, and be more conservative about launching Mathlib CI ( #2798 )
2023-11-02 12:07:06 +11:00
Mauricio Collares
cfe5a5f188
chore: change simp default to decide := false ( #2722 )
2023-11-02 10:06:38 +11:00
TAKANO Mitsuhiro
29b09b0900
chore: CI: use setup-emsdk@v12 ( #2796 )
...
Fix for below warning in GitHub Actions.
```
Web Assembly
The following actions uses node12 which is deprecated and will be forced to run on node16: mymindstorm/setup-emsdk@v11. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
```
2023-11-01 18:53:08 +01:00
Scott Morrison
9d2ea99753
chore: fix duplication in release notes ( #2794 )
2023-11-01 00:52:49 +00:00
tydeu
72fdddfed3
test: adjustment for lake update behavior change
2023-10-31 13:25:26 -04:00
tydeu
793329fd56
fix: lake: consistent order for manifest packages
2023-10-31 13:25:26 -04:00
Scott Morrison
55bd2eb2e1
feat: reorder Lake help
2023-10-31 13:24:44 -04:00
Scott Morrison
c359d03b60
chore: begin development cycle for v4.4.0 ( #2792 )
2023-10-31 08:57:26 +00:00
Scott Morrison
49bdeb3c46
doc: complete release notes for v4.3.0-rc1 ( #2791 )
2023-10-31 02:50:06 +00:00
Leonardo de Moura
db281f60fe
fix: fixes #2178 ( #2784 )
2023-10-30 15:06:56 +11:00
Scott Morrison
7286dfa38a
feat: withAssignableSyntheticOpaque in assumption ( #2596 )
...
* feat: withAssignableSyntheticOpaque in assumption
* add test
2023-10-30 04:00:52 +00:00
thorimur
50f2154cbb
fix: make rw [foo] look in the local context for foo before it looks in the environment ( #2738 )
2023-10-30 14:08:02 +11:00
Parth Shastri
642bc5d8f3
fix: replace DecidableEq with BEq/LawfulBEq in List mem theorems ( #2041 )
2023-10-30 14:03:16 +11:00
Joachim Breitner
f74ae5f9c0
feat: Array.mem: Avoid DecidableEq, set up decreasing_trivial ( #2774 )
...
The notation `a ∈ as` for Arrays was previously only defined with
`DecidableEq` on the elements, for (apparently) no good reason. This
drops this requirements (by using `a ∈ as.data`), and simplifies a bunch
of proofs by simply lifting the corresponding proof from lists.
Also, `sizeOf_lt_of_mem` was defined, but not set up to be picked up by
`decreasing_trivial` in the same way that the corresponding List lemma
was set up, so this adds the tactic setup.
The definition for `a ∈ as` is intentionally not defeq to `a ∈ as.data`
so that the termination tactics for Arrays don’t spuriously apply when
recursing through lists.
2023-10-30 13:47:30 +11:00
Eric Rodriguez
df6626f06b
doc: fix a link in development documentation #2780
2023-10-30 10:58:25 +11:00
Kyle Miller
5fc079d9ce
fix: dsimp missing consumeMData when closing goals by rfl ( #2776 )
...
Fixes #2514
2023-10-30 09:32:32 +11:00
Leonardo de Moura
af301fac55
chore: update stage0
2023-10-29 09:41:48 -07:00
Leonardo de Moura
175a6ab606
refactor: add Init/MetaTypes to workaround bootstrapping issues
...
Motivation: we could not set `simp` configuration options at `WFTactics.lean`
2023-10-29 09:38:23 -07:00
Leonardo de Moura
a53ec40df1
chore: update stage0
2023-10-29 09:18:23 -07:00
Leonardo de Moura
1abd5cc665
chore: add simp option unfoldPartialApp
...
It is not being used yet, but we need to add it before solving issue #2042 .
Reason: bootstrapping.
2023-10-29 09:12:21 -07:00
Leonardo de Moura
08c47b2d61
chore: update stage0
2023-10-29 09:07:33 -07:00
Patrick Massot
c916238e5c
feat: lake: sensible default arguments for math template ( #2770 )
2023-10-29 10:39:43 -04:00
Scott Morrison
f76a17b33f
chore: run CI against the head of the branch, not a virtual merge with master ( #2769 )
2023-10-27 21:46:49 +11:00
Scott Morrison
dba299ac6a
chore: update 'nightly' branch to track nightly releases ( #2767 )
2023-10-27 21:46:06 +11:00
Sebastian Ullrich
6c5f79c0df
chore: update stage0
2023-10-26 10:47:14 +02:00
Sebastian Ullrich
23c68cfc5b
fix: remove unguarded check_interrupted call
2023-10-26 08:33:09 +02:00
Sebastian Ullrich
9874848f83
perf: inline checkInterrupted
...
Amazingly, the extra result allocation seems to have triggered a mathlib
heartbeat timeout
2023-10-26 08:33:09 +02:00
Sebastian Ullrich
d3bc2ac1a9
fix: switch to C++ interruption whitelist
2023-10-26 08:33:09 +02:00
Sebastian Ullrich
462a583d98
fix: do not throw interrupt exceptions inside pure functions
2023-10-26 08:33:09 +02:00
Sebastian Ullrich
c5691f816a
feat: cancel tasks on document edit
2023-10-26 08:33:09 +02:00
Sebastian Ullrich
fa3cf4d613
feat: translate interrupted kernel exception
2023-10-26 08:33:09 +02:00
Sebastian Ullrich
74b8dda181
feat: check task cancellation in elaborator
2023-10-26 08:33:09 +02:00
Sebastian Ullrich
5f37f7d86f
feat: move check_interrupted from unused thread class to Task cancellation
2023-10-26 08:33:09 +02:00
Leonardo de Moura
dbcc7966cf
test: for simp [x] where x is a let-variable
2023-10-25 03:12:35 -07:00
Leonardo de Moura
a3642bd8d9
feat: add support for expanding let-declarations to simp
...
Given a local context containing `x : t := e`,
`simp (config := { zeta := false }) [x]` will expand `x` even
if `zeta := false`.
2023-10-25 03:12:35 -07:00
Leonardo de Moura
771ec8324c
chore: fix configuration for UnificationHints
2023-10-25 03:12:35 -07:00
Leonardo de Moura
691defdc5d
chore: typos and PR feedback
...
Co-authored-by: Scott Morrison <scott.morrison@gmail.com >
Co-authored-by: Scott Morrison <scott.morrison@gmail.com >
Co-authored-by: Scott Morrison <scott.morrison@gmail.com >
2023-10-25 03:12:35 -07:00
Leonardo de Moura
3b831271ee
fix: fixes #2669 #2281
2023-10-25 03:12:35 -07:00
Leonardo de Moura
3a13200772
refactor: add configuration options to control WHNF
...
This commit also removes parameter `simpleReduce` from discrimination
trees, and take WHNF configuration options.
Reason: it is more dynamic now. For example, the simplifier
will be able to use different configurations for discrimination tree insertion
and retrieval. We need this feature to address issues #2669 and #2281
This commit also removes the dead Meta.Config field `zetaNonDep`.
2023-10-25 03:12:35 -07:00
Leonardo de Moura
aecc83e2fc
chore: add some doc strings and cleanup
2023-10-25 03:12:35 -07:00
tydeu
170fd845f2
feat: LAKE_PKG_URL_MAP
2023-10-25 04:17:53 -04:00
Denis Gorbachev
d126c099f4
doc: Update contribution guides ( #2624 )
...
* doc: update contribution guides
This moves the contribution guide from `doc/contributions.md` to `CONTRIBUTING.md`.
2023-10-25 13:05:55 +11:00
thorimur
6063deb6bd
fix: rw ... at h unknown fvar bug ( #2728 )
2023-10-25 01:52:19 +00:00
thorimur
291e95e3c5
fix: add instantiateMVars to replaceLocalDecl ( #2712 )
...
* fix: `instantiateMVars` in `replaceLocalDecl`
* docs: update `replaceLocalDecl`
* test: `replaceLocalDecl` instantiates mvars
2023-10-25 10:26:09 +11:00
Buster Copley
bccbefdc1c
fix: version numbers in code actions ( #2721 )
...
Co-authored-by: Richard Copley <buster@buster.me.uk >
2023-10-24 22:55:47 +11:00
Scott Morrison
d07ec56c33
chore: correcting typos ( #2746 )
2023-10-24 10:55:30 +00:00
Leonardo de Moura
b00c13a00e
chore: remove "paper cut" when using Fin USize.size ( #2724 )
2023-10-24 21:06:35 +11:00
Mario Carneiro
eaf85607f4
fix: don't pack ._ files on MacOS ( #2743 )
2023-10-24 21:03:51 +11:00
Leonardo de Moura
a7323c9805
feat: use forall_prop_domain_congr in simp tactic
...
closes #1926
2023-10-23 06:19:19 -07:00
Leonardo de Moura
50d0aced7f
feat: add auxiliary lemma for simp
2023-10-23 06:19:19 -07:00
Leonardo de Moura
0bd15be1a1
chore: fix tests output
2023-10-22 06:48:22 -07:00
Leonardo de Moura
370476cc14
fix: bug at substCore
2023-10-22 06:48:22 -07:00
Leonardo de Moura
9a7565d66c
perf: closes #2552
2023-10-22 06:48:22 -07:00
Leonardo de Moura
52f1000955
chore: update doc, add support for modn
2023-10-20 19:07:48 -07:00
Leonardo de Moura
9d02e0ee6f
chore: remove unnecessary % operations at Fin.mod and Fin.div
...
We now have the missing proofs `Nat.mod_le` and `Nat.div_le_self` in
core.
See:
https://github.com/leanprover/std4/pull/286#discussion_r1359807875
2023-10-20 19:07:48 -07:00
thorimur
1facbde113
test: ensure dsimp can use rfl thm constants
2023-10-20 19:06:40 -07:00
thorimur
b5e95bf632
fix: allow constants to be marked for dsimp
2023-10-20 19:06:40 -07:00
tydeu
6c20673737
refactor: change postUpdate? config to a decl
2023-10-20 21:38:31 -04:00
github-actions[bot]
b52317537c
doc: update changelog
2023-10-20 18:51:37 +00:00
tydeu
6e98453189
chore: lake: test auto-manifest & update cleaning
2023-10-20 14:51:10 -04:00
tydeu
e435a45af7
feat: lake: create manifest on load if missing
2023-10-20 14:51:10 -04:00
Leonardo de Moura
419100d42b
feat: add Simp.Config.ground for simplifying nested ground terms
...
This is an experimental new feature. We need more bells and whistles,
and `cbv` tactic for improving its performance.
2023-10-19 13:59:17 -07:00
tydeu
67b5cd9c0e
feat: lake: run_io to execute IO at term elab time
2023-10-19 13:27:35 -04:00
tydeu
ca6d1fd47a
chore: lake: simplify config decl syntax
...
* deprecate `:=` syntax in config decls
* standardize field syntax across `where` and `{...}`
2023-10-19 13:25:07 -04:00
Scott Morrison
fb0d0245db
Revert "Cancel outstanding tasks on document edit in the language server" ( #2703 )
...
* Revert "perf: inline `checkInterrupted`"
This reverts commit 6494af4513 .
* Revert "fix: switch to C++ interruption whitelist"
This reverts commit 5aae74199b .
* Revert "fix: do not throw interrupt exceptions inside pure functions"
This reverts commit c0e3b9568e .
* Revert "feat: cancel tasks on document edit"
This reverts commit a2e2481c51 .
* Revert "feat: translate `interrupted` kernel exception"
This reverts commit 14c640c15e .
* Revert "feat: check task cancellation in elaborator"
This reverts commit 2070df2328 .
* Revert "feat: move `check_interrupted` from unused thread class to `Task` cancellation"
This reverts commit bf48a18cf9 .
2023-10-17 00:59:11 +00:00
SADIK KUZU
e0802d2dea
fix: typos in specialize.cpp ( #2702 )
2023-10-17 00:58:10 +00:00
tydeu
4441662490
test: lake: tests/manifest -> tests/depTree
...
also clarify its difference distinction with `tests/clone`
2023-10-16 13:35:24 -04:00
tydeu
8db978bb10
chore: lake: fail if no error in tests/serve
2023-10-16 13:35:24 -04:00
tydeu
894c3abb37
chore: lake: ignore manifest in examples/scripts
2023-10-16 13:35:24 -04:00
tydeu
2a91d3cf68
fix: lake: casing in tests/order/clean.sh
2023-10-16 13:35:24 -04:00
David Thrane Christiansen
d15a0a4acb
chore: lake: explicit branch name in tests/clone
2023-10-16 09:29:31 +00:00
Mario Carneiro
e0cba05167
refactor: env extensions can only modify .extensions ( #2661 )
2023-10-16 14:22:09 +11:00
Scott Morrison
2f9c964753
chore: update RELEASES.md to reflect v4.2.0-rc2 ( #2692 )
2023-10-16 01:19:12 +00:00
Mario Carneiro
c0b021e196
fix: pp projection indices starting at 1
2023-10-15 14:25:00 -07:00
Scott Morrison
3e79ddda27
chore: add items to RELEASES.md ( #2687 )
2023-10-15 02:51:58 +00:00
Scott Morrison
1e74c6a348
feat: use nat_gcd in the kernel ( #2533 )
...
* feat: use nat_gcd in the kernel
---------
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2023-10-15 13:49:41 +11:00
Scott Morrison
66ab016723
chore: simp tracing reports ← ( #2621 )
...
* chore: simp tracing reports ←
---------
Co-authored-by: Mario Carneiro <di.gama@gmail.com >
2023-10-15 12:12:10 +11:00
github-actions[bot]
6df09d16e5
doc: update changelog
2023-10-14 17:20:54 +00:00
Leonardo de Moura
b8af36fba0
chore: update comments at src/Lean/Meta/Basic.lean
...
Co-authored-by: Timo <timorcb@gmail.com >
2023-10-14 10:20:29 -07:00
Leonardo de Moura
29198371d9
chore: update comments at src/Lean/Meta/ExprDefEq.lean
...
Co-authored-by: Timo <timorcb@gmail.com >
2023-10-14 10:20:29 -07:00
Leonardo de Moura
3bc18797b0
fix: ensure transient cache results for different transparency modes don't mix up
2023-10-14 10:20:29 -07:00
Sebastian Ullrich
6d0a3287e0
fix: cache typos
2023-10-14 10:20:29 -07:00
Leonardo de Moura
e3b08060d0
fix: chore add workaround for corrupted cache
2023-10-14 10:20:29 -07:00
Leonardo de Moura
2253b788b4
perf: fine grain isDefEq cache for terms not containing metavariables
2023-10-14 10:20:29 -07:00
Arthur Adjedj
ff20a14c69
fix : make mk_no_confusion_type handle delta-reduction when generating telescope ( #2501 )
...
* fix : make `mk_no_confusion_type` handle delta-reduction when checking the inductive type.
* tests: extend `2500.lean`
2023-10-14 17:18:37 +11:00
mhuisi
d0ae87d13f
chore: improve error
2023-10-13 16:42:19 +02:00
mhuisi
b5348786a6
fix: pre-dependency-build-mode compatibility
2023-10-13 16:42:19 +02:00
mhuisi
253a5b931d
fix: correct handling of FileWorker restarts
2023-10-13 16:42:19 +02:00
mhuisi
9945fa04d6
feat: FileWorker handling of --no-build
2023-10-13 16:42:19 +02:00
Sebastian Ullrich
4e1d95ce58
feat: pass along extra print-paths flags and handle no-build Lake error in server
2023-10-13 16:42:19 +02:00
tydeu
f3de5eb1e8
feat: lake: --no-build to exit before a build
2023-10-13 14:42:58 +02:00
github-actions[bot]
9f63a9f288
doc: update changelog
2023-10-13 07:57:12 +00:00
Sebastian Ullrich
6494af4513
perf: inline checkInterrupted
...
Amazingly, the extra result allocation seems to have triggered a mathlib
heartbeat timeout
2023-10-13 09:52:26 +02:00
Sebastian Ullrich
5aae74199b
fix: switch to C++ interruption whitelist
2023-10-13 09:52:26 +02:00
Sebastian Ullrich
c0e3b9568e
fix: do not throw interrupt exceptions inside pure functions
2023-10-13 09:52:26 +02:00
Sebastian Ullrich
a2e2481c51
feat: cancel tasks on document edit
2023-10-13 09:52:26 +02:00
Sebastian Ullrich
14c640c15e
feat: translate interrupted kernel exception
2023-10-13 09:52:26 +02:00
Sebastian Ullrich
2070df2328
feat: check task cancellation in elaborator
2023-10-13 09:52:26 +02:00
Sebastian Ullrich
bf48a18cf9
feat: move check_interrupted from unused thread class to Task cancellation
2023-10-13 09:52:26 +02:00
tydeu
42802f9788
feat: lake: postUpdate? + test
2023-10-13 02:31:06 -04:00
tydeu
275af93904
test: lake: show module with failed import
2023-10-12 22:16:04 -04:00
tydeu
99b78bcc23
fix: stdin := .null in IO.Process.output
2023-10-12 08:55:26 +02:00
Mario Carneiro
6bdfde7939
fix: quot reduction bug
2023-10-11 21:25:34 -07:00
Scott Morrison
5d096c3fd8
chore: make Environment.add private ( #2642 )
...
* feat: replay constants into an Environment
* suggestions from code review
* chore: make Environment.add private
* patch Lake to use Environment.add via extern
2023-10-12 15:00:27 +11:00
Mario Carneiro
b558b5b912
perf: use quick_is_def_eq first
2023-10-11 19:35:16 -07:00
Scott Morrison
57e23917b6
fix: implementation of Array.anyMUnsafe
...
move test
2023-10-11 11:20:45 +02:00
Mario Carneiro
14e626a925
feat: ToMessageData (α × β) instance
2023-10-11 10:12:06 +02:00
Wojciech Nawrocki
856a9b5153
fix: treat pretty-printed names as strings
...
I initially expected `Name`s to always faithfully represent internal data, in particular that a name with macro scopes would have a form such as ```foo._@.Module._hyg.1``, and that tombstones would only appear in types that represent pretty-printed output such as as `String` or `Format`. However, that is not what happens. We have `sanitizeNames` which rewrites the `userName` field of local hypotheses to be `Name.str .anonymous "blah✝"`.
Then in the server code, we put these into `names : Array Name`e. This works fine for displaying in the infoview, but if we try to deserialize an `InteractiveHypothesisBundle` inside an RPC method for widget purposes, the `FromJson Name` instance blows up in `String.toName`.
I think my preferred solution is to, rather than 'fix' `String.toName` to accept these names with tombstones, stop pretending that they are actual `Name`s and re-type `InteractiveHypothesisBundle.names : Array String`. This should be a backwards-compatible change w.r.t. infoview code as the JSON representation is a string in either case. It is not backwards compatible w.r.t. meta code that uses this field.
2023-10-11 09:51:14 +02:00
David Christiansen
0700925bbe
doc: add a brief description of ccache
2023-10-11 09:30:46 +02:00
David Christiansen
7450a8cfa3
doc: describe commit conventions for update-stage0
...
Updates to stage0 should be their own commits.
2023-10-11 09:30:46 +02:00
Scott Morrison
97f5ad7804
chore: change trustCompiler axiom to True ( #2662 )
2023-10-11 06:59:03 +00:00
Mario Carneiro
115991066d
chore: remove unnecessary partial in ForEachExpr.visit ( #2657 )
2023-10-11 04:28:54 +00:00
Scott Morrison
076908d13b
feat: replay constants into an Environment ( #2617 )
...
* feat: replay constants into an Environment
2023-10-11 14:08:03 +11:00
Scott Morrison
833e778cd5
chore: add axiom for tracking use of reduceBool / reduceNat ( #2654 )
2023-10-11 01:47:59 +00:00
Scott Morrison
ca0e6b0522
chore: fix MVarId.getType' ( #2595 )
...
* chore: fix MVarId.getType'
* add test
2023-10-09 11:04:33 +00:00
Scott Morrison
41ed5ddf57
chore: add missing if statements to pr-release.yml workflow ( #2639 )
2023-10-09 04:00:56 +00:00
Sebastian Ullrich
00e981edcd
perf: do not inhibit caching of default-level match reduction
2023-10-08 17:24:20 -07:00
Leonardo de Moura
9f50f44eed
perf: missing cache at whnfImp
2023-10-08 17:22:14 -07:00
int-y1
ce4ae37c19
chore: fix more typos in comments
2023-10-08 14:37:34 -07:00
int-y1
8d7520b36f
chore: fix typos in comments
2023-10-08 10:46:05 +02:00
Sebastian Ullrich
184318fd8b
fix: eliminate widestring uses
2023-10-07 12:07:19 +02:00
David Christiansen
b0b922bae4
feat: list the valid case tags when the user writes an invalid one
...
Before, Lean would simply emit the message "tag not found". With this
change, it also tells the user what they could have written that would
be accepted.
2023-10-06 11:14:21 +02:00
David Christiansen
4c6d2b3998
doc: fix typo in comment
...
Fix a misspelled/mistyped word in a comment.
2023-10-06 11:14:21 +02:00
David Thrane Christiansen
b3ff006eb8
doc: add missing character in testing.md
...
The testing docs omit the `s` in the `tests` directory at one point. The incorrect directory name threw me off - it will probably throw others off.
2023-10-06 11:07:10 +02:00
Siddharth
734ce1ef2f
feat: show path of failed import ( #2616 )
2023-10-04 23:38:59 -04:00
Denis Gorbachev
42cb59efdd
doc: fix the link to contribution guidelines ( #2623 )
2023-10-05 12:02:55 +11:00
Sebastian Ullrich
dceed634a0
doc: fix typo in quickstart.md
2023-10-04 17:49:50 +02:00
Mario Carneiro
89b65c8f1d
feat: make Environment.mk private ( #2604 )
...
* feat: make `Environment.mk` private
---------
2023-10-04 22:02:54 +11:00
Alexander Bentkamp
7dc1618ca5
feat: Web Assembly Build ( #2599 )
...
Co-authored-by: Rujia Liu <rujialiu@user.noreply.github.com >
2023-10-04 09:04:20 +02:00
kuruczgy
83c7c29075
fix: XML parsing bugs ( #2601 )
...
* fix: make XML parser handle trailing whitespace in opening tags
* fix: make XML parser handle comments correctly
---------
Co-authored-by: György Kurucz <me@kuruczgy.com >
2023-10-04 11:51:22 +11:00
Alex J Best
44bc68bdc6
fix: withLocation should use withMainContext for target ( #2607 )
2023-10-04 10:12:43 +11:00
Arthur Adjedj
6b93f05cd1
feat : derive DecidableEq for mutual inductives ( #2591 )
...
* feat : derive `DecidableEq` for mutual inductives
* doc: document `RELEASES.md`
---------
2023-10-03 02:17:13 +00:00
github-actions[bot]
1572e55f06
doc: update changelog
2023-10-02 13:03:48 +00:00
Sebastian Ullrich
842881e137
fix: default for MACOSX_DEPLOYMENT_TARGET ( #2598 )
...
Co-authored-by: Scott Morrison <scott@tqft.net >
2023-10-02 13:03:19 +00:00
Denis Gorbachev
4b47462ccc
refactor: remove redundant let
2023-10-02 14:27:04 +02:00
thorimur
8c0f0b5250
docs: update RELEASES.md for #2502 ( #2606 )
2023-10-02 21:38:54 +11:00
Denis Gorbachev
e6292bc0b8
doc: fix docstring typos ( #2605 )
...
* lake: fix a typo in `get_config?` syntax doc
* fix a typo in `withImporting` doc
2023-09-30 07:51:35 -04:00
Joachim Breitner
06e057758e
chore: Remove unused variables from kernel
...
when I build lean locally, I get a nice and warning-free build
experience with the exception of these two unused variables. They can
probably go?
2023-09-27 09:43:07 -07:00
Scott Morrison
75f91f372c
chore: add release note about lake startup time ( #2597 )
2023-09-27 08:20:48 +00:00
Joachim Breitner
ae470e038e
docs: fix doc comment syntax in declModifiers doc comment ( #2590 )
...
The hover on `declModifiers` says doc comments are `/-! … -/`, when it
should say `/-- … -/`.
2023-09-27 11:57:40 +10:00
Mario Carneiro
e6fe3bee71
fix: hover term/tactic confusion
2023-09-26 10:16:37 +02:00
Scott Morrison
a5a150a862
chore: begin development cycle for v4.3.0 ( #2585 )
2023-09-26 04:18:54 +00:00
Sebastian Ullrich
4acdcc4c40
doc: add token error change to RELEASES.md ( #2579 )
2023-09-26 11:38:59 +10:00
tydeu
decf7a042a
perf: lake: lazily acquire repo URL/tag in :release
2023-09-25 17:07:27 -04:00
Sebastian Ullrich
2f51d5af49
chore: CI: add backport action
2023-09-25 11:33:14 +02:00
tydeu
2ac782c315
test: lake: add env & dep cfg benchmarks + cleanup
2023-09-22 20:31:48 -04:00
tydeu
16ceb4bf82
perf: lake: no lean --githash when collocated
2023-09-22 16:56:12 -04:00
Sebastian Ullrich
83ecac4fd8
perf: lake: build lakefile environment incrementally
2023-09-22 22:01:07 +02:00
Sebastian Ullrich
c3fd34f933
chore: disable "lake build lean" benchmark for now
2023-09-22 20:05:20 +02:00
Mac Malone
57fb580a71
doc: fix Inundation README typo
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2023-09-22 20:05:20 +02:00
tydeu
00efb7eaca
test: add reconfigure benchmark
2023-09-22 20:05:20 +02:00
tydeu
5b2e3e2b0a
test: make compatible with olean caching
2023-09-22 20:05:20 +02:00
tydeu
8dba187910
chore: inundation for configure benchmark
2023-09-22 20:05:20 +02:00
tydeu
7c2ca92661
doc: improve inundation README
2023-09-22 20:05:20 +02:00
tydeu
1d51492139
test: lake: add build Init/Lean/Lake benchmark
2023-09-22 20:05:20 +02:00
tydeu
9a0e57c721
test: add lake benchmarks
2023-09-22 20:05:20 +02:00
tydeu
1354fd9ccd
perf: do not detect lean's toolchain
...
use `ELAN_TOOLCHAIN` only
2023-09-21 18:52:52 -04:00
Arthur Adjedj
325fab1c1d
fix: don't try to generate below for nested predicates. ( #2390 )
...
* fix: don't try to generate `below` for nested predicates.
* doc : document test #2389
* doc : document `mkBelow`
* test: extend `2389.lean`
* style: fix comments in `IndPredBelow.lean` and `2389.lean`
2023-09-21 14:24:37 +10:00
thorimur
e79370a1e6
fix: only return new mvars from refine, elabTermWithHoles, and withCollectingNewGoalsFrom ( #2502 )
...
* fix: `withCollectingNewGoalsFrom`
do not collect old goals
* fix: update occurs check
* test: fix test `run/492.lean`
* docs: add docstring to `elabTermWithHoles`
* test: `refineFiltersOldMVars`
* test: fix `expected.out` name
* test: fix `expected.out` filename and line numbers
* docs: use long ascii dash instead of em dash
Co-authored-by: Scott Morrison <scott@tqft.net >
* docs: fix long line, mention lean4#2502
* docs: a couple more long lines
* test: fix line numbers
---------
Co-authored-by: Scott Morrison <scott@tqft.net >
2023-09-21 14:23:27 +10:00
tydeu
ec217caf22
feat: lake: add name to manifest
2023-09-20 22:52:39 -04:00
Sebastian Ullrich
dc60150b5a
chore: update domain
2023-09-20 15:13:27 -07:00
Sebastian Ullrich
4114ffa273
chore: update stage0
2023-09-20 13:58:13 +02:00
Joachim Breitner
b2d668c340
perf: Use flat ByteArrays in Trie ( #2529 )
2023-09-20 13:22:37 +02:00
Sebastian Ullrich
de76a5d922
chore: activate stale PR labeler
2023-09-20 09:18:46 +02:00
Patrick Massot
0a59fd96a5
chore: finer-grained ref in getCalcFirstStep ( #2563 )
...
Suggested by @gebner at https://leanprover.zulipchat.com/#narrow/stream/348111-std4/topic/Random.20calc.20ranges/near/372704972
2023-09-19 18:58:23 +00:00
Mario Carneiro
f0af71a57b
fix: use MoveFileEx for rename on win
2023-09-19 20:24:37 +02:00
Sebastian Ullrich
6bd0a615f1
chore: CI: add workflow_dispatch for stale labeler
2023-09-19 15:29:00 +02:00
Sebastian Ullrich
9038d2e886
chore: disambiguate whnf system category
2023-09-19 05:57:01 -07:00
Sebastian Ullrich
97c4fe3244
chore: CI: label stale PRs
2023-09-19 08:53:23 -04:00
Sebastian Ullrich
0c324a5445
fix: set MACOSX_DEPLOYMENT_TARGET in CI only
2023-09-19 06:11:31 -04:00
Henrik
0d5f9122a1
perf: reduce allocations in unused variable linter
2023-09-18 05:41:37 -04:00
David Renshaw
ba416f2c1c
fix: rename parameter of withImportModules to match doc string
2023-09-18 05:40:47 -04:00
Sebastian Ullrich
3e755dc0e1
fix: enforce linebreak between calc steps
2023-09-18 05:39:41 -04:00
thorimur
018020d36f
fix: uninterpolated error message in registerRpcProcedure ( #2547 )
2023-09-18 11:39:04 +02:00
Scott Morrison
c4bd112a7f
chore: when bumping Mathlib testing branches, bump to latest nightly-testing ( #2553 )
2023-09-18 02:02:24 +00:00
Scott Morrison
ee3ac9901e
chore: do not generate PR releases from forks ( #2550 )
2023-09-17 09:28:42 +00:00
Scott Morrison
26de6d3591
chore: begin development cycle for 4.2.0 ( #2545 )
...
* chore: add release notes for #2470 and #2480
* chore: begin development cycle for 4.2.0
* chore: add Lake-related release notes for v4.1.0
---------
Co-authored-by: Mac Malone <tydeu@hatpress.net >
2023-09-17 14:17:30 +10:00
mhuisi
74b92d9cde
chore: remove 'reproduces how often' field from bug template
2023-09-15 14:24:21 +02:00
mhuisi
debd71ec63
chore: make 'impact' a section
2023-09-15 14:24:21 +02:00
mhuisi
7eb3eb189f
chore: add new issue templates
2023-09-15 14:24:21 +02:00
tydeu
be97757982
chore: lake: code cleanup
...
* remove MTime `checkIfNewer`
* remove unnecessary `@[noinline]`
* inline `MainM` combinators
2023-09-14 02:15:37 -04:00
tydeu
3be4d74321
fix: lake: lowercase template exe name to avoid clash with lib
2023-09-14 02:15:37 -04:00
tydeu
9088df4c57
doc: lake: add pkg org info to README + other tweaks
2023-09-14 02:15:37 -04:00
tydeu
65fa1e06b2
feat: lake: improve package templates
...
* add library directory
* add note on `supportInterpreter`
* use `where`-style configs
2023-09-14 02:15:37 -04:00
tydeu
473d4c51ad
feat: lake: better native object tracing
...
* `weakLeanc/LinkArgs` for libs/mods/exes
* `weakArgs`/``extraDepTrace` for `buildO`
* include Lean trace when compiler is part of Lean toolchain
* do not include system-dependent file paths (e.g., `-I`) in dep trace
2023-09-14 02:15:37 -04:00
tydeu
be2eef5f3b
feat: lake: better cloud release management
...
* step logging for cloud release fetching
* do not include cloud release bundle in trace
* `Package.afterReleaseSync/Async` utilities
* also cleanup `Package.recComputeDeps`
2023-09-14 02:15:37 -04:00
tydeu
0bb6bcf24c
feat: lake: add upgrade and exec CLI aliases
2023-09-14 02:15:37 -04:00
tydeu
5983abcf78
fix: lake: use manifest opts
...
specifically, union manifest and config opts (preferring manifest)
2023-09-14 02:15:37 -04:00
tydeu
3f4a9dc9a1
feat: lake: better manifest-related error messages
2023-09-14 02:15:37 -04:00
tydeu
becc6fdb0e
feat: lake: detect Elan install and Elan toolchain
2023-09-14 02:15:37 -04:00
tydeu
7b9d8a04c2
feat: lake: maintain order of libs and deps
...
provides a well-defined selection order when decls overlap
2023-09-14 02:15:37 -04:00
tydeu
e96b338cd9
feat: lake run <s> for s in any pkg
2023-09-14 02:15:37 -04:00
tydeu
113caf73fa
fix: lake: reconfigure if toolchain changes
2023-09-14 02:15:37 -04:00
tydeu
522ea723ad
fix: lake: dep URL match check in updateGitRepo
...
see 6176fdba9e (r125905901)
2023-09-14 02:15:37 -04:00
Scott Morrison
c318d5817d
feat: allow configuring occs in rw
2023-09-13 12:03:18 -07:00
Joachim Breitner
09b9fdbdc3
chore: Do not hide stage0/src/stdlib_flags.h from diffs
2023-09-13 19:29:25 +02:00
Sebastian Ullrich
c2a5730bc9
chore: update stage0
2023-09-13 17:45:54 +02:00
Sebastian Ullrich
e9d60e143a
perf: avoid allocation in mkUnexpectedTokenErrors
2023-09-12 11:42:24 +02:00
Sebastian Ullrich
aab0e382c8
perf: inline ParserState.hasError
2023-09-12 11:42:24 +02:00
Sebastian Ullrich
241430aa03
perf: avoid calculating position, revert building unexpected message in mkUnexpectedTokenErrors
2023-09-12 11:42:24 +02:00
Sebastian Ullrich
c67686132a
feat: include unexpected token in error message
2023-09-12 11:42:24 +02:00
Sebastian Ullrich
e580c903e6
feat: adjust message range on unexpected token error
2023-09-12 11:42:24 +02:00
Sebastian Ullrich
6c0baf4aed
feat: support reporting range for parser errors, report ranges for expected token errors
2023-09-12 11:42:24 +02:00
Sebastian Ullrich
f4fc8b3e15
refactor: parser error setters
2023-09-12 11:42:24 +02:00
mhuisi
3aa1cfccea
doc: update quickstart doc for release
2023-09-08 16:39:55 +02:00
Jannis Limperg
13ca443f05
fix: simp: include class projections in UsedSimps ( #2489 )
...
* fix: simp: include class projections in UsedSimps
Fixes #2488
2023-09-07 08:54:00 +10:00
tydeu
cfe4db16ea
test: lake: check warnings in tests/clone
...
tests leanprover/lean4#2427
2023-09-06 17:35:59 -04:00
tydeu
2e726f5f5a
test: lake: give issue tests meaningful names
2023-09-06 17:35:59 -04:00
tydeu
8c4811a300
test: lake: merge 49 and 116 into tests/serve
2023-09-06 17:35:59 -04:00
tydeu
398c131620
test: lake: merge tests/102 into globs
2023-09-06 17:35:59 -04:00
tydeu
9136309e59
test: lake: move examples/init to tests
2023-09-06 17:35:59 -04:00
tydeu
bb09efe1c4
test: lake: rename test to tests
...
(for consistency with Lean)
2023-09-06 17:35:59 -04:00
Mario Carneiro
2037094f8c
doc: document all parser aliases ( #2499 )
2023-09-06 09:02:25 +00:00
Marcus Rossel
84bf315ac8
doc: fix comment for Unit
2023-09-05 07:52:06 +01:00
Scott Morrison
66e1472c7e
chore: in nightly release notes, look for changes since last nightly
2023-09-01 11:08:18 +01:00
Scott Morrison
77600c56b6
chore: base lean-pr-testing-NNNN branches off nightly-testing ( #2503 )
2023-09-01 05:43:13 +00:00
Jannis Limperg
9a262d7cef
fix: simpGoal reports incomplete UsedSimps ( #2487 )
2023-09-01 10:20:49 +10:00
Mario Carneiro
fec3575aaf
fix: 0-arg functions in C need f(void)
2023-08-31 15:39:47 -04:00
tydeu
4cc1ca7a58
chore: lake: update tests
2023-08-31 15:37:33 -04:00
tydeu
5f77e70d27
feat: lake: save elaborated config as an olean
2023-08-31 15:37:33 -04:00
tydeu
926663505e
chore: split up & simplify importModules
2023-08-31 15:37:33 -04:00
Scott Morrison
b2119313bd
feat: add toolchain-available labels to PRs ( #2492 )
2023-08-31 08:36:32 +00:00
Scott Morrison
7de335c661
fix: create a mathlib branch for each Lean PR ( #2494 )
2023-08-31 05:48:24 +00:00
Scott Morrison
c4540f75b8
chore: create a mathlib branch for each Lean PR ( #2473 )
...
* chore: create a mathlib branch for each Lean PR
* use existing branch if present
2023-08-31 13:24:41 +10:00
Scott Morrison
0901e062eb
feat: when making PR releases, only download necessary artifacts ( #2474 )
2023-08-31 12:52:22 +10:00
tydeu
a0440ea4ea
feat: lake: cache built file hashes
2023-08-30 22:18:33 -04:00
tydeu
c6299eef45
refactor: lake: cleanup Build/Module/Trace code
2023-08-30 22:18:33 -04:00
Scott Morrison
a7efe5b60e
Revert "fix: make sure refine preserves pre-existing natural mvars ( #2435 )" ( #2485 )
...
This reverts commit 0b64c1e330 .
2023-08-30 08:00:30 +00:00
Scott Morrison
b8084d54e3
doc: update RELEASES.md for rename of getConst? ( #2482 )
2023-08-30 04:44:23 +00:00
Scott Morrison
f1f9dc0f2f
chore: remove - from semver prerelease ( #2481 )
2023-08-29 23:14:28 +00:00
Scott Morrison
869d64e97a
chore: update README to reflect beginning stable releases ( #2477 )
2023-08-29 13:24:19 +00:00
Scott Morrison
1fac294a2e
chore: add introduction to RELEASES.md ( #2476 )
2023-08-29 13:10:55 +00:00
Scott Morrison
a5583d72bb
chore: use bash-compatible SemVer regex ( #2475 )
2023-08-29 11:45:21 +00:00
Scott Morrison
4a41e7eb53
chore: basic tests exercising rw
2023-08-29 08:07:58 +01:00
Scott Morrison
aba37e37a5
chore: update CI to create official releases ( #2472 )
2023-08-29 05:48:20 +00:00
Scott Morrison
6861474e01
feat: create release at lean4-pr-releases for each PR ( #2448 )
2023-08-29 14:11:45 +10:00
Scott Morrison
7959091ce4
feat: add labels from comments ( #2460 )
2023-08-29 14:09:20 +10:00
Joachim Breitner
f7bff16c9a
fix: If src is a dir, assume the lean file has the full path ( #2465 )
...
It seems that before, if `$src` isn’t a file, but a directory, that it
would contain `Bar.lean` directly, and not `Foo/Bar.lean`. This seemd
odd and would not allow dependencies to be included easily.
2023-08-28 14:45:45 +02:00
Marcus Rossel
7ee7595637
doc: fix typos ( #2467 )
2023-08-28 15:40:33 +10:00
thorimur
0b64c1e330
fix: make sure refine preserves pre-existing natural mvars ( #2435 )
...
* fix: `withCollectingNewGoals`
* don't exclude pre-existing natural mvars
* test: ensure pre-existing natural mvars are preserved
* docs: update comment and include issue number
* test: expected.out
* docs: add module docstrings to test
* also deleted superfluous `add_synthetic_goal`
* test: fix expected.out line numbers
* Update tests/lean/refinePreservesNaturalMVars.lean
Co-authored-by: Scott Morrison <scott@tqft.net >
* docs: clarify comment
---------
Co-authored-by: Scott Morrison <scott@tqft.net >
2023-08-25 19:25:54 -07:00
Scott Morrison
1dd443a368
doc: improve doc-string for Meta.getConst?
2023-08-24 07:42:28 -07:00
tydeu
d29b8e5422
chore: remove binaries before building them
...
This is required to avoid "permission denied" errors on Windows if the the file is already in use.
2023-08-23 14:33:27 -04:00
Mac Malone
216d2460e0
doc: explanation for lake.lock disabling
...
Co-authored-by: Scott Morrison <scott@tqft.net >
2023-08-23 01:58:18 -04:00
tydeu
25e673df54
chore: disable lake.lock (for now)
2023-08-23 01:58:18 -04:00
Mac Malone
8a536d0246
feat: lake env w/o configuration + more ( #2428 )
...
* feat: `lake env` w/o configuration + more
* chore: `lake env printenv DYLD_LIBRARY_PATH` illegal on MacOS
2023-08-23 13:27:16 +10:00
tydeu
898cd0b647
fix: include moreLinkArgs in precompile link
2023-08-22 21:47:04 -04:00
Scott Morrison
83556a1120
chore: add PULL_REQUEST_TEMPLATE.md
2023-08-22 07:08:13 -07:00
Connor Baker
24cfae2421
doc: fix typo in Lake's Require DSL
2023-08-21 12:43:56 -04:00
Mario Carneiro
ea60ac1443
doc: fix mid priority doc comment
2023-08-21 13:19:43 +02:00
Sebastian Ullrich
63d2bdd490
fix: integer type in llvm_count_params
2023-08-18 19:34:21 +02:00
Sebastian Ullrich
4e52283728
fix: FFI signature mismatches
2023-08-18 19:34:21 +02:00
tydeu
9d05b5f081
feat: warn rather than error if lake.lock disappears
2023-08-17 23:24:11 -04:00
Leonardo de Moura
50bece202b
doc: add RFC questions
2023-08-17 20:23:38 -07:00
Joachim Breitner
6b429fed8f
doc: fix markup in IO.RealWorld ( #2430 )
...
so that
<https://leanprover-community.github.io/mathlib4_docs/Init/System/IO.html#IO.RealWorld >
looks good.
2023-08-17 11:55:03 -07:00
Scott Morrison
f1412ddb45
feat: enable failIfUnchanged by default in simp
2023-08-16 10:14:23 -07:00
Scott Morrison
58d19b80b9
test: compiling from the interpreter, with common imports
...
hacky fix to windows test
Include test from #2407 as well
2023-08-16 10:11:50 -07:00
Sebastian Ullrich
f22695fdc5
fix: interpret module initializer at most once
2023-08-16 10:11:50 -07:00
Sebastian Ullrich
d4be21b559
chore: CI: Linux LLVM is not a release
2023-08-16 10:37:30 +02:00
tydeu
6176fdba9e
feat: warn on local changes to dependency & related fixes
2023-08-16 09:44:12 +02:00
tydeu
b328835f4d
fix: lake: reverse-ffi, manifest, and 62 tests
2023-08-15 20:33:09 -04:00
Henrik
35aa2c91a2
feat: LLVM backend: implement the equivalent of -fstack-clash-protection
2023-08-15 14:45:58 +02:00
tydeu
b81224c570
feat: lake update <pkg> & related tweaks
2023-08-15 09:50:39 +02:00
Leonardo de Moura
b5a736708f
fix: fixes #2419
2023-08-14 16:18:30 -07:00
tydeu
736af918f5
doc: IO.Process.getPID tweak + IO.FS.Mode
2023-08-14 18:42:04 +02:00
Tobias Grosser
beddf011d7
chore: update stage0
2023-08-14 13:33:46 +02:00
Siddharth Bhat
496460020a
fix: disabling forwarding --target to lean.
...
This will ensure that we do not invoke `lean --target` without compiling
using LLVM.
2023-08-14 13:33:46 +02:00
Henrik
8d3af73853
feat: Linux LLVM CI for stage1+
2023-08-14 13:33:46 +02:00
Siddharth Bhat
146296b5fa
feat: enable LLVM in stage1+ compiler
2023-08-14 13:33:46 +02:00
Siddharth Bhat
0054f6bfac
feat: link 'llvm.h.bc' and then set linkage to internal
...
This obviates the need to play weak linkage games when
we build `lean.h.bc` from `lean.h`. We perform the following steps:
1. We remove the `static` modifier from all definitions in `lean.h`.
This makes all definitions have `extern` linkage. Thus, when we build
a `lean.h.bc` using `clang`, we will actually get definitions
(instead of an empty file)
2. We build `lean.h.bc` from `lean.h` using `clang`.
3. When it comes time to link, we link
`current_module.bc := LLVMLinkModules2(current_module.bc, lean.h.bc)`.
4. We loop over every symbol that arrived from `lean.h.bc`
in `current_module.bc` and we then set this symbol to have
`internal` linkage. This simulates the effect of
`#include <lean.h>` where every definition in `lean.h`
has internal linkage.
This yajna, one hopes, pleases the linker gods.
2023-08-14 13:33:46 +02:00
Leonardo de Moura
fac9e64cdf
chore: update stage0
2023-08-13 09:56:29 -07:00
Scott Morrison
61fea57e73
feat: add failIfUnchanged flag to simp
2023-08-13 09:49:25 -07:00
Tobias Grosser
736a21cd5a
chore: remove trailing whitespaces in EmitLLVM
...
For some reason, these two were missed in the last commit.
2023-08-13 16:18:23 +02:00
Tobias Grosser
d90176af71
chore: remove trailing whitespaces in CMakeLists.txt
2023-08-13 16:18:23 +02:00
Tobias Grosser
a0c0c486fd
chore: remove trailing whitespace in EmitLLVM
...
This patch should not result in any functional changes, but
will reduce the diff of an upcoming PR.
2023-08-13 11:07:14 +02:00
Siddharth Bhat
0eddc167b9
feat: LLVM linkage bindings
2023-08-12 16:51:58 +02:00
Leonardo de Moura
dce7f71126
chore: clarify/fix contribution guidelines
2023-08-11 14:48:50 -07:00
Sebastian Ullrich
ff45efe3fa
doc: one more enableInitializersExecution remark
2023-08-11 11:45:58 -07:00
Leonardo de Moura
133e03ce7f
feat: update external contribution guidelines
2023-08-11 11:39:41 -07:00
tydeu
510bc47cc3
fix: delete lake.lock on error & test
2023-08-11 02:29:06 -04:00
tydeu
06853e5c3b
fix: lake: lock test timeout + README typos
2023-08-10 12:17:47 -04:00
tydeu
75a9284320
feat: lake: lean lib extraDepTargets & related tweaks
2023-08-09 20:25:43 -04:00
Junyan Xu
2aeeed13cf
fix: generalize Prod.lexAccessible to match Lean 3 ( #2388 )
...
* fix: generalize Prod.lexAccessible to match Lean 3
* fix
* fix
2023-08-09 08:54:53 -07:00
Marcus Rossel
8af25455ae
doc: fix comment for Nat.sub
2023-08-09 08:54:24 -07:00
Sebastian Ullrich
befc4b997b
doc: writing good tests
2023-08-09 08:52:55 -07:00
tydeu
e7a1512da8
doc: lake: update README target signatures
2023-08-08 21:42:07 -04:00
tydeu
63d303558d
test: lake clean
2023-08-08 21:42:07 -04:00
tydeu
4c04690c24
fix: -d option for lake print-paths + test
2023-08-08 21:42:07 -04:00
tydeu
874d44a26e
feat: lake clean <pkgs>
2023-08-08 21:42:07 -04:00
tydeu
3e4232c204
feat: lake.lock file for builds
2023-08-08 16:23:43 -04:00
tydeu
c79c7c89b3
feat: IO.Process.getPID & IO.FS.Mode.writeNew
2023-08-08 16:23:43 -04:00
tydeu
a315fdceb3
test: lake: make 116 deterministic & related tweaks
2023-08-08 16:21:28 -04:00
Sebastian Ullrich
bb738796ae
test: update parser benchmark, add to speedcenter suite
2023-08-08 18:40:19 +02:00
tydeu
8de1c0786c
chore: make Lean build shell configurable
2023-08-07 23:05:37 +02:00
Eric Wieser
1f3ef28a1d
fix: correct universe polymorphism in Lean.instFromJsonProd
...
The previous type was
```
Lean.instFromJsonProd.{u, v} {α β : Type (max u v)} [FromJson α] [FromJson β] :
FromJson (α × β)
```
where universe metavariable assignment assigned the wrong universe to both types!
2023-08-06 07:32:30 -07:00
Sebastian Ullrich
254582c000
doc: link to FFI examples
2023-08-04 10:45:53 +02:00
Sebastian Ullrich
f19f329b4c
test: reverse FFI from C with Lake
2023-08-04 10:45:53 +02:00
tydeu
98da3c9e46
fix: lake: do not hash remote dep names + test
...
accidental leftover from a scrapped feature
2023-08-03 21:21:28 -04:00
Scott Morrison
ca4d824d75
chore: correct doc-string for elabTerm
2023-08-03 06:52:08 -07:00
tydeu
125a0ba798
chore: lake: adapt versioning to Lean repo & bump to v5.0.0
2023-08-03 01:09:18 -04:00
tydeu
0aa570044a
fix: lake: distinct lib and precompile lib names for roots
2023-08-03 01:09:18 -04:00
tydeu
bb8259b9af
feat: lake: warn on mismatch pkg name and require name
...
see #2324
2023-08-03 01:09:18 -04:00
tydeu
35bad47c1b
refactor: lake: cleanup source materialization
2023-08-03 01:09:18 -04:00
Sebastian Ullrich
17602d9f28
chore: avoid "unused parameter" warnings in lean.h
2023-08-02 10:20:57 +02:00
tydeu
5fb42eb5c1
fix: include extraDepJob in module trace
2023-08-02 04:03:56 -04:00
tydeu
28f7334139
chore: .gitignore fixes
2023-08-02 04:03:56 -04:00
tydeu
e330a57036
test: fix 62/116/buildArgs
2023-08-02 04:03:56 -04:00
tydeu
86f11311ba
test: merge examples/git and test/104 & use local test repo
2023-08-02 04:03:56 -04:00
tydeu
5c8093eaff
chore: delete Lake's .github directory
2023-08-02 04:03:56 -04:00
tydeu
de3b198676
fix: use exe over lib & add missing opts from lib config to exe
2023-08-02 04:03:56 -04:00
tydeu
bb5cf96664
fix: fetch target type signatures
2023-08-02 04:03:56 -04:00
tydeu
6721150367
refactor: touchup DSL target docstrings & reorg
2023-08-02 04:03:56 -04:00
Siddharth
b9ec36d089
chore: get rid of all inline C annotations for LLVM ( #2363 )
2023-07-30 10:39:40 +02:00
Sebastian Ullrich
2eaa400b8e
fix: do not unnecessarily wait on additional snapshot in server request handlers ( #2370 )
...
Co-authored-by: Wojciech Nawrocki <wjnawrocki+gh@protonmail.com >
2023-07-30 05:58:46 +00:00
Mario Carneiro
9c910ebe8e
perf: faster replace "\r\n" "\n"
2023-07-29 17:31:48 -04:00
Siddharth
a436c225d8
chore: disable lake 116 test ( #2358 )
...
The test is flaky due to the presence of a fixed 'sleep()'.
The LLVM backend has introduced a performance
regression in Lake which causes this test to fail, as the
current sleep duration of 3s is insufficient.
Further investigation into the performance regression is pending.
We decided to disable the `leanlaketest_116` entirely on account
of the test being flaky by construction
(https://github.com/leanprover/lean4/pull/2358#issuecomment-1655371232 ).
2023-07-29 09:40:18 +00:00
Sebastian Ullrich
8fc1af650a
fix: symmetry in orelse antiquotation parsing
2023-07-28 08:36:33 -07:00
Sebastian Ullrich
eceac9f12a
perf: avoid syntax stack copy at orelseFn
2023-07-28 08:36:33 -07:00
Scott Morrison
b3fa4fd053
chore: revert #2317
2023-07-28 08:33:49 -07:00
Wojciech Nawrocki
74e0f09009
fix: handle error in withTraceNode message action ( #2364 )
...
* fix: handle error in withTrace message action
* Update src/Lean/Util/Trace.lean
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
* Update Trace.lean
---------
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2023-07-28 08:01:13 -07:00
Sebastian Ullrich
aeb60764c1
feat: auto-complete declaration names in arbitrary namespaces
2023-07-28 07:50:09 -07:00
Sebastian Ullrich
687f50ab33
fix: never show private names in completion
2023-07-28 07:50:09 -07:00
Sebastian Ullrich
e84ce2e1f1
test: make completion tests less dependent on core
2023-07-28 07:50:09 -07:00
Sebastian Ullrich
b15d6d41b8
fix: missing mkCIdents in Lean.Elab.Deriving.Util
2023-07-28 07:48:34 -07:00
Sebastian Ullrich
8ffb389f3f
chore: Nix bump to LLVM 15
...
Also update mdbook dependency hash from nixpkgs bump.
Peeled from https://github.com/leanprover/lean4/pull/2340
to enable LLVM for stage1+ builds.
2023-07-28 10:56:54 +02:00
Mario Carneiro
776bff1948
fix: repeat conv should not auto-close the goal
2023-07-27 18:15:35 -04:00
Sebastian Ullrich
53477089fe
chore: remove unused macOS dependencies
2023-07-26 15:36:36 +02:00
Sebastian Ullrich
132f655736
chore: add zlib search path on macOS only when linking libleanshared
2023-07-26 15:36:36 +02:00
Sebastian Ullrich
978a5b2528
fix: loading libc++ on macOS Sonoma
2023-07-26 15:36:36 +02:00
Siddharth Bhat
96c59ccced
chore: update stage0
2023-07-25 11:03:16 +02:00
Siddharth Bhat
073c8fed86
feat: LLVM backend: support for visibility Style & DLL storage
...
Changes peeled from:
https://github.com/leanprover/lean4/pull/2340
to allow a `stage0` bump on master before merging in the
changes that allow LLVM to build in stage1+.
2023-07-25 11:03:16 +02:00
Alex J Best
808bb9b579
perf: dont repeatedly elab term in rw at multiple locations #2317
2023-07-24 08:47:52 -07:00
Bulhwi Cha
3b6bc4a87d
style: remove unnecessary space characters
2023-07-23 16:11:11 +02:00
Mario Carneiro
dd313c6894
feat: add IO.FS.rename
2023-07-22 23:21:32 +02:00
Bulhwi Cha
7809d49a62
doc: fix type signature of Coe
2023-07-22 14:16:21 +02:00
Sebastian Ullrich
544b704a25
test: add Lake tests
2023-07-21 09:19:19 +02:00
Sebastian Ullrich
d991f5efe0
fix: ship libLake.a
2023-07-21 09:19:19 +02:00
Sebastian Ullrich
e2fbfb5731
chore: remove Lake flake
...
Fixes leanprover/lake#165
2023-07-21 09:19:19 +02:00
Sebastian Ullrich
8999ef067b
chore: Nix: fixup Lake integration
2023-07-21 09:19:19 +02:00
Jannis Limperg
6407197e54
chore: better error message for loose bvar in whnf
2023-07-20 13:47:20 -07:00
Bulhwi Cha
367b38701f
refactor: simplify String.splitOnAux ( #2271 )
2023-07-19 11:50:27 +00:00
Wojciech Nawrocki
e1b3f10250
doc: fix contradictory docstring
2023-07-19 10:53:47 +02:00
F. G. Dorais
d10e3da673
fix: protect sizeOf lemmas
2023-07-19 08:50:59 +02:00
Sebastian Ullrich
d62fca4e9c
chore: safer bench script
2023-07-19 08:31:39 +02:00
Leonardo de Moura
634193328b
fix: fixes #2327
2023-07-18 07:18:27 -07:00
Sebastian Ullrich
daae36d44d
chore: remove obsolete file
2023-07-17 10:38:35 +02:00
Sebastian Ullrich
c35e41ce15
chore: Nix: add lake executable
2023-07-17 10:38:35 +02:00
Sebastian Ullrich
90aab46071
chore: fix update-stage0
2023-07-17 10:38:35 +02:00
Sebastian Ullrich
bf76eca0cd
chore: merge Lake into src/lake
2023-07-17 10:38:20 +02:00
Sebastian Ullrich
9a3657df3f
chore: remove Lake submodule
2023-07-15 12:03:41 +02:00
tydeu
d37bbf4292
chore: update Lake
2023-07-14 23:43:04 -04:00
Floris van Doorn
1a6663a41b
chore: write "|-" as "|" noWs "-" ( #2299 )
...
* remove |- as an alias for ⊢
* revert false positive |->
* fix docstring
* undo previous changes
* [unchecked] use suggestion
* next attempt
* add test
2023-07-14 09:48:20 -07:00
Leonardo de Moura
212cd9c3e6
fix: fixes #2321
2023-07-13 14:41:32 -07:00
Scott Morrison
0d5c5e0191
feat: relax test in checkLocalInstanceParameters to allow instance implicits
2023-07-13 10:54:06 -07:00
Scott Morrison
7213ff0065
doc: document generating releases via tags ( #2302 )
2023-07-13 17:39:54 +02:00
Sebastian Ullrich
4562e8d9a2
fix: do not use GMP on ARM Linux
2023-07-13 09:35:00 +02:00
Leonardo de Moura
6e90442130
chore: disable benchtest at debug and fsanitize
2023-07-11 19:19:42 -07:00
Leonardo de Moura
fd0549feb5
chore: improve test
2023-07-11 19:19:42 -07:00
Leonardo de Moura
6d857a93b5
perf: pointer set for traversing DAGs
2023-07-11 19:19:42 -07:00
Leonardo de Moura
264e376741
chore: add helper function
2023-07-11 19:19:42 -07:00
Sebastian Ullrich
a3ebfe29ea
chore: revert "chore: compile against glibc 2.26"
...
This reverts commit ae0e0ed1db .
2023-07-10 21:44:10 +02:00
Sebastian Ullrich
ae0e0ed1db
chore: compile against glibc 2.26
2023-07-10 18:59:06 +02:00
Adrien Champion
d8a548fe51
chore: fix Int.div docstring examples
2023-07-10 09:09:07 -07:00
Scott Morrison
60b8fdd8d6
feat: use nat_pow in the kernel
2023-07-10 09:01:14 -07:00
Mario Carneiro
51694cd6de
fix: calling convention for module initializers
2023-07-10 09:00:17 -07:00
Mario Carneiro
76023a7c6f
fix: don't run [builtin_init] when builtin = false
2023-07-10 08:58:02 -07:00
tydeu
f46c792206
doc: fix up facet module docs
2023-07-06 00:37:32 -04:00
Sebastian Ullrich
c268d7e97b
fix: kill descendant processes on worker exit
2023-07-05 23:42:53 +02:00
Sebastian Ullrich
9901804a49
feat: SpawnArgs.setsid, Child.kill
2023-07-05 23:42:53 +02:00
Leonardo de Moura
32d5def5b8
feat: add bne_iff_ne
2023-07-05 08:51:34 -07:00
tydeu
538ed26ca4
feat: module deps facet (+ test)
...
also improve facet build info docs
2023-07-03 18:31:34 -04:00
tydeu
331c4c39b8
feat: type-level named Package + target fetch helpers
2023-07-01 23:10:25 -04:00
tydeu
68800cdcf8
chore: fix test
2023-07-01 19:25:51 -04:00
tydeu
a0626a9334
refactor: libDir -> nativeLibDir; oleanDir -> leanLibDir
...
also
* remove deprecated `isLeanOnly`
* touch-up some docs
2023-07-01 11:53:52 -04:00
Leonardo de Moura
5402c3cf76
chore: fix test file names
2023-07-01 06:20:36 -07:00
Mario Carneiro
f1b2a8acce
fix: lazy_binop + coercion bug
...
fixes #2300
2023-07-01 06:05:25 -07:00
Leonardo de Moura
94d4a427e2
fix: fixes #2115
2023-06-30 19:54:38 -07:00
Leonardo de Moura
a002ce6d0d
fix: fixes #2077
2023-06-30 19:26:00 -07:00
Sebastian Ullrich
e2383729a6
doc: clarify current release process
2023-06-30 10:30:37 -07:00
tydeu
aee9ce4321
chore: update Lake
2023-06-30 09:44:26 +02:00
tydeu
01b3e70a8d
feat: add some helpers for pkg and lib roots
...
also update some docstrings
2023-06-29 23:00:03 -04:00
tydeu
8f3468b82c
chore: bump Lean version
2023-06-29 20:16:58 -04:00
tydeu
5190c7fcc3
test: rename issue dirs that test multiple issues
2023-06-29 17:47:18 -04:00
tydeu
337891c9eb
fix: do not build missing directory modules (+ test)
...
error reported on Zulip:
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/lake.20build.20all/near/370788618
2023-06-29 17:42:27 -04:00
Leonardo de Moura
ec42581d1f
perf: use Core.transform instead of Meta.transform at betaReduceLetRecApps
...
Observed big performance improvement on files containing big proofs
generated using tactics.
2023-06-28 12:29:12 -07:00
Sebastian Ullrich
371fc8868a
doc: move out Nix setup
2023-06-28 09:49:08 +01:00
Leonardo de Moura
eece499da9
fix: fixes #2282
2023-06-27 16:46:38 -07:00
Sebastian Ullrich
f0583c3fd6
feat: trace nodes for SizeOf and injectivity theorem generation
2023-06-27 16:17:46 -07:00
Wojciech Nawrocki
ba4bfe26f2
fix: add missing instantiateMVars
2023-06-27 16:13:56 -07:00
Sebastian Ullrich
d54ecc4373
doc: refer to mathlib4 instructions in quickstart
2023-06-27 14:21:44 -07:00
Sebastian Ullrich
e84a5891f8
doc: quickstart note on moving from Lean 3 to 4
2023-06-27 14:21:44 -07:00
Mario Carneiro
3104c223d8
fix: reference implementation for Array.mapM
2023-06-27 14:21:22 -07:00
tydeu
46c77afeaf
chore: update Lake
2023-06-27 21:35:51 +01:00
Sebastian Ullrich
e1999ada7f
fix: make "elaboration" metric work in language server
2023-06-27 15:56:34 +01:00
Mario Carneiro
bb8cc08de8
chore: compact objects in post-order
2023-06-26 08:35:19 -07:00
Pietro Monticone
fff4aea0d9
doc: fix typos ( #2287 )
2023-06-25 20:30:33 +02:00
Leonardo de Moura
4036be4f50
fix: add missing check at IR checker
2023-06-23 08:43:39 -07:00
Mario Carneiro
123c1ff7f0
fix: basic ident fallback in identComponents
2023-06-22 09:50:24 +01:00
Floris van Doorn
32e93f1dc1
fix: delete Measure and SizeOfRef ( #2275 )
...
* move Measure to Nat namespace
We could (and maybe should) also move various other declarations to namespaces, like measure. However, measure seems to be used a lot in termination_by statements, so that requires other fixes as well. Measure seems to be almost unused
* fix
* delete Measure and SizeOfRef instead
2023-06-21 22:51:28 -07:00
Mario Carneiro
e0893b70e5
fix: incorrect type for SpecInfo.argKinds
2023-06-21 22:50:29 -07:00
Leonardo de Moura
26877c42ae
chore: update stage0
2023-06-21 22:30:53 -07:00
Leonardo de Moura
425f42cd83
feat: better support for Nat literals at DiscrTree.lean
2023-06-21 22:30:09 -07:00
Leonardo de Moura
bebf1927f8
chore: remove workarounds
2023-06-21 20:35:33 -07:00
Leonardo de Moura
19d266e0c5
chore: upate stage0
2023-06-21 20:31:47 -07:00
Leonardo de Moura
184f2ed597
chore: improve isNonTrivialProof
2023-06-21 20:28:17 -07:00
Leonardo de Moura
7367f2edc6
fix: unfold constant theorems when transparency is set to .all
2023-06-21 20:28:17 -07:00
Leonardo de Moura
9df2f6b0c9
fix: bump transparency to .all when reducing the major premise of Acc.rec and WellFounded.rec
2023-06-21 20:28:17 -07:00
Leonardo de Moura
2b8e55c2f1
fix: Nat literal bug at DiscrTree.lean
2023-06-21 20:28:17 -07:00
Leonardo de Moura
d6695a7a2e
fix: use mkAuxTheoremFor when creating helper proof_n theorems
2023-06-21 20:28:17 -07:00
tydeu
3f9a867469
test: generalize make test/clean targets
2023-06-21 18:48:09 -04:00
tydeu
abdbc39403
test: add test for leanprover/lake#174
2023-06-21 18:19:12 -04:00
Scott Morrison
a44dd71ad6
feat: add flag for apply to defer failed typeclass syntheses as goals
2023-06-19 20:07:07 -07:00
Scott Morrison
82196b5b94
feat: allow upper case single character identifiers when relaxedAutoImplicit false ( #2277 )
...
* feat: allow upper case single character identifiers when relaxedAutoImplicit false
* update tests
* fix tests
* fix another test
---------
Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au >
2023-06-19 20:04:09 -07:00
Mario Carneiro
2348fb37d3
fix: use Lean.initializing instead of IO.initializing
2023-06-17 06:57:14 -07:00
Mario Carneiro
e64a2e1a12
fix: misleading indentation
2023-06-17 06:56:53 -07:00
Denis Gorbachev
1292819f64
chore: update scripts example to new GetElem syntax ( leanprover/lake#171 )
2023-06-10 03:55:55 -04:00
Gabriel Ebner
bff612e59e
fix: simp: synthesize non-inst-implicit tc args
...
Fixes #2265 .
2023-06-09 16:32:02 -07:00
Mario Carneiro
1ac8a4083f
feat: report section name in invalid end msg
2023-06-09 14:41:39 -07:00
Mario Carneiro
b4cf1dd943
feat: binder info for generalize
2023-06-09 14:41:00 -07:00
Mario Carneiro
b139a97825
fix: hygieneInfo should not consume whitespace
2023-06-09 15:05:19 +02:00
tydeu
3fb146fad2
chore: fix test on MacOS
2023-06-08 14:05:04 -04:00
tydeu
462d306184
chore: fix test on non-Windows
2023-06-08 13:40:21 -04:00
tydeu
13d5e6f542
feat: add untraced weakLeanArgs
...
closes leanprover/lake#172
2023-06-08 03:29:51 -04:00
tydeu
cf216ecd16
chore: update Lean to 06-01
...
also:
* refactor code relying on the old `toName`
* do not decapitalize package names in `lake new`
2023-06-08 02:06:13 -04:00
tydeu
c0edda1373
doc: fix some README wording
2023-06-07 22:25:52 -04:00
Sebastian Ullrich
451ccec154
fix: save when used as last tactic
2023-06-07 14:29:45 -07:00
Sebastian Ullrich
8ba05f34ea
doc: remove reference to harmful elan command
2023-06-07 20:08:33 +02:00
Sebastian Ullrich
d5348dfac8
chore: update stage0
2023-06-06 15:01:00 +02:00
Sebastian Ullrich
7987b795bb
fix: workspace symbols
...
Somehow was broken by #2233
2023-06-06 14:58:24 +02:00
Bulhwi Cha
b3eeeffd90
doc: improve documentation of Init.Coe
...
Delete misleading explanations of `CoeFun` and `CoeSort`, and fix the
grammar in the documentation of `Init.Coe`.
2023-06-05 15:52:25 -07:00
Mario Carneiro
bc841809c2
chore: remove intermediate
2023-06-05 15:50:11 -07:00
Mario Carneiro
2ae78f3c45
fix: tail-recursive String.foldr
2023-06-05 15:50:11 -07:00
Mario Carneiro
e68554b854
fix: use empty string instead of mk
2023-06-05 15:50:11 -07:00
Mario Carneiro
fd72fdf8f8
fix: incorrect utf8 in splitAux
2023-06-05 15:50:11 -07:00
Mario Carneiro
aa60791db3
feat: remove partial in Init.Data.String.Basic
2023-06-05 15:50:11 -07:00
Sebastian Ullrich
90e2288187
fix: interpret initializers in order
2023-06-05 15:46:35 -07:00
bc²
18d6bce7a9
chore: add ₚ to lstlean.tex ( #2221 )
2023-06-05 16:53:08 +02:00
Sebastian Ullrich
97cffd4711
fix: prefer resolving parser alias over declaration
2023-06-05 16:52:23 +02:00
Sebastian Ullrich
af6c7cdbe0
doc: changelog
...
Resolves #2254
2023-06-03 11:12:40 +02:00
Mario Carneiro
a8d6178e19
feat: implement have this (part 2)
2023-06-02 16:19:02 +02:00
Mario Carneiro
0c624d8023
chore: update stage0
2023-06-02 16:19:02 +02:00
Mario Carneiro
43f6d0a761
feat: implement have this (part 1)
2023-06-02 16:19:02 +02:00
Mario Carneiro
c20a7bf305
feat: hygieneInfo parser (aka this 2.0)
2023-06-02 16:19:02 +02:00
tydeu
3f49861ee1
test: add test with - in lake new
...
from https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/lake.20new.20lean-data
2023-06-02 03:18:06 -04:00
Mario Carneiro
e826f5f42a
fix: spacing around calc
2023-06-02 09:15:15 +02:00
Henrik
28538fc748
feat: trace nodes for kernel type checking
2023-05-31 06:10:26 -07:00
Bulhwi Cha
c1a58b212a
chore: remove whitespace ( #2244 )
...
Remove a duplicate whitespace character.
2023-05-31 06:00:42 -07:00
Leonardo de Moura
25384fe951
fix: fixes #2232
2023-05-31 05:48:25 -07:00
Leonardo de Moura
e04d67f55f
chore: expand docstring for TransformStep.visit
2023-05-31 05:48:25 -07:00
Sebastian Ullrich
efe75b2b16
chore: update Lake
2023-05-31 03:04:46 -07:00
Mario Carneiro
9ec9ea61a4
fix: infinite loop in isClassApp?
2023-05-30 18:47:17 -07:00
Mario Carneiro
5661b15e35
fix: spacing and indentation fixes
2023-05-28 18:48:36 -07:00
Leonardo de Moura
83cc0bcc96
fix: fixes #2199
2023-05-28 18:29:09 -07:00
Henrik Böving
f6c8923a9b
feat: add compiler.enableNew for the new compiler
2023-05-28 17:43:32 -07:00
Jannis Limperg
c84690028b
fix: ignore implDetail hyps in withLocation
2023-05-28 17:40:55 -07:00
Mario Carneiro
01ba75661e
fix: implement String.toName using decodeNameLit
...
fixes #2231
2023-05-28 17:38:57 -07:00
Bulhwi Cha
8d0504b3b7
doc: add docstring to String.next'
2023-05-28 17:32:08 -07:00
Mario Carneiro
5d3ac5f80c
fix: panic in Match.SimpH.substRHS
2023-05-28 17:04:28 -07:00
Mac
b74d9c09d5
chore: delete unintended commit of flake.lock ( leanprover/lake#170 )
2023-05-24 19:26:36 -04:00
Sebastian Ullrich
a32c3e0140
feat: make .lean hashes cross-platform compatible ( leanprover/lake#170 )
2023-05-23 08:10:19 -04:00
Sebastian Ullrich
8d4dd2311c
fix: increase semantic token highlight limit
2023-05-21 10:17:35 +02:00
Mario Carneiro
df49512880
fix: use withoutPosition in anon constructor
2023-05-17 09:48:34 +02:00
Gabriel Ebner
ebc32af2e6
chore: fix flaky test
2023-05-15 13:23:38 -07:00
Parth Shastri
555f5f390c
fix: stop iterating over visited mvars in collectUnassignedMVars
2023-05-15 09:37:19 -07:00
Parth Shastri
954190e457
fix: remove repeat calls to inferType in ignoreField
2023-05-15 09:35:44 -07:00
Scott Morrison
fd49af196f
chore: lower monad for Term.reportUnsolvedGoals
2023-05-15 09:33:42 -07:00
Gabriel Ebner
5781752985
fix: offset unification with a+a+1
...
Fixes #2136
2023-05-15 09:06:37 -07:00
Gabriel Ebner
ae2b2c3903
chore: add regression test for mathlib eta perf issue
2023-05-15 09:05:41 -07:00
Gabriel Ebner
1f21ababfa
chore: remove etaExperiment option
2023-05-15 09:05:41 -07:00
Gabriel Ebner
41729263c5
fix: tests
2023-05-15 09:05:41 -07:00
Gabriel Ebner
8de8c80119
perf: do not unify proof arguments
2023-05-15 09:05:41 -07:00
Gabriel Ebner
89cb94fcab
perf: try structure eta after delta
2023-05-15 09:05:41 -07:00
Gabriel Ebner
9211dd6541
chore: tc: re-enable eta
2023-05-15 09:05:41 -07:00
Mario Carneiro
7f84bf07ba
fix: bug in reference implementation of String.get?
2023-05-15 08:35:20 -07:00
Mario Carneiro
ad4b822734
fix: use snake case for @[code_action_provider]
2023-05-08 22:25:48 +02:00
Bulhwi Cha
445fd417be
doc: add more explanations of quotients
...
Add explanations of `Quotient.ind` and `Quotient.inductionOn` to
`Init.Core`.
2023-05-05 12:22:59 -07:00
Bulhwi Cha
9fd1aeb0d8
fix: change the type of Quotient.ind
...
Change the type of `Quotient.ind` by changing the type of `q` from
`Quot Setoid.r` to `Quotient s`.
2023-05-05 12:22:59 -07:00
Leonardo de Moura
ede14adb20
chore: expand remark
2023-05-05 12:21:32 -07:00
Martin Dvořák
2d33726c69
doc: f(x) is no longer allowed ( #2135 )
2023-05-05 12:19:19 -07:00
Leonardo de Moura
ebcab266c6
chore: remove empty line
2023-05-05 12:18:36 -07:00
Henrik Böving
0e042d8ef6
fix: LCNF simp forgot to mark normalized decls as simplified
2023-05-05 12:17:26 -07:00
Mario Carneiro
c9e84a6ad6
fix: remove private from string defs
2023-05-05 12:09:38 -07:00
Jakob von Raumer
45b49e7f02
fix: typos
2023-05-05 12:07:54 -07:00
Bulhwi Cha
401e9868f8
doc: uncapitalize a letter
...
"this Type" should be "this type".
2023-05-05 12:04:35 -07:00
Gabriel Ebner
f9da1d8b55
chore: update Lake
2023-04-19 10:57:48 -07:00
Scott Morrison
ac7c447855
chore: update src/Init/Tactics.lean
2023-04-19 07:15:08 -07:00
tydeu
72487e5650
fix: remove olean/ilean duplication in module traces
2023-04-18 20:58:40 -04:00
tydeu
eb157000a4
chore: remove doc of isLeanOnly and warn on its use
2023-04-18 20:58:40 -04:00
Gabriel Ebner
0656482b91
feat: show number of files to go when building
2023-04-18 20:58:40 -04:00
Gabriel Ebner
312960820c
feat: priority for bindSync
2023-04-18 20:58:40 -04:00
Gabriel Ebner
98a55105ff
chore: update Lean version
2023-04-18 20:58:40 -04:00
Gabriel Ebner
a1a30aac1c
refactor: simplify recBuildLeanCore
2023-04-18 20:58:40 -04:00
Scott Morrison
96969363e6
chore: modify misleading doc-string for repeat tactic
2023-04-18 15:56:49 +02:00
Henrik Böving
a6ae661195
feat: profiling of linters
2023-04-18 15:30:21 +02:00
Henrik Böving
36f0acfc51
feat: add timing profiling to the new compiler
2023-04-18 12:20:27 +02:00
tydeu
c49a7d84e9
chore: fix test
2023-04-15 21:04:46 -04:00
tydeu
346da2c29c
feat: bare lake run default scripts
2023-04-15 20:07:47 -04:00
tydeu
227a350747
doc: tweak README + fix some typos
2023-04-15 18:32:21 -04:00
Gabriel Ebner
caa4494cb7
chore: remove dangerous instances
2023-04-15 18:16:53 -04:00
Sebastian Ullrich
8a302e6135
fix: match discriminant reduction should not unfold irreducible defs
2023-04-10 21:09:04 -07:00
Gabriel Ebner
7f51628986
fix: simp: strip mdata when testing for True/False
...
Fixes #2173
2023-04-10 21:06:42 -07:00
Scott Morrison
06c752448b
chore: add missing simp lemma (¬ False) = True
2023-04-10 21:05:54 -07:00
Gabriel Ebner
8075d1f45d
fix: reset local context in mkInjectiveTheorems
2023-04-10 21:05:16 -07:00
Gabriel Ebner
4af329588e
doc: clarify semi-out params
2023-04-10 13:00:04 -07:00
Gabriel Ebner
56c3e3334f
doc: semiOutParam
2023-04-10 13:00:04 -07:00
Gabriel Ebner
54c02d75b2
chore: let consumeTypeAnnotations remove semiOutParam
2023-04-10 13:00:04 -07:00
Gabriel Ebner
5eb9688846
chore: flaky tests
2023-04-10 13:00:04 -07:00
Gabriel Ebner
b8671ed18d
fix: disable checkSynthOrder for Quote instance
2023-04-10 13:00:04 -07:00
Gabriel Ebner
d58f552b84
chore: update stage0
2023-04-10 13:00:04 -07:00
Gabriel Ebner
4544443d98
feat: reorder tc subgoals according to out-params
2023-04-10 13:00:04 -07:00
Gabriel Ebner
25fe723b14
chore: add semiOutParam annotations
2023-04-10 13:00:04 -07:00
Sebastian Ullrich
a0b960b77b
perf: --profile can use tracing fast path
2023-04-10 16:57:54 +02:00
Sebastian Ullrich
41a3ebed02
fix: profiler threshold in C++
2023-04-10 16:57:54 +02:00
Sebastian Ullrich
59ac123f61
chore: remove with_trace macro again
2023-04-10 16:57:54 +02:00
Sebastian Ullrich
427540db45
chore: remove redundant Elab.input trace class in favor of Elab.command
2023-04-10 16:57:54 +02:00
Sebastian Ullrich
6fdb73c6ed
feat: pp.oneline
2023-04-10 16:57:54 +02:00
Sebastian Ullrich
3336443358
fix: convert traces to messages at outermost level only
2023-04-10 16:57:54 +02:00
Sebastian Ullrich
f9dcc9ca1b
fix: trim syntax in messages
2023-04-10 16:57:54 +02:00
Sebastian Ullrich
bafa4e0a78
feat: use with_trace for important trace classes
2023-04-10 16:57:54 +02:00
Sebastian Ullrich
d8e826c2a7
feat: trace.profiler
2023-04-10 16:57:54 +02:00
Sebastian Ullrich
d51e404d6a
refactor: move profiling options to Lean
2023-04-10 16:57:54 +02:00
Olivier Taïbi
9aeae67708
fix: advance pointer into array when generating random bytes
...
otherwise if we have more than one chunk then the first one is overwritten
over and over, and the end of the array is not really random
2023-04-06 11:32:12 +02:00
Bulhwi Cha
d694bf2d09
doc: heading ( #2180 )
...
Add '#' to the docstring.
2023-04-03 09:40:22 +02:00
Enrico Borba
6d583284df
chore: Nix: fix depRoot with huge number of deps ( #2179 )
...
If `deps` or `depRoots` are too large, bash will carsh when executing
the modified script. This is because there are OS-level limits on the
size of environment variables. This commit changes the script so that
`deps` and `depRoots` are written to files instead of being passed as
environment variables.
2023-04-01 09:45:38 +02:00
Gabriel Ebner
742d053a97
fix: respect pp.raw in interactive .ofGoal
...
Fixes #2175
2023-03-30 17:19:35 -07:00
Scott Morrison
a45f808da4
chore: don't rely on simp calling decide ( leanprover/lake#168 )
2023-03-28 12:32:39 -04:00
Adrien Champion
39f0fa670a
doc: document Int and its basic operations ( #2167 )
2023-03-28 14:54:14 +02:00
Connor Baker
667d54640d
chore: Nix: use strings instead of URL literals ( #2172 )
2023-03-28 10:10:24 +02:00
github-actions[bot]
5495a4f91c
doc: update changelog
2023-03-27 15:48:22 +00:00
Sebastian Ullrich
b076d488e3
feat: show typeclass and tactic names in profile output
2023-03-27 17:47:52 +02:00
Sebastian Ullrich
4048455060
chore: Nix: fix asan attribute
2023-03-27 16:48:49 +02:00
int-y1
9bc6fa1c6e
chore: fix typos
2023-03-27 10:05:50 +02:00
Sebastian Ullrich
b81cff87bc
chore: update temci
2023-03-24 11:34:21 +01:00
Pietro Monticone
158d58f3c3
doc: fix typos ( #2160 )
2023-03-22 10:01:59 +01:00
Sebastian Ullrich
042d14c470
fix: List.append_eq name
...
Fixes #2157
2023-03-19 10:28:48 +01:00
Sebastian Ullrich
7648ec57b5
fix: adapt to new Handle.mk signature
...
The previous code was arguably wrong in any case as the result of `lake
init` should not depend on the current platform
2023-03-17 09:15:26 -04:00
Gabriel Ebner
8650804b02
perf: cache tc results with mvars
2023-03-16 15:26:38 -07:00
Gabriel Ebner
d3c55ef249
perf: do not reset tc cache when adding local instances
2023-03-16 15:26:38 -07:00
Sebastian Ullrich
83c1a1ab77
chore: bench: update temci
2023-03-16 16:39:50 +01:00
Sebastian Ullrich
a62d412dce
fix: implement · tacs as a builtin elaborator, part 2
...
Fixes #2153
2023-03-15 17:00:15 +01:00
Sebastian Ullrich
c327a61d33
chore: update stage0
2023-03-15 14:14:39 +01:00
Sebastian Ullrich
9d144c73fd
fix: implement · tacs as a builtin elaborator
2023-03-15 13:59:16 +01:00
Sebastian Ullrich
b8cc5b277e
fix: strict indentation check in · tacs
2023-03-15 11:33:19 +01:00
Sebastian Ullrich
97b4143e14
chore: update stage0
2023-03-15 10:55:42 +01:00
Sebastian Ullrich
a89accfbbe
feat: parser alias for tacticSeqIndentGt
2023-03-15 10:54:05 +01:00
Sebastian Ullrich
d7a0197fee
chore: improve tacticSeqIndentGt error message
2023-03-15 10:52:57 +01:00
Sebastian Ullrich
db2e710072
chore: Nix: update lean4-mode
2023-03-15 10:52:03 +01:00
Sebastian Ullrich
3d21124445
perf: scale Expr.replace cache with input size
2023-03-14 23:20:23 +01:00
Sebastian Ullrich
96aa021007
feat: add attribute application profile metric
2023-03-13 16:17:20 +01:00
Sebastian Ullrich
b15d7b8f17
feat: add kernel type checking profile metric
2023-03-13 16:17:20 +01:00
Gabriel Ebner
620587fc42
feat: make lake clean clean all packages
...
Fixes leanprover/lake#155
2023-03-10 22:51:11 -05:00
Gabriel Ebner
57fea2d8e3
feat: accept empty git hash as version
...
Fixes leanprover/lake#154
2023-03-10 22:49:36 -05:00
Gabriel Ebner
276bf837e2
feat: show stdout by default
2023-03-10 22:48:35 -05:00
Sebastian Ullrich
a4f732e6b1
fix: ignore vanishing files during watchdog update
2023-03-10 19:13:24 +01:00
Sebastian Ullrich
4cc6057f4a
chore: ensure consistent (Unix) encoding for source files
2023-03-10 16:27:56 +01:00
Sebastian Ullrich
15c146b382
feat: proper I/O errors from getLine
2023-03-10 16:27:56 +01:00
Sebastian Ullrich
51e77d152c
fix: do not inherit file handles across process creation
2023-03-10 16:27:56 +01:00
Sebastian Ullrich
113de7cca1
refactor: move from fopen to open
2023-03-10 16:27:56 +01:00
Sebastian Ullrich
aacab14394
chore: remove support for text-mode I/O
...
This didn't do anything except on Windows, where it would make the
application differ from standard Windows applications, which we don't
want.
2023-03-10 16:27:56 +01:00
int-y1
0477276f66
chore: fix typos in prelude
2023-03-09 18:12:24 +01:00
Adrien Champion
ce0d2a6928
chore: formatting/capitalization in RELEASES.md
...
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2023-03-09 18:11:11 +01:00
Adrien Champion
5111595753
chore: discuss alternative calc syntax in RELEASES.md
2023-03-09 18:11:11 +01:00
Sebastian Ullrich
8509a28798
feat: profile tactic execution
2023-03-09 17:18:19 +01:00
Gabriel Ebner
0cc9d7a43d
fix: do not reverse subgoals of local instances
2023-03-08 15:54:07 -08:00
Gabriel Ebner
2262579f9b
fix: tc: filter out assigned subgoals at the correct place
2023-03-08 15:54:07 -08:00
Gabriel Ebner
3ab859553e
fix: allow function coercion to assign universe mvars
2023-03-08 15:54:07 -08:00
Gabriel Ebner
1c641b569a
chore: synthInstance trace message on cache hit
2023-03-08 15:54:07 -08:00
Gabriel Ebner
1f61633da7
fix: typo in trace class name
2023-03-08 15:54:07 -08:00
Gabriel Ebner
e6b3202df3
chore: remove dead code
2023-03-08 15:54:07 -08:00
Sebastian Ullrich
d4caf1f922
fix: $_* anonymous suffix splice syntax pattern
2023-03-06 16:30:18 +01:00
Martin Dvořák
3b50410ec0
doc: typo
2023-03-04 11:19:25 +01:00
Gabriel Ebner
0da281fab4
fix: reject occurrences of inductive type in index
...
Fixes #2125
2023-02-28 12:22:54 -08:00
Kaiyu Yang
421e73f6c5
doc: fix typo in README ( leanprover/lake#157 )
2023-02-24 16:02:00 -05:00
Adrien Champion
473486eeb9
fix: calc indentation and allow underscore in first relation
2023-02-23 14:20:21 -08:00
Martin Dvořák
83dffbc2f8
doc: mention lake clean in README ( leanprover/lake#156 )
2023-02-23 12:14:17 -05:00
Sebastian Ullrich
3f6c5f17db
fix: unhygiene in expandExplicitBinders
2023-02-22 17:07:31 +01:00
Gabriel Ebner
7992ce6b4d
chore: add test for calc
2023-02-21 16:41:46 -08:00
Gabriel Ebner
adcca17991
chore: add option to enable structure eta in tc search
2023-02-21 16:41:30 -08:00
tydeu
16af1dddf4
fix: include link args in shared lib trace of extern lib
2023-02-21 06:35:39 -05:00
Sebastian Ullrich
c826168cfa
fix: atomic --profile output for xargs -P
2023-02-11 17:41:07 +01:00
Sebastian Ullrich
3146aa477d
fix: accumulate_profile: accept category names containing digits (e.g. hygiened decl names)
2023-02-11 17:41:07 +01:00
Gabriel Ebner
75252d2b85
perf: whnf projections during defeq
2023-02-09 19:54:23 -08:00
Gabriel Ebner
ecc74c5a9d
fix: defeq condition for projections
2023-02-09 19:54:23 -08:00
Gabriel Ebner
448f49ee91
Revert "fix: reenable structure eta during tc search"
...
The fix is blocked by slow defeq checks for TC instances; see issues
1986 and 2055. Enabling it right now causes lots of timeouts in
mathlib4.
https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/bump.20to.202023-02-06/near/326223768
This reverts commit 15a045ee66 .
2023-02-09 11:37:30 -08:00
Gabriel Ebner
3c562c1a9b
fix: unify goal before executing nested tactics in calc
...
Fixes #2095
2023-02-09 11:34:07 -08:00
Jon Eugster
07bd2a8488
feat: add quot_precheck Lean.Parser.Term.explicit
2023-02-08 12:21:40 +01:00
Sebastian Ullrich
9d013ba3f5
chore: update stage0
2023-02-08 12:11:41 +01:00
Gabriel Ebner
15a045ee66
fix: reenable structure eta during tc search
...
Fixes #2074 .
2023-02-05 11:41:00 -08:00
tydeu
4b974fd60b
chore: update Lake
2023-02-03 22:10:15 +01:00
tydeu
5080b08922
chore: reduce imports in Lake.Build.Actions
2023-02-02 20:38:06 -05:00
Arthur Paulino
05c2ac5f3c
download lean-toolchain directly
2023-02-02 20:34:02 -05:00
Gabriel Ebner
d4b9a532d2
fix: calc: synthesize default instances
...
This is necessary to figure out the types with exponentiations.
Fixes #2079
2023-02-02 14:29:21 -08:00
Gabriel Ebner
8265d8bb13
chore: calc: improve error range
2023-02-02 14:21:06 -08:00
tydeu
7055f953f1
doc: fix typo
...
closes leanprover/lake#151
2023-02-02 15:40:02 -05:00
Leonardo de Moura
35ccf7b163
chore: update CONTRIBUTING.md
2023-02-01 12:07:15 -08:00
Sebastian Ullrich
7327b66179
doc: update FPiL entry in README
...
/cc @david-christiansen
I think it's progressed far enough that no "in development" annotation is necessary on this page
2023-01-31 08:10:44 -08:00
Gabriel Ebner
18b3bd7875
fix: calc: do not take lhs/rhs from expected type
...
Fixes #2073
2023-01-30 15:02:40 -08:00
tydeu
38a0d1e373
chore: update Lake
2023-01-28 18:29:00 +01:00
int-y1
b69fcbc28f
chore: fix typos
2023-01-28 15:15:12 +01:00
Gabriel Ebner
e37f209c1a
fix: unify types in calc
2023-01-27 13:38:42 -08:00
Gabriel Ebner
dd8319c3cd
fix: disable gmp on windows
...
The msys2 gmp package does not support static linking at the moment.
f31bdf893a
2023-01-27 12:28:34 -08:00
Leonardo de Moura
decb08858f
fix: kernel must ensure that safe functions cannot use partial ones.
...
Fix issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Meaning.20of.20.60DefinitionSafety.2Epartial.60
2023-01-27 12:17:37 -08:00
Sebastian Ullrich
1f41b91206
test: update Lean variant benchmarks
2023-01-26 13:33:28 +01:00
Sebastian Ullrich
2a7ae7b28a
chore: Nix: explicit src
2023-01-26 13:32:42 +01:00
Sebastian Ullrich
12356b739b
test: add rbmap_2 benchmark
2023-01-26 13:32:42 +01:00
Sebastian Ullrich
d01a521be2
test: fix
2023-01-26 13:31:16 +01:00
Sebastian Ullrich
badfcdc49f
fix: missing info tree on elab failure
2023-01-26 13:05:57 +01:00
Sebastian Ullrich
f24608c4d1
fix: make eoi an actual command with info tree
2023-01-26 13:05:57 +01:00
Sebastian Ullrich
8a4059dc65
fix: avoid notation in quotation elaborator output
2023-01-26 13:05:33 +01:00
Sebastian Ullrich
18297d8d91
fix: notation unexpander on overapplication of non-nullary notation
2023-01-26 13:05:33 +01:00
Sebastian Ullrich
94547b3d85
chore: CI: avoid deprecated set-output
2023-01-25 10:23:22 +01:00
Gabriel Ebner
f4d005e86d
chore: only build small allocator if enabled
...
This prevents us from calling alloc/dealloc if LEAN_SMALL_ALLOCATOR is
disabled.
2023-01-24 11:37:43 -08:00
Gabriel Ebner
3deef5d32a
fix: mpz: honor LEAN_SMALL_ALLOCATOR
2023-01-24 11:37:43 -08:00
Gabriel Ebner
345aa6f835
chore: put throws in separate function for debugger
2023-01-23 09:27:09 -08:00
Gabriel Ebner
34777c9b90
fix: catch missing exceptions in kernel
2023-01-23 09:27:09 -08:00
Evgenia Karunus
a125a36bcc
doc: Expr docs fix ( #2047 )
...
```
open Lean Meta
-- Docs text:
-- The let-expression `let x : Nat := 2; Nat.succ x` is represented as
def old : Expr :=
Expr.letE `x (.const `Nat []) (.lit (.natVal 2)) (.bvar 0) true
elab "old" : term => return old
#check old -- let x := 2; x : Nat
#reduce old -- 2
def new : Expr :=
Expr.letE `x (.const `Nat []) (.lit (.natVal 2)) (.app (.const `Nat.succ []) (.bvar 0)) true
elab "new" : term => return new
#check new -- let x := 2; Nat.succ x : Nat
#reduce new -- 3
```
2023-01-20 09:51:55 +01:00
Sebastian Ullrich
cbdd76f6b6
test: retire .perf benchmarks, cache misses are not very enlightening
2023-01-19 14:44:20 +01:00
Sebastian Ullrich
d0ca604d89
test: update mlton
2023-01-19 14:44:20 +01:00
Sebastian Ullrich
899b673531
test: add binarytrees.st benchmark
2023-01-19 14:44:20 +01:00
Sebastian Ullrich
83450d4bd9
test: clean up binarytrees.lean
2023-01-19 14:44:20 +01:00
Sebastian Ullrich
46f467db66
test: add single-threaded SML binarytrees
2023-01-19 14:44:20 +01:00
github-actions[bot]
57b9d25d5e
doc: update changelog
2023-01-19 09:10:27 +00:00
Rishikesh Vaishnav
561e404fe4
feat: make go-to-definition on a typeclass projection application go to the instance(s) ( #1767 )
2023-01-19 09:10:01 +00:00
Rishikesh Vaishnav
600758ba49
fix: fuzzy-find bonus for matching last characters of pattern and symbol ( #1917 )
2023-01-19 09:06:53 +01:00
Sebastian Ullrich
e477d41f3f
chore: pin Nix
2023-01-18 11:26:32 +01:00
Sebastian Ullrich
43c5ab802f
fix: show tactic info on canonical by
2023-01-18 10:23:37 +01:00
Sebastian Ullrich
78bc2fd92b
chore: more benchmarking setup
2023-01-17 13:28:05 +01:00
Sebastian Ullrich
223f1073d1
chore: info tree format should not leak hygiene IDs
2023-01-16 08:33:58 -08:00
Sebastian Ullrich
d59f5c2ffa
fix: binop% info tree
2023-01-16 08:33:58 -08:00
Leonardo de Moura
4ec1c10dc0
chore: comments at private function mkAuxMVarType
2023-01-16 07:54:20 -08:00
Rishikesh Vaishnav
cce1b25d60
doc: improve documentation of MetavarContext.lean ( #1625 )
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2023-01-16 16:34:36 +01:00
Siddharth
5349a089e5
feat: add --target flag for LLVM backend to build objects of a different architecture ( #2034 )
...
* feat: add --target flag for LLVM backend to build objects of a different architecture
* chore: remove dead comment
* Update src/Lean/Compiler/IR/EmitLLVM.lean
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
* chore: normalize indentation in src/util/shell.cpp
* chore: strip trailing whitespace
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2023-01-15 12:00:10 -08:00
Siddharth Bhat
26edfc33f5
chore: remove unused isTaggedPtr from IR.
...
This reduces the surface area of `unimplemented` in the LLVM backend,
and also removes dead code in the compiler.
2023-01-15 09:24:41 -08:00
James Gallicchio
65db25bf49
feat: funext no arg tactic ( #2027 )
...
* feat: `funext` no arg tactic
Description of funext tactic includes behavior that is not implemented. This implements the behavior.
* fix
* feat: test new funext tactic
* use repeat for clarity of intent
2023-01-15 08:53:49 -08:00
Wojciech Nawrocki
ae97ae35e9
chore: remove Inhabited instance
2023-01-13 17:13:02 -08:00
Wojciech Nawrocki
c784031dd7
feat: add GoalLocation type
2023-01-13 17:13:02 -08:00
Wojciech Nawrocki
0960cd0a14
fix: term goal prefix
2023-01-13 17:13:02 -08:00
Wojciech Nawrocki
f5531c2a11
feat: add context and term data to goals
2023-01-13 17:13:02 -08:00
Wojciech Nawrocki
184ca3ddb0
chore: bump server version
2023-01-13 17:13:02 -08:00
Sebastian Ullrich
9b1f5c4df4
test: use OCaml 5 multicore binarytrees implementation
2023-01-12 18:28:41 +01:00
Sebastian Ullrich
f726891baf
test: update benchmark flake
2023-01-12 18:28:41 +01:00
Siddharth Bhat
ae4f2de951
fix: metadata codegen for LLVM
2023-01-12 17:39:56 +01:00
Sebastian Ullrich
67a5846742
chore: Nix: more sanitizing
2023-01-12 15:05:14 +01:00
Sebastian Ullrich
707e762d78
chore: Nix: remove redundant link flags
2023-01-12 13:00:09 +01:00
Sebastian Ullrich
da2ea1fa98
chore: Nix: fix symbol interposition
2023-01-12 12:50:17 +01:00
Sebastian Ullrich
7aebab5e43
chore: CI: do not cancel release job on master push
2023-01-12 10:41:51 +01:00
Siddharth Bhat
0900aa1348
feat: implement unreachable codegen for LLVM
...
Also add a test case that exercises `unreachable` code
generation.
2023-01-12 09:17:41 +01:00
tydeu
e1887fa510
fix: put FFI lib in pkg lib dir in example (for Linux)
2023-01-11 18:24:15 -05:00
tydeu
55fa486ce6
fix: packages dir path and repo url
2023-01-11 18:18:09 -05:00
tydeu
15d656bd9a
fix: Linux still needs augmented library path
2023-01-11 17:32:26 -05:00
tydeu
4f505cd056
fix: use full path when loading dynlibs in the server
...
closes leanprover/lake#146
2023-01-11 16:17:47 -05:00
tydeu
8c793eaae5
chore: bump Lean version
2023-01-11 15:11:26 -05:00
Gabriel Ebner
cee959078d
fix: do not require Environment to be inhabited
2023-01-11 15:01:45 -05:00
Eric Wieser
8cd9ce0684
refactor: redefine Nat.mod such that rfl : 0 % n = 0
...
This property was true in Lean 3, and it was very convenient for working with `Fin n`.
2023-01-11 09:49:58 -08:00
Gabriel Ebner
c21d2f29a2
perf: do not backtrack after eta-defeq
2023-01-09 16:12:02 -08:00
github-actions[bot]
6e5ba6b9e5
doc: update changelog
2023-01-09 23:09:06 +00:00
Sebastian Ullrich
5ffda810dd
feat: include timings in trace when profiler is true
2023-01-09 15:08:42 -08:00
James Gallicchio
37650f9147
fix: add done alternative to decreasing_with ( #2019 )
...
Previously `decreasing_with` failed if `simp_wf` closes the goal on its
own. This can cause undesired regressions when new `simp` lemmas are
introduced.
Closes #2018 .
2023-01-09 09:46:37 -08:00
Bulhwi Cha
99662c1b45
chore: rename le_or_eq_or_le_succ ( #2024 )
...
Rename `le_or_eq_or_le_succ` `le_or_eq_of_le_succ`. We need to change
its name in `Std/Data/Array/Init/Lemmas` and `Std/Data/Array/Lemmas`.
Co-authored-by: Bulhwi Cha <chabulhwi@semmalgil.com >
2023-01-09 09:45:51 -08:00
Chris Hughes
396fcd371b
feat Init.Data.Nat add simp attribute to mod_zero ( #1932 )
2023-01-09 09:43:41 -08:00
François G. Dorais
493a887cfb
fix: remove unnecessary hypothesis
2023-01-09 18:20:41 +01:00
Siddharth
5615ba6606
feat: implement uset for LLVM ( #2025 )
...
Fixes #1958 .
2023-01-09 12:25:37 +00:00
Jeremy Salwen
60f30addc7
doc: add more detail to the split tactic docs ( #1988 )
...
Co-authored-by: Mac <tydeu@hatpress.net >
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2023-01-09 13:12:39 +01:00
Sebastian Ullrich
de0a569781
perf: avoid duplicate computation in syntax match elaborator
2023-01-09 13:05:00 +01:00
Sebastian Ullrich
fff1e12878
fix: be more careful with MatchResult.uncovered in syntax match
2023-01-09 13:05:00 +01:00
Sebastian Ullrich
74b3d101e9
chore: Nix: avoid store copies
2023-01-07 20:22:42 +01:00
Sebastian Ullrich
222a8140a7
chore: Nix: avoid quadratic attrset accumulation
2023-01-07 20:22:42 +01:00
Siddharth
a0a0463451
fix: codegen initUnboxed correctly in LLVM backend ( #2015 )
...
Closes #2004 .
In porting the bugfix from
6eb852e28f ,
I noticed that the LLVM backend was incorrectly generating declaration
initializers (in `callIODeclInitFn`), by assuming the return type of the
initializer is the return type of the declaration. Rather, it must be be
`lean_object`, since the initializer returns an `IO a` value which must be unpacked.
TODO: stop using the `getOrCreateFunction` pattern pervasively.
perform the `create` at the right location, and the `get`
at the correct location.
2023-01-07 16:26:53 +01:00
Leonardo de Moura
474f1a4d39
feat: try to unify show type and expected type
...
The goal is to address the regression
```
example : (0 : Nat) + 0 = 0 :=
show 0 + 0 = 0 from rfl
```
introduced by fedf235cba
Note that we should only *try to* unify the types. Otherwise, we would
produce another regression.
```
example : Int :=
show Nat from 0
```
cc @kha
2023-01-06 08:48:48 -08:00
Leonardo de Moura
fedf235cba
fix: fixes #2011
...
In Lean 4, we have support for typing constraints of the form
```
(?m ...).1 =?= v
```
where the type of `?m ...` is a structure with a single field.
This kind of constraint is reduced to `?m ... =?= ⟨v⟩`
This feature is implemented by the function `isDefEqSingleton`.
As far as I remember, Lean 3 does not implement this feature.
This commit disables this feature if the structure is a class.
The goal is to avoid the generation of counterintuitive instances by
typing inference.
For example, in the example at issue #2011 , the following weird
instance was being generated for `Zero (f x)`
```
(@Zero.mk (f x✝) ((@instZero I (fun i => f i) fun i => inst✝¹ i).1 x✝)
```
where `inst✝¹` is the local instance `[∀ i, Zero (f i)]`
Note that this instance is definitinally equal to the expected nicer
instance `inst✝¹ x✝`.
However, the nasty instance trigger nasty unification higher order
constraints later.
Note that a few tests broke because different error messages were
produced. The new error messages seem better. I do not expect this
change to affect Mathlib4 since Lean 3 does not have this feature.
2023-01-05 17:33:45 -08:00
Gabriel Dahia
b9f0062a58
doc: replace maximum? in minimum? docstring
...
This is my first contribution, if it can be counted as a contribution. Following the [documentation for simple fixes](https://github.com/leanprover/lean4/blob/master/CONTRIBUTING.md#simple-fixes ), I opened the PR directly instead of discussing in the zulip or opening an issue. Hope that's ok.
2023-01-05 14:02:19 -08:00
Leonardo de Moura
770815be9b
test: for issue #1937
2023-01-05 13:46:15 -08:00
Leonardo de Moura
ce4dc2388e
chore: update stage0
2023-01-05 13:38:15 -08:00
Leonardo de Moura
dd682bf1d5
feat: add support for HO projections at DiscrTree
...
closes #1937
Requires update stage0
2023-01-05 13:33:43 -08:00
Leonardo de Moura
57e30b670e
chore: update stage0
2023-01-04 10:32:12 -08:00
Leonardo de Moura
9a236e70dc
fix: fixes #2009
2023-01-04 10:32:03 -08:00
Leonardo de Moura
62812177cb
chore: update stage0
...
We need this "update stege0" to be able to remove the workaround cb7657f47e
2023-01-04 09:11:01 -08:00
Leonardo de Moura
0739c9ccd7
chore: revert workaround
2023-01-04 09:02:02 -08:00
Leonardo de Moura
7bd005bbbe
test: add test for local macro in auto tactic
2023-01-04 09:01:02 -08:00
Leonardo de Moura
6fea2946c2
fix: fixes #2006
2023-01-04 08:19:22 -08:00
Leonardo de Moura
069f08e3a3
chore: move getUnboxOpName
2023-01-04 08:07:32 -08:00
Sebastian Ullrich
fa4cbd93ee
feat: highlight #exit as leanSorryLike
2023-01-04 10:50:02 +01:00
Sebastian Ullrich
38bd089a45
feat: introduce custom leanSorryLike semantic token type for sorry, admit, stop
2023-01-04 10:50:02 +01:00
Tobias Grosser
d74d4230b7
fix: avoid warning by dropping '#pragma once'
...
Before this change, we would see the warning:
"#pragma once in main file"
2023-01-04 09:42:40 +01:00
Gabriel Ebner
905d3204ae
chore: correctly comment out initUnboxed test
2023-01-03 18:28:24 -08:00
Gabriel Ebner
cb7657f47e
fix: remove nonempty_list tactic
2023-01-03 18:17:19 -08:00
Gabriel Ebner
c1dca61fae
hack: temporarily disable initUnboxed test
2023-01-03 18:10:05 -08:00
Leonardo de Moura
6eb852e28f
fix: fixes #1998
2023-01-03 16:01:27 -08:00
Leonardo de Moura
2b67da2854
fix: fixes #2000
...
We now add the macro scope to local syntax declarations.
2023-01-03 15:28:10 -08:00
Leonardo de Moura
30c9f58e6a
chore: remove leftover
2023-01-03 15:05:31 -08:00
Leonardo de Moura
5424386c0d
chore: update stage0
2023-01-03 14:14:50 -08:00
Gabriel Ebner
181fbdfb42
feat: add fun x ↦ y syntax
2023-01-03 13:59:53 -08:00
Gabriel Ebner
b83e185c79
chore: parse quotations with current stage
2023-01-03 13:59:53 -08:00
Gabriel Ebner
70a6c06eef
fix: erase *dependent* local instances
2023-01-03 11:39:46 -08:00
Sebastian Ullrich
948eba4e8b
fix: render examples
2023-01-01 21:08:31 +01:00
Sebastian Ullrich
f3f27f5c15
doc: titling consistency
2022-12-31 12:52:27 +01:00
Sebastian Ullrich
048a088010
fix: render monad tutorials
2022-12-31 12:51:48 +01:00
Siddharth
b6eb780144
feat: LLVM backend ( #1837 )
2022-12-30 12:45:30 +01:00
Gabriel Ebner
d19033e443
fix: correctly parse json unicode escapes
2022-12-23 17:04:10 -08:00
Gabriel Ebner
0553b5936e
perf: avoid lifting ← over an if
2022-12-23 05:46:04 +01:00
Sebastian Ullrich
10d2403e83
chore: Nix: link dynamically by default
...
The Nix way
2022-12-22 12:13:22 +01:00
Gabriel Ebner
a2f5959118
chore: use deriving Nonempty
2022-12-22 03:48:15 +01:00
Gabriel Ebner
53ff517a92
chore: update stage0
2022-12-22 03:48:15 +01:00
Gabriel Ebner
430d7d05d6
feat: add derive handler for Nonempty
2022-12-22 03:48:15 +01:00
Gabriel Ebner
a90afa8a51
fix: tests
2022-12-22 02:02:55 +01:00
Gabriel Ebner
7736c051ff
fix: assigned tc mvar check
2022-12-22 02:02:55 +01:00
Gabriel Ebner
6083b01c86
fix: remove maxCoeSize option
2022-12-22 02:02:55 +01:00
Gabriel Ebner
8a48a8f119
refactor: use coercion meta API
2022-12-22 02:02:55 +01:00
Gabriel Ebner
05401776f2
fix: add reflexivity instances to coercions
...
This is important when users plug custom instances into auxiliary
classes like `CoeTC`. We already had a reflexivity instance for
`CoeTC`.
2022-12-22 02:02:55 +01:00
Gabriel Ebner
f798507bbf
chore: tc: only normalize level mvars at current depth
2022-12-22 02:02:55 +01:00
Gabriel Ebner
e71a2e58bb
fix: remove misleading leading space in " where"
2022-12-21 22:54:42 +01:00
Gabriel Ebner
0d598dcfdf
fix: Format.align always prints whitespace
2022-12-21 22:54:42 +01:00
github-actions[bot]
d3c852a3b1
doc: update changelog
2022-12-21 21:00:58 +00:00
Sebastian Ullrich
de9a6374f1
feat: make #check <ident> always show the signature without elaboration
2022-12-21 21:59:05 +01:00
Sebastian Ullrich
de180e5c7a
fix: private + pp.fullNames
2022-12-21 21:59:05 +01:00
Sebastian Ullrich
eaafd36918
feat: use signature pretty printer in #check id/#check @id
2022-12-21 21:59:05 +01:00
Sebastian Ullrich
84de976111
chore: fix copy-produced script
2022-12-21 21:59:05 +01:00
Sebastian Ullrich
b6bd2dea35
feat: signature pretty printer for hovers
2022-12-21 21:59:05 +01:00
Sebastian Ullrich
533c770e36
refactor: remove redundant state
2022-12-21 21:59:05 +01:00
Gabriel Ebner
572ffe77e3
fix: implement assertAfter using revert
2022-12-21 21:42:07 +01:00
Gabriel Ebner
eeab2af7ae
fix: remove Inhabited Environment instance
2022-12-21 20:08:08 +01:00
Sebastian Ullrich
cbf1b433d7
chore: Nix: linkFarm, not symlinkJoin
2022-12-21 20:06:18 +01:00
Gabriel Ebner
443c1a08e5
fix: lsp change debouncing
2022-12-21 20:02:53 +01:00
Sebastian Ullrich
73f9377322
chore: Nix: cache depRoots
2022-12-21 15:22:13 +01:00
Gabriel Ebner
586079462c
doc: explain variable conditions in type classes
2022-12-21 04:24:39 +01:00
Gabriel Ebner
14f8ff1642
feat: add CoeOut class
2022-12-21 04:24:39 +01:00
Gabriel Ebner
c7fb3a1c91
chore: make use of CoeHead chaining
2022-12-21 04:24:39 +01:00
Gabriel Ebner
78676a5a5a
refactor: chain CoeHead
2022-12-21 04:24:39 +01:00
Gabriel Ebner
2b97392f2e
refactor: use @[coe_decl] attribute
2022-12-21 04:24:39 +01:00
Gabriel Ebner
4e02c55766
chore: update stage0
2022-12-21 04:24:39 +01:00
Gabriel Ebner
e59ddb0c16
refactor: replace hardcoded list of coercions by attribute
2022-12-21 04:24:39 +01:00
Gabriel Ebner
d2203aa5a0
chore: restrict dangerous typed syntax coercions
2022-12-21 04:24:39 +01:00
Gabriel Ebner
118567657d
chore: remove dangerous instances in json-rpc
2022-12-21 04:24:39 +01:00
Gabriel Ebner
434d889f4d
chore: remove dangerous instances
2022-12-21 04:24:39 +01:00
Gabriel Ebner
2606021304
fix: use ppTerm instead of formatTerm
2022-12-21 03:08:18 +01:00
Gabriel Ebner
54290d537b
fix: deterministic fvar alias printing
2022-12-21 03:08:18 +01:00
Sebastian Ullrich
96ccf192e8
fix: parenthesize by optParam values
2022-12-20 18:10:39 +01:00
Gabriel Ebner
e386d5941e
refactor: replace ignoreLevelMVarDepth by levelAssignDepth
2022-12-19 20:14:17 +01:00
Mario Carneiro
8b0699cd3b
fix: disable memoize in pattern conv
2022-12-19 06:21:54 -08:00
Sebastian Ullrich
adf74380cc
chore: Nix: cache Leanc.src
2022-12-18 15:02:48 +01:00
Sebastian Ullrich
f732afed0a
fix: dynamic linking of Lean programs
2022-12-18 12:19:21 +01:00
Sebastian Ullrich
f6cd6c0695
chore: Nix: cache LeanInk output
2022-12-15 13:38:46 +01:00
Sebastian Ullrich
dec355aaf8
chore: Nix: cache stand-alone lean, leanc
2022-12-15 13:26:04 +01:00
Scott Morrison
7c29cc742b
chore: add iff_self to simpOnlyBuiltins
2022-12-15 01:00:30 +01:00
Mario Carneiro
52d00e8944
test: macro scopes in Conv.congr ( #1955 )
2022-12-14 16:43:26 +00:00
Sebastian Ullrich
d5fb32a393
fix: hygiened goal tags in conv congr
2022-12-14 16:36:47 +01:00
locriacyber
fa761b8baf
chore: fix typo in CLI usage (--ldlags) ( #1947 )
2022-12-14 10:20:50 +01:00
Sebastian Ullrich
4fa8d003d8
chore: update stage0
2022-12-13 22:15:05 +01:00
Sebastian Ullrich
636afc654a
fix: avoid mapping .oleans in the way of the stack
2022-12-13 22:11:41 +01:00
Sebastian Ullrich
3cebe7464c
fix: protect against jumping over the stack guard page
2022-12-13 22:02:05 +01:00
Sebastian Ullrich
88c8cd5cf2
fix: show correct goal state after an empty by
2022-12-13 01:39:45 +01:00
Sebastian Ullrich
9c9cc017df
fix: ignore empty character literals
2022-12-12 22:59:06 +01:00
Gabriel Ebner
f3f4eba945
fix: make Format.*join* tail-recursive
2022-12-12 22:58:21 +01:00
Gabriel Ebner
1c8ef51124
fix: make List.toString tail-recursive
2022-12-12 22:58:21 +01:00
Mario Carneiro
eb3b0377d7
fix: List.groupBy
2022-12-12 16:55:27 +01:00
Wojciech Nawrocki
7034e64b4f
doc: update widget example
2022-12-09 09:51:08 +01:00
Gabriel Ebner
57a6aefb92
chore: CI: also save core dumps for builds
2022-12-08 15:55:40 -08:00
Gabriel Ebner
43e3b78eb0
feat: CI: capture core dumps
2022-12-08 20:08:13 +01:00
Wojciech Nawrocki
a9ba08ce11
doc: document msgToInteractiveDiagnostic
2022-12-07 19:16:25 +01:00
Sebastian Ullrich
6169435259
refactor: consolidate MessageData constructors into lazy formatting with infos
2022-12-07 19:16:25 +01:00
Sebastian Ullrich
0b243f0ca3
chore: Nix: avoid import errors for now
...
Gotta refactor this anyway
2022-12-04 18:52:33 +01:00
Sebastian Ullrich
9e83115072
chore: Nix: lazy-trees compatibility
2022-12-04 18:52:33 +01:00
Sebastian Ullrich
768ef310a0
refactor: Nix: LeanInk rendering based on packages, not directories
2022-12-03 15:14:17 +01:00
Sebastian Ullrich
ed3fa37341
chore: Nix: add overrideBuildModAttrs
2022-12-03 14:13:31 +01:00
Gabriel Ebner
4b87103931
chore: ignore document version errors
2022-12-03 01:20:47 +01:00
tydeu
fe09c9c824
chore: update Lake
2022-12-03 01:19:29 +01:00
tydeu
148b067724
test: fix shell script permissions
2022-12-02 17:58:51 -05:00
tydeu
479fe81894
feat: print log on failing lake print-paths
...
closes leanprover/lake#116
2022-12-02 17:26:36 -05:00
Gabriel Ebner
47b4eae9a6
perf: use ByteArray.hash directly
2022-12-02 14:31:48 -05:00
ChrisHughes24
e168806078
chore: rename Prod.ext
2022-12-02 20:24:19 +01:00
tydeu
c60ccdc974
test: increase sleep in 44
2022-12-02 14:20:58 -05:00
tydeu
25ab266a2e
fix: escape names from new/init
...
closes leanprover/lake#128
2022-12-02 14:17:57 -05:00
tydeu
b8c4ed5a83
feat: -U to update & build; add packagesDir to manifest
2022-12-02 14:17:57 -05:00
tydeu
93f1d05e2a
fix: various build problems
...
fixes leanprover/lake#139
touches on leanprover/lake#132
2022-12-02 14:17:56 -05:00
tydeu
b813197b36
chore: cleanup
2022-12-02 14:17:56 -05:00
Gabriel Ebner
b76bfcac91
fix: do not rely on iteration order of NameSet
2022-12-02 14:11:12 -05:00
Gabriel Ebner
7603e49169
chore: bump Lean version
2022-12-02 14:06:15 -05:00
Leonardo de Moura
8a573b5d87
fix: fixes #1900
2022-12-02 10:04:01 -08:00
Leonardo de Moura
a999015371
feat: add applicationTime to registerTagAttribute
2022-12-02 09:58:41 -08:00
Leonardo de Moura
50fc4a6ad8
fix: fixes #1907
2022-12-02 08:59:16 -08:00
Gabriel Ebner
681bbe5cf4
feat: ByteArray.hash
2022-12-01 20:18:14 -08:00
Gabriel Ebner
a67a5080e9
chore: fix tests after hash change
2022-12-01 20:18:14 -08:00
Gabriel Ebner
c83e33b06a
chore: update stage0
2022-12-01 20:18:14 -08:00
Gabriel Ebner
9b416667e7
chore: replace all hashes by murmurhash
2022-12-01 20:18:14 -08:00
Gabriel Ebner
b0cadbc1fa
fix: support escaped field names in deriving FromJson/ToJson
2022-12-02 03:48:19 +01:00
Gabriel Ebner
3d1571896c
fix: support escaped field names in dot-notation
2022-12-02 03:48:19 +01:00
Gabriel Ebner
7af80766e3
fix: do not ignore applicationTime in parametric attributes
2022-12-02 02:15:35 +01:00
Leonardo de Moura
ffb0f42aae
fix: fixes #1901
2022-12-01 08:39:06 -08:00
Leonardo de Moura
0dda3a8c02
fix: include instance implicits that depend on outParams at outParamsPos
...
This fixes the fix for #1852
2022-12-01 06:11:48 -08:00
Leonardo de Moura
0a031fc9bb
chore: replace Expr.forEach with Expr.forEachWhere
2022-12-01 05:19:32 -08:00
Sebastian Ullrich
af5efe0b2d
doc: MonadReader
2022-12-01 10:16:04 +01:00
Sebastian Ullrich
50b2ad89b4
test: limit maxRecDepth
2022-12-01 10:06:57 +01:00
Leonardo de Moura
30d625697e
chore: use Expr.forEachWhere to implement linter
...
closes #1899
TODO: use `Expr.forEachWhere` in other modules. There are many other opportunities.
2022-11-30 18:44:20 -08:00
Leonardo de Moura
1c5706bcc0
feat: add Expr.forEachWhere
2022-11-30 18:41:12 -08:00
Leonardo de Moura
5a151ca64c
chore: fix tests
2022-11-30 17:52:37 -08:00
Leonardo de Moura
0db02c3911
chore: update Lake
2022-11-30 17:05:38 -08:00
Leonardo de Moura
95467dfab7
chore: update stage0
2022-11-30 17:05:38 -08:00
Leonardo de Moura
e5681ac141
feat: replace mixHash implementation
...
We are now using part of the murmur hash like Scala.
For additional information and context, see
https://leanprover.zulipchat.com/#narrow/stream/147302-lean4-maintainers/topic/Increasing.20.60Expr.2Ehash.60.20to.2064.20bits/near/313114719
2022-11-30 17:03:58 -08:00
Leonardo de Moura
8fbb866798
fix: incorrect use of outParam
...
We have
```
class BindAsync (n : Type u → Type v) (k : outParam $ Type u → Type u)
instance : BindAsync BaseIO (EIOTask ε)
instance : BindAsync BaseIO OptionIOTask
instance [BindAsync n k] [Pure n] [Pure k] : BindAsync n (ExceptT ε k)
instance [BindAsync n k] [Pure n] [Pure k] : BindAsync n (OptionT k)
```
See discussion at: https://leanprover.zulipchat.com/#narrow/stream/147302-lean4-maintainers/topic/Increasing.20.60Expr.2Ehash.60.20to.2064.20bits/near/313183466
2022-11-30 16:56:09 -08:00
Leonardo de Moura
8fc3d77a0b
feat: add trace.Meta.Tactic.simp.numSteps and trace.Meta.Tactic.simp.heads
2022-11-30 07:07:07 -08:00
Leonardo de Moura
2a36cf42d2
chore: update stage0
2022-11-30 06:43:57 -08:00
Leonardo de Moura
aee63ee7b0
feat: panic at Name.append if both names have macro scopes
2022-11-30 06:39:49 -08:00
Leonardo de Moura
7c5d91ebc3
fix: avoid hygienic ++ hygienic at Specialize.lean
2022-11-30 06:31:03 -08:00
Leonardo de Moura
a095dabb17
feat: Name.append and macro scopes
2022-11-29 23:06:04 -08:00
Leonardo de Moura
bc21716bad
chore: helper simp theorems
2022-11-29 23:05:48 -08:00
Leonardo de Moura
dc937cb1f9
chore: Name.append
2022-11-29 23:05:19 -08:00
Leonardo de Moura
3e45060dd5
fix: disable implicit lambdas for local variables without type information
...
Problem reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/why.20doesn't.20this.20unify.3F/near/312806870
2022-11-29 14:33:16 -08:00
Scott Morrison
1b50292228
chore: protect Prod.Lex
2022-11-29 20:09:08 +01:00
Sebastian Ullrich
bc0684a29c
fix: work around VS Code completion bug
2022-11-29 19:14:45 +01:00
Leonardo de Moura
069873d8e5
fix: fixes #1891
2022-11-29 08:59:46 -08:00
Mario Carneiro
40e212c166
feat: infer def/theorem DefKind for let rec
2022-11-29 08:16:47 -08:00
Gabriel Ebner
6e23ced6d9
fix: test
2022-11-29 08:16:09 -08:00
Gabriel Ebner
bdbab653fd
fix: synthesize tc instances before propagating expected type
2022-11-29 08:16:09 -08:00
Henrik Böving
5286c2b5aa
feat: optimize mul/div into shift operations
2022-11-29 01:05:06 +01:00
Henrik Böving
24cc6eae6d
feat: log2 for Fin and UInts
2022-11-29 01:05:06 +01:00
Sebastian Ullrich
a38bc0e6ed
refactor: revise server architecture
...
Replace complex debouncing logic in watchdog with single `IO.sleep` in
worker `didChange` handler, replace redundant header change logic in
watchdog with special exit code from worker.
2022-11-29 00:52:24 +01:00
Mario Carneiro
17ef0cea8a
feat: intra-line withPosition formatting
2022-11-28 09:02:08 -08:00
Sebastian Ullrich
07953062ed
perf: remove unnecessary, cache-defeating withPosition in doReassignArrow
2022-11-28 08:14:03 -08:00
Leonardo de Moura
9dbd9ec554
chore: fix build
2022-11-28 07:53:43 -08:00
Leonardo de Moura
6bc919742e
chore: update stage0
2022-11-28 07:51:42 -08:00
Leonardo de Moura
c510d16ef5
fix: fixes #1808
2022-11-28 07:48:54 -08:00
Siddharth Bhat
dfb5548cab
fix: update libleanrt.bc, rename to lean.h.bc
...
This adds `lean.h.bc`, a LLVM bitcode file of the Lean
runtime that is to be inlined. This is programatically generated.
1. This differs from the previous `libleanrt.ll`, since it produces an
LLVM bitcode file, versus a textual IR file. The bitcode file
is faster to parse and build an in-memory LLVM module from.
2. We build `lean.h.bc` by adding it as a target to `shell`,
which ensures that it is always built.
3. We eschew the need for:
```cpp
```
which causes breakage in the build, since changing the meaning of
`static` messes with definitions in the C++ headers.
Instead, we build `lean.h.bc` by copying everything in
`src/include/lean/lean.h`, renaming `inline` to
`__attribute__(alwaysinline)` [which forces LLVM to generate
`alwaysinline` annotations], then running the `-O3` pass pipeline
to get reasonably optimised IR, and will be perfectly inlined
when linked into the generated LLVM code by
`src/Lean/Compiler/IR/EmitLLVM.lean`.
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2022-11-28 16:20:12 +01:00
Scott Morrison
a3dfa5516d
feat: add HashSet.insertMany
2022-11-28 06:59:21 -08:00
Leonardo de Moura
36cc7c23b6
fix: fixes #1886
2022-11-28 06:50:44 -08:00
Sebastian Ullrich
092e26179b
chore: fix script/reformat.lean
2022-11-28 15:47:17 +01:00
Sebastian Ullrich
c112ae7c58
test: fix Lake rename
2022-11-28 15:12:18 +01:00
Scott Morrison
c4ff5fe199
chore: change simp default to decide := false
2022-11-27 09:27:16 -08:00
Sebastian Ullrich
42a080fae2
fix: comments ending in --/
...
Fixes #1883
2022-11-25 10:32:49 +01:00
Sebastian Ullrich
39f2322f35
fix: save correct environment in info tree for example
2022-11-24 13:11:14 -08:00
Leonardo de Moura
543a7e26d4
test: for #1878
...
closes #1878
2022-11-24 13:03:45 -08:00
Leonardo de Moura
17855b6e90
chore: update stage0
2022-11-24 12:57:43 -08:00
Leonardo de Moura
4be7543adb
feat: add APIs for issue #1878
...
We need `update-stage0` because this commit affects the .olean format.
2022-11-24 12:55:41 -08:00
Leonardo de Moura
c53c5b5e16
fix: fixes #1882
...
Better support for `intro <type-ascription>`.
It was treating it as a pattern before this commit.
2022-11-24 12:40:25 -08:00
Leonardo de Moura
897ccd3783
chore: spaces
2022-11-24 12:33:21 -08:00
Leonardo de Moura
9d8b324f8d
fix: fixes #1869
...
Better support for simplifying class projections.
2022-11-24 11:56:36 -08:00
Leonardo de Moura
71b7562c2f
fix: class projection at DiscrTree
2022-11-24 11:56:36 -08:00
github-actions[bot]
75f8ebdd19
doc: update changelog
2022-11-24 03:08:45 +00:00
Gabriel Ebner
6225a3e415
chore: update Lake
2022-11-23 19:08:14 -08:00
Leonardo de Moura
1ec535d523
test: alternative encoding experiment for decEq and noConfusion
2022-11-23 18:46:10 -08:00
Gabriel Ebner
733f015c65
chore: reduce imports
2022-11-23 20:56:40 -05:00
Gabriel Ebner
42a8e0f190
refactor: split code for lake update and lake build
2022-11-23 20:56:40 -05:00
Gabriel Ebner
1949285fdb
chore: disable parallel testing in ci
2022-11-23 20:56:40 -05:00
Gabriel Ebner
2808cc2744
feat: improve manifest test
2022-11-23 20:56:40 -05:00
Gabriel Ebner
031d9712d5
chore: simplify test/manifest/test.sh
2022-11-23 20:56:40 -05:00
Gabriel Ebner
1e79d659f2
chore: bundle libatomic in releases
2022-11-23 16:42:37 -08:00
Gabriel Ebner
06dc85453e
chore: CI: allow releases not starting with v
2022-11-23 16:42:37 -08:00
Mario Carneiro
9b572d4e20
chore: make <;> left associative
2022-11-23 07:44:54 -08:00
Leonardo de Moura
0694731af8
fix: fixes #1870
2022-11-23 05:49:19 -08:00
Leonardo de Moura
9c561b593a
feat: add withTraceNodeBefore and use it at ExprDefEq
...
`withTraceNode` uses the metavariable context after executing
`k`. This is bad when debugging `isDefEq`.
2022-11-22 14:43:28 -08:00
Leonardo de Moura
dfaf9c6ebd
chore: register missing trace options, and fix inherited parameter
...
The current setting was bad for debugging `isDefEq` issues.
2022-11-22 14:43:28 -08:00
Sebastian Ullrich
cbf7da0f6e
chore: CI: update all actions to avoid warnings
2022-11-22 21:31:07 +01:00
Leonardo de Moura
89e1bc72ed
doc: examples for Certora tutorial
2022-11-21 17:02:28 -08:00
Mario Carneiro
6cafcabe46
fix: print universe level lists in lean 4 style
2022-11-21 21:35:56 +01:00
Alex J Best
eff3c95f23
chore: fix typo in getNumBuiltiAttributes name
2022-11-21 09:22:31 -08:00
Sebastian Ullrich
019707ccf4
fix: do method lifting across choice nodes
2022-11-21 17:52:14 +01:00
Siddharth
4d47c8abc6
feat: add LLVM C API bindings ( #1497 )
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2022-11-21 09:50:01 +01:00
Sebastian Ullrich
1b73fa3fa1
chore: lean.mk: re-suppress find error messages
2022-11-20 19:55:09 +01:00
Leonardo de Moura
027bf6e140
chore: update stage0
2022-11-20 10:48:22 -08:00
Sebastian Ullrich
9c3a283eb1
chore: update-stage0: simplify
2022-11-20 10:22:20 -08:00
Sebastian Ullrich
5053cb02b7
chore: don't copy .lean files to stage0
2022-11-20 10:22:20 -08:00
Sebastian Ullrich
7809b269ca
chore: avoid xargs in update-stage0
2022-11-20 10:22:20 -08:00
Leonardo de Moura
9056824be5
chore: update stage0
2022-11-19 19:24:10 -08:00
Leonardo de Moura
9022fb8d48
fix: custom update-stage0 for osx
2022-11-19 19:20:13 -08:00
Leonardo de Moura
51a29098ab
fix: fixes #1852
2022-11-19 09:37:52 -08:00
Leonardo de Moura
22e96c71e9
fix: fixes #1850
2022-11-19 09:18:12 -08:00
Gabriel Ebner
bbe5cf63b2
perf: pick cache size coprime to pointer alignment
2022-11-19 08:27:38 -08:00
Mario Carneiro
c8859a31d9
fix: Nat.log2_terminates should not be private
2022-11-19 08:26:59 -08:00
Leonardo de Moura
14d37739c7
chore: update stage0
2022-11-19 07:55:34 -08:00
Leonardo de Moura
ecac90c522
fix: optParam default value does not count as dependency at anyNamedArgDependsOnCurrent
2022-11-19 07:54:28 -08:00
Leonardo de Moura
ace674cc06
chore: remove unnecessary test
2022-11-19 07:52:53 -08:00
Leonardo de Moura
966e1df96d
chore: fix build
2022-11-19 07:46:01 -08:00
Leonardo de Moura
a5ab59a413
fix: fixes #1851
2022-11-19 07:01:02 -08:00
Leonardo de Moura
5e9767a283
chore: fix test
2022-11-18 21:10:34 -08:00
Leonardo de Moura
556b6706ee
fix: fixes #1856
2022-11-18 19:34:32 -08:00
Leonardo de Moura
a7107aedb3
fix: fixes #1848
2022-11-18 08:49:10 -08:00
Mario Carneiro
f74fee07e6
doc: document Init.Data.List.Basic ( #1828 )
...
* doc: document Init.Data.List.Basic
* Apply suggestions from code review
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2022-11-18 06:16:50 -08:00
Sebastian Ullrich
46b6391c77
fix: inconsistent use of precompiled symbols from interpreter on Windows
2022-11-18 06:16:05 -08:00
Sebastian Ullrich
a4abbf07b8
chore: remove remnants of C++ format
2022-11-18 06:11:24 -08:00
Sebastian Ullrich
7529e86307
feat: implement workspace/applyEdit server request ( #1846 )
2022-11-17 19:30:17 +00:00
E.W.Ayers
73644fc6f6
docs: add a section about how to insert text from a widget
2022-11-16 18:57:28 -08:00
E.W.Ayers
aca4703f04
fix: fix the code example for widgets docs.
2022-11-16 18:57:28 -08:00
Leonardo de Moura
d2a5ea137d
fix: fixes #1842
2022-11-16 17:29:41 -08:00
Leonardo de Moura
edadd8c034
fix: fixes #1841
...
This commit adds the configuration option
`ApplyConfig.approx` (available in Lean 3), and sets it to true by
default like in Lean 3.
2022-11-16 14:46:05 -08:00
Leonardo de Moura
6f5bd3ccb6
chore: update stage0
2022-11-16 13:32:08 -08:00
Leonardo de Moura
7b03d9719c
fix: fixes #1679
2022-11-16 13:15:53 -08:00
Henrik Böving
6fe52cac41
doc: explain some decisions in ElimDeadBranches
2022-11-16 08:17:13 -08:00
Henrik Böving
e0d619e3ee
chore: basic tests for LCNF ElimDeadBranches
2022-11-16 08:17:13 -08:00
Henrik Böving
66009a5cd3
feat: constant folding for decision procedures
2022-11-16 08:17:13 -08:00
Henrik Böving
5a397c8525
feat: ElimDeadBranches for LCNF
2022-11-16 08:17:13 -08:00
Mario Carneiro
d3a30869c7
fix: spacing in by_cases
2022-11-16 08:16:42 -08:00
Mario Carneiro
118d1027d2
feat: go to definition for KeyedDeclsAttributes
2022-11-16 11:16:24 +01:00
Mario Carneiro
2184533236
fix: attribute info nesting
2022-11-16 11:12:24 +01:00
Leonardo de Moura
98922b878a
fix: fixes #1815
2022-11-15 17:08:54 -08:00
Leonardo de Moura
a4acf084c8
chore: fix build
2022-11-15 16:51:40 -08:00
Leonardo de Moura
8a012c83d3
chore: update stage0
2022-11-15 16:49:07 -08:00
Leonardo de Moura
8225be2f0e
feat: ensure projections are not reducing at DiscrTree V (simpleReduce := true)
...
Now, the `simp` discrimination tree does not perform `iota` nor reduce
projections.
2022-11-15 16:47:12 -08:00
Leonardo de Moura
1b0c2f7157
feat: parameterize DiscrTree indicating whether non trivial reductions are allowed or not when indexing/retrieving terms
2022-11-15 16:47:12 -08:00
Leonardo de Moura
81c84bf045
feat: do not perform iota reduction at the discrimination tree module
2022-11-15 16:47:12 -08:00
Gabriel Ebner
75aa732af5
doc: mention ignoreLevelMVarDepth
2022-11-15 11:29:26 -08:00
Leonardo de Moura
1cc58e60ef
fix: fixes #1829
2022-11-15 08:31:36 -08:00
Sebastian Ullrich
3d1ff59f11
fix: parseImports': respect prelude
2022-11-15 07:40:10 -08:00
Sebastian Ullrich
e3b83625f2
perf: optimize --deps --json
2022-11-15 07:40:10 -08:00
Sebastian Ullrich
3f9ba30424
fix: integer overflows
2022-11-15 07:37:54 -08:00
Sebastian Ullrich
591eccee4f
chore: move expensive test to beginning of test block
2022-11-14 15:46:34 +01:00
Sebastian Ullrich
6e34c89cbb
chore: Nix: comment out rarely used lean-stage0 input
...
Optional inputs would be nice.
2022-11-14 13:12:07 +01:00
Sebastian Ullrich
fea819bf3c
chore: update stage0
2022-11-14 12:56:03 +01:00
Sebastian Ullrich
4cd5b67271
chore: generalize parser kind detection
2022-11-14 12:53:18 +01:00
Mario Carneiro
73a8dc9738
feat: add decl links for Quot via add_decl_doc
2022-11-14 09:54:56 +01:00
Mario Carneiro
a2199d6d57
doc: document Init.Data.Nat.Basic
2022-11-13 21:59:57 -08:00
Mario Carneiro
2cb333a260
feat: elab_rules : conv
2022-11-13 21:09:26 -08:00
Leonardo de Moura
5654d8465d
fix: fixes #1822
2022-11-13 18:13:29 -08:00
Leonardo de Moura
a87f0e25de
feat: add compiler.checkTypes for sanity checking
2022-11-13 17:45:21 -08:00
Leonardo de Moura
854e655940
chore: document implementedBy := true use at phase 1
2022-11-13 15:47:13 -08:00
Mario Carneiro
b948a56196
chore: remove [Inhabited A] from binSearch / binInsert
2022-11-13 15:00:26 -08:00
Alex J. Best
c72cf24694
chore: protect Int.repr
2022-11-13 15:00:08 -08:00
Mario Carneiro
178d0ebe4f
fix: protected on Nat.add_zero
2022-11-13 14:59:47 -08:00
Mario Carneiro
7358df2f7e
chore: remove Int.natMod
2022-11-13 14:59:26 -08:00
Gabriel Ebner
716fe7abb8
perf: use parseImports'
2022-11-11 13:21:42 -05:00
Gabriel Ebner
c614ffa2f7
chore: bump Lean version
2022-11-11 13:21:42 -05:00
Sebastian Ullrich
bcd1673231
chore: abort build on panic
2022-11-11 16:24:04 +01:00
Leonardo de Moura
c3d86001c4
chore: simplify dependencies at MatchEqs
2022-11-11 05:51:05 -08:00
Sebastian Ullrich
1f447efa54
doc: update Lean.Parser.Basic
2022-11-11 14:17:21 +01:00
Sebastian Ullrich
7cdd8f81d7
refactor: simplify withCacheFn
2022-11-11 14:07:15 +01:00
Sebastian Ullrich
d44b70c24b
chore: update stage0
2022-11-11 13:45:41 +01:00
Sebastian Ullrich
43767f8f35
fix: uncacheable syntax stack access in doIf
2022-11-11 13:45:41 +01:00
Sebastian Ullrich
4c11743f4b
refactor: split paren parser, part 2
2022-11-11 13:45:41 +01:00
Sebastian Ullrich
c370256870
chore: update stage0
2022-11-11 13:45:41 +01:00
Sebastian Ullrich
791fc70dd9
refactor: split paren parser
2022-11-11 13:45:41 +01:00
Sebastian Ullrich
64ec4106c3
chore: update stage0
2022-11-11 13:45:41 +01:00
Sebastian Ullrich
30dd28480d
fix: suppressInsideQuot inside quotation
2022-11-11 13:45:41 +01:00
Sebastian Ullrich
f5c13f9db8
chore: parseQuotWithCurrentStage and quotPrecheck
2022-11-11 13:45:41 +01:00
github-actions[bot]
140d10819d
doc: update changelog
2022-11-11 08:13:31 +00:00
Sebastian Ullrich
0dea086669
fix: reset lhsPrec, errorMsg in withCacheFn
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
22510db004
refactor: simplify parser code using withFn
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
e7bf1cd3dc
refactor: simplify adaptUncacheableContextFn
...
compiler.ir.result reports 0 allocations on happy path
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
fb941d0827
fix: ensure parser caching is sound re. syntax stack accesses
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
7410d00678
feat: Subarray.findRev?
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
12b267bd8c
refactor: categoryParserOfStack is dead
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
17782fba1a
fix: replace broken ptrEq cache sanity checks with private ParserContext constructor
...
The context is now manipulated using `adaptCacheableContext` and `adaptUncacheableContext`
and created using `ParserFn.run`.
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
d5255e94e8
perf: improve dynamicQuot caching
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
d3f7d0350f
refactor: move parser types into separate file
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
9a4626c495
fix: must cache stack of parser evals
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
36189cb51a
chore: simplify parser cache key computation, panic on environment/token table divergence
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
ed03ff9d00
perf: cache leading_parser and syntax as well
...
We better hope the `leading_parser`s are closed terms
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
da6efe1bca
fix: make parser caching sound (I hope?)
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
35509b5e98
refactor: more sensible ordering of declarations in Lean.Parser.Basic
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
246923886a
fix: do not create choice nodes for failed parses
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
57320712f0
fix: extraneous missing items on parser stack
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
260387d626
chore: update stage0
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
7e193a45ce
perf: cache category parses
2022-11-11 09:13:02 +01:00
Leonardo de Moura
8030aed56e
fix: fixes #1814
...
Missing `hasAssignableMVar` checks.
2022-11-10 20:42:02 -08:00
tydeu
837eec5d9a
feat: add buildO helper
...
closes leanprover/lake#126
2022-11-10 20:48:05 -05:00
tydeu
8e6abd7c56
doc: add --old to lake help
2022-11-10 20:48:05 -05:00
tydeu
ddd7581ee4
refactor: lean_packages -> lake-packages + cleanup
2022-11-10 20:48:04 -05:00
tydeu
855a655033
refactor: split actions requiring load into separate file
...
see 1bd8430c15 (r82430947)
2022-11-10 20:48:03 -05:00
tydeu
0bf59a5921
feat: library defaultFacets setting
...
closes leanprover/lake#117
2022-11-10 20:48:02 -05:00
tydeu
d3d526d43f
test: make FFI example builds verbose
2022-11-10 20:46:57 -05:00
tydeu
0b1d2956a4
refactor: change manifest file path
...
closes leanprover/lake#111
2022-11-10 20:46:57 -05:00
Mario Carneiro
9544a0572e
fix: remove #check
2022-11-10 20:46:55 -05:00
tydeu
f40dbbcf02
chore: remove verbosity from LoadConfig
2022-11-10 20:46:55 -05:00
tydeu
fc65f6e73e
chore: start next Lake version
2022-11-10 20:46:54 -05:00
Leonardo de Moura
ca0fb21df4
fix: fixes #1813
...
Remark: modifies the value for the `mid` priority.
See new note at `Init/Notation.lean`
2022-11-10 16:09:21 -08:00
Leonardo de Moura
723b87ad63
chore: fix build
...
Incorrect assertion in the old code generator has been exposed by new test.
2022-11-10 15:27:43 -08:00
Leonardo de Moura
c147059fd7
fix: fixes #1812
2022-11-10 08:58:09 -08:00
Leonardo de Moura
9b02f982e2
chore: add ppCode'
2022-11-10 08:07:35 -08:00
Leonardo de Moura
2386c401d2
chore: use String.get' and String.next' at Parser/Basic.lean
...
This commit also cleans up old frontend legacy.
2022-11-09 17:06:22 -08:00
Leonardo de Moura
5eaa0fa2df
chore: leftovers
2022-11-09 17:03:08 -08:00
Leonardo de Moura
7b8ade5ee4
test: String.get' and String.next'
2022-11-09 17:02:49 -08:00
Leonardo de Moura
afa567fc09
chore: update stage0
2022-11-09 16:58:52 -08:00
Leonardo de Moura
4f07c46956
fix: bug at lean_string_utf8_get_fast
2022-11-09 16:58:20 -08:00
Leonardo de Moura
1704debcd0
perf: add parseImports'
...
Faster version of `parserImports` for Lake
2022-11-09 14:50:11 -08:00
Leonardo de Moura
69bd25af4f
chore: add Repr and Inhabited instances for Import
2022-11-09 14:35:57 -08:00
Leonardo de Moura
3e33fcc4f8
chore: use lean_string_utf8_next_fast
2022-11-09 12:06:37 -08:00
Leonardo de Moura
ab59cce346
chore: update stage0
2022-11-09 12:04:58 -08:00
Leonardo de Moura
92c03c0050
perf: prepare do add String.next'
2022-11-09 12:00:31 -08:00
Leonardo de Moura
20eeb4202f
perf: fast String.get' without runtime bounds check
...
TODO: naming convention `String.get'` should be called `String.get`,
and we should rename the old `String.get`
2022-11-09 12:00:30 -08:00
Adrien Champion
33aa1724f2
fix: rewrite by with strict indentation in a few struct-fields
2022-11-08 08:30:42 -08:00
Adrien Champion
1823735ebf
chore: tests for strict-indent nested by-s
2022-11-08 08:30:42 -08:00
Adrien Champion
5849fdc6c9
feat: require strict indentation on nested by-s
2022-11-08 08:30:42 -08:00
github-actions[bot]
d7636694a8
doc: update changelog
2022-11-08 16:29:53 +00:00
Mario Carneiro
4bf89dfa12
feat: allow doSeq in let x <- e | seq
...
fixes #1804
2022-11-08 08:29:21 -08:00
Sebastian Ullrich
9f2182fdd9
chore: update script/apply.lean semantics
2022-11-07 19:47:04 -08:00
Sebastian Ullrich
5be816244e
chore: update script/apply.lean syntax
2022-11-07 19:47:04 -08:00
Leonardo de Moura
95df68f3e4
chore: [elab_as_elim] at Eq.substr
...
Lean 3 compatibility issue.
see #1806
2022-11-07 19:44:11 -08:00
Leonardo de Moura
b4d13a8946
refactor: LetExpr => LetValue
...
We use "let value" in many other places in the code base.
2022-11-07 18:51:07 -08:00
Leonardo de Moura
65caa8f2c4
chore: update stage0
2022-11-07 18:20:48 -08:00
Leonardo de Moura
e8b4a8875c
fix: type argument that is a fvar at FixedParams.lean
2022-11-07 18:18:07 -08:00
Leonardo de Moura
d11697cbf7
chore: fix some tests
2022-11-07 18:18:06 -08:00
Leonardo de Moura
9399164201
fix: simpCasesOnCtor?
2022-11-07 18:18:06 -08:00
Leonardo de Moura
a5dadfdb7a
feat: activate all passes
2022-11-07 16:18:36 -08:00
Leonardo de Moura
828a815821
fix: simpAppApp?
2022-11-07 16:18:36 -08:00
Leonardo de Moura
92faeec832
fix: add Simp.findFunDecl'?
...
It may look like a simple optimization but affects the inlining
heuristics. Example:
```
fun f ... := ...
let x_1 := f
let x_2 := x_1 a
let x_3 := x_1 b
...
```
Before this commit, `f` was not being marked as being used multiple times.
2022-11-07 16:18:36 -08:00
Leonardo de Moura
f342d0ea35
fix: avoid unnecessary whitespace at LCNF pretty printer
2022-11-07 16:18:36 -08:00
Leonardo de Moura
cf13b29760
fix: nasty bug due to #1804
2022-11-07 16:18:36 -08:00
Leonardo de Moura
c5584581ce
fix: inferType for Code.jmp
2022-11-07 16:18:36 -08:00
Leonardo de Moura
0cfdf285e3
chore: remove unnecessary auxiliary declaration
2022-11-07 16:18:36 -08:00
Leonardo de Moura
46d83f2d80
fix: unnecessary paren at ppArg
2022-11-07 16:18:36 -08:00
Leonardo de Moura
3a818ed6ae
fix: broken cache at toLCNF
2022-11-07 16:18:36 -08:00
Leonardo de Moura
390d4b28f2
chore: disable most LCNF passes to be able to use update-stage0
...
We cannot effectively test without an `update-stage0` since the LCNF
representation is different and incompatible with the one in the
.olean files.
One of the passes is not terminating (probably `simp`) when compiling
stage2.
2022-11-07 16:18:36 -08:00
Leonardo de Moura
623e8cddf6
fix: ReduceArity.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
2e8150e50d
chore: port Check.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
ea8e7d5c99
chore: port ReduceArity.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
a71c438838
chore: port ToMono.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
9647f003c5
chore: port Specialize.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
beb923c79f
chore: anyFVar and allFVar
2022-11-07 16:18:36 -08:00
Leonardo de Moura
eaade5abde
chore: port LambdaLifting.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
0e85d9aa34
chore: re-activate Simp.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
1e3c7d2b4e
fix: Simp/Main.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
db44a3a3f3
fix: JpCases.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
2328cf2fb4
feat: add ppLetExpr
2022-11-07 16:18:36 -08:00
Leonardo de Moura
b63eb886ce
chore: incorrect annotation
2022-11-07 16:18:36 -08:00
Leonardo de Moura
a19e8fc526
chore: port Simp/Main.lean
2022-11-07 16:18:36 -08:00
Henrik Böving
c5a99bda2b
chore: port join point optimizations to LetExpr
2022-11-07 16:18:36 -08:00
Henrik Böving
695f972ff2
chore: migrate Compiler Probing to LetExpr
2022-11-07 16:18:36 -08:00
Henrik Böving
963cd8d175
chore: port FloatLetIn to LetExpr
2022-11-07 16:18:36 -08:00
Henrik Böving
0defadfa98
chore: migrate compiler test framework to LetExpr
2022-11-07 16:18:36 -08:00
Leonardo de Moura
3a783010a0
chore: adjust some declarations at LCNF/Simp
2022-11-07 16:18:36 -08:00
Leonardo de Moura
fd316ef027
chore: port ConstantFold.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
e6232b67b6
chore: add helper functions
2022-11-07 16:18:36 -08:00
Leonardo de Moura
123aed11ca
chore: port InlineCandidate.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
0c58913cf1
chore: port SimpValue.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
ddeb63f69f
chore: port Used.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
846a872293
chore: port InlineProj.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
d6fe779d7a
chore: port JpCases.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
34d18a49aa
chroe: port DiscrM
2022-11-07 16:18:36 -08:00
Leonardo de Moura
c8eab4478d
chore: re-enable pullInstances and cse passes
2022-11-07 16:18:36 -08:00
Leonardo de Moura
691afbfdc8
fix: ToLCNF visitNoConfusion
2022-11-07 16:18:36 -08:00
Leonardo de Moura
67e2735f07
chore: display LCNF unreachable type when pp.all is true
2022-11-07 16:18:36 -08:00
Leonardo de Moura
4bf2df563d
fix: typo
2022-11-07 16:18:36 -08:00
Leonardo de Moura
01791b0c19
chore: port ToLCNF
2022-11-07 16:18:36 -08:00
Leonardo de Moura
7e2c476a77
chore: port more files to new LCNF
2022-11-07 16:18:36 -08:00
Leonardo de Moura
d521197c24
chore: port FunDeclInfo.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
5c53656d46
chore: port LCNF/InferType.lean
2022-11-07 16:18:35 -08:00
Leonardo de Moura
f5d6b0ed94
chore: port FVarUtil.lean
2022-11-07 16:18:35 -08:00
Leonardo de Moura
8f40899cde
feat: add Expr.updateFVar!
2022-11-07 16:18:35 -08:00
Leonardo de Moura
6d46829599
chore: new LCNF representation
...
This is the first of a series of commits to change the LCNF representation.
2022-11-07 16:18:35 -08:00
Mario Carneiro
22cdac914d
fix: improved error span for inherit_doc ( #1807 )
2022-11-07 20:11:41 +00:00
github-actions[bot]
cf35416f5b
doc: update changelog
2022-11-07 19:01:40 +00:00
Mario Carneiro
4fefb2097f
feat: hover/go-to-def/refs for options
2022-11-07 20:01:13 +01:00
github-actions[bot]
3fdbfa2ed4
doc: update changelog
2022-11-07 18:11:29 +00:00
Mario Carneiro
32b6bd0d8b
feat: empty type ascription syntax (e :) (part 2)
2022-11-07 19:10:56 +01:00
Mario Carneiro
2cd11d22af
chore: update stage0
2022-11-07 19:10:56 +01:00
Mario Carneiro
02d8a5d56e
feat: empty type ascription syntax (e :)
2022-11-07 19:10:56 +01:00
Alex J. Best
648ecff830
feat: reduce precedence of unary neg
2022-11-06 18:13:48 -08:00
Alex J Best
8da48f2381
chore: typo fix in error message of overlapping structure fields
2022-11-05 12:41:40 -07:00
Mario Carneiro
999b61007c
feat: tweak behavior of congrN to match lean 3 ( #1798 )
2022-11-04 06:55:13 -07:00
Scott Morrison
d0dc9a2f90
fix: reorder goals after specialize ( #1796 )
...
* fix: reorder goals after specialize
* fix test
2022-11-03 06:32:55 -07:00
Sebastian Ullrich
5249611d75
doc: fix mkAntiquot docstring
2022-11-03 10:07:38 +01:00
Sebastian Ullrich
17d67bb24c
chore: revert "fix: revert LLVM 15 bump on MacOS aarch64"
...
This reverts commit bf734715d3 .
2022-11-02 17:39:01 +01:00
Mario Carneiro
9b40613207
fix: formatting for if let and do if
2022-11-01 20:19:39 -07:00
Mario Carneiro
ad1c23f172
fix: bug in replaceLocalDeclDefEq
...
fixes #1615
2022-11-01 19:18:25 -07:00
Henrik Böving
00e3004ce5
feat: jp ctx extender after lambda lifting
2022-10-30 06:42:24 -07:00
David Thrane Christiansen
8b9fe9b6c2
doc: fix typo in manual ToC ( #1790 )
...
There was a typographical error in the manual's table of contents (the section itself and the filename did not have the mistake).
2022-10-30 02:52:16 +02:00
Sebastian Ullrich
62ec0bfdb0
chore: CI: fix Update changelog action's commit message
2022-10-28 23:01:49 +02:00
github-actions[bot]
ac23228c6e
update changelog
2022-10-28 19:26:19 +00:00
Sebastian Ullrich
a89b1b4b95
fix: use patternIgnore to ignore now-relevant tokens again
2022-10-28 21:25:47 +02:00
Sebastian Ullrich
65fc6db504
chore: update stage0
2022-10-28 21:25:47 +02:00
Sebastian Ullrich
7475fd9cbd
feat: ignore patternIgnore nodes in syntax patterns
2022-10-28 21:25:47 +02:00
Sebastian Ullrich
9b05f57ec8
fix: wrap &"..." <|> ... as well
2022-10-28 21:25:47 +02:00
Sebastian Ullrich
731e28df00
fix: syntax match should not ignore tokens in <|>
2022-10-28 21:25:47 +02:00
Sebastian Ullrich
b8ebfbfecc
chore: improve pretty printer antiquotation support
2022-10-28 21:25:47 +02:00
Leonardo de Moura
5f38a483f2
fix: congr tactic
...
`MVarId.congr?` and `MVarId.hcongr?` should return `none` if an
exception is thrown while applying congruence theorem.
`MVarId.hcongr?` should try `eq_of_heq` before trying to apply
`hcongr` theorem.
closes #1787
BTW: Lean 4 `congr` tactic is applying `assumption`. Lean 3 version does not.
2022-10-28 08:00:04 -07:00
Leonardo de Moura
279c34ff46
feat: add MVarId.eqOfHEq tactic
2022-10-28 07:52:45 -07:00
Leonardo de Moura
f75d59047f
feat: add commitWhenSomeNoEx?
...
TODO: better name?
This commit also removes the `[specialize]` annotations.
2022-10-28 07:51:41 -07:00
Leonardo de Moura
60802d83af
chore: update stage0
2022-10-27 18:58:02 -07:00
Leonardo de Moura
31d2c8fb66
chore: fix test
2022-10-27 18:57:25 -07:00
Leonardo de Moura
25beba6624
feat: avoid modulo in HashMap and HashSet
...
closes #609
Context: trying to improve Lean startup time.
Remark: it didn't seem to make a difference in practice. We should
investigate more.
cc @kha @gebener
2022-10-27 18:54:56 -07:00
Leonardo de Moura
dd45391568
chore: hoist out error generation code
...
Motivation: it was affecting my performance tests
2022-10-27 18:26:38 -07:00
Leonardo de Moura
b8f4a345f1
feat: add Power2
2022-10-27 18:11:20 -07:00
Leonardo de Moura
dc750d143e
chore: remove test/optimization that is essentially dead code
2022-10-27 16:45:50 -07:00
Gabriel Ebner
c16d7728b0
feat: improve import duplicate definition error
2022-10-27 16:42:09 -07:00
Mario Carneiro
29bda62198
fix: missed a file from #1771
2022-10-27 11:14:13 -07:00
Leonardo de Moura
d9243e07f9
chore: update stage0
2022-10-27 09:55:09 -07:00
Leonardo de Moura
99ea171e48
chore: zero startup time specExtension
2022-10-27 09:54:04 -07:00
Leonardo de Moura
346c18a5b5
perf: improve namespacesExt import function
2022-10-27 08:59:24 -07:00
Leonardo de Moura
181a065d1b
chore: update stage0
2022-10-27 08:32:37 -07:00
Leonardo de Moura
635ccef5a3
perf: improve setImportedEntries
...
Remove linear scan at `getEntriesFor`.
2022-10-27 08:29:18 -07:00
Leonardo de Moura
44e889bd52
chore: avoid runtime bounds check
2022-10-27 07:48:30 -07:00
Leonardo de Moura
33045433d2
chore: update stage0
2022-10-27 07:35:47 -07:00
Leonardo de Moura
0a35ce7e3e
perf: add ModuleData.constNames
2022-10-27 07:34:07 -07:00
Leonardo de Moura
95689d914f
perf: use NameHashSet instead of NameSet
2022-10-27 07:10:54 -07:00
Leonardo de Moura
2c4056c104
chore: use exit during finalization
...
Motivation: Lean startup time profiling.
2022-10-27 06:51:29 -07:00
Leonardo de Moura
23ba495205
perf: better initial const2ModIdx size
2022-10-26 22:22:41 -07:00
Leonardo de Moura
bac4774b75
chore: update stage0
2022-10-26 21:56:23 -07:00
Leonardo de Moura
39249f0c1d
perf: zero startup time function summaries
2022-10-26 21:55:37 -07:00
Leonardo de Moura
ad98df80fe
feat: congr theorems using Iff
...
closes #1763
2022-10-26 18:00:24 -07:00
Leonardo de Moura
5e25d9148a
feat: improve apply error message when root term elaboration is postponed
...
fixes #1719
2022-10-26 17:15:24 -07:00
Leonardo de Moura
0b6b754bca
feat: improve apply tactic
...
It tries to address what the Mathlib community calls the "apply bug".
cc @digama0
2022-10-26 16:58:43 -07:00
Leonardo de Moura
f3b1eadb55
feat: copy docstring when copying parent fields
...
closes #1730
2022-10-26 15:43:46 -07:00
Leonardo de Moura
83d8e36773
fix: fixes #1780
2022-10-26 07:46:38 -07:00
Leonardo de Moura
5a8f9ace72
fix: open .. hinding .. should activate scoped attributes
2022-10-26 07:39:06 -07:00
Leonardo de Moura
e369c3beb6
fix: disallow . immediately after ..
...
Rejects the following weird example
```
```
which was being parsed as
```
```
2022-10-26 07:13:40 -07:00
Leonardo de Moura
d7e732e886
feat: use unop% to implement unary minus notation
...
closes #1779
2022-10-26 06:55:24 -07:00
Leonardo de Moura
6211de92f0
chore: update stage0
2022-10-26 06:52:21 -07:00
Leonardo de Moura
1216f5e658
feat: support for unop% at CollectPatternVars
2022-10-26 06:51:14 -07:00
Leonardo de Moura
39808d4eef
chore: update stage0
2022-10-26 06:45:33 -07:00
Leonardo de Moura
e6caee97ec
feat: unop% elaborator
...
We now have support for unary operators at `Op.toTree` and `Op.toExpr`
see #1779
2022-10-26 06:44:44 -07:00
Leonardo de Moura
0818cdc411
chore: update stage0
2022-10-26 06:28:50 -07:00
Leonardo de Moura
00ca0dde5c
feat: add unop% term parser
...
We not to support unary minus at `BinOp.toTree`
see #1779
2022-10-26 06:19:22 -07:00
Mario Carneiro
a086d217a5
fix: bug in level normalization (soundness bug)
2022-10-26 05:22:26 -07:00
tydeu
17a4bcb3e1
Merge remote-tracking branch 'gebner/minmax'
2022-10-25 20:58:41 -04:00
Mario Carneiro
bf734715d3
fix: revert LLVM 15 bump on MacOS aarch64
2022-10-26 00:51:20 +02:00
Gabriel Ebner
56d0fbd537
chore: bump Lean version
2022-10-25 15:20:38 -07:00
Sebastian Ullrich
1893857f15
fix: expandCDot? should create canonical syntax
2022-10-25 12:23:13 +02:00
Sebastian Ullrich
f39281f6b4
fix: hoverableInfoAt? in presence of canonical syntax
2022-10-25 12:23:13 +02:00
Sebastian Ullrich
36fbf53a79
chore: improve trace.Elab.info formatting
2022-10-25 12:23:13 +02:00
Leonardo de Moura
e55badef05
feat: List.mapMono
2022-10-24 19:50:09 -07:00
Leonardo de Moura
2cd21e08ba
chore: add CollectLevelParams.visitLevels
2022-10-24 19:50:09 -07:00
Leonardo de Moura
81f8ab8fbb
refactor: Level.instantiateParams => Level.substParams, add Level.instantiateParams
...
Motivation: make sure `Level.instantiateParams` and
`Expr.instantiateLevelParams` have similar types.
2022-10-24 19:49:57 -07:00
Mario Carneiro
d7d61bfb55
feat: use withoutPosition consistently (part 2)
2022-10-24 12:51:32 -07:00
Mario Carneiro
8b8fc64fa0
chore: update stage0
2022-10-24 12:51:32 -07:00
Mario Carneiro
765ebcdbf0
feat: use withoutPosition consistently
2022-10-24 12:51:32 -07:00
Gabriel Ebner
4ff6798284
perf: use instantiation cache
2022-10-24 12:23:13 -07:00
Gabriel Ebner
fa9538ffa6
perf: use old instantiateLevelParams in compiler
2022-10-24 12:23:13 -07:00
Gabriel Ebner
d87c36157a
perf: speed up Expr.replace
2022-10-24 12:23:13 -07:00
Gabriel Ebner
dcc97c9bbe
fix: preserve sharing in instantiateLevelParams
2022-10-24 12:23:13 -07:00
Gabriel Ebner
725aa8b39a
refactor: instantiateTypeLevelParams in Lean
2022-10-24 12:23:13 -07:00
Mario Carneiro
e7c7678ab0
refactor: line wrapping in parser code
2022-10-24 08:37:29 -07:00
David Renshaw
e4ab10dc30
doc: fix some typos
...
assinged -> assigned
collction -> collection
2022-10-24 16:01:39 +02:00
mcdoll
6cf9a63193
doc: fix typo ( #1775 )
...
equaal -> equal
2022-10-24 15:05:51 +02:00
Sebastian Ullrich
3a12c99666
chore: register Elab.app trace classes
2022-10-24 13:16:36 +02:00
Yuri de Wit
c98b3a5388
fix: add local Hashable instance ( fixes #1737 )
...
When inductives are indirectly mutually recursive, say `inductive T | t
(args: List T)` instead of `inductive T | t (arg : T)`, Lean would fail
to find an instance of Hashable for `T` because it was not yet defined.
This commit makes sure that the deriving handler adds a needed Hashable T
instance to the local scope so that Hashable.hash can be resolved
recursively.
2022-10-23 21:26:04 +02:00
joao guilherme
e796943414
doc: fix typo ( #1769 )
2022-10-23 21:23:57 +02:00
github-actions[bot]
24d91094f3
update changelog
2022-10-23 19:12:23 +00:00
Mario Carneiro
c4cbefce11
feat: add linter.deprecated option to silence deprecation warnings
2022-10-23 21:11:57 +02:00
Sebastian Ullrich
89fd86cb3c
chore: Nix: update lean4-mode
2022-10-23 17:59:32 +02:00
Mario Carneiro
b3ba78aade
feat: hovers & name resolution in registerCombinatorAttribute (part 2)
2022-10-23 09:30:38 +02:00
Mario Carneiro
e412edc0f6
chore: update stage0
2022-10-23 09:30:38 +02:00
Mario Carneiro
f168af76a7
feat: hovers & name resolution in registerCombinatorAttribute
2022-10-23 09:30:38 +02:00
David Renshaw
16320a297f
doc: fix some typos
...
Leah -> Lean
giveName -> givenName
2022-10-22 21:16:35 +02:00
Henrik Böving
1e00eff3e7
fix: jp context extender missed out on some variables
2022-10-21 17:58:47 -07:00
Henrik Böving
dac6127810
feat: Compiler pass for reducing common jp args
2022-10-21 17:35:40 -07:00
Henrik Böving
a608532fd4
chore: Improve LCNF check goto error message
2022-10-21 17:35:40 -07:00
Gabriel Ebner
fc304d95c0
feat: Min/Max typeclasses
2022-10-21 14:36:38 -07:00
Gabriel Ebner
783a61ab76
chore: Min/Max typeclasses
2022-10-21 11:23:29 -07:00
Gabriel Ebner
041307fd4b
fix: build
2022-10-20 12:42:32 -07:00
E.W.Ayers
112cb5e261
test: fix test output
2022-10-20 11:20:42 -07:00
E.W.Ayers
46112a5f2a
fix: review
2022-10-20 11:20:42 -07:00
E.W.Ayers
c9a26596dc
refactor: switch resolve to double eval strategy
...
Using option (2) from this comment:
https://github.com/leanprover/lean4/pull/1661#pullrequestreview-1135363727
2022-10-20 11:20:42 -07:00
E.W.Ayers
691835037e
feat: code action resolvers
2022-10-20 11:20:42 -07:00
E.W.Ayers
297d06fc0c
fix: issue where code action was not running
2022-10-20 11:20:42 -07:00
E.W.Ayers
c795e2b073
fix: rm CodeActionData
2022-10-20 11:20:42 -07:00
Ed Ayers
7f47a34656
style: apply suggestions from code review
...
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2022-10-20 11:20:42 -07:00
E.W.Ayers
260e42b0a7
doc: fix docs from review
2022-10-20 11:20:42 -07:00
E.W.Ayers
8085ce88e9
feat: CodeActionProvider
...
This is a low-level system for registering LSP code actions.
Developers can register their own code actions.
In future commits I am going to add features on top of this.
2022-10-20 11:20:42 -07:00
tydeu
3ad183e502
Merge branch 'snake'
2022-10-20 12:27:16 -04:00
tydeu
25fe4a6f4d
chore: update Lean version + attr fixes
2022-10-20 12:20:57 -04:00
Leonardo de Moura
aeddcbdc6d
fix: disable implicit lambdas at intro <pattern> notation
...
See issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/intro.20with.20type.20specified/near/305150215
2022-10-20 09:04:06 -07:00
Leonardo de Moura
dddf9e8a3f
chore: remove leftover comment
2022-10-20 08:35:47 -07:00
Mario Carneiro
dd8bbe9367
fix: catch kernel exceptions in Kernel.{isDefEq, whnf}
...
fixes #1756
2022-10-20 05:38:29 -07:00
awson
d5063c8fa7
fix: environment leak on Windows
2022-10-19 19:34:43 -07:00
Gabriel Ebner
c02955141b
chore: update stage0
2022-10-19 11:17:34 -07:00
Gabriel Ebner
c672046767
chore: update LeanInk
2022-10-19 09:28:08 -07:00
Mario Carneiro
583e023314
chore: snake-case attributes (part 2)
2022-10-19 09:28:08 -07:00
Mario Carneiro
e86b8c65a8
chore: update stage0
2022-10-19 09:28:08 -07:00
Mario Carneiro
dd5948d641
chore: snake-case attributes (part 1)
2022-10-19 09:28:08 -07:00
Patrick Massot
e80cb2eb51
doc: Option is a monad again
...
Maybe it would also be nice to add an explanation (or a link to an explanation) about why `List` is no longer a monad.
2022-10-19 08:44:53 -07:00
Sebastian Ullrich
9fd433785b
chore: register pretty printer trace classes
2022-10-19 14:51:07 +02:00
Sebastian Ullrich
18d9720975
chore: CI: fix Update changelog action
2022-10-19 10:01:14 +02:00
Mario Carneiro
39feeaab74
chore: snake-case attributes
2022-10-18 21:34:51 -04:00
Gabriel Ebner
0c2a5580cb
feat: enforce correct syntax kind in macros
2022-10-18 14:59:14 -07:00
Gabriel Ebner
fb4d90a58b
feat: dynamic quotations for categories
2022-10-18 14:59:14 -07:00
Gabriel Ebner
96acc7269d
fix: use typed syntax
2022-10-18 10:53:48 -07:00
Leonardo de Moura
0e7afae1da
chore: update stage0
...
Make sure we can use recent improvements for developing Lean itself.
2022-10-18 10:41:24 -07:00
Leonardo de Moura
084a173a47
feat: disable info tree while creating WF auxiliary definitions
2022-10-18 07:44:39 -07:00
Leonardo de Moura
1d6d61af89
feat: disable info tree while creating _unsafe_rec
2022-10-18 07:05:19 -07:00
Leonardo de Moura
4d51cdd1b7
feat: disable info tree while creating sunfold definitions
...
see #1750
2022-10-18 06:57:46 -07:00
Mario Carneiro
faa612e7b7
chore: remove #resolve_name
2022-10-17 14:53:51 -07:00
Mario Carneiro
8fc6a2a856
fix: dbg_trace tactic
2022-10-17 14:48:23 -07:00
Gabriel Ebner
7da0dd2fcf
fix: remove ` (funBinder|``
2022-10-17 14:07:16 -07:00
Sebastian Ullrich
ce673e3bb8
chore: add Update changelog action
2022-10-17 18:31:20 +02:00
Sebastian Ullrich
4a99df2d8c
chore: CI: exclude "full program" tests from debug/sanitized builds ( #1732 )
2022-10-17 10:36:01 +02:00
Leonardo de Moura
7b49156270
chore: update stage0
2022-10-16 16:22:05 -07:00
Leonardo de Moura
641fa77738
chore: minimize the number of red-black insert specializations
2022-10-16 16:20:46 -07:00
Leonardo de Moura
ec59bbe15c
chore: ensure LCNF pretty printer result supports Format.group
2022-10-16 16:06:08 -07:00
Leonardo de Moura
72c576f62a
feat: complete reduceArity pass
2022-10-16 16:00:33 -07:00
Leonardo de Moura
1a02c326e5
chore: fix test
2022-10-16 14:54:07 -07:00
Leonardo de Moura
774a555d3e
chore: update stage0
2022-10-16 14:49:55 -07:00
Leonardo de Moura
9244a7a8a5
fix: ensure old and new compiler auxiliary declaration names do not collide
2022-10-16 14:49:55 -07:00
Leonardo de Moura
ab262abdaa
chore: update stage0
2022-10-16 14:49:55 -07:00
Leonardo de Moura
40f2247c61
perf: zero cost IR extension startup cost
2022-10-16 14:49:50 -07:00
Leonardo de Moura
defd544d5d
feat: add collectUsedParams
2022-10-16 14:20:32 -07:00
Leonardo de Moura
79ed382492
chore: fix test
2022-10-16 09:00:25 -07:00
Leonardo de Moura
4eaf22118a
feat: add cse pass at mono phase
2022-10-16 08:58:06 -07:00
Leonardo de Moura
fd46ef01e8
chore: add another floatLetIn pass
...
See `elabAppFn` for a function that benefits from this extra pass.
2022-10-16 08:51:13 -07:00
Leonardo de Moura
ae627e9a58
chore: remove leftover from old frontend
2022-10-16 08:41:03 -07:00
Leonardo de Moura
c20febff31
feat: add helper Syntax.node* functions
2022-10-16 08:40:01 -07:00
Leonardo de Moura
729fd63b29
fix: incorrect initial array size
2022-10-16 07:48:30 -07:00
Leonardo de Moura
bebce084fa
fix: bug at toLCNF.visitMData
2022-10-16 07:38:40 -07:00
Leonardo de Moura
8a81dfb876
feat: add Probe.sortedBySize, Probe.tail, and Probe.head
2022-10-15 20:12:53 -07:00
Leonardo de Moura
4b018cdc72
chore: missing annotations
2022-10-15 19:51:56 -07:00
Leonardo de Moura
9a41680ec9
feat: add Probe.getJps
2022-10-15 19:28:59 -07:00
Leonardo de Moura
dac4e6f214
fix: probing functions were not visiting FunDecl.value
2022-10-15 17:50:18 -07:00
Leonardo de Moura
f9acb7fc9f
chore: update stage0
2022-10-15 15:48:09 -07:00
Leonardo de Moura
b4d850502d
fix: avoid join point that takes closure at seqToCode
2022-10-15 15:48:02 -07:00
Leonardo de Moura
61813d60c6
test: for join point taking closure as parameter
2022-10-15 12:05:53 -07:00
Leonardo de Moura
3df13bb7b4
chore: update stage0
2022-10-15 11:59:28 -07:00
Leonardo de Moura
4d9483d1fa
fix: if inlined code returns a function and has more than one exit point, create an auxiliary function instead of a join point that takes a closure as argument
2022-10-15 11:56:52 -07:00
Leonardo de Moura
53b995386d
fix: avoid [anonymous] at LCNF binder names
2022-10-15 11:56:52 -07:00
Henrik Böving
741fac924a
chore: inline control primitives
2022-10-15 10:48:47 -07:00
Leonardo de Moura
34e5ac3013
chore: update stage0
2022-10-15 08:55:15 -07:00
Leonardo de Moura
376c541e9a
feat: do not generate code for declarations that will be specialized
2022-10-15 08:54:46 -07:00
Leonardo de Moura
359dc77664
refactor: move isTemplateLike to LCNF/Basic.lean
2022-10-15 08:51:20 -07:00
Leonardo de Moura
3505b60a22
feat: probing helper functions
2022-10-15 08:51:20 -07:00
Siddharth
48b6fee467
chore: remove stray STATIC in src/shell ( #1736 )
2022-10-15 14:27:13 +02:00
Leonardo de Moura
1eda0fd734
chore: missing annotation
2022-10-14 20:38:06 -07:00
Leonardo de Moura
6378283fa8
feat: add Probe.toString
2022-10-14 19:21:56 -07:00
Henrik Böving
38788a72be
feat: basic compiler probing framework with examples
2022-10-14 19:09:35 -07:00
Gabriel Ebner
05694a11f3
chore: update stage0
2022-10-14 13:39:26 -07:00
Sebastian Ullrich
1ddfb72106
chore: Nix: handle huge packages
2022-10-14 22:21:08 +02:00
Sebastian Ullrich
616d562d73
feat: lean --deps-json --stdin
2022-10-14 22:20:44 +02:00
Gabriel Ebner
045a71ab33
hack: ignore maxCoeSize for monad coercions
2022-10-14 12:08:10 -07:00
Gabriel Ebner
1c561c39a8
feat: function coercions with unification
2022-10-14 12:08:10 -07:00
Mario Carneiro
019f1a173a
feat: also unexpand Array.empty
2022-10-14 08:51:45 -07:00
Mario Carneiro
0acdaddcf2
feat: unexpander for mkArray0
2022-10-14 08:51:45 -07:00
Leonardo de Moura
dab88ae943
chore: update stage0
2022-10-14 08:45:30 -07:00
Leonardo de Moura
3f076fc836
perf: missing annotations and helper instances
2022-10-14 08:42:50 -07:00
Leonardo de Moura
0a126b7702
perf: better support for "inlineable" instances
2022-10-14 08:42:50 -07:00
Leonardo de Moura
1bb67918f8
chore: cleanup eagerLambdaLifting and add notes
2022-10-14 08:42:50 -07:00
Siddharth
e3f064ef87
Bump up to LLVM 15 ( #1691 )
2022-10-14 14:43:13 +00:00
Sebastian Ullrich
bc1a2dcaf2
chore: update RELEASES.md
2022-10-14 16:18:27 +02:00
Rishikesh Vaishnav
76c4693c95
fix: improve fuzzy-matching heuristics ( #1710 )
2022-10-14 16:17:14 +02:00
Sebastian Ullrich
f7651de424
chore: CI: avoid skipped dependencies hellhole
2022-10-14 13:28:17 +02:00
Sebastian Ullrich
cf24f559b6
chore: CI: make jobs actually cancellable
2022-10-14 13:28:17 +02:00
Mario Carneiro
4c1ed9e2bc
fix: hovers in appUnexpander attr
2022-10-14 10:06:12 +02:00
Leonardo de Moura
31f2acd97a
chore: cleanup trace messages
2022-10-13 18:56:17 -07:00
Leonardo de Moura
19301c09c6
chore: remove unnecessary match
2022-10-13 18:56:17 -07:00
Mario Carneiro
857e452281
feat: optional doc comment for register_simp_attr
2022-10-13 18:52:56 -07:00
Leonardo de Moura
6ed89a4ceb
chore: revert cross module lambda lifting cache
...
It adds almost 50Mb to the .olean files.
2022-10-13 18:42:52 -07:00
Leonardo de Moura
81abf49196
chore: avoid many copies of the panic message "index out of bounds"
2022-10-13 18:42:52 -07:00
Sebastian Ullrich
828aea48f4
chore: CI: cancel outdated workflows
2022-10-13 21:45:46 +02:00
Sebastian Ullrich
6b8fa76265
test: benchmark workspace symbols search
2022-10-13 21:41:58 +02:00
Leonardo de Moura
ac9d65b17b
feat: cache lambda lifting
2022-10-13 11:24:14 -07:00
Sebastian Ullrich
50a0c9bda7
chore: Nix: remove dead ileans
2022-10-13 18:12:55 +02:00
Leonardo de Moura
66c593a322
chore: update stage0
2022-10-13 08:22:11 -07:00
Leonardo de Moura
518123b191
feat: more conservative SpecParamInfo inference
2022-10-13 08:20:55 -07:00
Leonardo de Moura
407c744ae5
chore: add workarounds for old code generator
...
It is a bit ironic that the new code generator should contain
workarounds for the old one.
2022-10-13 07:09:19 -07:00
Sebastian Ullrich
02560aab73
chore: nicer pp.raw.showInfo output
2022-10-13 15:50:22 +02:00
Leonardo de Moura
dfd95c712e
chore: fix tests
2022-10-13 06:16:56 -07:00
Leonardo de Moura
886ed9b2e3
fix: remove function expected error at LCNF
2022-10-13 06:16:25 -07:00
Leonardo de Moura
c33b5b6588
chore: remove unnecessary eqvTypes
2022-10-13 06:08:51 -07:00
Leonardo de Moura
aae12d5ee2
chore: update stage0
2022-10-13 06:03:15 -07:00
Leonardo de Moura
bc2b891e7e
refactor: remove type compatibility sanity checks at LCNF Check.lean
...
See new note at `Check.lean` for details.
2022-10-13 06:01:41 -07:00
Leonardo de Moura
4ac802dd9a
chore: fix test
2022-10-13 04:31:46 -07:00
Leonardo de Moura
637a3e6331
chore: update stage0
2022-10-13 04:27:12 -07:00
Leonardo de Moura
1f54c0126c
doc: add note at Decl.simp
2022-10-13 04:26:05 -07:00
Leonardo de Moura
2563fda777
feat: enable eager lambda lifting
2022-10-13 04:22:19 -07:00
Leonardo de Moura
0966f14233
fix: local function declarations size may be 0
2022-10-13 03:34:14 -07:00
Leonardo de Moura
2675c0647b
feat: detect unreachable cases alternatives at LCNF simp
2022-10-13 02:49:55 -07:00
Leonardo de Moura
8039c15351
chore: update stage0
2022-10-13 02:09:14 -07:00
Leonardo de Moura
af99715a58
feat: store inline attribute at LCNF declarations
...
This commit also adds support for inheriting the inline attribute when
the compiler lambda lifts local functions from instances.
2022-10-13 02:06:35 -07:00
Sebastian Ullrich
e7b90b489a
fix: stabilize unused variables linter output
2022-10-13 10:46:53 +02:00
Leonardo de Moura
870de844dc
chore: annotate relevant monadic code with [alwaysInline]
...
TODO: after we delete old code generator, we should replace
`@[alwaysInline, inline]` with `@[alwaysInline]`.
Remainder: we want the old code generator to ignore `@[alwaysInline]`
annotations, in particular, the new ones on `instance` commands that
are actually annotations for the instance methods.
2022-10-12 19:48:02 -07:00
Gabriel Ebner
38d3e37c75
perf: improve Unhygienic.run code
2022-10-12 19:36:05 -07:00
Leonardo de Moura
3d2ba4f3d0
chore: update stage0
2022-10-12 17:11:53 -07:00
Leonardo de Moura
b9f174604d
feat: check new alwaysInline attribute
2022-10-12 16:55:16 -07:00
Leonardo de Moura
49a6f8c105
chore: add horrible hack for Decidable in the new code generator
...
cc @gebner
2022-10-12 16:53:29 -07:00
Leonardo de Moura
7308fa0e7d
feat: ensure lambda lifter is creating unused names
2022-10-12 16:35:55 -07:00
Leonardo de Moura
8fe4b75c48
feat: do not inline definitions occurring in instances at the base phase
2022-10-12 16:24:16 -07:00
Leonardo de Moura
5606b4e59e
feat: add [alwaysInline] attribute
...
We are planning to ignore the `[inline]` attribute when the "inlining
quota" has been exhausted in the new code generator.
2022-10-12 16:08:37 -07:00
Chris Lovett
a6b847430d
fix: highlight of deriving instance ( #1717 )
2022-10-12 14:24:16 -07:00
Gabriel Ebner
fb6cb05465
feat: support let_fun in new compiler
2022-10-12 11:52:28 -07:00
Gabriel Ebner
79569c9003
chore: replace let by have in stx matches
2022-10-12 11:52:28 -07:00
Sebastian Ullrich
18a4b277fc
test: more fair qsort.ml benchmark
2022-10-12 20:22:55 +02:00
Mario Carneiro
c06cffa54f
refactor: rename isExitCommand -> isTerminalCommand
2022-10-12 11:11:31 -07:00
Mario Carneiro
8dfae9eb38
feat: import command stub
2022-10-12 11:11:31 -07:00
Leonardo de Moura
aa845dee98
feat: cache lambda lifted functions
2022-10-11 21:28:03 -07:00
Leonardo de Moura
767bda2c28
chore: preparing to change the semantics of @[inline] instance
...
In the new code generator, we are going to lambda lift the instance
methods before saving the code at the end of the base phase. The goal is to make instance
ligth weight and cheap to inline. The anotation `@[inline]` is going
to be an annotation for the lambda lifted methods.
2022-10-11 20:35:56 -07:00
Gabriel Ebner
1de142a20b
chore: update release notes
2022-10-11 17:24:35 -07:00
Gabriel Ebner
f58b26b4b0
chore: update LeanInk
2022-10-11 17:24:35 -07:00
Gabriel Ebner
15d7744cca
chore: fix tests
2022-10-11 17:24:35 -07:00
Gabriel Ebner
c8bb2ea3cf
chore: post-bootstrap cleanup
2022-10-11 17:24:35 -07:00
Gabriel Ebner
2649b4facd
chore: update stage0
2022-10-11 17:24:35 -07:00
Gabriel Ebner
6593bd98b3
chore: add test for 1692
2022-10-11 17:24:35 -07:00
Gabriel Ebner
ba57ad3480
feat: add implementation-detail hypotheses
2022-10-11 17:24:35 -07:00
Gabriel Ebner
45c4f2faa0
refactor: remove _aux_discr
2022-10-11 17:24:35 -07:00
Gabriel Ebner
0d3d05bd3a
feat: clear%
2022-10-11 17:24:35 -07:00
Mario Carneiro
f4b04216eb
feat: go to duplicate definition
2022-10-11 10:07:49 +02:00
Chris Lovett
664e62e8c5
doc: add question mark to LEAN_IDENT_RE ( #1713 )
2022-10-11 10:04:56 +02:00
Leonardo de Moura
02a3dcb1dd
feat: hash for LCNF.Code
2022-10-10 20:34:12 -07:00
Leonardo de Moura
525b4f761c
chore: fix tests
2022-10-10 17:48:32 -07:00
Leonardo de Moura
1b4cfbe94b
chore: update stage0
2022-10-10 17:23:01 -07:00
Leonardo de Moura
3f24ce71ab
feat: add another floatLetIn pass at mono phase
2022-10-10 17:19:40 -07:00
Leonardo de Moura
a153519992
chore: update stage0
2022-10-10 17:09:23 -07:00
Gabriel Ebner
1742c79afe
chore: remove auxDecl binder info
2022-10-10 16:30:16 -07:00
Henrik Böving
dd3c0f77f1
feat: FloatLetIn compiler pass
2022-10-10 23:56:20 +02:00
Henrik Böving
d132551829
feat: extend FVarUtil framework
2022-10-10 23:32:36 +02:00
Henrik Böving
e15e6bfaee
chore: address PR comments
2022-10-10 23:32:36 +02:00
Leonardo de Moura
7b3709e28a
chore: simplify proof in test for #1711
...
TODO: improve support for instance implicit arguments at `congr`
2022-10-10 07:29:53 -07:00
Leonardo de Moura
0041de5d1d
fix: congr tactic should not try to synthesize instance implicit arguments that have been inferred when applying congr theorem
...
see #1711
2022-10-10 07:24:27 -07:00
Leonardo de Moura
fb4200e633
chore: fix tests
2022-10-09 21:51:51 -07:00
Leonardo de Moura
b20e208867
chore: pretty print LCNF cases result type
2022-10-09 20:13:17 -07:00
Leonardo de Moura
3313500056
chore: update stage0
2022-10-09 18:38:57 -07:00
Leonardo de Moura
6f023a44ad
fix: let _x.i := _x.j simplification at LCNF simp
2022-10-09 18:38:28 -07:00
Leonardo de Moura
72d3840f0c
feat: add simpCast?
2022-10-09 18:29:12 -07:00
Leonardo de Moura
6c5475725e
feat: (lcCast _ _ g) a_1 ... a_n => g a_1 ... a_n if type correct
2022-10-09 17:45:15 -07:00
Leonardo de Moura
30bd019a7f
chore: simplify SimpValue.lean
2022-10-09 17:35:13 -07:00
Leonardo de Moura
e4b97e1698
chore: update stage0
2022-10-09 16:48:20 -07:00
Leonardo de Moura
54944819a0
feat: add simpCastCast?
2022-10-09 16:43:33 -07:00
Leonardo de Moura
cd303cd8e5
fix: do not apply simpAppApp? over cast
2022-10-09 16:43:10 -07:00
Leonardo de Moura
cf313d2101
chore: improve eqvTypes
2022-10-09 16:42:55 -07:00
Leonardo de Moura
43fe67c41a
chore: helper pass for debugging purposes
2022-10-09 16:41:54 -07:00
Leonardo de Moura
b87838115f
chore: update stage0
2022-10-09 15:35:54 -07:00
Leonardo de Moura
9feb4d8ab7
fix: do not generate code for [extern] functions
2022-10-09 15:35:29 -07:00
Leonardo de Moura
2e09ac16b1
chore: update stage0
2022-10-09 13:01:42 -07:00
Leonardo de Moura
11fcdb7bf4
feat: add cast at exit points if necessary when inlining code
2022-10-09 13:01:10 -07:00
Leonardo de Moura
ef2d17120c
chore: fix note
2022-10-09 12:25:45 -07:00
Leonardo de Moura
2d3c17cd53
chore: update stage0
2022-10-09 12:12:40 -07:00
Leonardo de Moura
cc09afc5e1
fix: type error introducing when inlining LCNF functions
...
This issue has been reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Annoying.20LCNF.20errors/near/303142516
2022-10-09 12:10:11 -07:00
Leonardo de Moura
f61ec4929f
chore: add low-level normExprCore
2022-10-09 12:10:11 -07:00
Leonardo de Moura
263be54dcf
chore: fix tests
2022-10-09 12:10:11 -07:00
Leonardo de Moura
e81673366a
chore: remove leftover
2022-10-09 12:10:11 -07:00
Leonardo de Moura
613c8027d7
fix: missing instantiateParamsLevelParams
2022-10-09 12:10:11 -07:00
Leonardo de Moura
827ef94486
feat: add eqvTypes
2022-10-09 12:10:11 -07:00
Leonardo de Moura
c14d07fe2e
feat: include def/fun/jp resulting type in the LCNF pretty printer
2022-10-09 12:10:11 -07:00
Leonardo de Moura
eeb98d9cf4
refactor: rename FixedArgs => FixedParams
2022-10-09 12:10:11 -07:00
Leonardo de Moura
37a61568bc
feat: improve fixed parameter analyzer
2022-10-09 12:10:11 -07:00
Mario Carneiro
d4219c9d70
fix: List.Mem should have two parameters
2022-10-09 05:46:52 -07:00
Leonardo de Moura
5ef9a2ac7d
chore: update stage0
2022-10-08 19:53:58 -07:00
Leonardo de Moura
8e6cb25cbf
chore: temporarily disable eager lambda lifting
...
We need a better heuristic for deciding which functions in instances
should be eagerly lambda lifted. Otherwise, it will have to keep
chasing which instances we have to annotate with `[inline]`.
2022-10-08 19:51:19 -07:00
Leonardo de Moura
1148392f45
fix: Closure.lean
2022-10-08 19:51:19 -07:00
Leonardo de Moura
2efb1dbdf1
doc: lambda lifting
2022-10-08 19:51:19 -07:00
Leonardo de Moura
b7d4fd03a3
feat: eager lambda lifting
2022-10-08 19:51:19 -07:00
Leonardo de Moura
878e72b2f9
feat: lambda lifting
2022-10-08 19:51:19 -07:00
Leonardo de Moura
3c90b2fd3e
feat: add Decl.save
2022-10-08 19:51:19 -07:00
Sebastian Ullrich
48d3bbdde9
fix: explicit drive letter normalization in FilePath <-> URI conversions
2022-10-08 10:12:11 -07:00
Sebastian Ullrich
8d34cc15cf
fix: path normalization should not case-normalize entire path
2022-10-08 10:12:11 -07:00
Leonardo de Moura
56002e1b33
fix: fixes #1707
2022-10-08 07:58:56 -07:00
Leonardo de Moura
7874c03c27
chore: style
2022-10-08 07:49:27 -07:00
Leonardo de Moura
6bc4144409
fix: fixes #1549
2022-10-08 07:41:49 -07:00
Leonardo de Moura
e3ec468e3b
fix: fixes #1650
2022-10-07 19:00:23 -07:00
Leonardo de Moura
cf2ea445fe
fix: fixes #1681
2022-10-07 18:36:25 -07:00
Leonardo de Moura
79683c4bf6
chore: missing imports
2022-10-07 18:11:19 -07:00
Chris Lovett
3eeb064d83
fix: Clear Diagnostics when file is closed ( #1591 )
2022-10-07 17:28:15 -07:00
Leonardo de Moura
45974229d2
feat: reactivate extendJoinPointContext at mono phase
...
closes #1686
cc @hargoniX
2022-10-07 16:27:44 -07:00
Leonardo de Moura
15ad5254a1
chore: update stage0
2022-10-07 16:08:14 -07:00
Leonardo de Moura
9eb641e7da
feat: reuse specialized functions between different compilation units
2022-10-07 16:07:17 -07:00
Leonardo de Moura
f11e44910b
refactor: add Closure.lean
...
This module will also be used by the lambda lifter.
2022-10-07 15:56:10 -07:00
Leonardo de Moura
e7a36f32f1
refactor: add MonadScope class
...
We are going to use it to implement the lambda lifting pass too.
2022-10-07 14:59:59 -07:00
Leonardo de Moura
1b8e310ada
fix: fixes #1674
2022-10-07 13:33:41 -07:00
Leonardo de Moura
5c74bc1324
fix: fixes #1705
2022-10-07 13:11:26 -07:00
David Renshaw
5c7cf76575
doc: fix link to initialization section in ffi section
...
The current link goes to doc/dev#init, where there is nothing
about initialization. This PR fixes the link so that it points
to the initialization section lower down on the ffi page.
2022-10-07 19:11:59 +02:00
David Renshaw
4fa1a496b3
doc: Lean USize maps to C++ size_t, not usize_t
...
usize_t is not a standard C++ type.
See src/include/lean/lean.h for translations between USize and size_t.
2022-10-07 17:51:58 +02:00
E.W.Ayers
d22916fdcd
feat: improve expression diff
...
Added recursion cases to the diff algorithm for projections and mdata.
Previously, these would be rendered as the entire expression being different but we can do better
by checking if the recursion args are the same.
With mdata, these are entirely ignored by the diff algorithm.
2022-10-07 12:45:00 +02:00
Leonardo de Moura
5b1aac7b8f
fix: avoid nontermination on non-utf8 input
...
This is not a perfect solution, but ensures the non-termination does
not happen. The changes also make it easier to prove termination in
the future.
TODO: validate UTF8 input?
closes #1690
2022-10-06 17:45:21 -07:00
Sebastian Ullrich
d417c0238a
doc: normalize Init.Conv docs
2022-10-06 17:27:33 -07:00
Sebastian Ullrich
5b7e6661f9
chore: more RBMap cleanup
2022-10-06 17:26:43 -07:00
Sebastian Ullrich
6f4cea6dba
feat: add rbmap_fbip benchmark
2022-10-06 17:26:43 -07:00
Leonardo de Moura
7dfc51ce7c
chore: update stage0
2022-10-06 17:22:08 -07:00
Mario Carneiro
391aef5cd7
feat: automatic extension names
2022-10-06 17:19:30 -07:00
Ed Ayers
7fabdf95d6
refactor: diffTag → diffStatus
...
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2022-10-06 13:06:31 -07:00
E.W.Ayers
506abff532
fix: replace highlight with diffTag
2022-10-06 13:06:31 -07:00
E.W.Ayers
7c8fcb3233
fix: rm instance TypeName String because it is unused
2022-10-06 11:00:43 -07:00
E.W.Ayers
7f8c45b6f3
feat: make CustomInfo use Dynamic instead of Json
...
A little easier to use than the previous CustomInfo.
2022-10-06 11:00:43 -07:00
Leonardo de Moura
9996686690
feat: display mono phase code
2022-10-06 07:48:59 -07:00
Leonardo de Moura
150022fe13
chore: update stage0
2022-10-06 07:42:24 -07:00
Leonardo de Moura
0577993d61
chore: fix tests
2022-10-06 07:41:48 -07:00
Leonardo de Moura
87caf6d38a
fix: bug at toMonoType
2022-10-06 07:41:36 -07:00
Leonardo de Moura
e99ffefeda
chore: update stage0
2022-10-06 07:27:47 -07:00
Leonardo de Moura
acd2836cb5
feat: add saveMono pass to normalize mono phase free variable ids
...
Motivation: control .olean size
2022-10-06 07:24:30 -07:00
Leonardo de Moura
d9fcfd71d9
fix: missing test
2022-10-06 07:18:27 -07:00
Leonardo de Moura
73ee2d92aa
fix: constructor parameter validation for mono phase
2022-10-06 06:57:06 -07:00
Leonardo de Moura
faa30bccb2
feat: activate toMono compiler pass
...
It increases the .olean sizes.
2022-10-06 06:23:08 -07:00
Leonardo de Moura
80bf4f3334
fix: erase type (and type former) parameters occurrences at toMono
2022-10-06 06:23:08 -07:00
Leonardo de Moura
23182882d4
fix: erase universe levels at toMono
2022-10-06 06:23:08 -07:00
Leonardo de Moura
d409ad75b5
fix: bug at trivialStructToMono
2022-10-06 06:23:08 -07:00
Leonardo de Moura
08bfb7060d
feat: add support for trivial structures, Decidable, and constructors at toMono
2022-10-06 05:33:13 -07:00
Leonardo de Moura
a0894dedbb
feat: add phaseOut field to Pass
...
We need it for passes that move the code from one phase to another.
See `toMono` pass.
cc @hargoniX
2022-10-06 03:29:21 -07:00
Leonardo de Moura
b172ba8a34
feat: add toMono pass
...
It has to activate by default yet.
2022-10-05 10:39:41 -07:00
Leonardo de Moura
254e28bd99
chore: update stage0
2022-10-05 10:33:51 -07:00
Leonardo de Moura
e64e877e8f
feat: add Decl.toMono skeleton
2022-10-05 10:33:01 -07:00
Leonardo de Moura
9f76da2b7f
feat: add env extension for the mono phase
2022-10-05 10:31:52 -07:00
Leonardo de Moura
c6b3ebdd85
feat: detect trivial structures and add extension for storing mono phase types
2022-10-05 08:55:44 -07:00
Leonardo de Moura
00f6f83379
refactor: add BaseTypes.lean
2022-10-05 07:27:39 -07:00
Leonardo de Moura
ee59048bfb
chore: remove dead declaration
...
We have merged `lcErased` and `lcAny` in the new code generator.
2022-10-05 05:17:31 -07:00
Leonardo de Moura
6288181656
chore: fix test
2022-10-05 05:01:42 -07:00
Leonardo de Moura
efc42efe49
chore: update stage0
2022-10-05 04:47:13 -07:00
Leonardo de Moura
913ca41129
refactor: merge lcAny and lcErased
...
`lcErased` is a superset of `lcAny` anyway, and we didn't find ways of
using the distinction to generate better code.
2022-10-05 04:46:52 -07:00
Leonardo de Moura
ebdbdc1043
chore: temporarily disable extendJoinPointContext
...
see #1686
2022-10-04 17:41:41 -07:00
Leonardo de Moura
f63734cba4
chore: unexpanders for Name.mkStr* and Array.mkArray*
...
closes #1675
2022-10-04 17:18:36 -07:00
Leonardo de Moura
e9d5dfc689
chore: closes #1683
2022-10-04 16:46:08 -07:00
Mario Carneiro
d56708c0e5
fix: handle multi namespace/section in foldingRange and documentSymbol ( #1680 )
2022-10-04 17:37:52 +00:00
Leonardo de Moura
ee603ab741
feat: sort refine new goals using the order they were created
...
Potential problem: if elaboration of subterms is delayed the order the new metavariables are created may not match the order they
appear in the `.lean` file. We should tell users to prefer tagged goals.
closes #1682
2022-10-04 06:54:14 -07:00
Leonardo de Moura
adeab12beb
feat: add support for Iff.rec and Iff.casesOn to new code generator
...
closes #1684
2022-10-04 06:32:49 -07:00
Sebastian Ullrich
8ed831101e
chore: benchmark new compiler
2022-10-04 05:03:54 -07:00
Leonardo de Moura
c4db085ac1
fix: missing dependency check at simpJpCases?
2022-10-03 19:39:10 -07:00
Leonardo de Moura
b3aff375f0
feat: add CodeDecl.dependsOn
2022-10-03 19:36:26 -07:00
Leonardo de Moura
da4812659c
feat: use DiscrM to implement simpJpCases?
2022-10-03 19:13:31 -07:00
Leonardo de Moura
ddbf4c01eb
refactor: add DiscrM.lean
2022-10-03 19:00:30 -07:00
Leonardo de Moura
f0be5439e6
feat: JpCases for join points with multiple parameters
2022-10-03 18:35:16 -07:00
Mario Carneiro
12deab6516
feat: RBMap simplifications
2022-10-03 17:08:55 -07:00
Henrik Böving
eaab29712d
feat: extend join point context pass
2022-10-03 17:03:22 -07:00
Leonardo de Moura
fed7ff27e8
fix: issue reported on Zulip
...
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Annoying.20LCNF.20errors/near/302056742
2022-10-03 09:51:32 -07:00
Leonardo de Moura
dc6f635f41
refactor: add LCNF/Internalize.lean
2022-10-03 09:18:11 -07:00
Leonardo de Moura
e44fd19074
doc: Semantic highlighting
...
Many thanks for Patrick Massot for providing the new section at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/semantic.20highlighting.20doc/near/294953547
2022-10-02 08:37:15 -07:00
Leonardo de Moura
7857995df4
fix: fixes #1673
2022-10-02 08:23:14 -07:00
Leonardo de Moura
31d59e337b
fix: LCNF any type issue
...
This fixes an issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Annoying.20LCNF.20errors/near/301935406
2022-10-02 08:09:13 -07:00
Leonardo de Moura
190a1331bd
feat: add toMonoType
2022-10-01 20:44:31 -07:00
Leonardo de Moura
1ce9e30403
refactor: extension for storing LCNF types for declarations that do not have code associated with them
2022-10-01 20:44:31 -07:00
Leonardo de Moura
d50253d57a
chore: comment indentation issue
2022-10-01 20:44:31 -07:00
pcpthm
96b49261e6
fix: derive Repr missing a comma
2022-10-01 07:17:57 -07:00
Leonardo de Moura
9fdcfebb97
chore: update stage0
2022-09-30 20:52:31 -07:00
Leonardo de Moura
15909f209f
feat: inline small declarations not tagged with [noinline]
2022-09-30 20:51:37 -07:00
Leonardo de Moura
72506c81ea
chore: trace.Compiler.simp.inline
2022-09-30 20:21:34 -07:00
Leonardo de Moura
18b5ff9e78
chore: propagate recursive flag during code specialization
2022-09-30 20:01:18 -07:00
Leonardo de Moura
9fda3d973d
feat: add trace option trace.Compiler.saveBase
2022-09-30 19:50:33 -07:00
Leonardo de Moura
0e18b4318c
feat: online inline recursive functions if they are tagged with [inlineIfReduce]
2022-09-30 19:39:12 -07:00
Leonardo de Moura
4c2c6931f4
feat: add flag at LCNF Decl indicating whether the original Lean declaration was declared using partial or unsafe
2022-09-30 19:28:05 -07:00
Mario Carneiro
7a6d41ad58
doc: add addTermInfo docstring
2022-09-30 15:18:06 -07:00
Mario Carneiro
9aa57f9959
fix: .ident hover in patterns
2022-09-30 15:18:06 -07:00
Leonardo de Moura
c7fad1815c
chore: update release notes
2022-09-30 09:31:03 -07:00
Leonardo de Moura
955a251bfc
chore: update stage0
2022-09-29 18:57:43 -07:00
Leonardo de Moura
fb1a603e60
feat: add another CSE pass before saveBase
2022-09-29 18:56:20 -07:00
Leonardo de Moura
5be1628cdd
chore: update stage0
2022-09-29 17:40:59 -07:00
Leonardo de Moura
589701c540
chore: update stage0
2022-09-29 17:37:42 -07:00
Leonardo de Moura
5746338c15
fix: mark Lean.Name.mkStr* functions as [reducible]
...
This is needed for type checking `TSyntax`.
2022-09-29 17:36:30 -07:00
Leonardo de Moura
676d2b1462
feat: new ToExpr Name
...
`Quote Name` was already using the optimized `Syntax.mkNameLit`
2022-09-29 17:27:45 -07:00
Leonardo de Moura
595734b936
chore: remove workaround
...
It is now implemented at `Quote (Array _)`
2022-09-29 17:12:48 -07:00
Leonardo de Moura
764170f966
chore: update stage0
2022-09-29 17:00:07 -07:00
Leonardo de Moura
2209a1983b
chore: update stage0
2022-09-29 16:57:05 -07:00
Leonardo de Moura
126da8185d
feat: more compact quotations
...
Trying to control the generated code size.
2022-09-29 16:56:43 -07:00
Leonardo de Moura
b4454902c1
feat: LCNF Code.forEachExpr and Decl.forEachExpr
2022-09-29 15:50:49 -07:00
Leonardo de Moura
13edf0e9cc
feat: add forEachModuleDecl and forEachMainModuleDecl
2022-09-29 14:16:10 -07:00
Leonardo de Moura
ded7216a12
chore: update stage0
2022-09-29 12:49:45 -07:00
Leonardo de Moura
bb1e94de82
feat: normalize free variable ids before saving LCNF code in the environment
2022-09-29 12:48:21 -07:00
Leonardo de Moura
8cca2ea24e
fix: refresh LCNF parameter binder names
2022-09-29 12:46:53 -07:00
Leonardo de Moura
e5494e7a49
fix: eta-expansion at compatibleTypes
...
It fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Annoying.20LCNF.20errors/near/301424293
2022-09-29 11:02:06 -07:00
Mario Carneiro
1463c9c440
doc: add comment about pattern LHS info nesting
2022-09-29 19:07:18 +02:00
Mario Carneiro
66040a9803
feat: clearer info tree formatting
2022-09-29 19:07:18 +02:00
Mario Carneiro
7a6f7cb0ac
fix: induction info tree nesting
2022-09-29 19:07:18 +02:00
Mario Carneiro
73f44ccb7b
feat: hover for cases/induction case names
2022-09-29 19:07:18 +02:00
Sebastian Ullrich
9e6814b09e
doc: fix inline docs
2022-09-29 09:36:28 +02:00
Leonardo de Moura
cfc19acd83
chore: update stage0
2022-09-28 22:02:38 -07:00
Leonardo de Moura
5c925f9345
feat: add functions to create small arrays and use them in the constant folder
...
It reduces the code generated for functions using a bunch
of quotations. For example, the size of
`Lean.Elab.Term.Do.ToTerm.matchNestedTermResult` went from 2348 to 1507
2022-09-28 22:00:50 -07:00
Leonardo de Moura
f8f70d5e63
chore: update stage0
2022-09-28 21:15:22 -07:00
Leonardo de Moura
6bc6522d86
feat: constructor => discriminant optimization
2022-09-28 21:14:19 -07:00
Leonardo de Moura
3dc6c859eb
chore: update stage0
2022-09-28 19:21:11 -07:00
Leonardo de Moura
73ebaf8499
feat: improve visitLambda at toLCNF
2022-09-28 19:17:28 -07:00
Sebastian Ullrich
71e647049f
refactor: lexOrd should not be an instance
2022-09-28 15:57:01 -07:00
Sebastian Ullrich
d0a002ffff
fix: prefer longer parse even if unsuccessful
2022-09-28 15:57:01 -07:00
Leonardo de Moura
94c2ec38d5
feat: implement cast TODO
...
fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Annoying.20LCNF.20errors/near/301269857
2022-09-28 15:40:53 -07:00
Leonardo de Moura
970331de05
chore: avoid a.getAppFn.isAnyType idiom
2022-09-28 15:34:09 -07:00
Mario Carneiro
1c992fde37
chore: add some tests
2022-09-28 14:24:44 -07:00
Mario Carneiro
db110f5dfe
fix: preserve tags in simp conv
2022-09-28 14:24:44 -07:00
Mario Carneiro
2a748d3035
fix: conv case => should close the goal conv-style
2022-09-28 14:24:44 -07:00
Mario Carneiro
6f8e861158
fix: case names in congr conv
2022-09-28 14:24:44 -07:00
Mario Carneiro
b6a58d13e1
fix: LHS goals should be pre-whnf'd
2022-09-28 14:24:44 -07:00
Mario Carneiro
b8ed329a5d
feat: add dsimp conv <- mathlib4
...
Co-authored-by: Moritz Doll <doll@uni-bremen.de >
2022-09-28 14:24:44 -07:00
Mario Carneiro
a09934c693
feat: more conv goal structuring tactics
2022-09-28 14:24:44 -07:00
tydeu
37811b2104
chore: update Lean version
2022-09-28 16:15:46 -04:00
tydeu
4811ba7850
Merge remote-tracking branch 'digama0/std_ns'
2022-09-28 16:03:27 -04:00
Ed Ayers
10971a413a
feat: fromJson? derivations now say where a parsing error occurred ( #1656 )
2022-09-28 09:15:26 +00:00
Ed Ayers
22bb798995
feat: datatypes for LSP code actions ( #1654 )
2022-09-28 09:07:39 +00:00
Leonardo de Moura
fd5f3a5bad
feat: track recursively inlining
...
closes #1657
see #1646
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/inline.20codegen.20crash/near/301099703
2022-09-27 16:26:49 -07:00
Leonardo de Moura
002c7d2f22
feat: configuration options for the code generator
2022-09-27 16:26:49 -07:00
Leonardo de Moura
135790f41a
fix: missing eraseCode at inlineProjInst?
...
Fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/LCNF.20local.20context.20contains.20unused.20local.20variable.20declaratio/near/301102923
2022-09-27 16:26:49 -07:00
Leonardo de Moura
65c307a7b7
feat: add environment extension for constant folder
...
TODO: add command/attribute for conveniently installing folders
2022-09-27 16:26:49 -07:00
Sebastian Ullrich
a03749cbe4
fix: findReferences should find only original syntax
2022-09-27 22:09:54 +02:00
Mario Carneiro
d843e2a418
chore: add docs and test
2022-09-27 22:09:54 +02:00
Mario Carneiro
2270e8cd53
fix: ignore unused anonymous have variables
2022-09-27 22:09:54 +02:00
Mario Carneiro
6bf01ebd30
feat: use have token span for implicit this
2022-09-27 22:09:54 +02:00
Mario Carneiro
969eefe79b
fix: let _ := should not introduce a variable called "_"
2022-09-27 22:09:54 +02:00
Mario Carneiro
280d8c9c9b
feat: add (canonical := true) option in Syntax
2022-09-27 22:09:54 +02:00
Ed Ayers
64e7f25ffe
doc: apply suggestions from code review
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2022-09-27 11:37:49 -07:00
E.W.Ayers
8e085fb637
doc: some documentation for Message.lean
2022-09-27 11:37:49 -07:00
Patrick Massot
f0c8e6fa2d
doc: add docstrings in PersistentExtension
...
Add docstring to functions with non-obvious persistence properties. See the discussion at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/HashMap.20extension/near/300784691
2022-09-27 10:34:09 -07:00
Leonardo de Moura
f067382f52
chore: remove old exports
2022-09-27 07:44:38 -07:00
Leonardo de Moura
8596e4af88
fix: mark code as simplified
2022-09-26 21:27:45 -07:00
Leonardo de Moura
193e3fd184
feat: add basic String folding
2022-09-26 21:23:08 -07:00
Leonardo de Moura
e6f5b3758c
feat: precompute folders
2022-09-26 21:10:38 -07:00
Leonardo de Moura
1e75001405
feat: preserve user provided names at LCNF Simp
...
It helps preserving let-declaration names in pure code, but it is not
very useful for monadic let-decls (e.g., `let x <- act`). The binder
names are often lost we eliminating the abstraction layers.
2022-09-26 21:04:13 -07:00
Leonardo de Moura
24e584cf00
feat: add Renaming.lean
2022-09-26 21:04:13 -07:00
Henrik Böving
2958b8a7f5
feat: basic constant folder
...
supports:
- arithmetic operations:
- folding full constants
- folding neutral elements
- folding annihilators
- List.toArray
2022-09-26 21:03:47 -07:00
Leonardo de Moura
3abfa1f981
chore: update stage0
2022-09-26 08:17:02 -07:00
Leonardo de Moura
73d5e12ac5
fix: baseExt must not use SimplePersistentEnvExtension
...
We invoke `Decl.saveBase` more than once when we update a declaration.
2022-09-26 08:15:47 -07:00
Leonardo de Moura
37513595b9
chore: update stage0
2022-09-26 07:49:39 -07:00
Leonardo de Moura
ba619be393
fix: apply macroInline again after inlineMatchers
2022-09-26 07:31:27 -07:00
Leonardo de Moura
837ce4374c
feat: use reduceJpArity after successful simpJpCases?
2022-09-26 07:25:29 -07:00
Leonardo de Moura
35ca2b203c
refactor: split Simp.lean
2022-09-26 07:04:20 -07:00
Mario Carneiro
85119ba9d1
chore: move Std.* data structures to Lean.*
2022-09-26 05:46:04 -07:00
Leonardo de Moura
fd1ae3118c
feat: replace isCasesOnCases? with simpJpCases?
...
It addresses the code explosion issue with the old optimization.
For example, the resulting size for `Lean.Json.Parser.escapedChar`
went from 31593 to 361.
2022-09-25 20:57:24 -07:00
Leonardo de Moura
bbac49e925
feat: add collectJpCasesInfo
...
Collect statistics for implementing new optimization that will replace `isCasesOnCases?`
2022-09-25 20:57:24 -07:00
Mario Carneiro
9b9998f5c8
feat: pattern (occs := ...) conv
2022-09-25 19:52:56 -07:00
Leonardo de Moura
dadfe84c15
doc: update const2ModIdx docstring
2022-09-25 14:06:07 -07:00
Leonardo de Moura
236885e72e
chore: remove Stage1
2022-09-25 13:17:50 -07:00
Leonardo de Moura
b558a59944
chore: update stage0
2022-09-25 07:13:00 -07:00
Leonardo de Moura
91e27668ae
doc: release notes
2022-09-25 07:06:50 -07:00
Mario Carneiro
5644bd7a3f
feat: show decl module in hover
2022-09-25 06:43:48 -07:00
Mario Carneiro
121b18f40a
chore: add test
2022-09-25 06:42:20 -07:00
Mario Carneiro
fa13d7321f
feat: generalize e = x at h
2022-09-25 06:42:20 -07:00
Mario Carneiro
b287658dc3
chore: add test with <->, discharger, contextual, conditional
2022-09-25 06:40:56 -07:00
Mario Carneiro
47930c6fd1
fix: fix tests
2022-09-25 06:40:56 -07:00
Mario Carneiro
84497c1d09
feat: sort simp lemmas by application order
2022-09-25 06:40:56 -07:00
Mario Carneiro
afca560bda
chore: revert builtin flag on Origin
2022-09-25 06:40:56 -07:00
Mario Carneiro
86b9af549f
chore: update stage0
2022-09-25 06:40:56 -07:00
Mario Carneiro
b739186e98
feat: use a structured type for simp theorem Origin
2022-09-25 06:40:56 -07:00
Mario Carneiro
97bcc7fd7c
feat: add ForM -> ForIn adapter
2022-09-25 06:40:56 -07:00
Mario Carneiro
9550db0e3b
chore: remove fvarIdToLemmaId
2022-09-25 06:40:56 -07:00
Mario Carneiro
606328aceb
feat: improve simp theorem tracing
2022-09-25 06:40:56 -07:00
Mario Carneiro
c3ce32a4e9
chore: update stage0
2022-09-25 06:40:56 -07:00
Mario Carneiro
9a9f3263d4
feat: add tactic.simp.trace option
2022-09-25 06:40:56 -07:00
Mario Carneiro
7dc0e1aa7d
fix: tweak formatter spacing for tactics
2022-09-25 06:40:56 -07:00
Mario Carneiro
0961561d4e
feat: track simp lemmas through the core tactics
2022-09-25 06:40:56 -07:00
Mario Carneiro
687f1c2271
refactor: make simp lemma names mandatory
2022-09-25 06:40:56 -07:00
Leonardo de Moura
afb457ca2a
feat: add forEachDecl for LCNF
2022-09-24 20:18:27 -07:00
Leonardo de Moura
cf2b6b80bb
chore: update stage0
2022-09-24 20:01:15 -07:00
Leonardo de Moura
f9abcae4e4
chore: simplify tactic macro
...
The `[inlineIfReduce]` at `List.toArrayAux` is currently very
expensive, and this example produces a deep recursion when inlining
the `List.toArrayAux` applications.
2022-09-24 19:53:04 -07:00
Leonardo de Moura
ce12ecfe13
fix: free variable collision at LCNF/Specialize.lean
2022-09-24 18:51:32 -07:00
Leonardo de Moura
5969dc2694
feat: beta-reduce at LCNF normExpr
2022-09-24 18:26:34 -07:00
Leonardo de Moura
f7a1429cfd
feat: improve ppDecl'
2022-09-24 18:09:43 -07:00
Leonardo de Moura
8299d24cab
chore: update stage0
2022-09-24 15:22:30 -07:00
Leonardo de Moura
871644fe8b
chore: fix tests
2022-09-24 15:20:44 -07:00
Leonardo de Moura
cd6508ef5f
chore: update stage0
2022-09-24 15:02:56 -07:00
Leonardo de Moura
c858aa3088
feat: replace getStage1Decl? with new getDecl?
2022-09-24 15:00:19 -07:00
Leonardo de Moura
f9ba61fc72
chore: update stage0
2022-09-24 14:33:27 -07:00
Leonardo de Moura
ce90e98648
feat: activate new compiler first phase
2022-09-24 14:20:21 -07:00
Leonardo de Moura
33fdde9b22
fix: LCNF compatibleTypes
...
Missing rules:
`⊤ a` is compatible with anything.
`◾ a` is compatible with anything.
2022-09-24 14:20:21 -07:00
Leonardo de Moura
7ca7139fe8
fix: incorrect [inline] annotation
2022-09-24 14:20:21 -07:00
Leonardo de Moura
e51b078015
fix: incorrect annotations
2022-09-24 14:20:21 -07:00
Leonardo de Moura
6343b97acb
feat: display inlining stack when maximum recursion depth has been reached
2022-09-24 14:20:21 -07:00
Leonardo de Moura
7d583f9543
fix: convert _unsafe_rec to original name
2022-09-24 08:19:41 -07:00
Leonardo de Moura
b88bd98afa
fix: unreach case for Code.bind
2022-09-24 08:13:17 -07:00
Leonardo de Moura
947811cab8
fix: zero exit points != one exit point
2022-09-24 08:13:17 -07:00
Sebastian Ullrich
3288f437c2
refactor: further simplify RBMap balancing
2022-09-24 14:16:48 +02:00
Sebastian Ullrich
95f2e4e2e0
refactor: cleanup, simplify RBMap balances
2022-09-24 14:16:48 +02:00
Sebastian Ullrich
381a643fd0
chore: make rbmap.hs more similar to other implementations
2022-09-24 14:16:48 +02:00
Sebastian Ullrich
77e42744dd
chore: modernize rbmap benchmarks a bit
2022-09-24 14:16:48 +02:00
Sebastian Ullrich
9f29967fb0
chore: add rbmap.library benchmark to bench suite
2022-09-24 12:35:08 +02:00
Ed Ayers
2a6697e077
feat: goal-diffs ( #1610 )
2022-09-24 11:46:11 +02:00
Mario Carneiro
ebdbc77631
chore: move Std -> Lean namespace
2022-09-24 00:08:26 -04:00
Leonardo de Moura
85c468c853
fix: remove internal name hack at [specialize] and [inline] attributes
2022-09-23 20:25:16 -07:00
Leonardo de Moura
011521013d
feat: use phase at inferConstType, save specialization
2022-09-23 16:45:04 -07:00
Leonardo de Moura
0c82e8bd0d
feat: make sure base phase contains an entry for each declaration being compiled at `init
2022-09-23 16:31:38 -07:00
Leonardo de Moura
2be8cb93ac
feat: store phase at CompilerM context
2022-09-23 16:30:51 -07:00
Leonardo de Moura
c333581689
fix: functions occurring as arguments of other functions are not inlined
2022-09-23 14:43:06 -07:00
Leonardo de Moura
e4f0f4b794
fix: shouldGenerateCode fix for axiom
2022-09-23 14:25:48 -07:00
Leonardo de Moura
1e846ae280
test: for LCNF
2022-09-23 14:02:34 -07:00
Leonardo de Moura
5322aa79f6
fix: apply findJoinPoints before pullFunDecls
...
`pullFunDecls` affects the effectiveness of `findJoinPoints`
2022-09-23 14:00:24 -07:00
Leonardo de Moura
004822aba4
fix: mixing Lean and LCNF types at toLCNF
2022-09-23 13:56:31 -07:00
Leonardo de Moura
609d241ad4
fix: improve updateFunDeclInfo precision
2022-09-23 13:56:14 -07:00
Leonardo de Moura
0df23b6043
chore: update stage0
2022-09-23 08:18:26 -07:00
Leonardo de Moura
8cf225e9ce
fix: PassInstaller staging issue
...
The builtin pass installer cannot be installed using `[cpass]` because
it will not be activated until we process `Passes.lean`
2022-09-23 08:17:58 -07:00
Leonardo de Moura
c165317b28
feat: add ImportM.runCoreM
2022-09-23 07:52:13 -07:00
Leonardo de Moura
e53ac503da
refactor: move PassInstaller to CoreM
2022-09-23 07:22:54 -07:00
Leonardo de Moura
aa17641f18
chore: LCNF imports
2022-09-23 07:05:57 -07:00
Leonardo de Moura
4323205185
fix: support user-defined empty inductives at toLCNF
2022-09-23 05:50:02 -07:00
Leonardo de Moura
0b4590bd69
test: add erased.lean
2022-09-23 05:29:42 -07:00
Leonardo de Moura
eed569153b
fix: dependent field issue
2022-09-22 20:38:42 -07:00
Leonardo de Moura
5db452cfe7
doc: add note at LCNF internalizer
...
We should also new tests that expose the problem.
2022-09-22 20:19:01 -07:00
Leonardo de Moura
412a05d0d6
fix: ensure cases field parameters do not occur in types
2022-09-22 20:15:39 -07:00
Leonardo de Moura
a7a6103862
feat: add scoped notation for LCNF pretty printer
2022-09-22 17:07:34 -07:00
Leonardo de Moura
c0ac2138f7
fix: ensure inferForallType at LCNF handles universes like the kernel and MetaM
2022-09-22 16:38:16 -07:00
Leonardo de Moura
8c84531330
chore: fix test
2022-09-22 16:10:12 -07:00
Leonardo de Moura
1437b9cd90
fix: non-termination when eta-expanding Eq.ndrec at toLCNF
2022-09-22 16:04:19 -07:00
Leonardo de Moura
f721e44718
fix: simplify compatibleTypes
...
Add note about "erasure confusion" in LCNF.
2022-09-22 15:15:32 -07:00
Leonardo de Moura
955d3d4ff5
fix: missing case at isErasedCompatible
2022-09-22 14:16:29 -07:00
Leonardo de Moura
096a6fd4fb
fix: use eta at compatibleTypes
2022-09-22 13:57:14 -07:00
Leonardo de Moura
1f8d8df3ac
fix: compatibleTypes
2022-09-22 12:52:39 -07:00
Mario Carneiro
2ac687b22b
feat: if _ : cond then t else e syntax (part 2)
2022-09-22 11:01:08 -07:00
Mario Carneiro
b799271da6
chore: update stage0
2022-09-22 11:01:08 -07:00
Mario Carneiro
b8cf796941
feat: if _ : cond then t else e syntax
2022-09-22 11:01:08 -07:00
Leonardo de Moura
708a777d74
test: add more LCNF tests
2022-09-21 21:12:17 -07:00
Leonardo de Moura
a2bcb3b73e
fix: erase propositon formers, add isErasedCompatible, remove approx. from compatibleTypes
2022-09-21 20:47:02 -07:00
Leonardo de Moura
79c8a3879b
fix: LCNF compatibleTypes function
2022-09-21 19:14:25 -07:00
Leonardo de Moura
917f87fee4
fix: forward declaration type
2022-09-21 18:40:38 -07:00
Leonardo de Moura
05f0a6c423
fix: skip declarations that do not have a value
2022-09-21 18:40:20 -07:00
Leonardo de Moura
574c75081f
chore: update stage0
...
Make sure we have the new environment extension at stage0
2022-09-21 18:19:23 -07:00
Leonardo de Moura
f362de995b
chore: fix tests
2022-09-21 18:17:32 -07:00
Leonardo de Moura
a5abe864f3
chore: prepare to activate new code generator
2022-09-21 18:09:19 -07:00
Leonardo de Moura
9080701126
refactor: move compileDecl, compileDecls, and addDecl to CoreM
...
The new code generator entry point is in `CoreM`.
2022-09-21 18:09:19 -07:00
Leonardo de Moura
c52203ff57
feat: add baseExt environment extension for storing code generator results
2022-09-21 18:09:19 -07:00
Leonardo de Moura
f9898a1d45
chore: cleanup
2022-09-21 18:09:19 -07:00
Mario Carneiro
9faca046d6
fix: fix test
2022-09-21 18:04:31 -07:00
Mario Carneiro
3f229d5437
fix: add colGt
2022-09-21 18:04:31 -07:00
Mario Carneiro
ef0736c303
feat: multiple delta (part 2)
2022-09-21 18:04:31 -07:00
Mario Carneiro
3067121af7
chore: update stage0
2022-09-21 18:04:31 -07:00
Mario Carneiro
90353d7fd7
feat: multiple delta, delta conv, unfold
2022-09-21 18:04:31 -07:00
Leonardo de Moura
1fb112f84b
test: Environment.addExtraName
2022-09-21 15:03:11 -07:00
Sebastian Ullrich
3c6c1c25e4
chore: simplify elan CI setup
2022-09-21 16:36:05 -04:00
Leonardo de Moura
bdad9aaa99
chore: update stage0
...
Previous commit affect `.olean` format.
2022-09-21 10:59:47 -07:00
Leonardo de Moura
8987de75c1
feat: add Environment.addExtraName
2022-09-21 10:57:39 -07:00
Yuri de Wit
c65a206d6a
chore: reintroduced 'important' let paragraph
2022-09-21 07:36:25 -07:00
Yuri de Wit
64a0ec91fa
chore: few updates to Expr documentation
2022-09-21 07:36:25 -07:00
Mario Carneiro
b922483ebc
chore: remove getElem' delab
2022-09-21 06:21:00 -07:00
Mario Carneiro
20937c3a6c
fix: fix test
2022-09-21 06:21:00 -07:00
Mario Carneiro
2aa882a416
chore: remove getElem', use custom delab
2022-09-21 06:21:00 -07:00
Mario Carneiro
553be10b90
fix: getElem' should be an abbrev
2022-09-21 06:21:00 -07:00
Mario Carneiro
3e83e28e8f
feat: injections with names
2022-09-20 17:36:35 -07:00
Leonardo de Moura
727ee79f05
fix: exponential blowup at LCNF simp
2022-09-20 17:03:40 -07:00
Leonardo de Moura
a5ac950b54
chore: increase max recursion depth for compiler
2022-09-20 16:58:45 -07:00
Leonardo de Moura
990b031871
feat: add translator attribute to MonadFVarSubst class
...
See new comments.
2022-09-20 16:58:27 -07:00
Leonardo de Moura
111f6a319c
feat: add ppDecl'
...
It is useful for debugging purposes when we want to pretty print a
declaration before internalizing it.
2022-09-20 16:55:11 -07:00
Leonardo de Moura
17202d0882
fix: missing headBeta
2022-09-20 16:22:37 -07:00
Leonardo de Moura
631c216bab
fix: LCNF pretty printer missing parens
2022-09-20 15:51:32 -07:00
Matthias Hetzenberger
278c9bb0e4
fix: a grammatically incorrect sentence in monads/intro.md
2022-09-20 15:51:28 -07:00
tydeu
48688da4b1
chore: update Lean version
2022-09-20 18:34:50 -04:00
tydeu
e55589cc7f
Merge remote-tracking branch 'digama0/import_reduction'
2022-09-20 18:34:33 -04:00
Mario Carneiro
a74892a36b
feat: multiple case
2022-09-20 14:15:37 -07:00
Mario Carneiro
b71167c11e
chore: update stage0
2022-09-20 14:15:37 -07:00
Mario Carneiro
65a861da68
feat: multiple case (part 1)
2022-09-20 14:15:37 -07:00
Leonardo de Moura
772beeeb29
feat: add withAtLeastMaxRecDepth
2022-09-19 22:04:04 -07:00
Leonardo de Moura
4c19fdbb97
fix: normFVarImp bug
2022-09-19 21:41:18 -07:00
Leonardo de Moura
d132efd440
feat: polymorphic Code.bind
2022-09-19 21:41:18 -07:00
Mario Carneiro
356db4e1df
fix: simplify termination_by clause
2022-09-19 13:49:20 -07:00
Mario Carneiro
2f8d20a90d
fix: fix test
2022-09-19 13:49:20 -07:00
Mario Carneiro
bb23fc0c86
chore: extract termination lemma for reverse
2022-09-19 13:49:20 -07:00
Mario Carneiro
ed6a5bba88
chore: rename insertAt to insertAt!
2022-09-19 13:49:20 -07:00
Mario Carneiro
f8c6306469
feat: remove bounds checks in Array.{reverse, insertAt}
2022-09-19 13:49:20 -07:00
Leonardo de Moura
ad0f8d3258
chore: update stage0
2022-09-19 12:47:44 -07:00
Gabriel Ebner
27525f33fb
fix: changes due to requiring colEq
2022-09-19 12:44:43 -07:00
Gabriel Ebner
a351a4be70
feat: use colEq in sepByIndent
2022-09-19 12:44:43 -07:00
Gabriel Ebner
b1bef71d59
feat: colEq parser
2022-09-19 12:44:43 -07:00
Mario Carneiro
61df1e5073
feat: expose that panic α = default
2022-09-19 08:59:08 -07:00
Yuri de Wit
88fc24c58c
chore: fixed typos
2022-09-19 08:14:37 -07:00
Sebastian Ullrich
3ef1baae4a
doc: refine mdbook docs
2022-09-19 06:30:11 -07:00
Leonardo de Moura
800938065a
chore: update stage0
2022-09-18 17:10:58 -07:00
Gabriel Ebner
9113291e9e
fix: preserve separators in evalSepByIndentConv
2022-09-18 16:43:23 -07:00
Gabriel Ebner
3add955382
fix: preserve separators in evalSepByIndentTactic
2022-09-18 16:43:23 -07:00
Gabriel Ebner
ee9c9b1312
feat: skip final newline in sepByIndent format
2022-09-18 16:43:23 -07:00
Gabriel Ebner
0e01d855b0
chore: fix test
2022-09-18 16:43:23 -07:00
Gabriel Ebner
ca4dfa5627
chore: update stage0
2022-09-18 16:43:23 -07:00
Gabriel Ebner
193a18e4e3
Revert "hack: support group tactic for bootstrap"
2022-09-18 16:43:23 -07:00
Gabriel Ebner
2b5c1e397a
feat: use sepBy1Indent for conv blocks
2022-09-18 16:43:23 -07:00
Gabriel Ebner
7cc70fe375
chore: update stage0
2022-09-18 16:43:23 -07:00
Gabriel Ebner
74a75e75c8
hack: support group tactic for bootstrap
2022-09-18 16:43:23 -07:00
Gabriel Ebner
7356840cbc
feat: use sepBy1Indent for tactic blocks
2022-09-18 16:43:23 -07:00
Gabriel Ebner
9b8b7264f8
chore: prepare for bootstrap
2022-09-18 16:43:23 -07:00
Leonardo de Moura
b50a3c72e9
fix: missing headBetas
2022-09-18 15:52:19 -07:00
Leonardo de Moura
4df303900b
feat: apply specialize to specialized code recursively
2022-09-18 15:42:44 -07:00
Leonardo de Moura
70f615d074
fix: avoid "unknown constant" error message for auxiliary declarations
2022-09-18 15:39:58 -07:00
Leonardo de Moura
5fbe63cca4
fix: process remaining params
2022-09-18 15:29:41 -07:00
Leonardo de Moura
90b9b0b7e9
chore: move compiler tests to run folder
2022-09-18 15:08:52 -07:00
Leonardo de Moura
05145577fd
feat: cache specialization results
2022-09-18 14:53:18 -07:00
Leonardo de Moura
796e9e3bdd
feat: eta expand at specializeApp?
2022-09-18 13:21:55 -07:00
Leonardo de Moura
9dede6f632
feat: add mkSpecDecl
2022-09-17 17:30:57 -07:00
Leonardo de Moura
483234f30c
refactor: rename Internalize.M
2022-09-17 16:46:44 -07:00
Leonardo de Moura
27c504107e
feat: universe level parameter helper functions for the compiler
2022-09-17 16:29:44 -07:00
Leonardo de Moura
db6ee72aed
chore: typo
2022-09-17 09:55:46 -07:00
Leonardo de Moura
50fe9ceeaa
test: more tests for new compiler
2022-09-16 18:00:27 -07:00
Leonardo de Moura
3c6dee8048
fix: LCNF eta expansion bug at Simp.lean
2022-09-16 18:00:27 -07:00
E.W.Ayers
4b562438f8
doc: MetavarContext
2022-09-16 09:13:47 -07:00
E.W.Ayers
993115a937
feat: Kleisli operators
2022-09-16 05:49:56 -07:00
Elias Aebi
085f51ecb9
doc: fix Markdown code-blocks
2022-09-16 05:48:44 -07:00
Leonardo de Moura
abe1f7f6f9
feat: dependency collector for the code specializer
2022-09-15 19:55:37 -07:00
Leonardo de Moura
ef636f6ec5
chore: update stage0
2022-09-15 19:02:37 -07:00
Leonardo de Moura
b77ff79133
fix: put Lean.Server.FileWorker.WidgetRequests back
2022-09-15 19:02:12 -07:00
Leonardo de Moura
c16d4fb926
chore: fix test suite
2022-09-15 18:59:51 -07:00
Leonardo de Moura
d3b0b49c43
feat: improve elabBinRelCore
...
See new test and comments at `elaBinRelCore`
2022-09-15 15:17:57 -07:00
Mario Carneiro
eac410db4e
fix: fix tests
2022-09-15 14:02:38 -07:00
Mario Carneiro
c0812d0673
chore: reorder Elab.MutualDef and Elab.Deriving.Basic
2022-09-15 14:02:38 -07:00
Mario Carneiro
b092d986dc
chore: split Lean.Data.Name and NameMap
2022-09-15 14:02:38 -07:00
Mario Carneiro
6392c5b456
chore: import reductions
2022-09-15 14:02:38 -07:00
Yuri de Wit
bbc70c4cf0
fix: fixes #1599 by adding correct indentation
2022-09-15 13:11:51 -07:00
Alex J Best
f2abe87ddf
chore: fix a typo in def name getOptionDefaulValue
...
renamed to getOptionDefaultValue
2022-09-15 11:45:45 -07:00
Leonardo de Moura
10a56bf4a1
fix: fixes #1571
...
The previous implementation was using the following heuristic
```lean
-- heuristic: use non-dependent arrows only if possible for whole group to avoid
-- noisy mix like `(α : Type) → Type → (γ : Type) → ...`.
let dependent := curNames.any fun n => hasIdent n.getId stxBody
```
The result produced by this heuristic was **not** producing an
accidental name capture, but I agree
it was confusing to have `∀ (a : True), ∃ a, a = a : Prop` instead of
`True → ∃ a, a = a : Prop` since there is no dependency.
AFAICT, all examples affected by this commit have a better output now.
cc @digma0 @kha
2022-09-15 11:16:16 -07:00
Leonardo de Moura
4f1f20bc97
refactor: ToExprM
2022-09-15 07:42:11 -07:00
Leonardo de Moura
c1b7accd12
refactor: LCNF local context
...
The previous implementation had a few issues:
- Function (and join point) declarations were being inserted into two different hashmaps.
- `borrow` information was not available for parameters.
- No proper erase functions.
2022-09-14 19:25:16 -07:00
Mario Carneiro
032dc4bc8f
chore: move NameMap into a separate file
2022-09-14 21:32:25 -04:00
Leonardo de Moura
9e5a818de5
fix: bug at LCNF toDecl
2022-09-14 15:23:34 -07:00
Leonardo de Moura
00e269c93c
fix: throw error at ⟨..⟩ notation if constructor is private
2022-09-14 15:02:38 -07:00
Leonardo de Moura
75f166edcc
feat: add assertNoFun test
2022-09-14 13:59:09 -07:00
Leonardo de Moura
82bba1c63b
feat: add Code.forM
2022-09-14 13:58:57 -07:00
Leonardo de Moura
ef9127487a
fix: throw error at {..} notation if constructor is private
2022-09-14 12:05:53 -07:00
Juan Pablo Romero
0742fd6fc3
docs: fix typo in SeqRight docstring
2022-09-14 10:17:15 -07:00
Gabriel Ebner
ed9b5bcb92
fix: make all syntax accessors non-panicking
2022-09-14 10:17:00 -07:00
Mario Carneiro
f6b3890dc5
feat: tail-recursive List.{mapM, foldrM}
2022-09-14 08:31:18 -07:00
Gabriel Ebner
10ff2601c5
fix: term info for inductive ctors
2022-09-14 08:26:17 -07:00
Gabriel Ebner
f1b5fa53f0
chore: use new comment syntax
2022-09-14 08:26:17 -07:00
Gabriel Ebner
b0e059318f
chore: update stage0
2022-09-14 08:26:17 -07:00
Gabriel Ebner
e04cecc496
chore: prepare for bootstrap
2022-09-14 08:26:17 -07:00
Gabriel Ebner
59abb9a332
feat: move docstring before | in ctors
2022-09-14 08:26:17 -07:00
Gabriel Ebner
00793fcdd8
chore: remove old bootstrapping hack
2022-09-14 08:26:17 -07:00
Leonardo de Moura
fccb60fb69
feat: support for [inlineIfReduce] at new compiler
2022-09-13 18:23:42 -07:00
Leonardo de Moura
e8246e026d
fix: bug at compatibleTypes
...
Many thanks to @hargoniX
2022-09-13 15:58:06 -07:00
Leonardo de Moura
8f2ab82408
fix: bug at bindCases
...
Many thanks to @hargoniX
2022-09-13 15:36:46 -07:00
Gabriel Ebner
024a298eb7
chore: use new constructor docstring syntax
2022-09-13 19:11:13 +02:00
Leonardo de Moura
7535c12bc5
test: add frontend meeting examples to test suite
2022-09-13 09:08:38 -07:00
Gabriel Ebner
b4af14d44a
fix: deindent docstrings with empty lines
2022-09-13 07:16:12 -07:00
Mario Carneiro
a0fcb660c5
feat: allow multiple source + no expected type
2022-09-13 07:09:08 -07:00
Mario Carneiro
adc215dab9
feat: support {s with ..}
2022-09-13 07:09:08 -07:00
Gabriel Ebner
d67546e388
chore: add test
2022-09-13 06:19:40 -07:00
Gabriel Ebner
ca28b0462c
feat: show all missing fields in structure instance
2022-09-13 06:19:40 -07:00
Gabriel Ebner
54e7d31d0f
feat: allow empty whereStructInst
2022-09-13 06:19:40 -07:00
Elias Aebi
fea65d9934
doc: fix an example in the Macro Overview
2022-09-13 03:22:38 -07:00
Mario Carneiro
3bb3efdedc
feat: allow optional type in example
2022-09-13 03:11:04 -07:00
Mario Carneiro
b4ed2f2bbb
doc: document Init.Data.Queue
2022-09-13 03:09:25 -07:00
Sebastian Ullrich
2770b9e98b
chore: inheritDoc misbehaves on built-in parsers
2022-09-13 03:08:23 -07:00
Sebastian Ullrich
a4ac7087dc
doc: some do extensions
2022-09-13 03:08:23 -07:00
Leonardo de Moura
1350a57a03
refactor: remove pure field from LCNF.LetDecl
...
We decide that in phase 3 we will assume everything is impure, and
this kind of fine-grain tracking is not worth it.
2022-09-12 19:13:43 -07:00
Leonardo de Moura
b2d6caca0a
fix: inferProjType at LCNF
2022-09-12 18:27:14 -07:00
Leonardo de Moura
a2631ce037
fix: panic when Syntax.missing
...
I got a panic error message today in VS Code because of this function.
It is weird because, as far as I can tell, this function is only used by
the `register_simp_attr` macro, and this macro was not being used in
the files I was editing.
I think the fix is resonable for a `Syntax.missing` case.
cc @gebner
2022-09-12 16:10:14 -07:00
Leonardo de Moura
506cf01d94
fix: bug at simpCasesOnCtor?
2022-09-12 16:02:19 -07:00
Leonardo de Moura
b777d411ec
feat: add useRaw parameter at constructorApp?
...
and document this API.
2022-09-12 15:56:36 -07:00
Leonardo de Moura
e08d48c591
feat: track ground let-declarations at Specialize.lean
2022-09-12 14:05:45 -07:00
Leonardo de Moura
ec2372e8d4
feat: add Specialize.lean skeleton
2022-09-11 20:19:44 -07:00
Leonardo de Moura
44c67f72c1
feat: add LCNF/SpecInfo.lean
2022-09-11 20:19:44 -07:00
Leonardo de Moura
54f1193739
chore: add maybeTypeFormerType
2022-09-11 20:19:44 -07:00
Leonardo de Moura
f0d75258ae
feat: treat erased arguments as fixed arguments
...
It also renames `Lean.Expr.erased` => `Lean.Expr.isErased`
2022-09-11 20:19:44 -07:00
Leonardo de Moura
613523e1f6
feat: store borrow flag at Param
...
It is more robust that using `Expr.mdata`, and we save the information at `toLCNF`.
2022-09-11 20:19:44 -07:00
Leonardo de Moura
e78820e6a5
feat: add mkFixedArgMap
2022-09-11 20:19:44 -07:00
Elias Aebi
689afdb3b7
doc: enable syntax highlighting for the Macro Overview ( #1577 )
2022-09-11 08:53:05 -07:00
Mario Carneiro
19a50a32ec
chore: remove List.init
2022-09-11 07:21:24 -07:00
Mario Carneiro
2886174dd0
chore: remove map₂, [specialize] zipWith
2022-09-11 07:21:24 -07:00
Mario Carneiro
8017aa1706
fix: use Type u universes in List.foldl
2022-09-11 07:19:30 -07:00
Chris Lovett
1749210a4b
doc: fix typos and do some polish on wording ( #1568 )
2022-09-10 15:13:43 -07:00
Leonardo de Moura
59b4d977b5
chore: fix tests
2022-09-10 15:06:03 -07:00
Henrik Böving
a03ea65d73
refactor: monadic compiler test framework style + new pass manager
2022-09-10 15:00:05 -07:00
Henrik Böving
c6db1099d0
feat: add occurences and phases to PassManager
2022-09-10 14:58:49 -07:00
Leonardo de Moura
ca098d3769
feat: inline applications of the form inline (f ...)
...
The `inline` identity function is a directive for the compiler.
2022-09-10 13:28:49 -07:00
Leonardo de Moura
1953f5953f
chore: dangling file
2022-09-10 13:23:14 -07:00
Leonardo de Moura
f1c150228b
fix: fixes #1558
2022-09-09 15:27:51 -07:00
Leonardo de Moura
353eb0dd27
fix: disable auto implicit feature when running tactics
...
fixes #1569
2022-09-09 15:17:50 -07:00
Leonardo de Moura
9f134cad8e
chore: remove leftover
...
7c3826d3e9
2022-09-09 15:06:47 -07:00
Leonardo de Moura
abf514378b
fix: fixes #1575
2022-09-09 15:05:21 -07:00
Leonardo de Moura
7c3826d3e9
fix: fixes #1576
2022-09-09 14:29:48 -07:00
Leonardo de Moura
16534bacc9
chore: re-activate test
2022-09-08 15:23:18 -07:00
Henrik Böving
5514339ffd
fix: visit jp bodies in join point finder
2022-09-08 15:21:53 -07:00
Leonardo de Moura
2ec7f14ca8
chore: temporarily disable test to fix build
2022-09-08 14:53:48 -07:00
Leonardo de Moura
e39c3af5bb
chore: remove [inline] from parser combinators
2022-09-08 14:50:27 -07:00
Leonardo de Moura
a40118c79d
chore: disable eager applyCasesOnImplementedBy
...
It must be performed at phase 2.
We still want to perform the regular `[implementedBy]` replacements at
phase 1 since they affect code specialization.
2022-09-08 14:50:27 -07:00
Leonardo de Moura
1c188b62cd
chore: typo
2022-09-08 14:50:27 -07:00
Gabriel Ebner
fb259f95db
feat: remove description argument from register_simp_attr
2022-09-08 14:49:43 -07:00
Leonardo de Moura
5b969b75bd
chore: fix build
2022-09-08 14:23:18 -07:00
Henrik Böving
576a4ec2c5
test: basic compiler tests for findJoinPoints
2022-09-08 14:09:14 -07:00
Henrik Böving
f912349a29
fix: compiler test framework style
2022-09-08 14:09:14 -07:00
Henrik Böving
d2f7e724ac
feat: findJoinPoints pass
2022-09-08 14:09:14 -07:00
Mario Carneiro
f2254088d1
feat: deriving Repr for TSyntax
2022-09-08 13:14:06 +02:00
Leonardo de Moura
26e304261f
fix: PullFunDecls.lean
...
Use topological sort.
2022-09-07 22:41:05 -07:00
Leonardo de Moura
46b85ec297
chore: update stage0
2022-09-07 20:39:33 -07:00
Leonardo de Moura
0a21603cdc
feat: apply implementedBy replacements at second simp pass
2022-09-07 20:38:16 -07:00
Leonardo de Moura
07bdab45d2
feat: apply casesOn implementedBy replacements
2022-09-07 20:37:09 -07:00
Leonardo de Moura
bd21583d4b
fix: ComputedFields.lean
...
`all` fields was not being set correctly.
TODO: check `all` fields in the kernel.
2022-09-07 20:35:59 -07:00
Leonardo de Moura
ea3235c551
fix: skip casesOn recursors at code generation
2022-09-07 18:46:48 -07:00
Leonardo de Moura
5c00708b7f
test: specialize attribute tests
2022-09-07 16:32:25 -07:00
Leonardo de Moura
19f5fe6f42
feat: add getSpecializationArgs?
2022-09-07 16:08:45 -07:00
Leonardo de Moura
de0be1d820
chore: update stage0
2022-09-07 15:46:17 -07:00
Leonardo de Moura
55171a893a
feat: elaborate specialization arguments
2022-09-07 15:22:56 -07:00
Leonardo de Moura
d0d98bef25
chore: update stage0
2022-09-07 14:53:01 -07:00
Leonardo de Moura
f611a6e52f
feat: add specialize attribute parser
2022-09-07 14:50:29 -07:00
Leonardo de Moura
1e135e58a1
chore: update stage0
2022-09-07 13:24:19 -07:00
Leonardo de Moura
735dabdb3f
refactor: use ParametricAttribute to implement [specialize]
2022-09-07 13:17:24 -07:00
Leonardo de Moura
04b32eb140
chore: remove noinline and nospecialize from runEval
2022-09-07 13:08:01 -07:00
Leonardo de Moura
661eb39bc8
feat: add inlinePartial config option
2022-09-06 20:46:17 -07:00
Leonardo de Moura
f4fbf92313
fix: make privateToUserNameAux more robust
2022-09-06 17:15:56 -07:00
Leonardo de Moura
85851d0c43
fix: bug at PullFunDecls
2022-09-06 17:15:56 -07:00
Sebastian Ullrich
bb1c5a7a49
doc: ink all .lean files in doc/
2022-09-06 21:12:19 +02:00
Leonardo de Moura
56f0d6c183
feat: specialize partial applications of local functions
2022-09-06 06:44:33 -07:00
Leonardo de Moura
c769808a4e
chore: add TODO
2022-09-05 19:35:17 -07:00
Leonardo de Moura
1812e86c7f
feat: eta expand partial applications of functions that take local instances as arguments
2022-09-05 19:33:22 -07:00
Leonardo de Moura
bf44e9fb2f
fix: bug at inferProjType for LCNF
2022-09-05 19:23:35 -07:00
Leonardo de Moura
3e210d9f26
chore: helper functions, missing instance
2022-09-05 19:20:31 -07:00
Leonardo de Moura
7113d71cd2
doc: LCNF/Simp.lean docstrings
2022-09-05 17:36:35 -07:00
Leonardo de Moura
1207e5e285
feat: erase cases when all alternatives are the same
2022-09-05 17:22:54 -07:00
Leonardo de Moura
58d8224d9e
feat: add LCNF cases default
2022-09-05 14:08:14 -07:00
Chris Lovett
cc95456639
doc: add documentation on monads ( #1505 )
...
* doc: add documentation on functors.
* fix: make comments green
* minor tweaks
* doc: add section on Applicatives.
* doc: add some more info on the laws from Mario.
* doc: add law list and move lazy evaluation up so the chapter ends properly.
* doc: Add something on seqLeft and seqRight.
* doc: add section on monads.
* doc: fix some typos.
* doc: switch to LeanInk for chaper on Monads.
* doc: remove old files.
* doc: fix mdbook test errors.
* doc: add part 4: readers
* doc: add section on State monads
* doc: fix some typos and add some more details.
* doc: fix typos and add some CR feedback.
* doc: add Except monad section.
* doc: add info on monad transformers.
* Delete transformers.lean.md
* doc: fix some typos.
* doc: fix typos and move forward reference to monad lifting.
* doc: Update `State` to `StateM`
* doc: fix references to State to become StateM.
* doc: generalize indexOf implementation.
* doc: add chapter on monad laws and move "law" sections to this chapter to avoid redundancy.
* doc: add theorem
* Delete laws.lean.md
* doc: fix some typos.
* doc: fix broken link.
* doc: fox typos.
* fix: language changed from "us" to "you".
* doc: fix code review comments.
* doc: some word smithing
* doc: some word smithing and sample simplification.
* doc: add bad_option_map example.
* doc: add side note on `return` statement and fix heading level consistency.
* Add `withReader` info
* doc: change language from us, our, your, we, we'll, we've to "you"
* doc: add some forward links.
* doc: put spaces around colon in function arguments like "(x : List Nat)"
* doc:
Add backticks on map
Remove commands on multiline structure instance
Fix centerdot
Add "one of"
* doc: Remove info about Functor in other languages.
* doc:
add info on <$> being left associative
remove another forward reference to monad
fix typo `operatoions`
remove unneccesary parens after <$>
* doc:
fix Type u -> Type v
fix you -> your
use `let val? ← IO.getEnv name`
in Readers call it "context" rather than "state".
* doc: fix withReader docs
use 'context' to describe the ReaderM state.
remove "trivial"
type inference => Lean
"abstract classes" => "abstract structures"
remove unnecessary parens
* doc: fix bug in explanation of `let x ← readerFunc2`
Fix explanation of equivalence between `def f (a : Nat) : String` and `def f : Nat → String`
* doc: move hasSomeItemGreaterThan to Except.lean
Add validateList List.anyM example.
fix `def f (a : Nat) : String` language.
* doc: fix "What transformation are you referring to"
* doc: fix typo.
* doc: add missing period.
* doc: fix validateList
* doc: explain `λ` notation.
* doc: reword the map, seq, bind comparison.
* doc: fix some more 'reader state' to 'reader context' language
* doc: fix wrote statement about return only works in do blocks.
* doc: fix typo
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
* doc: improve language
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
* doc: fix typo
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
* Add info on what a do block is doing for you.
* doc: define definitionally equal
* doc: make `readerFunc3.run env` canonical.
* doc: remove unnecessary parens.
* doc: fix typos
* doc: make List.map a bit more clear in the intro to Functors.
* doc: simplify readerFunc3WithReader
* doc: switch to svg for diagram so it works better on dark themes.
* doc: align nodes in diagram and convert to svg.
* doc: simplify playGame using while true.
* doc: drop confusing statement about "definitionally equal"
* doc: switch to `import Lean.Data.HashMap`
* doc: fix typo "operatoins"
* doc: update diagram to add more info and polish the intro paragraphs so they better match the actual contents of each chapter.
* doc: fix typo
* doc: fix typo.
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2022-09-05 13:33:15 -07:00
Gabriel Ebner
8e7e58fc38
feat: synchronous operations for Channel
2022-09-05 08:52:46 -07:00
Gabriel Ebner
213cb322be
chore: add test
2022-09-05 08:52:46 -07:00
Gabriel Ebner
c4d421b3de
feat: Channel
2022-09-05 08:52:46 -07:00
Gabriel Ebner
7c552380da
feat: Mutex, Condvar
2022-09-05 08:52:46 -07:00
Gabriel Ebner
c2f1e01b3b
feat: Promise
2022-09-05 08:52:46 -07:00
Gabriel Ebner
451f6df5df
fix: IO.waitAny requires nonempty list
2022-09-05 08:52:46 -07:00
Gabriel Ebner
20f41deea7
feat: add Eval instance for BaseIO
2022-09-05 08:52:46 -07:00
Gabriel Ebner
b80775df6f
chore: add nonempty instance for monads
2022-09-05 08:52:46 -07:00
Gabriel Ebner
3bd0379993
chore: add nonempty instance for Task
2022-09-05 08:52:46 -07:00
Gabriel Ebner
f7bae54b09
chore: resurrect Std.Queue
2022-09-05 08:52:46 -07:00
Gabriel Ebner
22c3ec3996
chore: generalize IO.sleep to BaseIO
2022-09-05 08:52:46 -07:00
Leonardo de Moura
553addc078
feat: alpha equivalence for LCNF code
2022-09-05 08:06:05 -07:00
Leonardo de Moura
34f3fcdee5
chore: fix test
2022-09-05 06:58:32 -07:00
Leonardo de Moura
fde8d35bbb
refactor: declare passes when declaring transformations
2022-09-05 06:58:32 -07:00
Leonardo de Moura
1c41a750ed
feat: add ReduceJpArity compiler pass
2022-09-05 06:58:32 -07:00
Mario Carneiro
a73e02e5fc
doc: fix typo
2022-09-05 10:24:57 +02:00
Leonardo de Moura
e0197b4e09
feat: add bindCases
...
It is similar to `Code.bind` but has special support for `inlineMatcher`
2022-09-04 19:04:21 -07:00
Leonardo de Moura
d0600b3750
fix: incorrect binder name being used
...
cc @hargoniX
2022-09-04 16:56:42 -07:00
Leonardo de Moura
abd37d8fd1
feat: check binder names at LCNF/Check.lean
2022-09-04 16:55:42 -07:00
Leonardo de Moura
01ca711859
feat: add PullFunDecls.lean
2022-09-04 16:44:45 -07:00
Leonardo de Moura
df16c5a0e7
feat: add Code.collectUsed and FunDecl.collectUsed
2022-09-04 13:05:48 -07:00
Leonardo de Moura
b3c5184772
chore: remove dead code
2022-09-04 07:14:01 -07:00
Henrik Böving
4ee9080a9b
feat: basic compiler pass tests
2022-09-03 19:55:53 -07:00
Henrik Böving
32157f0e42
feat: Basic compiler testing framework
2022-09-03 19:55:53 -07:00
E.W.Ayers
30b44c03b4
fix: map fn should have explict args
2022-09-03 19:45:08 -07:00
E.W.Ayers
37745b5174
feat: intersectBy
2022-09-03 19:45:08 -07:00
E.W.Ayers
9cd24caee6
feat: utils for RBMap
2022-09-03 19:45:08 -07:00
Leonardo de Moura
56ea3af6e2
doc: Compiler/LCNF/Simp.lean
2022-09-03 19:44:10 -07:00
Leonardo de Moura
9f44e9c858
feat: simplify nested cases on the same discriminant
2022-09-03 19:44:10 -07:00
Mario Carneiro
bff9cdbfb3
doc: update lean 3 -> lean 4 in declarations.md
2022-09-03 08:35:37 -07:00
Leonardo de Moura
5478485de1
feat: allow "small prefix" at cases on cases optimization
2022-09-03 08:21:11 -07:00
Leonardo de Moura
bc88b0307e
feat: cases on cases for new LCNF simplifier
2022-09-03 07:54:19 -07:00
Chris Lovett
e8335240d8
doc: update the mdbook instructions ( #1521 )
2022-09-03 11:08:38 +02:00
Mario Carneiro
37252e5fa7
chore: remove Bootstrap package
2022-09-02 16:39:03 -07:00
Leonardo de Moura
196c9537f2
feat: eta reduction at toLCNF
2022-09-02 06:31:06 -07:00
Leonardo de Moura
d5dcd5e856
feat: eta-expand local function declarations that are not being inlined
2022-09-02 05:22:41 -07:00
Mario Carneiro
158e182b8b
chore: move Bootstrap.Dynamic -> Init.Dynamic
2022-09-02 04:36:54 -07:00
Mario Carneiro
07b1b54d03
chore: update stage0
2022-09-02 04:36:54 -07:00
Mario Carneiro
060290619e
chore: move Bootstrap.Dynamic -> Init.Dynamic (part 1)
2022-09-02 04:36:54 -07:00
Leonardo de Moura
e3a8574e15
perf: workaround for issue #316
2022-09-02 04:15:02 -07:00
Leonardo de Moura
dfdbec51ad
fix: typo
2022-09-02 03:41:49 -07:00
Leonardo de Moura
baf4f1c152
perf: simpValue? before inlineApp?
2022-09-02 03:20:59 -07:00
Leonardo de Moura
6297b2efe7
feat: do not eagerly simplify function declarations that will be inlined
2022-09-01 21:13:14 -07:00
Leonardo de Moura
21a7066d77
feat: inline type class projections
2022-09-01 20:52:08 -07:00
Leonardo de Moura
0ed46003c6
feat: add CodeDecl helper type
2022-09-01 20:52:08 -07:00
Leonardo de Moura
0b0bd968b0
feat: support for inlining join points
2022-09-01 20:52:08 -07:00
Leonardo de Moura
61edf19334
fix: allow LCNF discriminant to have any type
2022-09-01 20:52:08 -07:00
Leonardo de Moura
30c75b4b88
feat: add simpCasesOnCtor
2022-09-01 20:52:08 -07:00
Leonardo de Moura
255d34d2ac
feat: add simpValue? back
2022-09-01 20:52:08 -07:00
Gabriel Ebner
3d6006885b
feat: use widget source from first snapshot
2022-09-01 16:57:03 +02:00
Gabriel Ebner
4246d98547
fix: remove unnecessary BaseIO in AsyncList
2022-09-01 16:57:03 +02:00
Gabriel Ebner
9bfbabb9df
fix: do not fail widget request after #exit
2022-09-01 16:57:03 +02:00
Gabriel Ebner
87a6dd56b8
feat: use RPC method from first snapshot
...
There is no need to wait for further snapshots if the RPC method was already found in an earlier snapshot, or even built-in.
2022-09-01 16:57:03 +02:00
Leonardo de Moura
29eddad325
chore: only check if compiler.check is set to true
2022-09-01 07:18:47 -07:00
Leonardo de Moura
cedf9e980b
feat: check LCNF parameters
2022-09-01 07:17:53 -07:00
Leonardo de Moura
9874ef3c66
feat: check whether LetDecl and FunDecl match their values in the LCNF local context
2022-09-01 07:05:07 -07:00
Marcus Rossel
a2a39882d5
feat: add Hashable for Subtype
2022-09-01 06:11:23 -07:00
Leonardo de Moura
d96bf8a633
chore: restore accidentally deleted test
...
25447af13c
2022-09-01 06:06:03 -07:00
Leonardo de Moura
c201133d4d
feat: LCNF local context dead variable checker
...
This commit also fixes a few local declaration leaks.
2022-08-31 21:07:21 -07:00
Leonardo de Moura
ddab48a154
fix: erase dead variables
2022-08-31 20:43:13 -07:00
Leonardo de Moura
a81c9f6c09
chore: update stage0
2022-08-31 20:21:28 -07:00
Leonardo de Moura
d00627364c
feat: add simp compiler pass
2022-08-31 18:10:32 -07:00
Leonardo de Moura
ba0835e387
feat: refresh binder names during internalization
2022-08-31 18:10:32 -07:00
Leonardo de Moura
25447af13c
feat: new code inliner
2022-08-31 18:10:32 -07:00
Sebastian Ullrich
2e98726973
fix: levelMVarToParam must update levelNames
2022-08-31 17:57:07 -07:00
Sebastian Ullrich
e075b54f22
fix: collision between implicit and auto-bound level names
2022-08-31 17:57:07 -07:00
Mario Carneiro
ce3c0c0e6b
feat: add TR versions of Nat.{fold, any, all, repeat}
2022-08-31 17:52:59 -07:00
Sebastian Ullrich
a657a638f0
feat: sub-info tree level hover
2022-08-31 17:49:43 -07:00
Sebastian Ullrich
4050227e5d
chore: revert marking internal notes as parser/elab docstrings
2022-08-31 17:49:43 -07:00
Sebastian Ullrich
b9152a5296
refactor: move, generalize findSyntaxStack?
2022-08-31 17:49:43 -07:00
Henrik Böving
c1949e05e0
feat: migrate to new pass manager
2022-08-31 16:28:07 -07:00
Henrik Böving
5d834f3f0e
chore: update stage0
2022-08-31 16:28:07 -07:00
Henrik Böving
fe63bd2e8e
feat: basic pass manager
2022-08-31 16:28:07 -07:00
Sebastian Ullrich
98145ad8ba
chore: not a docstring
2022-08-31 22:19:27 +02:00
Mario Carneiro
ebb5b97d73
chore: move Bootstrap.Data -> Lean.Data
2022-08-31 11:48:57 -07:00
Mario Carneiro
c089639b19
refactor: Init.SimpLemmas proof golf / cleanup
2022-08-31 11:27:58 -07:00
Leonardo de Moura
2fc38fb118
feat: instantiateTypeLevelParams and instantiateValueLevelParams for LCNF.Decl
2022-08-30 20:20:39 -07:00
Leonardo de Moura
a0b47195ba
fix: fixes #1547
2022-08-30 11:45:05 -07:00
Leonardo de Moura
b6f0bdc542
chore: add Array.mapMono
2022-08-30 11:45:05 -07:00
Leonardo de Moura
c451bf0c91
feat: add simpFunDecl
2022-08-30 11:45:05 -07:00
Mario Carneiro
b2b02295b0
chore: move ShareCommon to Init / Lean
2022-08-30 07:51:43 -07:00
Leonardo de Moura
ca80bc52dc
feat: LCNF.simp .let case
2022-08-29 09:52:16 -07:00
Leonardo de Moura
7b161d33d1
refactor: add MonadFVarSubst class
2022-08-29 09:52:16 -07:00
Mario Carneiro
6a7ccb5797
refactor: generalize ShareCommon to a typeclass ( #1537 )
2022-08-29 09:34:38 -07:00
Mario Carneiro
21262e5dca
chore: move Bootstrap.Data -> Lean.Data
2022-08-29 11:14:25 -04:00
Mario Carneiro
850ee17346
chore: move Bootstrap.System.Uri to Init
2022-08-29 08:06:30 -07:00
Siddharth Bhat
a7b128fee1
doc: explanations for LCNF.
2022-08-29 07:17:25 -07:00
Mario Carneiro
0efbc0bc03
chore: remove BinomialHeap, DList, Stack, Queue
...
These are moving to std4.
2022-08-29 07:07:53 -07:00
Mario Carneiro
bf89c5a0f5
chore: move Std -> Bootstrap
2022-08-29 01:26:12 -07:00
Mario Carneiro
31784c9a24
doc: documentation for Init.Core
2022-08-29 00:41:24 -07:00
Mario Carneiro
f4bae4cd2a
chore: move Std -> Bootstrap
2022-08-29 01:03:08 -04:00
Mario Carneiro
5658000396
refactor: golf proof of funext
2022-08-28 19:01:46 -07:00
Leonardo de Moura
062d4728a1
feat: more LCNF update functions
...
and bug fixes at CSE
2022-08-28 19:00:49 -07:00
Leonardo de Moura
5552d610e8
chore: missing updateCases!
2022-08-28 16:30:54 -07:00
Leonardo de Moura
e80028b7d1
feat: add pure field to LetDecl, add helper functions for updating LCNF code
...
The update functions try to minimize the amount of memory allocation
2022-08-28 08:55:35 -07:00
Leonardo de Moura
4f5a014170
feat: add Array.mapMonoM
2022-08-28 08:55:35 -07:00
Leonardo de Moura
d5fa178fc3
feat: modify FVarSubst used in the new code generator
2022-08-28 08:55:35 -07:00
Leonardo de Moura
6a9f8ad919
fix: Compiler/LCNF/ElimDead.lean
2022-08-28 08:55:35 -07:00
Mario Carneiro
f93914e613
fix: prove decidable_of_decidable_of_eq without cast
2022-08-28 08:32:00 -07:00
Mario Carneiro
d4c7d0f266
chore: remove def implies
2022-08-28 07:57:56 -07:00
Leonardo de Moura
cd0dd4cc2f
feat: start simp for new LCNF format
2022-08-27 19:59:31 -07:00
Leonardo de Moura
9446ae3056
feat: add cleanup function for CompilerM
2022-08-27 18:35:30 -07:00
Leonardo de Moura
30d8ae70f7
chore: remove workarounds
2022-08-27 10:56:15 -07:00
Leonardo de Moura
792ce8ce44
chore: update stage0
2022-08-27 10:46:06 -07:00
Leonardo de Moura
ee8e771445
fix: dotted name bug
2022-08-27 10:41:55 -07:00
Leonardo de Moura
0f40dfc063
feat: add FunDecl.etaExpand
2022-08-27 10:41:54 -07:00
Leonardo de Moura
11c8253f6c
feat: more update functions for LCNF
2022-08-27 10:41:54 -07:00
Leonardo de Moura
bdf89b4d85
chore: add {crossEmoji} at failure
2022-08-27 10:41:54 -07:00
Sebastian Ullrich
48c1ddc807
chore: update stage0
2022-08-27 17:44:58 +02:00
Sebastian Ullrich
4562fcfbd7
chore: Nix: include orphan modules like lean.mk does
2022-08-27 17:41:46 +02:00
Sebastian Ullrich
fb408c024b
fix: deleting built-in docstrings
2022-08-27 17:19:25 +02:00
Mario Carneiro
9bd886f37d
fix: @[inheritDoc] on notation
2022-08-27 07:11:39 -07:00
Leonardo de Moura
0925051c51
chore: rename Reader to ReaderM
...
closes #1524
2022-08-26 20:59:17 -07:00
Sebastian Ullrich
12d7e839b0
doc: Stream.read/getLine
2022-08-26 20:55:09 -07:00
Sebastian Ullrich
b010805000
fix: Handle.read at EOF
2022-08-26 20:55:09 -07:00
Sebastian Ullrich
a69d7fb018
fix: remove broken Handle.isEof
2022-08-26 20:55:09 -07:00
Sebastian Ullrich
d23c19884b
doc: read/getLine EOF behavior
2022-08-26 20:55:09 -07:00
Sebastian Ullrich
af7f5aa2a0
feat: dbgStackTrace
2022-08-26 20:52:51 -07:00
E.W.Ayers
f52a1bd37c
doc: JSON-RPC
2022-08-26 20:49:57 -07:00
E.W.Ayers
4ea4365354
doc: various String docstrings
2022-08-26 20:49:57 -07:00
E.W.Ayers
3aeb3db3b5
doc: Char/Basic.lean
2022-08-26 20:49:57 -07:00
E.W.Ayers
5611620d3a
dov: explanation of why pointers aren't sound.
2022-08-26 20:49:57 -07:00
E.W.Ayers
152d441a4c
doc: note that Float.beq is not refl
2022-08-26 20:49:57 -07:00
Leonardo de Moura
969dce70db
perf: improve FVarSubst apply functions in the new compiler stack
2022-08-26 20:10:36 -07:00
Mario Carneiro
d875f43b52
chore: remove outdated TODO
2022-08-26 15:31:13 -07:00
Mario Carneiro
ee22e637cd
fix: use withContext at ac_rfl
2022-08-26 15:23:24 -07:00
E.W.Ayers
ff792c3a3a
feat: abstract visitLet, visitLambda, visitForall
2022-08-25 19:09:16 -07:00
E.W.Ayers
d18667c484
feat: generalise forEachExpr
...
Lean.Meta.forEachExpr should be general over monads rather than restricted to the MetaM monad.
This is similar to the generalisation of Lean.Meta.transform
2022-08-25 19:09:16 -07:00
Sebastian Ullrich
e81ba951c6
fix: Core.transform API and uses
2022-08-25 19:07:42 -07:00
Fynn Schmitt-Ulms
064ab16791
feat: Float.abs function ( #1514 )
2022-08-25 18:45:46 -07:00
Leonardo de Moura
65f9344f01
feat: check whether join points are fully applied at Check.lean
2022-08-25 18:17:54 -07:00
Leonardo de Moura
14944aeb3c
chore: print decl size at trace message
2022-08-25 18:11:49 -07:00
Leonardo de Moura
4c9c2d2bf7
feat: new CSE.lean
2022-08-25 18:08:22 -07:00
Leonardo de Moura
98575b4250
feat: new PullLetDecls.lean
2022-08-25 13:39:15 -07:00
pcpthm
bc9c14a080
fix: remove duplicate OfNat Int instance
2022-08-25 11:57:13 -07:00
Gabriel Ebner
90f92c3a9e
fix: use delabAppExplicit for tooltips
2022-08-25 18:38:21 +02:00
Gabriel Ebner
a6a913495d
feat: make (_ : a = b) hoverable in infoview
2022-08-25 18:38:21 +02:00
Gabriel Ebner
82e9f09bca
fix: remove incorrect syntax coercion
2022-08-25 17:54:26 +02:00
Richard Musiol
d4799eaf3a
doc: fix typo
2022-08-24 21:59:15 -07:00
Gabriel Ebner
8fc3bae47c
chore: remove unexpanded coercion support from pp.analyze
2022-08-24 21:58:13 -07:00
Leonardo de Moura
3b4862e1a7
feat: add LCNF/DependsOn.lean
2022-08-24 21:56:10 -07:00
Leonardo de Moura
4e8b4e96e9
feat: simplify LCtx
2022-08-24 14:16:26 -07:00
Leonardo de Moura
85866fc238
chore: fix and disable some LCNF tests
...
We still need to port code to the new architecture
2022-08-24 14:12:27 -07:00
Leonardo de Moura
9b28878615
fix: AltCore.inferType
2022-08-24 14:05:25 -07:00
Leonardo de Moura
8102e1e31b
fix: jp case at check
2022-08-24 11:50:00 -07:00
Leonardo de Moura
3a2758a59b
refactor: new LCNF frontend
2022-08-24 11:40:37 -07:00
Leonardo de Moura
cabcadf9cc
feat: add ppDecl
2022-08-24 08:41:45 -07:00
Leonardo de Moura
f2f3a72196
feat: add ToDecl.lean
2022-08-24 08:31:38 -07:00
Leonardo de Moura
6e068bebd1
feat: LCNF pretty printer
2022-08-24 08:16:00 -07:00
Leonardo de Moura
54e4cfa8e2
chore: doc string
2022-08-24 06:55:51 -07:00
Leonardo de Moura
083523ee9c
feat: att new LCNF/toLCNF.lean
2022-08-23 20:21:06 -07:00
Leonardo de Moura
3e2f8c61ec
feat: helper LCNF functions
2022-08-23 19:37:33 -07:00
Leonardo de Moura
cd49e564cf
chore: add LCNF/Util.lean
2022-08-23 19:35:11 -07:00
Leonardo de Moura
f5415b2f81
feat: add Decl.check
2022-08-23 13:11:42 -07:00
Leonardo de Moura
bce7eadfbc
feat: add LCNF/Check.lean
2022-08-23 08:50:59 -07:00
Leonardo de Moura
766afdd0bc
feat: store FunDecls at LCNF local context
2022-08-22 21:46:37 -07:00
Leonardo de Moura
82acc2b39c
feat: improve Code.bind
...
Add `joinTypes`.
2022-08-22 21:07:36 -07:00
Leonardo de Moura
1f57155eb9
feat: add Code.bind concatenating LCNF code blocks
2022-08-22 20:17:52 -07:00
Leonardo de Moura
a2fabc6d49
feat: inferType for new LCNF
2022-08-22 19:51:17 -07:00
Leonardo de Moura
bd1186536f
feat: LCNF to Expr translator
2022-08-22 17:59:27 -07:00
Leonardo de Moura
b2c2d49bae
feat: new CompilerM for LCNF
2022-08-22 17:52:04 -07:00
Leonardo de Moura
92d157f705
feat: local context for LCNF
2022-08-22 16:57:12 -07:00
Leonardo de Moura
e1ae11a708
refactor: copy LCNFTypes.lean to LCNF/Types.lean
...
The old file is going to be deleted after we complete the refactor.
2022-08-22 16:56:15 -07:00
Leonardo de Moura
9ed83e23ae
feat: dead code eliminator for the new LCNF structure
2022-08-22 16:30:37 -07:00
Leonardo de Moura
18f3af302b
feat: new datastructure for representing LCNF code
2022-08-22 16:25:11 -07:00
Leonardo de Moura
f8c7de5a64
feat: add new performance counters
2022-08-21 19:48:30 -07:00
Leonardo de Moura
bc5b6272d8
fix: use _mustInline in lambdas only
2022-08-21 16:41:18 -07:00
Leonardo de Moura
d11947abc0
perf: optimize mkLetUsingScope
...
Avoid overhead of `hasLooseBVars` at `LocalContext.mkBinding`
2022-08-21 16:07:29 -07:00
Leonardo de Moura
eaa384bd81
perf: remove unnecessary calls to ensureUniqueLetVarNames
...
`instantiateRevInternalize` is already ensuring we have unique names.
2022-08-21 14:15:42 -07:00
Leonardo de Moura
84204432db
chore: fix test output
2022-08-21 14:01:18 -07:00
Leonardo de Moura
9700b58114
fix: mustInline at Compiler.simp
2022-08-21 13:57:56 -07:00
Leonardo de Moura
df89717ae3
perf: custom isTypeFormerType for toLCNF translation
2022-08-21 12:45:37 -07:00
Leonardo de Moura
cae7b7443d
chore: remove trace leftovers
2022-08-21 11:42:50 -07:00
Leonardo de Moura
7c0bb0a6dc
feat: add compiler.check option
2022-08-21 11:15:07 -07:00
Leonardo de Moura
faabf14c1b
perf: improve PullLocalDecls.dependsOn
2022-08-21 11:15:07 -07:00
Andrés Goens
fa22507e8e
feat: blocking behavior on EOF for getLine ( #1479 )
2022-08-21 16:27:48 +02:00
Sebastian Ullrich
221c239600
fix: alternative tar fix
2022-08-21 16:15:03 +02:00
Leonardo de Moura
778f9aa08f
feat: eta expand local function declarations that are not being inlined
2022-08-21 06:38:42 -07:00
Leonardo de Moura
fa7769260a
perf: combine instantiateRev and internalize in a single traversal
2022-08-20 20:03:05 -07:00
Leonardo de Moura
b2a99e1b68
chore: minor optimization at mkFlatLet
2022-08-20 20:03:05 -07:00
Leonardo de Moura
776a9b0dcb
feat: don't eagerly simplify local functions that will be inlined
2022-08-20 20:03:05 -07:00
Leonardo de Moura
571a839416
chore: doc strings and add .mustInline case
2022-08-20 20:03:05 -07:00
Leonardo de Moura
d2d0a745d5
feat: use eta-reduction when reducing projection instances
2022-08-20 20:03:05 -07:00
Leonardo de Moura
a5034d6700
feat: add performance counter to Compiler.Simp
2022-08-20 20:03:05 -07:00
Sebastian Ullrich
7ce3a413e4
fix: CI: create portable tarballs
2022-08-21 00:04:24 +02:00
Sebastian Ullrich
5ce5576b5d
fix: hygienic resolution of namespaces
2022-08-20 22:29:46 +02:00
Sebastian Ullrich
6f0faa8000
chore: update stage0
2022-08-20 22:29:46 +02:00
Sebastian Ullrich
5694dea36d
chore: prepare bootstrap change
2022-08-20 22:29:46 +02:00
Leonardo de Moura
3788145a56
perf: minimize instantiateRev number of calls
2022-08-20 08:36:27 -07:00
Leonardo de Moura
6c1e9d9b28
perf: use [specialize] at withNewScope
2022-08-19 18:56:15 -07:00
Leonardo de Moura
36cca3ebdd
perf: add toLCNFType cache
2022-08-19 18:49:33 -07:00
Leonardo de Moura
b37178d547
perf: improve toLCNFType
2022-08-19 18:40:44 -07:00
Leonardo de Moura
879a466875
perf: improve isTypeFormerType
2022-08-19 18:23:28 -07:00
Henrik Böving
d0aa234c78
feat: handle out of scope join points in join point finder
2022-08-19 17:44:54 -07:00
Henrik Böving
743ce431dc
feat: HashSet.forM
2022-08-19 17:44:54 -07:00
Leonardo de Moura
8aa9d2cdbf
feat: add "cases on cases" simplification
2022-08-19 17:39:10 -07:00
Leonardo de Moura
49823c28c4
fix: inlining heuristic
2022-08-19 16:23:37 -07:00
Leonardo de Moura
15f0e26368
feat: replace cases alternative with unreachable if one of the fields is the empty type
2022-08-19 12:25:46 -07:00
Leonardo de Moura
a29a61b728
chore: remove dead code
2022-08-19 11:56:22 -07:00
Leonardo de Moura
a7c96142ea
feat: improve code inliner
...
and fix bugs at the `onlyOneExitPoint` case.
2022-08-19 11:33:34 -07:00
Leonardo de Moura
6d11dc9b62
feat: add mkAuxDeclName
2022-08-19 11:31:56 -07:00
Leonardo de Moura
b1e292e238
feat: add option for disabling join point scope checking
2022-08-19 11:31:18 -07:00
Leonardo de Moura
d0c8ad1d22
feat: reduce number of simp steps
2022-08-19 05:54:50 -07:00
Leonardo de Moura
88c4d5c340
perf: simplify and optimize inlineProjInst?
2022-08-19 04:49:31 -07:00
Leonardo de Moura
4cbe67954b
feat: improve inlineProjInst?
2022-08-18 18:25:55 -07:00
Leonardo de Moura
9a04193e73
fix: getStage1Decl? minor issue
2022-08-18 17:40:05 -07:00
Leonardo de Moura
0b2d013beb
chore: remove leftover
2022-08-18 17:39:29 -07:00
Leonardo de Moura
9ae2b83ac0
feat: add Compiler.Decl.pullInstances
2022-08-18 15:09:22 -07:00
Leonardo de Moura
bf2c0bf5b7
feat: avoid generation of auxliary join points when inlining functions that have only one exit point
2022-08-18 00:12:24 -07:00
Leonardo de Moura
23be59b747
chore: add Compiler.stat trace option
2022-08-18 00:10:56 -07:00
Leonardo de Moura
c780d390d6
fix: bug at InferType.lean
2022-08-18 00:10:35 -07:00
Leonardo de Moura
651d4044b3
fix: bug at attachJp
2022-08-17 19:22:53 -07:00
Leonardo de Moura
8985a15f96
chore: mark inferInstance and inferInstanceAs as [inline]
...
New code generator does not inline simple declarations not tagged with
`[inline]` yet. We need this change to simpilify testing
2022-08-17 19:08:51 -07:00
Leonardo de Moura
ff53e9cc56
chore: remove leftover
2022-08-17 19:04:12 -07:00
Leonardo de Moura
3a898802f7
feat: inline type class instances
2022-08-17 19:01:49 -07:00
Leonardo de Moura
6561fc259f
feat: add MonadBacktrack instance for CompilerM
2022-08-17 18:51:26 -07:00
Leonardo de Moura
861bcee6a9
feat: add simpAppApp?
2022-08-17 17:57:49 -07:00
Leonardo de Moura
546179fd7e
chore: add Compiler.simp.step trace option
2022-08-17 17:41:44 -07:00
Leonardo de Moura
275feed318
feat: simplify projection of constructor
2022-08-17 17:16:30 -07:00
Leonardo de Moura
18c95e8322
fix: bug at toLCNF cache
2022-08-17 17:16:13 -07:00
Leonardo de Moura
d7acf1f844
feat: add Compiler.jp trace class
2022-08-17 16:22:09 -07:00
Leonardo de Moura
f0791559b8
chore: fix test
...
Ensure `targetUri`s in the test output do not contain full paths on my machine.
2022-08-17 15:24:00 -07:00
Leonardo de Moura
26b417acf8
chore: update stage0
2022-08-17 15:12:04 -07:00
Mario Carneiro
20f9b7172f
doc: documentation for Init.SizeOf
2022-08-17 14:48:10 -07:00
Mario Carneiro
8182f83929
doc: documentation for Init.Tactics
2022-08-17 14:44:40 -07:00
Henrik Böving
70ef3875d1
feat: add join point detector
2022-08-17 14:38:46 -07:00
Leonardo de Moura
ea35f6e091
fix: missing mkJpDeclIfNotSimple
2022-08-17 14:35:07 -07:00
Leonardo de Moura
31f7c51d14
feat: add simp loop
...
Keeps simplifying while making progress.
2022-08-17 11:57:33 -07:00
Leonardo de Moura
2820958f64
doc: attachJp
2022-08-17 11:14:56 -07:00
Leonardo de Moura
1d936e2d6b
feat: sanity checking at attachJp
2022-08-17 09:47:59 -07:00
Leonardo de Moura
f0370749f9
feat: check whether there are jumps to out of scope join points
...
In a local function declaration, we can only jump to local join
points.
2022-08-17 09:38:19 -07:00
Leonardo de Moura
320a5a708c
fix: avoid out-of-scope jumps at CSE
2022-08-17 09:06:00 -07:00
Leonardo de Moura
0d52a3f92b
fix: add attachJp
...
Auxiliary function for attaching jump to a join point to an existing
let-code block.
2022-08-17 07:32:11 -07:00
Leonardo de Moura
763cf31c3b
test: go to definition
2022-08-17 06:05:00 -07:00
E.W.Ayers
81ad807bb3
test: more unit tests
...
Some taken from https://stackoverflow.com/questions/37172819/test-if-c98-string-is-a-number-in-scientific-notation
2022-08-17 05:57:22 -07:00
E.W.Ayers
4e7c1e1ec8
fix: missing digits in scientific literal should be an error
2022-08-17 05:57:22 -07:00
Mario Carneiro
ba938d4a6e
doc: documentation for Init.Notation
2022-08-17 05:56:10 -07:00
Mario Carneiro
37a12b635b
feat: add declId hover for syntax/notation/mixfix
2022-08-17 05:55:06 -07:00
Leonardo de Moura
fd11e662b0
chore: update stage0
2022-08-16 18:36:39 -07:00
Mario Carneiro
e0221db2e2
feat: add @[inheritDoc] attribute
2022-08-16 18:31:55 -07:00
Leonardo de Moura
600740da85
feat: inlining local function declarations
2022-08-16 18:23:49 -07:00
Leonardo de Moura
aac711cf92
feat: inlining statistics
2022-08-16 18:23:49 -07:00
Leonardo de Moura
2f57a0e6d5
refactor: cleaup compiler simplifier
2022-08-16 18:23:49 -07:00
Leonardo de Moura
9f46996db7
feat: inliner
2022-08-16 18:23:49 -07:00
Leonardo de Moura
0e3e1353e2
feat: new Compiler trace classes
2022-08-16 18:23:49 -07:00
Leonardo de Moura
e8fdfe4193
feat: eliminate trivial let-declarations
2022-08-16 18:23:49 -07:00
Leonardo de Moura
117db0da01
feat: add Compiler/Simp.lean
2022-08-16 18:23:49 -07:00
Leonardo de Moura
daa833d5c9
feat: preserve internal let-declaration binder names
2022-08-16 18:23:49 -07:00
Leonardo de Moura
e876d81692
fix: missing withRoot true
2022-08-16 18:23:49 -07:00
E.W.Ayers
d543867241
doc: fix typos
2022-08-16 08:31:58 -07:00
E.W.Ayers
ff5b02622c
doc: Format
2022-08-16 08:31:58 -07:00
E.W.Ayers
2e99e8c22d
feat: Float ↔ Json
2022-08-16 08:01:23 -07:00
E.W.Ayers
9e194e3c3d
fix: add + parser to decimalNumberFn
2022-08-16 07:29:39 -07:00
E.W.Ayers
a763d9d81e
fix: decodeScientificLitVal? parses 1.0e+1 correctly
...
fixes #1484
2022-08-16 07:29:39 -07:00
Leonardo de Moura
37ba0df584
feat: do not generate code for matcher auxiliary declarations
...
We are macro inlining them.
2022-08-15 20:10:33 -07:00
Leonardo de Moura
7979d03386
fix: bug at CSE.lean
2022-08-15 20:04:29 -07:00
Leonardo de Moura
327442a85c
feat: add mkFreshBinderName and use it to normalize internal names
2022-08-15 19:47:37 -07:00
Leonardo de Moura
caf2bb0797
feat: inline auxiliary matcher applications
2022-08-15 19:47:05 -07:00
Leonardo de Moura
7ca3535820
refactor: add mkJump
2022-08-15 18:39:27 -07:00
Leonardo de Moura
d0203ca1dc
feat: add Decl.ensureUniqueLetVarNames
2022-08-15 13:03:07 -07:00
Leonardo de Moura
142b9bec36
feat: add ensureUniqueLetVarNames
2022-08-15 12:59:36 -07:00
Leonardo de Moura
e931c6b5b5
fix: bug at toLCNF
2022-08-15 12:59:36 -07:00
Patrick Massot
c9ccc9c253
doc: some SimplePersistentEnvExtension methods
...
See discussion at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Persistent.20extension.20not.20persisting
2022-08-15 12:09:00 -07:00
Leonardo de Moura
4f79d2caa0
feat: improve toLCNF
...
Preserve type formers only if they are application arguments
2022-08-15 09:53:48 -07:00
Gabriel Ebner
2e6395d525
doc: trace messages
2022-08-15 08:55:25 -07:00
Gabriel Ebner
e96afa28fe
chore: use named emoji
2022-08-15 08:55:25 -07:00
Gabriel Ebner
e4a7b82c8d
feat: use interactive goals in messages
2022-08-15 08:55:25 -07:00
Gabriel Ebner
34b0b4b7e2
chore: fix tests
2022-08-15 08:55:25 -07:00
Gabriel Ebner
5e4b30c777
chore: remove traceCtx
2022-08-15 08:55:25 -07:00
Gabriel Ebner
0e8c05134f
chore: improve pp.analyze traces
2022-08-15 08:55:25 -07:00
Gabriel Ebner
b38e55bac3
chore: mark simp trace classes as inherited
2022-08-15 08:55:25 -07:00
Gabriel Ebner
d5eb9f3400
chore: improve check traces
2022-08-15 08:55:25 -07:00
Gabriel Ebner
13b5586b26
chore: improve appbuilder traces
2022-08-15 08:55:25 -07:00
Gabriel Ebner
aa2be22df7
fix: group trace messages into one diagnostic
2022-08-15 08:55:25 -07:00
Gabriel Ebner
64031e5231
chore: remove obsolete addTraceOptions
2022-08-15 08:55:25 -07:00
Gabriel Ebner
4e2899e354
chore: remove nested trace api
2022-08-15 08:55:25 -07:00
Gabriel Ebner
3a9152f007
chore: improve defeq traces
2022-08-15 08:55:25 -07:00
Gabriel Ebner
f89f6cb56c
chore: improve elab traces
2022-08-15 08:55:25 -07:00
Gabriel Ebner
278724786a
chore: improve tc synth traces
2022-08-15 08:55:25 -07:00
Gabriel Ebner
ef223c02b8
feat: make trace class inheritance opt-in
2022-08-15 08:55:25 -07:00
Gabriel Ebner
847125d2e8
chore: remove global trace enabled flag
2022-08-15 08:55:25 -07:00
Gabriel Ebner
96034d15b6
chore: remove obsolete trace functions
2022-08-15 08:55:25 -07:00
Gabriel Ebner
7e020d45e6
feat: add emoji helpers for trace messages
2022-08-15 08:55:25 -07:00
Gabriel Ebner
c7e45722a3
feat: trace nodes with messages
2022-08-15 08:55:25 -07:00
Leonardo de Moura
a3e1b696fb
chore: update stage0
2022-08-15 08:43:33 -07:00
Mario Carneiro
a4f1db7aca
feat: attributes on {macro,elab}(_rules)
2022-08-15 08:40:40 -07:00
Leonardo de Moura
a23567065d
chore: update stage0
2022-08-15 06:26:40 -07:00
Leonardo de Moura
bf7b105b74
chore: remove workaround
2022-08-15 06:26:04 -07:00
Leonardo de Moura
ef308e7f2c
chore: remove leftover notation
2022-08-15 06:25:35 -07:00
Leonardo de Moura
09c0f43ce5
chore: update stage0
2022-08-15 06:22:47 -07:00
Leonardo de Moura
d903d85a53
chore: prepare to remove have notation leftover
2022-08-15 06:21:23 -07:00
Leonardo de Moura
9bafe2f5b5
chore: update stage0
2022-08-14 11:20:54 -07:00
Mario Carneiro
3b793b949b
feat: attributes on notation
2022-08-14 11:18:20 -07:00
Leonardo de Moura
126ad49401
feat: add stage1 extension for storing LCNF declarations
2022-08-14 10:59:36 -07:00
Henrik Böving
afbe296edb
doc: doc-strings for CompilerM
2022-08-14 09:33:58 -07:00
Henrik Böving
8e29fa88eb
fix: address code review for jp checker
2022-08-14 09:33:58 -07:00
Henrik Böving
ff9c9032b4
feat: join point validator
2022-08-14 09:33:58 -07:00
Leonardo de Moura
ed616abfb3
fix: hover information and go-to definition for notation defined using binop%
2022-08-13 21:34:27 -07:00
Mario Carneiro
b3ba6d4bf7
fix: use resolveGlobalConstNoOverloadWithInfo more
2022-08-13 18:20:55 -07:00
Leonardo de Moura
7a8c91fe83
chore: update stage0
2022-08-13 18:15:14 -07:00
Leonardo de Moura
713108b7ba
chore: re-enable warningAsError
2022-08-13 18:07:30 -07:00
Leonardo de Moura
1e1c231edd
chore: update stage0
2022-08-13 18:07:30 -07:00
Leonardo de Moura
d87d0f47a6
chore: temporarily disable warningAsError
2022-08-13 18:07:30 -07:00
Sebastian Ullrich
a2d59b9c93
fix: preserve condition position info in if
2022-08-13 18:07:30 -07:00
Sebastian Ullrich
81c744b12f
chore: update tests
2022-08-13 18:07:30 -07:00
Sebastian Ullrich
f117606728
fix: replace uses of token antiquotations for setting position ranges with withRef
2022-08-13 18:07:30 -07:00
Sebastian Ullrich
ed754725e6
fix: discriminant info tree term
2022-08-13 18:07:30 -07:00
Sebastian Ullrich
757da9f6f3
fix: more accurate invalid shadowin error position
2022-08-13 18:07:30 -07:00
Sebastian Ullrich
a91ad198b2
fix: set ref in expandMacros like with regular expansion
2022-08-13 18:07:30 -07:00
Leonardo de Moura
56ee71fa0b
chore: update stage0
2022-08-13 18:07:30 -07:00
Sebastian Ullrich
b97a145836
fix: annotate all syntax nodes produced by quotations as synthetic
2022-08-13 18:07:30 -07:00
Mario Carneiro
b201db4bf7
feat: add hover info for quot precheck
2022-08-13 17:31:57 -07:00
Leonardo de Moura
5f01746dba
chore: update stage0
2022-08-13 17:24:58 -07:00
Mario Carneiro
c961cd1310
feat: doc comments on notation
2022-08-13 17:18:14 -07:00
Mario Carneiro
014db5d6d0
doc: relocate doc strings from elab to syntax
2022-08-13 17:16:40 -07:00
Mario Carneiro
b0db7deeef
doc: documentation for Init.Coe
2022-08-13 17:15:49 -07:00
Henrik Böving
0d27c5c5cd
doc: doc-strings for the entrypoints of the compiler
2022-08-13 17:11:07 -07:00
Leonardo de Moura
745f77c657
chore: let x := lcUnreachable .. should not occur in LCNF
2022-08-13 16:24:44 -07:00
Leonardo de Moura
6c5638d85b
fix: bug at toLCNF
2022-08-13 15:22:22 -07:00
Leonardo de Moura
7b440040f8
test: add Gabriel's examples
...
They expose issues in the current code generator
2022-08-13 11:51:09 -07:00
Leonardo de Moura
cba5f1b374
test: add examples that produce the LCNF "any" type
2022-08-13 11:37:35 -07:00
Leonardo de Moura
996968c54c
chore: display LCNF declaration type at Compiler.step
2022-08-13 11:35:46 -07:00
Leonardo de Moura
d2c0aa4d6d
chore: remove dead code
2022-08-13 11:24:51 -07:00
Leonardo de Moura
9b1db198af
fix: bug at toLCNF
2022-08-13 10:30:12 -07:00
Leonardo de Moura
212456720c
fix: bug at TerminalCases
...
`Context.jp?` is not a continuation for the local lambda.
2022-08-13 10:15:43 -07:00
Leonardo de Moura
d439160f31
fix: missing cases at compatibleTypes
2022-08-13 10:03:14 -07:00
Leonardo de Moura
0a423b3699
fix: ensure the the terminal expression in let-declaration block is not a lambda
2022-08-13 09:47:59 -07:00
Leonardo de Moura
a17d00867f
feat: common subexpression elimination
2022-08-12 16:52:18 -07:00
Leonardo de Moura
dc69a20893
feat: add mapValue
2022-08-12 16:38:20 -07:00
Leonardo de Moura
0b585d6f3d
fix: bug at Compiler/Check.lean
2022-08-12 13:59:56 -07:00
Mario Carneiro
9de477ecf9
feat: add more float functions
2022-08-12 13:12:59 -07:00
Chris Lovett
50cd7debe1
feat: simple uri escaping and unescaping ( #1452 )
2022-08-12 19:56:05 +00:00
Leonardo de Moura
37057fdd31
feat: eagerly inline simple join points
2022-08-12 11:15:12 -07:00
Leonardo de Moura
84d9c6ed8b
fix: bug at TerminalCases.lean
2022-08-12 10:59:15 -07:00
Leonardo de Moura
cfbefd993b
fix: lambdaBoundedTelescope at Compiler/Check.lean
2022-08-12 10:20:54 -07:00
Mario Carneiro
6906a4d1ee
feat: generalize ReaderT definitions
2022-08-12 08:23:11 -07:00
Mario Carneiro
94f85ae649
fix: don't show NaN sign info in Float.toString
2022-08-12 08:21:47 -07:00
Mario Carneiro
0738136446
feat: add lineEq parser alias
2022-08-12 08:15:28 -07:00
Mario Carneiro
1302d8f7fc
feat: prefer syntax doc over elab when both are present
...
closes #1443
2022-08-12 08:14:55 -07:00
Mario Carneiro
311d376bde
doc: typos and indentation
2022-08-12 08:14:20 -07:00
Sebastian Ullrich
d1beded289
chore: Nix: sanitize drv names
2022-08-12 15:30:22 +02:00
Wojciech Nawrocki
98571e6620
doc: explain acronym
2022-08-12 10:28:49 +02:00
Leonardo de Moura
104196e599
feat: add profileitM to compiler new entry point
2022-08-11 19:04:33 -07:00
Leonardo de Moura
e04453a89e
chore: improve getMaxLetVarIdx
2022-08-11 19:01:41 -07:00
Leonardo de Moura
6d5272a404
fix: new compiler type checker
2022-08-11 18:57:06 -07:00
Leonardo de Moura
2eab711308
chore: add trace.Compiler.step
2022-08-11 18:40:13 -07:00
Leonardo de Moura
77735e62f5
chore: remove leftovers
2022-08-11 18:40:13 -07:00
Leonardo de Moura
623e0e9af9
feat: TerminalCases for new LCNF
2022-08-11 18:40:13 -07:00
Leonardo de Moura
073e72181d
fix: bug at Compiler.inferType
...
Check whether declaration type mismatch at `Compiler.Decl.check`
2022-08-11 18:40:13 -07:00
Leonardo de Moura
5dbb907b56
feat: new toLCNF
2022-08-11 18:40:13 -07:00
Leonardo de Moura
6a67c13044
feat: generalize helper functions
2022-08-11 18:40:13 -07:00
Leonardo de Moura
4361eef907
fix: improve compatibleTypes and Compiler.check
2022-08-11 18:40:13 -07:00
Leonardo de Moura
3d79581f6b
feat: basic LCNF conversion
2022-08-11 18:40:13 -07:00
Mario Carneiro
d8c6c827fe
fix: use saturating casts in lean_float_to_uint8 to avoid UB
2022-08-11 13:30:22 -07:00
E.W.Ayers
9ac4cf927d
test: add negative number case
2022-08-11 13:27:37 -07:00
Wojciech Nawrocki
42fec60b01
fix: printing of integral JsonNumbers
2022-08-11 13:27:37 -07:00
Mario Carneiro
7cc8f7c4c4
feat: go to definition for antiquot kinds
2022-08-11 17:46:36 +02:00
pcpthm
cbe9adbe9e
fix: ac_rfl in subgoal
...
Closes #1202
2022-08-11 07:16:38 -07:00
Leonardo de Moura
dda1fd27c4
chore: fix test
2022-08-10 20:31:48 -07:00
Leonardo de Moura
109be66092
chore: fix build
2022-08-10 20:29:39 -07:00
Leonardo de Moura
e67a43ab01
refactor: disable old LCNF and TerminalCases
...
TODO: finish porting them to the new format.
2022-08-10 20:25:59 -07:00
Leonardo de Moura
66eb47d21a
feat: type checker for LCNF
2022-08-10 20:22:38 -07:00
Leonardo de Moura
52f3a3ff2c
refactor: move mkArrow to CoreM
2022-08-10 20:21:42 -07:00
Leonardo de Moura
d61b8fc68d
test: for LCNF types
2022-08-10 11:07:13 -07:00
Leonardo de Moura
646b2d3b83
feat: add Lean.Compiler.compatibleTypes
2022-08-10 10:30:24 -07:00
Gabriel Ebner
e9545a426f
refactor: RpcEncodable
2022-08-10 06:31:46 -07:00
Gabriel Ebner
f9a73cff9c
chore: update stage0
2022-08-10 06:31:46 -07:00
Gabriel Ebner
37547ed887
feat: RpcEncodable derive handler
2022-08-10 06:31:46 -07:00
Gabriel Ebner
067f8e6449
feat: Std.TypeName and Std.Dynamic
2022-08-10 06:31:46 -07:00
Mario Carneiro
0c3383c0b0
feat: support let mut x := e | alt
2022-08-10 06:29:49 -07:00
Mario Carneiro
e51d892fc2
feat: implement USize.toUInt64 model
2022-08-09 18:04:05 -07:00
Leonardo de Moura
18ccc01cf1
feat: add inferType for LCNF
2022-08-09 17:33:24 -07:00
Leonardo de Moura
9e00cbd6d8
feat: add LCNFTypes.lean
2022-08-09 15:47:58 -07:00
Mario Carneiro
a28c19c161
doc: improve typeclass ops documentation
2022-08-09 14:25:44 -07:00
Mario Carneiro
6026894f9f
doc: finish Init.Prelude docs
2022-08-09 14:25:44 -07:00
Sebastian Ullrich
185829d089
chore: update mdBook
...
Resolves #1421
2022-08-09 22:19:40 +02:00
Leonardo de Moura
fbb858a32c
chore: missing case
2022-08-08 23:40:44 -07:00
Leonardo de Moura
1952633a75
chore: compiler simple type experiment
2022-08-08 20:18:46 -07:00
tydeu
f0c79f0954
chore: update Lean version
2022-08-08 18:03:25 -04:00
Leonardo de Moura
860d726d72
chore: update stage0
2022-08-08 05:16:14 -07:00
Leonardo de Moura
0204c5f9b7
chore: remove dead code
2022-08-07 22:13:34 -07:00
Leonardo de Moura
3c6c395e44
feat: add TerminalCases.lean
2022-08-07 22:05:19 -07:00
Leonardo de Moura
7359f95088
refactor: treat casesOn and matcher applications uniformly
2022-08-07 18:04:38 -07:00
Leonardo de Moura
c16bec6e30
refactor: move auxiliary let declaration support to CompilerM.lean
2022-08-07 17:27:40 -07:00
Leonardo de Moura
578adcd7f0
chore: release date for m5
2022-08-07 09:51:35 -07:00
Leonardo de Moura
7dbfaf9b75
fix: bug at mkSizeOfSpecLemmaInstance
...
closes #1441
2022-08-07 09:24:18 -07:00
Mario Carneiro
0b92f625ae
feat: MissingDocs doesn't lint on struct redecl
2022-08-07 08:48:42 -07:00
Leonardo de Moura
413db56b89
refactor: simplify runTermElabM and liftTermElabM
2022-08-07 07:35:02 -07:00
Leonardo de Moura
1c5ec65260
chore: runTermElabM refactor
2022-08-07 07:30:29 -07:00
Leonardo de Moura
e236eeba87
doc: liftTermElabM and runTermElabM
2022-08-07 07:13:06 -07:00
Sebastian Ullrich
4a0917e97a
chore: update stage0
2022-08-07 15:13:34 +02:00
Sebastian Ullrich
d7e14ba47f
feat: openDecl antiquotation
2022-08-07 15:11:07 +02:00
Leonardo de Moura
ee70805c35
feat: add LCNF missing cases
2022-08-06 20:23:29 -07:00
Leonardo de Moura
1d9075db0b
chore: add more helper axioms for code generator
2022-08-06 20:20:50 -07:00
Leonardo de Moura
f9f074dbf5
chore: remove dead code
2022-08-06 20:20:50 -07:00
Leonardo de Moura
c5b5a1c6f9
chore: generate auxiliary variable names manually at LCNF.lean
2022-08-06 20:20:50 -07:00
Wojciech Nawrocki
7b7e2f54da
fix: image paths
2022-08-06 23:46:09 +02:00
Wojciech Nawrocki
962a4bfa78
chore: move includeStr elaborator
2022-08-06 11:54:44 -07:00
Wojciech Nawrocki
bbe11d6e20
doc: clarify widget tutorial
2022-08-06 11:54:44 -07:00
Wojciech Nawrocki
71172fd0ae
fix: unused arg
2022-08-06 11:54:44 -07:00
Wojciech Nawrocki
9b595649bf
hack: rm JavaScript snippet
2022-08-06 11:54:44 -07:00
Wojciech Nawrocki
9c78f6fa0e
feat: make include_str a builtin
2022-08-06 11:54:44 -07:00
Wojciech Nawrocki
3bc82a7636
feat: add include_str
2022-08-06 11:54:44 -07:00
Wojciech Nawrocki
72b9ba0dc5
chore: move tutorial to examples folder
2022-08-06 11:54:44 -07:00
Wojciech Nawrocki
4e2b3b8345
doc: move widgets chapter to Lean file
2022-08-06 11:54:44 -07:00
Wojciech Nawrocki
273bc683b9
feat: widget tutorial and general RequestM lifts
2022-08-06 11:54:44 -07:00
Mario Carneiro
37d3479e7c
doc: add more docs to Init.Prelude
2022-08-06 09:32:16 -07:00
Sebastian Ullrich
3ee9ab855e
fix: logging of linter warnings
2022-08-06 09:25:09 -07:00
Sebastian Ullrich
1ea2f51552
fix: handle warningAsError at logAt
2022-08-06 09:25:09 -07:00
Leonardo de Moura
4167b2466a
fix: improve heuristic for issue #1419
...
The fix #1419 generated two regressions on Mathlib.
Fixes #1435
Fixes #1436
2022-08-06 09:00:16 -07:00
Leonardo de Moura
ab5ec6be34
chore: update stage0
2022-08-06 08:08:58 -07:00
Leonardo de Moura
386b0a75bc
fix: bug at lean_nat_mod
...
fixes at #1433
2022-08-06 08:07:25 -07:00
Leonardo de Moura
bf59ad0efc
feat: add new compiler entry point function
2022-08-06 08:05:07 -07:00
Mario Carneiro
59b32da2d9
feat: go to def on parser aliases
2022-08-06 12:44:14 +02:00
Mario Carneiro
12c8845026
feat: add builtin MissingDocs handler attr
2022-08-06 10:23:53 +02:00
Mario Carneiro
3b43cff7d3
chore: update stage0
2022-08-06 10:23:53 +02:00
Mario Carneiro
ab55af01b3
feat: add builtin MissingDocs handler attr (part 1)
2022-08-06 10:23:53 +02:00
tydeu
a5e0ae7331
chore: fix test
2022-08-06 10:20:54 +02:00
tydeu
e470dad36c
chore: update Lake
2022-08-06 10:20:54 +02:00
Leonardo de Moura
9a16d4afce
feat: add CompilerM.lean and LCNF.lean
2022-08-05 21:14:39 -07:00
tydeu
a7e0e5b50a
release: 4.0.0
2022-08-05 22:51:13 -04:00
tydeu
70172158a4
fix: improve targets/facets UX (e.g., errors when type incorrect)
2022-08-05 22:24:32 -04:00
tydeu
5ae0b979e8
doc: update README and some comments
2022-08-05 22:06:32 -04:00
tydeu
4fba6ae385
chore: bump Lean version
2022-08-05 17:42:00 -04:00
tydeu
c6327e66ca
chore: bump Lake version
2022-08-05 17:38:27 -04:00
tydeu
ecadca6902
feat: make manifest file configurable
...
see leanprover/lake#111
2022-08-05 17:31:04 -04:00
Chris Lovett
c4121e779d
fix: hexDigit ('a' ≤ c ∧ c ≤ 'f')
2022-08-05 14:08:03 -07:00
Leonardo de Moura
ddeea5e14f
chore: fix test output
2022-08-05 13:01:02 -07:00
tydeu
db39141034
feat: replace extraDepTarget with extraDepTargets
2022-08-05 15:48:23 -04:00
Leonardo de Moura
deafc315c7
fix: make forall_congr more robust at conv intro
...
closes #1426
2022-08-05 12:38:49 -07:00
Mario Carneiro
83da649a24
chore: remove typedExpr
2022-08-05 11:42:36 -07:00
Leonardo de Moura
50cecdbb62
chore: add Inhabited MProd and Inhabited PProd instances
...
closes #1420
2022-08-05 11:21:27 -07:00
Mario Carneiro
ea0f177bf2
feat: add unused/deprecation diagnostic tags
2022-08-05 17:45:50 +02:00
Leonardo de Moura
fdaae20594
chore: remove workaround
2022-08-04 21:29:31 -07:00
Leonardo de Moura
42deb66415
chore: update stage0
2022-08-04 21:29:07 -07:00
Leonardo de Moura
7f9be4198b
fix: Induction.lean after binderIdent normalization
2022-08-04 21:28:12 -07:00
Leonardo de Moura
f08000d34a
chore: update stage0
2022-08-04 21:10:20 -07:00
Leonardo de Moura
55bb8e905a
chore: binderIdent normalization
...
fixes #1411
2022-08-04 21:10:02 -07:00
Leonardo de Moura
659300597d
doc: some doc strings for Prelude.lean
2022-08-04 20:55:13 -07:00
Leonardo de Moura
13518da4c7
chore: update stage0
2022-08-04 19:37:58 -07:00
Mario Carneiro
e2f706a7f7
fix: syntax match
2022-08-04 19:35:00 -07:00
Mario Carneiro
c1d2f3c5a6
feat: make MissingDocs extensible
2022-08-04 19:35:00 -07:00
Mario Carneiro
4867e726a6
chore: update stage0
2022-08-04 19:34:57 -07:00
Mario Carneiro
eef51aced2
feat: make MissingDocs extensible (part 1)
2022-08-04 19:32:17 -07:00
tydeu
a889a7387c
test: make test 44 more consistent
2022-08-04 22:23:46 -04:00
Leonardo de Moura
f0272d9309
feat: multiple namespaces in mutual declarations
2022-08-04 19:18:49 -07:00
tydeu
350e1b810a
refactor: split CLI actions into separate file
2022-08-04 21:31:58 -04:00
tydeu
f0ae7bff1e
feat: ws.runBuild
2022-08-04 21:19:23 -04:00
tydeu
9121c4dfa8
feat: facet info param + unique names for facet syntax
2022-08-04 19:55:32 -04:00
Leonardo de Moura
16d6f13eed
chore: fix warnings
2022-08-04 16:05:09 -07:00
Leonardo de Moura
87bb1901e2
chore: update stage0
2022-08-04 16:01:23 -07:00
tydeu
5558ad89a1
refactor: move fetching releases to extraDep build
2022-08-04 18:58:17 -04:00
Leonardo de Moura
7cb67bb123
chore: update stage0
2022-08-04 15:57:45 -07:00
Leonardo de Moura
0717bdb66d
fix: fixes #1419
2022-08-04 15:44:38 -07:00
tydeu
f2bcba7c73
refactor: renames + cleanup
2022-08-04 18:30:53 -04:00
Leonardo de Moura
f295a76b69
chore: fix test output
2022-08-04 15:29:17 -07:00
Leonardo de Moura
8615c42a5d
tests: projection defeq strategy
2022-08-04 15:28:22 -07:00
Leonardo de Moura
4501bdecb1
chore: naming convention
2022-08-04 15:28:22 -07:00
tydeu
b8ed74e89f
feat: recursive builds in extern_lib
2022-08-04 16:58:42 -04:00
Sebastian Ullrich
2f0b65fad3
fix: do not show inaccessible variable in hover
2022-08-04 11:28:46 -07:00
Leonardo de Moura
a30a31b1b0
fix: findDocString?
2022-08-04 10:32:41 -07:00
Leonardo de Moura
85cda05c92
chore: improve expandParen do notation
2022-08-04 10:01:32 -07:00
Leonardo de Moura
0ec56c3367
chore: fix doc string
2022-08-04 08:45:30 -07:00
Leonardo de Moura
1008607b25
chore: cleanup annotate method at Do.lean
2022-08-04 08:44:56 -07:00
Leonardo de Moura
9e69259f83
chore: update stage0
2022-08-03 20:01:34 -07:00
Sebastian Ullrich
abde2e4606
fix: unused variables in foreign definition
2022-08-03 18:15:15 -07:00
Mario Carneiro
f5c5af1e86
doc: document all the syntax categories ( #1401 )
...
* chore: use Category declarations for builtin cats too
* doc: document all the syntax categories
* fix: fix test
2022-08-03 18:13:39 -07:00
Mario Carneiro
e816424466
chore: use Category declarations for builtin cats too ( #1400 )
2022-08-03 18:10:54 -07:00
Leonardo de Moura
84ff8d4a04
feat: store pending contraints during dependent pattern matching
...
It is a better solution for issues #1361 and #1279 , and it was on the
to-do list for a while.
2022-08-03 17:45:55 -07:00
Leonardo de Moura
f2921993bb
feat: add LocalContext.replaceFVarId
2022-08-03 11:21:55 -07:00
Leonardo de Moura
cc91298570
feat: add PersistentHashMap.map and PersistentHashMap.mapM
2022-08-03 11:20:17 -07:00
Leonardo de Moura
e9bcc779fe
feat: add Array.mapM'
2022-08-03 11:18:19 -07:00
Leonardo de Moura
cb6ae247aa
chore: remove [specialize] annotations from fold operations on PersistentHashMap
...
They have little impact on performance, but increase the generated code size
2022-08-03 10:38:31 -07:00
Leonardo de Moura
cbd022e4eb
refactor: replaceFVarIdAtLocalDecl => LocalDecl.replaceFVarId
2022-08-03 10:32:45 -07:00
Leonardo de Moura
b4ad6fc289
chore: do not generate "redundant alternatives" message when there are missing cases
2022-08-03 08:21:09 -07:00
tydeu
19afb95dd7
chore: test 44 shell script fixes
2022-08-03 00:56:50 -04:00
tydeu
5b81042614
ci: add diffutils to Windows MSYS2 setup
2022-08-03 00:42:30 -04:00
tydeu
56cec0b41c
feat: --old to use outdated unchanged modules
...
closes leanprover/lake#44
2022-08-03 00:35:44 -04:00
tydeu
99a0a1ee1f
refactor: remove remainder of Target code
2022-08-02 21:46:51 -04:00
Leonardo de Moura
a9e7290e4b
refactor: use isDefEq instead of custom unify procedure
...
See comment with new issue at #1361
2022-08-02 18:00:00 -07:00
Leonardo de Moura
ae5db0f563
chore: style
2022-08-02 17:44:19 -07:00
Leonardo de Moura
fbef8a32e1
feat: add support for stuck class projection function applications at getStuckMVar?
...
closes #1408
2022-08-02 16:01:06 -07:00
Leonardo de Moura
40226f775f
chore: doc strings for ProjFns.lean
2022-08-02 15:58:56 -07:00
Leonardo de Moura
9d36f45074
chore: cleanup
2022-08-02 14:45:19 -07:00
Leonardo de Moura
2e37582f31
feat: allow users to install their own deriving hanlders for builtin classes
2022-08-02 08:29:24 -07:00
Leonardo de Moura
5df588cbbf
chore: remove unnecessary annotations
2022-08-02 05:42:53 -07:00
Leonardo de Moura
dc51583233
chore: update stage0
2022-08-02 04:59:18 -07:00
Sebastian Ullrich
a44472962d
fix: replace uses of token antiquotations in tactics with with_annotate_state
2022-08-02 04:54:48 -07:00
Sebastian Ullrich
8b235579e3
fix: ignore with_annotate_state for hover/go-to
2022-08-02 04:54:48 -07:00
Sebastian Ullrich
d738e8e392
chore: update stage0
2022-08-02 04:54:48 -07:00
Sebastian Ullrich
0272c30b4b
fix: token antiquotations should create synthetic positions
...
synthetic means synthetic means synthetic
2022-08-02 04:54:48 -07:00
Leonardo de Moura
303e322255
feat: avoid [Decidable p] instance implicit parameters in congruence theorems when possible
2022-08-02 04:47:42 -07:00
Leonardo de Moura
b2f34bdedd
feat: improve congr conv tactic
...
It has better support for proof irrelevant and `[Decidable p]` arguments
2022-08-02 04:26:34 -07:00
Leonardo de Moura
01ce4b9982
feat: use infer_instance to close remaining goals at conv block
2022-08-02 04:24:56 -07:00
Leonardo de Moura
c143631ab1
chore: missing instantiateMVars
2022-08-02 02:24:50 -07:00
Leonardo de Moura
e6d5349abb
chore: unused variable
2022-08-02 02:24:50 -07:00
Leonardo de Moura
3ab26f00ea
refactor: use congr tactic to implement the congr conv tactic
2022-08-02 02:24:50 -07:00
Leonardo de Moura
e79917d9a8
fix: missing instantiateMVars
2022-08-02 02:24:50 -07:00
Leonardo de Moura
4e911765eb
chore: unused vars
2022-08-02 02:24:50 -07:00
Leonardo de Moura
076d40f51c
feat: use implies_congr at congr tactic, and cleanup
2022-08-02 02:24:50 -07:00
Chris Lovett
272c6ebdf1
chore: CI: remove TPIL trigger
...
now a cronjob
2022-08-02 09:08:23 +00:00
tydeu
93c0b44623
doc: correct require syntax docs
2022-08-02 02:26:42 -04:00
tydeu
65825e4210
refactor; cleanup (primarly resolve code)
2022-08-02 01:58:13 -04:00
tydeu
b022a99027
fix: pass pkg linking args to extern lib linking
2022-08-02 00:13:58 -04:00
tydeu
59585d2374
refactor: cleanup logging API (unify BuildIO with LogIO)
2022-08-01 22:37:07 -04:00
Leonardo de Moura
99413a18ff
feat: add congr tactic
2022-08-01 18:44:07 -07:00
Leonardo de Moura
cdd2a624fc
fix: mkHCongr
2022-08-01 18:44:07 -07:00
Leonardo de Moura
815bc95c47
refactor: remove duplication MVarId.applyRefl => MVarId.refl
...
and mark `MVarId.applyRefl` as deprecated.
2022-08-01 18:44:07 -07:00
Leonardo de Moura
a5a70a0543
chore: cleanup
2022-08-01 18:44:07 -07:00
tydeu
d5b6a49054
feat: platform bits in build archive name + related cleanup
2022-08-01 18:50:06 -04:00
Mario Carneiro
5f39370d94
chore: rename skip conv to rfl and add no-op skip
2022-08-01 13:54:36 -07:00
Leonardo de Moura
8781203372
chore: rename misleading function
...
`charToHex` is an auxiliary function used at `Char.quoteCore` for
converting ASCII control characters into `\x` notation.
Its name was misleading.
Closes #1404
2022-08-01 13:21:03 -07:00
Leonardo de Moura
e39eebabd9
fix: move doc string to parser that sets the SyntaxNodeKind for the { tac } notation
...
see #1403
This fixes the hover for `{ tac }`
2022-08-01 13:01:37 -07:00
Leonardo de Moura
c95acef20e
fix: ignore syntax nodes with nullKind at hoverableInfoAt?
...
It fixes one of the problems reported at #1403
2022-08-01 12:18:36 -07:00
Leonardo de Moura
2af7bf1b54
chore: fix link at src/Lean/Server/README.md
...
cc @digama0
2022-08-01 11:12:19 -07:00
Leonardo de Moura
5a8ee410b1
chore: remove infoTree.lean test
...
Motivation: it is not very useful anymore, and more importantly it
breaks all the time because it is affected by how many internal ids
are created by Lean.
2022-08-01 10:02:24 -07:00
Leonardo de Moura
0156b59ef1
chore: enforce naming convention
2022-08-01 09:58:11 -07:00
Mario Carneiro
f235cd8537
doc: document all the convs
2022-08-01 09:28:30 -07:00
Mario Carneiro
5ed3e580ef
fix: allow {} as conv
2022-08-01 08:47:51 -07:00
Mario Carneiro
25aea1b723
doc: document all the tactics
2022-08-01 08:08:03 -07:00
Sebastian Ullrich
de029566d1
fix: unused variables false positive with match
2022-08-01 07:09:08 -07:00
Mario Carneiro
df85fee62c
chore: rename ac_refl to ac_rfl
2022-08-01 06:53:08 -07:00
Mario Carneiro
d92948bc20
chore: prune ancient keywords
2022-08-01 13:32:56 +02:00
Wojciech Nawrocki
161ef7a67c
doc: fix link
2022-08-01 13:03:54 +02:00
Mario Carneiro
114cd3e5cd
doc: add ParserCategory docs
2022-08-01 11:23:09 +02:00
Mario Carneiro
ecb787529a
refactor: rename ref to declName
2022-08-01 11:23:09 +02:00
Mario Carneiro
76eddb06a5
chore: update stage0
2022-08-01 11:23:09 +02:00
Mario Carneiro
711532f5c6
feat: add ref field to ParserCategory
2022-08-01 11:23:09 +02:00
Mario Carneiro
65e2b8a932
feat: track parser names by category
2022-08-01 11:23:09 +02:00
Leonardo de Moura
c76fa06816
chore: update release notes
2022-07-31 18:25:48 -07:00
Mario Carneiro
c952c69690
feat: add missingDocs linter
2022-07-31 18:18:21 -07:00
Mario Carneiro
7cefcf1f61
fix: fix test
2022-07-31 15:42:26 -07:00
Mario Carneiro
89a16daa81
feat: add TokenMap
2022-07-31 15:42:26 -07:00
Mario Carneiro
42a4f2f451
feat: ForIn instance for NameMap and PersistentHashMap
2022-07-31 15:42:26 -07:00
Sebastian Ullrich
e6c7e2dd9f
chore: CI: Nix ccache permissions
2022-07-31 23:06:47 +02:00
Leonardo de Moura
8241c49e11
fix: variable binder update commands
...
This issue was reported by @hrmacbeth at the ICERM after-party hackton.
2022-07-31 10:08:48 -07:00
Mario Carneiro
defaa52f64
chore: update stage0
2022-07-31 16:36:54 +02:00
Sebastian Ullrich
759a7d771f
fix: do not show inferred type on attribute application
2022-07-31 16:36:54 +02:00
Mario Carneiro
603b7486e3
feat: add go-to-def for simple attributes
2022-07-31 16:36:54 +02:00
Leonardo de Moura
08047a178a
chore: update stage0
2022-07-31 06:04:25 -07:00
Leonardo de Moura
8a39a2dd5a
chore: update stage0
2022-07-31 06:01:51 -07:00
Leonardo de Moura
37af11ae20
fix: unused match-syntax alternatives are silently ignored
...
closes #1371
2022-07-31 06:00:08 -07:00
Leonardo de Moura
feb71271e9
fix: remove redundant alternatives
2022-07-31 05:28:14 -07:00
Leonardo de Moura
30efb589a6
chore: update stage0
2022-07-31 04:32:07 -07:00
Leonardo de Moura
2f00d60115
feat: helper parser for issue #1371
2022-07-31 04:30:02 -07:00
tydeu
f4734e35ff
feat: inherit deep desp's revision from dep's manifest
...
closes leanprover/lake#70
2022-07-31 03:16:27 -04:00
Leonardo de Moura
cc032446f4
chore: style
2022-07-30 21:29:12 -07:00
Leonardo de Moura
4c1387b99b
chore: typos
2022-07-30 21:26:08 -07:00
Siddharth
68e26278c7
doc: Add explanations to MetavarContext ( #1331 )
...
* doc: Add explanations to MetavarContext
The explanations were taken from Leo's talk at the ICERM
Mathlib porting hackathon.
* Update src/Lean/MetavarContext.lean
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
* add my understanding of what LocalInstances represents
* Update src/Lean/MetavarContext.lean
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
Co-authored-by: Leonardo de Moura <leonardo@microsoft.com >
2022-07-30 21:24:42 -07:00
Leonardo de Moura
a489bdb107
doc: some doc strings
2022-07-30 21:18:50 -07:00
Leonardo de Moura
ab6af0118c
doc: add inductive command doc string
2022-07-30 15:15:16 -07:00
Leonardo de Moura
f7ca057fea
doc: add some doc strings at Environment.lean
2022-07-30 15:05:13 -07:00
Leonardo de Moura
378f91607c
chore: update stage0
2022-07-30 14:41:45 -07:00
Leonardo de Moura
a63cb24a38
feat: structure field auto-completion
2022-07-30 14:40:21 -07:00
Leonardo de Moura
75f7681a09
chore: update stage0
2022-07-30 10:21:59 -07:00
Leonardo de Moura
83ee9b1a57
feat: auto-completion for dotted identifier notation
2022-07-30 10:21:04 -07:00
Leonardo de Moura
d38fca5f4d
chore: update phoas.lean
...
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/PHOAS.20example/near/291433426
2022-07-30 08:44:18 -07:00
Leonardo de Moura
3dfa895bf0
feat: OfNat instance postprocessor
...
Closes #1389
2022-07-30 08:35:45 -07:00
Leonardo de Moura
0e0a3e1f63
chore: style
2022-07-30 08:35:45 -07:00
Mario Carneiro
323c94ef34
feat: doc comments on anonymous initialize
2022-07-30 11:20:24 +02:00
Mario Carneiro
05e42b51b3
feat: use with_decl_name% in initialize
2022-07-30 11:20:24 +02:00
Leonardo de Moura
78927542b7
chore: doc strings
2022-07-29 21:39:34 -07:00
Leonardo de Moura
ab9b2ea3b2
chore: update stage0
2022-07-29 21:25:33 -07:00
Leonardo de Moura
b2ba20e870
chore: update stage0
2022-07-29 21:25:33 -07:00
Leonardo de Moura
ec7b5c6c2a
chore: remove redundant data form Expr.Data
2022-07-29 21:25:03 -07:00
Leonardo de Moura
fbc6bcff92
chore: remove unnecessary french quotes
2022-07-29 20:53:01 -07:00
Leonardo de Moura
dadab54014
chore: remove unused param
2022-07-29 20:41:38 -07:00
Leonardo de Moura
e6031925c3
fix: bug resolving names when using def _root_.
2022-07-29 19:55:02 -07:00
Leonardo de Moura
e564ae834a
doc: add doc strings
2022-07-29 18:58:36 -07:00
Leonardo de Moura
1b8cda480f
feat: elabAsElim eta-expand when major premises are not provided
2022-07-29 18:31:25 -07:00
Leonardo de Moura
eafd2a88ce
chore: simplify Prelude.lean and Core.lean using elabAsElim
2022-07-29 18:13:56 -07:00
Leonardo de Moura
485406cc55
fix: no hover info on _ at fun _ => ...
2022-07-29 14:53:02 -07:00
Leonardo de Moura
26a565496e
chore: remove dead code
2022-07-29 14:38:00 -07:00
Leonardo de Moura
239a3b9298
chore: cleanup
2022-07-29 14:38:00 -07:00
Sebastian Ullrich
2c1e6a0343
chore: update stage0
2022-07-29 21:44:57 +02:00
Mario Carneiro
9a401c852c
feat: add decl_name% / with_decl_name% macros
2022-07-29 21:42:51 +02:00
Leonardo de Moura
a44ae3c0fa
fix: ensure elabAsElim does not introduce detached info nodes
2022-07-29 12:27:01 -07:00
Leonardo de Moura
6b318ddde6
chore: style
2022-07-29 12:27:01 -07:00
tydeu
c0a04de055
feat: store config rev in manifest and warn on change
...
see leanprover/lake#85
2022-07-29 15:15:39 -04:00
Sebastian Ullrich
3362b38829
chore: more unused variable to-do markers
2022-07-29 19:41:12 +02:00
Sebastian Ullrich
f4de40d7dc
feat: turn on warningAsError
2022-07-29 10:31:19 -07:00
Sebastian Ullrich
f1f0f60768
fix: linter warnings
2022-07-29 10:31:19 -07:00
Sebastian Ullrich
b027946496
feat: suffix linter messages with option name
2022-07-29 10:31:19 -07:00
Sebastian Ullrich
5e6b2a9460
feat: add 'suspicious unexpander patterns' linter
2022-07-29 10:31:19 -07:00
Sebastian Ullrich
e048bbc93a
perf: unused variables linter: early cut-off
2022-07-29 10:31:19 -07:00
Sebastian Ullrich
2a977d8969
refactor: move unused variables linter into separate file
2022-07-29 10:31:19 -07:00
Patrick Massot
435017231d
doc: add some docstrings and docstrings details
2022-07-29 10:30:43 -07:00
Sebastian Ullrich
c11bd6fa97
test: fix foreign function signatures
2022-07-29 14:10:15 +02:00
Ed Ayers
c3f58a7eab
feat: add a message if Lean 4 is called with the Lean 3 extension
2022-07-29 11:08:51 +00:00
tydeu
aed23307b0
chore: correctly mark version as prerelease
2022-07-29 01:15:39 -04:00
tydeu
3cfc0d9f68
feat: cloud build support
2022-07-28 23:31:39 -04:00
Leonardo de Moura
3e4a805b5b
chore: typo
2022-07-28 20:12:20 -07:00
Leonardo de Moura
b0feb0c867
chore: update stage0
2022-07-28 20:08:39 -07:00
Leonardo de Moura
012cb13f51
feat: add [elabAsElim] elaboration strategy
2022-07-28 20:08:29 -07:00
Leonardo de Moura
163fe62ac7
chore: update release notes
2022-07-28 15:18:40 -07:00
Leonardo de Moura
a6c53cf974
fix: fixes #1380
2022-07-28 15:14:50 -07:00
Sebastian Ullrich
a2ccf8f122
feat: accept keywords as constructor names
2022-07-28 12:46:28 -07:00
Mario Carneiro
a0400cbe97
feat: verbosity options for logging + neater build progress
2022-07-28 14:45:23 -04:00
Leonardo de Moura
ee6e2036dd
feat: allow relations in Type at Trans
...
It addresses issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Calc.20mode/near/291214574
2022-07-28 10:13:01 -07:00
Leonardo de Moura
d0d5effcbc
doc: update doc string
2022-07-28 09:48:46 -07:00
Sebastian Ullrich
556358e84c
chore: Nix: better solution for filtering test output
2022-07-28 17:12:17 +02:00
Wojciech Nawrocki
e7f91d2d01
feat: forward all args to server
2022-07-28 15:58:32 +02:00
Wojciech Nawrocki
2744f94ff5
fix: forward memory and stack sizes to server
2022-07-28 15:58:32 +02:00
Leonardo de Moura
10c49d0007
fix: preserve user-facing names and BinderInfo when lifting let-rec declarations
...
closes #1377
2022-07-28 06:36:45 -07:00
tydeu
2d2bed90aa
refactor: Lake.Build.Topological tweaks + docs
2022-07-28 02:26:45 -04:00
Siddharth
a9e22a5119
doc: src/Lean/Declaration.lean ( #1330 )
...
* doc: Add explanations to MetavarContext
The explanations were taken from Leo's talk at the ICERM
Mathlib porting hackathon.
* doc: Add documentation for Declaration
This is explanations taken from Leo's talk given
at the post ICERM Mathlib porting hackathon.
* Update src/Lean/Declaration.lean
Co-authored-by: Scott Morrison <scott@tqft.net >
* Update src/Lean/Declaration.lean
Co-authored-by: Scott Morrison <scott@tqft.net >
* Update src/Lean/MetavarContext.lean
Co-authored-by: Scott Morrison <scott@tqft.net >
* fix depth comment
Co-authored-by: Scott Morrison <scott@tqft.net >
2022-07-27 19:46:11 -07:00
Leonardo de Moura
b5ad9bd4e2
chore: update stage0
2022-07-27 19:38:19 -07:00
Leonardo de Moura
6db01d8e48
perf: simpler isDefEq caching
...
We don't try to reuse the cache contents between different `isDefEq`
calls. Thus, we can cache more results and ignore whether the state of
the metavariable context affects them or not.
Closes #1102
2022-07-27 19:35:45 -07:00
Leonardo de Moura
654a4b0478
fix: add term info at trailing parsers
2022-07-27 18:10:46 -07:00
Leonardo de Moura
388163e023
doc: add some doc strings
2022-07-27 18:02:47 -07:00
Leonardo de Moura
6dcba78338
refactor: improve MVarId method discoverability
...
See issue #1346
2022-07-27 17:49:00 -07:00
Leonardo de Moura
d267b38a91
fix: disable "error to sorry" and "error recovery" at failIfSuccess
...
closes #1375
2022-07-27 17:09:34 -07:00
tydeu
6bb5101256
refactor: pattern TargetConfig off FacetConfig
2022-07-27 19:54:15 -04:00
Leonardo de Moura
888dba815d
chore: update stage0
2022-07-27 16:10:38 -07:00
Leonardo de Moura
49ce4408df
feat: validate parametric local instances
...
Closes #1373
2022-07-27 16:09:56 -07:00
Leonardo de Moura
c210781af8
refactor: add doc strings, cleanup, and dotted notation friendly API
...
See #1346
2022-07-27 16:01:15 -07:00
Leonardo de Moura
00dd9da304
chore: update stage0
2022-07-27 13:41:21 -07:00
Leonardo de Moura
1c770ac8d7
feat: doc strings for declare_syntax_cat
...
see #1374
2022-07-27 13:40:08 -07:00
tydeu
bc8c809d66
refactor; replace ActiveTarget with Job
2022-07-27 16:08:09 -04:00
Leonardo de Moura
1bf53e4fc9
doc: add doc strings for let parsers
2022-07-27 10:56:44 -07:00
Leonardo de Moura
3363ee414b
doc: add doc strings for declarations added by the init_quot command
...
See #1374
2022-07-27 10:17:03 -07:00
Leonardo de Moura
54c5436efb
chore: update stage0
2022-07-27 10:00:57 -07:00
Leonardo de Moura
a7e0976ae6
chore: style
2022-07-27 09:58:52 -07:00
Leonardo de Moura
92d360353c
feat: elaborate add_decl_doc
2022-07-27 09:58:49 -07:00
Leonardo de Moura
5f55422bc2
chore: update stage0
2022-07-27 09:31:53 -07:00
Leonardo de Moura
2c0de29dfd
feat: add add_decl_doc command
2022-07-27 09:30:32 -07:00
Leonardo de Moura
0d43684956
chore: fix some docstrings
2022-07-27 06:46:00 -07:00
Leonardo de Moura
97a5a88ae2
doc: add doc string to simp attribute parser
2022-07-27 06:34:55 -07:00
Leonardo de Moura
c53c4413c4
feat: add doc string to user-defined simp attribute parser
...
see #1374
2022-07-27 06:13:10 -07:00
Leonardo de Moura
635752dd2c
feat: add info node from attributes to their parsers
...
see #1374
2022-07-27 06:12:43 -07:00
tydeu
dd30925ba6
chore: fix targets example
2022-07-27 02:46:36 -04:00
tydeu
1c916b755a
refactor: reduce use of targets + IndexT cleanup
2022-07-27 00:27:12 -04:00
tydeu
226def8b82
refactor: remove many used Target methods
2022-07-26 23:40:29 -04:00
tydeu
6709a795df
fix: apply nameToSharedLib to modTargets too
2022-07-26 23:24:49 -04:00
Leonardo de Moura
ba24f7f57a
chore: update stage0
2022-07-26 18:51:10 -07:00
Leonardo de Moura
ed7f502e54
feat: doc string support for register_simp_attr, register_option, register_builtin_option, declare_config_elab
...
see #1374
2022-07-26 18:46:23 -07:00
Leonardo de Moura
3e7d45aaba
fix: improve finer-grained term infos for do blocks
...
see #1248
This commit adds a small hack to fix the term info for the following `do`-elements
```lean
let (x, y) := ...
let (x, y) ← ...
let mut (x, y) ← ...
let some x ← ... | ...
```
2022-07-26 18:18:05 -07:00
tydeu
8b402c4ee0
refactor: move info into target task
2022-07-26 21:13:43 -04:00
Leonardo de Moura
fffd61cf98
chore: update stage0
2022-07-26 17:56:49 -07:00
Leonardo de Moura
642cf0bc6d
feat: add option pp.showLetValues
...
closes #1345
2022-07-26 17:53:34 -07:00
Leonardo de Moura
0e3f031660
fix: position information for with_annotate_term when coercions are used
...
see #1248
2022-07-26 16:09:45 -07:00
Leonardo de Moura
c22120371e
feat: finer-grained term infos for do blocks
...
closes #1248
2022-07-26 15:47:37 -07:00
Leonardo de Moura
bbad6d1efe
feat: add with_annotate_term
2022-07-26 15:13:28 -07:00
Leonardo de Moura
43c787d1c6
feat: synthesize implicit structure fields in the structure instance notation
...
closes #1305
2022-07-26 13:24:57 -07:00
Leonardo de Moura
e68e448070
fix: convert inductive type instance implicit parameters to implicit when building SizeOf instance
...
It is better for TC resolution since the parameter can be inferred by
typing constraints, and it addresses issue #1373
2022-07-26 12:42:47 -07:00
Leonardo de Moura
642b30ab47
feat: add withInstImplicitAsImplict
2022-07-26 12:35:30 -07:00
tydeu
5e3282347e
refactor: remove facet target helpers
2022-07-26 15:30:11 -04:00
tydeu
33e05e16be
chore: cleanup at recBuildExternalDynlibs
2022-07-26 15:27:01 -04:00
tydeu
a05e35c783
feat: library facets
2022-07-26 15:07:27 -04:00
Leonardo de Moura
d6f0880d11
feat: add option warningAsError
2022-07-26 05:57:54 -07:00
Leonardo de Moura
385cfa6001
fix: fixes #1372
2022-07-26 05:51:02 -07:00
Leonardo de Moura
3896244c55
chore: cleanup
2022-07-25 22:39:56 -07:00
Leonardo de Moura
30199745ad
chore: update stage0
2022-07-25 22:19:59 -07:00
Leonardo de Moura
90fb110cc9
refactor: improve FVarId method discoverability
...
See issue #1346
2022-07-25 22:18:58 -07:00
Leonardo de Moura
db7e546155
fix: Match.unify?
...
closes #1361
2022-07-25 20:30:01 -07:00
Leonardo de Moura
b3b2a07ed0
feat: support dotted notation and named arguments in patterns
2022-07-25 18:19:32 -07:00
Leonardo de Moura
69b7771570
fix: etaArgs and ellipsis at elabAppArgs
...
When `..` is used, we should not eta-expand but add `_`s.
2022-07-25 18:13:32 -07:00
tydeu
97100dcd02
feat: build all CLI targets in the same build pass
2022-07-25 20:48:31 -04:00
Leonardo de Moura
aa267dbc9b
doc: add doc-strings
2022-07-25 17:36:10 -07:00
Leonardo de Moura
c418e8d2c5
fix: use useExplicit := false when processing instance ... where ... notation fields
...
See new test.
2022-07-25 16:53:13 -07:00
Leonardo de Moura
c2a13da58d
fix: ensure let f | ... and let rec f | ... notations behave like the top-level ones with respect to implici lambdas
...
closes #1360
2022-07-25 16:53:13 -07:00
Leonardo de Moura
387b6c22ee
chore: document and cleanup
2022-07-25 16:53:13 -07:00
Sebastian Ullrich
da44604c1b
fix: notation delaborator on over-application
2022-07-25 13:42:37 -07:00
tydeu
f843d29f72
refactor: remove module facet special casing
2022-07-25 15:36:42 -04:00
Leonardo de Moura
40936d52bd
chore: improve [deprecated] example at release notes
2022-07-25 12:32:15 -07:00
Leonardo de Moura
f83846b481
chose: update release notes
2022-07-25 12:28:23 -07:00
Leonardo de Moura
d84fc3aed7
chore: update stage0
2022-07-25 12:22:14 -07:00
Leonardo de Moura
c042e7ba58
feat: add support for "jump-to-definition" at [tactic ...], [commandElab ...] and [termElab ...] attributes
...
see #1350
2022-07-25 12:21:51 -07:00
Leonardo de Moura
afce57386c
chore: doc strings at KeyedDeclsAttribute.lean
2022-07-25 12:20:19 -07:00
Leonardo de Moura
f19b122ab1
feat: add support for "jump-to-definition" at [implementedBy] attribute
...
see #1350
2022-07-25 12:06:55 -07:00
tydeu
1d2ca29f2a
chore: remove package config builtin targets
2022-07-25 14:59:49 -04:00
tydeu
90ba1a6556
chore: start next Lake version
2022-07-25 14:59:39 -04:00
Leonardo de Moura
6fbf15043f
refactor: move InfoState to CoreM
...
We want to be able to update `InfoState` at `AttrM` which is just an
alias for `CoreM`.
I considered defining `AttrM` as `StateRefT InfoState CoreM`, but this
is problematic because we also want to invoke `AttrM` monadic
actions from `MetaM`.
Closes #1350
2022-07-25 11:57:56 -07:00
Leonardo de Moura
c62404a97a
refactor: split InfoTree.lean
2022-07-25 08:41:34 -07:00
Wojciech Nawrocki
12b3573c14
fix: tests
2022-07-25 08:01:27 -07:00
Wojciech Nawrocki
e30ae62dff
refactor: simplify position type
2022-07-25 08:01:27 -07:00
E.W.Ayers
b714e087d6
fix: widgetSourceRegistry now stores the UserWidgetDefinition declaration name instead of WidgetSource
...
This means that the environment extension is not storing a big text object and instead the text
is retrieved from the declaration itself.
2022-07-25 08:01:27 -07:00
E.W.Ayers
591b218607
doc: fix @kha issues
2022-07-25 08:01:27 -07:00
Wojciech Nawrocki
122748ab06
test: strip some more indices
2022-07-25 08:01:27 -07:00
Wojciech Nawrocki
5183887722
test: fix infoTree.lean
2022-07-25 08:01:27 -07:00
E.W.Ayers
28ebf90948
fix: add Inhabited Std.RBMap
2022-07-25 08:01:27 -07:00
E.W.Ayers
8deee553bb
fix: local instances
2022-07-25 08:01:27 -07:00
Ed Ayers
05f79def8c
style: tests/lean/interactive/run.lean
...
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2022-07-25 08:01:27 -07:00
E.W.Ayers
c4c87ebe55
test: remove unused rpc case from runner
2022-07-25 08:01:27 -07:00
E.W.Ayers
67eae54c3d
style: userwidget
2022-07-25 08:01:27 -07:00
E.W.Ayers
839956c75e
doc: update widget docs
...
[skip ci]
2022-07-25 08:01:27 -07:00
E.W.Ayers
18a3d1a34e
fix: widgets are now defined using a UserWidgetDefinition
...
To satisfy https://github.com/leanprover/lean4/pull/1238#discussion_r908839474
2022-07-25 08:01:27 -07:00
Wojciech Nawrocki
0824e6b22b
chore: rebase on 2022-07-10
2022-07-25 08:01:27 -07:00
Wojciech Nawrocki
625be05aa8
chore: use invalidParams error code
2022-07-25 08:01:27 -07:00
E.W.Ayers
4eb97a7954
refactor: getWidgetInfos → getWidgets
...
also rm hash field from UserWidgetInfo because it can be computed in handler instead.
2022-07-25 08:01:27 -07:00
E.W.Ayers
9b5be5a039
chore: remove Json.syntax docstring
2022-07-25 08:01:27 -07:00
E.W.Ayers
b7d70877f7
feat: user widgets
...
See #1225
2022-07-25 08:01:27 -07:00
Leonardo de Moura
262ac674aa
feat: improve runTactic
...
It must catch exceptions.
See #1342
2022-07-25 07:41:50 -07:00
Sebastian Ullrich
005b8aa951
chore: update stage0
2022-07-25 10:13:56 +02:00
Sebastian Ullrich
7272235241
fix: escaped $$x* antiquotation splices
2022-07-25 10:09:58 +02:00
Lars
105bfcc8f0
feat: allow custom ignore functions for the unused variables linter
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2022-07-25 09:16:44 +02:00
tydeu
938516b00c
chore: update Lake
2022-07-25 08:52:00 +02:00
Leonardo de Moura
0ec2b442d1
chore: update stage0
2022-07-24 21:38:48 -07:00
Leonardo de Moura
8335a82aed
refactor: improve MVarId method discoverability
...
See issue #1346
2022-07-24 21:36:33 -07:00
tydeu
afe18ac02e
release: 3.2.2
2022-07-24 22:44:36 -04:00
tydeu
48b1ed711a
chore: bump Lean version
2022-07-24 22:37:48 -04:00
tydeu
b784f8c3af
ci: don't skip after successful duplicate
...
Old duplicate runs can be lost (e.g., on a force push)
2022-07-24 22:00:39 -04:00
tydeu
dc8097dae6
feat: support pkg/ to disambiguate packages
2022-07-24 21:47:34 -04:00
tydeu
10940bf07b
refactor: merge IndexTargets into Index
2022-07-24 21:47:13 -04:00
tydeu
ff23465a04
chore: try to fix meta test script on macOS
2022-07-24 21:43:41 -04:00
tydeu
09e05cc1a9
feat: add do helper for grouping cmds + meta test
2022-07-24 21:43:40 -04:00
tydeu
ac5d83ca15
feat: add meta if helper command for config switchs
2022-07-24 21:43:40 -04:00
Leonardo de Moura
91999d22eb
chore: update stage0
2022-07-24 18:08:31 -07:00
Leonardo de Moura
d9d893e425
chore: fix test
2022-07-24 18:07:54 -07:00
Leonardo de Moura
b6e9d58537
feat: add [deprecated] attribute
2022-07-24 18:06:03 -07:00
Leonardo de Moura
f1f5a4b39e
chore: naming convention
2022-07-24 17:44:29 -07:00
Leonardo de Moura
a62949c49b
refactor: add type LevelMVarId (and abbreviation LMarId)
...
Motivation: make sure we do not mixup metavariable ids for
expression and universe level.
cc @bollu
2022-07-24 17:21:45 -07:00
Leonardo de Moura
949dddbf63
fix: lean_float_array_data
2022-07-24 17:05:28 -07:00
Leonardo de Moura
e0882e098b
chore: avoid stackoverflow in debug build
2022-07-24 14:47:51 -07:00
Leonardo de Moura
2c825de6a1
fix: elim_scalar_array_cases
2022-07-24 14:46:46 -07:00
Leonardo de Moura
5e877b115b
feat: improve calc tactic
...
> Heather suggested changing the calc tactic (not the term) such that if
the final RHS does not defeq match the goal RHS, it returns a final
inequality as a subgoal.
Closes #1342
2022-07-24 14:30:15 -07:00
Leonardo de Moura
fd0581f485
refactor: add Elab/Calc.lean
2022-07-24 13:30:05 -07:00
Leonardo de Moura
c46ef56ac7
perf: avoid blowup at deriving Repr
...
The fix is not perfect. I just avoided inlining in some builtin `Repr` instances.
The actual problem is at `ElimDeadBranches.lean`.
Closes #1365
2022-07-24 13:10:04 -07:00
Leonardo de Moura
5253cc6742
fix: compiler support for FloatArray.casesOn and ByteArray.casesOn
...
closes #1311
2022-07-24 12:36:08 -07:00
Leonardo de Moura
7829be9d54
fix: fixes #1333
2022-07-24 12:19:53 -07:00
Leonardo de Moura
2196a3518e
perf: improve lazy_delta_reduction_step heuristic
...
It addresses a performance issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/performance.20of.20equality.20with.20projections.2Fmutual/near/288083209
2022-07-24 11:48:45 -07:00
Sebastian Ullrich
a941b1b859
chore: one more unused import
2022-07-24 18:24:25 +02:00
Leonardo de Moura
22d37af5c9
feat: improve calc syntax
...
See #1342
2022-07-24 08:32:20 -07:00
Leonardo de Moura
6cff1f1813
fix: try to postpone by .. if expectedType? = none
...
Reason: it may become `some ..` later. See issue #1359
Closes #1359
2022-07-24 08:03:25 -07:00
Leonardo de Moura
28fc2f9d37
fix: improve "{varName} cannot be reassigned" error message
...
closes #1341
2022-07-24 07:44:34 -07:00
Leonardo de Moura
ad5ee05a03
chore: consistent use of backticks in error messages at Do.lean
2022-07-24 07:42:04 -07:00
Leonardo de Moura
8de798c4a6
feat: reject [macroInline] declarations in recursive declarations
...
closes #1363
2022-07-24 07:26:35 -07:00
tydeu
67775edd18
refactor: make LeanLib.buildModules a proper recursive build
2022-07-24 00:34:57 -04:00
tydeu
abe8e8b1f8
docs: touch-up of Lake.Util.Family comments
2022-07-23 22:07:34 -04:00
tydeu
d68029092a
refactor: simplify FacetConifg and build monads ala leanprover/lake#107
...
closes leanprover/lake#107
2022-07-23 19:39:47 -04:00
Sebastian Ullrich
6a767a66a1
perf: reduce Lean.Parser.Basic imports
2022-07-23 23:01:52 +02:00
Sebastian Ullrich
e5891850a7
doc: update RELEASES.md
2022-07-23 17:09:32 +02:00
Sebastian Ullrich
5160cb7b0f
refactor: remove some unnecessary antiquotation kind annotations
2022-07-23 17:09:32 +02:00
Sebastian Ullrich
cf380956a3
fix: regression from previous commit
2022-07-23 17:09:32 +02:00
Sebastian Ullrich
29b7289b11
chore: update stage0
2022-07-23 17:09:32 +02:00
Sebastian Ullrich
b1a9c58d43
feat: relax eager antiquotation parsing
2022-07-23 17:09:32 +02:00
Sebastian Ullrich
9e9786203f
doc: fix minted example
2022-07-23 15:14:44 +02:00
tydeu
1256453ad5
refactor: move mod/pkg facets from pkg to ws
2022-07-22 17:56:06 -04:00
Mario Carneiro
f6211b1a74
chore: convert doc/mod comments from /- to /--//-! ( #1354 )
2022-07-22 12:05:31 -07:00
Sebastian Ullrich
40c1bde7f1
feat: trace for backtracked tactic exceptions
2022-07-22 11:49:50 -07:00
Sebastian Ullrich
5e9ca825d1
refactor: simplify evalTactic backtracking
2022-07-22 11:49:50 -07:00
Leonardo de Moura
8f4ad15a47
fix: ensure messages associated with last exception are not lost at evalTactic
...
closes #1358
2022-07-22 12:05:29 -04:00
Mario Carneiro
fc34cd2b8e
chore: convert doc/mod comments from /- to /--//-!
2022-07-22 10:46:14 -04:00
Sebastian Ullrich
1f081ee6cb
feat: doc comment support for unif_hint
2022-07-22 14:30:49 +02:00
Sebastian Ullrich
ce0a0166e8
chore: update stage0
2022-07-22 14:30:49 +02:00
Sebastian Ullrich
8e07e80f72
feat: docComment parser alias
2022-07-22 14:30:49 +02:00
Sebastian Ullrich
a10a5335ba
fix: do not highlight module docstrings
...
Fixes #1353
2022-07-22 13:47:47 +02:00
Gabriel Ebner
4d5515ab0c
fix: do not use native_decide
2022-07-22 13:06:04 +02:00
Mario Carneiro
f36f94a0e3
fix: malformed/misaligned markdown code fences (part 2)
2022-07-22 13:03:02 +02:00
tydeu
6caea9306c
feat: resolve depss while loading a pkg
2022-07-22 04:46:44 -04:00
Sebastian Ullrich
5d187b8beb
fix: register tokens in parser quotation
2022-07-21 23:49:57 +02:00
Sebastian Ullrich
563d42f6d6
fix: make foApprox mdata-invariant
2022-07-21 14:05:47 -07:00
Andrés Goens
b36b50adb2
feat: syntax for using while condition in proofs
2022-07-21 16:57:35 +00:00
tydeu
bd7739d02e
chore: add sanity check for SemanticTokenType/Modifier.names
2022-07-21 18:36:52 +02:00
Henrik Böving
8932878274
feat: Functor instance for List
2022-07-21 08:08:48 -07:00
E.W.Ayers
5dda654766
feat: make elabSimpArgs public
...
This is used in two places in mathlib4.
2022-07-21 05:37:56 -07:00
Leonardo de Moura
6d17e8abbf
chore: ICERM notation demo
2022-07-21 08:13:20 -04:00
Leonardo de Moura
64b7b857f1
chore: ICERM attribute demo
2022-07-21 07:38:47 -04:00
Leonardo de Moura
977329ce1c
chore: ICERM examples
2022-07-21 06:49:47 -04:00
tydeu
a6cc5f3a9d
doc: mention types of root(s)/lib/exeName in README
...
closes leanprover/lake#105
2022-07-20 19:38:09 -04:00
Leonardo de Moura
b581c2fa17
fix: evalTactic
...
Another bug reported by Patrick.
2022-07-20 19:12:53 -04:00
Yuri de Wit
dc8e404d15
chore: renamed constant to opaque
2022-07-20 15:35:40 -07:00
Scott Morrison
aeeaaa6efc
feat: size of a LocalContext
2022-07-20 15:31:10 -07:00
E.W.Ayers
b9c0fd2ab3
doc: fix AppBuilder docs
2022-07-20 15:30:30 -07:00
E.W.Ayers
5bf5abe84f
test: update 533 test to include docstring
2022-07-20 15:30:30 -07:00
E.W.Ayers
caa2d9d80f
doc: AppBuilder.lean
2022-07-20 15:30:30 -07:00
E.W.Ayers
14156f5e6a
doc: fix assignExprMVar
2022-07-20 15:30:30 -07:00
Ed Ayers
0bfee4fe1f
doc: apply suggestions from code review
...
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2022-07-20 15:30:30 -07:00
E.W.Ayers
64dec36ae3
doc: various docstrings
2022-07-20 15:30:30 -07:00
E.W.Ayers
8fe76ba9f4
doc: prelude Nat, Fin, USize
2022-07-20 15:30:30 -07:00
Sebastian Ullrich
c43a84ca30
fix: unsafe initialize
2022-07-20 22:37:01 +02:00
Sebastian Ullrich
b5417bdc6c
chore: update stage0
2022-07-20 22:12:20 +02:00
Sebastian Ullrich
15bb3ccf6b
chore: reduce TSyntax.Compat scope in Elab.Declaration
2022-07-20 22:12:20 +02:00
Sebastian Ullrich
cdb855d281
feat: support all sensible modifiers on (builtin_)initialize
...
Resolves #1324
2022-07-20 22:12:20 +02:00
Mario Carneiro
a2ef6bd19e
fix: malformed/misaligned markdown code fences
2022-07-20 11:12:42 +02:00
Leonardo de Moura
3846dd60fd
fix: evalTactic
...
This commit fixes bug reported by Patrick Massot.
It happened when using `macro_rules` and `elab_rules` for the same
`SyntaxNodeKind`.
It also fixes missing error messages when there is more than one
elaboration functions and there is `abortTactic` exception.
Remark: this commit also changes the evaluation order. Macros are
now tried before elaboration rules. The motivation is that macros are
already applied before elaboration functions in the term elaborator.
2022-07-19 23:28:14 -04:00
Leonardo de Moura
6558f56c29
fix: rename tactic
2022-07-19 23:28:14 -04:00
Leonardo de Moura
013b9e14f7
chore: fix typo
2022-07-19 23:28:14 -04:00
Gabriel Ebner
f2e7cbfbaf
chore: use inaccessible name for RpcEncodingPacket
2022-07-19 22:55:42 +02:00
Gabriel Ebner
4ce56f7c05
fix: use field names if specified
2022-07-19 22:55:42 +02:00
Gabriel Ebner
59f528e678
fix: support empty inductives in json derive
2022-07-19 22:55:42 +02:00
Gabriel Ebner
2c0f8fac99
feat: support unused params in RpcEncoding deriver
2022-07-19 22:55:42 +02:00
Gabriel Ebner
d36552848c
chore: hide weird RpcEncoding behind Nonempty
2022-07-19 22:55:42 +02:00
Gabriel Ebner
ed5e0f098c
fix: support non-type params in RpcEncoding
2022-07-19 22:55:42 +02:00
Gabriel Ebner
62ede1fdfd
chore: update test
2022-07-19 22:55:42 +02:00
Gabriel Ebner
cde339c2fb
feat: support recursive types in RpcEncoding
2022-07-19 22:55:42 +02:00
Gabriel Ebner
b7bcb1616a
chore: add inhabited instance for RpcEncoding
...
This allows us to define RpcEncodings as partial defs.
2022-07-19 22:55:42 +02:00
Gabriel Ebner
bcf2bf994b
chore: exploit that command* is command as well
2022-07-19 22:55:42 +02:00
Gabriel Ebner
89dfff24ce
chore: avoid $(mkIdent ``foo)
2022-07-19 22:55:42 +02:00
Gabriel Ebner
76e8a40237
chore: pick slightly nicer user-facing names
2022-07-19 22:55:42 +02:00
Gabriel Ebner
8b9c7ebf43
chore: simplify deriveWithRefInstance
2022-07-19 22:55:42 +02:00
Gabriel Ebner
bffd762822
feat: improve RpcEncoding derive test
2022-07-19 22:55:42 +02:00
Gabriel Ebner
c81b10f296
perf: implement Level.update* in Lean
2022-07-19 05:55:13 -07:00
Gabriel Ebner
eda3eae18e
perf: implement Expr.update* in Lean
2022-07-19 05:55:13 -07:00
Sebastian Ullrich
1611cf63c3
fix: make document symbols request deterministic
2022-07-19 12:23:03 +02:00
tydeu
9d4a72bf6a
feat: up to spec SemanticTokens/Type/Modifier
2022-07-19 11:57:57 +02:00
Sebastian Ullrich
987785242f
fix: disable auto implicits in structure field default values
2022-07-18 21:09:56 -07:00
Ed Ayers
2d28a9dd94
doc: explain AttributeKind ( #1316 )
2022-07-18 21:04:18 -07:00
Scott Morrison
5c79973300
feat: allow an ApplyConfig argument at constructor tactic ( #1319 )
2022-07-18 21:02:31 -07:00
Leonardo de Moura
73fce217f6
test: for issue #1321
2022-07-18 23:50:41 -04:00
Leonardo de Moura
678cfda909
chore: update stage0
2022-07-18 23:44:45 -04:00
Leonardo de Moura
e1fc904786
feat: attributes on syntax
...
closes #1321
2022-07-18 23:37:11 -04:00
Leonardo de Moura
3325987be4
chore: fix tests
2022-07-18 23:18:59 -04:00
Leonardo de Moura
d95163641a
chore: indent docstrings
2022-07-18 22:36:55 -04:00
Leonardo de Moura
3691fb2c34
chore: update stage0
2022-07-18 22:29:56 -04:00
Leonardo de Moura
c341d8432f
feat: remove leading spaces from docstrings
2022-07-18 22:18:15 -04:00
Leonardo de Moura
da71dd3d77
chore: docstring
2022-07-18 22:16:32 -04:00
Leonardo de Moura
e8b58abdb2
chore: remove dead code
2022-07-18 22:16:32 -04:00
Sebastian Ullrich
be11e8e29b
doc: missing linebreak
2022-07-18 22:31:16 +02:00
Mac
ad0288d767
feat: allow registering/chaining LSP handlers in initialize
2022-07-18 09:38:30 +02:00
Leonardo de Moura
5083d47e4d
doc: some Syntax
2022-07-17 17:57:33 -04:00
Leonardo de Moura
7331fdf310
doc: Expr.lean
2022-07-17 17:28:28 -04:00
Leonardo de Moura
875b3c84b4
fix: bug at Match.lean
2022-07-17 14:55:57 -04:00
Leonardo de Moura
7cb011e94c
doc: Expr.lean
2022-07-17 14:49:55 -04:00
Leonardo de Moura
2116f69315
chore: unused variables
2022-07-17 13:04:08 -04:00
Gabriel Ebner
3edf22f3f5
fix: crash in binop%
2022-07-17 09:57:56 -07:00
Sebastian Ullrich
8972cc9baf
chore: Nix: cache Leanc-deps
2022-07-16 16:19:01 +02: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
Sebastian Ullrich
6bf7648941
doc: spurious space
2022-07-16 14:51:16 +02:00
tydeu
aaf3c1e959
refactor: split config elab into its own file
2022-07-15 21:42:20 -04:00
tydeu
695b8f9b5d
refactor: move all manifest code to its file + split Package.load
2022-07-15 21:06:55 -04:00
tydeu
ab528009ee
refactor: move config loading code into its own directory
2022-07-15 16:38:35 -04:00
tydeu
5f9166c621
test: try to fix sed script for test 104 for MacOS
2022-07-15 15:58:13 -04:00
tydeu
f93a47de69
fix: do not fetch if dep rev matches manifest
...
also add some warnings on url/manifest mismatch + other minor cleanup
closes leanprover/lake#104
2022-07-15 15:11:27 -04:00
Sebastian Ullrich
392c72db86
chore: Nix: renderLean/renderDir
2022-07-15 18:44:17 +02:00
Sebastian Ullrich
0835145246
feat: ppCategory
2022-07-15 10:58:29 +02:00
tydeu
23a578c37c
refactor: add LawfulCmpEq + post-PR cleanup
2022-07-14 18:11:12 -04:00
tydeu
32f870a994
chore: update Lean version
2022-07-14 15:04:45 -04:00
Gabriel Ebner
f76b488fd5
chore: hash field in Name was dropped
2022-07-14 15:04:45 -04:00
tydeu
5cd2d85515
doc: add trace to glossary + cleanup
2022-07-14 14:47:51 -04: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
123fd801cb
doc: linter utils
2022-07-13 10:35:37 +02:00
larsk21
9980123291
fix: check if variables are used first
2022-07-13 10:35:37 +02:00
larsk21
70aff92f8f
fix: short-circuit ignore functions in unused variables linter
2022-07-13 10:35:37 +02:00
larsk21
9fcae6ffe9
fix: replace constant with opaque
2022-07-13 10:35:37 +02: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
d0222990d0
chore: update stage0
2022-07-12 18:40:33 -07: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
95f3f6b811
chore: update stage0
2022-07-12 18:14:29 -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
a0e459999b
chore: cleanup
2022-07-12 17:36:04 -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
ca4bd67746
chore: cleanup
2022-07-12 16:42:31 -07:00
Leonardo de Moura
b8ed579289
fix: fixes #1300
2022-07-12 14:08:47 -07:00
Leonardo de Moura
1235832314
feat: add runPendingTacticsAt (e : Expr)
2022-07-12 14:07:55 -07:00
Leonardo de Moura
e03e0bd254
refactor: split syntheticMVars into a map and todo-stack
2022-07-12 13:07:36 -07:00
Leonardo de Moura
64dbbb50f8
chore: cleanup
2022-07-12 09:26:00 -07:00
tydeu
e498ff1aa8
doc: add glossary of Lake terminology to README
...
also added missing doc on `LeanLibConifg.srcDir`
2022-07-12 01:43:50 -04:00
tydeu
68b81ca065
refactor: intro Lake.Env & add it to Workspace
...
also `LakeConfig` -> `LoadConfig`
2022-07-11 23:06:19 -04:00
Leonardo de Moura
309f8d6bf9
fix: implicit arguments must be processed with at least default transparency
...
see #1299
2022-07-11 19:11:46 -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
Leonardo de Moura
4d81c609cc
chore: cleanup
2022-07-11 18:52:55 -07:00
Leonardo de Moura
3fd2250799
feat: add higherOrderOutParam to ParamInfo
...
Helper info for #1299
2022-07-11 18:52:01 -07:00
Leonardo de Moura
709f22c8e4
feat: add field dependsOnHigherOrderOutParam to ParamInfo
...
See issue #1299
2022-07-11 17:49:49 -07:00
Leonardo de Moura
591c53b3e9
chore: update stage0
2022-07-11 17:24:36 -07:00
Leonardo de Moura
f657aed798
feat: store outParam positions
2022-07-11 17:21:31 -07:00
Leonardo de Moura
0b1fde64ee
chore: update stage0
2022-07-11 16:46:02 -07:00
Leonardo de Moura
dfc88ef99f
chore: use a[i]
2022-07-11 16:44:52 -07:00
Leonardo de Moura
af1e670270
chore: fix typo
2022-07-11 15:46:54 -07:00
Gabriel Ebner
7e380bf236
chore: update stage0
2022-07-11 14:19:41 -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
e0104b94e5
chore: update stage0
2022-07-11 14:19:41 -07:00
Gabriel Ebner
23113501f4
chore: prepare for Name refactoring
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
tydeu
2e38df619c
fix: Glob.forEachModuleIn
...
closes leanprover/lake#102
2022-07-11 15:45:50 -04:00
Gabriel Ebner
86ccba8c87
chore: update release notes
2022-07-11 12:26:53 -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
3a55228be0
chore: prepare for bootstrapping
2022-07-11 12:26:53 -07:00
Gabriel Ebner
b1eb022027
feat: computed fields
2022-07-11 12:26:53 -07:00
Gabriel Ebner
b48061ed23
feat: expose lower level compile function
2022-07-11 12:26:53 -07:00
Gabriel Ebner
18a299f576
feat: allow implementedBy on constructors and casesOn
2022-07-11 12:26:53 -07:00
Gabriel Ebner
5024c15a7a
feat: add getConstInfoDefn
2022-07-11 12:26:53 -07:00
Gabriel Ebner
3776e3c925
feat: generalize unsafeCast to Sort
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
2fcd406f99
chore: remove sorry
2022-07-10 20:04:06 -07:00
Leonardo de Moura
ee0735760a
feat: add instance : GetElem (List α) Nat α fun as i => i < as.length
2022-07-10 17:38:59 -07:00
Leonardo de Moura
0c5dfd78d7
chore: style
2022-07-10 15:26:26 -07:00
Leonardo de Moura
475c7e18cd
chore: missing GetElem instances
2022-07-10 14:53:22 -07:00
Sebastian Ullrich
fe5d95e7e3
fix: flake.nix
2022-07-10 22:57:44 +02:00
Leonardo de Moura
fd0e9e1c52
chore: fix typo
2022-07-10 10:15:29 -07:00
Leonardo de Moura
351fc6ea04
chore: update release notes
2022-07-10 09:43:25 -07:00
Leonardo de Moura
4173a863d8
chore: cleanup
2022-07-10 09:43:12 -07:00
Leonardo de Moura
c82f74d094
chore: update stage0
2022-07-10 09:17:43 -07:00
Leonardo de Moura
451abdf79d
fix: Level.update* functions
...
see #1291
2022-07-10 09:16:02 -07:00
Leonardo de Moura
ef4bf93315
chore: update stage0
2022-07-10 08:39:39 -07:00
Leonardo de Moura
ba606debf7
fix: Expr.update* issue
...
See #1291
2022-07-10 08:33:14 -07:00
Leonardo de Moura
f1d84a5096
perf: use dsimp := false in split tactic and while proving equation theorems
...
It is just a waste in these two cases.
It now takes 0.78 secs to process example on issue #1287 .
closes #1287
2022-07-10 08:03:42 -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
394d49da58
perf: Expr.hasSorry and similar functions
...
Functions were ignoring sharing while traversing `Expr`.
Addresses performance problem exposed by #1287
2022-07-10 07:39:38 -07:00
Leonardo de Moura
2f1b80721e
chore: avoid a[i]' h notation
2022-07-10 07:20:07 -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
23bae264fd
perf: add cache for check (e : Expr) : MetaM Unit
...
Address one of the performance problems exposed by #1287
2022-07-09 20:09:15 -07:00
Leonardo de Moura
20d6b9c4aa
doc: add new example
2022-07-09 17:04:08 -07:00
Leonardo de Moura
49951b87b9
chore: update release notes
2022-07-09 17:02:15 -07:00
Leonardo de Moura
6797e846d7
chore: update stage0
2022-07-09 16:46:00 -07:00
Leonardo de Moura
881589fc46
chore: remove parser workarounds
2022-07-09 16:42:39 -07:00
Leonardo de Moura
63067b896a
chore: update stage0
2022-07-09 16:19:10 -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
e55684b0c0
chore: update stage0
2022-07-09 16:04:54 -07:00
Leonardo de Moura
fd371ea812
chore: remove getOp builtin support
2022-07-09 16:04:17 -07:00
Leonardo de Moura
36ebccb822
chore: fix tests
2022-07-09 15:59:44 -07:00
Leonardo de Moura
e4b358a01e
refactor: prepare to elaborate a[i] notation using typeclasses
2022-07-09 15:24:22 -07:00
Leonardo de Moura
e30ac86bd5
chore: update stage0
2022-07-09 14:44:47 -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
a6151a9708
chore: update stage0
2022-07-09 12:20:35 -07:00
Leonardo de Moura
0074038405
fix: missing term info
2022-07-09 12:19:10 -07:00
tydeu
62bdde1548
chore: update Lean version
2022-07-09 15:08:09 -04:00
Leonardo de Moura
2f6eb84ace
chore: cleanup
2022-07-09 12:06:29 -07:00
Sebastian Ullrich
03da79a603
fix: restore script arg syntax
2022-07-09 15:05:19 -04:00
Sebastian Ullrich
1ea2a52448
chore: adapt to simpleBinder removal
2022-07-09 15:05:18 -04:00
Leonardo de Moura
b33aa09384
chore: the for in elaborator now propagates the element type to the body
2022-07-09 14:54:40 -04:00
Leonardo de Moura
2873a1b250
chore: unused variable warningns
2022-07-09 07:52:59 -07:00
Leonardo de Moura
defff00787
chore: remove workaround
2022-07-09 07:47:05 -07:00
Sebastian Ullrich
61b01ea3b3
Revert "chore: work around for type inference"
...
This reverts commit 6c64b1b20b .
2022-07-09 10:47:38 +02:00
tydeu
25d3860823
feat: lake exe CLI to run workspace exes
...
closes leanprover/lake#82
2022-07-09 02:47:01 -04:00
Sebastian Ullrich
b57ca74794
chore: skip elan test if no elan found
2022-07-08 23:05:12 -04:00
Sebastian Ullrich
49a025889a
chore: remove redundant declaration in .envrc
2022-07-08 23:05:12 -04:00
Sebastian Ullrich
a45d86cb96
chore: update flake.nix
2022-07-08 23:05:12 -04:00
tydeu
958e3fc4da
feat: add shorthands for lake script run/list
...
closes leanprover/lake#88
2022-07-08 23:03:42 -04:00
tydeu
ca04bf9b43
refactor: reorg cli code some (e.g., split cmds into defs)
2022-07-08 22:51:07 -04:00
Leonardo de Moura
b204ed8cee
chore: update stage0
2022-07-08 17:33:11 -07:00
Leonardo de Moura
7e578bc122
chore: update stage0
2022-07-08 17:30:07 -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
71edf731f9
fix: missing withFreshMacroScope
2022-07-08 17:25:29 -07:00
Leonardo de Moura
b8991586bd
chore: update stage0
2022-07-08 16:55:44 -07:00
Leonardo de Moura
eb06b90b17
chore: add workaround
2022-07-08 16:54:44 -07:00
Leonardo de Moura
39f598a3e1
chore: update Lake
2022-07-08 16:42:18 -07:00
Leonardo de Moura
77b68688e7
chore: update stage0
2022-07-08 16:36:52 -07:00
Leonardo de Moura
d50b33175d
feat: improve forIn elaborator element type propagation
2022-07-08 16:34:42 -07:00
tydeu
0fbd7a866a
feat: replace __args__ with get_config? + related refactors
2022-07-08 19:00:52 -04:00
Leonardo de Moura
7cf31f7360
chore: update comment
2022-07-08 15:34:09 -07:00
Leonardo de Moura
3c7053635b
chore: update stage0
2022-07-08 15:31:26 -07:00
Leonardo de Moura
e4e0f775d6
feat: improve outParam as result type support
2022-07-08 15:29:48 -07:00
Sebastian Ullrich
32118a832d
fix: update to adjusted Lake update
2022-07-08 23:24:30 +02:00
Sebastian Ullrich
0f6bda61c9
chore: Nix: buildLeanPackage devShell
2022-07-08 23:24:04 +02:00
Sebastian Ullrich
f5eaa525b3
chore: disable Nix macOS once more
...
I guess it's not that attractive without ARM support anyway
2022-07-08 23:01:50 +02:00
Sebastian Ullrich
8f70c346fd
chore: Nix: fix develop shell
2022-07-08 21:49:50 +02:00
Leonardo de Moura
2472a6a1ea
chore: fix build
...
Another ugly hack to survive until we port the code generator to Lean.
2022-07-08 10:34:50 -07:00
Sebastian Ullrich
7ee5203dbb
chore: update stage0
2022-07-08 19:06:10 +02:00
Sebastian Ullrich
d7bcc271be
refactor: avoid nested sequence in simpleBinder
2022-07-08 19:06:10 +02:00
Sebastian Ullrich
75b0b50983
fix: backtrack on unexpected non-identifier in parenthesizer
2022-07-08 14:49:08 +02:00
Sebastian Ullrich
4f1c3faa6e
chore: Nix: re-enable nix develop on bare derivations
2022-07-08 14:49:08 +02:00
Sebastian Ullrich
6d1b2094e9
chore: nix flake update
...
This comes with ccache 4.6.1, which seems to fix the specific
miscompilation I managed to reproduce with 4.6.0
2022-07-08 13:46:57 +02:00
Leonardo de Moura
5455c16fc5
chore: update stage0
2022-07-07 23:41:00 -07: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
438fce8da7
chore: update stage0
2022-07-07 23:03:06 -07:00
Leonardo de Moura
8f8bb8c940
chore: update stage0
2022-07-07 23:01:06 -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
d6a73bf03c
chore: update stage0
2022-07-07 20:26:40 -07:00
Leonardo de Moura
c9771fa1b2
chore: unused variables
2022-07-07 20:24:18 -07:00
Leonardo de Moura
58619291e9
feat: better qualified name support in recursive definitions
2022-07-07 20:15:25 -07:00
tydeu
185e10f6f3
misc: hoist facet name check to load + related bugfixes/refactors
2022-07-07 21:38:55 -04:00
tydeu
c45088b2ea
chore: start next Lake version
2022-07-07 21:38:54 -04: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
dd924e5270
chore: remove codegen option
...
We should use `noncomputable` modifier instead.
closes #1288
2022-07-07 08:18:30 -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
305866dba2
feat: "linting" profiler metric
2022-07-07 14:23:59 +02:00
Sebastian Ullrich
29bdc0ceac
fix: bound syntax kind at v:(ppSpace ident) etc.
2022-07-07 11:49:35 +02:00
Leonardo de Moura
0c30372f93
doc: add todo for expandDelayedAssigned
2022-07-06 20:08:12 -07:00
Leonardo de Moura
2494f1d4a4
chore: fix doc
2022-07-06 19:56:25 -07:00
Leonardo de Moura
ddae76aed2
chore: update stage0
2022-07-06 19:46:15 -07:00
Leonardo de Moura
0cecbe2ce6
chore: update stage0
2022-07-06 19:43:57 -07:00
Leonardo de Moura
71550c55a9
fix: @ scope
2022-07-06 19:42:43 -07:00
Leonardo de Moura
2fcb784372
feat: default value for coeAtOutParam parameter
2022-07-06 19:00:32 -07:00
Leonardo de Moura
01d0ca8cfe
doc: coeAtOutParam todo's
2022-07-06 18:58:40 -07:00
Leonardo de Moura
f8c7bd71aa
fix: position information for toStream application at do-notation
2022-07-06 18:50:45 -07:00
Leonardo de Moura
c5e00c2bde
fix: do not create coercion placeholder if function is partially applied
2022-07-06 18:38:11 -07:00
Leonardo de Moura
645c3e777d
feat: disable coeAtOutParam when @ (aka explicit = true) is used
2022-07-06 18:31:39 -07:00
Leonardo de Moura
0425fabf8f
test: test for output parameter + coercion issue
2022-07-06 16:55:08 -07:00
Leonardo de Moura
42548adc5d
fix: typo at addImplicitArg
2022-07-06 16:53:57 -07:00
Leonardo de Moura
9ba65fee83
fix: a coercion around an output parameter (and promotion to synthetic opaque) should only be used if there in no other way to infer parameter
...
We need this refinement for declarations such as
```
def add_one {X} [Trait X] [One (Trait.R X)] [HAdd X (Trait.R X) X] (x : X) : X := x + (One.one : (Trait.R X))
```
from test 948.lean
2022-07-06 16:38:39 -07:00
Leonardo de Moura
ab16278ce4
fix: missing synthesizeSyntheticMVars at elabSubst
2022-07-06 16:15:29 -07:00
Leonardo de Moura
aa9167834b
fix: coeAtOutParam can only be used after Coe.lean
2022-07-06 16:06:11 -07:00
Leonardo de Moura
55ad7beb8d
feat: add coercion placeholder for applications that return an output parameter of a local instance
2022-07-06 15:42:39 -07:00
Leonardo de Moura
e7bc114ba2
fix: bug at withAssignableSyntheticOpaque
2022-07-06 15:24:17 -07:00
Leonardo de Moura
ec4794ad10
chore: use withAssignableSyntheticOpaque
2022-07-06 15:24:17 -07:00
Leonardo de Moura
608a306ef0
refactor: simplify/cleanup DelayedMetavarAssignment
2022-07-06 15:24:17 -07:00
Leonardo de Moura
81ed8b0b32
chore: cleanup
2022-07-06 15:24:17 -07:00
Sebastian Ullrich
d679044a9b
chore: Nix: use --deps-json for faster, single IFD per package
2022-07-06 16:12:30 +02:00
Sebastian Ullrich
ec991f3761
chore: update stage0
2022-07-06 16:12:30 +02:00
Sebastian Ullrich
775ed70a84
feat: add lean --print-deps-json
2022-07-06 16:12:30 +02:00
Sebastian Ullrich
a16eff2996
chore: Nix: implement roots
2022-07-06 16:12:30 +02:00
Leonardo de Moura
38e1f6ba82
fix: missing instantiateMVars
2022-07-05 20:45:53 -07:00
Leonardo de Moura
0a5df7cd6d
chore: style
2022-07-05 20:45:53 -07:00
tydeu
6e4bca57c8
chore: update Lake
2022-07-05 17:27:41 -07:00
tydeu
ee59d66268
release: 3.2.1
2022-07-05 19:28:40 -04:00
tydeu
adc6317e7b
chore: bump Lean version
2022-07-05 19:15:45 -04:00
tydeu
958f38b31e
feat: setup lean/lake env for server even if config has errors
2022-07-05 19:08:47 -04:00
tydeu
0a53ecb768
feat: add module file path helpers
2022-07-05 18:10:37 -04:00
tydeu
44f8e27a29
refactor: LeanExe.facet -> exeFacet
2022-07-05 17:46:44 -04:00
tydeu
3229d5084c
fix: properly update deps w/ no branch or dir but no manifest
...
closes leanprover/lake#94
2022-07-05 17:36:38 -04:00
Leonardo de Moura
91d48c9150
chore: update stage0
2022-07-05 14:29:45 -07:00
Leonardo de Moura
627594b88a
fix: "dot"-notation should apply default instances before failing
...
See new test for motivating example.
2022-07-05 14:27:55 -07:00
Leonardo de Moura
13a49da496
chore: update stage0
2022-07-05 13:25:50 -07:00
Leonardo de Moura
2b2d4245dc
fix: extensible tactics bug
...
See comment at `expandMacros`
2022-07-05 13:20:22 -07:00
tydeu
df8085b7c2
fix: don't set LEAN_CC unless necessary + detect src dirs
...
closes leanprover/lake#93
2022-07-05 15:41:33 -04:00
Siddharth Bhat
e6629b760d
fix: Clearer error message for cast(▸) notation
...
The old error message said:
```
throwError "invalid `▸` notation,
expected type{indentExpr expectedType}\ndoes contain
equation left-hand-side nor right-hand-side{indentExpr heqType}"
```
The phrase `does contain ... nor ..` seems gramatically incorrect.
What was (probably) intended was `does **not** contain ... nor ...`.
We take the opportunity to clean up the error message and
be clearer that the equality does not contain the expected result type.
2022-07-05 09:01:09 -07:00
Sebastian Ullrich
6303fb77d2
fix: expansion info for macro commands
...
TODO: investigate that pp error
2022-07-05 13:18:59 +02:00
tydeu
bff560759e
feat: add missing literal TSyntax helpers
2022-07-05 13:18:58 +02:00
tydeu
9e87958312
fix: linking libraries on Unix
2022-07-05 03:19:38 -04:00
tydeu
b6dc189f0a
feat: augment server env + add dynlib search path
...
see leanprover/lake#93 , closes leanprover/lake#91
2022-07-05 02:45:45 -04:00
tydeu
0875473b13
fix: parameterize CustomData by package and target name
2022-07-04 20:27:10 -04:00
tydeu
7049a8da5f
refactor: DynamicType -> FamilyDef
...
Uses more principled terminology (i.e., its really an open type family)
2022-07-04 17:21:36 -04:00
tydeu
66e807146b
chore: bump Lean version
2022-07-04 17:18:44 -04:00
Leonardo de Moura
2061c9bbea
chore: reduce test size
...
TODO: investigate why there is a stack overflow in the CI.
I didn't manage to reproduce it on my machine.
2022-07-04 13:58:06 -07:00
Leonardo de Moura
ffc90f6a35
fix: bug at ll_infer_type
2022-07-04 13:55:55 -07:00
tydeu
bee7e5d323
chore: start next Lake version
2022-07-04 15:39:23 -04:00
Leonardo de Moura
7668750cb5
chore: update stage0
2022-07-04 07:25:35 -07:00
Leonardo de Moura
1999db1d7c
test: add test for performance issue
...
This issue has bee reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/deterministic.20timeout.20with.20structures/near/288180087
2022-07-04 07:20:12 -07:00
Leonardo de Moura
c434e4e096
chore: remove old tests
2022-07-04 07:18:07 -07:00
Leonardo de Moura
2446c64a99
chore: cleanup
2022-07-04 07:15:04 -07:00
Leonardo de Moura
64edb50687
chore: fix tests
2022-07-04 06:35:21 -07:00
Leonardo de Moura
f77ebae87f
fix: withResetUsedAssignment
2022-07-04 06:33:42 -07:00
Leonardo de Moura
05a28af429
fix: skipDefEqCache
2022-07-04 06:33:32 -07:00
Leonardo de Moura
88fc0b2503
fix: isAssigned-like functions should set usedAssignment
2022-07-04 06:20:37 -07:00
Leonardo de Moura
6b2d2ffac6
fix: preserve usedAssignment flag when replacing MetavarContext
2022-07-04 05:49:54 -07:00
Leonardo de Moura
64d46272c2
fix: do not cache when smart unfolding is disabled
2022-07-04 05:48:35 -07:00
Leonardo de Moura
a1413b8fa1
feat: cache failures at isDefEq
...
We can compile Lean with these changes, but 3 tests are still broken.
This cache is used to address a performance issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/deterministic.20timeout.20with.20structures/near/288180087
2022-07-03 21:52:01 -07:00
Leonardo de Moura
76245b39d1
chore: remove dead field
...
We have remove the old frontend a long time ago.
2022-07-03 15:38:48 -07:00
Leonardo de Moura
aae657571f
doc: docstrings for src/Lean/Meta/Basic.lean
2022-07-03 15:32:15 -07:00
Leonardo de Moura
b78925d9bb
chore: update stage0
2022-07-03 15:01:58 -07:00
Leonardo de Moura
757171db1f
feat: add String.get! and s[i]! notation for String
2022-07-03 14:59:44 -07:00
Gabriel Ebner
07a3cd6980
chore: fix tests
2022-07-03 22:46:59 +02:00
Gabriel Ebner
141b110ff1
feat: add more typed syntax coercions
2022-07-03 22:46:59 +02:00
Gabriel Ebner
922ef23112
fix: do not ignore syntax coercions
...
Syntax coercions do not need to be the identity. See for example
``Coe (TSyntax `ident) (TSyntax `declId)``.
2022-07-03 22:46:59 +02:00
Gabriel Ebner
ddf77a8c6d
chore: style
2022-07-03 22:46:59 +02:00
Gabriel Ebner
bec0bbc351
fix: replace dangerous instance by CoeTail
...
In order to guarantee termination of type class synthesis when resolving
coercions, a good rule of thumb is that the instances should not
introduce metavariables (during TC synthesis). For common coercion type
classes this means:
- `Coe T S`, `CoeTail T S`: the variables of `T` must be a subset of those of `S`
- `CoeHead T S`: the variables of `S` must be a subset of those of `T`
If these rules are not followed, we can easily get nontermination. In
this case: `CoeTC Foo Syntax` is reduced to `CoeTC Foo (TSyntax ?m_1)`
using the (dangerous) `Coe (TSyntax k) Syntax` instance, to which we can
then apply the otherwise fine `Coe (TSyntax [k]) (TSyntax (k'::ks))`
coercion infinitely often.
2022-07-03 22:46:59 +02:00
Gabriel Ebner
3d5c5553d9
fix: add missing coercion instance for CoeHead+CoeTail
2022-07-03 22:46:59 +02:00
Leonardo de Moura
03ce7cb17c
fix: dependent pattern matching bug
...
closes #1279
Originally reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/case.20in.20dependent.20match.20not.20triggering.20.28.3F.29/near/288328239
2022-07-03 13:25:12 -07:00
Leonardo de Moura
68024b11a4
fix: simp_all bug when goal has duplicate hypotheses
2022-07-03 12:44:53 -07:00
Sebastian Ullrich
2f67295c7d
feat: strengthen pp* signatures
2022-07-03 19:14:49 +02:00
Sebastian Ullrich
146aefd085
feat: ppTactic
2022-07-03 19:00:13 +02:00
Sebastian Ullrich
5e46c0865e
doc: update LeanInk
2022-07-03 17:56:51 +02:00
Leonardo de Moura
8f83999202
chore: update release notes
2022-07-03 06:26:47 -07:00
Leonardo de Moura
5e3a3a6c21
chore: remove notation a[i,h] for a[⟨i, h⟩]
2022-07-03 06:24:26 -07:00
Leonardo de Moura
a6d6ae01a0
chore: String.getOp has been removed
2022-07-02 19:39:20 -04:00
kzvi
7326c817d2
fix: fix typos in deBruijn.lean and phoas.lean examples
2022-07-02 16:12:05 -07:00
Leonardo de Moura
0bdab9b4f7
doc: update release notes
2022-07-02 16:06:57 -07:00
Leonardo de Moura
a1d09f1ced
chore: update stage0
2022-07-02 15:57:22 -07:00
Leonardo de Moura
a0fdc2d050
chore: fix tests
2022-07-02 15:57:05 -07:00
Leonardo de Moura
54c60d4c2d
feat: a[i] and a[i]! notation for Subarrays
2022-07-02 15:54:34 -07:00
Leonardo de Moura
a2456c3a0f
feat: add notation a[i, h] for a[⟨i, h⟩]
2022-07-02 15:50:49 -07:00
Leonardo de Moura
eb115abcbe
chore: update stage0
2022-07-02 15:37:13 -07:00
Leonardo de Moura
e81a847ba3
fix: doc/array.md
2022-07-02 15:36:01 -07:00
Leonardo de Moura
4568fe755c
chore: fix tests
2022-07-02 15:25:06 -07:00
Leonardo de Moura
b3ea1fc925
feat: a[i] notation for arrays now uses i : Fin a.size
2022-07-02 15:19:38 -07:00
Leonardo de Moura
e4b472a9a2
chore: fix tests
2022-07-02 15:17:01 -07:00
Leonardo de Moura
2409840aa8
chore: update stage0
2022-07-02 15:12:53 -07:00
Leonardo de Moura
2ebcf29cde
chore: use a[i]! for array accesses that may panic
2022-07-02 15:12:05 -07:00
Leonardo de Moura
88a0506ab0
chore: update stage0
2022-07-02 10:07:09 -07:00
Leonardo de Moura
3f3cd22366
feat: add Array.getOp! and Array.getOp?
...
Add warning when `Array.getOp` is used. TODO: replace `Array.getOp`
with safe version
2022-07-02 10:06:05 -07:00
Leonardo de Moura
8bf90b128e
fix: interactive test driver
2022-07-02 10:01:04 -07:00
Leonardo de Moura
418607f3ad
chore: update lake
2022-07-02 09:59:42 -07:00
Leonardo de Moura
e8935d996b
chore: String.get?, String.getOp?, and remove String.getOp
2022-07-02 09:59:04 -07:00
Leonardo de Moura
e42b82d775
chore: update stage0
2022-07-02 07:35:07 -07:00
Leonardo de Moura
053bc889a3
feat: elaborate a[i]! and a[i]?
2022-07-02 07:29:58 -07:00
Leonardo de Moura
cbe05441a5
chore: update stage0
2022-07-02 07:29:58 -07:00
Leonardo de Moura
131e7be8c5
feat: add a[i]? and a[i]! parsers
2022-07-02 07:29:58 -07:00
Sebastian Ullrich
0896180f12
chore: CI: downgrade Nix
2022-07-02 12:19:30 +02:00
tydeu
515541709a
chore: fix tests
2022-07-02 10:37:22 +02:00
tydeu
29be868342
chore: update Lake
2022-07-02 10:37:22 +02:00
tydeu
4f8c51f102
test: use -fPIC in ffi example
2022-07-01 20:25:02 -04:00
tydeu
83b9404d02
chore: don't use ../$LAKE idiom
2022-07-01 20:13:53 -04:00
tydeu
5eb591092d
release: 3.2.0
2022-07-01 19:03:46 -04:00
tydeu
c7075f3f99
refactor: remove dead package DSL code
2022-07-01 18:45:50 -04:00
tydeu
2355ce06e7
chore: bump Lean version
2022-07-01 17:47:47 -04:00
tydeu
f0c9b74540
doc: update README
2022-07-01 17:30:38 -04:00
tydeu
906bc3c9c2
refactor: simplify custom target API (for now)
2022-07-01 16:26:35 -04:00
tydeu
8c46d7439a
chore: remove some deprecated features + deprecate extraDepTarget
2022-07-01 15:35:45 -04:00
tydeu
b9beeff3ad
chore: fix wording
2022-07-01 14:45:44 -04:00
tydeu
a81994871a
feat: add build types (e.g., debug, release)
2022-07-01 14:45:19 -04:00
tydeu
2e43c1b6cf
fix: keyName regression caused by refactor
2022-07-01 11:18:59 -04:00
Leonardo de Moura
a639eb185c
fix: dsimp zeta issue
2022-07-01 06:42:09 -07:00
Leonardo de Moura
5294a39ec4
feat: add Float.ceil, Float.floor, and Float.round
2022-07-01 06:27:30 -07:00
tydeu
2f9eefd35a
feat: inductive BuildKey + proper custom targets
2022-07-01 04:52:50 -04:00
tydeu
989b5666c9
refactor: remove unnecesssary build key subtypes
2022-07-01 02:54:08 -04:00
tydeu
72f555dd5b
fix: properly trace module imports
2022-07-01 02:45:24 -04:00
tydeu
48d595b722
feat: preliminary custom package facets
2022-07-01 00:11:53 -04:00
tydeu
2ccd41ac82
feat: preliminary custom targets
2022-07-01 00:11:44 -04:00
Leonardo de Moura
d9be3e0017
doc: add new bullet
2022-06-30 19:17:29 -07:00
Leonardo de Moura
0b27d26c99
doc: add quick tour video
2022-06-30 19:16:25 -07:00
Leonardo de Moura
d1f966fa6d
doc: docstrings for src/Lean/Elab/Term.lean
2022-06-30 19:01:34 -07:00
Leonardo de Moura
14260f454b
feat: improve is_def_eq for projections
...
It implements in the kernel the optimization in the previous commit.
This commit addresses the following issue raised on Zulip.
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/unfold.20essentially.20loops/near/288083209
2022-06-30 17:50:44 -07:00
Leonardo de Moura
dba1f79170
feat: improve isDefEq for projections
...
When solving `a.i =?= b.i`, we first reduce `a` and `b` without using
delta reduction. If at least one become a structure, we reduce the
projection. Otherwise, we try to solve `a =?= b`, only reduce `a.i`
and `b.i` if it fails.
2022-06-30 17:00:43 -07:00
Leonardo de Moura
f3bb0be045
feat: add flag to control projection reduction at whnfCore
2022-06-30 16:48:00 -07:00
tydeu
24fd2e37e1
chore: update Lean version + adapt to TSyntax
2022-06-30 19:24:18 -04:00
Leonardo de Moura
2c152dae7d
chore: remove unnecessary partial
2022-06-30 15:47:31 -07:00
Leonardo de Moura
e9e75af834
doc: Lean/Meta/Basic.lean
...
Add some docstrings
2022-06-30 13:32:19 -07:00
tydeu
74f3e963ff
feat: use nativeFacets in exe's recBuild
2022-06-30 01:30:14 -04:00
tydeu
6035ed56ea
fix: make root module "private" to the package
2022-06-30 01:26:01 -04:00
tydeu
5dd9042a2c
fix: dummy git identity in test to make runner happy
2022-06-29 22:56:19 -04:00
tydeu
e33b5a2095
fix: properly update git packages specified by branch
...
closes leanprover/lake#84
2022-06-29 22:31:25 -04:00
tydeu
7955d0f73c
refactor: typify git repos + log stdout/stderr on git failures
...
c.f. leanprover/lake#67
2022-06-29 21:58:11 -04:00
Leonardo de Moura
f6b6b36f47
chore: indentation
2022-06-29 16:45:59 -07:00
Leonardo de Moura
467ac9d98a
feat: add support for CommandElabM at #eval
...
Note that it does not use `MetaEval` to execute the term of type
`CommandEval`. Thus, we can now use `#eval` to execute simple commands.
see #1256
2022-06-29 16:34:49 -07:00
Leonardo de Moura
d83a11bac5
chore: expose exprToSyntax
2022-06-29 16:02:01 -07:00
Leonardo de Moura
66711a9974
chore: update stage0
2022-06-29 15:40:57 -07:00
Leonardo de Moura
d4eed2e490
test: test for #1267
2022-06-29 15:40:13 -07:00
Leonardo de Moura
e8891986f2
chore: update stage0
2022-06-29 15:37:30 -07:00
Leonardo de Moura
95efa3dcd2
fix: withPosition case at MacroArgUtil
...
fixes #1267 after update stage0
2022-06-29 15:35:34 -07:00
Leonardo de Moura
1b7fab4497
chore: add binder types
2022-06-29 15:31:10 -07:00
tydeu
c6f7a0d654
fix: build o files again to enable incremental rebuilds
...
This reverts commit 182a5787aabd8924823f2232a518911c81b2b2cd.
2022-06-29 18:05:53 -04:00
tydeu
49384a69bf
fix: precompile imports of precompiled imports
2022-06-29 17:06:24 -04:00
Leonardo de Moura
e968dfb68c
feat: elaborate do notation even when expected type is not available
...
see issue #1256
2022-06-29 13:30:06 -07:00
Leonardo de Moura
598898a087
fix: fixes #1265
2022-06-29 12:41:14 -07:00
Leonardo de Moura
15e2a7d5b4
feat: report errors an unassigned metavars at #eval
...
See #1256
2022-06-29 11:53:33 -07:00
tydeu
17a36f89aa
fix: use Lake install's olean files over LEAN_PATH
2022-06-29 12:56:49 -04:00
Sebastian Ullrich
3ed910a043
refactor: rename AsyncList.asyncTail to delayed
...
I often found the terminology confusing as it is inconsistent with
`List.tail`
2022-06-29 17:08:15 +02:00
Sebastian Ullrich
ae683af9c2
refactor: merge AsyncList.updateFinishedPrefix/finishedPrefix
...
We only ever use both of them together, and forgetting to call the first
one first could lead to subtle bugs.
2022-06-29 17:08:15 +02:00
Sebastian Ullrich
c8fb72195b
feat: print panic backtraces on Linux
2022-06-29 16:29:35 +02:00
Leonardo de Moura
a888b21bce
fix: compiler bug at And.casesOn
...
Fixes issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/.28libc.2B.2Babi.29.20lean.3A.3Aexception.3A.20incomplete.20case/near/287839995
2022-06-29 06:56:17 -07:00
Sebastian Ullrich
10b0eca41f
chore: CI: minor
2022-06-29 12:43:01 +02:00
tydeu
7ea0ea3393
fix: use library, not package, for lean root dir
2022-06-29 04:05:35 -04:00
tydeu
f62b017654
feat: user-specified native module facets for libraries
2022-06-29 03:36:05 -04:00
tydeu
85f6d1a402
feat: preliminary custom module facets
2022-06-28 23:39:47 -04:00
Leonardo de Moura
98b8e300e1
feat: add evalTerm and Meta.evalExpr
...
These functions were in Mathlib 4.
2022-06-28 19:14:40 -07:00
Leonardo de Moura
fc7c1d1053
chore: remove unnecessary set_option
2022-06-28 17:37:10 -07:00
Leonardo de Moura
87a72e4bbe
chore: update stage0
2022-06-28 16:57:11 -07:00
Sebastian Ullrich
80217cfa90
fix: asynchronous head snapshot fallout
2022-06-28 16:54:29 -07:00
Sebastian Ullrich
99f5e94efe
feat: MonadExcept.ofExcept
2022-06-28 16:54:29 -07:00
Sebastian Ullrich
c64ac02ffc
fix: declModifiers syntax kind
2022-06-28 22:35:13 +02:00
Sebastian Ullrich
a9cc57c81c
chore: CI: more cache setup
2022-06-28 22:31:51 +02:00
tydeu
4d118062b8
chore: add note highlighting perf decision
2022-06-28 14:02:07 -04:00
Mac
a2e39659f9
perf: do not build object files of imports when linking executable
2022-06-28 13:57:23 -04:00
tydeu
5f1eca5954
refactor: minor cleanup
2022-06-28 13:35:20 -04:00
Sebastian Ullrich
920fa1109b
chore: CI: ccache permissions
2022-06-28 18:53:36 +02:00
Sebastian Ullrich
9816331562
chore: clean up bootstrapping cleanup
2022-06-28 16:28:36 +02:00
Sebastian Ullrich
995d92d10e
chore: CI: fix ccache cache group
2022-06-28 16:24:10 +02:00
Sebastian Ullrich
8f3fda4777
chore: update stage0
2022-06-28 16:01:43 +02:00
Sebastian Ullrich
77c6f433c7
chore: clean up bootstrapping workarounds
2022-06-28 16:01:07 +02:00
Sebastian Ullrich
74c4437874
chore: CI: simplify Nix setup, bring back macOS
2022-06-28 12:50:19 +02:00
Sebastian Ullrich
5bba20d6a9
refactor: revert toParserDescr signature change
2022-06-28 11:50:59 +02:00
Sebastian Ullrich
89a101e9b8
refactor: remove group(·)s
2022-06-28 11:50:59 +02:00
Sebastian Ullrich
9490328429
chore: update stage0
2022-06-28 11:50:59 +02:00
Sebastian Ullrich
eab64997cd
fix: auto-group syntax parsers where necessary
2022-06-28 11:50:59 +02:00
tydeu
a4174a560b
refactor: build code cleanup / reorg
2022-06-28 01:01:13 -04:00
Timo
e49a81bb56
doc: fix typo
2022-06-27 19:48:45 -07:00
Leonardo de Moura
34dc2572f3
fix: make sure OfScientific Float instance is never unfolded during type class resolution
...
This commit fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/deterministic.20timeout/near/287654818
Type class resolution was diverging when trying to synthesize
```lean
HSub (optParam Float 0.0) (optParam Float 1.0) ?m.472
```
and Lean was diverging while unfolding
```lean
instance : OfScientific Float where
ofScientific m s e :=
if s then
let s := 64 - m.log2 -- ensure we have 64 bits of mantissa left after division
let m := (m <<< (3 * e + s)) / 5^e
Float.ofBinaryScientific m (-4 * e - s)
else
Float.ofBinaryScientific (m * 5^e) e
```
was being unfolded.
Anothe potential solution for the problem above is to erase the
`optParam` annotations before performing type class resolution.
2022-06-27 17:40:34 -07:00
Sebastian Ullrich
ca19ce1e6f
chore: CI: fix Windows
2022-06-28 00:38:19 +02:00
Sebastian Ullrich
18d2296b1c
doc: add typed macros to RELEASES.md
2022-06-27 23:42:13 +02:00
Leonardo de Moura
5901fef43a
feat: protected aliases
...
See message: https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Namespace-based.20overloading.20does.20not.20find.20exports/near/287633118
2022-06-27 13:56:58 -07:00
Sebastian Ullrich
19c2644d88
chore: add more comments
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
544a046678
chore: use Syntax.Level
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
22475b8669
refactor: introduce common TSyntax abbreviations
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
db42874be4
chore: update Lake
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
e47f248161
doc: TSyntax
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
8b4d8b8dc9
feat: TSyntax singleton kind unexpanders
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
6f7ff3b492
chore: remove unnecessary type annotations
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
6af00ff23e
chore: changes to placate coercions
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
d9cfda4893
refactor: make more use of quotations
...
Automatically fixes many TSyntax type errors
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
7043c4ebe7
refactor: mkSimpleDelab
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
0b28f059f6
chore: work around "unknown free variable" bug
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
3a56db2812
chore: fix tests
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
c3585dbbbb
chore: raw syntax kind accesses
...
Sometimes just checking the kind simply is the simplest solution.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
c2166fc602
chore: work around parameterized parser syntax kinds
...
We should find a better solution for calling parameterized parsers such
as `matchAlt` than these helper definitions that confuse the antiquotations.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
d499e67c87
fix: incorrect antiquotation kind annotations
...
Apparently, none of them led to incorrect syntax trees, but `TSyntax`
still disapproves.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
6c64b1b20b
chore: work around for type inference
...
It seems type information often flows from the body to the loop
variable, which is problematic with coercions.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
5e334b3e90
chore: postpone TSyntax adoption for some parts
...
The namespace `TSyntax.Compat` can be opened for a coercion
`Syntax -> TSyntax k` for any `k`, as otherwise this PR would never be done.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
fe22d84143
fix: unclear TSyntax breakage
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
86cd656fc6
refactor: adapt raw syntax manipulations to TSyntax
...
Sometimes there's just no structure to work on
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
498c7a6a97
refactor: remove some unnecessary antiquotation kind annotations
...
These are just the ones I stumbled upon, there should be a lot more now
rendered obsolete by the coercions.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
a78302243c
refactor: strengthen Syntax signatures
...
Most notable change: `Quote` is now parameterized by the target kind.
Which means that `Name` etc. could actually have different
implementations for quoting into `term` and `level`, if that need ever
arises.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
f90e4ae30c
feat: more TSyntax API & coercions
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
a12cde41e1
chore: work around macro limitations
...
It would be nice if `macro` was as expressive as syntax quotations, but
right now it's not.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
c202a2c013
feat: more antiquotation kinds
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
7bc95d3a95
chore: update stage0
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
9db8bac040
chore: prepare for next stage
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
d50b1aab89
feat: <|> may produce a choice node of antiquotations
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
ab08bffbec
chore: Nix: fix stage0-from-input
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
4b78d02a5e
fix: do not discriminate anonymous antiquots after all
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
9b71fbb461
chore: default pp.rawOnError to true for stage 0
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
43ba121e98
feat: upgrade TSyntax to union of kinds
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
3a61cc247e
chore: introduce doSeq antiquotation
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
330245816c
fix: macro: inferred syntax kinds for literal parsers
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
2ef3636022
fix: elaborating category quotations
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
4588b1ec90
fix: ignore withPosition when binding macro arguments
...
Would be nice to generalize this at some point
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
80a92cceeb
fix: avoid choice nodes with LeadingIdentBehavior.both
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
e6954bb4f3
fix: quote Name.anonymous
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
7d48d125da
fix: store syntax kinds of parser aliases in order to construct correct antiquotations in macro and elab
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
2c54a0d17a
feat: allow anonymous antiquotations for tacticSeq
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
df499a5b64
feat: early coercion from TSyntax to Syntax
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
c2b4c37792
refactor: make Init.Coe independent of Init.Notation
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
3b3961a89b
chore: disable some anonymous antiquotations
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
8bbae8b8da
feat: introduce TSyntax
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
292d24ba19
feat: always store quoted kind in antiquotation kind
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
0bd864deca
fix: nesting of pattern info nodes
2022-06-27 22:37:02 +02:00
Leonardo de Moura
6ebae968a7
feat: use IO.getRandomBytes to initialize random seed
...
See https://github.com/leanprover/lean4-samples/pull/2
2022-06-27 13:01:20 -07:00
Leonardo de Moura
f4e083d507
feat: dot notation and aliases
...
This commit addresses the issue raised at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Namespace-based.20overloading.20does.20not.20find.20exports/near/282946185
2022-06-27 12:42:25 -07:00
Leonardo de Moura
fc25689f21
feat: add Syntax.eraseSuffix?
2022-06-27 10:30:57 -07:00
Leonardo de Moura
3f0a9eb424
test: add test for issue #1253
...
closes #1253
2022-06-27 09:56:47 -07:00
Leonardo de Moura
c498285d94
chore: add missing double backtick
2022-06-27 09:56:47 -07:00
tydeu
0e99494611
refactor: move lib/exe targets into the index
2022-06-27 02:07:45 -04:00
tydeu
62815168c6
feat: library-level module configuration
2022-06-26 20:35:23 -04:00
tydeu
c0bc0344b0
refactor: add LeanLib/LeanExe/ExternLib + reorg & cleanup
2022-06-26 18:26:12 -04:00
Sebastian Ullrich
3eeeca22e2
chore: lean-gdb: recursive values & tag
2022-06-26 18:47:47 +02:00
Mac
a8d1ff5fdc
fix: properly link libraries on MacOS
2022-06-25 21:46:01 -04:00
tydeu
6812bae11a
feat: link libraries in a path and platform independent way
2022-06-25 19:22:41 -04:00
tydeu
c4580839b5
test: "fix" library loading issues
2022-06-25 17:07:52 -04:00
Sebastian Ullrich
5a0c3b8d80
fix: String.isNat
2022-06-25 18:42:08 +02:00
Wojciech Nawrocki
aacfd11508
feat: boolean inequality lemmas
2022-06-25 11:18:09 +02:00
tydeu
3200b43371
feat: include external libraries in precompilation
2022-06-25 00:35:29 -04:00
tydeu
45ff2dbc9d
feat: add isLeanOnly package config
...
closes leanprover/lake#74
2022-06-24 18:35:14 -04:00
E.W.Ayers
cc9293af09
doc: isDefEq explain mvar levels
2022-06-24 15:24:52 -07:00
tydeu
961a328bfd
fix: report precompiled dynlibs to server
...
a feature of leanprover/lake#47 I had hetherto missed
2022-06-24 17:04:42 -04:00
tydeu
4f739572c9
refactor: use IndexT at Index.lean
2022-06-24 15:05:41 -04:00
Sebastian Ullrich
8979ed42a4
refactor: file worker: wait on header task before dispatching requests
2022-06-24 19:02:00 +02:00
Sebastian Ullrich
e14b4ab0e4
feat: file worker: make header snapshot asynchronous
2022-06-24 19:02:00 +02:00
Leonardo de Moura
220d2e3816
feat: add filterTR and [csimp] theorem
2022-06-24 06:40:38 -07:00
Leonardo de Moura
1fd2b17a92
fix: bug at addDependencies
...
closes #1247
2022-06-24 06:20:00 -07:00
Gabriel Ebner
ec4200fc75
chore: remove unnecessary ppLine
2022-06-24 10:59:55 +02:00
Gabriel Ebner
233a787e65
chore: add test for sepByIndent.formatter
2022-06-24 10:59:55 +02:00
Gabriel Ebner
d5142ddeb8
chore: add sepByIndent.formatter
2022-06-24 10:59:55 +02:00
Gabriel Ebner
733f220ee3
feat: $[...]* antiquotations for sepByIndent
2022-06-24 10:59:55 +02:00
tydeu
241665dc27
refactor: move recurse arg into the monad stack
2022-06-23 23:42:12 -04:00
tydeu
0655233dd2
fix: precompile mods if they want not if their importer wants
...
closes leanprover/lake#83
2022-06-23 22:45:11 -04:00
tydeu
36fe59f687
test: expand precompile example to test leanprover/lake#83
2022-06-23 22:06:15 -04:00
tydeu
d842158172
refactor: reorg build code into smaller, focused files
2022-06-23 21:27:57 -04:00
Leonardo de Moura
09c4af26fc
fix: ConstantInfo.all for consistency
2022-06-23 16:41:54 -07:00
Leonardo de Moura
88fae4e3d6
chore: update stage0
2022-06-23 16:41:05 -07:00
Leonardo de Moura
98c775da34
feat: save mutual block information for definitions/theorems/opaques
2022-06-23 16:39:51 -07:00
Leonardo de Moura
ea3e27bbc4
chore: update stage0
2022-06-23 16:13:49 -07:00
Leonardo de Moura
69a446c8d1
feat: add field all to DefinitionVal and TheoremVal
...
Remark: we need an update stage0, and the field is not being updated
correctly set yet.
2022-06-23 16:13:26 -07:00
Leonardo de Moura
da63e003e7
chore: update stage0
2022-06-23 13:32:13 -07:00
Leonardo de Moura
1e4e683e91
chore: update stage0
2022-06-23 13:30:04 -07:00
Henrik Böving
0fde2db75e
feat: improve the heuristic for notation delab
...
Instead of the previous constraints on the right hand side that only
allowed a permutation of variables as parameters to a function the
new heuristic allows anything to the right of a function as long as
each variable only appears at most once.
2022-06-23 13:27:53 -07:00
Leonardo de Moura
3a89723f8c
chore: update stage0
2022-06-23 10:23:37 -07:00
Leonardo de Moura
96a72d67f2
fix: avoid unnecessary dependencies at mkMatcher
...
fixes #1237
2022-06-23 10:21:32 -07:00
tydeu
d3c373478e
refactor: generalize module facet build code to any target
2022-06-23 13:19:39 -04:00
Leonardo de Moura
17fa60e1ec
chore: remove dead code
2022-06-23 09:31:52 -07:00
Sebastian Ullrich
17c2e6d529
feat: publish fatal progress after worker crash
2022-06-23 09:24:27 -07:00
Connor Baker
c213e0e880
doc: fix overwide view when using Alectryon
2022-06-23 18:23:28 +02:00
Leonardo de Moura
939f8d9f16
fix: fixes #1240
2022-06-23 05:53:06 -07:00
Sebastian Ullrich
1f13729756
feat: show term goal at end of term as well
2022-06-23 14:44:19 +02:00
Sebastian Ullrich
13bcbce144
chore: fix Nix test output filter
2022-06-23 14:05:53 +02:00
Sebastian Ullrich
1712d0fee3
chore: update LeanInk
...
Resolves leanprover/LeanInk#20
2022-06-23 11:32:16 +02:00
Leonardo de Moura
108bc4c27f
fix: extCore
2022-06-22 19:40:06 -07:00
Leonardo de Moura
a84b9b2e7b
doc: update release notes
2022-06-22 19:34:29 -07:00
Leonardo de Moura
53acd3e355
feat: allow ext conv tactic to go inside let-declarations
2022-06-22 19:27:04 -07:00
Leonardo de Moura
4d1c6dd557
feat: add zeta conv tactic
2022-06-22 19:15:10 -07:00
Leonardo de Moura
a802544c90
fix: intro tactic at let-expr
2022-06-22 16:10:33 -07:00
Leonardo de Moura
2a940dd4ae
feat: add Expr.collectFVars, LocalDecl.collectFVars, Pattern.collectFVars, and AltLHS.collectFVars
...
They are all in `MetaM`.
These are helper functions for issue #1237 . We need to "cleanup" the
local context before trying to compile the match-expression.
see issue #1237
2022-06-22 15:53:43 -07:00
tydeu
f7451e025c
feat: basic precompiled modules + builtin module facets
...
closes leanprover/lake#47
2022-06-22 13:20:15 -04:00
Leonardo de Moura
9678be4d81
fix: store discharge depth when caching simp results
...
Closes #1234
2022-06-21 15:35:47 -07:00
Leonardo de Moura
65d24f4e39
fix: typo at LinearExpr.toExpr
...
closes #1236
2022-06-21 14:28:26 -07:00
Sebastian Ullrich
71b99423e8
chore: Nix: fix CI
2022-06-21 23:11:57 +02:00
Sebastian Ullrich
02e5865a02
chore: Nix: stop pinning Nix in ciShell
2022-06-21 22:57:39 +02:00
Sebastian Ullrich
ce73728be3
chore: Nix: avoid build closure dependencies on stdenv
2022-06-21 21:11:59 +02:00
Sebastian Ullrich
dd58b5c2df
chore: Nix: cache correct output
2022-06-21 21:10:08 +02:00
Sebastian Ullrich
e20f2e076e
chore: Nix: cache lean-bin-tools
2022-06-21 20:52:39 +02:00
Leonardo de Moura
e442fbbf54
fix: remove kabstractWithPred
...
The function `kabstractWithPred` was never used, and introduced the
bug exposed by issue #1235 .
fixes #1235
2022-06-20 16:35:18 -07:00
Leonardo de Moura
986de33097
fix: fixes #1230
2022-06-20 09:58:27 -07:00
E.W.Ayers
b6f251bcd3
fix: SubExpr.Pos.toString not terminating
...
fixes 1232
2022-06-19 16:04:50 -07:00
Sebastian Ullrich
58d5a11928
Revert "fix: induction: do not register _ as binder in info tree"
...
This reverts commit 143b2b49c8 .
2022-06-18 17:24:08 +02:00
Sebastian Ullrich
99607c208c
Revert "fix: intro/intros: do not register _ as binder in info tree"
...
This reverts commit 41dfd06e8c .
2022-06-18 17:24:08 +02:00
Sebastian Ullrich
a4236c0721
fix: ignore hygiened names in unused variables linter
2022-06-18 17:24:08 +02:00
Sebastian Ullrich
8aea00213c
chore: clean up doc/flake.nix
2022-06-18 13:21:02 +02:00
Wojciech Nawrocki
7624e25de0
fix: don't duplicate tags in formatter
2022-06-18 10:07:53 +02:00
Wojciech Nawrocki
b1ef58d3cc
fix: tag idents so that ofFieldInfo nodes are preserved
2022-06-18 10:07:53 +02:00
E.W.Ayers
ee6ba180ea
fix: remove fix2
2022-06-17 17:47:51 -07:00
E.W.Ayers
18ba16ded9
feat: string representation of Pos
...
This is needed because JSON will otherwise lossily
convert big nats to floats.
2022-06-17 17:47:51 -07:00
E.W.Ayers
933964f2a4
chore: rm SubExpr.mapPos because it is not useful
2022-06-17 17:47:51 -07:00
E.W.Ayers
114bbc78ed
test: numBinders
2022-06-17 17:47:51 -07:00
E.W.Ayers
8b1130c6dd
test: replaceSubexpr pure p e = e
...
This found a bug in lensCoord which I fixed.
2022-06-17 17:47:51 -07:00
E.W.Ayers
b110d800e9
fix: add ExprTraversal to Meta
2022-06-17 17:47:51 -07:00
E.W.Ayers
4a70143aaf
style: minor formatting changes
2022-06-17 17:47:51 -07:00
E.W.Ayers
3c14c97195
test: add unit test for Expr lens
2022-06-17 17:47:51 -07:00
E.W.Ayers
a7c33a963f
doc: docstrings for List.isPrefixOf
2022-06-17 17:47:51 -07:00
E.W.Ayers
0707e4d442
fix: traverseChildrenWithPos bug
2022-06-17 17:47:51 -07:00
E.W.Ayers
0e84f67d99
feat: with pos expr traversal functions
2022-06-17 17:47:51 -07:00
E.W.Ayers
562070fe8b
refactor: more extract methods from transform
2022-06-17 17:47:51 -07:00
E.W.Ayers
c8fc371eb9
fix: test
2022-06-17 17:47:51 -07:00
E.W.Ayers
8311c88fd0
refactor: extract methods from Lean.Meta.transform
...
Lean.Meta.transform is created with a series of recursive
visit functions. However these visit functions are useful
on their own outside of transform for traversing expressions.
This commit moves the visit functions outside the main function.
2022-06-17 17:47:51 -07:00
E.W.Ayers
ece1c1085c
feat: add Expr lensing functions using SubExpr.Pos
2022-06-17 17:47:51 -07:00
E.W.Ayers
2fe933cdf5
refactor: make SubExpr.Pos a definition
...
Instead of an abbreviation. It is easier to understand
Pos operations in terms of 'push' and 'pop' rather than
through arithmetic.
2022-06-17 17:47:51 -07:00
Leonardo de Moura
bbc196eeb7
fix: make sure WF/Fix.lean tolerates MatcherApp.addArg? failures
...
see #1228
2022-06-17 17:37:33 -07:00
Leonardo de Moura
52a0de00e4
feat: report error on ambiguous export and open commands
...
This commit improves the fix for issue #1224
2022-06-17 09:58:36 -07:00
Leonardo de Moura
e985eb2b8a
fix: refine resolveNamespace
...
see issue #1224
2022-06-17 09:51:00 -07:00
tydeu
aa4b82c53f
chore: update Lean version
2022-06-17 04:39:47 -04:00
Sebastian Ullrich
dad47195da
chore: adapt to where syntax change
2022-06-17 04:39:47 -04:00
Leonardo de Moura
f0e2696ec8
doc: update release notes
2022-06-16 18:22:23 -07:00
Leonardo de Moura
81a685d97c
test: issue #1224
...
closes #1224
2022-06-16 18:01:09 -07:00
Leonardo de Moura
a6462f5bd8
feat: improve open/export
2022-06-16 18:00:33 -07:00
Leonardo de Moura
d5476fb3b3
refactor: move toMessageList, add throwErrorWithNestedErrors
2022-06-16 18:00:09 -07:00
Leonardo de Moura
8ca3e14651
feat: change namespace resolution procedure
...
see #1224
2022-06-16 17:31:49 -07:00
Leonardo de Moura
d56163bd0e
refactor: resolveNamespace now return a List
2022-06-16 17:16:36 -07:00
François G. Dorais
bc206b2992
fix: LawfulBEq class
...
make arguments implicit and protect `LawfulBEq.rfl`
2022-06-16 15:33:32 -07:00
Leonardo de Moura
8d9428261e
chore: remove Fix.lean
...
see #1208
2022-06-16 15:30:47 -07:00
Leonardo de Moura
9e7a6fa085
chore: remove dead structure
2022-06-16 15:23:23 -07:00
Sebastian Ullrich
b1e3607739
fix: match tactic with multiple LHSs
2022-06-16 15:21:46 -07:00
Mac
7447cb444c
ci: skip duplicate/unnecessary jobs
2022-06-16 18:08:36 -04:00
Sebastian Ullrich
0777d01cf9
chore: update Lake
2022-06-16 23:33:57 +02:00
Sebastian Ullrich
72a5c582cf
chore: Nix: ignore build messages in test capture
2022-06-16 23:33:57 +02:00
Sebastian Ullrich
4212cc740b
refactor: move linebreak check into sepBy(1)Indent
...
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2022-06-16 23:33:57 +02:00
Sebastian Ullrich
6f096e0f0d
chore: fix tests
2022-06-16 23:33:57 +02:00
Sebastian Ullrich
6982536108
fix: one more struct instance syntax manipulation
2022-06-16 23:33:57 +02:00
Sebastian Ullrich
0f6e6c8a51
chore: update stage0
2022-06-16 23:33:57 +02:00
Sebastian Ullrich
b585b2251e
fix: adapt to stricter grammar
2022-06-16 23:33:57 +02:00
Sebastian Ullrich
ce054fb2e7
fix: introduce semicolonOrLinebreak, replace many(1) with sepBy(1) where appropriate
2022-06-16 23:33:57 +02:00
tydeu
f5126bc82a
chore: remove lean-toolchain from version agnostic tests
2022-06-16 17:33:00 -04:00
tydeu
4ffe900d93
chore: update Lean version
2022-06-16 17:33:00 -04:00
Leonardo de Moura
8d854900fd
chore: replace constant with opaque
2022-06-16 17:33:00 -04:00
Leonardo de Moura
4b7188e0ce
chore: opaque is now a command keyword
2022-06-16 17:33:00 -04:00
Sebastian Ullrich
7a3ee51d05
doc: missing word
2022-06-16 10:12:07 +02:00
tydeu
61926bbb32
chore: fix test
2022-06-16 02:24:46 -04:00
tydeu
eb7979b332
test: add test for leanprover/lake#75
2022-06-16 02:12:40 -04:00
tydeu
02ee011a0e
refactor: simplify module target code + related cleanup
...
closes leanprover/lake#75
2022-06-16 02:04:31 -04:00
Mariana Alanis
198179d0cc
fix: add a better handling in case only worker crashes (apply CR comments)
2022-06-15 18:40:44 -07:00
Mariana Alanis
e61799a77f
fix: add a better handling in case only worker crashes (CR comments)
2022-06-15 18:40:44 -07:00
Mariana Alanis
30f3d6f82d
fix: add a better handling in case only worker crashes (CR comments)
2022-06-15 18:40:44 -07:00
Mariana Alanis
4d7d82af86
fix: add a better handling in case only worker crashes (CR comments)
2022-06-15 18:40:44 -07:00
Mariana Alanis
b0f9754e0f
fix: add a better handling in case only worker crashes
2022-06-15 18:40:44 -07:00
Mariana Alanis
6b75ca9734
fix: add a better handlng in case only worker crashes (and server stays available)
2022-06-15 18:40:44 -07:00
Leonardo de Moura
d2888a49d7
chore: remove old hack that is not needed anymore
2022-06-15 16:36:54 -07:00
Leonardo de Moura
3228db29dd
chore: use double ticks
2022-06-15 07:17:17 -07:00
Sebastian Ullrich
524ae5abf7
chore: CI: purge ccache
2022-06-15 13:39:24 +02:00
Sebastian Ullrich
23d157a3ff
chore: remove dead code
2022-06-15 12:43:59 +02:00
Sebastian Ullrich
bfce841985
chore: update stage0
2022-06-15 10:01:47 +02:00
Leonardo de Moura
5896e6f1d6
chore: fix docs
2022-06-14 17:35:33 -07:00
Leonardo de Moura
540e9e85f3
chore: update release notes
2022-06-14 17:31:26 -07:00
Leonardo de Moura
989d8f04e1
chore: fix tests
2022-06-14 17:27:13 -07:00
Leonardo de Moura
f6d1e48cb8
fix: constant => opaque issues
2022-06-14 17:19:54 -07:00
Leonardo de Moura
fb55ec29e1
chore: update stage0
2022-06-14 17:14:44 -07:00
Leonardo de Moura
22c8f10b12
chore: remove constant command
2022-06-14 17:14:28 -07:00
Leonardo de Moura
02c4e548df
feat: replace constant with opaque
2022-06-14 17:02:59 -07:00
Leonardo de Moura
ac33193b30
chore: update stage0
2022-06-14 16:45:20 -07:00
Leonardo de Moura
3b259afaf0
chore: fix tests
2022-06-14 16:43:22 -07:00
Leonardo de Moura
346c4beb70
feat: elaborate opaque command
2022-06-14 16:36:24 -07:00
Leonardo de Moura
794021b9e4
chore: adjust codebase
...
`opaque` is now a command keyword
2022-06-14 16:32:53 -07:00
Leonardo de Moura
5193c6d0ef
chore: update stage0
2022-06-14 16:23:49 -07:00
Leonardo de Moura
05778565ab
feat: add opaque command
...
It will replace the `constant` command. See
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/What.20is.20.60opaque.60.3F/near/284926171
2022-06-14 16:22:36 -07:00
Jakob von Raumer
d7cb93e9e4
feat: allow conv mode's arg command to access implicit arguments
2022-06-14 16:15:38 -07:00
tydeu
8dc3133244
chore: use bash shebang in test scripts
2022-06-14 18:56:20 -04:00
tydeu
38fc7192ed
chore: fix new shell scripts' premissions
2022-06-14 18:39:04 -04:00
tydeu
8faafb7ef6
test: reorg + regression tests
2022-06-14 18:33:01 -04:00
Leonardo de Moura
d78e7cd011
feat: macro expand cases and induction tactics multiple LHSs
2022-06-14 14:18:52 -07:00
tydeu
4ff44fb050
fix: don't require know expected type for __dir__/__args__
2022-06-14 16:59:13 -04:00
tydeu
854b154a5f
fix: lake serve fallback regression
...
closes leanprover/lake#76
2022-06-14 15:54:07 -04:00
Leonardo de Moura
3a1dc5e066
fix: support new inductionAlt syntax at Linter/Basic.lean
2022-06-14 11:31:49 -07:00
Leonardo de Moura
bd2cccf287
chore: use double tick
2022-06-14 11:30:55 -07:00
Leonardo de Moura
2dad133208
chore: update stage0
2022-06-14 11:26:06 -07:00
Leonardo de Moura
daeb271678
feat: update induction and cases syntax
...
We can now write
```
induction x with
| foo | bar => ...
| boo => ...
```
TODO: expand alternatives containing multiple LHSs.
2022-06-14 11:25:15 -07:00
Leonardo de Moura
05a72a9e00
chore: update stage0
2022-06-14 11:17:33 -07:00
Leonardo de Moura
7c9b5b7147
feat: prepare to support multi-cases at cases and induction
...
We want to be able to write
```
induction x with
| foo | bar => ...
| boo => ...
```
2022-06-14 11:16:58 -07:00
tydeu
1996d6710b
chore: update Lean version
2022-06-14 13:07:42 -04:00
Sebastian Ullrich
43b08239b0
fix: further conv goal state refinements
2022-06-14 11:09:47 +02:00
Sebastian Ullrich
7bb94abb62
feat: trace.Elab.input
...
Unlike Elab.command, it does not contain macro expansions
2022-06-14 10:41:56 +02:00
Leonardo de Moura
77ae79be46
chore: use let/if in do blocks
2022-06-13 17:10:14 -07:00
tydeu
7bbe6cfce8
feat: different package templates
2022-06-13 20:01:43 -04:00
Leonardo de Moura
7dbdfa090a
chore: remove debugging leftovers
2022-06-13 16:37:31 -07:00
E.W.Ayers
13e286f545
doc: fix docstring for InteractiveGoal
2022-06-13 16:32:01 -07:00
E.W.Ayers
2edf02544e
chore: rm ExprWithCtx
...
We will make this a separate PR
2022-06-13 16:32:01 -07:00
E.W.Ayers
367bde3601
chore: revert "refactor: replace InfoWithCtx with ExprWithCtx"
...
This reverts commit db342793d5 .
2022-06-13 16:32:01 -07:00
E.W.Ayers
f64cb95eca
refactor: replace InfoWithCtx with ExprWithCtx
...
This is potentially controversial. There are still some [todo]s that need sorting.
2022-06-13 16:32:01 -07:00
E.W.Ayers
3d561a3ab0
doc: add docstrings for interactive
2022-06-13 16:32:01 -07:00
E.W.Ayers
e3d2080232
refactor: PPExprTaggedRequest -> PPExprTaggedParams
2022-06-13 16:32:01 -07:00
E.W.Ayers
fd66e70d1e
fix: explicit structure for PPExprTaggedRequest
2022-06-13 16:32:01 -07:00
E.W.Ayers
69facfbe8e
fix: remove Optional from InteractiveHypothesisBundle.fvarIds
2022-06-13 16:32:01 -07:00
E.W.Ayers
45e3c72be7
refactor: InteractiveHypothesis → InteractiveHypothesisBundle
2022-06-13 16:32:01 -07:00
Ed Ayers
5130da82a8
doc: src/Lean/Widget/InteractiveGoal.lean
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2022-06-13 16:32:01 -07:00
E.W.Ayers
cea53fc53e
fix: tests
...
Caused by a classic imperative programming bug oops
2022-06-13 16:32:01 -07:00
E.W.Ayers
f2a874ebaa
fix: handle inaccessible fvar names correctly
2022-06-13 16:32:01 -07:00
E.W.Ayers
675147dcfc
fix: make InteractiveHyp.fvarIds optional
...
This is for backwards compat.
2022-06-13 16:32:01 -07:00
E.W.Ayers
0f61d1dc59
refactor: key fields are now f/mvarid fields
2022-06-13 16:32:01 -07:00
E.W.Ayers
4165b7e8ba
doc: ToHide.collect
2022-06-13 16:32:01 -07:00
E.W.Ayers
6e1c9653d9
feat: Add a key field to InteractiveGoal
...
This is used to uniquely identify InteractiveGoals and
InteractiveHypotheses. This makes it easier to do
contextual suggestions: eg the infoview can send a message
saying "the user clicked on subexpression 5 in hypothesis N in goal G"
where N and G are unique identifiers for a goal rather than pretty names
which may be non-unique or indices which may be difficult to compute
(eg in infoview there is a mode where hypotheses are reversed or filtered).
While adding these I also refactored the InteractiveGoal generating function.
I unwrapped a fold in to a for/in loop with mutating variables which is a
little easier to read.
2022-06-13 16:32:01 -07:00
Wojciech Nawrocki
351be06a21
feat: ppExprTagged RPC call
2022-06-13 16:32:01 -07:00
Wojciech Nawrocki
4972f214be
fix: sorried errors in rpcServerMethod
2022-06-13 16:32:01 -07:00
Leonardo de Moura
c2fdcad443
chore: update stage0
2022-06-13 16:23:53 -07:00
Leonardo de Moura
e52a7bdf42
feat: let/if indentation in do blocks
...
closes #1120
2022-06-13 16:18:49 -07:00
Leonardo de Moura
415f5f2a42
chore: style
2022-06-13 15:59:55 -07:00
Leonardo de Moura
dee712ec7e
chore: fix test
...
Pushed the wrong file in previous commit.
see #490
2022-06-13 14:06:56 -07:00
Leonardo de Moura
9ba5831de8
fix: _root_ prefix in declarations
...
closes #490
2022-06-13 14:03:18 -07:00
Leonardo de Moura
328586988c
chore: style
2022-06-13 13:58:29 -07:00
tydeu
7cd0107ae1
chore: start next Lake version
2022-06-13 13:03:32 -04:00
Sebastian Ullrich
bda871da25
feat: RBTree.union/diff
2022-06-13 11:12:51 +02:00
Leonardo de Moura
fb574af873
fix: mkSplitterProof
...
This commit fixes the first issue reported at #1179
closes #1179
2022-06-12 19:38:54 -07:00
Wojciech Nawrocki
46257dfb0e
feat: show bitwise terminates
2022-06-12 14:01:05 -07:00
Wojciech Nawrocki
4d05803782
feat: WF lemma for Nat division
2022-06-12 14:01:05 -07:00
Wojciech Nawrocki
2a53857928
feat: add strong Nat induction principle
2022-06-12 14:01:05 -07:00
Wojciech Nawrocki
ff15e31e85
refactor: remove redundant theorem
2022-06-12 14:01:05 -07:00
Leonardo de Moura
09d1530d8e
feat: detect unexpected occurrences of match-expression minor premises
...
The error message is far from perfect, but it is better than ignoring
the issue and failing later with an even more incomprehensible error
message.
see #1179
2022-06-12 12:07:42 -07:00
Leonardo de Moura
8a8a8b5e48
chore: style
2022-06-10 18:27:43 -07:00
Jakob von Raumer
033618ad5e
fix: indices in conv arg now count arguments with forward dependencies
2022-06-10 18:25:34 -07:00
Leonardo de Moura
17db981880
fix: equation theorem for match with more than one "as" pattern
...
see #1195
see #1179
2022-06-10 18:23:13 -07:00
tydeu
78c57161d8
chore: update Lake
2022-06-10 17:50:05 -07:00
tydeu
8646aa142d
release: 3.1.1
2022-06-10 19:41:38 -04:00
tydeu
22ecda20c7
feat: rev opt in git dep + fix path opt in require
2022-06-10 19:28:52 -04:00
tydeu
2f7825e06b
chore: start next Lake version
2022-06-10 19:20:32 -04:00
Leonardo de Moura
4ba7174c0c
fix: universe level parameter stabilitity issue
...
See comment.
2022-06-10 14:08:08 -07:00
tydeu
bf5c89352d
release: 3.1.0
2022-06-10 16:51:58 -04:00
tydeu
7ea84c5961
doc: update defaultFacet description
2022-06-10 16:13:55 -04:00
tydeu
05b4a8fc76
chore: silence some "unused variable" warnings
2022-06-10 15:44:08 -04:00
tydeu
e6e2c2ab72
test: make git example clone local repo
2022-06-10 15:25:34 -04:00
tydeu
144fbaf642
doc: update w/ extern_lib + some cleanup
2022-06-10 15:16:49 -04:00
tydeu
c77d6680a7
feat: allow @[defaultTarget] extern_lib
2022-06-10 14:57:46 -04:00
tydeu
1523e2d729
feat: extend DSL syntax and improve docs
2022-06-10 14:08:40 -04:00
tydeu
66797c4232
chore: bump Lean version
2022-06-10 13:54:52 -04:00
Sebastian Ullrich
67087ac16e
fix: bad reassignment
2022-06-10 18:28:31 +02:00
Sebastian Ullrich
efff36d3e9
chore: update stage0
2022-06-10 18:17:57 +02:00
tydeu
e5782adeff
feat: replace moreLibTargets w/ new extern_lib syntax
2022-06-10 12:08:58 -04:00
Sebastian Ullrich
61232e788a
fix: check types at do pattern reassignment
2022-06-10 17:31:36 +02:00
Sebastian Ullrich
a44fec2262
chore: CI: exclude test harder
2022-06-10 12:02:23 +02:00
Sebastian Ullrich
8c377436f4
fix: do not report unused variables in unfinished declarations
2022-06-10 11:27:11 +02:00
Sebastian Ullrich
45636324f9
chore: CI: exclude nonreproducible test
2022-06-10 11:12:09 +02:00
tydeu
8428ef7cd7
chore: improve imports lean-only build condition
2022-06-09 21:08:06 -04:00
tydeu
6f38ebebe9
doc: fix heading
2022-06-09 20:57:20 -04:00
tydeu
1f017deaa0
feat: trim log messages+ simplify MonadLog
2022-06-09 20:53:19 -04:00
tydeu
049259b47f
fix: delete duplicate improperly case Ffi.lean
2022-06-09 20:29:44 -04:00
Leonardo de Moura
97e689d670
chore: add link from Lean 4 manual to FP in Lean
2022-06-09 16:28:54 -07:00
tydeu
5fdf97db20
feat: none package facet to avoid warnings in scripts example
2022-06-09 19:12:29 -04:00
Leonardo de Moura
0ac863b353
chore: add link to the new book
2022-06-09 16:09:07 -07:00
tydeu
964eb5ef10
doc: update with new features + other cleanup
2022-06-09 18:58:43 -04:00
tydeu
108d9852ca
chore: deprecate package facets
2022-06-09 16:38:07 -04:00
tydeu
d28cb121b5
feat: packages names don't eat up an identifier
2022-06-09 14:13:54 -04:00
tydeu
9dadf7e0b1
feat: attr to mark targets as package defaults
2022-06-09 12:52:54 -04:00
Sebastian Ullrich
41dfd06e8c
fix: intro/intros: do not register _ as binder in info tree
...
Fixes #1204
2022-06-09 15:23:56 +02:00
Chris Lovett
33159b51e5
chore: build integration with TPIL
2022-06-09 09:23:04 +02:00
tydeu
cb6db07bb9
chore: warnings on deprecated features
2022-06-08 18:21:15 -04:00
tydeu
1be19f0ebd
fix: another casing error in targets test
2022-06-08 17:53:40 -04:00
tydeu
318b12c710
fix: casing in targets test
2022-06-08 17:42:01 -04:00
tydeu
5ea07ae20e
refactor: preserve case in exe root default
2022-06-08 17:37:05 -04:00
tydeu
427ad67d79
fix: include submodules at hasModule + test
2022-06-08 17:34:57 -04:00
tydeu
9c20cad9d8
feat: syntax for defining extra lib & exe targets
2022-06-08 17:06:03 -04:00
Leonardo de Moura
d0499ebf4d
fix: fixes #1200
2022-06-08 10:18:05 -07:00
tydeu
76383dfccc
fix: properly catch CLI errors
2022-06-07 22:38:16 -04:00
Leonardo de Moura
fa64c072ab
feat: where declarations at instances
...
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Local.20functions.20in.20instances/near/285333999
2022-06-07 18:48:15 -07:00
Leonardo de Moura
0c28d4ff4d
chore: update stage0
2022-06-07 18:42:16 -07:00
Leonardo de Moura
1e59eb2290
chore: update whereStructInst
2022-06-07 18:41:43 -07:00
tydeu
18b6bf3cf8
fix: exe link args & targets test
2022-06-07 21:27:41 -04:00
Leonardo de Moura
ce78c17f2d
chore: update stage0
2022-06-07 17:54:42 -07:00
Leonardo de Moura
041827bed5
chore: unused variables
2022-06-07 17:54:10 -07:00
tydeu
18eef56322
feat: multi lib & exe targets w/ updated build CLI syntax
2022-06-07 20:48:41 -04:00
Leonardo de Moura
a18c78e617
chore: update stage0
2022-06-07 16:48:55 -07:00
Leonardo de Moura
c2ddebc193
chore: unused variables
2022-06-07 16:47:04 -07:00
Sebastian Ullrich
130cc8bbd5
chore: fix test
2022-06-07 16:37:45 -07:00
Sebastian Ullrich
f9e2a65f75
chore: further cleanup
...
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2022-06-07 16:37:45 -07:00
Sebastian Ullrich
8eefbf5227
chore: further clean up refactored code
2022-06-07 16:37:45 -07:00
Sebastian Ullrich
897a5de6ac
chore: revert some questionable signature changes
2022-06-07 16:37:45 -07:00
Sebastian Ullrich
fb2a2b3de2
fix: fixup previous commit
2022-06-07 16:37:45 -07:00
Sebastian Ullrich
ae7b895f7a
refactor: unname some unused variables
2022-06-07 16:37:45 -07:00
tydeu
b6bce412a9
refactor: split lib and exe config from package
2022-06-07 16:48:55 -04:00
Sebastian Ullrich
8ffa07ab25
fix: goal state on conv =>
2022-06-07 17:43:16 +02:00
Sebastian Ullrich
a07e9df66e
fix: use goal prefix in plain goal response
2022-06-07 17:42:09 +02:00
Sebastian Ullrich
388ed62858
chore: update Alectryon
2022-06-07 17:14:41 +02:00
Chris Lovett
885deec745
doc: add link to short quickstart video
2022-06-06 18:32:11 -07:00
Leonardo de Moura
09ddf76029
feat: simp_all now uses dependent hypotheses for simplification
...
However, it does not simplify them.
closes #1194
2022-06-06 18:31:34 -07:00
Leonardo de Moura
875e71a0d7
chore: unused variables at Simp.lean
2022-06-06 18:24:10 -07:00
Leonardo de Moura
71226243fd
fix: fixes #1192
2022-06-06 18:20:45 -07:00
Leonardo de Moura
0f111da64c
chore: unused variables at Inductive.lean
2022-06-06 18:15:25 -07:00
Leonardo de Moura
5055855637
feat: improve default simp discharge method
...
closes #1193
2022-06-06 17:29:12 -07:00
Leonardo de Moura
3d04899e42
refactor: add unifyEq?
2022-06-06 15:53:40 -07:00
Leonardo de Moura
c9c9b8d835
chore: avoid code duplication
2022-06-06 15:53:40 -07:00
Leonardo de Moura
7dab01be1b
chore: unused eqns
2022-06-06 15:53:40 -07:00
Leonardo de Moura
2832442e7a
fix: unfold declarations tagged with [matchPattern] at reduceMatcher? even if transparency setting is not the default one
...
see #1193
It fixes one of the issues exposed at the issue above.
2022-06-06 15:53:40 -07:00
Leonardo de Moura
e24483d6d3
doc: expand isGenDiseq comment
2022-06-06 15:53:40 -07:00
larsk21
60c8a72262
fix: unused variables linter: consider induction variables as pattern variables
2022-06-06 15:53:10 -07:00
larsk21
a9293410a2
fix: unused variables linter: ignore structure, class and inductive signatures
2022-06-06 15:53:10 -07:00
Wojciech Nawrocki
5b13a4909b
doc: fix transform docstring
2022-06-06 23:06:47 +02:00
Sebastian Ullrich
143b2b49c8
fix: induction: do not register _ as binder in info tree
2022-06-06 23:05:12 +02:00
E.W.Ayers
d55daf80d4
doc: fix misleading SubExpr docstring
2022-06-06 09:37:51 -07:00
Leonardo de Moura
d00d8a2104
fix: typo at copyDefaultValue?
...
see #1190
2022-06-06 07:57:23 -07:00
Leonardo de Moura
22281f25c8
fix: typo at sameHeadSymbol
...
see #1190
2022-06-06 07:46:57 -07:00
Sebastian Ullrich
7428dc5e71
Revert "chore: CI: use publish-unit-test-result-action"
...
Was just an experiment, its benefit is negligible
This reverts commit 3575981ee6 .
2022-06-05 14:23:20 +02:00
Sebastian Ullrich
3c41962275
refactor: Expr.forEach' use in unused variables linter
2022-06-05 14:16:40 +02:00
Sebastian Ullrich
85e0e0ad20
doc: fix Expr.forEach' docstring
2022-06-05 14:16:29 +02:00
Sebastian Ullrich
3575981ee6
chore: CI: use publish-unit-test-result-action
2022-06-05 14:10:17 +02:00
Sebastian Ullrich
7870c24cdd
chore: update stage0
2022-06-04 13:57:39 +02:00
Sebastian Ullrich
ec045bfbb8
feat: $_ antiquotation pattern
2022-06-04 13:57:04 +02:00
Sebastian Ullrich
a65197bb78
doc: update changelog
2022-06-03 22:58:38 +02:00
Sebastian Ullrich
05c5dd4441
fix: unused variables linter: search fvar aliases in tactics
2022-06-03 22:37:38 +02:00
Sebastian Ullrich
f3a7654a63
fix: unused variables linter: find nested uses in tactics
2022-06-03 22:37:38 +02:00
E.W.Ayers
1785ab142e
refactor: move Lean.PrettyPrinter.Delaborator.SubExpr to Lean.SubExpr
...
This is because SubExpr has uses outside the Delaborator.
Closes #1183
2022-06-03 12:38:14 -07:00
tydeu
431cdbb6b7
refactor: MainM code cleanup
2022-06-03 12:57:06 -04:00
tydeu
4bb5b407be
refactor: split up DSL.Commands
2022-06-03 11:15:49 -04:00
Sebastian Ullrich
a0624ec296
chore: CI: ignore foreigntest on Linux release
2022-06-03 17:04:06 +02:00
tydeu
a815d29630
feat: __dir__/`__args__ syntax for config settings
2022-06-03 10:58:42 -04:00
Leonardo de Moura
9d6b67eae2
fix: remove check from Simp.synthesizeArgs
...
Some `simp` dischargers can handle metavariables (e.g,
`assumption`). See new test.
closes #1184
2022-06-03 07:40:30 -07:00
Sebastian Ullrich
3cfbdd134a
fix: update Alectryon
2022-06-03 16:05:59 +02:00
Sebastian Ullrich
0b264889ae
fix: goal state on ; after ·
2022-06-03 13:41:04 +02:00
Sebastian Ullrich
d15934c0ac
chore: Nix: Bring-Your-Own-Emacs .#emacs-path-dev
2022-06-03 13:41:04 +02:00
Sebastian Ullrich
cfa14b3ce0
chore: nix flake update
2022-06-03 13:41:04 +02:00
larsk21
caa8804a1d
feat: add nolint options for function arguments and pattern variables
2022-06-03 13:03:52 +02:00
larsk21
93480a3e05
fix: consider tactic mvar assignments for used variables
2022-06-03 13:03:52 +02:00
larsk21
bf907d7b8c
fix: ignore exposed function arguments in unused variables linter
2022-06-03 13:03:52 +02:00
larsk21
57c8c76cd0
fix: use findModuleRefs in unused variables linter
2022-06-03 13:03:52 +02:00
larsk21
b556e73657
refactor: extend Lsp.ModuleRefs in Server.References
2022-06-03 13:03:52 +02:00
larsk21
cf4e106304
fix: unused variables linter review comments
...
- ignore unused variables in dep arrows
- avoid negated options
- make syntax stack generation more performant
- make ignore functions more extensible
- change message severity to `warning`
2022-06-03 13:03:52 +02:00
larsk21
b708eaec2c
fix: forward lean options to workers
2022-06-03 13:03:52 +02:00
larsk21
393fdef972
fix: disable linters in tests
2022-06-03 13:03:52 +02:00
larsk21
37d5f8e74a
feat: add unused variables linter
2022-06-03 13:03:52 +02:00
larsk21
8824a479a5
fix: add additional information to Lean.Server.Reference
2022-06-03 13:03:52 +02:00
larsk21
1a1f8f52a5
fix: run linters after elaboration
2022-06-03 13:03:52 +02:00
Leonardo de Moura
8649483b41
feat: produces an error if the declaration body contains a universe parameter that does not occur in the declaration type nor is explicitly provided
...
closes #898
2022-06-02 19:43:09 -07:00
tydeu
1c512bdf20
refactor: merge 'MonadLog and LogMethods`
2022-06-02 19:43:07 -04:00
Leonardo de Moura
484e510221
feat: do not use pp.inaccessibleNames = true at getInteractiveTermGoal
...
See discussion at https://github.com/leanprover/vscode-lean4/issues/76
We also use `pp.inaccessibleNames = false` in error messages. In this
setting, an inaccessible name is displayed in the context only if the
target type depends on it.
2022-06-02 16:22:43 -07:00
tydeu
cf5fe7e478
refactor: some CLI code cleanup
2022-06-02 18:56:17 -04:00
Leonardo de Moura
878ef3a281
feat: improve acyclic tactic
...
closes #1182
2022-06-02 15:25:14 -07:00
Sebastian Ullrich
1fff412b1f
fix: regressions from previous commit
2022-06-02 19:04:47 +02:00
Sebastian Ullrich
ddfbf6bf9b
fix: show namespace when hovering over declaration name
2022-06-02 18:17:21 +02:00
Leonardo de Moura
32db316166
fix: enumeration type noConfusion was not registered
...
This commit fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/.28kernel.29.20function.20expected.20.2EnoConfusion/near/284634050
2022-06-01 17:58:46 -07:00
tydeu
81ea5049af
feat: caption process stdout and stderr
...
closes leanprover/lake#54
2022-06-01 18:09:39 -04:00
tydeu
c19417b86a
feat: new require syntax for package deps
2022-06-01 16:26:39 -04:00
Gabriel Ebner
9a273b85a3
fix: no sorry-warning for missing match cases
2022-06-01 07:41:52 -07:00
Leonardo de Moura
bf0b675ca6
chore: fix tests
2022-06-01 06:36:25 -07:00
Leonardo de Moura
9102f8cb13
fix: generate sorry warning only if there are no error messages
...
see #1163
2022-06-01 06:32:05 -07:00
Leonardo de Moura
9290a0e9b1
chore: fix tests
2022-05-31 18:17:56 -07:00
Leonardo de Moura
ac440e757d
chore: update stage0
2022-05-31 18:14:05 -07:00
Leonardo de Moura
5302267220
test: for #1163
2022-05-31 18:09:27 -07:00
Leonardo de Moura
2e6dae01f0
chore: synthetic := false by default at sorryAx
2022-05-31 18:08:10 -07:00
Leonardo de Moura
2b2f315fb9
chore: fix tests
2022-05-31 18:01:48 -07:00
Leonardo de Moura
64c36fffda
feat: generate warning message if declaration has a non-synthetic sorry
...
closes #1163
2022-05-31 18:00:48 -07:00
Leonardo de Moura
0631c90794
feat: implement MonadLog at CoreM
2022-05-31 17:40:55 -07:00
Leonardo de Moura
caa79ca04f
refactor: move MonadLog
2022-05-31 16:50:48 -07:00
Leonardo de Moura
be69d04af4
feat: add Declaration.hasSorry
2022-05-31 16:39:37 -07:00
Leonardo de Moura
5f7cc78f17
fix: remove unnecessary let-expressions when computing the motive
...
fixes #1155
2022-05-31 07:14:56 -07:00
Leonardo de Moura
704242f865
feat: zetaReduce should expand nested let-expressions too
2022-05-31 07:01:52 -07:00
Leonardo de Moura
d8aab852e8
feat: add usedLetOnly parameter to Meta.transform
2022-05-31 07:00:53 -07:00
Leonardo de Moura
e997cd94c6
chore: style
2022-05-31 06:04:48 -07:00
larsk21
a741540400
fix: relax InfoTree.visitM when visiting holes
2022-05-31 13:14:24 +02:00
Wojciech Nawrocki
115c564b18
feat: go to head constant in applications
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2022-05-31 00:07:56 +02:00
Wojciech Nawrocki
737e872ee0
feat: set tagAppFns in explicit exprToInteractive
2022-05-31 00:07:56 +02:00
Wojciech Nawrocki
9c9407e722
feat: propagate tagAppFns in delaborator
2022-05-31 00:07:56 +02:00
Wojciech Nawrocki
cd47c30e47
chore: review fixes
2022-05-31 00:07:56 +02:00
Wojciech Nawrocki
8c67afae2f
feat: generalize getGoToLocation RPC
2022-05-31 00:07:56 +02:00
Wojciech Nawrocki
8c5cebfb11
chore: default optional LSP fields
2022-05-31 00:07:56 +02:00
Wojciech Nawrocki
aef8d32d0b
feat: add RPC call to retrieve defn/decl/type defn
2022-05-31 00:07:56 +02:00
Wojciech Nawrocki
9c058a5798
chore: remove some unnecessary partial
2022-05-31 00:07:56 +02:00
Wojciech Nawrocki
e555490ee2
feat: store subexpression positions
2022-05-31 00:07:56 +02:00
Wojciech Nawrocki
25a8646a5f
feat: add showDocument client capability
2022-05-31 00:07:56 +02:00
ammkrn
102e957bb5
feat: support proofs in deriving DecidableEq
...
The derive handler for `DecidableEq` does not currently support proofs
in constructor arguments/structure fields. For example, deriving
`DecidableEq` for `Fin n` will fail, because of the field `isLt`. This
change checks whether the elements being tested are proofs, and if so,
changes the equality proof to just `rfl`.
2022-05-30 07:36:30 -07:00
Leonardo de Moura
9818de078b
fix: fixes #1168
2022-05-30 07:24:23 -07:00
Leonardo de Moura
fb45eb4964
fix: universe polymorphic enumeration types
...
Fixes issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Incorrect.20number.20of.20universe.20levels.20parameters/near/284283021
2022-05-30 06:43:46 -07:00
Leonardo de Moura
b0efae4823
chore: style
2022-05-30 06:43:46 -07:00
Sebastian Ullrich
ef9976ccda
fix: do not discard macro exceptions in expandMacro?
2022-05-30 13:28:42 +02:00
Sebastian Ullrich
d3cf60e86a
chore: further refine goal state heuristics
2022-05-30 13:27:56 +02:00
Sebastian Ullrich
b31690b1d7
fix: go to definition/goal state at end of syntax
2022-05-30 11:16:25 +02:00
Leonardo de Moura
ca6f53b407
feat: use subst_vars at builtin decreasing_tactic
2022-05-28 16:24:32 -07:00
Leonardo de Moura
6dc728cc60
chore: update stage0
2022-05-28 16:20:23 -07:00
Leonardo de Moura
40fc64480a
feat: add tactic subst_vars
2022-05-28 16:19:34 -07:00
Leonardo de Moura
2c5bafcbd8
fix: dead variables at match equation hypotheses
...
This commit addresses an issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Structural.20Recursion.20Problem/near/284238723
2022-05-28 16:09:35 -07:00
Leonardo de Moura
e26f86dd45
fix: improve simpH?, remove unnecessary hypotheses
2022-05-28 15:30:01 -07:00
Leonardo de Moura
34bbe5d12c
feat: add simp theorem List.of_toArray_eq_toArray (as bs : List α) : (as.toArray = bs.toArray) = (as = bs) := by
2022-05-27 18:26:48 -07:00
Leonardo de Moura
fbd8224b4d
fix: allow recursive occurrences in binder types at WF/PackDomain.lean
...
fixes #1171
2022-05-27 11:23:51 -07:00
Leonardo de Moura
3be437cad3
fix: make sure register_simp_attr declares an simp-like attribute parser for user simp attributes
...
closes #1164
2022-05-26 19:49:33 -07:00
Leonardo de Moura
7d8f8c0fbe
chore: style
2022-05-26 15:18:07 -07:00
Leonardo de Moura
25126cd057
fix: autoParam is structure fields lost in multiple inheritance
...
closes #1158
2022-05-26 14:35:47 -07:00
Leonardo de Moura
b4c1163f8f
chore: update stage0
2022-05-26 14:22:38 -07:00
Leonardo de Moura
f48b822532
feat: add field for storing autoParam information at StructureFieldInfo
...
We need this information when copying fields from parent structures.
We don't use hacks such as traversing the parent constructor type.
2022-05-26 14:21:03 -07:00
Leonardo de Moura
dcb974a1cf
chore: remove unused parameter
2022-05-26 14:20:51 -07:00
Leonardo de Moura
fc606f3ab5
fix: closes #1156
2022-05-26 12:51:28 -07:00
Leonardo de Moura
988697b431
fix: fixes #1169
2022-05-26 07:05:32 -07:00
Leonardo de Moura
1d14637680
fix: missing withMVarContext
2022-05-26 06:18:14 -07:00
Leonardo de Moura
fad21a4cda
chore: remove leftovers
2022-05-25 20:38:20 -07:00
Leonardo de Moura
944063682e
fix: another specialize.cpp bug
...
This is just a workaround. This code has to be ported to Lean.
The issue has been reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/.28kernel.29.20unknown.20constant/near/283750650
2022-05-25 20:36:18 -07:00
Leonardo de Moura
dca8a8ed98
fix: match or-pattern
...
This issue has been reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Probably.20a.20bug/near/283779934
2022-05-25 20:05:46 -07:00
Leonardo de Moura
bef1cd4872
fix: make structure instance notation (e.g., { a, b }) works in patterns after we define the Set notation in Mathlib
2022-05-25 19:14:22 -07:00
tydeu
94c48d2d29
refactor: cleanup runFrontend
2022-05-25 16:52:41 -04:00
Leonardo de Moura
a26827f58b
chore: remove Context.main
2022-05-25 11:58:33 -07:00
Jannis Limperg
6dc5ddac35
fix: apply after-compilation attributes to inductive/structure decls
...
Attributes with `AttributeApplicationTime.afterCompilation` were
silently not applied to `inductive` and `structure` declarations.
2022-05-25 11:32:08 -07:00
Gabriel Ebner
b50f80c393
perf: cache imported environment
2022-05-25 13:13:38 -04:00
Sebastian Ullrich
4a1885f997
chore: update benchmark suite
2022-05-25 18:26:36 +02:00
asdasd1dsadsa
794877c0c8
chore: add option to exclude 'LICENSE' files from 'make install'
2022-05-25 12:39:30 +02:00
Sebastian Ullrich
b97fb23dbe
chore: update stage0
2022-05-25 09:48:11 +02:00
Sebastian Ullrich
0a39e9cbdc
fix: dynamic quotations should use previous stage by default
...
@leodemoura as discussed some time ago
2022-05-25 09:46:10 +02:00
tydeu
55a2395db5
feat: retool configure into update
...
closes leanprover/lake#69
2022-05-24 13:57:30 -04:00
Leonardo de Moura
cb32681978
doc: add slide headers to examples
2022-05-23 18:20:37 -07:00
Leonardo de Moura
bf5f107e74
doc: missing NFM examples
2022-05-23 18:04:03 -07:00
tydeu
85e3385aaa
feat: only update deps in configure + don't ignore manifest.json
...
closes leanprover/lake#59 , leanprover/lake#63
2022-05-23 20:38:54 -04:00
tydeu
c1b4074d54
fix: only write manifest if a package was resolved
2022-05-23 20:28:36 -04:00
tydeu
e8d59a7a6e
feat: save resolved packages in a manifest
...
closes leanprover/lake#31
2022-05-23 19:47:29 -04:00
Leonardo de Moura
7c427c1ef2
fix: make sure let-expressions do not affect the structural recursion module
...
This issue has been reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Termination.20check.20not.20preserved.20under.20let.20binding.2E/near/282934378
2022-05-23 13:42:48 -07:00
Leonardo de Moura
655c9fafa4
chore: update stage0
2022-05-23 12:00:10 -07:00
Leonardo de Moura
d05dff078a
chore: update stage0
2022-05-23 11:56:59 -07:00
Leonardo de Moura
2fc23a2a2b
feat: make sure we can use split to synthesize code
2022-05-23 11:55:57 -07:00
Leonardo de Moura
e552558f2f
chore: style
2022-05-23 11:04:29 -07:00
Leonardo de Moura
6ce6b12707
doc: NFM'22 examples
2022-05-22 19:21:30 -07:00
Leonardo de Moura
56cd6c1ff5
fix: we should not use implicit targets when creating the key for the CustomEliminator map
2022-05-20 06:55:23 -07:00
Leonardo de Moura
063c77037f
chore: fix typo
2022-05-20 06:44:25 -07:00
tydeu
10c444e5ef
fix: include moreLeanArgs in module trace
...
closes leanprover/lake#50
2022-05-19 14:28:00 -04:00
E.W.Ayers
8ef0154403
refactor: rpc -> serverRpcMethod
2022-05-19 18:53:19 +02:00
E.W.Ayers
3bdb98e5ee
feat: rpc attribute
...
Functions can now be marked with the `@[rpc]` attribute, which
registers the function as an RpcProcedure that can be used to
communicate with the code editor and infoview.
2022-05-19 18:53:19 +02:00
tydeu
e24d6f1181
fix: include Lean version in binary trace
...
closes leanprover/lake#62
2022-05-19 11:34:01 -04:00
Sebastian Ullrich
d13fac6f45
doc: update quickstart
2022-05-18 17:43:14 +02:00
Sebastian Ullrich
c3a9831388
doc: document ‹t›
2022-05-18 10:32:06 +02:00
Sebastian Ullrich
1d44c30b3f
refactor: simplify log2 termination proof
2022-05-18 10:20:36 +02:00
Sebastian Ullrich
eb170d1f43
fix: compiled string literals containing null bytes
2022-05-17 09:24:34 -07:00
Sebastian Ullrich
1e271c3432
chore: CI: document ridiculous workaround
2022-05-17 17:45:58 +02:00
Sebastian Ullrich
14225b81ce
chore: CI: really?
2022-05-17 15:53:33 +02:00
Sebastian Ullrich
a2bf2a4abd
fix: info at pattern variables
2022-05-17 06:28:59 -07:00
tydeu
9f333147f5
chore: start next Lake version
2022-05-16 11:28:12 -04:00
tydeu
7a499ee09b
release: 3.0.1
2022-05-16 11:18:32 -04:00
tydeu
c03b388d6f
chore: bump Lean version
2022-05-16 11:12:49 -04:00
Sebastian Ullrich
61c7b8b94c
chore: format string
2022-05-16 15:14:01 +02:00
Sebastian Ullrich
46df02877d
fix: elab info for decreasing_by
2022-05-16 10:20:49 +02:00
Sebastian Ullrich
bfb9dc0697
chore: CI: really do not build nightlies on forks
2022-05-16 09:58:26 +02:00
Gabriel Ebner
a28c1da704
fix: do not call git checkout unless necessary
...
See leanprover/lake#63 .
2022-05-15 16:13:14 -04:00
Gabriel Ebner
be570305fc
perf: do not resolve full git object names
2022-05-15 16:13:14 -04:00
Gabriel Ebner
712b22b46f
perf: do not import Lean.Elab.Frontend from Lake
2022-05-15 15:56:50 -04:00
Sebastian Ullrich
4934104eaf
chore: update script/reformat.lean
2022-05-13 11:55:44 +02:00
Wojciech Nawrocki
5cd4bd3552
refactor: auto-derive RpcEncoding
2022-05-12 13:22:37 -07:00
Wojciech Nawrocki
a8cfbb11bf
Revert "chore: fix tests"
...
This reverts commit c6acd968d7 .
2022-05-12 13:22:37 -07:00
Wojciech Nawrocki
c81ee908ea
chore: update stage0
2022-05-12 13:22:37 -07:00
Wojciech Nawrocki
bea68819c9
feat: support optional RPC fields
2022-05-12 13:22:37 -07:00
Wojciech Nawrocki
dd6528bceb
fix: undo incorrect JSON encoding
2022-05-12 13:22:37 -07:00
Leonardo de Moura
f1e9ed2e5a
chore: update stage0
2022-05-12 08:48:57 -07:00
Leonardo de Moura
c6acd968d7
chore: fix tests
2022-05-12 08:44:00 -07:00
Leonardo de Moura
9460078dd1
chore: update stage0
2022-05-12 08:39:27 -07:00
Sebastian Ullrich
4e3ddf716e
refactor: unnecessary quotation kind
2022-05-12 08:38:09 -07:00
Sebastian Ullrich
75cbb5904e
refactor: use syntax quotations
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
7ad1ccab78
feat: use quotation prechecks where possible at FromToJson
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
9296afca12
chore: undo unnecessary change
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
fbb20d465b
fix: RpcEncoding tests
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
603a062f1f
chore: revert API change
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
63b33424e1
feat: add Widget.Basic
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
460abc4b94
fix: failure in FromToJson
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
0b554f385e
feat: RpcEncoding for inductive types
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
c291a78b6a
fix: repeated field types in RpcEncoding
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
a19c666f2d
feat: add helpers
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
100008ceb1
feat: support generic structure parameters in RpcEncoding
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
72c4717055
chore: remove dead code
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
11e10459bb
refactor: move function to PrettyPrinter
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
81b1f1df6e
refactor: unify format functions
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
aa2ad384e7
chore: remove old InfoTree ctor
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
b33eb12328
chore: simplify evaluation and use macro scope instead of namespace
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
aa5fe5864a
doc: document some Deriving utils
2022-05-12 08:38:09 -07:00
Wojciech Nawrocki
4b3c2b1790
doc: document some meta utilities
2022-05-12 08:38:09 -07:00
Leonardo de Moura
a8032e4173
fix: another mut misbehaving example
...
```
def mutVariableDo2 (list : List Nat) : Nat := Id.run <| do
let mut sum := 0
for _ in list do
sum := sum.add 1 -- first `sum` was not connected, i.e., it was not highlighted when hovering over the second `sum`
pure sum
```
2022-05-12 08:26:07 -07:00
Leonardo de Moura
362961912b
chore: remove unnecessary variable
2022-05-12 06:44:13 -07:00
Leonardo de Moura
f44a701637
chore: style
2022-05-11 15:32:18 -07:00
Sebastian Ullrich
d03f0b3851
fix: set of chained lexical references
2022-05-11 17:32:06 +02:00
Sebastian Ullrich
23fac14b33
chore: try with fresh cache
2022-05-11 12:31:55 +02:00
Leonardo de Moura
94d2a3ef86
feat: improve error message when failing to infer resulting universe level for inductive datatypes and structures
2022-05-10 18:30:53 -07:00
Leonardo de Moura
c935a3ff6a
feat: improve error location for universe level errors at inductive command
2022-05-10 12:50:01 -07:00
Sebastian Ullrich
392640d292
feat: allow keyword-like projection identifiers
2022-05-10 12:25:30 -07:00
Leonardo de Moura
37b2f74404
chore: update stage0
2022-05-10 11:24:10 -07:00
Leonardo de Moura
1d066364f3
chore: update stage0
2022-05-10 11:21:54 -07:00
Leonardo de Moura
f58afaaa43
fix: make sure let _ := val and let _ : type := val are treated at letIdDecl
...
closes #1114
2022-05-10 06:52:27 -07:00
Sebastian Ullrich
1b51bab4a1
feat: turn on info trees by default
2022-05-10 06:24:31 -07:00
Leonardo de Moura
7ce0471f28
feat: improve binrel% elaborator
...
It now relies on `binop%` too, and addresses issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Regression.20in.20coercion.20inference/near/281737387
2022-05-09 18:39:52 -07:00
Leonardo de Moura
1768067aa0
doc: document elaboration issue
...
described at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Regression.20in.20coercion.20inference/near/281737387
TODO: improve `binrel%` elaboration function.
2022-05-09 17:39:24 -07:00
Sebastian Ullrich
ff6537be1b
fix: use consistent goal prefix everywhere
2022-05-09 17:49:00 +02:00
Leonardo de Moura
fc03b2fc31
feat: unfold ident,+
2022-05-09 07:09:53 -07:00
Leonardo de Moura
2680711f6a
chore: update stage0
2022-05-09 07:09:53 -07:00
Leonardo de Moura
995d4f0979
chore: prepare for unfold ident,+
2022-05-09 07:09:22 -07:00
Leonardo de Moura
e729b32b2b
feat: unfold should fail if it didn't unfold anything
2022-05-09 06:41:17 -07:00
Leonardo de Moura
4875224bd4
feat: unfold tactic tries to reduce match after unfolding
2022-05-09 06:35:40 -07:00
Leonardo de Moura
ecbc59c8d8
chore: split Notation.lean
2022-05-09 05:20:19 -07:00
Sebastian Ullrich
fa7c35f4f6
doc: normalize tactic doc strings
2022-05-09 10:37:59 +02:00
William Blake
9c72917f5e
doc: fix typo gree -> tree
2022-05-09 09:44:48 +02:00
Leonardo de Moura
3cd46888bf
fix: check types using default reducibility at synthInstance?
...
closes #1131
2022-05-08 06:49:14 -07:00
Leonardo de Moura
0fd47fd817
chore: update stage0
2022-05-07 15:52:01 -07:00
Sebastian Ullrich
91991649bc
fix: connect occurrences of mutable variable inside and outside for in info tree
2022-05-07 15:50:26 -07:00
Sebastian Ullrich
22f8ea147c
fix: propagate position information of variables in do blocks
2022-05-07 15:50:26 -07:00
Sebastian Ullrich
daa9e03e78
fix: combineFvars
2022-05-07 15:50:26 -07:00
Sebastian Ullrich
2f461d201e
fix: info tree of let_delayed
2022-05-07 15:50:26 -07:00
François G. Dorais
155b41937a
fix: remove unnecessary hypothesis ( #1144 )
2022-05-07 15:39:37 -07:00
Leonardo de Moura
9043f91d8c
fix: if Tactic.Context.recover == false, we must disable "error to sorry" when elaborating terms in tactics
...
closes #1142
2022-05-07 15:37:12 -07:00
Leonardo de Moura
ab31f9ad5d
fix: fixes #1143
2022-05-07 15:27:34 -07:00
Leonardo de Moura
dc1b16c4fb
chore: update stage0
2022-05-07 15:10:06 -07:00
Leonardo de Moura
2c8c20d424
feat: add [eliminator] attribute specifying default recursors/eliminators for the cases and induction tactics
2022-05-07 15:09:42 -07:00
Leonardo de Moura
73cb952275
feat: add Hashable (Array α) instance
2022-05-07 15:01:32 -07:00
Leonardo de Moura
b5bcf252ce
chore: cleanup
2022-05-07 14:48:22 -07:00
Leonardo de Moura
af5e13e534
feat: improve binop% elaboration function
2022-05-07 10:32:55 -07:00
Leonardo de Moura
38baeaf373
feat: backtrack when applying default instances if subproblems cannot be solved
2022-05-07 09:56:38 -07:00
Leonardo de Moura
8c23bef399
feat: add support for casesOn applications to structural and well-founded recursion modules
2022-05-06 17:12:10 -07:00
Leonardo de Moura
090503cfd5
chore: cleanup
2022-05-06 17:12:10 -07:00
KaseQuark
5ebd6c28db
feat: change "⊢" in conv goals to "|"
2022-05-06 09:35:04 +02:00
Leonardo de Moura
7a1c79043e
chore: fix test
2022-05-04 15:34:37 -07:00
Leonardo de Moura
dce92c6362
chore: update stage0
2022-05-04 15:32:22 -07:00
Leonardo de Moura
db89750030
chore: update RELEASES.md
2022-05-04 15:31:57 -07:00
Leonardo de Moura
5aaccc8ebb
chore: remove OptionM
2022-05-04 15:30:10 -07:00
Leonardo de Moura
eaea5c4773
chore: update stage0
2022-05-04 15:28:49 -07:00
Leonardo de Moura
c65537aea5
feat: Option is a Monad again
...
TODO: remove `OptionM` after update stage0
see: https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Do.20we.20still.20need.20OptionM.3F/near/279761084
2022-05-04 15:27:42 -07:00
Leonardo de Moura
04d3c6feeb
fix: auto implicit behavior on constructors
2022-05-04 15:04:49 -07:00
Leonardo de Moura
a1af8074c9
feat: improve discriminant refinement procedure
2022-05-04 14:46:43 -07:00
Leonardo de Moura
16ed5a3213
fix: erase_irrelevant.cpp
...
It addresses issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/'unreachable'.20code.20was.20reached.20by.20termination.20check/near/281159704
2022-05-04 08:06:59 -07:00
Leonardo de Moura
94b5a9b460
feat: improve split tactic
2022-05-03 17:46:50 -07:00
Gabriel Ebner
88e26b75b0
fix: actually abort with LEAN_ABORT_ON_PANIC
...
The previous null-pointer dereference was UB and therefore optimized
away.
2022-05-03 09:42:45 -07:00
Sebastian Ullrich
f6e74c677e
doc: metaprogramming-arith: deduplicate
2022-05-03 18:38:36 +02:00
Sebastian Ullrich
87431da7b1
doc: metaprogramming-arith: style
2022-05-03 18:38:36 +02:00
Joscha
5749fb1474
fix: search for local refs only in current file
...
Fixed by adding the identifier's module as an argument to referringTo.
If the ident is RefIdent.const, this is ignored, but if it is
RefIdent.fvar, referringTo limits its search to the ident's module.
2022-05-03 16:53:03 +02:00
Sebastian Ullrich
e76a2a6d9e
chore: normalize spelling
2022-05-03 10:26:11 +02:00
Leonardo de Moura
94abfdba6c
feat: improve implementedBy errors, and relax type matching test
2022-05-02 08:48:15 -07:00
Leonardo de Moura
fe00dd8f29
fix: missing sanitizeNames at msgToInteractiveAux
2022-05-02 07:35:12 -07:00
Sebastian Ullrich
c755aa81bd
fix: properly distinguish between internal and public linker flags
2022-05-02 13:53:52 +02:00
Sebastian Ullrich
2f3396e58a
fix: non-termination in deduplication of lexical references
2022-05-02 09:51:14 +02:00
Sebastian Ullrich
09e4c00c68
fix: lexical references through x := e and similar macros
2022-05-01 17:46:05 +02:00
Leonardo de Moura
109363bc7e
fix: closes #1132
2022-05-01 08:18:30 -07:00
Leonardo de Moura
4eb2cfec46
feat: make sure case' ... => tac does not use done after tac
2022-05-01 07:30:11 -07:00
Leonardo de Moura
03524305db
fix: findTag?
...
If there is an exact match, return it.
2022-05-01 07:30:11 -07:00
Sebastian Ullrich
a0678b5f6f
refactor: rename confusing Reference.isDeclaration field
2022-05-01 16:21:15 +02:00
Sebastian Ullrich
7512f8ab6e
chore: CI: pin setup-msys2
...
https://github.com/msys2/setup-msys2/issues/216
2022-05-01 11:58:58 +02:00
Sebastian Ullrich
952abbf16b
chore: remove obsolete workaround
2022-05-01 11:52:53 +02:00
Sebastian Ullrich
4174643dbd
perf: optimize withAntiquot parenthesizer
...
Doesn't look like we'll get rid of the backtracking anytime soon
2022-05-01 11:52:53 +02:00
Leonardo de Moura
fa943d3864
chore: update RELEASES.md
2022-04-29 15:59:34 -07:00
Leonardo de Moura
ee0414b026
chore: update stage0
2022-04-29 15:51:47 -07:00
Leonardo de Moura
862492778a
test: add deq_correct test from Zulip
2022-04-29 15:50:40 -07:00
Leonardo de Moura
cddf9ddd95
fix: forallAltTelescope heterogeneous equality support
2022-04-29 15:37:20 -07:00
Leonardo de Moura
c19672e99e
fix: basic support for the new discriminant equality encoding at split
...
TODO: This is a temporary fix. We can do better.
2022-04-29 15:29:39 -07:00
Leonardo de Moura
c241ef61b1
fix: use HEq (if needed) for encoding h : discr equalities
2022-04-29 15:05:48 -07:00
Leonardo de Moura
351f0deae9
feat: add mkEqHEq
2022-04-29 14:31:36 -07:00
Leonardo de Moura
941ad84ece
fix: getMkMatcherInputInContext
2022-04-29 12:44:36 -07:00
Leonardo de Moura
95ea0b92ea
chore: fix test
2022-04-29 12:40:32 -07:00
Leonardo de Moura
d4d538cad8
fix: counterexample generation for new match encoding
2022-04-29 12:36:53 -07:00
Leonardo de Moura
ec932e389b
chore: fix test
2022-04-29 12:30:45 -07:00
Leonardo de Moura
d3bc963e92
chore: update stage0
2022-04-29 12:20:46 -07:00
Leonardo de Moura
6e1c51dd1a
feat: splitter proof for new match encoding
2022-04-29 12:19:24 -07:00
Leonardo de Moura
89441aac2a
feat: match equation theorem generation for new h : discr notation encoding
...
TODO: splitter theorem generation still needs to be fixed.
2022-04-29 11:48:25 -07:00
Leonardo de Moura
24417ed466
feat: size, get, get!, getD, and getOp for Subarray
2022-04-29 09:55:45 -07:00
Leonardo de Moura
eac83586c6
chore: remove leftover
2022-04-29 09:10:27 -07:00
Leonardo de Moura
c959c80310
chore: reset local context at correct place
2022-04-29 09:08:44 -07:00
Leonardo de Moura
10d43492ba
chore: fix test
2022-04-29 07:17:46 -07:00
Leonardo de Moura
8d9626dab7
feat: delaborate match h : d with ...
2022-04-29 07:17:46 -07:00
Leonardo de Moura
0f7754847d
chore: style
2022-04-29 07:17:46 -07:00
Leonardo de Moura
d793d2f0fd
feat: adapt elabMatchAltView to handle the new encoding for h : discr = pattern
2022-04-29 07:17:46 -07:00
Leonardo de Moura
7a369848a0
feat: new mkMatcher
...
TODO: adjust match elaborator
2022-04-29 07:17:46 -07:00
Leonardo de Moura
f4b4b14797
refactor: prepare to handle match h: notation at Meta\Match\Match.lean
2022-04-29 07:17:46 -07:00
Sebastian Ullrich
9b4feb3d13
perf: work around missed TCO
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
b450fb8243
chore: CI: use stable Nix
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
ff4a770c2d
feat: annotate match tactic alternatives with expected state
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
39a0de40dd
feat: annotate <;> with expected state
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
0a88f68d39
chore: finish with_annotate_state implementation
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
d886a1da72
chore: update stage0
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
db2a912112
feat: with_annotate_state helper tactic
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
a167828b79
fix: refine previous commit's heuristic
...
Show indented state if there is no outer state that is leading & not indented
relative to the cursor position
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
87b216a8e1
fix: do not show states from tactics indented further than the cursor
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
cc5e7ee731
test: part of #1119
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
b714a32d27
fix: revert "fix: show single final state after tactic combinator"
...
This reverts commit eb7bf2b272 .
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
78bf398830
fix: avoid signal-unsafe fprintf in stack overflow handler
2022-04-29 15:55:11 +02:00
Vincent de Haan
20e16f1c75
doc: add amssymb package to latex example to make it work in all cases
2022-04-28 11:21:12 +02:00
Leonardo de Moura
575b1187c5
feat: add Tactic.Context.recover for controlling error recovery
...
Moreover, when executing `tac_1 <|> tac_2`, we now disable error
recovery at `tac_1`.
closes #1126 #1127
2022-04-27 10:47:15 -07:00
Leonardo de Moura
ae913efa99
test: collect info view issues
2022-04-27 09:42:18 -07:00
Sebastian Ullrich
829c81d677
fix: skip antiquotations during parser recovery
2022-04-27 10:41:27 +02:00
Sebastian Ullrich
83f331b5e2
parseCommand: use do
2022-04-27 10:41:27 +02:00
Mario Carneiro
f37b700e6e
fix: use correct number of none patterns for antiquotation splice
2022-04-27 09:55:27 +02:00
Leonardo de Moura
02d0a89229
chore: simpStar does not make sense for dsimp
2022-04-26 11:26:54 -07:00
Sebastian Ullrich
3d2215c93c
doc: clean up syntax ToC
2022-04-26 18:58:45 +02:00
Leonardo de Moura
cae59c6916
chore: remove staging workarounds
2022-04-26 08:23:43 -07:00
Leonardo de Moura
25053594ff
chore: update stage0
2022-04-26 08:22:25 -07:00
Leonardo de Moura
6af1da450e
feat: disable only eta for classes during TC resolution
...
closes #1123
2022-04-26 08:20:39 -07:00
Sebastian Ullrich
814f614369
fix: simp attributes and macro scopes
2022-04-26 10:39:02 +02:00
Leonardo de Moura
3cf642688b
fix: do not generate equation theorems while processing dsimp arguments
2022-04-25 18:11:32 -07:00
Leonardo de Moura
6bc5433b17
fix: add support for heterogeneous equality at processGenDiseq
2022-04-25 16:56:03 -07:00
Leonardo de Moura
4a4473ff90
chore: update stage0
2022-04-25 16:35:47 -07:00
Leonardo de Moura
40c8db7494
feat: improve argument type mismatch error position, and do not stop at application type mismatch errors
2022-04-25 16:30:40 -07:00
Leonardo de Moura
0c8a6d8977
feat: exists es:term,+ tactic
...
cc: @fgdorais
2022-04-25 15:35:31 -07:00
Leonardo de Moura
29b340aa36
fix: consume Expr.mdata at congr tactic
...
fixes #1118
2022-04-25 06:33:32 -07:00
Leonardo de Moura
3ad8dcb7ff
fix: nasty interaction between TC resolution and Eta for structures
...
See
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/.60constructor.60.20and.20.60Applicative.60/near/279984801
2022-04-24 08:19:29 -07:00
Leonardo de Moura
47b379e1bc
feat: dsimp! tactic
2022-04-23 18:41:04 -07:00
Leonardo de Moura
342a26a023
feat: dsimp tactic
2022-04-23 18:05:18 -07:00
Leonardo de Moura
13bcbe91cd
fix: regression reported at issue #1113
...
see issue #1113
2022-04-23 15:39:04 -07:00
Leonardo de Moura
4ab57475a0
chore: simplify proofs
2022-04-23 12:47:10 -07:00
Leonardo de Moura
e25a116821
chore: RELEASES.md
2022-04-23 12:16:36 -07:00
Leonardo de Moura
ed12b62e28
fix: InfoTree was missing information for (pseudo) match patterns such as x + 1.
...
This kind of pattern has to be reduced to a constructor, and the
`PatternWithRef` information was being lost in the process.
2022-04-23 12:08:59 -07:00
Leonardo de Moura
305d8e641c
chore: style
2022-04-23 10:47:53 -07:00
Sebastian Ullrich
eb7bf2b272
fix: show single final state after tactic combinator
2022-04-23 17:42:32 +02:00
Sebastian Ullrich
240c5e15e9
fix: show final goal state at end of tactic combinator
2022-04-23 17:15:32 +02:00
Leonardo de Moura
34c75fc443
feat: allow ▸ even if the expected type is not available
...
see issue #1116
2022-04-23 08:00:27 -07:00
Leonardo de Moura
36fad4bba0
fix: do not assign metavariables in the major premise type when trying K
2022-04-23 07:31:51 -07:00
Leonardo de Moura
a82abee1b2
feat: sum of monomials normal form by reflection
2022-04-22 18:51:48 -07:00
Leonardo de Moura
875bf9bf34
fix: apply dsimp at lambda binders
...
This fixes another regression reported at #1113
2022-04-22 13:10:21 -07:00
Leonardo de Moura
c13ed7c0de
fix: regression reported at #1113
...
See #1113
2022-04-22 11:43:58 -07:00
Leonardo de Moura
864c4c5030
chore: update stage0
2022-04-22 09:53:47 -07:00
Leonardo de Moura
2a2aeec085
feat: LSP semantic token for where and let rec declarations
2022-04-22 09:52:20 -07:00
Sebastian Ullrich
ca3f1a84b0
doc: fix example style
2022-04-22 16:26:16 +02:00
Leonardo de Moura
a5bf0d5ea5
chore: invert setup chapters by making the quickstart the default and the other one "extended setup notes"
2022-04-21 18:09:54 -07:00
Leonardo de Moura
66c82dadc9
fix: the default value for structure fields may now depend on the structure parameters
2022-04-21 17:38:19 -07:00
Leonardo de Moura
09dfd97593
chore: remove temporary workaround
2022-04-21 16:29:08 -07:00
Leonardo de Moura
46dbddabd5
chore: update stage0
2022-04-21 16:27:00 -07:00
Leonardo de Moura
d1f10a2e71
feat: apply rfl theorems at dsimp
...
closes #1113
2022-04-21 16:26:57 -07:00
Leonardo de Moura
2a0dc1804b
feat: improve isRflProof and isRflTheorem
...
The `Eq.symm` of a `rfl` theorem is a `rfl` theorem, the application
of `rfl` theorem too.
2022-04-21 15:40:38 -07:00
Leonardo de Moura
57c3114875
fix: simpAll and tests
...
We need another `update stage0` to remove workaround at `AC.lean`
2022-04-21 15:00:07 -07:00
Leonardo de Moura
da33347e9d
fix: use defauld reducibility setting at mkImpDepCongrCtx and mkImpCongrCtx
2022-04-21 14:55:29 -07:00
Leonardo de Moura
abc75053b6
chore: update stage0
2022-04-21 13:43:36 -07:00
Leonardo de Moura
f891c5724d
feat: track rfl simp theorems
...
See issue #1113
We need update stage0 before closing the issue.
2022-04-21 13:42:04 -07:00
Leonardo de Moura
0b92195ec8
feat: refine auto bound implicit feature
2022-04-21 10:17:15 -07:00
Leonardo de Moura
d81c124479
chore: update stage0
2022-04-21 08:37:31 -07:00
Leonardo de Moura
4727fd6883
feat: do not hightlight auxiliary declarations used to compile recursive definitions as variables
...
They are "morally" constants.
2022-04-21 08:11:22 -07:00
Leonardo de Moura
d8ad343885
test: add Expr.eq_of_toPoly_eq
2022-04-20 23:04:29 -07:00
Leonardo de Moura
6bdeb6c9cb
test: add support for sub as som.lean
2022-04-20 22:59:55 -07:00
Leonardo de Moura
6e09dfae1e
test: simplify sum of monomials
2022-04-20 22:31:52 -07:00
Leonardo de Moura
14bfe57ba8
test: sum of monomials by reflection
2022-04-20 19:19:50 -07:00
Leonardo de Moura
2a36ae4627
feat: add List.le_antisymm
2022-04-20 16:31:25 -07:00
Leonardo de Moura
9852fe3db8
feat: add simp theorems
2022-04-20 16:14:01 -07:00
Leonardo de Moura
bb3fc358c9
feat: add LawfulBEq Int instance
2022-04-20 14:52:41 -07:00
Leonardo de Moura
73076b855c
fix: bug at processGenDiseq
2022-04-20 10:46:05 -07:00
Leonardo de Moura
4a18679c92
chore: include problematic match auxiliary declaration name in the error message
2022-04-20 10:46:05 -07:00
Sebastian Ullrich
e1fbfb677e
doc: missing file
2022-04-20 19:13:53 +02:00
Sebastian Ullrich
84cc167f95
doc: fix example code & style
2022-04-20 19:05:43 +02:00
Sebastian Ullrich
c354a9f62f
doc: link orphan syntax tutorial
2022-04-20 18:49:38 +02:00
Sebastian Ullrich
5f6bbe59ef
doc: fold sub-chapters by default
2022-04-20 18:46:30 +02:00
Sebastian Ullrich
b6446902c2
feat: server.stderrAsMessages option
...
/cc @leodemoura
2022-04-19 22:29:26 +02:00
Leonardo de Moura
597313135a
fix: index out of bounds at computeFixedIndexBitMask
...
closes #1112
2022-04-19 05:21:43 -07:00
Leonardo de Moura
d0ccb73fc9
chore: update stage0
2022-04-19 05:11:19 -07:00
Leonardo de Moura
556ace5cc1
chore: update RELEASES.md
2022-04-18 17:03:01 -07:00
Leonardo de Moura
4848ad4869
feat: implement autoUnfold at simp
...
Right now, it only supports the following kind of definitions
- Recursive definitions that support smart unfolding.
- Non-recursive definitions where the body is a match-expression. This
kind of definition is only unfolded if the match can be reduced.
2022-04-18 16:51:52 -07:00
Leonardo de Moura
f87066a0a5
chore: update stage0
2022-04-18 16:01:22 -07:00
Leonardo de Moura
18832ad91c
feat: add autoUnfold to Simp.Config
...
Add macros for conveniently setting `arith` and `autoUnfold`.
2022-04-18 15:59:30 -07:00
Leonardo de Moura
470d0077ca
chore: update stage0
2022-04-18 14:57:02 -07:00
Leonardo de Moura
bb2df569bc
fix: bug at declare_config_elab
2022-04-18 14:56:22 -07:00
Leonardo de Moura
e69e469a37
chore: update test
2022-04-18 11:56:46 -07:00
Leonardo de Moura
e6aee1e463
feat: make sure cases and induction alternatives are processed using the order provided by the user
...
Motivation: improve the effectiveness of the `save` and `checkpoint` tactics.
2022-04-18 11:45:36 -07:00
Leonardo de Moura
822375aaff
chore: ensure _ alternative is the last one in the cases and induction tactics
2022-04-18 11:18:03 -07:00
Leonardo de Moura
5599cefe2e
feat: add sleep tactic for debugging purposes
2022-04-18 09:53:45 -07:00
Leonardo de Moura
d9f007e4dd
fix: tactic cache corruption
2022-04-17 15:52:21 -07:00
Leonardo de Moura
607a590238
test: pge example
2022-04-17 15:17:28 -07:00
Leonardo de Moura
40129203b2
chore: update RELEASES.md
2022-04-17 13:55:46 -07:00
Leonardo de Moura
d4183cf646
feat: add option tactic.dbg_cache
2022-04-17 13:47:28 -07:00
Leonardo de Moura
4a303ec214
feat: include tactic position in the cache key
2022-04-17 13:47:12 -07:00
Leonardo de Moura
deab1ebc56
feat: add save tactic
...
It is a more convenient way of creating checkpoints.
2022-04-17 08:46:08 -07:00
Leonardo de Moura
fa16a96692
chore: avoid nested noImplicitLambda annotations
2022-04-17 08:09:10 -07:00
Leonardo de Moura
726b735c6d
fix: using invalid name generator at ContextInfo.runMetaM
...
Already used `MVarId`s were being "reused" potentially creating cyclic
metavar assignment. See issue #1031 for an example.
closes #1031
2022-04-15 18:42:34 -07:00
Leonardo de Moura
7fc139fdb0
chore: add doc-string for tactics
2022-04-15 14:19:03 -07:00
Leonardo de Moura
d4f514b964
chore: update stage0
2022-04-15 13:49:51 -07:00
Leonardo de Moura
7995cb071f
chore: add assertions to make sure TagDeclarationExtension and MapDeclarationExtension are not being misused
...
see #1111
2022-04-15 13:49:35 -07:00
Sebastian Ullrich
7797fa3e2d
fix: fun (x ...) ... should not be treated as a pattern
2022-04-15 10:00:26 -07:00
Leonardo de Moura
bc7f4fd02b
test: hasCSimpAttribute
2022-04-15 09:55:10 -07:00
Leonardo de Moura
33a7f75599
chore: update stage0
2022-04-15 09:46:23 -07:00
Leonardo de Moura
a57403be6e
feat: add hasCSimpAttribute
2022-04-15 09:44:50 -07:00
Ed Ayers
d8e2d58da7
doc: InfoTree code review
...
Co-authored-by: Wojciech Nawrocki <wjnawrocki+gh@protonmail.com >
2022-04-15 09:07:35 -07:00
E.W.Ayers
7d128c17dc
doc: #1107 review
2022-04-15 09:04:28 -07:00
E.W.Ayers
9598e39c82
doc: InfoTree docstrings
2022-04-15 09:04:26 -07:00
Sebastian Ullrich
458da0e27b
chore: update LeanInk
2022-04-15 08:53:34 -07:00
E.W.Ayers
06e8cf5200
fix: allow non-leaf custom info
...
At the moment InfoTree has a constructor ofJson but this means that
you can't have a non-leaf ofJson. It would be better to have `ofJson` be a constructor of `Info`.
This is what this PR does.
2022-04-15 08:53:34 -07:00
Leonardo de Moura
4aee759ded
fix: make sure rfl is an extensible tactic
...
closes #1109
2022-04-15 08:51:05 -07:00
Sebastian Ullrich
f98b6a3bb1
fix: fall-out from syntax kind lookup change
2022-04-15 08:50:46 -07:00
Sebastian Ullrich
a2baf2cb96
refactor: split term/command quotations
2022-04-15 08:50:46 -07:00
Sebastian Ullrich
ca8fdcaa0c
chore: update stage0
2022-04-15 08:50:46 -07:00
Sebastian Ullrich
e1fbc04c3b
chore: accept unregistered syntax kinds in stage 1
2022-04-15 08:50:46 -07:00
E.W.Ayers
712967c6f6
refactor: registerRpcProcedure
2022-04-13 13:23:04 -07:00
Wojciech Nawrocki
d649fc9159
fix: RPC error message
2022-04-13 13:23:04 -07:00
Wojciech Nawrocki
367b0fc80f
doc: note persistent exts are sometimes needed
2022-04-13 13:23:04 -07:00
E.W.Ayers
30dfabb2c7
fix: userRpcProcedures uses a persistent env ext
2022-04-13 13:23:04 -07:00
Leonardo de Moura
081dff288f
fix: debug build
2022-04-13 13:12:53 -07:00
Leonardo de Moura
f875c2d107
chore: update release notes
2022-04-13 10:33:25 -07:00
Leonardo de Moura
bcb9c2c2a3
chore: fix test
2022-04-13 10:27:59 -07:00
Leonardo de Moura
f2c3685e83
chore: update stage0
2022-04-13 10:20:41 -07:00
Leonardo de Moura
8d2d0b3fbe
chore: remove {} from structure command
2022-04-13 10:19:00 -07:00
Leonardo de Moura
efb859013e
chore: ignore {} annotations at mk_projections
2022-04-13 10:16:41 -07:00
Leonardo de Moura
e00550c57e
chore: remove {} occurrences
2022-04-13 10:14:51 -07:00
Leonardo de Moura
3d9439f3c9
chore: missing annotation
2022-04-13 09:03:58 -07:00
Leonardo de Moura
9126d33dda
doc: update release notes
2022-04-13 09:01:55 -07:00
Leonardo de Moura
b267a4b288
chore: update stage0
2022-04-13 08:49:15 -07:00
Leonardo de Moura
bd35e8a2be
chore: remove {} from ctor parser
2022-04-13 08:47:21 -07:00
Leonardo de Moura
3e0a975e9c
chore: fix test
2022-04-13 08:37:34 -07:00
Leonardo de Moura
1f4039a25d
chore: remove {} from Eq.refl and HEq.refl
2022-04-13 08:35:02 -07:00
Leonardo de Moura
18868cbaba
chore: update stage0
2022-04-13 08:33:14 -07:00
Leonardo de Moura
f098b1c291
test: for regression from last year's course at KIT
2022-04-13 08:31:43 -07:00
Leonardo de Moura
dbf5366704
feat: ignore {} annotation at constructors
2022-04-13 08:30:21 -07:00
Leonardo de Moura
2ec8385767
fix: isDomainDefEq
2022-04-13 07:54:47 -07:00
Leonardo de Moura
600769811e
fix: bug at fixedIndicesToParams
2022-04-13 07:33:32 -07:00
Leonardo de Moura
3bdb385c19
fix: make sure "eta for structures" in the elaborator uses projection functions if available
2022-04-11 19:23:10 -07:00
Leonardo de Moura
1add9b814b
chore: style
2022-04-11 18:48:09 -07:00
Leonardo de Moura
3de607193f
fix: withoutModifyingStateWithInfoAndMessagesImpl
...
Make sure it does not produced a corrupted `InfoTree`.
2022-04-11 16:57:55 -07:00
Leonardo de Moura
9f8dd99ccd
fix: macro declare_config_elab was corrupting the info tree
2022-04-11 16:49:56 -07:00
Leonardo de Moura
e49179c807
fix: simp at local declaration should not create an auxiliary declaration when result is definitionally equal
2022-04-11 07:54:15 -07:00
Leonardo de Moura
fb64a4ccc0
fix: unfold should not create an auxiliary declaration when result is definitionally equal
...
This commit fixes an issue reported on Zulip
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Unfolding.20the.20type.20of.20a.20variable.20creates.20a.20new.20variable
2022-04-11 07:54:15 -07:00
larsk21
7cf4642d1b
fix: apply workspace symbol limit after sorting by score
2022-04-11 16:08:55 +02:00
larsk21
235b6d8f69
fix: remove unnecessary fuzzy scoring rule
2022-04-11 16:08:55 +02:00
Jannis Limperg
5ff8f64255
feat: add IO.monoNanosNow
2022-04-11 12:16:20 +02:00
Jannis Limperg
6459ccc43c
fix: prevent overflow in lean_io_mono_ms_now
2022-04-11 12:16:20 +02:00
Leonardo de Moura
c2c2783f32
feat: improve dot name resolution by lazily unfolding resulting type
...
See new test to understand issue being fixed by this commit.
2022-04-10 14:37:27 -07:00
Leonardo de Moura
ed85a68550
chore: missing backtick
2022-04-10 11:11:51 -07:00
Leonardo de Moura
e4304ea1de
fix: always save completion info at resolveName
...
See new test.
2022-04-10 08:00:03 -07:00
Leonardo de Moura
348037abbf
chore: move states35 to bench directory
...
@Kha It breaks in the CI in debug mode (stack overflow).
I think we have a mechanism for skipping some tests in debug mode, but
I forgot how it works.
2022-04-09 15:46:28 -07:00
Leonardo de Moura
8b53cc8dbb
chore: update RELEASES.md
2022-04-09 15:39:40 -07:00
Leonardo de Moura
4d077214f9
feat: jump to definition for match pattern variables
2022-04-09 15:36:42 -07:00
Leonardo de Moura
1db11ed5c7
test: native_decide with 35 states
2022-04-09 14:48:53 -07:00
Leonardo de Moura
86bd70ac62
test: native_decide
2022-04-09 14:41:22 -07:00
Marcus Rossel
a8db183d5c
chore: typos
2022-04-09 13:02:01 -07:00
Leonardo de Moura
027fec76da
chore: update stage0
2022-04-09 12:25:43 -07:00
Leonardo de Moura
4374ec4ad8
perf: use Kernel isDefEq for ground terms
...
`state8.lean` now takes 0.29s. It was 0.37s.
2022-04-09 12:24:20 -07:00
Leonardo de Moura
e3dcce5320
chore: remove temporary workarounds
2022-04-09 12:13:37 -07:00
Leonardo de Moura
948c3c0ec4
chore: update stage0
2022-04-09 12:12:17 -07:00
Leonardo de Moura
4dd2b26e06
fix: rfl error message and corner case
...
The new `rfl` slightly improves the performance for `rfl` proofs of
ground terms.
Example: `state8.lean` now takes 0.37s. It was 0.52s.
2022-04-09 12:08:04 -07:00
Leonardo de Moura
628e33bf8a
feat: activate new rfl tactic implementation
2022-04-09 12:01:56 -07:00
Leonardo de Moura
47e7e03f79
chore: update stage0
2022-04-09 11:58:12 -07:00
Leonardo de Moura
03f6b87647
feat: add hand-written rfl tactic
...
It requires update stage0
2022-04-09 11:57:27 -07:00
Leonardo de Moura
298281baaf
perf: skip logUnassignedUsingErrorInfos if pendingMVarIds is empty
...
`state8.lean` now takes 0.52s. It was 0.76s.
2022-04-09 10:45:52 -07:00
Leonardo de Moura
7d99f6f555
perf: isClassQuick? was incorrectly producing undef
...
Then `isClassExpensive?` was being invoked too often. In some
benchmarks the performance hit was substantial. For example,
in the new test `state8.lean`. The runtime on my machine went from 2s
to 0.76s.
2022-04-09 10:38:49 -07:00
Leonardo de Moura
6e02514eee
chore: style
2022-04-09 10:27:31 -07:00
Leonardo de Moura
417421dbae
fix: auto completion when autoBoundImplicit is active
2022-04-09 09:11:45 -07:00
Leonardo de Moura
87e6581e6b
fix: constructor elaboration
...
fixes #1098
2022-04-08 18:19:06 -07:00
Leonardo de Moura
1c236a0d43
chore: update stage0
2022-04-08 15:05:38 -07:00
Leonardo de Moura
3cf425ba52
fix: pattern hover information
...
We annotate patterns with the corresponding `Syntax` during
elaboration, and do not populate the info tree. Reason: the set of
pattern variables is not known during pattern elaboration.
2022-04-08 15:03:42 -07:00
Leonardo de Moura
4793c7e734
feat: add isAppOfArity variant that skips Expr.mdata
2022-04-08 15:01:57 -07:00
Leonardo de Moura
152eff5cea
chore: missing double ticks
2022-04-08 15:01:57 -07:00
Leonardo de Moura
ea682830d1
refactor: change addTermInfo type
2022-04-08 15:01:57 -07:00
Sebastian Ullrich
74435013f4
chore: remove now-broken workarounds
2022-04-08 15:53:58 +02:00
Sebastian Ullrich
51d6a75a0f
chore: update stage0
2022-04-08 15:53:58 +02:00
Sebastian Ullrich
4aed79a13e
feat: less strict, hopefully more helpful syntax ident matching semantics
2022-04-08 15:53:58 +02:00
Leonardo de Moura
5d8b4f33c0
feat: improve binder names introduced by the match discriminant refinement feature
2022-04-08 06:49:09 -07:00
Leonardo de Moura
099fba43d3
chore: remove trace[Meta.debug] leftovers
2022-04-08 06:49:09 -07:00
E.W.Ayers
917fa74366
doc: docstrings for decls and attributes
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2022-04-08 04:19:38 -07:00
Leonardo de Moura
cec0f81926
chore: add instantiateMVars
2022-04-07 18:46:45 -07:00
Leonardo de Moura
37b321229f
feat: make sure hover information does not include @ for constants
2022-04-07 18:40:04 -07:00
Leonardo de Moura
55989c25fc
chore: remove unnecessary args
2022-04-07 18:19:15 -07:00
Leonardo de Moura
de2e2447d2
chore: style
2022-04-07 17:35:05 -07:00
Leonardo de Moura
dcb88d969a
feat: improve auto implicit binder names in definitions/theorems
2022-04-07 14:46:59 -07:00
Leonardo de Moura
cd0d7e676f
chore: rename renameMVar => setMVarUserName
2022-04-07 13:50:58 -07:00
Leonardo de Moura
00c4524e80
chore: register Elab.induction trace class
2022-04-07 13:22:40 -07:00
Leonardo de Moura
c26e968c24
chore: style
2022-04-07 11:25:45 -07:00
Leonardo de Moura
fa9b0f6c7e
feat: remove space before propositions with inaccessible names
2022-04-07 07:54:50 -07:00
Leonardo de Moura
9de6961906
chore: to doc string
2022-04-07 07:29:23 -07:00
Leonardo de Moura
27cd678717
doc: improve contradiction doc string
2022-04-06 19:27:23 -07:00
Leonardo de Moura
e5b8d94a65
chore: remove unnecessary annotation
2022-04-06 16:38:16 -07:00
Leonardo de Moura
5b15a97d72
chore: break long lines
2022-04-06 16:37:38 -07:00
Leonardo de Moura
39093188bf
chore: use cdot
2022-04-06 16:32:20 -07:00
Leonardo de Moura
911ed750ff
doc: document ▸
2022-04-06 16:30:02 -07:00
Leonardo de Moura
005f964749
feat: save info at renameInaccessibles
...
We now have info variables introduced by the `next` and `case` tactics
2022-04-06 16:16:20 -07:00
Leonardo de Moura
317492d207
test: add test for Lean 3 refine bug reported on Zulip
...
https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/.60refine.60.20bug.20.3F/near/278031110
2022-04-06 16:04:17 -07:00
Leonardo de Moura
847f5b21a6
feat: save info for cases and induction alt vars
2022-04-06 15:53:58 -07:00
Leonardo de Moura
cd82a24ca9
chore: avoid "denote" overloading
...
It the overload does not affect elaboration, but pollutes the info view.
2022-04-06 15:00:13 -07:00
Leonardo de Moura
36e032cf94
chore: fix test
2022-04-06 14:55:27 -07:00
Leonardo de Moura
0bfcf434ac
fix: jump to definition inside of a mutually inductive declaration
2022-04-06 14:43:30 -07:00
Leonardo de Moura
1107705525
fix: jump to definition inside recursive definitions was not working on VS Code
...
Remark: it was working on Emacs.
2022-04-06 14:27:49 -07:00
Leonardo de Moura
574927ab0d
fix: jump to definition for recursive declarations
2022-04-06 13:01:16 -07:00
Leonardo de Moura
d380808930
fix: generalize if target is a let-declaration
2022-04-06 11:08:41 -07:00
Sebastian Ullrich
6841f37662
chore: update stage0
2022-04-06 19:43:07 +02:00
Sebastian Ullrich
24697026e8
feat: always accept antiquotations, simplify quotDepth code
2022-04-06 19:43:07 +02:00
Sebastian Ullrich
8f2f6bc17d
doc: adjust alectryon.css a little
2022-04-06 09:06:49 -07:00
Sebastian Ullrich
020fb82888
doc: clean up examples markup
2022-04-06 09:06:49 -07:00
Sebastian Ullrich
2aaac3f94b
doc: embed examples into doc book
2022-04-06 09:06:49 -07:00
Sebastian Ullrich
e10e664cc1
chore: typos
2022-04-06 10:21:53 +02:00
Sebastian Ullrich
3cf2afa42e
refactor: clean up parsers using withAnonymousAntiquot := false
2022-04-06 10:21:53 +02:00
Sebastian Ullrich
dfd469743c
chore: update stage0
2022-04-06 10:21:53 +02:00
Sebastian Ullrich
ffee6676ef
feat: allow adjusting anonymous antiquot generation at leading_parser
2022-04-06 10:21:53 +02:00
Sebastian Ullrich
99464c352e
chore: remove restriction on leading/trailing_parser macros
...
I don't think we quote any parsers right now
2022-04-06 10:21:53 +02:00
Sebastian Ullrich
7460878e05
chore: define WIN32_LEAN_AND_MEAN
2022-04-06 09:38:19 +02:00
Leonardo de Moura
149cd1ee82
chore: fix test
2022-04-05 21:04:55 -07:00
Leonardo de Moura
058aea8922
fix: withSaveInfoContext at Inductive.lean
...
It was in the context of `withInductiveLocalDecls`. This introduced
unnecessary `_root_` in the info view and hover information.
For example, when hovering over
```lean
inductive Ty where
| int
| bool
| fn (a r : Ty)
```
We would get `Ty.int : _root_.Ty` when hovering over the `int`.
2022-04-05 20:58:06 -07:00
Leonardo de Moura
f5583d7771
chore: update stage0
2022-04-05 20:52:30 -07:00
Leonardo de Moura
7c5575631a
feat: remove _tmp_ind_univ_param elaboration hack
...
The new approach produces better type information in the "info view" when
hovering over inductive declarations.
2022-04-05 20:51:15 -07:00
Leonardo de Moura
27e07d1b25
fix: remove auxiliary discriminants before elaborating patterns
2022-04-05 19:37:56 -07:00
Leonardo de Moura
d65691626c
chore: update stage0
2022-04-05 17:38:43 -07:00
Leonardo de Moura
eae4b92b0d
feat: use sorry if failed to synthesize default element for unsafe constant
2022-04-05 16:52:54 -07:00
Sebastian Ullrich
d2c626e158
doc: refine development manual
2022-04-05 16:03:24 +02:00
Leonardo de Moura
18707692a8
doc: add doc strings to some tactics
2022-04-05 06:27:09 -07:00
Leonardo de Moura
16523647b8
doc: add doc strings to some tactics
2022-04-05 06:27:09 -07:00
Sebastian Ullrich
adcdd16d7a
doc: include missing chapter
2022-04-04 17:56:19 +02:00
Leonardo de Moura
6aee3fb304
chore: fix broken links
2022-04-03 10:32:00 -07:00
Leonardo de Moura
5470100830
feat: better binder names at reorderCtorArgs
2022-04-03 10:03:47 -07:00
Leonardo de Moura
a8ee6029c2
chore: remove workaround from example
2022-04-03 09:25:47 -07:00
Leonardo de Moura
61ae72330f
feat: improve universe level contraint checks in inductive datatype constructors
2022-04-03 09:19:22 -07:00
Leonardo de Moura
3ee8ceafb4
feat: better error message when constructor parameter universe level is too big
2022-04-03 08:37:38 -07:00
Leonardo de Moura
ef8fecff79
feat: add Level.geq
2022-04-03 08:18:14 -07:00
Leonardo de Moura
310961cc35
chore: add scaffolding for checking ctor universe params
2022-04-03 07:33:02 -07:00
Leonardo de Moura
743f6dd3a2
chore: cleanup
2022-04-03 06:56:27 -07:00
Leonardo de Moura
ca9b494e4d
chore: use specialize tactic
2022-04-02 19:35:36 -07:00
Leonardo de Moura
d7abecd07d
test: addDecorations without partial
2022-04-02 19:08:21 -07:00
Leonardo de Moura
c873ad6ef3
test: recursive function on Syntax without partial
2022-04-02 18:43:45 -07:00
Leonardo de Moura
9d55d7bf9e
feat: add helper tactic for applying List.sizeOf_lt_of_mem in termination proofs
2022-04-02 18:38:55 -07:00
Leonardo de Moura
64cfbc1ae3
feat: add helper tactic for applying sizeOf (a.get i) < sizeOf a automatically in termination proofs
2022-04-02 18:29:41 -07:00
Leonardo de Moura
562af50191
feat: add ForIn' instance for Range
2022-04-02 18:22:21 -07:00
Leonardo de Moura
2c7c7471db
feat: add case' tactic for writing macros
...
It is similar to `case` but does not admit goal in case of failure.
This is useful for writing macros.
2022-04-02 17:54:06 -07:00
Leonardo de Moura
443dd79a02
feat: sizeOf theorems for Lean.Name
2022-04-02 17:09:55 -07:00
Leonardo de Moura
03ec8cb30b
feat: missing sizeOf theorems for Array.get and List.get
2022-04-02 16:04:46 -07:00
Leonardo de Moura
9f29d7ecb7
feat: add stop tactic macro
2022-04-02 15:39:03 -07:00
Leonardo de Moura
3d4e6282b7
chore: fix link to examples
2022-04-02 15:29:12 -07:00
Leonardo de Moura
78007be772
test: for Lean 3 hover issue reported on Zulip
2022-04-02 15:21:24 -07:00
Leonardo de Moura
4fa5f50559
feat: implement TODO at "fixed indices to parameters"
...
The missing feature (TODO in the code) is needed for the `BinTree` example.
2022-04-02 14:37:24 -07:00
Leonardo de Moura
9fe5458077
feat: do not display inaccessible proposition names if they do not have forward dependencies
...
Even if `pp.inaccessibleNames = true`
2022-04-02 13:15:17 -07:00
Leonardo de Moura
95bd55bc21
chore: fix typo and remove unnecessary discriminant
2022-04-02 13:15:17 -07:00
Sebastian Ullrich
4fcc7c78dd
chore: update LeanInk
2022-04-02 18:13:42 +02:00
Leonardo de Moura
d65ceafc99
chore: break long lines
2022-04-02 07:54:40 -07:00
Leonardo de Moura
9ee3cb642a
chore: formatting
2022-04-02 07:53:20 -07:00
Leonardo de Moura
e4fb9c8f47
chore: break long lines
2022-04-02 07:50:27 -07:00
Leonardo de Moura
375692cb92
doc: explain attribute [local simp]
2022-04-02 07:46:32 -07:00
Leonardo de Moura
16649beb19
doc: explain details
2022-04-02 07:39:07 -07:00
Leonardo de Moura
dee5dbca98
chore: cleanup example
2022-04-02 07:13:46 -07:00
Leonardo de Moura
7f00352d33
chore: backtick issue in documentation
2022-04-02 06:55:23 -07:00
Leonardo de Moura
e058fe65a9
feat: make the hypothesis name optional in the by_cases tactic
2022-04-01 19:36:13 -07:00
Leonardo de Moura
ed935ed7a7
doc: binary search trees
2022-04-01 19:30:28 -07:00
Leonardo de Moura
8636594dac
chore: add [simp] to Nat.lt_irrefl
2022-04-01 18:50:32 -07:00
Leonardo de Moura
be014b1fc9
fix: dotted notation corner case
2022-04-01 18:20:44 -07:00
Leonardo de Moura
cfb4e306f7
refactor: replace length_dropLast theorem
2022-04-01 16:44:24 -07:00
Leonardo de Moura
2ec40e91da
chore: update stage0
2022-04-01 15:48:09 -07:00
Leonardo de Moura
a926cd1698
fix: mkUnfoldProof
...
The hypotheses in an equation theorem may depend on each other
2022-04-01 15:47:24 -07:00
Leonardo de Moura
4a0f68de83
fix: split tactic issue
2022-04-01 15:47:24 -07:00
Leonardo de Moura
ea8f31144e
feat: add predicate to generalize tactic to select subterms to be generalized
2022-04-01 15:47:24 -07:00
Sebastian Ullrich
524dc5d47c
chore: Nix: update Nixpkgs
2022-04-02 00:08:24 +02:00
Leonardo de Moura
d473cc5a4c
chore: update release notes for issue #1090
...
closes #1090
2022-04-01 11:38:50 -07:00
Leonardo de Moura
0241d7c197
chore: fix tests
2022-04-01 11:34:50 -07:00
Leonardo de Moura
f45712ce74
chore: update stage0
2022-04-01 11:29:09 -07:00
Leonardo de Moura
fdd1cb5751
chore: remove workarounds for #1090
2022-04-01 11:28:17 -07:00
Leonardo de Moura
48a3668780
chore: fix repo
2022-04-01 11:24:30 -07:00
Leonardo de Moura
16b2237d2d
chore: update stage0
2022-04-01 11:24:22 -07:00
Leonardo de Moura
799c701f56
fix: inconsistency between syntax and kind names
...
TODO: remove staging workarounds
see #1090
2022-04-01 11:20:16 -07:00
Leonardo de Moura
b6cc3c959b
chore: update stage0
2022-04-01 11:14:47 -07:00
Leonardo de Moura
68acfc7fb9
chore: prepare for #1090
2022-04-01 11:11:28 -07:00
Leonardo de Moura
8dddb0ddc7
chore: update stage0
2022-04-01 09:37:52 -07:00
Leonardo de Moura
09de67780f
chore: prepare for #1090
2022-04-01 09:35:06 -07:00
Leonardo de Moura
414f5596a6
test: Nat.binrec example
2022-04-01 08:29:44 -07:00
Leonardo de Moura
d1022e5587
chore: add Nat.div_add_mod
2022-04-01 08:20:00 -07:00
Leonardo de Moura
92382ea47b
fix: checkpoint
2022-04-01 05:53:18 -07:00
E.W.Ayers
9fdb7429d4
doc: edits to MonadControl
2022-04-01 10:06:58 +02:00
E.W.Ayers
4c2fedae50
doc: fix @Kha's issues with MonadControl
2022-04-01 10:06:58 +02:00
Leonardo de Moura
4c9c62752e
feat: improve checkpoint tactic
2022-03-31 20:51:53 -07:00
Leonardo de Moura
23f41fddb3
feat: basic tactic cache
...
TODO: move `IO.Ref` to command
2022-03-31 19:53:03 -07:00
Leonardo de Moura
059459b097
fix: occurs check at refine tactic
2022-03-31 18:08:05 -07:00
Leonardo de Moura
87db7a9115
chore: style
2022-03-31 17:33:56 -07:00
Leonardo de Moura
096e4eb6d0
fix: equation generation for nested recursive definitions
...
The issue was raised on Zulip. The issue is triggered in
declarations containing overlapping patterns and nested recursive
definitions occurring as the discriminant of `match`-expressions.
Recall that Lean 4 generates conditional equations for declarations
containing overlapping patterns.
To address the issue we had to "fold" `WellFounded.fix` applications
back as recursive applications of the functions being defined.
The new test exposes the issue.
2022-03-31 17:04:06 -07:00
Leonardo de Moura
6652d2665d
chore: remove old comment
2022-03-31 15:59:31 -07:00
Leonardo de Moura
0ce967ad90
chore: update stage0
2022-03-31 14:53:37 -07:00
Leonardo de Moura
d21e62ecb7
refactor: custom simpMatch for WF module
...
It is just the skeleton right now.
2022-03-31 14:51:07 -07:00
Leonardo de Moura
1ab57d4fd4
feat: store fixedPrefixSize at WF.EqnInfo
2022-03-31 14:47:52 -07:00
Leonardo de Moura
734902bd3c
test: add split list example from Zulip without sorrys
2022-03-31 13:03:58 -07:00
Leonardo de Moura
23f3de5061
chore: proper trace message class
2022-03-31 11:04:42 -07:00
Leonardo de Moura
2bd04285f8
fix : #1087
...
This commit is using the easy fix described at issue #1087 .
Hopefully the performance overhead is small.
closes #1087
2022-03-30 18:48:02 -07:00
Leonardo de Moura
63b9060ce9
chore: fix comments
2022-03-30 16:23:06 -07:00
Leonardo de Moura
3dd0c84c4d
chore: enforce naming convetion for tactics
2022-03-30 16:19:05 -07:00
Leonardo de Moura
df063a47fa
chore: fix link
2022-03-30 13:44:22 -07:00
Leonardo de Moura
a509b0c615
test: Sign
2022-03-30 13:33:29 -07:00
Leonardo de Moura
1a8840330f
test: add test for example that does not work in Lean3
...
cc @eric-wieser
2022-03-30 12:59:55 -07:00
Leonardo de Moura
e53e088be8
test: make it clear the proofs hold by reflexivity
2022-03-30 12:40:30 -07:00
Leonardo de Moura
6056a4cbfa
test: stars_and_bars
2022-03-30 12:38:05 -07:00
Leonardo de Moura
b6ce9fa4b1
doc: add palindromes.lean
2022-03-30 11:22:58 -07:00
Leonardo de Moura
df3a8eb126
feat: add helper List.append simp theorems
2022-03-30 11:11:03 -07:00
Leonardo de Moura
c9926b3a8b
chore: update stage0
2022-03-29 18:53:47 -07:00
Leonardo de Moura
46ce3013d0
feat: cleanup local context before elaborating match alternatives RHS
2022-03-29 18:52:07 -07:00
Leonardo de Moura
815364768d
chore: update stage0
2022-03-29 15:57:45 -07:00
E.W.Ayers
00151f39a1
doc: explain MonadControl
2022-03-29 15:55:08 -07:00
Leonardo de Moura
d1e4712038
fix: smart unfolding
...
See new comment to understand the issue.
closes #1081
2022-03-29 15:49:14 -07:00
Leonardo de Moura
a8bb7fab93
fix: typo at findRecArg
...
The code was not traversing the indices if the datatype has parameters
2022-03-29 12:12:43 -07:00
Leonardo de Moura
86432f1833
feat: improve let-pattern and have-pattern macro expansion
2022-03-29 07:33:22 -07:00
Sebastian Ullrich
6dfddbe2e7
feat: quotation precheck for choice nodes
2022-03-29 10:50:11 +02:00
Leonardo de Moura
c7321e0061
chore: remove revert hack from example
2022-03-28 17:18:36 -07:00
Leonardo de Moura
a06cd40e29
feat: improve match expression support at simp
2022-03-28 17:17:01 -07:00
Leonardo de Moura
5ca9b49235
chore: cleanup proof
2022-03-28 14:58:02 -07:00
Leonardo de Moura
2a37f53fca
chore: fix core library
2022-03-28 14:32:04 -07:00
Leonardo de Moura
21f7c297e6
chore: update stage0
2022-03-28 14:30:35 -07:00
Leonardo de Moura
3c964f3b9f
feat: substitute auxiliary equations introduced by the split tactic
2022-03-28 14:29:28 -07:00
Leonardo de Moura
314bd3ae4c
fix: simpH? at match expression equation theorem generator
...
closes #1080
2022-03-28 12:48:54 -07:00
Leonardo de Moura
2dea5471da
feat: add support for HEq to the subst tactic
2022-03-28 12:23:55 -07:00
Leonardo de Moura
334f4f6c85
test: for issue #1079
...
The error reported on issue #1079 does not happen in the master branch.
closes #1079
2022-03-28 07:19:55 -07:00
Leonardo de Moura
4e008cf8b7
chore: move to tests
2022-03-27 14:57:33 -07:00
Leonardo de Moura
4801b37cfb
fix: exfalso
2022-03-27 14:56:24 -07:00
Leonardo de Moura
a2c9b6a8be
chore: rename Substate => State.le
2022-03-27 09:30:55 -07:00
Leonardo de Moura
3fe7db1bbf
chore: remove dead theorem
2022-03-27 09:15:55 -07:00
Leonardo de Moura
b2ef678199
doc: constant propagation for simple imperative language
2022-03-27 09:02:37 -07:00
Leonardo de Moura
3b7c3c0017
chore: add TODO's
2022-03-26 18:59:43 -07:00
Leonardo de Moura
11ed51dcb2
doc: example for the tutorial
2022-03-26 18:52:53 -07:00
Sebastian Ullrich
85c7772f4c
doc: fix ReST markup
2022-03-26 22:50:04 +01:00
Sebastian Ullrich
bef34e30e7
feat: Nix: render examples using LeanInk+Alectryon
2022-03-26 22:50:04 +01:00
Sebastian Ullrich
282147631f
chore: Nix: add LeanInk + Alectyron to docs flake
2022-03-26 22:50:04 +01:00
Sebastian Ullrich
19925f8ec1
chore: Nix: move docs build into sub-flake
...
workflow is not ideal right now because of poor support for sub-flakes,
but I also don't want the doc input in the main flake...
2022-03-26 22:50:04 +01:00
Sebastian Ullrich
4a9bc88a4e
chore: fix USE_GMP=OFF by removing GMP linking customization
2022-03-26 16:29:52 +01:00
Sebastian Ullrich
1949b3f676
chore: CI: propagate prepare-llvm failures
2022-03-26 16:29:52 +01:00
Sebastian Ullrich
7ce5b0c4ff
feat: CI: build darwin_aarch64
2022-03-26 16:29:52 +01:00
Wojciech Nawrocki
96770b4d83
refactor: remove some code duplication
2022-03-26 06:26:41 -07:00
Wojciech Nawrocki
9223bf3640
feat: environment extension for RPC procedures
2022-03-26 06:26:41 -07:00
Sebastian Ullrich
e3a652de98
chore: CI: fix Linux/aarch64 tarball name, remove cpack config
2022-03-26 10:40:43 +01:00
Leonardo de Moura
c69b4d1f8d
chore: update stage0
2022-03-25 19:15:45 -07:00
Leonardo de Moura
a2e467eb32
fix: mkEqnTypes
...
stop as soon as `lhs` and `rhs` are definitionally equal, and avoid
unnecessary case analysis.
This commit fixes the last issue exposed by #1074
fixes #1074
2022-03-25 19:13:21 -07:00
Leonardo de Moura
3a310fb122
fix: the eta for structures implementation in the elaborator was different from the implementation in the kernel
...
This issue was exposed by issue #1074
2022-03-25 18:24:15 -07:00
Leonardo de Moura
d4d5d3693e
chore: update stage0
2022-03-25 18:18:03 -07:00
Leonardo de Moura
1900efd91a
chore: add pp_expr helper function
2022-03-25 18:16:18 -07:00
Leonardo de Moura
7307b02fd7
fix: missing test at has_trivial_structure
...
see #1074
2022-03-25 17:36:30 -07:00
Sebastian Ullrich
2740cab3fc
chore: update RELEASES
2022-03-26 00:02:13 +01:00
Leonardo de Moura
130bbfc501
chore: update README
2022-03-25 14:48:07 -07:00
Leonardo de Moura
9aca413e31
chore: add link to doc/examples
2022-03-25 14:46:43 -07:00
Leonardo de Moura
6da9119516
doc: add Parametric Higher-Order Abstract Syntax example
2022-03-25 14:42:24 -07:00
Sebastian Ullrich
ca9678be58
doc: move tier list to setup.md
2022-03-25 17:45:15 +01:00
Sebastian Ullrich
7ce4a85d25
doc: add platform support tiers to README
2022-03-25 17:45:15 +01:00
Sebastian Ullrich
7e853621eb
feat: CI: build linux_aarch64
2022-03-25 17:45:15 +01:00
Leonardo de Moura
e53435979f
fix: remove hacky addAutoBoundImplicitsOld
2022-03-25 09:23:43 -07:00
Leonardo de Moura
6631d92d7b
fix: addAutoBoundImplicitsOld occurrences at MutualDef.lean and Structure.lean
...
This commit also fixes non-termination at `collectUnassignedMVars`
2022-03-25 09:07:59 -07:00
Leonardo de Moura
e48cc8901e
fix: add new addAutoBoundImplicits that avoids the hack at addAutoBoundImplicitsOld
2022-03-25 08:40:57 -07:00
Leonardo de Moura
519b780164
doc: document InfoTree issue
2022-03-25 07:12:07 -07:00
Leonardo de Moura
370e9c421f
fix: bug at deriving Hashable
2022-03-24 18:46:10 -07:00
E.W.Ayers
534aa88188
doc: MetaM
2022-03-24 16:57:42 -07:00
Leonardo de Moura
3c9556ec18
doc: finish deBruijn.lean example
2022-03-24 16:17:53 -07:00
Leonardo de Moura
52a52fbed7
chore: add doc/examples to the test suite
2022-03-24 15:20:18 -07:00
Arthur Paulino
53faa9c8ca
doc: restriction of partial functions
2022-03-24 15:01:50 -07:00
E.W.Ayers
90baf14e82
doc: add lib and style changes to lean3changes.md
2022-03-24 15:00:36 -07:00
E.W.Ayers
1e69639fd2
doc: clarify mkLocalDecl
2022-03-24 14:59:46 -07:00
E.W.Ayers
6f5fc72c06
doc: Docstrings for LocalContext.lean
2022-03-24 14:59:46 -07:00
E.W.Ayers
24ebd78071
doc: Expr.lean
2022-03-24 14:52:09 -07:00
Wojciech Nawrocki
8f83c7ab32
feat: user-defined RPC handlers
2022-03-24 08:09:33 -07:00
Sebastian Ullrich
e49949b781
chore: prepare-llvm-linux: fix include path order
...
should really be `-isystem-after`, but clang ignores it...??
2022-03-24 12:33:33 +01:00
Sebastian Ullrich
75b3012a37
chore: prepare-llvm-linux: stop relying on /usr
2022-03-24 12:33:33 +01:00
Sebastian Ullrich
720e445755
chore: Nix: update inputs
2022-03-24 12:33:33 +01:00
Sebastian Ullrich
5c6e054e24
chore: update to LLVM 14
2022-03-24 12:33:33 +01:00
Leonardo de Moura
fdbe893c40
fix: catch mkAppM exceptions
2022-03-23 17:35:04 -07:00
Leonardo de Moura
96de208a6b
chore: remove some partial
2022-03-23 17:16:30 -07:00
Sebastian Ullrich
8a5febf130
chore: CI: fix release job
2022-03-23 19:33:25 +01:00
Leonardo de Moura
be7c71d1c8
chore: update date
2022-03-23 07:44:15 -07:00
Leonardo de Moura
e0aa9fb290
chore: fix typo
2022-03-23 07:39:46 -07:00
Leonardo de Moura
170b911a6f
doc: expand deBruijn
2022-03-22 19:35:58 -07:00
Leonardo de Moura
20fb3e470d
doc: add dependent de Bruijn indices
...
TODO: explain example.
2022-03-22 19:11:06 -07:00
Leonardo de Moura
b2a1b88a4e
doc: a certified type checker
2022-03-22 19:01:26 -07:00
Leonardo de Moura
a23fcb6033
chore: use github link until we generate the proper webpage using Alectryon
2022-03-22 18:34:40 -07:00
Leonardo de Moura
028e3561e2
fix: link
2022-03-22 18:07:04 -07:00
Leonardo de Moura
265803f7ac
doc: fix links
2022-03-22 16:52:08 -07:00
Leonardo de Moura
e06893d1f2
doc: proper TPIL link
2022-03-22 16:37:16 -07:00
Leonardo de Moura
973b76a6e2
doc: add Examples section
2022-03-22 16:35:14 -07:00
Leonardo de Moura
412bc14fbe
doc: add well-typed interpreter as an example
2022-03-22 16:32:41 -07:00
Leonardo de Moura
5ae125262b
chore: remove C++ coding style from manual
2022-03-22 15:54:51 -07:00
Leonardo de Moura
2e9adf0e04
chore: remove broken documentation
2022-03-22 15:52:13 -07:00
Leonardo de Moura
9d32d7bcf5
test: for issue #1062
...
closes #1062
2022-03-22 14:14:28 -07:00
Leonardo de Moura
2f67140603
fix: incorrect uses of getMVarType'
2022-03-22 14:11:29 -07:00
Leonardo de Moura
6007147d71
fix: allow universes to be postponed further
...
closes #1058
2022-03-22 13:57:58 -07:00
Leonardo de Moura
f3b181b972
chore: comment withoutPostponingUniverseConstraints
2022-03-22 13:57:58 -07:00
Mario Carneiro
c29da66c5a
fix: annotate binders in intro for hover / go to def
2022-03-22 12:10:51 +00:00
Sebastian Ullrich
3818ea8333
chore: CI: document previous workaround
2022-03-22 12:25:59 +01:00
Sebastian Ullrich
c758d442dc
chore: CI: try using the correct C++ compiler for tests on Windows
2022-03-22 12:22:23 +01:00
Sebastian Ullrich
bba0baf92c
chore: CI: I'm sure they work fine
2022-03-22 12:22:23 +01:00
Sebastian Ullrich
82049c519c
chore: CI: fix MinGW library root
2022-03-22 12:22:23 +01:00
Sebastian Ullrich
00aeaed544
chore: CI: fix manual build
2022-03-22 09:36:52 +01:00
Sebastian Ullrich
c4d3c74837
feat: accept multiple patterns after matches
2022-03-21 17:59:02 +01:00
Sebastian Ullrich
cb93590f0b
chore: update stage0
2022-03-21 17:47:03 +01:00
Sebastian Ullrich
faedfbe651
fix: antiquotation splices early in bootstrapping
2022-03-21 17:44:15 +01:00
Leonardo de Moura
3d9e587862
fix: check type mismatch at dependent pattern matching compiler
...
see issue #1057
2022-03-21 09:28:02 -07:00
Leonardo de Moura
9944feb095
test: use [reducible]
2022-03-21 07:39:44 -07:00
Sebastian Ullrich
89a3f6d623
chore: update Lake
2022-03-21 14:50:54 +01:00
tydeu
0fe9930d67
chore: update Lean version
2022-03-21 09:16:12 -04:00
Leonardo de Moura
2a4684a9ae
chore: String.Pos is opaque now
...
See https://github.com/leanprover/lean4/issues/410
Remark: I did not try to fix the places where the code assumes all
characters have size 1. I marked them with `TODO`s
2022-03-21 09:14:54 -04:00
Sebastian Ullrich
1a5822a3e2
chore: update Lake
2022-03-21 14:02:36 +01:00
Leonardo de Moura
3a75cf1920
test: nested inductives
2022-03-21 05:57:02 -07:00
Sebastian Ullrich
bdd5185a7f
fix: serve + print-paths without lakefile
2022-03-21 08:51:59 -04:00
Leonardo de Moura
cba204e3cb
chore: update stage0
2022-03-20 18:47:28 -07:00
Leonardo de Moura
321d6b0e67
feat: support for user-defined simp attributes in the simp tactic.
...
See `RELEASES.md`
TODO: make sure `-thm` also removes `thm` from user-defined simp attributes.
2022-03-20 18:45:57 -07:00
Leonardo de Moura
a2690d5278
feat: improve #eval command
2022-03-20 15:18:47 -07:00
Leonardo de Moura
7b1091770c
test: Repr for HList
2022-03-20 15:05:34 -07:00
Leonardo de Moura
6d926c7989
feat: macro expand match alternatives
...
see #371
This commit does not implement all features discussed in this issue.
It has implemented it as a macro expansion. Thus, the following is
accepted
```lean
inductive StrOrNum where
| S (s : String)
| I (i : Int)
def StrOrNum.asString (x : StrOrNum) :=
match x with
| I a | S a => toString a
```
It may confuse the Lean LSP server. The `a` on `toString` shows the
information for the first alternative after expansion (i.e., `a` is an `Int`).
After expansion, we have
```
def StrOrNum.asString (x : StrOrNum) :=
match x with
| I a => toString a
| S a => toString a
```
2022-03-20 14:20:13 -07:00
Leonardo de Moura
51ee6fe4f1
chore: fix test
2022-03-20 13:27:19 -07:00
Leonardo de Moura
476bcee8ba
chore: update stage0
2022-03-20 13:25:03 -07:00
Leonardo de Moura
8f4d58893f
feat: update match parser
...
Support for
```
def fib (x : Nat) : Nat :=
match x with
| 0 | 1 => 1
| x+2 => fib (x+1) + fib x
```
TODO: expand `matchAlts`
2022-03-20 13:22:39 -07:00
Leonardo de Moura
87bb299f08
feat: add Iterator.atEnd
2022-03-20 11:40:46 -07:00
Leonardo de Moura
4f9dcd55ce
chore: update stage0
2022-03-20 10:59:21 -07:00
Leonardo de Moura
3862e7867b
refactor: make String.Pos opaque
...
TODO: this refactoring exposed bugs in `FuzzyMatching` and `Lake`
closes #410
2022-03-20 10:47:13 -07:00
Jakob von Raumer
a91f92c11e
feat: allow constants to be type classes
...
There no reason against constants to be type classes so it is just the check in `addClass` that is needed to be modified.
Closes #1054
2022-03-20 08:03:34 -07:00
Leonardo de Moura
6e94801c00
chore: update stage0
2022-03-19 16:55:26 -07:00
Leonardo de Moura
1b357db3b0
fix: nasty bug at findDeclarationRangesCore?
...
We must search the environment extension first, and then the builtin
table. Otherwise, the builtin declarations do not change when we
modify the files.
closes #1021
2022-03-19 16:53:22 -07:00
Leonardo de Moura
ed7c8904a9
fix: propagate local and scope modifiers at elab_rules
...
closes #1039
2022-03-19 16:08:06 -07:00
Leonardo de Moura
82cd5c8eef
chore: cleanup
2022-03-19 15:52:04 -07:00
E.W.Ayers
da68f629f9
style: Apply.lean
...
Apply Leo's review requests.
2022-03-19 15:51:40 -07:00
E.W.Ayers
d954706fcf
feat: ApplyNewGoals config for apply
...
Lean.Meta.Tactic.apply now accepts an ApplyConfig argument.
`apply` now changes which metavariables are stored with choice
of the newGoals config.
This allows one to implement `fapply` and `eapply`.
An example of this is given in tests/lean/run/apply_tac.lean.
Closes #1045
2022-03-19 15:51:40 -07:00
casavaca
bf4ba1583d
feat: add simp theorem for List, (as.map f).length = as.length
2022-03-19 11:35:21 -07:00
Leonardo de Moura
72b6f4d528
chore: avoid unnecessary h :s
2022-03-19 11:21:37 -07:00
Leonardo de Moura
f29319647f
chore: update stage0
2022-03-19 11:16:24 -07:00
Leonardo de Moura
4f318d3304
test: use dot notation in the example
2022-03-19 10:39:58 -07:00
Leonardo de Moura
d1eb180aae
test: add non mutually recursive version
2022-03-19 10:38:39 -07:00
Leonardo de Moura
bdb2e9597a
chore: naming convention
2022-03-19 10:20:42 -07:00
Leonardo de Moura
6c8322d20a
test: use builtin Char.isDigit and Char.toNat
2022-03-19 10:18:34 -07:00
Leonardo de Moura
a8ddb56e0e
chore: cleanup David's example
2022-03-19 10:13:27 -07:00
Leonardo de Moura
c95d5f25a3
feat: convert ites into dites in the WF module
...
Motivation: the condition is often used in termination proofs.
2022-03-19 10:11:50 -07:00
Leonardo de Moura
9fed5bda7d
chore: remove workarounds
2022-03-19 09:44:57 -07:00
Leonardo de Moura
544421faf5
chore: update stage0
2022-03-19 09:43:57 -07:00
Leonardo de Moura
36d955e8cc
feat: use simpler encoding for nonmutually recursive definitions
2022-03-19 09:43:18 -07:00
Leonardo de Moura
4b374d4441
fix: Nat/Div.lean, add decreasing_with combinator, and rename decreasing_tactic_trivial
2022-03-19 09:40:10 -07:00
Leonardo de Moura
5e3b3494e2
chore: update stage0
2022-03-19 09:30:34 -07:00
Leonardo de Moura
c7cdbf8ff8
feat: improve auto generated termination_by a bit
2022-03-19 09:28:19 -07:00
Leonardo de Moura
64c5cda612
test: David's lex with string iterators
2022-03-19 09:15:29 -07:00
Leonardo de Moura
9722aeaf32
feat: use String.Iterator.sizeOf_next_lt in the builtin decreasing_tactic
2022-03-19 09:04:40 -07:00
Leonardo de Moura
7dd38a7194
feat: add with_unfolding_all and rfl' tactics
2022-03-19 08:57:04 -07:00
Leonardo de Moura
63e42a8179
chore: fix copyright date
...
File was created in 2022.
2022-03-19 08:44:21 -07:00
Leonardo de Moura
c8c4d47420
feat: make decreasing_tactic easier to extend
2022-03-19 08:42:38 -07:00
Leonardo de Moura
ef3143e1eb
chore: update stage0
2022-03-19 08:39:34 -07:00
Leonardo de Moura
fa74194638
fix: missing s.restore at expandTacticMacroFns
2022-03-19 08:34:54 -07:00
Leonardo de Moura
bd7827ed04
feat: dbg_trace tactic for low-level tactic debugging
2022-03-19 08:25:49 -07:00
Leonardo de Moura
9727387129
feat: helper theorem for proving termination of simple String traversal functions
2022-03-19 07:37:59 -07:00
Leonardo de Moura
ed3c792a4c
chore: update stage0
2022-03-19 07:21:52 -07:00
Leonardo de Moura
64bd82dddd
feat: custom SizeOf instance for String.Iterator
2022-03-19 07:21:17 -07:00
Leonardo de Moura
4ac88d0eb8
test: lex example from David
2022-03-18 19:53:17 -07:00
Leonardo de Moura
a486503c62
chore: fold Nat literals at reduce
2022-03-18 17:10:46 -07:00
Leonardo de Moura
1514e39006
chore: add double ticks
2022-03-18 17:10:46 -07:00
Leonardo de Moura
42b707e250
perf: improve getMatchWithExtra
2022-03-18 17:10:46 -07:00
Sebastian Ullrich
d5b3430e53
chore: ignore stage0/ (for rg etc.)
2022-03-18 15:28:20 +01:00
Leonardo de Moura
38a1675c72
fix: dicrimination tree getMatchWithExtra
...
It was buggy when the input argument could be reduced `e`.
fixes #1048
2022-03-17 16:44:38 -07:00
Leonardo de Moura
3193acecfa
fix: flush the CoreM and MetaM caches at modifyEnv
...
This fix may impact performance. Note that we don't need to flush the
cache if we are "adding" stuff to the environment. We only need to
flush the caches if the change is not monotonic. BTW, most of the
changes are monotonic. I think this is why we did not hit this bug before.
We may also move all these caches to an environment extension. It is
an easy way to make sure we preserve the cache when extending the
environment.
I tried a few benchmarks and did not notice a significant difference.
cc @kha @gebner
fixes #1051
2022-03-17 16:02:30 -07:00
Leonardo de Moura
719db55a9c
chore: fix trace class
2022-03-17 13:22:16 -07:00
Leonardo de Moura
184b0b8e8d
feat: improve "result types must be in the same universe level" error message
...
The new error message makes it clear why the definition is not accepted.
See issue #1050
2022-03-17 07:41:37 -07:00
zygi
ac793ce196
fix: forward start and stop in Array.allM
2022-03-17 10:08:40 +01:00
Sebastian Ullrich
0d03c6e319
chore: revise non-GMP interface
2022-03-16 17:32:51 -07:00
Daniel Fabian
969eea19f0
refactor: do not use mkAppM so much
2022-03-16 17:21:20 -07:00
Daniel Fabian
cf4e873974
feat: support Sort u in ac_refl.
2022-03-16 17:21:20 -07:00
Daniel Fabian
8e0763f502
fix: binder case.
2022-03-16 17:21:20 -07:00
Daniel Fabian
d667d5ab5d
feat: rewrite the tactic using simp as the basis.
2022-03-16 17:21:20 -07:00
Daniel Fabian
ed63274874
refactor: move ac_refl syntaxt to Init/Notation
2022-03-16 17:21:20 -07:00
Daniel Fabian
73a59e5bc4
feat: use simp instead of rewrite inside of ac_refl
2022-03-16 17:21:20 -07:00
Daniel Fabian
fda1c5b192
refactor: simplify proof using <;>
2022-03-16 17:21:20 -07:00
Daniel Fabian
84f72b9389
test: add further ac_refl tests.
2022-03-16 17:21:20 -07:00
Daniel Fabian
a60220b036
feat: add tactic for ac_refl.
2022-03-16 17:21:20 -07:00
Daniel Fabian
eaa48f0d8d
refactor: move ac proofs to Init.
2022-03-16 17:21:20 -07:00
Daniel Fabian
1114dfac6c
feat: add theory for ac normalization.
...
This lets us implement an AC reflexivity tactic.
2022-03-16 17:21:20 -07:00
Leonardo de Moura
4320a61f4d
chore: use Prod notation in test
2022-03-16 17:14:16 -07:00
Leonardo de Moura
50813429b8
fix: add expected type hint
...
Other tactics (e.g., `simp_all`) may try to infer the type of the
proof, and `Nat.Linear.eq_of_toNormPoly_eq` has a messy resulting type.
2022-03-16 17:07:22 -07:00
Leonardo de Moura
cb925a3a3c
fix: return some at simpCnstrPos? if arith expr was normalized, but not simplified
...
Example: converted `<`, `>`, or `>=` into `<=`.
2022-03-16 16:36:39 -07:00
Leonardo de Moura
9b9ed6db68
feat: add simp_all_arith macro
2022-03-16 16:17:45 -07:00
Leonardo de Moura
4ba5a9b041
fix: bug at KExprMap
2022-03-16 16:07:14 -07:00
Leonardo de Moura
09648521d1
chore: add Repr instances
2022-03-16 16:07:14 -07:00
Sebastian Ullrich
4fd520e902
feat: generalize inferred namespace notation to functions
2022-03-16 23:40:05 +01:00
Leonardo de Moura
68154a6c69
test: add Pos view
2022-03-16 10:08:43 -07:00
Leonardo de Moura
05a2778b0d
fix: ensure explicit pattern variables provided by the uses are indeed pattern variables
2022-03-16 07:50:29 -07:00
Leonardo de Moura
90c442da76
feat: add internal option for communicating to the delaborator that input term is a pattern
2022-03-16 07:50:29 -07:00
Sebastian Ullrich
a3c73f5df8
chore: remove orphan file
2022-03-16 10:25:18 +01:00
Leonardo de Moura
0a2d0bc3fd
chore: update stage0
2022-03-15 17:43:52 -07:00
Leonardo de Moura
0bd9de1cb9
perf: add InstantiateLevelCaches for types and values at CoreM
2022-03-15 17:42:38 -07:00
Leonardo de Moura
d6de53a7aa
perf: custom splitAnd
2022-03-15 16:59:11 -07:00
Leonardo de Moura
b8a4f3a7a3
perf: quick filter for simpMatch when proving equation theorems
2022-03-15 15:53:29 -07:00
Leonardo de Moura
e44b36cab0
chore: cleanup optimization using Lean bitwise operators
2022-03-15 12:06:08 -07:00
Leonardo de Moura
49e33fdb23
chore: fix tests
2022-03-15 11:35:47 -07:00
Leonardo de Moura
e1ba83d902
chore: update stage0
2022-03-15 11:31:39 -07:00
Leonardo de Moura
d3e2dfb079
perf: optimize mkApp
2022-03-15 11:31:15 -07:00
Leonardo de Moura
9d73317d76
perf: faster Expr.data
2022-03-15 11:30:41 -07:00
Leonardo de Moura
d2dc38fdb6
perf: use HasConstCache to minimize the number of visited terms at Structural and WF
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com >
2022-03-15 08:40:47 -07:00
Leonardo de Moura
5283007aa4
feat: add HasConstCache
2022-03-15 08:39:48 -07:00
Leonardo de Moura
3278d7bc2a
chore: update stage0
2022-03-15 07:16:17 -07:00
Leonardo de Moura
ca6453a0ab
perf: efficient unsigned hash(expr const & e)
2022-03-15 07:15:00 -07:00
Leonardo de Moura
eccd5c11c9
perf: removeUnusedEqnHypotheses
2022-03-15 06:53:43 -07:00
Leonardo de Moura
2b71bc84f3
perf: try injection before contradiction at mkSplitterProof
2022-03-15 05:37:10 -07:00
Leonardo de Moura
c3c0b8b8a2
chore: remove unnecessary code
2022-03-15 05:26:33 -07:00
Leonardo de Moura
aa68057c85
chore: more general type universes in example
2022-03-15 05:19:02 -07:00
Leonardo de Moura
7ee7ca30b8
fix: index out of bounds
2022-03-15 05:16:19 -07:00
Leonardo de Moura
4e261b15e5
fix: smart unfolding bug in over applications
2022-03-14 19:17:21 -07:00
Leonardo de Moura
eb7539ef77
fix: mkEqnTypes overapplied lhs in equational theorems
...
This issue was exposed by the "Dependent de Bruijn indices" from CPDT.
2022-03-14 17:42:21 -07:00
Leonardo de Moura
c6dae18787
chore: add helper theorems
2022-03-14 16:24:05 -07:00
Leonardo de Moura
40f608bfbd
chore: cleanup String.extract reference implementation
2022-03-14 16:23:13 -07:00
Leonardo de Moura
8e29747fe7
feat: add simp theorem (a : Nat) : (a ≤ 0) = (a = 0)
2022-03-14 15:43:42 -07:00
Leonardo de Moura
bbe6bd4e72
chore: simplify String.utf8ByteSize reference implementation
2022-03-14 15:42:58 -07:00
Leonardo de Moura
14ed473777
feat: mark Nat.zero_le as simp theorem
2022-03-14 15:19:52 -07:00
Leonardo de Moura
7fda1f47f8
test: add test for issue fixed in previous commit
2022-03-14 14:11:08 -07:00
Leonardo de Moura
86fc089e07
fix: tryAutoCongrTheorem? may still use dsimp for fixed arguments
...
Reviewed-by: Leonardo de Moura <leonardo@microsoft.com >
2022-03-14 14:04:28 -07:00
Leonardo de Moura
ef154ec0cf
test: add TreeNode example using for in notation
2022-03-14 11:52:54 -07:00
Leonardo de Moura
cab3217b05
feat: add forIn'_eq_forIn theorem for lists
2022-03-14 11:50:47 -07:00
Leonardo de Moura
2ac9cfb7b1
fix: eta expand partial applications of recursive function being defined
2022-03-14 10:05:33 -07:00
Leonardo de Moura
801552e1ac
chore: fix tests
2022-03-14 10:05:33 -07:00
Leonardo de Moura
9988faf8bd
fix: missing mkRecAppWithSyntax
2022-03-14 10:05:33 -07:00
Leonardo de Moura
02145f66cf
chore: fix typo
2022-03-14 10:05:33 -07:00
Sebastian Ullrich
147a5c2933
chore: prefer LEAN_SRC_PATH
2022-03-14 17:24:25 +01:00
Leonardo de Moura
d2cc5b4a83
chore: fix test
2022-03-13 15:53:21 -07:00
Leonardo de Moura
fa0964c07e
fix: preserve variable name at WF decreasing goals when function has only one non fixed argument
2022-03-13 13:20:07 -07:00
Leonardo de Moura
060be7e7ec
fix: :: is infix right
2022-03-13 09:25:56 -07:00
Leonardo de Moura
672a889c83
test: add hlist pattern match example
2022-03-13 09:15:55 -07:00
Leonardo de Moura
30c153aa76
chore: update stage0
2022-03-12 20:18:20 -08:00
Leonardo de Moura
bfe57a1cb0
chore: simplify definition
2022-03-12 20:16:45 -08:00
Leonardo de Moura
231120c118
chore: update RELEASES.md
2022-03-12 20:02:39 -08:00
Leonardo de Moura
5707cab7bf
feat: improve #eval command
...
Now, if it fails to synthesize the TC instance, it applies `whnf` and
tries again.
2022-03-12 19:55:15 -08:00
Leonardo de Moura
3cd41acd14
test: HList with notation overloads
2022-03-12 19:47:57 -08:00
Leonardo de Moura
af5a24140a
test: simple type checker at CPDT
2022-03-12 18:44:52 -08:00
Leonardo de Moura
7e3519a3a2
test: add CPDT first example
2022-03-12 17:06:20 -08:00
Leonardo de Moura
f0c31d7e28
feat: allow rw to unfold nonrecursive definitions too
2022-03-12 15:44:52 -08:00
Leonardo de Moura
c0a72172f1
chore: update stage0
2022-03-12 15:35:09 -08:00
Leonardo de Moura
7af09ac009
refactor: move equation theorem cache to Meta/Eqns.lean
2022-03-12 15:34:32 -08:00
Leonardo de Moura
cf0ca026fb
feat: equation theorems at rw
2022-03-12 13:53:02 -08:00
Leonardo de Moura
9d1dbada79
feat: only try to generate equation theorems for definitions whose types are not propositions
2022-03-12 13:44:33 -08:00
Leonardo de Moura
8a46668884
chore: update stage0
2022-03-12 10:46:17 -08:00
Leonardo de Moura
a6bfefe5bd
fix: nasty performance problem at isDefEq
...
This problem was originally exposed by the `Array.eraseIdxAux`.
2022-03-12 10:44:43 -08:00
Leonardo de Moura
eddcedb58c
fix: pattern normalization code
2022-03-12 06:07:04 -08:00
Lars
95cf18457d
chore: address review comments
2022-03-12 13:25:35 +00:00
Sebastian Ullrich
82c682d385
chore: remove redundant proof
2022-03-12 11:12:56 +01:00
Leonardo de Moura
a4f47adf9e
fix: normalize method at Match.lean
2022-03-11 18:19:37 -08:00
Leonardo de Moura
63dcf2124c
chore: add link to quickstart to README
2022-03-11 16:35:07 -08:00
Chris Lovett
6dc576121d
doc: replace quickstart leanpkg info with info about lake
2022-03-11 16:31:58 -08:00
Leonardo de Moura
15e30a93f3
feat: update RELEASES.md
2022-03-11 16:28:01 -08:00
larsk21
e430496903
doc: fix fuzzy matching docs
2022-03-11 16:25:26 -08:00
larsk21
ea5b6d568f
fix: review suggestions + code structure
2022-03-11 16:25:26 -08:00
larsk21
0ef3ea4bc9
feat: enable fuzzy matching for workspace symbols
2022-03-11 16:25:26 -08:00
larsk21
64dba41b4c
feat: enable fuzzy matching for completion
2022-03-11 16:25:26 -08:00
Sebastian Ullrich
ff11325fce
perf: use mkArray in fuzzyMatchCore
2022-03-11 16:25:26 -08:00
Sebastian Ullrich
d48c5b99e9
perf: eliminate MProd allocations in iterateLookaround
2022-03-11 16:25:26 -08:00
Sebastian Ullrich
896b9b48a3
perf: eliminate some allocations in iterateLookaround
2022-03-11 16:25:26 -08:00
Sebastian Ullrich
7106d3fb34
perf: specialize iterateLookaround
2022-03-11 16:25:26 -08:00
larsk21
135eac71a1
feat: add string fuzzy matching
2022-03-11 16:25:26 -08:00
Leonardo de Moura
5caf1bc692
chore: style
...
Use `·` instead of `.` for structuring tactics.
2022-03-11 16:12:46 -08:00
Leonardo de Moura
ddf93d2f8a
feat: support for arrow types in the dot notation
...
cc @gebner
2022-03-11 15:39:41 -08:00
Leonardo de Moura
8d42978e63
feat: generate error message when induction tactic is used on a nested inductive type without specifying an eliminator
2022-03-11 14:45:57 -08:00
Leonardo de Moura
712e9b7d45
chore: add custom induction principle for LazyList
2022-03-11 14:21:35 -08:00
Leonardo de Moura
7d5da95434
fix: remove unused hypotheses from conditional equation theorems
2022-03-11 14:10:57 -08:00
Leonardo de Moura
54b74796f6
feat: use tryContradiction at mkUnfoldProof
2022-03-11 12:52:15 -08:00
Leonardo de Moura
272dd5533f
chore: style use · instead of . for lambda dot notation
...
We are considering removing `.` as an alternative for `·` in the
lambda dot notation (e.g., `(·+·)`).
Reasons:
- `.` is not a perfect replacement for `·` (e.g., `(·.insert ·)`)
- `.` is too overloaded: `(f.x)` and `(f .x)` and `(f . x)`. We want to keep the first two.
2022-03-11 07:49:03 -08:00
Leonardo de Moura
2364bc7b46
chore: add link to issue
2022-03-10 17:10:12 -08:00
Leonardo de Moura
002412e9d0
chore: missing code block annotation
2022-03-10 17:08:54 -08:00
Leonardo de Moura
1b5e9c7c83
chore: use new notation on its own implementation
2022-03-10 16:56:39 -08:00
Leonardo de Moura
61cd3dcc32
chore: update stage0
2022-03-10 16:55:40 -08:00
Leonardo de Moura
e1fa9c131c
feat: inferring namespace from expected type a la Swift
...
Now that `PatternVars.lean` has been redesigned, it is feasible to
implement issue #944 .
closes #944
2022-03-10 16:55:25 -08:00
Leonardo de Moura
7a7841fa95
chore: update stage0
2022-03-10 16:07:25 -08:00
Leonardo de Moura
1c99fe92ac
feat: add dotIdent parser
...
see #944
2022-03-10 16:04:41 -08:00
Leonardo de Moura
3214a20d33
feat: allow overloaded notation in patterns
2022-03-10 12:51:34 -08:00
Leonardo de Moura
fddc8b06ac
fix: missing case at getStuckMVar?
...
Fix issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/'rewrite'.20failed.20but.20it.20should.20work/near/274870747
2022-03-10 10:33:11 -08:00
Leonardo de Moura
92318d07bb
feat: add MonadBacktrack instance for CollectPatternVars.M monad
2022-03-10 10:23:18 -08:00
Leonardo de Moura
7a39be225d
refactor: move methods to MetaM
2022-03-10 10:00:46 -08:00
Leonardo de Moura
2fb9a39cb4
refactor: implement MonadQuotation at CoreM
2022-03-10 09:55:20 -08:00
Leonardo de Moura
3edb0ede04
chore: update stage0
2022-03-10 08:56:06 -08:00
Leonardo de Moura
7850dc023b
fix: make sure the structure instance notation does not leak auxiliary type annotations (e.g., autoParam and optParam)
2022-03-10 08:41:00 -08:00
Leonardo de Moura
c1b1a916eb
doc: update release notes
2022-03-10 08:26:27 -08:00
Leonardo de Moura
efc89eb4e1
fix: make sure inferProjType consume auxiliary type annotations
2022-03-10 08:15:34 -08:00
Leonardo de Moura
0ef8aaeda0
feat: make sure minor premises in recursors do not include auxiliary type annotations (e.g., autoParam and optParam)
2022-03-10 08:08:36 -08:00
Leonardo de Moura
1afee372f7
refactor: move consume_type_annotations declaration to expr.h
2022-03-10 08:00:39 -08:00
Leonardo de Moura
33883e9d2a
fix: resulting type of projection functions should not include auxiliary type annotations (e.g., autoParam)
2022-03-10 07:47:38 -08:00
Leonardo de Moura
5825eb394f
refactor: move isOutParam to Expr.lean, rename consumeAutoOptParam => consumeTypeAnnotations
2022-03-10 07:37:41 -08:00
Leonardo de Moura
38668308ef
fix: do not rename metavariables that are already in the patternVars array
...
It fixes a regression introduced yesterday.
2022-03-10 05:53:54 -08:00
Leonardo de Moura
9c5f6361a3
doc: document the new pattern elaboration procedure
2022-03-09 18:58:23 -08:00
Leonardo de Moura
ca253c43e1
refactor: pattern elaboration
...
We don't use the following hack anymore:
- /- HACK: `fvarId` is not in the scope of `mvarId`
- If this generates problems in the future, we should update the metavariable declarations. -/
- assignExprMVar mvarId (mkFVar fvarId)
This hack was corrupting the `InfoTree`.
2022-03-09 18:19:14 -08:00
Leonardo de Moura
b0246172fa
chore: add comment and remove dbg trace message
2022-03-09 14:02:30 -08:00
Leonardo de Moura
b6dc3dda04
chore: fix tests
2022-03-09 14:02:13 -08:00
Leonardo de Moura
caa1366b62
fea: erase nested inaccessible annotations
2022-03-09 14:01:59 -08:00
Leonardo de Moura
1609f96128
refactor: simplify PatternVar.lean and Match.lean
2022-03-09 14:01:40 -08:00
Leonardo de Moura
74411aa472
fix: do not display implicit fields
2022-03-09 12:33:22 -08:00
Leonardo de Moura
50ae170bcc
feat: allow mkLambdaFVars and mkForallFVars to abstract unassigned metavars too
2022-03-09 11:27:58 -08:00
Leonardo de Moura
4660485ac8
refactor: collectDeps => collectForwardDeps
2022-03-09 11:27:58 -08:00
Leonardo de Moura
5636c94cd0
chore: remove old comment, simplify exception
2022-03-09 11:27:58 -08:00
Leonardo de Moura
1263cea6af
feat: add support for unassigned metavariables at dependsOn
2022-03-09 11:27:58 -08:00
Sebastian Ullrich
db9b963af7
chore: Nix: adjust message
2022-03-09 10:31:32 +01:00
Sebastian Ullrich
202258cc87
chore: Nix: remove debug flag
2022-03-09 10:30:37 +01:00
Sebastian Ullrich
a7438e9eae
chore: Nix: remove debug flag
2022-03-09 10:30:09 +01:00
Sebastian Ullrich
7821a201e9
chore: Nix: update Nix
2022-03-09 10:29:25 +01:00
Sebastian Ullrich
126c7dd4ea
chore: Nix: command for (one-time) linking .ileans
2022-03-09 10:29:25 +01:00
Sebastian Ullrich
2221cc8141
chore: Nix: emulate lake serve
2022-03-09 10:14:43 +01:00
Leonardo de Moura
164f07a5e5
feat: generalize Expr.abstractRange
...
It now takes free variables **and** metavariables.
This is the first step to make `mkForallFVars` and `mkLambdaFVars`
more general.
2022-03-08 18:19:17 -08:00
Leonardo de Moura
d6b782f811
chore: remove workaround
...
for regression introduced by the following change
* Auto implicit behavior changed for inductive families. An auto implicit argument occurring in inductive family index is also treated as an index (IF it is not fixed, see next item)
2022-03-08 17:58:20 -08:00
Leonardo de Moura
3b7ada0b35
chore: update stage0
2022-03-08 17:58:20 -08:00
Leonardo de Moura
4ee131981d
feat: in an inductive family the longest fixed prefix of indices is now promoted to parameters
...
This modification is relevant for fixing regressions on recent changes
to the auto implicit behavior for inductive families.
The following declarations are now accepted:
```lean
inductive HasType : Fin n → Vector Ty n → Ty → Type where
| stop : HasType 0 (ty :: ctx) ty
| pop : HasType k ctx ty → HasType k.succ (u :: ctx) ty
inductive Sublist : List α → List α → Prop
| slnil : Sublist [] []
| cons l₁ l₂ a : Sublist l₁ l₂ → Sublist l₁ (a :: l₂)
| cons2 l₁ l₂ a : Sublist l₁ l₂ → Sublist (a :: l₁) (a :: l₂)
inductive Lst : Type u → Type u
| nil : Lst α
| cons : α → Lst α → Lst α
```
TODO: universe inference for `inductive` should be improved. The
current approach is not good enough when we have auto implicits.
TODO: allow implicit fixed indices that do not depend on indices that
cannot be moved to become parameters.
2022-03-08 17:56:34 -08:00
Leonardo de Moura
234046521a
feat: print number of parameters for an inductive type
2022-03-08 17:48:46 -08:00
Leonardo de Moura
7b84b4cdaa
fix: improve inductive indices elaboration
...
TODO: convert fixed indices to parameters. Motivation: types such as
```lean
inductive Foo : List α → Type
| mk : Foo []
```
Users should not need to write
```lean
inductive Foo {α} : List α → Type
| mk : Foo []
```
2022-03-08 17:48:46 -08:00
Leonardo de Moura
f74513384e
refactor: cleanup addAutoBoundImplicits
2022-03-08 17:48:46 -08:00
Sebastian Ullrich
e9b8e54dcc
feat: scientific parser alias for scientificLit
2022-03-08 18:54:05 +01:00
Sebastian Ullrich
65d00098c7
chore: fix List.get use ( leanprover/lake#56 )
2022-02-16 13:21:33 -05:00
Gabriel Ebner
926a253680
fix: serve: fall back to lean --server on error
2022-02-04 17:30:47 -05:00
Leonardo de Moura
8c40a31573
chore: auto pure was removed
2022-02-03 21:32:27 -05:00
tydeu
0869780376
chore: start next Lake version
2022-02-03 01:24:28 -05:00
tydeu
17ac0d7f94
release: 3.0.0
2022-01-31 06:51:57 -05:00
tydeu
a9793b0a50
feat: add root package to workspace + and use it
2022-01-31 02:24:11 -05:00
tydeu
1c4b5ff3ac
test: add package dependency diamond in deps example
2022-01-31 00:52:57 -05:00
tydeu
985bdcb4d0
fix: don't duplicate dep link targets in diamonds
...
closes leanprover/lake#43
2022-01-31 00:52:37 -05:00
tydeu
30e3f10c6c
chore: ilean code cleanup
2022-01-31 00:04:17 -05:00
Sebastian Ullrich
e6894c058b
feat: create .ilean files
2022-01-30 23:46:08 -05:00
tydeu
bffcfde602
refactor: ModuleInfo -> Module
2022-01-30 23:16:08 -05:00
tydeu
705962847d
fix: glob bugs + cleanup
...
closes leanprover/lake#42
2022-01-30 22:49:05 -05:00
Sebastian Ullrich
df1c1cde12
refactor: make LeanPaths usage forward-compatible ( leanprover/lake#48 )
2022-01-22 20:55:16 -05:00
tydeu
6d7fc7216c
fix: get pkg for dep name not mod at buildDepOleans
...
Bug & fix first reported on Zulip: https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Lake.20mathport.20panic
2022-01-18 19:56:23 -05:00
tydeu
2be2466f78
chore: bump Lean version
2022-01-17 15:00:01 -05:00
Leonardo de Moura
4ac34f4cd5
chore: rename PointedType => NonemptyType
2022-01-15 11:42:09 -08:00
tydeu
f3d8fcc85d
test: don't check for lean-toolchain generation in init example
2022-01-15 11:35:40 -05:00
Leonardo de Moura
e880dd52a4
chore: PointedType
2022-01-14 20:41:47 -08:00
tydeu
752bc24f78
feat: add args to binary & .o file traces + some cleanup
...
closes leanprover/lake#41
2021-12-27 12:07:15 -05:00
tydeu
2680e1c66f
refactor: generalize computeHash + cleanup
2021-12-27 12:00:09 -05:00
tydeu
5029f30b27
refactor: tweak collectArgs in Cli
2021-12-27 11:00:18 -05:00
tydeu
5102d21cc5
feat: expand script CLI into its own script command
2021-12-24 03:26:34 -05:00
tydeu
2b0989ea28
refactor:: simplify/improve CLI API
2021-12-23 23:43:01 -05:00
tydeu
c9128d1ce6
refactor:: separate build and scheduler monads
2021-12-23 16:25:15 -05:00
tydeu
d4e7e33652
feat: split Lake context from BuildContext and also use it in scripts
2021-12-22 00:39:36 -05:00
tydeu
1b96c466ca
refactor: use new version info from Lean + cleanup
2021-12-19 21:59:17 -05:00
tydeu
9ac989f0c9
chore: bump Lean version
2021-12-19 21:47:46 -05:00
tydeu
adcf2df9b5
refactor: async API tweaks
2021-12-19 21:45:42 -05:00
tydeu
8fb9dd8478
fix: consider globbed files local
...
easiest way to fix mathport builds (for now)
2021-12-16 21:56:10 -05:00
tydeu
34bf090300
fix: build dep's extraDepTarget not root's for each dep
2021-12-16 01:03:21 -05:00
tydeu
d781c3411a
feat: add getLeanSysroot and getLeanLibDir
2021-12-15 20:08:14 -05:00
tydeu
f9e789af45
refactir: revamp install path API
2021-12-15 13:44:28 -05:00
tydeu
a23c5feec4
chore: bump Lean version
2021-12-15 11:14:02 -05:00
tydeu
e37cde0def
test: reorganize ffi example
2021-12-14 16:45:43 -05:00
tydeu
7199eea687
refactor: cleanup/improve Target utils
2021-12-14 14:12:43 -05:00
tydeu
50a84fcd55
test: add print-paths of dep modules check
2021-12-13 20:27:35 -05:00
tydeu
ac47b4fb01
refactor: remove Package from BuildContext
2021-12-13 19:53:45 -05:00
tydeu
8f4b203b2f
refactor: include package in module info
...
fixes various issues with `lake print-paths` builds
2021-12-13 19:08:06 -05:00
tydeu
e054596cfa
chore: bump Lean version
2021-12-13 10:59:53 -05:00
Leonardo de Moura
99bd215dcb
chore: where struct instance parser
...
The parser was modified to fix issue https://github.com/leanprover/lean4/issues/753
cc @tydeu
2021-12-12 08:26:20 -08:00
tydeu
56bae17924
feat: also set LEAN_SYSROOT and LEAN_SRC_PATH with env
2021-12-11 18:19:30 -05:00
tydeu
8b66dbf285
refactor: use error in Load.lean
2021-12-11 17:53:31 -05:00
tydeu
197b8e5c1d
feat: better error messages for missing CLI args
2021-12-11 16:47:28 -05:00
tydeu
f0ad325e09
feat: fallback to ar when llvm-ar is not bundled with Lean
2021-12-10 18:30:34 -05:00
Anders Christiansen Sørby
bec311bf48
chore: fix Nix setup ( leanprover/lake#38 )
2021-12-10 17:59:56 -05:00
Leonardo de Moura
0555e29808
chore: do cannot be used in pure code anymore
...
cc @tydeu
2021-12-10 13:18:27 -08:00
tydeu
1210589771
feat: build package and deps simultanously
2021-12-05 18:45:58 -05:00
tydeu
5edbd6cf59
refactor: use workspace olean dirs in module targets and print-paths
2021-12-04 16:24:30 -05:00
tydeu
50fa9a0b53
feat: resolve deps immediately and store them in workspace
2021-12-04 16:24:19 -05:00
tydeu
8e728b1159
refactor: split Package and Workspace
2021-12-04 12:58:00 -05:00
tydeu
052d6623f0
refactor: move misc utilities to Util.Extra
2021-12-04 11:27:38 -05:00
tydeu
b996117482
doc: mention options for a package's Git revision in README
...
closes leanprover/lake#37
2021-12-02 21:37:10 -05:00
tydeu
fcc3e3d93e
chore: cleanup
2021-12-02 21:29:16 -05:00
tydeu
a7a980c12d
refactor: remove unused branch parameter from Source.git
2021-12-02 21:25:53 -05:00
tydeu
1284616296
refactor: revamp Async API
2021-11-30 11:56:35 -05:00
tydeu
a1368df5c9
chore: fix docstring formatting
2021-11-26 23:47:36 -05:00
tydeu
4b062543ec
refactor: simplify trace checking somewhat
2021-11-26 21:53:18 -05:00
tydeu
c830953ded
feat: use Lean bundled ar by default for static libs
...
closes leanprover/lake#35
2021-11-26 18:44:00 -05:00
tydeu
aa524e977c
chore: bump Lean version
2021-11-26 18:20:07 -05:00
ammkrn
a727a3de5c
fix: syntax/mathlib name in dependencies example
...
Mathlib4 changed the package name to just `mathlib`. Trying to build
with a dependency name `mathlib4 will now cause an error.
2021-11-25 19:45:45 -05:00
Sebastian Ullrich
91620481a5
fix: adapt to Lean change
2021-11-25 10:01:20 -05:00
tydeu
ca6c5b8c5c
feat: add lake env
2021-11-25 06:49:22 -05:00
tydeu
2092850b02
refactor: lake server -> lake serve
2021-11-25 05:29:47 -05:00
tydeu
63bd325b3b
refactor: split build CLI into separate file
2021-11-25 04:58:33 -05:00
tydeu
ec8b351445
refactor: generalize some IO-related code
...
* add `def OptionIO := EIO PUnit`
* add `OptionIOTask` for `OptionIO`
* rename `BuildCoreM` -> `BuildIO`
* rename `Util.LogT` -> `Util.Log`
* generalize `error` to `MonadError`
* generalize` Cli.build`
2021-11-25 03:22:11 -05:00
tydeu
bb2c720411
doc: fix mathlib link in README
2021-11-21 16:55:29 -05:00
tydeu
8a1e413d5a
doc: update README
...
* Add dependency example (closes leanprover/lake#27 )
* Move build instructions to bottom (closes leanprover/lake#28 )
* Remove mention of the `name` option (closes leanprover/lake#29 )
* Correct `OpaqueTarget` guidance (closes leanprover/lake#30 )
2021-11-20 20:26:23 -05:00
tydeu
0422c0d019
ci: trigger on all branches
2021-11-11 18:51:24 -05:00
tydeu
2be3a23b46
feat: use IO.appPath for exe in LakeInstall
2021-11-11 02:41:23 -05:00
tydeu
40b6ca82b3
fix: include libleanshared in Lean trace
...
closes leanprover/lake#26
2021-11-11 02:23:54 -05:00
tydeu
36b0d7b60c
feat: store current Package in BuildM
2021-11-11 00:10:52 -05:00
tydeu
8d96c2cbe8
refactor: move Workspace/Script code to separate files
2021-11-10 18:46:31 -05:00
tydeu
94d899ad95
refactor: use supportInterpreter in lakefile
2021-11-09 23:43:55 -05:00
tydeu
4c9c0cae30
refactor: use liftExcept in Task.lean
2021-11-09 23:43:23 -05:00
tydeu
445f0db973
chore: bump Lean version
2021-11-09 23:25:36 -05:00
tydeu
331bf0f7f2
refactor: reorganize code folder structure
2021-11-09 22:55:21 -05:00
tydeu
ce7779890b
chore: minor Task async code cleanup
2021-11-09 16:49:14 -05:00
tydeu
7bc00f9b29
refactor: generalize IOTask to EIOTask
2021-11-05 19:16:30 -04:00
tydeu
f48d9fccd9
refactor: replace RealM with BaseIO
2021-11-05 17:55:27 -04:00
tydeu
8dfd7fccfc
feat: use lean --githash for Lean version checking
2021-11-05 16:22:11 -04:00
tydeu
eb73594ec0
chore: update Lean version
2021-11-05 15:35:46 -04:00
tydeu
8babf3fc70
doc: nclude --help option info in scripts docs
2021-11-05 15:22:57 -04:00
tydeu
57c7e42752
fix: make buildRec target wait for deps
2021-11-05 14:12:58 -04:00
tydeu
ffcf715f30
refactor: allow -h between command and args
2021-11-05 13:53:17 -04:00
tydeu
50dd829d90
feat: add docs for scripts + CLI code cleanup
2021-11-02 13:19:41 -04:00
tydeu
0b0afef09a
refactor: split EIO UInt32 from Cli into its own MainM file
2021-11-02 11:23:04 -04:00
tydeu
763ac9a2e8
refactor: pipe proc output to logger
2021-11-02 07:20:29 -04:00
tydeu
182409e0f4
refactor: use LogT at Resolve.lean
2021-11-02 05:35:53 -04:00
tydeu
8a20cafebf
chore: fix some overlooked docs
2021-10-29 19:04:21 -04:00
tydeu
ae43e5b2fb
feat: add package shared library build / facet
2021-10-29 19:00:02 -04:00
tydeu
d518e3df5b
refactor: properly manage errors in the build monad
2021-10-28 13:36:07 -04:00
tydeu
781672e935
refactor: generalize Await signature a little
2021-10-27 12:19:02 -04:00
tydeu
b0991cf96b
refactor: cleanup Task code some
2021-10-24 22:04:08 -04:00
tydeu
29f6c0fb5a
refactor: split logging from BuildM into its own monad
2021-10-24 17:46:28 -04:00
tydeu
333a86ef5f
fix: typing mistakes with CliMethodsRef + cleanup
2021-10-24 17:34:40 -04:00
tydeu
e006f8534d
feat: add supportInterpreter config setting
...
also don't use `--export-all` on Windows anymore
2021-10-23 16:16:09 -04:00
tydeu
168ec3d178
perf: cache lean exe trace in BuildM
2021-10-23 14:36:37 -04:00
tydeu
20788e8237
refactor: separate module olean and c traces
2021-10-23 14:02:31 -04:00
tydeu
74276dd024
refactor: update ofByteArray with new primitives
...
also rename `getFileHash` to `computeFileHash`
2021-10-23 11:34:01 -04:00
tydeu
521311292d
chore: bump Lean version
2021-10-23 11:04:51 -04:00
tydeu
738425b0b1
ci: mssing $
2021-10-20 16:46:03 -04:00
tydeu
29975edb0e
ci: use matrix OS for build artifact name
2021-10-20 16:44:54 -04:00
tydeu
7cbde2c852
ci: switch back to homebrew on macOS
2021-10-19 11:36:36 -04:00
tydeu
c6f6eec4c5
fix; leanmake build
2021-10-19 11:30:24 -04:00
tydeu
aa3f453ebf
refactor: cleanup trace code some
2021-10-18 19:38:32 -04:00
tydeu
ffd5bc0f69
refactor: narrow Lean imports
2021-10-18 18:01:31 -04:00
tydeu
bfedab0f9b
feat: build C files in print-paths if facet is not oleans
2021-10-18 15:21:43 -04:00
tydeu
4d66b6e4e2
fix: ci: don't use hombrew for MacOS (for now)
...
Reason: it is missing `lake` (see https://github.com/Homebrew/homebrew-core/pull/87486 )
2021-10-18 13:40:50 -04:00
tydeu
44cc860c82
fix: ci: use elan's lake to build (for now)
...
Reason: `leanmake` build is broken due to bad dep inference
2021-10-18 13:27:58 -04:00
tydeu
53ad51e984
fix: correct the lake lib location of a co-located lake and lean
2021-10-18 12:39:30 -04:00
tydeu
e9443705d5
feat: include hash of lean in module traces
...
closes leanprover/lake#23
2021-10-18 12:11:56 -04:00
tydeu
d9f53dfec9
refactor: replace leanpkg.toml with a lakefile.lean + build reorg
2021-10-17 13:52:01 -04:00
tydeu
b558536129
feat: add basic lake server CLI
2021-10-13 15:31:49 -04:00
tydeu
4eec17c876
chore: use return at examples/scripts
2021-10-13 14:47:57 -04:00
tydeu
1074aaa5fa
chore: fix hasModule error message at parseTargetBaseSpec
2021-10-10 12:52:49 -04:00
tydeu
b8b3f01c96
feat: add option to specify the lean used by Lake
...
also:
* support `=` for long CLI options
* cleanup some typos in `InstallPath`
2021-10-10 12:37:00 -04:00
tydeu
15a2981804
feat: new build CLI
2021-10-09 19:24:28 -04:00
tydeu
88af2ca4b7
refactor: reorg build package code
2021-10-09 18:48:53 -04:00
tydeu
d494626de6
chore: use Json.compress at print-paths
...
Reason: server expects JSON to be a single line
2021-10-09 12:04:08 -04:00
tydeu
ae01b5d586
chore: use c++ not cc at examples/fffi
2021-10-09 11:26:21 -04:00
tydeu
8635ce279b
refactor: use LeanPaths in print-paths
2021-10-08 21:00:42 -04:00
tydeu
b2822ffab1
chore: bump Lean version
2021-10-08 20:58:53 -04:00
tydeu
427cb0fc7c
feat: add inputFileTarget util
2021-10-08 15:26:07 -04:00
tydeu
85efdb159a
test: expand examples/ffi to use getLeanIncludeDir
2021-10-08 15:20:23 -04:00
tydeu
8a06d4f529
feat: introduce Workspace which is shared across a pkg and its deps
2021-10-08 14:09:05 -04:00
tydeu
7a3aadd005
feat: add utils for constructing file targets with deps
2021-10-08 12:58:10 -04:00
tydeu
b3b7aa02d1
fix: wait for deps to build on a bare print-paths
2021-10-07 18:30:52 -04:00
tydeu
2e5c7c02f1
refactor: CLI code tweaks
2021-10-07 14:59:00 -04:00
tydeu
1d20cbd3d6
refacttor: check LEAN_SYSROOT rather than LEAN_HOME for Lean
2021-10-07 14:04:18 -04:00
tydeu
9700208501
feat: have print-paths exit silently with code 2 if config missing
2021-10-07 12:40:26 -04:00
tydeu
6cfbd90426
refactor: always pass -O3 and -DNDEBUG when building Lean o files
...
also add `more` prefix to `leanArgs`/`leancArgs`/`linkArgs`
closes leanprover/lake#19
2021-10-06 21:07:56 -04:00
tydeu
e171925991
chore: update Lean version
...
fixes leanprover/lake#21
2021-10-06 20:43:36 -04:00
tydeu
0e7a2bae8e
refactor: clean up CLI code some
2021-10-06 20:06:03 -04:00
tydeu
429386c4c0
refactor: update print-paths JSON format to match server
2021-10-06 17:52:22 -04:00
tydeu
0f2d6c7fdd
feat: use detected Lean install to build packages
2021-10-06 17:38:57 -04:00
tydeu
c32cd22504
feat: store detected Lean/Lake install in BuildContext
...
includes new `getLeanIncludeDir` for `BuildM` (leanprover/lake#18 )
2021-10-06 17:01:52 -04:00
tydeu
0196cbe6a3
refactor: move build execution into CLI
2021-10-06 16:27:49 -04:00
tydeu
93cc196b10
chore: minor code cleanup
2021-10-06 15:22:19 -04:00
tydeu
3bcd18a1c6
refactor: generalize Lean/Lake installation detection
2021-10-05 20:00:30 -04:00
tydeu
4c0734b5f1
feat: use hash traces for o file, static lib, and bin targets
...
Also rename `.hash` file to `.trace` and add a `package-bootstrap` make job
2021-10-04 19:08:22 -04:00
tydeu
ae144112be
refactor: generalize checkModuleTrace
2021-10-04 18:30:24 -04:00
tydeu
e906f39201
refactor: cleanup Compile.lean
2021-10-04 17:51:47 -04:00
tydeu
a9b87adbeb
feat: print-paths as a JSON object
2021-10-04 12:50:57 -04:00
tydeu
b2acab81d4
refactor: output print-paths build info to stderr
2021-10-04 12:27:14 -04:00
tydeu
3ab3b69293
chore: minor ccide leanup
2021-10-04 12:25:40 -04:00
tydeu
5b0e264f8c
feat: promote scripts from PackageConifg to top level commands
2021-10-03 21:38:22 -04:00
tydeu
583b534e6c
refactor: simplify / reorder LeanConfig
2021-10-03 21:20:52 -04:00
tydeu
0ede8f2c4c
chore; minor doc cleanup
2021-10-03 17:09:30 -04:00
tydeu
8852c5e236
feat: use an attribute to identify packages in lakefile
2021-10-03 14:13:49 -04:00
tydeu
50f70712a8
feat: add name to package DSL signature
2021-10-03 13:31:09 -04:00
tydeu
3b28d24319
refactor: make package name a Name
2021-10-03 12:42:24 -04:00
tydeu
d533606a86
chore: update examples/git URL
2021-10-03 00:01:56 -04:00
tydeu
557adf9ffc
refactor: default binRoot to Main and expand init code
2021-10-02 23:41:55 -04:00
tydeu
0f5dd30880
refactor: use an Array for package depedencies
2021-10-02 21:48:23 -04:00
tydeu
7197f60d9c
fix: do not resolve the same dependency multiple times
2021-10-02 21:33:08 -04:00
tydeu
3d76e48181
fix: do not build deep deps multiple times
2021-10-02 16:11:53 -04:00
tydeu
cfc8a2538d
refactor: generalize buildTop and failOnImportCycle
...
Reason: will be useful for upcoming dependency build fix
2021-10-02 14:21:45 -04:00
tydeu
83ccf8a15d
test: extend examples/deps to include a deep dependency
2021-10-01 21:23:31 -04:00
tydeu
f187761c2e
chore: bump Lean version
...
Reason: fixes `leanc` on Linux
2021-10-01 21:20:45 -04:00
tydeu
a8d5348f4f
chore: bump Lean version
...
Reason: 816dc1895f may be of use to Lake
2021-09-30 20:56:34 -04:00
tydeu
fe87b064a2
feat: for most CLI commands, error when given more args than expected
2021-09-30 20:37:18 -04:00
tydeu
a21274c302
refactor: make return code part of the CLI + have scripts return code
2021-09-30 20:36:21 -04:00
tydeu
526e6e223e
refactor: throw error on build failure
...
Reason: `lake` will now exit with code 1 rather than 0 on build failure
2021-09-30 19:24:37 -04:00
tydeu
8cd7efb2d8
chore: post PR cleanup
2021-09-30 16:25:58 -04:00
Anders Christiansen Sørby
cadc812608
feat: add a Nix flakes build setup
2021-09-30 16:13:58 -04:00
tydeu
2b8f0f768c
chore: use lake clean for examples/hello
2021-09-30 15:56:46 -04:00
tydeu
628e5e2818
fix: only call removeDirAll if path exists
2021-09-30 15:50:22 -04:00
tydeu
3abf53d196
chore: just build bin in examples/bootstrap
...
Reason: `bin` now imports the entire `Lake` lib so this is unecessary
2021-09-30 02:20:41 -04:00
tydeu
3b78652547
refactor: prefer build rather than fetch terminology
2021-09-27 02:50:45 -04:00
tydeu
032be7ee2e
refactor: generalize buildRBTop
2021-09-27 02:40:24 -04:00
tydeu
a093a38459
refactor: rename package.lean to lakefile.lean
2021-09-26 18:52:31 -04:00
tydeu
6a9997c7ad
chore: -O3 not -03
2021-09-25 23:59:13 -04:00
tydeu
ff1e63c719
refactor: default leancArgs to -03, -DNDEBUG (like leanpkg)
2021-09-25 23:57:31 -04:00
tydeu
3f534e1155
refactor: use DSL in examples
2021-09-25 23:53:34 -04:00
tydeu
2e5b4d2221
feat: add simple DSL for package configurations
2021-09-25 23:40:31 -04:00
tydeu
63ad2d7765
chore: bump to v3.0.0-pre
2021-09-25 22:59:15 -04:00
tydeu
a9c0210ef3
refactor: use import Lake in package configurations
2021-09-25 19:36:00 -04:00
tydeu
efadebd5ef
refactor: move main into Lake.Main which is not imported by Lake
2021-09-25 19:18:10 -04:00
tydeu
1d052a1b39
fix: update examples/git commit hash
2021-09-25 18:38:42 -04:00
tydeu
4af8135172
refactor: remove the package version field
...
Reason: It is unused. See https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/.5BRFC.5D.20name.2Fversion.20package.20fields/near/254114011 for more discussion of topic.
2021-09-25 18:31:33 -04:00
tydeu
ba8067f3bd
refactor: don't use globs to determine local modules + cleanup
...
Reasion: globs should be submodules of the roots
2021-09-24 01:11:29 -04:00
tydeu
0f0ea57ef5
chore: some cleanup and reorg
2021-09-23 23:12:51 -04:00
tydeu
5b37f1c5c5
feat: split moduleRoot into libRoots and libGlobs
...
Reason: provide finer grain control over library modules
2021-09-23 21:04:29 -04:00
Mario Carneiro
5007ceae69
feat: add module Glob API
2021-09-23 11:33:10 -04:00
tydeu
6d4360a04d
release: 2.1.0
2021-09-22 15:43:07 -04:00
tydeu
194247bb32
chore: bump Lean version
2021-09-22 12:19:51 -04:00
Sebastian Ullrich
abd617b9a5
test: use $LAKE everywhere
2021-09-21 12:17:27 -04:00
tydeu
dfa959ba30
test: add clean* targets to Makefile
...
closes leanprover/lake#13
2021-09-20 18:14:50 -04:00
Sebastian Ullrich
9b80f69e54
chore: add proper shebang to build.sh & port to sh
2021-09-20 12:53:55 -04:00
tydeu
b4150f61c7
chore: cleanup fromLeanFileUnsafe code
2021-09-19 23:41:14 -04:00
tydeu
1432bd91bb
chore: fix ffi-dep shell script permissions
2021-09-19 20:09:56 -04:00
tydeu
9bdd0202b7
test: add ffi-dep example and fix ffi example
...
see leanprover/lake#8
2021-09-19 20:01:55 -04:00
tydeu
1c0c5a84a4
refactor: merge rootDir into srcDir
2021-09-19 19:59:07 -04:00
tydeu
06a6b9a88c
feat: add pure Packager variant
2021-09-19 19:58:30 -04:00
tydeu
9f90c9bb66
feat: don't overwite existing files on init + test
...
closes leanprover/lake#10
2021-09-17 16:26:25 -04:00
tydeu
fdb9915bcc
feat: print usage on bare lake
...
closes leanprover/lake#9
2021-09-17 14:54:33 -04:00
tydeu
4b7a98bc38
chore: replace removeDirAll with the proper function
2021-09-16 21:48:21 -04:00
tydeu
b158f1fd8b
chore: bump Lean version
2021-09-16 21:43:21 -04:00
tydeu
50a23a3aa5
refactor: print last error message on build failure + cleanup
2021-09-16 18:36:07 -04:00
tydeu
6a3d299378
fix: log trace computation errors at FileTarget
...
resolves leanprover/lake#7
2021-09-16 18:33:38 -04:00
tydeu
8b83d80956
chore: add mising (Active)Target.with* utilities
2021-09-16 17:03:15 -04:00
tydeu
bf4db86bdd
feat: search path now first checks IO.appPath for lean
2021-09-16 16:26:06 -04:00
tydeu
b4dcad59fa
test: add alternate binRoot example (called main)
2021-09-16 15:13:11 -04:00
tydeu
3c1185dc9c
chore: document package configuration + other minor cleanup
2021-09-16 07:49:56 -04:00
tydeu
f39b1b8378
chore: remove unused MonadLiftT Id instance
2021-09-14 11:18:16 -04:00
tydeu
dd120dbc5a
feat: use lean-toolchain file to specify Lean version for package
2021-09-13 15:57:33 -04:00
tydeu
276163afd7
chore: bump to v2.1.0-pre
2021-09-13 15:48:26 -04:00
tydeu
c97eac1e82
release: 2.0.1
2021-09-13 14:57:20 -04:00
tydeu
9285fb6f1d
chore: update Lean version
2021-09-13 14:52:19 -04:00
tydeu
58eff66799
chore: merge build-*.sh into build.sh + cleanup README
2021-09-13 14:34:56 -04:00
tydeu
ce46960416
ci: continue even if build upload fails
2021-09-13 13:48:02 -04:00
tydeu
8e8ea4da33
ci: add GitHub Actions workflow
2021-09-13 13:34:03 -04:00
tydeu
eca73809e6
chore: bin/Hello -> bin/hello
2021-09-13 13:28:54 -04:00
tydeu
e3ec2b9e39
chore: revert casing change and instead output lower-cased bin
2021-09-13 13:21:35 -04:00
tydeu
4e61320225
chore: bin/lake -> bin/Lake
...
Reason: casing matters on Linux
2021-09-13 12:55:36 -04:00
tydeu
e441c40a3d
chore: fix typo in Makefile
2021-09-13 12:52:37 -04:00
tydeu
60c749ab1d
test: tweak & expand test Makefile
2021-09-13 12:22:11 -04:00
tydeu
0188eb84df
chore: add .gitattributes file
2021-09-13 11:55:02 -04:00
tydeu
5caa12c0b0
chore: fix shell script permissions
2021-09-13 11:40:05 -04:00
tydeu
69102b1812
feat: add Hash/MTime -> BuildTrace Coe instances
2021-09-13 09:54:36 -04:00
tydeu
8d3e72d742
release: 2.0
2021-09-05 20:17:23 -04:00
tydeu
f1865d4290
test: remove meanigful version information from bootstrap test
2021-09-05 20:15:46 -04:00
tydeu
22ee974ac8
chore: bump Lean version
2021-09-05 20:04:44 -04:00
tydeu
103e8ab61c
test: convert examples' main test.sh into a Makefile
2021-09-05 19:54:39 -04:00
tydeu
f92afee9b4
fix: args bug with CLI
2021-09-05 19:47:13 -04:00
tydeu
d6d395619f
chore: cleanup solveDeps
2021-09-05 19:03:41 -04:00
tydeu
09af870b71
feat: add config option for separate binary module root
2021-09-05 19:01:09 -04:00
tydeu
8601c0fe78
refactor: purify BuildModule somewhat + associated cleanup
2021-09-05 18:05:45 -04:00
tydeu
6863bb8095
refactor: ModuleTarget -> ActiveModuleTarget
2021-09-05 16:30:28 -04:00
tydeu
4b9a765cfb
refactor PackageTarget -> ActivePackageTarget
2021-09-05 16:29:18 -04:00
tydeu
d4ba706198
refactor: purify BuildBin.lean
2021-09-05 15:37:16 -04:00
tydeu
92696d48f6
feat: use olean instead of lean hash for module targets
2021-09-05 01:01:40 -04:00
tydeu
720ecbd568
refactor: more cleanup (primarly Trace.lean)
2021-09-05 00:31:23 -04:00
tydeu
7129433066
fix: typo in foldArrayAsync
2021-09-04 20:41:03 -04:00
tydeu
3e1cdda87e
refactor: make PackageConfig take normal targets
2021-09-04 18:53:21 -04:00
tydeu
0a3457e973
refactor: minor cleanup / tweaks
2021-09-04 18:41:20 -04:00
tydeu
dba37698c8
refactor: rename LakeTrace to BuildTrace
2021-09-04 17:49:08 -04:00
tydeu
80416677d8
refactor: compute trace duing build
2021-09-04 17:45:56 -04:00
tydeu
2d3bec2209
feat: add proper CLI
2021-08-22 11:17:18 -04:00
tydeu
1825e095e1
refactore: rename ModuleM
2021-08-22 03:51:44 -04:00
tydeu
332af4c262
refactor: check hash after verifying module artifact exists
2021-08-22 03:40:09 -04:00
tydeu
4ce8716b99
feat: build and print-paths now build only oleans
2021-08-22 03:23:43 -04:00
tydeu
ac1cc9e62c
chore: cleanup
2021-08-22 03:06:33 -04:00
tydeu
80a9685164
refactor add ModuleTargetMap abbreviation
2021-08-22 00:16:18 -04:00
tydeu
ce1ee3c36d
refactor: move build failed message into runBuild
2021-08-22 00:07:17 -04:00
tydeu
43d1dfe72c
refactor: cleanup opaque target interfaces
2021-08-21 23:52:34 -04:00
tydeu
c843f0b112
chore: cleanup
2021-08-21 22:43:27 -04:00
tydeu
64634dbc32
refactor: change target abstraction (again)
2021-08-21 21:05:52 -04:00
tydeu
d12c4241bf
fix: use BuildM in PackageConfig
2021-08-21 20:17:48 -04:00
tydeu
56a78f6eeb
feat: use deps' extra lib targets when building parent bin
2021-08-20 01:48:10 -04:00
tydeu
8f7e32d09a
refactor: add build monad
2021-08-19 23:21:23 -04:00
tydeu
a371e181d5
refactor: more API tweaks
2021-08-19 12:13:29 -04:00
tydeu
8b74108f6e
refactor: remove FilesTarget
2021-08-19 12:05:44 -04:00
tydeu
28320f80ee
refactor: minor API tweaks
2021-08-19 12:05:28 -04:00
tydeu
0bfebc1975
refactor: reorganize Async.lean
2021-08-18 21:30:41 -04:00
tydeu
f9d6f57725
refactor: split Build into BuildModule and BuildPackage
2021-08-18 14:46:54 -04:00
tydeu
66a6246136
chore: fix typo
2021-08-18 12:48:58 -04:00
tydeu
81a84d21de
feat: add command to verify Lean version
2021-08-17 11:24:32 -04:00
tydeu
dd6634544d
misc: add shell scripts for timing Lake builds
2021-08-17 10:34:18 -04:00
tydeu
31abd420ad
chore: update Lean version
...
Some examples (ex. `hello`) may now segfault. See https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Problems.20when.20updating.20Lean/near/249599195 .
2021-08-17 10:33:15 -04:00
tydeu
d49c64453d
refactor: build with leanmake instead of leanpkg
2021-08-16 09:23:51 -04:00
tydeu
f977ee8b34
refactor: improve async abstraction
2021-08-15 20:41:55 -04:00
tydeu
2757e844dd
refactor: add trace abstraction
2021-08-15 20:13:17 -04:00
tydeu
c8b558a2d1
refactor: remove 'build' from Target/Trace/Task file names
2021-08-15 19:16:12 -04:00
tydeu
ddf02cb339
refactor: merge build target into lake target
2021-08-15 19:04:28 -04:00
tydeu
23dd052dc9
refactor: remove BuildTask
2021-08-15 17:14:13 -04:00
tydeu
c1f61d6716
feat add config setting for specificying extra lib targets
2021-08-15 16:12:45 -04:00
tydeu
4f75dd99d1
reefactor: improve async API
2021-08-09 05:04:38 -04:00
tydeu
d0fbc93143
refactor: improve Hash traces
2021-08-06 01:58:41 -04:00
tydeu
609ee22971
refactor: LeanTrace/Target -> LakeTrace/Target
2021-08-06 01:17:17 -04:00
tydeu
81d7511792
refactor: post-async Target API touch-ups
2021-08-06 00:44:46 -04:00
tydeu
859b04bf7f
refactor: generalize Target/ActiveTarget beyond IO
2021-08-05 00:45:50 -04:00
tydeu
aa1ca9c4b7
feat: improve Target API
2021-08-04 14:07:28 -04:00
tydeu
a541f2054e
refactor: IO BuildTarget task / protect pure
2021-08-04 01:31:47 -04:00
tydeu
ba52b36ef8
chore: more code cleanup
2021-08-01 18:46:48 -04:00
tydeu
3643b8e424
refactor: make Task and task a monad
2021-08-01 18:46:33 -04:00
tydeu
6a6afcd7c0
refactor: spawn ActiveBuildTarget from BuildTarget
2021-08-01 16:50:53 -04:00
tydeu
b8e85f40cd
refactor: move afterTarget* into ActiveBuildTarget
2021-08-01 15:40:11 -04:00
tydeu
2d78f4db36
feat: add non-activve targets
2021-08-01 15:17:43 -04:00
tydeu
a52d95b575
refactor: ActiveBuildTarget.buildTask -> task
2021-08-01 14:27:11 -04:00
tydeu
1f51241a8e
chore: minor code cleanup
2021-08-01 14:08:00 -04:00
tydeu
293c19d24f
feat: include Lean version in Lake usage header
2021-07-31 19:29:26 -04:00
tydeu
448cac6804
chore: bump Lean version
2021-07-28 16:30:48 -04:00
tydeu
ce1f2f4964
feat: add lake clean command
2021-07-28 14:01:44 -04:00
tydeu
d8ac18a807
refactor: add buildDir setting and make bin/lib/ir subdirs of it
2021-07-28 12:23:37 -04:00
tydeu
cce0b3cce5
refactor: minor example tweaks
2021-07-28 10:30:36 -04:00
tydeu
f06b1bbb5c
test: add bootstrap example
2021-07-28 10:20:42 -04:00
tydeu
38b260d60f
feat: setting to specify alt root dir for package
2021-07-28 09:52:08 -04:00
tydeu
1b5b4edec6
fix: throw error if external process fails
2021-07-28 09:43:38 -04:00
tydeu
29e75cedc6
refactor: add lean_packages to initial package .gitignore
2021-07-28 09:19:40 -04:00
tydeu
91d3df58cd
test: add git example
2021-07-28 09:10:14 -04:00
tydeu
bc8c39e802
feat: can depend on subdirectories of dependencies
2021-07-28 09:08:39 -04:00
tydeu
4ae14ac849
refactor: rename 'ext' example to 'ffi'
2021-07-27 07:24:45 -04:00
tydeu
1dabd00d4c
test: add new/init example/test
2021-07-26 07:48:49 -04:00
tydeu
bea059796f
fix: init git repo in package dir
...
Fixes leanprover/lake#1
2021-07-26 07:46:41 -04:00
tydeu
b730aacbc8
refactor: BuildTagret -> ActiveBuildTarget
2021-07-24 09:23:46 -04:00
tydeu
0dfd07ed9d
chore: add ext example to examples test
2021-07-24 09:08:43 -04:00
tydeu
54bdf64d25
test: add simple extension example
2021-07-24 08:40:46 -04:00
tydeu
0d288b9bd3
feat: add MTimeBuildTarget -> LeanTarget function
2021-07-24 08:40:33 -04:00
tydeu
5770529e09
feat: add non-leanc compile o/bin functions
2021-07-24 08:08:36 -04:00
tydeu
c3e602cedf
refactor: moreDepsTarget -> buildMoreDepsTarget
2021-07-24 07:37:39 -04:00
tydeu
67341f478d
refactor:: move some magic constants into defs
2021-07-24 07:36:58 -04:00
tydeu
53b95fb455
fix: actually use lib name in the file name
2021-07-17 13:28:40 -04:00
tydeu
81cb2f6ca8
refactor: use modToFilePath in srcRoot and oleanRoot
2021-07-17 13:27:33 -04:00
tydeu
e99d7aab95
refactor: default libName to moduleRoot and don't escape it
2021-07-17 13:09:23 -04:00
tydeu
9e5505b6ca
feat: add new and run commands
2021-07-17 13:02:39 -04:00
tydeu
93c9543976
feat: add convenience functions for constructing a LeanTrace
2021-07-15 13:04:31 -04:00
tydeu
b14eef6e06
refactor: split out top / lib / bin build from Build.lean
2021-07-15 12:50:54 -04:00
tydeu
3b2c91f396
refactor: functions for building a specified module root
2021-07-15 12:40:23 -04:00
tydeu
f8a31011a6
feat: add more package configuration settings
2021-07-15 12:21:52 -04:00
tydeu
31fa37dbfe
refactor: remove Monad Task instance (for now)
2021-07-14 14:53:52 -04:00
tydeu
e040804678
refactor: split task and trace from target into separate files
2021-07-14 13:35:42 -04:00
tydeu
3ef381bb6c
refactor: merge Proc into Compile and cleanup Build
2021-07-14 12:46:07 -04:00
tydeu
758021f03a
feat: add hash checking for builds
2021-07-13 20:11:15 -04:00
tydeu
115fdbea98
refactor: simplify mtime checking code
2021-07-13 16:18:42 -04:00
tydeu
4844f8c459
refactor: once again use to lean target mtime in fetch
2021-07-13 13:40:05 -04:00
tydeu
511f34fd53
refactor: simplify Compile.lean
2021-07-12 21:15:08 -04:00
tydeu
c08812e9e1
refactor: merge fetchLeanTarget into fetchAfterDirectLocalImports
2021-07-12 19:40:37 -04:00
tydeu
3b3beec0d4
refactor: clean up buildRBTop and related code
2021-07-11 19:00:51 -04:00
tydeu
d4e3a4f79e
fix: bin build now properly waits for dep libs
2021-07-10 23:02:31 -04:00
tydeu
3ad82dcc42
chore: minor code cleanup
2021-07-10 22:40:34 -04:00
tydeu
b290c1ad28
refactor: generalized buildModule and cleaned up `printPaths
2021-07-10 21:19:01 -04:00
tydeu
70d258049e
refactor: generalize mtime checking
2021-07-10 16:01:18 -04:00
tydeu
6161d7f2d9
refactor: generalize BuildTarget traces
2021-07-10 13:39:51 -04:00
tydeu
9ce5fa6a6d
refactor: generalize build error catching
2021-07-10 13:04:18 -04:00
tydeu
1ccebe9b89
chore: improve shell scripts
2021-07-10 12:36:13 -04:00
tydeu
d1674a6ba0
refactor: rename helloDeps test to deps
2021-07-10 12:23:20 -04:00
tydeu
9da32ce7eb
chore: add Packager test
2021-07-10 12:21:52 -04:00
tydeu
042353d862
feat: allow cli arguments to be passed to package.lean
2021-07-10 12:03:49 -04:00
tydeu
16534d3be6
chore: update Lean version
2021-07-09 21:03:16 -04:00
tydeu
ea4cbfae73
feat: deps build in parallel + lib/bin check mtime
2021-07-09 20:49:39 -04:00
tydeu
f97f69b749
refactor: BuildInfo -> BuildTarget
2021-07-09 00:36:46 -04:00
tydeu
a4622f61ca
doc: update help command text
2021-07-08 20:58:25 -04:00
tydeu
981db940e8
feat: build packages without make
2021-07-08 19:46:10 -04:00
tydeu
9034b6b79b
chore: bump to v2.0-pre
2021-07-08 17:42:17 -04:00
Mac Malone
22dc542445
Release 1.0
2021-06-14 01:42:16 -04:00
Mac Malone
9aa78a5361
More README edits
2021-06-14 01:36:19 -04:00
Mac Malone
f7a858c0de
Add search path heading to README
2021-06-14 01:08:35 -04:00
Mac Malone
b7b0217241
Bump Lean version
2021-06-14 01:08:05 -04:00
Mac Malone
2aa3c1e0cb
Add test script to hello example
2021-06-14 00:29:09 -04:00
Mac Malone
4532901112
Refactor helloDeps example to have two deps
2021-06-12 22:28:59 -04:00
Mac Malone
9138d37781
Fix dep lib separator
2021-06-12 22:27:19 -04:00
Mac Malone
c0d9917f7c
Update to Lean nightly 06-13
2021-06-12 22:01:17 -04:00
Mac Malone
f512a9a934
Auto link dep libs for bin (+ more pkg path helpers)
2021-06-12 21:34:34 -04:00
Mac Malone
ecfd65ffb7
Clean up buildModule code and integrate cycle fix
2021-06-12 20:00:07 -04:00
Mac Malone
93f5368162
Rename build state/result to BuildState/BuildResult
2021-06-11 17:15:31 -04:00
Mac Malone
9b1d958f9c
Fixed a typo in the README
2021-06-08 17:40:02 -04:00
Mac Malone
68f0eb16bd
Minor LeanConfig code cleanup
2021-06-08 17:18:27 -04:00
Mac Malone
6fad405294
Intelligently initialize Lean search path
2021-06-08 17:17:58 -04:00
Mac Malone
7791b49be9
Add shell scripts for building Lake and its examples
2021-06-07 22:23:54 -04:00
Mac Malone
96870779a2
Add Lake build/run instructions to README
2021-06-07 17:03:51 -04:00
Mac Malone
af7e167dea
Bump to v1.0-pre
2021-06-07 06:00:18 -04:00
Mac Malone
8c39a65609
Move .lake-lock into the build directory
2021-06-07 05:55:13 -04:00
Mac Malone
c5c46798fb
Extend README
2021-06-07 05:46:08 -04:00
Mac Malone
6fc398133d
Rename Leanpkg2 to Lake
2021-06-07 05:42:42 -04:00
Mac Malone
12537427c2
Fix some errors when running leanpkg2 in executable form
2021-06-07 05:30:17 -04:00
Mac Malone
7770d4b421
Removed leftover hack for TOML
2021-06-07 02:38:23 -04:00
Mac Malone
76183aa6d1
Remove TOML code
2021-06-06 23:30:32 -04:00
Mac Malone
0f6b07e434
Remove unused examples/helloDeps/a/leanpkg.toml
2021-06-06 23:06:19 -04:00
Mac Malone
2ba39f56f0
The solved dependency list no longer includes the root package
2021-06-06 23:04:52 -04:00
Mac Malone
6317ab22e7
Only build dependency lib if bin is passed to leanpkg buld
2021-06-06 22:50:40 -04:00
Mac Malone
99d458c646
Update init to produce package.lean
2021-06-06 21:56:58 -04:00
Mac Malone
d066872549
CLI now uses configuration from package.lean'
2021-06-06 21:40:11 -04:00
Mac Malone
8efd56d131
Properly lowercase Package.lean configurations
2021-06-06 19:33:12 -04:00
Mac Malone
6b999dcb21
Refactored away the old notion of a manifest
2021-06-06 19:27:18 -04:00
Mac Malone
3cc0c3e370
Package.lean => package.lean
2021-06-06 16:09:26 -04:00
Mac Malone
07e804ad16
Cleanup TOML manifest code
2021-06-03 16:58:55 -04:00
Mac Malone
3ca6b0bf51
Minor code style cleanup
2021-06-03 15:17:46 -04:00
Mac Malone
bf15f71568
Removed Manifest.path
2021-06-02 18:55:47 -04:00
Mac Malone
158838bf63
Fix local depdir calculation
2021-06-02 18:25:30 -04:00
Mac Malone
9544f3dad8
Refactor materlize / git code
2021-06-02 18:19:31 -04:00
Mac Malone
f2041789b7
Renamed Manifest.lean to Pakcage.lean
2021-06-02 16:02:22 -04:00
Mac Malone
d5d8ff588a
Solver now returns Package
2021-06-02 15:21:36 -04:00
Mac Malone
a462864d78
Add cleaner script for 'helloDeps' example
2021-06-02 15:21:07 -04:00
Mac Malone
436d3213de
Now built off Lean master
2021-05-30 17:30:33 -04:00
Mac Malone
543656c24b
Merge Configure into Build
2021-05-29 22:57:24 -04:00
Mac Malone
ef0135ac9e
Add working example expackage with a (local) dependency
2021-05-29 21:29:33 -04:00
Mac Malone
44b9ad2a30
Assorted code cleanup and reogranization
2021-05-29 12:42:05 -04:00
Mac Malone
ea9382643e
Builds with buildModules now work as well
2021-05-29 11:27:31 -04:00
Mac Malone
82b368e838
Add README
2021-05-29 09:07:48 -04:00
Mac Malone
84ae7466a4
Update Authors
2021-05-29 09:07:42 -04:00
Mac Malone
93732bc7db
Add LICENSE
2021-05-29 09:02:26 -04:00
Mac Malone
404d32c730
Port over Leanpkg and get an example building
2021-05-29 08:54:48 -04:00
Mac Malone
a24d7d593a
Initial Commit
2021-05-28 17:13:55 -04:00