Joe Hendrix
d4b33d0baf
chore: fix set union test
2024-02-14 17:28:23 -08:00
Joe Hendrix
e5601f02f0
chore: upstream set notation
...
This omits set literal syntax `{ ... }` until a suitable implementation
can be created.
2024-02-14 16:53:10 -08:00
Scott Morrison
329e00661a
chore: upstream Std.Util.ExtendedBinders ( #3320 )
...
This is not a complete upstreaming of that file (it also supports `∀ᵉ (x
< 2) (y < 3), p x y` as shorthand for `∀ x < 2, ∀ y < 3, p x y`, but I
don't think we need this; it is used in Mathlib).
Syntaxes still need to be made built-in.
---------
Co-authored-by: Leonardo de Moura <leomoura@amazon.com >
2024-02-14 11:36:00 +00:00
Joe Hendrix
8b0dd2e835
chore: upstream Std.Logic ( #3312 )
...
This will collect definitions from Std.Logic
---------
Co-authored-by: David Thrane Christiansen <david@davidchristiansen.dk >
Co-authored-by: Scott Morrison <scott.morrison@gmail.com >
2024-02-14 09:40:55 +00:00
Leonardo de Moura
88a5d27d65
chore: upstream run_cmd and fixes bugs ( #3324 )
...
Co-authored-by: Scott Morrison <scott.morrison@gmail.com >
2024-02-14 04:15:28 +00:00
Scott Morrison
232b2b6300
chore: upstream replace tactic ( #3321 )
...
Co-authored-by: Leonardo de Moura <leomoura@amazon.com >
2024-02-14 01:53:25 +00: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
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
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
dca5da6b18
chore: update RELEASES.md
2022-03-07 17:28:51 +01:00
Jonathan Coates
11cce61e4d
chore: Clean up LSP folding a little
...
- Wait for all terms to be elaborated before showing folding regions.
May want to change this to support partial results.
- Use .span to extract import statements, rather than mutually
recursive functions.
- Some tiny other bits of cleanup
2022-03-07 17:23:35 +01:00
Jonathan Coates
04e60cebd1
feat: LSP code folding support
...
The following constructs are foldable:
- Sections and namespaces
- Blocks of import/open statements
- Multi-line commands (so mostly definitions)
- Mutual definitions
- Module-level doc comments
- Top-level definition doc comments
Fixes #1012
2022-03-07 17:23:35 +01:00
Sebastian Ullrich
dc8367d1f5
chore: CI: adjust nightly release time
2022-03-07 15:39:58 +01:00
Sebastian Ullrich
f2d5470f19
feat: allow interpretation of constants initialized by native code
2022-03-07 10:59:49 +01:00
Sebastian Ullrich
ff097e952f
chore: link orphan file
2022-03-07 10:59:49 +01:00
Leonardo de Moura
dddfb65660
test: use notation
2022-03-06 19:28:01 -08:00
Leonardo de Moura
7c5604996a
test: unfoldr
2022-03-06 19:26:04 -08:00
Leonardo de Moura
619186b2a8
feat: only use set_option codegen false where needed
2022-03-06 19:15:05 -08:00
Leonardo de Moura
10bccfe501
test: remove workaround
2022-03-06 13:58:42 -08:00
Leonardo de Moura
46d1111d3d
fix: typo at unfoldBothDefEq
2022-03-06 13:54:42 -08:00
Leonardo de Moura
ff0f3bfc61
fix: interaction between overloaded notation and delayed coercions
...
The new test exposes this issue.
2022-03-06 09:49:15 -08:00
Leonardo de Moura
e9909020e8
test: add delay helper contructor
2022-03-06 08:08:51 -08:00
Leonardo de Moura
ad4b1796a0
chore: update stage0
2022-03-06 08:01:23 -08:00
Leonardo de Moura
b664a93d8e
fix: a match application is stuck if one of the discriminants contain metavariables
2022-03-06 07:51:09 -08:00
Leonardo de Moura
8bcaafb28b
fix: universe metavariables should not be taken into account at getKeyArgs
2022-03-06 07:50:19 -08:00
Leonardo de Moura
b105c006a5
fix: PrefixTree WellFormed type
...
`β` is a parameter.
2022-03-06 07:30:34 -08:00
Leonardo de Moura
1450a86c4d
feat: include types in the "ambiguous, possible interpretations" error message
2022-03-06 07:26:31 -08:00
Leonardo de Moura
d9a6680536
doc: describe the auto implicit chaining in the release notes
2022-03-05 17:45:56 -08:00
Leonardo de Moura
d3b2028a05
feat: add Fin.succ
2022-03-05 17:36:38 -08:00
Leonardo de Moura
3f9c854194
feat: auto local implicit chaining
2022-03-05 17:30:15 -08:00
Leonardo de Moura
f7130d8e07
refactor: use CPS at addAutoBoundImplicits
...
We want to be able to declare new local variables there.
2022-03-05 16:24:33 -08:00
Leonardo de Moura
22731c02b0
fix: auto implicit locals in inductive families
2022-03-05 15:47:20 -08:00
Leonardo de Moura
613cf19509
fix: discrimination trees and "stuck" terms
...
See comments and new test.
2022-03-05 15:12:20 -08:00
Leonardo de Moura
d39102f865
fix: smart unfolding for reducible definitions
...
When `TransparencyMode.reducible`, smart unfolding for reducible
definitions was not being used.
2022-03-05 14:42:47 -08:00
Leonardo de Moura
9e76cd7d65
fix: toName function at elabAppFnId
...
closes #1038
2022-03-04 16:56:02 -08:00
Leonardo de Moura
a670ed1e2d
fix: use withoutErrToSorry at apply
...
closes #1037
2022-03-04 14:36:10 -08:00
Leonardo de Moura
a2457110db
chore: update RELEASES.md
2022-03-03 20:05:58 -08:00
Leonardo de Moura
82b056aa75
chore: fix test
2022-03-03 19:53:35 -08:00
Leonardo de Moura
8b248e2d8c
feat: elaborate for h : x in xs do ... notation
2022-03-03 19:52:26 -08:00
Leonardo de Moura
ef38c82c77
fix: missing hypotheses at List.sizeOf_lt_of_mem
2022-03-03 19:52:05 -08:00
Leonardo de Moura
99677823c3
fix: ForIn' instance binder annotations
2022-03-03 19:51:45 -08:00
Leonardo de Moura
b4ddcd600b
chore: fix test
2022-03-03 19:15:07 -08:00
Leonardo de Moura
538eee0b6a
chore: update stage0
2022-03-03 19:11:27 -08:00
Leonardo de Moura
5d2420b1c9
chore: add auxiliary notation for ForIn'
2022-03-03 19:10:24 -08:00
Leonardo de Moura
d8ee03c1bb
feat: add ForIn' instance that is similar to ForIn but provides a proof that the iterated elements are in the collection
2022-03-03 19:05:27 -08:00
Leonardo de Moura
7462e3ad52
chore: update stage0
2022-03-03 18:29:04 -08:00
Leonardo de Moura
92937b3aba
feat: add for h : x in xs do ... notation
...
The idea is to have `h : x \in xs`.
This commit just adds the parser.
2022-03-03 18:27:40 -08:00
Leonardo de Moura
51ec4522fe
fix: documentation
2022-03-03 18:18:37 -08:00
Leonardo de Moura
e1424653b9
chore: remove workaround
2022-03-03 18:16:54 -08:00
Leonardo de Moura
0847c59667
chore: update stage0
2022-03-03 18:13:34 -08:00
Leonardo de Moura
b745c4f51a
fix: recursive overapplication at WF/Fix.lean
2022-03-03 18:13:34 -08:00
Leonardo de Moura
f306c9b69b
fix: split tactic
...
`unreachable!` assertions at `simpIfLocalDecl` and
`simpTargetLocalDecl` were reachable.
2022-03-03 18:13:34 -08:00
Leonardo de Moura
f4e98be163
fix: use whnfD at mkNoConfusion
...
The `split` tactic failed at `Array.sizeOf_lt_of_mem` because the type
in the equality is `Id Bool` when we write `true` instead of `id true`.
2022-03-03 18:13:34 -08:00
Leonardo de Moura
337c55f322
fix: missing import
2022-03-03 18:13:34 -08:00
Leonardo de Moura
4657d47c16
chore: fix tests
2022-03-03 18:13:34 -08:00
Leonardo de Moura
aeb9b2fb8c
chore: add Membership instance for Array
2022-03-03 18:13:34 -08:00
Leonardo de Moura
fd519401ff
feat: add Membership instance for List
...
and the theorem `a ∈ as -> sizeOf a < sizeOf as`.
We will use theorems like this one to improve the `decreasing_tactic`.
2022-03-03 18:13:21 -08:00
Leonardo de Moura
022a4d5ac1
feat: add ∈ notation
2022-03-03 17:18:51 -08:00
Leonardo de Moura
f629be745b
chore: add Nat.le_refl as simp theorem
2022-03-03 17:18:11 -08:00
Leonardo de Moura
89c3820781
chore: naming convention
2022-03-03 17:17:51 -08:00
Leonardo de Moura
5845002e8c
feat: use WF at anyM
2022-03-03 16:43:05 -08:00
Leonardo de Moura
3fa001911b
feat: add ite_self simp theorem
2022-03-03 11:55:05 -08:00
Leonardo de Moura
e4fa3e5d83
chore: add link to RELEASES.md
2022-03-03 11:31:24 -08:00
Leonardo de Moura
30409fc73d
chore: add example to RELEASES.md
2022-03-03 11:28:37 -08:00
Leonardo de Moura
02d7cedba8
chore: remove unnecessary termination_by annotations
2022-03-03 11:24:06 -08:00
Leonardo de Moura
35c587afbf
chore: update stage0
2022-03-03 11:17:35 -08:00
Leonardo de Moura
137c70f055
chore: add LinearArith/Nat/Solver.lean
2022-03-03 11:13:40 -08:00
Leonardo de Moura
043d338271
feat: add getForbiddenByTrivialSizeOf
2022-03-03 11:12:32 -08:00
Leonardo de Moura
1f2618adba
feat: delaborate cond using bif-then-else
2022-03-03 07:41:39 -08:00
Leonardo de Moura
8dd76868ff
test: plan for supporting combinators (e.g., List.foldl) in WF recursion
2022-03-02 15:18:25 -08:00
Leonardo de Moura
e091e7fb30
test: simplify proofs
2022-03-02 13:57:43 -08:00
Leonardo de Moura
4ba97c22ec
test: proving properties of mutually defined functions
2022-03-02 13:40:19 -08:00
Leonardo de Moura
1155d52702
chore: update TODO comment
2022-03-02 12:51:46 -08:00
Leonardo de Moura
14ef4b4304
test: add WF test that exposes the need for better error messages
2022-03-02 12:47:19 -08:00
Leonardo de Moura
093ab49b7f
feat: improve generateElements a bit
2022-03-02 11:58:47 -08:00
Leonardo de Moura
52403fca83
feat: add support for guessing (very) simple WF relations
...
There are a lot of TODOs, but it is already useful for simple cases.
closes #847
2022-03-02 11:52:00 -08:00
Leonardo de Moura
99204d2226
refactor: modify elabWFRel to CPS
2022-03-02 11:52:00 -08:00
Leonardo de Moura
88a2645a5f
refactor: add Lean/Meta/Tactic/LinearArith/Basic.lean
2022-03-02 11:52:00 -08:00
Leonardo de Moura
f171286e74
refactor: add src/Lean/Meta/Tactic/LinearArith/Nat
2022-03-02 11:52:00 -08:00
Sebastian Ullrich
c9713b1b69
fix: setExpectedFn
2022-03-02 16:28:53 +01:00
Leonardo de Moura
7eba003f53
chore: style
2022-03-01 18:54:10 -08:00
Leonardo de Moura
ca5696330c
doc: update RELEASES.md
2022-03-01 18:51:15 -08:00
Leonardo de Moura
1e205d635e
fix: bug at wfRecursion
...
"After compilation" attributes were being applied to soon when we did
not need to generate auxiliary functions.
2022-03-01 17:48:06 -08:00
Leonardo de Moura
bb2de82cb6
chore: update stage0
2022-03-01 17:47:40 -08:00
Leonardo de Moura
2daf8d62ac
test: LazyList with Thunk
2022-03-01 16:55:56 -08:00
Leonardo de Moura
eac5bab429
chore: helper theorem
2022-03-01 16:54:25 -08:00
Leonardo de Moura
5dba98327c
chore: update stage0
2022-03-01 16:41:28 -08:00
Leonardo de Moura
140559c447
feat: sizeOf for Thunks and Unit -> a
2022-03-01 16:40:11 -08:00
Leonardo de Moura
de51160929
fix: core library
2022-03-01 13:36:24 -08:00
François G. Dorais
e84699f130
fix: remove unnecessary hypotheses
2022-03-01 13:31:01 -08:00
Leonardo de Moura
e85abb6292
chore: update stage0
2022-03-01 13:25:54 -08:00
Leonardo de Moura
89e0de9fbb
chore: use WF compiler to define Nat.mod and Nat.div
2022-03-01 13:08:59 -08:00
Leonardo de Moura
f16d8acb29
feat: eager normalization for proofs by reflection
2022-03-01 12:43:55 -08:00
Leonardo de Moura
0f796ac804
chore: avoid heterogeneous polymorphic operations and add add hugeFuel at Linear.lean
2022-03-01 11:25:15 -08:00
Leonardo de Moura
9bd82b798a
chore: use bif instead of if at Linear.lean
2022-03-01 10:55:03 -08:00
Leonardo de Moura
0158c2eeb7
chore: update stage0
2022-03-01 09:03:20 -08:00
Leonardo de Moura
da55789c26
feat: add a proper BEq instance for Nat
2022-03-01 09:01:08 -08:00
Leonardo de Moura
85a1a5233b
chore: workaround for compiler closed term extraction issue
2022-03-01 09:01:08 -08:00
Leonardo de Moura
5948003601
feat: add support for constant folding Nat.beq, Nat.blt, and Nat.ble
2022-03-01 09:01:08 -08:00
Gabriel Ebner
a7c9d2735f
fix: do not apply eta for structures in Prop
...
The eta-expansion contains invalid projections, and the eta-rule is
subsumed by proof irrelevance anyhow.
2022-03-01 09:00:46 -08:00
Gabriel Ebner
3746005f5f
fix: reject projection (_ : ∃ x, p).2
...
The inferred type of this projection does not even type check, in general.
2022-03-01 09:00:46 -08:00
Leonardo de Moura
0f06fbf648
feat: LawfulBEq must be reflexive
2022-02-28 19:27:51 -08:00
Leonardo de Moura
ecca71f0f5
chore: update stage0
2022-02-28 18:39:24 -08:00
Leonardo de Moura
7a49f71328
feat: add bif notation for cond function
2022-02-28 18:34:59 -08:00
Leonardo de Moura
4e310ac63d
feat: improve SimpTheorem preprocessor
2022-02-28 18:27:36 -08:00
Leonardo de Moura
e8fb0c96ac
feat: add helper theorems
2022-02-28 18:06:02 -08:00
Leonardo de Moura
5ddb3c3435
feat: faster PolyCnstr.combine
2022-02-28 17:24:26 -08:00
Leonardo de Moura
adf3510e08
chore: increase maxHeartbeats default values
...
We now increase the number of heartbeats at `expr_eq_fn`. Thus, the
old default values are too small.
2022-02-28 15:44:08 -08:00
Leonardo de Moura
b5f28239af
feat: add List helper theorems
2022-02-28 15:16:13 -08:00
Leonardo de Moura
998a3de747
chore: update stage0
2022-02-28 15:13:38 -08:00
Leonardo de Moura
3005bab970
feat: helper theorem and tactic for WF
2022-02-28 15:11:00 -08:00
Leonardo de Moura
55bc048656
feat: make sure inequalities are normalized when no monomial was cancelled
2022-02-28 15:10:39 -08:00
Leonardo de Moura
e455df9c95
fix: use a def-eq aware mapping at toLinearExpr
...
The new test exposes the problem fixed by this commit.
In the termination proof we have two `sizeOf xs` terms that are not
syntactically identical (only definitional equal) because the
instances are different.
2022-02-28 13:46:36 -08:00
Leonardo de Moura
802922ddaf
feat: add helper sizeOf simp theorems
2022-02-28 12:28:37 -08:00
Leonardo de Moura
2ba3205f94
feat: add Prod.Lex.right'
2022-02-28 11:19:28 -08:00
Leonardo de Moura
10657f5e81
feat: add trace <string> tactic
2022-02-28 11:16:42 -08:00
Leonardo de Moura
63a5cd5056
fix: trace_state messages should not be lost during backtracking
2022-02-28 11:07:41 -08:00
Leonardo de Moura
d89fa9d4c3
fix: endPos missing at trace messages
2022-02-28 10:55:45 -08:00
Leonardo de Moura
b7d2239ca4
chore: update stage0
2022-02-28 08:32:24 -08:00
Leonardo de Moura
46b97c2b70
fix: ExceptT.run_lift
2022-02-28 07:25:00 -08:00
Sebastian Ullrich
53d313c74c
chore: fix function name
2022-02-28 16:16:22 +01:00
Leonardo de Moura
c5fdd54cd8
feat: support for acyclicity at unifyEqs
...
closes #1022
2022-02-27 10:03:40 -08:00
Leonardo de Moura
89f88b1caa
feat: simplify nested arith expressions
2022-02-27 09:01:52 -08:00
Leonardo de Moura
c5baf759e2
fix: we must use addAsAxiom before getFixedPrefix
...
`getFixedPrefix` uses `isDefEq`, and it will fail if it needs to
retrieve the type of one of the recursive function being defined.
2022-02-27 09:01:52 -08:00
Leonardo de Moura
2c00823da9
test: simp_arith
2022-02-27 09:01:52 -08:00
Sebastian Ullrich
6c6f66b812
feat: propagate actual file name in file worker
...
Also stop recreating the FileMap for every command, that's quadratic!
2022-02-27 10:33:27 +01:00
Leonardo de Moura
90055fb7d4
chore: clarify error message at decreasing_tactic
2022-02-26 10:15:05 -08:00
Leonardo de Moura
f22b48b226
fix: display all remaining goals at fail tactic error message
2022-02-26 09:49:06 -08:00
Leonardo de Moura
f7f886dcb2
feat: improve error message for decreasing_tactic failures
2022-02-26 09:42:59 -08:00
Leonardo de Moura
cabd599de1
feat: add fail tactic
2022-02-26 09:31:19 -08:00
Leonardo de Moura
0242eb7ede
feat: use simp (config := { arith := true }) at decreasing_tactic
...
closes #262
2022-02-26 09:12:34 -08:00
Leonardo de Moura
ff76958959
feat: basic support for linear Nat arithmetic at simp
2022-02-26 08:58:32 -08:00
Leonardo de Moura
41a5c2bce4
feat: add support for negation at simpCnstr?
2022-02-25 18:30:09 -08:00
Leonardo de Moura
5030e613a2
feat: add isSimpCnstrTarget
2022-02-25 17:18:50 -08:00
Leonardo de Moura
7217ee7754
fix: GE.ge and GT.gt support at simpCnstr?
2022-02-25 17:12:27 -08:00
Leonardo de Moura
812cc72285
chore: add helper theorems
2022-02-25 17:04:04 -08:00
Leonardo de Moura
0681d818ec
chore: add helper function for simp
2022-02-25 16:42:41 -08:00
Leonardo de Moura
38da48c5cf
refactor: LinearArith/Basic.lean => LinearArith/Solver.lean
2022-02-25 16:35:36 -08:00
Leonardo de Moura
cd710e903e
chore: update stage0
2022-02-25 16:32:03 -08:00
Leonardo de Moura
77dda12bc9
chore: add Simp.Config.arith option
2022-02-25 16:30:44 -08:00
Leonardo de Moura
3f636b9f83
feat: add Lean.Meta.Linear.Nat.simpCnstr?
2022-02-25 16:27:21 -08:00
Leonardo de Moura
f7fd706973
chore: missing import
2022-02-25 16:20:26 -08:00
Leonardo de Moura
346930af9d
feat: add ExprCnstr.eq_of_toNormPoly_eq
2022-02-25 14:55:20 -08:00
Leonardo de Moura
b8bed6fb5c
feat: add LawfulBEq class
2022-02-25 13:35:08 -08:00
Leonardo de Moura
3b130ee42f
feat: add Poly.toExpr
2022-02-25 12:31:30 -08:00
Leonardo de Moura
7d8cb84834
chore: update stage0
2022-02-25 08:50:05 -08:00
Leonardo de Moura
049273afee
fix: add workarounds to code generator
...
The issue is only going to be properly fixed when we rewrite `csimp`
in Lean. The `csimp` performs transformations that do not preserve
typability, but it also uses the kernel `infer_type` which assumes the
input is type correct. In the new `csimp`, we must have a different
`infer_type` which returns an `Any` type in this kind of situation.
The workaround in this commit simply disables optimizations when
`infer_type` fails. It does not fix all occurrences of this problem,
but the two places that issue #1030 triggered.
closes #1030
2022-02-25 08:47:56 -08:00
Leonardo de Moura
4f7067fe7f
fix: substEqs may close input goal
...
closes #1029
2022-02-25 08:07:23 -08:00
Leonardo de Moura
82e3789604
fix: run_lift type
2022-02-25 07:49:34 -08:00
Leonardo de Moura
7920db9521
feat: check for invalid projections during elaboration
...
It produces a better error message than the one produced by the
kernel.
2022-02-25 07:43:37 -08:00
Leonardo de Moura
04b93fc725
chore: fix invalid proof
2022-02-25 07:24:02 -08:00
Leonardo de Moura
0611eb84cc
chore: update stage0
2022-02-25 07:22:59 -08:00
Leonardo de Moura
c9471ea029
fix: invalid proof
2022-02-25 07:17:31 -08:00
Leonardo de Moura
db38bc4043
fix: missing check at infer_proj
...
We should not allow `h.1` if `h` is a proposition and the result is
not. The recursor for `h`'s type can only eliminate into `Prop`.
2022-02-25 07:15:34 -08:00
Leonardo de Moura
622995b2c7
chore: style
2022-02-24 17:57:21 -08:00
Leonardo de Moura
e04ad112b2
fix: store levelNames in the SavedContext
2022-02-24 17:47:26 -08:00
Leonardo de Moura
be2e2cb70e
chore: adjust proofs affected by update stage0
2022-02-24 17:20:17 -08:00
Leonardo de Moura
7480670c6a
chore: update stage0
2022-02-24 17:18:42 -08:00
Leonardo de Moura
2961e9cbf0
fix: heuristic for deciding which additional propositions must be included in equality theorems
2022-02-24 17:17:07 -08:00
Leonardo de Moura
bdea43a52a
feat: while and repeat macros
2022-02-24 16:26:07 -08:00
Leonardo de Moura
f7f04483b1
feat: add src/Lean/Meta/Tactic/LinearArith/Nat.lean
2022-02-24 15:24:59 -08:00
Leonardo de Moura
bd3ad35a1c
fix: we may get False in unreachable branches
2022-02-24 15:24:07 -08:00
Leonardo de Moura
8131aa5a64
chore: add simp theorem heq_eq_eq
2022-02-24 13:45:34 -08:00
Leonardo de Moura
b134b9a3a4
chore: move isNatProjInst
2022-02-24 13:45:34 -08:00
Leonardo de Moura
a430b2ad71
chore: add copyright
2022-02-24 13:45:34 -08:00
Leonardo de Moura
05be43455a
feat: add src/Init/Data/Nat/Linear.lean
2022-02-24 13:45:17 -08:00
Leonardo de Moura
43c2169f78
fix: when performing contextual simplification, and arrow may become a dependent arrow
...
fixes #1024
2022-02-23 18:43:32 -08:00
Leonardo de Moura
49c64040a2
feat: add support for HEq at injections tactic
2022-02-23 17:31:17 -08:00
Leonardo de Moura
07d1ec1926
fix: simp_all was "self-simplifying" simplified hypotheses
...
fixes #1027
2022-02-23 16:48:28 -08:00
Leonardo de Moura
16b8800607
chore: fix tests
2022-02-23 16:30:27 -08:00
Leonardo de Moura
0125db40a2
fix: remove [..] annotation from if simp theorems
...
fixes #1025
2022-02-23 16:28:12 -08:00
Leonardo de Moura
3e0ea7fbae
fix: use instantiateMVars before invoking pure function findIfToSplit
2022-02-23 16:25:33 -08:00
Leonardo de Moura
a1366fcb3b
chore: cleanup
2022-02-23 16:24:42 -08:00
Leonardo de Moura
c491659970
feat: improve split tactic error message
2022-02-23 16:00:42 -08:00
Leonardo de Moura
902e60c480
feat: add Format.isEmpty
2022-02-23 13:34:25 -08:00
Leonardo de Moura
52b53ab7a2
fix: heuristic for generating equation theorem types
...
closes #1026
2022-02-23 13:10:30 -08:00
Leonardo de Moura
2340f1b9bd
feat: add isBRecOnRecursor
2022-02-23 13:09:29 -08:00
Leonardo de Moura
15546fbc48
feat: add Expr.findExt?
2022-02-23 12:32:17 -08:00
Leonardo de Moura
1ac9c1263b
test: add helper theorems
2022-02-23 11:52:03 -08:00
Leonardo de Moura
dbe9bf61c5
fix: unfold auxiliary theorems created by decreasing_tactic
2022-02-23 09:02:23 -08:00
Leonardo de Moura
4794b9709f
feat: improve equation theorem and match-splitter generation at MatchEqns.lean
2022-02-22 17:43:42 -08:00
Leonardo de Moura
52ff840321
feat: support for HEq at injection
2022-02-22 17:24:11 -08:00
Leonardo de Moura
c9f8ec71df
fix: invalid rewrite when proving equation theorems for declaration using well-founded recursion
2022-02-22 16:38:51 -08:00
Leonardo de Moura
d36027d2fa
test: add Certificate.of_combine_isUnsat
2022-02-22 16:04:23 -08:00
Leonardo de Moura
24249fecd3
feat: helper simp theorems
2022-02-22 16:03:36 -08:00
Leonardo de Moura
8d6750469e
chore: helper Nat theorems
2022-02-22 14:26:50 -08:00
Leonardo de Moura
77fc0d3223
test: cleanup
2022-02-22 07:23:07 -08:00
Leonardo de Moura
c932d9d33c
test: combine two inequalities
2022-02-21 15:13:37 -08:00
Leonardo de Moura
c73d177c94
perf: simpH? at MatchEqns.lean
2022-02-21 12:04:03 -08:00
Leonardo de Moura
0e40c63292
chore: fix typo
2022-02-21 10:55:38 -08:00
Leonardo de Moura
e9ee8ee86f
test: add cancelation theorems for <= and <
2022-02-21 08:49:50 -08:00
Leonardo de Moura
7f3a3138d0
feat: helper Nat theorems
2022-02-21 08:49:50 -08:00
Sebastian Ullrich
d39c23f061
feat: quot precheck for →
2022-02-21 10:14:39 +01:00
Leonardo de Moura
0986696758
test: add cancelation example
2022-02-20 17:35:33 -08:00
Leonardo de Moura
a8427702e8
test: reverse direction for cancelation procedure
2022-02-20 17:03:11 -08:00
Leonardo de Moura
33b1d2fd98
fix: preserve arrow binder names and info at simp
...
We use the idiom `revert; simp; ...; intro` in a few places. Some of
the reverted hypotheses manifest themselves as arrows in the target.
Before this commit, `simp` would lose the binder names and info when
simplifying an arrow, and we would get inaccessible names when
reintroducing them.
2022-02-20 16:27:40 -08:00
Leonardo de Moura
4ccab41819
test: proof by reflection example
2022-02-20 10:11:40 -08:00
Leonardo de Moura
cf0f7a30c4
test: add Monomials.cancel
2022-02-19 21:29:33 -08:00
Leonardo de Moura
ba16903205
feat: add helper theorems
2022-02-19 21:25:44 -08:00
Leonardo de Moura
855b71299f
test: arith by reflection
2022-02-19 17:54:32 -08:00
Leonardo de Moura
193859c72c
feat: add helper theorems
2022-02-19 17:53:54 -08:00
Leonardo de Moura
7a13eaea8d
chore: update stage0
2022-02-19 08:11:17 -08:00
Leonardo de Moura
7a81589c49
feat: improve "constant approximation" heuristic used at isDefEq
2022-02-19 08:09:31 -08:00
Leonardo de Moura
19bcb5fb31
feat: add Array.popWhile and Array.takeWhile
2022-02-19 07:04:52 -08:00
Leonardo de Moura
a4d6cbfedd
feat: improve match elaborator
2022-02-19 06:12:21 -08:00
Leonardo de Moura
f64f563936
chore: fix comment
2022-02-19 06:11:53 -08:00
Leonardo de Moura
e61d0be561
feat: isolate fixed prefix at well-founded recursion
...
closes #1017
2022-02-18 10:40:32 -08:00
Leonardo de Moura
75e771b6e8
feat: add support for fixed argument prefix at mkFix and elabWFRel
...
This is needed for #1017
TODO: `addNonRecPreDefs` and equation theorems
2022-02-18 07:59:32 -08:00
Leonardo de Moura
70312191f7
feat: make sure packDomain and packMutual ignore the fixed arguments
...
TODO: adapt `elabWFRel`, `mkFix`, and etc.
This is needed for #1017
2022-02-17 17:43:06 -08:00
Leonardo de Moura
9ee529e5ce
fix: use PSum instead of Sum when using well-founded recursion
...
See new test for example that did not work with `Sum` because type
alpha was `Sort u`.
2022-02-17 16:14:34 -08:00
Leonardo de Moura
4a0ae8326c
feat: compute the fixed prefix size for mutually recursive definitions
2022-02-17 14:12:05 -08:00
Leonardo de Moura
3f0be7901e
chore: update stage0
2022-02-17 10:52:34 -08:00
Leonardo de Moura
dedb6ee01b
fix: skip value if type is computationally irrelevant
2022-02-17 10:41:16 -08:00
Leonardo de Moura
ba0904060b
chore: missing trace_pp_expr
2022-02-17 10:40:21 -08:00
Leonardo de Moura
4ed5c8405b
feat: improve IR checker error messages
2022-02-17 09:51:05 -08:00
Leonardo de Moura
6b1297fe85
chore: update stage0
2022-02-16 13:52:28 -08:00
Xubai Wang
ca521e1188
feat: add position to mod doc
2022-02-16 13:50:19 -08:00
Leonardo de Moura
373a64ee09
test: for isNoncomputable
2022-02-16 13:37:49 -08:00
Leonardo de Moura
9d6c26a4a6
chore: update stage0
2022-02-16 13:33:33 -08:00
Leonardo de Moura
e1d9dc4b38
feat: store noncomputable declarations
2022-02-16 13:33:02 -08:00
Leonardo de Moura
31e90c8f65
chore: update stage0
2022-02-16 13:22:44 -08:00
Leonardo de Moura
4ba1e0ad4b
feat: add isNoncomputable function for querying whether a given declaration has been marked as "noncomputable" by users
2022-02-16 13:20:31 -08:00
Leonardo de Moura
ad5099ec3c
fix: mkLetRecClosureFor for nested let-recs
...
closes #1020
2022-02-16 12:44:02 -08:00
Leonardo de Moura
86328bcb9f
feat: tail recursive List.iota and [csimp] theorem
2022-02-16 11:25:46 -08:00
Sebastian Ullrich
65d00098c7
chore: fix List.get use ( leanprover/lake#56 )
2022-02-16 13:21:33 -05:00
Leonardo de Moura
d46d246cd9
fix: documentation
2022-02-15 16:19:35 -08:00
Leonardo de Moura
80bb1454c5
doc: add example to RELEASES.md
2022-02-15 16:09:36 -08:00
Leonardo de Moura
3f4d8f370a
fix: backtrack InfoTree when backtracking at the discriminant refinement method
...
This commit addresses issue described at https://github.com/leanprover/lean4/issues/1018#issuecomment-1040597212
closes #1018
2022-02-15 16:01:09 -08:00
Leonardo de Moura
fd9165415e
feat: try to preserve variable names during discriminant refinement
...
This fixes second issue at #1018
2022-02-15 15:54:03 -08:00
Leonardo de Moura
56cdacfc28
feat: allow synthetic holes to be used as patterns
...
They are useful for getting meaningful pattern variable names when the hole
is not an inaccessible pattern. See new test.
We are going to use this feature to address issue 2 at #1018 .
2022-02-15 15:34:14 -08:00
Leonardo de Moura
da1a327d13
chore: remove old comment
2022-02-15 15:01:26 -08:00
Leonardo de Moura
1f230c336b
chore: style
2022-02-15 13:32:48 -08:00
Leonardo de Moura
045527daac
chore: update stage0
2022-02-15 12:23:11 -08:00
Leonardo de Moura
2435119e6a
chore: update stage0
2022-02-15 12:20:34 -08:00
Leonardo de Moura
993ec54db6
chore: avoid hack that may introduce unnecessary dependencies
2022-02-15 12:17:40 -08:00
Leonardo de Moura
e07823bb12
chore: remove unnecessary partial
...
TODO: we should generate an error/warning when `partial` is not necessary
2022-02-15 12:16:49 -08:00
Leonardo de Moura
a2613a36a4
fix: incorrect dependencies due to assigned variables
2022-02-15 12:15:45 -08:00
Leonardo de Moura
bd89bdde8a
fix: core library
...
see #1018
2022-02-15 12:12:56 -08:00
Leonardo de Moura
df584567f5
feat: (generalizing := true) is the default behavior for match-expressions
...
closes #1018
2022-02-15 11:12:04 -08:00
Sebastian Ullrich
e9ee9204c4
chore: update Lake
2022-02-15 19:19:19 +01:00
Sebastian Ullrich
54522006f4
refactor: List.get: take Fin to align with Array.get
...
/cc @leodemoura
2022-02-15 18:41:22 +01:00
Leonardo de Moura
d1e5e4166a
feat: use sorry instead of trying to synthesize Inhabited at error recovery
2022-02-15 09:15:18 -08:00
Leonardo de Moura
f75fdcb19b
feat: when Lean cannot prove termination, then report error and add definition as partial, and if it fails add as axiom
2022-02-15 07:44:27 -08:00
Sebastian Ullrich
4b03666ecc
chore: include orphan file
2022-02-15 09:44:19 +01:00
Leonardo de Moura
f33cb27d1c
doc: update RELEASES.md
2022-02-14 15:58:58 -08:00
Leonardo de Moura
66e0b72c6f
test: notation for providing names to equality proofs in match expressions is not whitespace sensitivity anymore
2022-02-14 15:51:23 -08:00
Leonardo de Moura
409530306c
chore: update stage0
2022-02-14 15:48:11 -08:00
Leonardo de Moura
764a1d9f51
chore: fix tests
2022-02-14 15:47:12 -08:00
Leonardo de Moura
c67ee9fdf4
feat: add pp annotation for match parser
2022-02-14 15:46:52 -08:00
Leonardo de Moura
ffca6975f2
chore: remove bootstrapping workarounds
2022-02-14 15:39:21 -08:00
Leonardo de Moura
42c80c7483
feat: remove whitespace sensitivity at match discriminants
2022-02-14 15:37:40 -08:00
Leonardo de Moura
2a2ad75faa
chore: update stage0
2022-02-14 15:37:01 -08:00
Leonardo de Moura
93b5b74b36
feat: modify notation for providing motive in "match" expressions
2022-02-14 15:36:14 -08:00
Leonardo de Moura
0030208d99
chore: prepare to change builtin syntax
2022-02-14 14:17:24 -08:00
Leonardo de Moura
a0fb412989
chore: update stage0
...
Make sure previous fix is also applied to enumeration types in the
core library.
2022-02-14 12:06:42 -08:00
Leonardo de Moura
07043e73b0
chore: fix tests
2022-02-14 12:06:03 -08:00
Leonardo de Moura
aa63fda835
fix: mark auxiliary noConfusion declarations for enumeration types as [reducible]
...
closes #1016
2022-02-14 12:03:49 -08:00
Leonardo de Moura
ee9fcd30e8
fix: mark Nat.decEq as [reducible]
...
It is used by the `noConfusionType` construction for enumeration types,
and we want it to reduce even when the reducibility setting is
`TransparencyMode.reducible` as for other inductive types.
see issue #1016
2022-02-14 12:00:29 -08:00
Leonardo de Moura
93d5351fba
feat: display reducibility status at #print
2022-02-14 11:52:41 -08:00
Leonardo de Moura
420d0f2a3f
fix: make sure noConfusionTypeEnum and noConfusionEnum fully reduce even reducibility setting is set to TransparencyMode.reducible
...
The previous definition would not fully reduce since `ite` and `dite`
are not tagged as `[reducible]`.
see issue #1016
2022-02-14 11:39:18 -08:00
Sebastian Ullrich
bdbffdaaf7
chore: update Lake
2022-02-14 16:52:54 +01:00
ammkrn
3de18ceb55
doc: document match h:e with syntax
2022-02-14 15:53:37 +01:00
Sebastian Ullrich
340c331da9
chore: CI: ignore diff exit code
2022-02-13 00:04:08 +01:00
Leonardo de Moura
8be916b0cf
doc: update RELEASES.md
2022-02-12 12:08:01 -08:00
Leonardo de Moura
82bce7ebec
fix: declare local instaces occurring in patterns
2022-02-12 12:01:08 -08:00
Leonardo de Moura
32dd3c6b29
feat: use at least default transparency at toCtorWhenK
...
Improves the effectiveness of `simp` when reducing `match`-expr.
2022-02-12 07:56:45 -08:00
Leonardo de Moura
999e80745e
test: add test for already fixed issue reported on Zulip
2022-02-12 07:53:31 -08:00
Leonardo de Moura
0649e5fa8a
feat: Basic model-based solver for linear arithmetic
2022-02-11 18:38:33 -08:00
Leonardo de Moura
37afafad6e
feat: missing Rat functions
2022-02-11 18:24:18 -08:00
Leonardo de Moura
e8c23cdf7e
feat: add cache at Lean/Elab/PreDefinition/WF/PackDomain.lean
2022-02-11 09:52:14 -08:00
Leonardo de Moura
9cfa728eac
chore: remove workaround for issue #1013
2022-02-11 09:32:29 -08:00
Leonardo de Moura
7b3a674555
chore: update stage0
2022-02-11 09:31:02 -08:00
Leonardo de Moura
ab41dd0d83
test: add test for issue #1013
2022-02-11 09:28:46 -08:00
Leonardo de Moura
123e0f42e9
feat: support partial and over applications at WF/PackDomain.lean
...
closes #1013
2022-02-11 09:28:17 -08:00
Sebastian Ullrich
2390691116
chore: remove obsolete workaround
2022-02-11 18:19:59 +01:00
Sebastian Ullrich
80e2e1daa8
test: mutual block not needed
2022-02-11 16:22:13 +01:00
Sebastian Ullrich
c460a2e404
chore: CI: fail when uploading 0 files
2022-02-11 10:11:45 +01:00
Sebastian Ullrich
589f05d2c8
chore: CI: do not delete nightly artifacts before uploading them
2022-02-11 10:02:54 +01:00
Leonardo de Moura
77bbaf82df
feat: decidable equality for arrays
2022-02-10 17:31:03 -08:00
Leonardo de Moura
a2b7ff9e0d
chore: fix doc
2022-02-10 17:12:18 -08:00
Leonardo de Moura
712d6726e4
feat: rename tactic byCases => by_cases
2022-02-10 17:11:07 -08:00
Leonardo de Moura
1491253479
feat: helper simp theorems
2022-02-10 17:06:16 -08:00
Leonardo de Moura
1d5da63482
chore: simplify Array.isEqvAux
2022-02-10 16:51:47 -08:00
Leonardo de Moura
6b6c44c559
feat: add helper lemma
2022-02-10 16:51:32 -08:00
Sebastian Ullrich
894dc0e1b8
fix: pretty-printing match dependent on let
2022-02-10 10:19:04 +01:00
Leonardo de Moura
54473ad523
test: add missing test for issue #998
2022-02-09 18:02:01 -08:00
Leonardo de Moura
9fe0d28107
fix: do not split on if-then-else terms when generating equation theorems
...
Reason: avoid unnecessary case-analysis explosion
It is also unnecessary since we only refine the `below` and `F`
arguments over `match`-expressions.
This fixes the last case at issue #998
```
attribute [simp] BinaryHeap.heapifyDown
```
closes #998
2022-02-09 17:43:35 -08:00
Leonardo de Moura
c685a2d9ed
feat: add splitIte flag to splitTarget? tactic
2022-02-09 17:38:04 -08:00
Leonardo de Moura
7fc12014da
fix: make sure splitTarget? skips match expressions that produce type errors at splitMatch
...
We can now generate the equation theorem for
```
attribute [simp] Array.heapSort.loop
```
see #998
2022-02-09 17:07:10 -08:00
Leonardo de Moura
e574c5373f
feat: improve delta? method
...
Use zeta reduction to create new opportunities of beta-reduction.
This issue fixes on the problems that were affecting the generation of
equation theorems for `Array.heapSort.loop` (see issue: #998 ).
After this fix, the equation theorem generation fails at `splitMatch`.
2022-02-09 13:31:55 -08:00
Sebastian Ullrich
8cbd7ccf09
test: reimplement package tests using Lake
2022-02-09 12:21:11 -08:00
Leonardo de Moura
15e6dd262d
chore: fix tests
2022-02-09 10:13:52 -08:00
Leonardo de Moura
8fbe7062fa
fix: preserve unused let-decls at Meta.transform
2022-02-09 10:13:52 -08:00
Leonardo de Moura
3b67c7db81
fix: handling of letrec declarations in the well-founded recursion module
2022-02-09 10:13:52 -08:00
Leonardo de Moura
471ef75345
feat: improve test at packDomain
2022-02-09 10:13:52 -08:00
Leonardo de Moura
e66575d4fc
refactor: move and generalize ensureNoRecFn
2022-02-09 10:13:52 -08:00
Leonardo de Moura
1cfe403edf
chore: style
2022-02-09 10:13:52 -08:00
Sebastian Ullrich
9e11ea3b34
chore: move test to correct folder
2022-02-09 14:32:18 +01:00
Sebastian Ullrich
a8e34b9310
test: mutual recursion over mutual inductive
2022-02-09 14:24:45 +01:00
Sebastian Ullrich
bdf9472069
chore: fix changelog path...
2022-02-09 09:42:17 +01:00
Leonardo de Moura
2ef0146140
fix: avoid unnecessary matcheApp.addArgs at BRecOn and Fix
...
It fixes the following two cases from #998
```
attribute [simp] Lean.Export.exportName
attribute [simp] Lean.Export.exportLevel
```
2022-02-08 15:06:14 -08:00
Leonardo de Moura
8692225432
fix: saveEqn at Lean/Elab/PreDefinition/Eqns.lean
...
see #998
2022-02-08 13:44:49 -08:00
Leonardo de Moura
33ed496661
feat: improve contradiction
2022-02-08 13:26:05 -08:00
Leonardo de Moura
3367f0b06a
feat: use splitTarget? when proving equation theorems for recursive definitions
2022-02-08 12:53:09 -08:00
Leonardo de Moura
afb5cb16ee
chore: simplify option names
...
see #1011
2022-02-08 12:23:24 -08:00
Leonardo de Moura
59acf01bc9
feat: relax auto-implicit restrictions
...
The new options `relaxedAutoBoundImplicitLocal` can be used to
disable this feature.
closes #1011
2022-02-08 12:17:42 -08:00
Leonardo de Moura
398b9c136a
chore: fix test
2022-02-08 11:43:45 -08:00
Leonardo de Moura
96336bb44d
test: add tests for #998
...
The previous changes fixed two of them.
2022-02-08 11:43:45 -08:00
Leonardo de Moura
c486203481
fix: use simpTargetStar when proving equation theorems for recursive definitions
...
Add `take` function reported at Zulip.
2022-02-08 11:43:45 -08:00
Leonardo de Moura
c1777c17e3
feat: add simpTargetStar
2022-02-08 11:43:45 -08:00
Leonardo de Moura
824d0aa8a5
chore: remove leftover
2022-02-08 11:43:45 -08:00
Sebastian Ullrich
ad80c69cba
chore: CI: add RELEASES.md diff to nightly description
2022-02-08 14:25:54 +01:00
Sebastian Ullrich
e45830f8b3
chore: CI: release only if all jobs finished successfully
2022-02-08 14:25:54 +01:00
Leonardo de Moura
e626b3d4aa
chore: make it clear that v4.0.0-m4 has not been released yet
2022-02-07 17:59:46 -08:00
Leonardo de Moura
a9bb646d4f
chore: cleanup
2022-02-07 17:35:07 -08:00
Leonardo de Moura
aa2d547c2b
doc: add last item at congr theorem whishlist
...
closes #988
2022-02-07 17:26:43 -08:00
Leonardo de Moura
8d7f0ea2f2
feat: add removeUnnecessaryCasts
...
see #988
2022-02-07 17:24:32 -08:00
Leonardo de Moura
9d34d9bc5a
feat: cache and optimize mkCongrSimp? at simp
...
see #988
2022-02-07 17:01:21 -08:00
Leonardo de Moura
007f0e1d71
feat: use mkCongrSimp? at simp
...
TODO: cache auto generated congr theorems, and `removeUnnecessaryCasts`
see #988
2022-02-07 16:45:01 -08:00
Leonardo de Moura
93bd4a7f88
chore: lemma => thm
2022-02-07 13:55:23 -08:00
Leonardo de Moura
6f7fb9ccaf
chore: update stage0
2022-02-07 13:19:52 -08:00
Leonardo de Moura
5baac1905f
fix: use private names for theorems that are created on demand
...
closes #1006
2022-02-07 13:16:22 -08:00
ammkrn
efb533fb24
doc: document some do block patterns/sugar
2022-02-07 20:50:15 +01:00
Leonardo de Moura
eff63632b3
feat: improve error message when max heartbeats is reached during TC
...
see #1007
2022-02-07 11:23:48 -08:00
Gabriel Ebner
f8b43630a6
fix: refs to copied subobjects in diamond extension
2022-02-07 10:54:32 -08:00
Sebastian Ullrich
4e77b6a615
doc: extend RELEASES.md
2022-02-07 11:31:58 +01:00
Leonardo de Moura
e8781ad889
chore: update stage0
2022-02-06 09:17:40 -08:00
Leonardo de Moura
8cea32f42d
chore: fix test
2022-02-06 09:15:39 -08:00
Leonardo de Moura
9c2942c36d
chore: "simp lemma" => "simp theorem"
2022-02-06 09:15:39 -08:00
Leonardo de Moura
d6dc077c86
refactor: CongrLemma => SimpCongrTheorem
2022-02-06 09:15:39 -08:00
Leonardo de Moura
96bae46045
refactor: SimpLemma => SimpTheorem
2022-02-06 09:15:39 -08:00
Sebastian Ullrich
2c7d67d498
fix: make info of fields synthesized by structure update synthetic
2022-02-06 08:50:07 -08:00
Leonardo de Moura
255db2b47d
chore: update stage0
2022-02-06 08:12:21 -08:00
Joscha
196cf67eed
fix: handle overlapping definitions
2022-02-06 16:52:18 +01:00
Leonardo de Moura
f78d355416
chore: style
2022-02-06 07:29:26 -08:00
Leonardo de Moura
e35235eec5
chore: update stage0
2022-02-06 07:24:22 -08:00
Sebastian Ullrich
0ef5985b5f
fix: binder info range for let rec/where
2022-02-06 07:21:51 -08:00
Patrick Stevens
b48e48328f
chore: Nix: bump vscode-lean4 version to 0.0.63
2022-02-05 20:08:45 +01:00
Joscha
841d51a7e6
fix: walkDir
2022-02-05 19:55:09 +01:00
Sebastian Ullrich
06e81637fe
fix: symlinking src/ into build directory
2022-02-05 18:52:40 +01:00
Leonardo de Moura
7f0060b214
chore: update stage0
2022-02-04 18:25:35 -08:00
Leonardo de Moura
6de0b1fc67
feat: add mkCongrSimp.mkProof
...
see #988
2022-02-04 17:57:28 -08:00
Leonardo de Moura
3ae455bccf
feat: add mkCongrSimp?
...
TODO: proof is still missing
see #988
2022-02-04 17:57:28 -08:00
Leonardo de Moura
a028a69159
feat: cache isProp and isDecInst at FunInfo
2022-02-04 17:57:28 -08:00
Gabriel Ebner
926a253680
fix: serve: fall back to lean --server on error
2022-02-04 17:30:47 -05:00
Wojciech Nawrocki
5668e2644a
fix: typo
2022-02-04 12:55:53 -08:00
Sebastian Ullrich
a7ba103e0a
chore: remove leanpkg
2022-02-04 19:03:40 +01:00
Sebastian Ullrich
2b7427c962
chore: adjust changelog merge strategy config
...
/cc @leodemoura
2022-02-04 18:32:20 +01:00
Leonardo de Moura
cfb67ee589
chore: add RELEASES.md
...
It is based on the approach used in rust.
2022-02-04 09:24:20 -08:00
Sebastian Ullrich
ae062c6ead
fix: match tactic should not trigger implicit lambdas
2022-02-04 07:55:56 -08:00
Sebastian Ullrich
7fd76cd1b9
chore: CI: fix sanitizer test excludes
...
Apparently StackOverflow got fixed at some point?
2022-02-04 15:01:30 +01:00
Leonardo de Moura
8c40a31573
chore: auto pure was removed
2022-02-03 21:32:27 -05:00
Mario Carneiro
6e7d76f4d8
fix: typo
2022-02-03 18:21:14 -08:00
Leonardo de Moura
95aec2cf93
chore: update stage0
2022-02-03 18:10:10 -08:00
Leonardo de Moura
1684cfec83
chore: update lake
2022-02-03 18:09:48 -08:00
Leonardo de Moura
12e2a79170
chore: fix codebase after removing auto pure
2022-02-03 18:08:14 -08:00
Leonardo de Moura
00f59a91ee
chore: update stage0
2022-02-03 17:07:14 -08:00
Leonardo de Moura
e9d85f49e6
chore: remove tryPureCoe?
...
Based on the discussion at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/for.2C.20unexpected.20need.20for.20type.20ascription/near/269083574
The consensus seemed to be that "auto pure" is more confusing than its worth.
2022-02-03 16:25:24 -08:00
Leonardo de Moura
6d07092d1e
chore: update stage0
2022-02-03 15:56:28 -08:00
Leonardo de Moura
5f74cd4968
feat: add let pat := val | elseCase do-notation
2022-02-03 15:55:03 -08:00
Leonardo de Moura
420f5bb315
fix: hide internal namespaces from autocompletion
...
closes #993
2022-02-03 13:33:27 -08:00
Leonardo de Moura
17eab845ed
fix: improve tryPostponeIfMVar
...
see #992
2022-02-03 13:24:19 -08:00
Leonardo de Moura
2bc5b8d1ec
chore: remove doc/changes.md
...
In the last dev meeting, we have decided we are not going to use it.
We will release often (every month), and use pull requests and issues
to report changes.
2022-02-03 09:23:45 -08:00
Leonardo de Moura
42b3ed5903
test: add Pi.single test
...
see #988
2022-02-03 09:22:22 -08:00
Sebastian Ullrich
22526051e0
fix: install sources to src/lean/, not lib/lean
...
Not only is this more semantically appropriate (see e.g.
`/usr/src/{linux,rust,...}` on Debian), it also prevents .ilean files
from Lake tests (which are symlinked into the build directory as part of
`src/` during development) from ending up in the built-in LEAN_PATH and
being watched & loaded by the server.
2022-02-03 18:20:21 +01:00
Gabriel Ebner
55be278cd7
fix: ensure motive of matches is Bool
2022-02-03 18:17:27 +01:00
Gabriel Ebner
54cff10f3f
fix: dependent fields in diamond extensions
2022-02-03 09:17:14 -08:00
tydeu
0869780376
chore: start next Lake version
2022-02-03 01:24:28 -05:00
Leonardo de Moura
c30380e2fa
feat: lift the restriction in congr theorems that all function arguments on the lhs must be free variables
...
see #988
2022-02-02 18:23:18 -08:00
Leonardo de Moura
b7c853692d
test: add test for decide congruence issue
...
TODO: congruence lemma must be automatically generated.
see #988
2022-02-02 17:49:03 -08:00
Leonardo de Moura
101fc12b54
feat: partially applied user congruence lemmas
...
see #988
2022-02-02 17:41:21 -08:00
Leonardo de Moura
dbb6dcd9a9
fix: remove irrelevant hypotheses in auto-generated equation theorems
2022-02-02 15:39:51 -08:00
Leonardo de Moura
188f0eb70f
fix: splitMatch tactic
...
Improve how we compute the motive for match-splitter eliminator.
closes #986
2022-02-02 15:06:03 -08:00
Leonardo de Moura
d7f085976f
feat: add Coe MVarId MessageData
2022-02-02 15:06:03 -08:00
Leonardo de Moura
4a4074baab
fix: only generalize when needed at cases
2022-02-02 15:06:03 -08:00
Leonardo de Moura
4fe56d2a9d
fix: allow mkElimApp to assign new goals when solving typing constraints
2022-02-02 15:06:03 -08:00
Leonardo de Moura
65e1fc1211
feat: at splitMatch only generalize discriminants that are not FVar
2022-02-02 15:06:03 -08:00
Leonardo de Moura
630bf4e129
chore: update error message for throwNestedTacticEx
2022-02-02 15:06:03 -08:00
Leonardo de Moura
3101b98f50
feat: used nested tactic exception at splitMatch
2022-02-02 15:06:03 -08:00
Sebastian Ullrich
16f6b19e21
fix: silence .ilean load errors
2022-02-02 22:02:15 +01:00
Sebastian Ullrich
e400b02a05
test: wrong test
2022-02-02 13:17:30 +01:00
Sebastian Ullrich
3425278d97
test: forgot to commit test for #801
2022-02-02 13:08:23 +01:00
larsk21
ce92672c3a
fix: remove explicit Ord Range
2022-02-02 13:03:21 +01:00
larsk21
e73645505b
fix: remove duplicate from interactive highlight test
2022-02-02 13:03:21 +01:00
larsk21
6cee7a6a31
fix: dedup references in findModuleRefs
2022-02-02 13:03:21 +01:00
larsk21
818e8acd0e
feat: add test for handleDocumentHighlight
2022-02-02 13:03:21 +01:00
larsk21
bc65da2e83
feat: extend handleDocumentHighlight
2022-02-02 13:03:21 +01:00
Leonardo de Moura
3dfd14dfff
chore: fix test
2022-01-31 16:45:57 -08:00
Leonardo de Moura
b1617fe04c
feat: add throwNestedTacticEx
...
closes #194
2022-01-31 16:25:44 -08:00
Leonardo de Moura
ccddd0d932
feat: show proof state/unclosed goal message on empty tactic sequences
...
closes #361
2022-01-31 16:22:08 -08:00
Leonardo de Moura
9291f59c8f
chore: add changes.md
2022-01-31 15:52:28 -08:00
Sebastian Ullrich
6f28d70d50
chore: CI: fix non-release jobs on release
2022-01-31 22:59:07 +01:00
Leonardo de Moura
f02013fd76
fix: induction MetaM tactic
...
The major premise may be a let-declaration.
closes #983
2022-01-31 13:41:38 -08:00
Joscha
d2dcff1f9a
refactor: address review comments
2022-01-31 21:36:37 +01:00
Joscha
bfc185e98e
fix: don't duplicate definition and declaration requests
2022-01-31 21:36:37 +01:00
Joscha
4545e183d8
fix: go to definition in modified file
2022-01-31 21:36:37 +01:00
Joscha
ccf492b61d
feat: implement partial ilean updates
2022-01-31 21:36:37 +01:00
tydeu
768e8f76ec
chore: update Lake
2022-01-31 14:31:31 +01:00
Sebastian Ullrich
dfc19755cb
chore: CI: fsan-blacklist laketest_ffi as well
2022-01-31 14:29:12 +01: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
f3279824a3
fix: Windows: do not use standard sysroot
2022-01-30 17:43:14 +01:00
Sebastian Ullrich
f9ff9ab3fd
doc: move documentation on syntax match semantics to elaborator docstring
2022-01-29 08:40:03 -08:00
Sebastian Ullrich
ce58ded16f
fix: syntax match of literals
...
Fixes #801
2022-01-29 08:40:03 -08:00
Gabriel Ebner
7d4ae642fb
fix: recursively copy subfields in diamond extends
2022-01-29 08:31:34 -08:00
Sebastian Ullrich
4d17f1ccb3
chore: CI: rename Nix job to make available to branch protection rule
2022-01-29 17:30:01 +01:00
Wojciech Nawrocki
2d1cea0864
feat: inform server if widgets are available
2022-01-29 10:04:25 +01:00
Leonardo de Moura
3db640e770
chore: avoid Name.quickLt
...
`Name.quickLt` uses hash code and may produce counterintuitive results
to users.
2022-01-28 09:48:50 -08:00
Leonardo de Moura
e5ef61225b
fix: missing condition at lpo case 3
2022-01-28 09:47:35 -08:00
Leonardo de Moura
cb4a86ac68
fix: do not validate local eq theorems
...
see #973
2022-01-27 11:50:20 -08:00
Leonardo de Moura
d4d9995952
feat: reject user declared namespaces containing _root
...
see #490
2022-01-26 19:15:45 -08:00
Leonardo de Moura
941a6165e5
chore: cleanup
2022-01-26 18:26:23 -08:00
Leonardo de Moura
a63163e992
feat: do not try to discharge hypotheses at simp when type contains assignable metavariables
...
closes #973
see https://github.com/leanprover-community/mathport/issues/70
2022-01-26 17:57:52 -08:00
Leonardo de Moura
2fff4c42b7
fix: make sure irreducible constants are not unfolded when using the default reducibility setting
2022-01-26 11:55:21 -08:00
Leonardo de Moura
8db923e010
feat: generate error message for simp theorems that are equivalent to x = x
...
see #973
see https://github.com/leanprover-community/mathport/issues/70
2022-01-26 11:16:31 -08:00
Leonardo de Moura
36d7f2a1ea
chore: remove dead code
2022-01-26 10:38:46 -08:00
Leonardo de Moura
cf3b8d4eb4
chore: cleanup
...
Make the code style more uniform.
We still have a lot of leftovers from the old frontend.
2022-01-26 09:18:17 -08:00
Leonardo de Moura
f0b502aca6
fix: increase the number of heartbeats at Expr.eqv
...
On issue #906 , `simp` spends a lot of time checking the cache. This
process is time consuming and doesn't allocate memory. Before this
commit, it would take a long time to get the "maximum number of
heartbeats" error message on the example included in this issue.
Closes #906
2022-01-26 08:25:33 -08:00
Leonardo de Moura
a10e32f537
fix: check "heartbeats" at simp
2022-01-26 07:50:25 -08:00
Leonardo de Moura
15cca3000a
fix: withIncRecDepth was not aborting simp
...
It was just making it stop simplification at the current branch.
Now, elaboration is interrupted after a few seconds in the example at
issue #906 .
see #906
2022-01-26 07:48:58 -08:00
Leonardo de Moura
868e95df1b
feat: add Exception.isMaxRecDepth
2022-01-26 07:38:38 -08:00
Leonardo de Moura
8896c9b06d
test: add variant of Formula.count_quantifiers
...
see #974
2022-01-25 18:47:03 -08:00
Leonardo de Moura
98407798af
fix: mkEquationsFor at Match/MatchEqs.lean
...
closes #974
2022-01-25 18:43:51 -08:00
Leonardo de Moura
a969014eb9
chore: add matchHEq?
2022-01-25 18:43:51 -08:00
Leonardo de Moura
9c293abb9c
chore: expose heqToEq tactic
2022-01-25 18:43:51 -08:00
Leonardo de Moura
6547af988b
feat: add substVars
2022-01-25 18:43:51 -08:00
Sebastian Ullrich
2f02ddeba1
fix: Nix: revise propagation of load-dynlibs
2022-01-25 23:25:52 +01:00
Sebastian Ullrich
cf1654df1f
fix: Nix: precompilation against stdlib, once more
2022-01-25 23:25:52 +01:00
Sebastian Ullrich
180cc59d64
chore: update Lake to https://github.com/leanprover/lake/pull/48/files
2022-01-25 23:25:52 +01:00
Sebastian Ullrich
cfaba85199
feat: load precompiled modules in the server
2022-01-25 23:25:52 +01:00
Sebastian Ullrich
a926c6b1b2
chore: Nix: more consistent drv name
2022-01-25 23:25:52 +01:00
Sebastian Ullrich
8893ba9fa0
fix: Nix: precompilation on macOS
2022-01-25 23:25:52 +01:00
Sebastian Ullrich
9b87428555
fix: Nix: work around https://github.com/NixOS/nixpkgs/issues/148189
2022-01-25 23:25:52 +01:00
Sebastian Ullrich
23db584b8f
fix: Nix: precompilation against stdlib
2022-01-25 23:25:52 +01:00
Sebastian Ullrich
b601f2ffb2
perf: Nix: use bare command for shared libs
2022-01-25 23:25:52 +01:00
Sebastian Ullrich
096250a585
feat: Nix: simple, opt-in precompilation scheme
2022-01-25 23:25:52 +01:00
Sebastian Ullrich
01987dbc8e
refactor: Nix: attach object drv to module drv
2022-01-25 23:25:52 +01:00
Sebastian Ullrich
ac28f89527
fix: Nix: link package's shared library dynamically against dependencies
...
refactor: Nix: dynlib handling
2022-01-25 23:25:52 +01:00
Leonardo de Moura
234f70fadb
chore: remove the now incorrect comment
2022-01-24 19:05:05 -08:00
Leonardo de Moura
02677cf326
fix: igore instance implicit arguments in term ordering used at simp
...
closes #972
2022-01-24 18:57:31 -08:00
Leonardo de Moura
d4f7899591
chore: avoid code duplication setting Simp.Config
2022-01-24 18:57:31 -08:00
Sebastian Ullrich
b20ecd02d7
chore: move out lean4-mode
2022-01-24 21:23:53 +01:00
Leonardo de Moura
722bf54929
fix: trace message with incorrect MetavarContext
2022-01-24 10:34:44 -08:00
Sebastian Ullrich
df1c1cde12
refactor: make LeanPaths usage forward-compatible ( leanprover/lake#48 )
2022-01-22 20:55:16 -05:00
Leonardo de Moura
7ada79bf2e
fix: use an AC-compatible ordering on Expr at simp
...
closes #968
2022-01-22 09:42:59 -08:00
Leonardo de Moura
763a337c25
chore: helper functions
2022-01-22 09:30:57 -08:00
Leonardo de Moura
d096f59f86
chore: update stage0
2022-01-22 08:06:31 -08:00
Leonardo de Moura
0615020cf7
feat: make sure Expr.approxDepth does not overflow
2022-01-22 07:45:19 -08:00
Tom Ball
0b140ea451
doc: fix error in manual example
...
Co-authored-by: Tom Ball <you@example.com >
2022-01-22 10:03:32 +01:00
Sebastian Ullrich
fb57b73e1f
fix: Nix: compatibility with standard build
2022-01-21 09:24:43 +01:00
Leonardo de Moura
79dec8fa7c
chore: fix test
2022-01-20 17:19:29 -08:00
Leonardo de Moura
253f3aa5ec
chore: update stage0
2022-01-20 17:16:50 -08:00
Leonardo de Moura
d39025e343
test: add test for issue #951
2022-01-20 17:16:06 -08:00
Leonardo de Moura
893b816f82
chore: update stage0
2022-01-20 17:11:09 -08:00
Leonardo de Moura
b0083e0dd0
feat: use elaborated type to generate instance name
...
closes #951
2022-01-20 17:09:55 -08:00
Leonardo de Moura
a9659afa50
chore: remove old decls
2022-01-20 15:35:19 -08:00
Leonardo de Moura
70de6dabb3
chore: update stage0
2022-01-20 15:33:45 -08:00
Leonardo de Moura
6f416147b4
chore: rename coeM and liftCoeM
2022-01-20 15:33:17 -08:00
Leonardo de Moura
0c959b6942
chore: fix tests
2022-01-20 15:25:59 -08:00
Leonardo de Moura
2192e6148b
chore: remove coe, coeSort, and coeFun abbreviations
...
The notation `↑ e` is now expanded eagerly.
See #403
2022-01-20 15:19:06 -08:00
Leonardo de Moura
7c0a790774
chore: update stage0
2022-01-20 15:10:13 -08:00
Leonardo de Moura
3c17755730
chore: prepare to remove coe definitions
...
The notation `↑ e` will eagerly expand the coersion.
See #403
2022-01-20 15:07:54 -08:00
Leonardo de Moura
f9fa24435d
chore: remove problematic instance hasOfNatOfCoe
...
See #403
See https://github.com/leanprover-community/mathport/issues/94
2022-01-20 14:47:25 -08:00
Sebastian Ullrich
f0f26728ed
doc: more about initializers
2022-01-20 18:55:57 +01:00
Sebastian Ullrich
dc148003cb
chore: Nix: remove annoying output
2022-01-20 18:55:57 +01:00
Sebastian Ullrich
52de670497
chore: clarify safety of compile-time code execution
2022-01-20 18:55:57 +01:00
Sebastian Ullrich
c59f7a55cf
fix: initialize precompiled modules
2022-01-20 18:55:57 +01:00
Leonardo de Moura
e7dd03d5d1
chore: remove tmp dir
2022-01-20 09:54:28 -08:00
Leonardo de Moura
b1a92f5cbf
feat: better Repr instances for Level.Data and Expr.Data
...
see #619
2022-01-20 09:45:30 -08:00
Leonardo de Moura
ff4be1e1db
feat: add Repr instances for Level and Expr
...
closes #619
TODO: a better `Repr` instance for `Expr.Data`
2022-01-20 09:26:06 -08:00
Leonardo de Moura
d190d6dda4
fix: use default reducibility when proving equation theorems for definition
...
Addresses issue reported by @fpfu at #945
2022-01-20 08:23:51 -08:00
Joscha
9949f92648
refactor: base findModuleWithExt on findWithExt
2022-01-20 17:20:01 +01:00
Joscha
2423a78db4
refactor: implement suggestions
2022-01-20 17:20:01 +01:00
Sebastian Ullrich
3a926b1047
fix: use user-facing private decl name in symbol query
2022-01-20 17:20:01 +01:00
Sebastian Ullrich
53d90a71ae
feat: do case-sensitive symbol query if query contains upper-case char
2022-01-20 17:20:01 +01:00
Sebastian Ullrich
1168334cca
fix: Unicode symbol lookup
2022-01-20 17:20:01 +01:00
Joscha
7540889bd3
feat: implement LSP workspace symbol request
2022-01-20 17:20:01 +01:00
Sebastian Ullrich
ccf1292e07
fix: rework header/lib handling with bundled clang
...
* use `-nostdinc` to make sure system headers don't affect us
* include clang headers with `-isystem`, which suppresses all those warnings
* do not use default sysroot on Windows after all, since that can be a
surprising location
Fixes #922
2022-01-20 16:05:54 +01:00
Leonardo de Moura
f5509ab867
fix: equational lemma generation for definitions using named patterns
...
closes #945
2022-01-19 17:45:54 -08:00
Leonardo de Moura
ef449e816f
chore: improve trace messages
2022-01-19 14:29:04 -08:00
Sebastian Ullrich
bbec84bb18
chore: more output on trace.Elab.info
2022-01-19 21:40:29 +01:00
Joscha
3651ebb377
fix: don't send worker notification to client
2022-01-19 16:29:10 +01:00
Sebastian Ullrich
89e460dd1b
chore: CI: push .ileans to Cachix
2022-01-19 12:35:42 +01:00
Sebastian Ullrich
312944e784
fix: hover etc. on complex declaration name
2022-01-19 12:27:03 +01:00
tydeu
8e79d88d29
feat: liftOption
2022-01-19 12:22:05 +01: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
Leonardo de Moura
873a2ba8a6
feat: unfold namedPattern applications at equation theorems
2022-01-18 15:03:20 -08:00
Leonardo de Moura
1e21815e41
fix: equality theorem generation when named patterns are used
...
closed #945
2022-01-18 14:37:51 -08:00
Leonardo de Moura
c816524d8d
feat: add subst?
2022-01-18 14:26:14 -08:00
Leonardo de Moura
c12fa6f0e2
fix: error message
...
The equation theorems may fail for other reasons.
2022-01-18 14:11:54 -08:00
Leonardo de Moura
a21265281b
chore: remove temporary workaround
2022-01-18 14:11:54 -08:00
Arthur Paulino
98289ed3d7
feat: provide functions to build a HashMap from a List of key-value pairs
...
As a motivation, programming languages that implement hash maps usually provide an interface for easy instantiation.
Closes 947
2022-01-18 22:51:00 +01:00
Leonardo de Moura
63025663fd
chore: update stage0
2022-01-18 12:47:36 -08:00
Leonardo de Moura
ab5e43acaa
chore: update stage0
2022-01-18 12:45:27 -08:00
Leonardo de Moura
1c1e6d79a7
feat: add equality proof for named patterns
...
The user can optionally name the equality proof.
The new test demostrates how to name the equality proof.
closes #501
2022-01-18 12:43:01 -08:00
Leonardo de Moura
42fe01a3eb
feat: add new flag to caseValues
2022-01-18 12:15:29 -08:00
Leonardo de Moura
8058bc894c
feat: add AssocList.toList
2022-01-18 11:44:43 -08:00
Leonardo de Moura
cd903bde77
refactor: [s : Setoid α] => {s : Setoid α} or (s : Setoid α)
...
See comment at https://github.com/leanprover/lean4/issues/952#issuecomment-1015265136
cc @gebner
2022-01-18 09:24:06 -08:00
Leonardo de Moura
9d05023325
chore: remove some [specialize] annotations
2022-01-18 09:24:06 -08:00
Sebastian Ullrich
3abb70dbb5
refactor: factor out common source search path logic
2022-01-18 18:22:50 +01:00
Leonardo de Moura
b266961068
chore: fix test
2022-01-17 17:24:09 -08:00
Leonardo de Moura
4ac019ccf0
chore: update stage0
2022-01-17 17:22:02 -08:00
Leonardo de Moura
874aadd7e3
chore: update namedPattern signature
...
Remark: It is not being used yet.
2022-01-17 17:21:18 -08:00
Leonardo de Moura
35d25dfaaf
chore: update stage0
2022-01-17 17:18:49 -08:00
Leonardo de Moura
6631f1d5b3
chore: use namedPatternOld
2022-01-17 17:18:03 -08:00
Leonardo de Moura
db9bb8dd1b
chore: update stage0
2022-01-17 17:14:46 -08:00
Leonardo de Moura
0f217eb4c1
chore: prepare to change namedPattern signature
2022-01-17 17:13:09 -08:00
Leonardo de Moura
2a17233f1c
chore: fix test
2022-01-17 17:07:08 -08:00
Leonardo de Moura
2c0da66ff2
chore: update stage0
2022-01-17 17:04:44 -08:00
Leonardo de Moura
be4c86f780
chore: remove temporary workarounds
2022-01-17 17:03:15 -08:00
Leonardo de Moura
05b9240c72
chore: update stage0
2022-01-17 16:59:20 -08:00
Leonardo de Moura
f8653a8cb7
chore: add temporary workaround
2022-01-17 16:58:39 -08:00
Leonardo de Moura
b142f709e1
chore: update stage0
2022-01-17 16:55:31 -08:00
Leonardo de Moura
2c690926cf
feat: update namedPattern parser
2022-01-17 16:49:20 -08:00
Leonardo de Moura
de11f7e1bc
feat: add sizeOf spec lemmas as simp theorems
2022-01-17 16:14:38 -08:00
Leonardo de Moura
8f47043aee
chore: add trace message for sizeOf theorem
2022-01-17 15:42:42 -08:00
Gabriel Ebner
ab276a5ae3
chore: show declaration with sorry in #eval
2022-01-17 13:18:22 -08:00
Leonardo de Moura
03a5c5034f
chore: update stage0
2022-01-17 13:10:09 -08:00
Leonardo de Moura
a272b222f1
chore: update stage0
2022-01-17 13:08:00 -08:00
Leonardo de Moura
999e125e3f
feat: mark arguments such as {_ : BEq α} as specialization target
...
We want to specialize functions such as
```
def find? {_ : BEq α} {_ : Hashable α} : PersistentHashMap α β → α → Option β
| { root := n, .. }, k => findAux n (hash k |>.toUSize) k
```
2022-01-17 13:05:50 -08:00
Gabriel Ebner
561a869e49
fix: provide reference implementation for Array.modify
2022-01-17 12:41:12 -08:00
tydeu
2be2466f78
chore: bump Lean version
2022-01-17 15:00:01 -05:00
Leonardo de Moura
dd3d8f6fad
feat: complete namespaces
...
closes #940
2022-01-17 10:03:36 -08:00
Leonardo de Moura
da06bb6605
fix: matching inside new termination_by
2022-01-17 08:47:05 -08:00
Leonardo de Moura
98af42077c
chore: fix doc
2022-01-16 09:28:03 -08:00
Leonardo de Moura
189f4bd372
chore: fix tests
2022-01-15 12:18:09 -08:00
Leonardo de Moura
bac91b9b5b
chore: remove arbitrary
2022-01-15 12:14:27 -08:00
Leonardo de Moura
20d5b5b9c0
chore: update stage0
2022-01-15 12:03:17 -08:00
Leonardo de Moura
579908e9b1
chore: using Inhabited.default at Deriving/Inhabited
2022-01-15 11:59:43 -08:00
Leonardo de Moura
7d5f14b4a7
chore: elaborate default_or_ofNonempty% and add mkDefault
2022-01-15 11:55:58 -08:00
Leonardo de Moura
5c69d63157
chore: update stage0
2022-01-15 11:52:40 -08:00
Leonardo de Moura
9de58c66eb
chore: add default_or_ofNonempty%
2022-01-15 11:50:39 -08:00
Leonardo de Moura
a3a134a297
chore: export Inhabited.default
2022-01-15 11:50:28 -08:00
Leonardo de Moura
c1fccf19cb
chore: fix test
2022-01-15 11:46:11 -08:00
Leonardo de Moura
901c0dba83
chore: update lake
2022-01-15 11:44:40 -08:00
Leonardo de Moura
b0d9c16c7a
chore: rename PointedType => NonemptyType
2022-01-15 11:43:53 -08:00
Leonardo de Moura
4ac34f4cd5
chore: rename PointedType => NonemptyType
2022-01-15 11:42:09 -08:00
Henrik Böving
c1b31a57eb
feat: store ModuleData of imported modules in EnvironmentHeader
2022-01-15 10:40:52 -08:00
tydeu
07bfdc02e7
chore: update Lake
2022-01-15 17:57:51 +01: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
5e462f704a
chore: update stage0
2022-01-14 20:43:22 -08:00
Leonardo de Moura
83b616ad07
chore: update lake
2022-01-14 20:42:36 -08:00
Leonardo de Moura
e880dd52a4
chore: PointedType
2022-01-14 20:41:47 -08:00
Leonardo de Moura
e3241e82bc
feat: define PointedType as { α : Type u // Nonempty α }
2022-01-14 20:36:51 -08:00
Leonardo de Moura
23e27f657f
chore: update stage0
2022-01-14 20:29:26 -08:00
Leonardo de Moura
6ea0aaf35a
fix: do not invoke add_extern for declarations marked with implementedBy
2022-01-14 20:27:50 -08:00
Leonardo de Moura
9499cea2a5
fix: bug at skip_code_generation
2022-01-14 19:58:24 -08:00
Leonardo de Moura
42db1f09d2
chore: update lake
2022-01-14 19:49:30 -08:00
Leonardo de Moura
b970919978
chore: remove unnecessary Inhabited
2022-01-14 19:48:10 -08:00
Leonardo de Moura
acd482c5f2
feat: define Array.modify without using Inhabited
2022-01-14 19:47:42 -08:00
Leonardo de Moura
9c5668515c
chore: update stage0
2022-01-14 19:21:29 -08:00
Leonardo de Moura
b22a3a4cc4
feat: skip code generation for declarations marked with implementedBy, init, and builtinInit
...
This is a bit hackish. We should clean up when we rewrite the compiler
in Lean.
2022-01-14 19:20:16 -08:00
Leonardo de Moura
a438a2ee21
feat: elaborate arbitrary_or_ofNonempty% and use it to define constants
2022-01-14 17:22:39 -08:00
Leonardo de Moura
2fe59456fd
chore: update stage0
2022-01-14 17:19:34 -08:00
Leonardo de Moura
0a726a755f
feat: add helper parser arbitrary_or_ofNonempty%
2022-01-14 17:11:55 -08:00
Leonardo de Moura
226d828e19
chore: update stage0
2022-01-14 16:51:05 -08:00
Leonardo de Moura
c34adb7dd5
feat: allow partial definitions to be define if type is non empty
2022-01-14 16:50:36 -08:00
Leonardo de Moura
f1adedb2de
feat: add Classical.ofNonempty
2022-01-14 15:59:11 -08:00
Leonardo de Moura
83b69bc340
refactor: move Classical.choice and Nonempty to Prelude
2022-01-14 15:59:11 -08:00
Sebastian Ullrich
9ab5f0376e
feat: Nix: iTree attribute for symlinking (complete) ilean files
2022-01-14 19:02:10 +01:00
Sebastian Ullrich
753e396705
fix: recurse in findAllWithExt
2022-01-14 18:59:58 +01:00
Sebastian Ullrich
6ec406b7d0
feat: System.FilePath.walkDir
2022-01-14 16:22:14 +01:00
larsk21
b712918db9
fix: unify handleDefinition for imports
2022-01-14 10:32:06 +01:00
larsk21
ecaa004dcc
feat: make withWaitFindSnap consider all snaps of a document
2022-01-14 10:32:06 +01:00
larsk21
e584560b17
feat: enable "go to definition" for imports
2022-01-14 10:32:06 +01:00
larsk21
89bbaf514e
feat: include imports in header snap info tree
2022-01-14 10:32:06 +01:00
Joscha
6d809e7cd1
test: remove references test
...
This test no longer works since the 'references' request now requires at
least a watchdog, but this kind of test only work with file workers.
2022-01-14 09:18:57 +01:00
Sebastian Ullrich
8e5fc66330
fix: do not error on non-existent search path entries
2022-01-14 09:18:57 +01:00
Sebastian Ullrich
a0e8c6183b
fix: parser should create choice node even on error
2022-01-14 09:18:57 +01:00
Joscha
8c5868e106
perf: reduce size of ilean files
2022-01-14 09:18:57 +01:00
Sebastian Ullrich
37f5be1b26
chore: fix servertest_init_exit
2022-01-14 09:18:57 +01:00
Sebastian Ullrich
d503fe6d13
refactor: avoid double exception layer with AsyncList
2022-01-14 09:18:57 +01:00
Joscha
d8ec900ae9
refactor: use array instead of list in AsyncElabState
2022-01-14 09:18:57 +01:00
Joscha
ab52480b69
fix: implement suggestions
2022-01-14 09:18:57 +01:00
Joscha
4bcf7ab31f
style: add copyright headers
2022-01-14 09:18:57 +01:00
Joscha
b9f8f5eb38
fix: find references of function parameters
2022-01-14 09:18:57 +01:00
Joscha
281ede6ed4
feat: handle references notifications
2022-01-14 09:18:57 +01:00
Joscha
f98cf0289c
feat: send references notification when file evaluation finishes
2022-01-14 09:18:57 +01:00
Joscha
7cce91acb4
refactor: move some reference-related types to Lean.Data
...
These types are required for worker->watchdog notifications.
2022-01-14 09:18:57 +01:00
Joscha
088433dc57
refactor: let AsyncList creation be stateful
2022-01-14 09:18:57 +01:00
Joscha
67aa823ae2
fix: resolve symlinks for the LSP client
2022-01-14 09:18:57 +01:00
Joscha
bce56fdc0c
feat: implement reference request
2022-01-14 09:18:57 +01:00
Joscha
7abdf94fc5
feat: respond to reference request in watchdog
2022-01-14 09:18:57 +01:00
Joscha
4fd1d22c31
feat: load and unload ileans on LSP notifications
2022-01-14 09:18:57 +01:00
Joscha
4e12cc902b
feat: load ilean files from olean search path
2022-01-14 09:18:57 +01:00
Joscha
567a854a15
feat: load search path for source files in watchdog
2022-01-14 09:18:57 +01:00
Joscha
87b8afff6b
feat: register file watcher for .ilean files
2022-01-14 09:18:57 +01:00
Joscha
bcc499b7c0
feat: build .ilean files next to .olean files
2022-01-14 09:18:57 +01:00
Joscha
346b50a22e
chore: update stage0
2022-01-14 09:18:57 +01:00
Joscha
3f998c68bc
feat: export reference info to ilean files
2022-01-14 09:18:57 +01:00
Joscha
96ed620933
feat: collect reference info from InfoTrees
2022-01-14 09:18:57 +01:00
Joscha
efb964956e
feat: add FileRefMap and convert to/from JSON
2022-01-14 09:18:57 +01:00
Joscha
fead5526bc
feat: add -i cli option
2022-01-14 09:18:57 +01:00
Simon Hudon
ec3cc0cc45
feat: lean-mode: auto-select lean 3 mode
2022-01-14 09:17:34 +01:00
Leonardo de Moura
6d235586f0
fix: ignore TC failures while processing patterns
...
closes #948
2022-01-13 10:55:09 -08:00
Leonardo de Moura
1620987b6c
fix: recursive applications in discriminants
2022-01-13 09:56:33 -08:00
Sebastian Ullrich
b56fa81b70
chore: CI: sanitizer-blacklist Lake test again
...
Apparently 1500s are not sufficient for termination...
2022-01-13 17:10:07 +01:00
Leonardo de Moura
8c45c844aa
test: add wellfounded test
2022-01-12 17:16:43 -08:00
Leonardo de Moura
3fbf5acbee
fix: add missing [reducible] annotations Init/WF.lean
2022-01-12 17:12:55 -08:00
Leonardo de Moura
98864f707e
test: add test for #879
...
The new `termination_by` syntax should address issue #879
closes #879
2022-01-12 16:25:09 -08:00
Leonardo de Moura
7fe6881c42
feat: use new termination_by syntax
2022-01-12 16:23:25 -08:00
Leonardo de Moura
35a49ca535
chore: update stage0
2022-01-12 16:23:25 -08:00
Leonardo de Moura
9162901c86
fix: expandTerminationByNonCore
2022-01-12 16:22:54 -08:00
Leonardo de Moura
91a0ac8a12
feat: elaborate new termination_by syntax
2022-01-12 16:15:30 -08:00
Leonardo de Moura
49b2860f2a
feat: add Meta.rename tactic
2022-01-12 16:15:30 -08:00
Leonardo de Moura
addcbc6fa3
feat: process termination_by syntax
2022-01-12 16:15:30 -08:00
Simon Hudon
6820c8bd92
feat: create lsp workspaces automatically
2022-01-12 19:26:55 +01:00
Leonardo de Moura
111d09fda3
fix: must apply afterCompilation attributes *after* smart unfolding definition was declared
...
The `[simp]` attribute checks whether the smart unfolding defintion
has been declared.
closes #946
2022-01-12 08:28:03 -08:00
Leonardo de Moura
45bd328d5e
fix: tests and add WellFoundedRelation.rel to list of definitions to unfold at decreasing_tactic
2022-01-12 08:28:03 -08:00
Leonardo de Moura
e7eab602d9
fix: missing consumeAutoOptParam at addNewArg
2022-01-12 08:28:03 -08:00
Leonardo de Moura
7a86b613dc
chore: remove old comment
2022-01-12 08:28:03 -08:00
Leonardo de Moura
a1ab5c0ccb
feat: simplify termination_by new syntax
...
We don't need `using` anymore since we are going to use TC inference.
2022-01-12 08:28:03 -08:00
Leonardo de Moura
1a6abe1dad
feat: WellFoundedRelation as a class
2022-01-12 08:28:03 -08:00
Gabriel Ebner
50abc3e295
fix: correctly pretty-print @Eq
2022-01-12 09:41:41 +01:00
Gabriel Ebner
bdc80ce50d
fix: potential nontermination in delabFor
2022-01-12 09:41:41 +01:00
Gabriel Ebner
9132b27e80
fix: delabAppImplicit: strip mdata from function
2022-01-12 09:41:41 +01:00
Sebastian Ullrich
bcf61cc7bb
chore: CI: remove ctest timeout, for now
...
Hopefully lsan will now have sufficient time to actually terminate
2022-01-12 10:24:45 +01:00
Leonardo de Moura
de19767594
feat: basic skeleton for termination_by' vs termination_by
2022-01-11 16:53:39 -08:00
Leonardo de Moura
4e5a51aa24
chore: fix test
2022-01-11 16:23:26 -08:00
Leonardo de Moura
868a43a747
chore: remove dead code
2022-01-11 16:22:20 -08:00
Leonardo de Moura
f9b79092f6
feat: new termination_by syntax
2022-01-11 15:36:50 -08:00
Leonardo de Moura
068cc700d8
test: ackermann
2022-01-11 15:03:07 -08:00
Leonardo de Moura
381f66428a
chore: use termination_by'
...
We are going to define a higher level syntax for `termination_by`.
2022-01-11 15:00:53 -08:00
Leonardo de Moura
0434c36f89
chore: remove old version
2022-01-11 14:50:15 -08:00
Leonardo de Moura
4e47ef0cbb
chore: update stage0
2022-01-11 14:48:42 -08:00
Leonardo de Moura
430b641e81
feat: use decreasing_tactic
2022-01-11 14:47:19 -08:00
Leonardo de Moura
74f732f4cb
chore: update stage0
2022-01-11 14:45:16 -08:00
Leonardo de Moura
ce76ad44ea
feat: add terminationByCore parser
2022-01-11 14:44:36 -08:00
Leonardo de Moura
ca89da28d0
chore: prepare to rename default_decreasing_tactic
2022-01-11 14:42:25 -08:00
Leonardo de Moura
2464da0dca
feat: add support for PSigma.Lex at default_decreasing_tactic
2022-01-11 14:41:28 -08:00
Leonardo de Moura
a087b21bc0
fix: bug at WF/Fix.lean
2022-01-11 14:38:31 -08:00
Leonardo de Moura
ec49c31337
chore: make sure PSigma.lex signature is similar to Prod.lex
2022-01-11 14:37:53 -08:00
Leonardo de Moura
d953ac8d0d
feat: allow users to use initialize registerBuiltinDerivingHandler ...
2022-01-11 09:50:09 -08:00
Leonardo de Moura
93f3773d83
chore: cleanup
2022-01-10 16:25:07 -08:00
Leonardo de Moura
dae3489fe2
feat: remove partials from Init/Data/Array/Basic.lean
2022-01-10 16:05:33 -08:00
Leonardo de Moura
a02421185c
fix: add support for BinderInfo.auxDecl at delabLam
2022-01-10 15:18:49 -08:00
Leonardo de Moura
cee8ad1b66
chore: fix codebase
2022-01-10 15:07:55 -08:00
Leonardo de Moura
762b0f42ba
chore: fix tests
2022-01-10 15:06:03 -08:00
Leonardo de Moura
a28ff92010
chore: update stage0
2022-01-10 15:05:47 -08:00
Leonardo de Moura
4c918a2363
feat: use default_decreasing_tactic at WF/Fix.lean
2022-01-10 14:55:38 -08:00
Leonardo de Moura
739ef7d166
fix: annotate let rec declarations as auxDecl
...
Reason:
1- Tactics such as `assumption` should ignore them.
2- We must annotate recursive applications with `mkRecAppWithSyntax`.
2022-01-10 14:35:05 -08:00
Leonardo de Moura
57b8912279
chore: fix tests
2022-01-10 14:33:02 -08:00
Leonardo de Moura
0dd3ce0598
chore: fix test
2022-01-10 14:31:23 -08:00
Leonardo de Moura
7789779020
feat: add simple default tactic for well-founded recursion
2022-01-10 14:26:08 -08:00
Leonardo de Moura
16b4aa81e5
chore: add helper lemmas for well-founded recursion
2022-01-10 14:07:35 -08:00
Leonardo de Moura
241db0fed6
chore: fix name
2022-01-10 13:20:49 -08:00
Leonardo de Moura
929aafa4c8
fix: generate an error if declaration name clashes with variable name
...
closes #799
2022-01-10 12:08:11 -08:00
Josh Levine
99f6469761
doc: fix typo ( #935 )
2022-01-10 10:26:24 -08:00
Sebastian Ullrich
bcd7185f42
chore: CI: try reenabling sanitized Lake test
2022-01-10 18:35:22 +01:00
Sebastian Ullrich
768df1581c
chore: CI: put llvm-symbolizer in PATH for asan/lsan backtraces
2022-01-10 18:35:22 +01:00
Sebastian Ullrich
3acc21e128
chore: CI: try to make lsan terminate
2022-01-10 18:35:22 +01:00
Gabriel Ebner
dc65bb080a
fix: race condition in RPC request handler
2022-01-10 13:37:40 +01:00
Sebastian Ullrich
60a70372af
chore: remove stray file breaking stage 0 update
...
/cc @leodemoura
2022-01-10 12:57:51 +01:00
Josh Levine
1637d75d3f
doc: fix trivial typo
2022-01-09 10:19:26 +01:00
Leonardo de Moura
b2d26380f2
fix: remove auxiliary discriminant let-declarations
2022-01-07 15:03:19 -08:00
Leonardo de Moura
1cf8467847
feat: add unfold conv tactic
2022-01-07 13:51:45 -08:00
Leonardo de Moura
49d0f3af52
test: unfold tactic
2022-01-07 13:51:45 -08:00
Leonardo de Moura
57b9e0852e
fix: clear local context at mkUnfoldEq
2022-01-07 13:51:45 -08:00
Leonardo de Moura
b50e82bc93
feat: unfold tactic
2022-01-07 13:51:45 -08:00
Leonardo de Moura
c303bf6916
refactor: add helper methods for simp
2022-01-07 13:51:45 -08:00
Leonardo de Moura
b1b4705c14
feat: add unfold tactic parsers
2022-01-07 13:51:45 -08:00
Leonardo de Moura
e8a4dbbc2a
chore: document and cleanup mkUnfoldProof
2022-01-07 13:51:45 -08:00
Leonardo de Moura
b797c982fc
feat: add mkUnfoldProof
2022-01-07 13:51:45 -08:00
Gabriel Ebner
f146d456ce
fix: only enable InsertReplaceEdit if supported
2022-01-07 20:28:10 +01:00
larsk21
8c2d7a35d3
fix: make set_option completion replace typed partial name
2022-01-07 17:06:26 +01:00
Mario Carneiro
dcaf3c615f
fix: induction generalizing precedence
2022-01-07 10:45:45 +01:00
Leonardo de Moura
cc4c82a6e7
chore: update stage0
2022-01-06 17:44:42 -08:00
Leonardo de Moura
98f4e51a12
feat: add mkUnfoldEq skeleton
2022-01-06 17:42:45 -08:00
Leonardo de Moura
bef161caf7
feat: add better support for discharging equation theorem hypotheses
2022-01-06 14:42:23 -08:00
Andrei Cheremskoy
5eea97534f
chore(doc): remove duplicate Tactics section ( #927 )
2022-01-06 14:03:15 -08:00
Leonardo de Moura
df6095e580
fix: casesOnStuckLHS method
...
It was not general enough.
2022-01-06 13:54:17 -08:00
Leonardo de Moura
90b179bea9
fix: add equation theorems even if definition supports smart unfolding
...
See new test.
2022-01-06 13:53:03 -08:00
Leonardo de Moura
d8d7d63830
fix: registers eqns info before adding definition
...
Otherwise `[simp]` at definition will fail to generate equational theorems.
2022-01-06 12:24:40 -08:00
Leonardo de Moura
7acbbb4fbb
fix: auxiliary whnfAux used at mkEqns
2022-01-06 09:57:41 -08:00
Leonardo de Moura
60934bf1d5
feat: add support for removing [simp] attribute from definitions with equational theorems
2022-01-05 16:57:59 -08:00
Leonardo de Moura
c2e52bd577
feat: use getEqnsFor? when applying [simp] at definitions
2022-01-05 15:59:39 -08:00
Leonardo de Moura
ff49fd6b7e
fix: apply afterCompilation attributes after we have compiled *all* definitions in a mutual block
2022-01-05 15:57:51 -08:00
Leonardo de Moura
030e932db8
feat: use getEqnsFor? at simp
2022-01-05 11:28:24 -08:00
Leonardo de Moura
4d1343d670
chore: use _eq instead of eq to name auto generated equational theorems
2022-01-04 17:23:34 -08:00
Leonardo de Moura
b2918e0c76
test: add tests for WF.mkEqns
2022-01-04 17:18:51 -08:00
Leonardo de Moura
d782a97f5c
feat: add WF.mkProof for WF.mkEqns
2022-01-04 17:00:54 -08:00
Leonardo de Moura
2a0cd18d4b
feat: add WF.mkEqns
2022-01-04 15:44:05 -08:00
Leonardo de Moura
fa597c6fb8
chore: update stage0
2022-01-04 15:32:33 -08:00
Leonardo de Moura
d941e97716
feat: add WF/Eqns.lean skeleton
2022-01-04 15:31:22 -08:00
Leonardo de Moura
947240ef9e
refactor: add PreDefinition/Eqns.lean
2022-01-04 13:52:41 -08:00
ammkrn
f2cc9080a3
doc: document the split tactic
2022-01-04 13:28:36 -08:00
Mario Carneiro
5a7c9f2d35
chore: add showRhs definition
2022-01-04 09:28:29 -08:00
Leonardo de Moura
62d03fe8ad
chore: update stage0
2022-01-04 09:27:33 -08:00
Mario Carneiro
9ee0d08cb5
chore: add doc
2022-01-04 09:26:34 -08:00
Mario Carneiro
3716e9a2ed
chore: use a different syntax kind for suffices-by
...
chore: update src/Lean/Parser/Term.lean
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2022-01-04 09:26:32 -08:00
Gabriel Ebner
83e167dfb5
feat: append filename to worker command-line
...
This change has no effect on the server behavior. The only difference
is that the filename now shows up in `htop`, `ps`, etc., which makes it much
easier to see what Lean processes are running, and which are using 100%
CPU, etc.
2022-01-04 15:10:46 +01:00
Sebastian Ullrich
64971a1e3c
fix: term macro errors should be fatal
2022-01-04 11:20:18 +01:00
Leonardo de Moura
a000ee4249
chore: update stage0
2022-01-03 10:33:37 -08:00
Leonardo de Moura
b9f7d1defb
fix: constant folding after erasure
...
closes #909
2022-01-03 10:33:07 -08:00
Leonardo de Moura
0e479d1f9f
chore: use double ticks
2022-01-03 10:30:05 -08:00
Leonardo de Moura
bf17eec439
chore: update stage0
2022-01-03 09:37:18 -08:00
Leonardo de Moura
e9c112007b
fix: avoid Syntax trees leaks into .olean files
...
closes #918
2022-01-03 09:36:06 -08:00
Leonardo de Moura
52b6a04088
test: for #916
2022-01-03 07:57:16 -08:00
Mario Carneiro
5e36162f9b
fix: adapt to doHave syntax change
2022-01-03 07:55:52 -08:00
Mario Carneiro
3253231d59
feat: make rw [] syntactically correct
2022-01-03 07:23:24 -08:00
Leonardo de Moura
7dcc026cd1
chore: update stage0
2022-01-03 07:16:13 -08:00
Gabriel Ebner
bc5bd5a671
feat: allow the compiler to optimize unsafeCast
2022-01-03 07:13:55 -08:00
Gabriel Ebner
5cdaeac36f
chore: update stage0
2022-01-03 07:13:55 -08:00
Gabriel Ebner
e605c541d0
fix: do not infer type in erase_irrelevant
...
At the time erase_irrelevant is called, we have already eliminated the
`cast`-applications. Therefore non-atomic expressions may no longer
be well-typed (and `infer_type` can fail).
2022-01-03 07:13:55 -08:00
gabriel-doriath-dohler
6986032b38
doc: correct the link to "Lean Together 2021: Metaprogramming in Lean 4 continued"
2022-01-03 07:06:04 -08:00
Sebastian Ullrich
bbfcb1cfb2
perf: allocation-free for i in [n:m] do
2022-01-03 07:03:56 -08:00
Sebastian Ullrich
555584375a
fix: compare fields top-down in deriving Ord
2022-01-03 07:02:13 -08:00
Sebastian Ullrich
132898f7e7
fix: reinstate monadic panic workaround
2022-01-03 14:58:24 +01:00
Henrik Böving
2d85c9ba2f
chore: fix notation test
...
The ppNotationCode.lean test failed because the output of the notation
elaborator changed (purposely), adapt it to the new output.
2022-01-03 13:47:11 +01:00
Sebastian Ullrich
75233a40f7
chore: update stage0
2022-01-03 13:46:56 +01:00
Henrik Böving
4ee058039b
chore: apply suggestions from code review
...
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2022-01-03 13:43:33 +01:00
Henrik Böving
5d3e3b9296
fix: don't drop tags in identNoAntiquot
2022-01-03 13:43:33 +01:00
Henrik Böving
6fe010d0c2
fix: keep info in auto generated notation delaborators
...
Previously automatically generated delaborators for syntax declared with
the notation (and derived) keywords would silently drop information
during delaboration.
2022-01-03 13:43:33 +01:00
Henrik Böving
cbedff5aba
feat: optionally add information to all symbols during delaboration
...
Add an option called pp.tagSymbols which, if set, makes the
delaborator add term information to all symbols it can during
delaboration. This option is disabled per default because it would
break the LSP server's hovering behaviour. It is however useful
when for example automatically generating interactive documentation.
2022-01-03 13:43:33 +01: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
Mac
748c9ab73a
chore: tweak error message
...
Co-authored-by: Wojciech Nawrocki <wjnawrocki+gh@protonmail.com >
2021-12-27 09:44:11 +01:00
tydeu
30bdd4e751
doc: add docstring for chainLspRequestHandler
2021-12-27 09:44:11 +01:00
tydeu
004e172f5d
feat: LSP request handler chaining
2021-12-27 09:44:11 +01:00
Sebastian Ullrich
3da76efa10
chore: Nix: remove Leanpkg from default deps
2021-12-25 17:00:20 +01: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
Gabriel Ebner
70ef4e529c
feat: allow attributes on structures and inductives
2021-12-23 08:04:36 -08:00
Gabriel Ebner
f43f74e78f
chore: suppress newline after .
2021-12-23 13:56:22 +01:00
Gabriel Ebner
72851652f1
fix: spacing in suffices...by
2021-12-23 13:56:22 +01:00
Gabriel Ebner
25714a8ee1
fix: calc syntax roundtrip
2021-12-23 13:56:22 +01:00
Mario Carneiro
7956a9bb15
chore: typos
2021-12-23 10:14:39 +01:00
Sebastian Ullrich
292fb257a7
perf: do not specialize Prop typeclasses
2021-12-22 17:48:11 -08:00
Sebastian Ullrich
399ad64854
perf: do not specialize Inhabited
2021-12-22 17:48:11 -08:00
Sebastian Ullrich
45e8d9af43
feat: support [nospecialize] on typeclasses
2021-12-22 17:48:11 -08:00
Sebastian Ullrich
b4385bd259
perf: export lake symbols for the interpreter
2021-12-22 23:33:58 +01:00
tydeu
d4e7e33652
feat: split Lake context from BuildContext and also use it in scripts
2021-12-22 00:39:36 -05:00
Gabriel Ebner
546bb8f053
fix: widgets: do not highlight entire expression in popup
2021-12-21 21:54:51 +01:00
Sebastian Ullrich
fdd939fc40
fix: accidental memory leak in last commit
2021-12-21 19:43:02 +01:00
Sebastian Ullrich
3318f1fb05
feat: record declaration name in interpretation profile
2021-12-21 19:04:58 +01:00
Sebastian Ullrich
c62c8bd64b
chore: reenable servertest_edit
2021-12-21 18:11:28 +01:00
Gabriel Ebner
412691c958
feat: support LEAN_NUM_THREADS environment variable
2021-12-21 17:01:08 +01:00
Sebastian Ullrich
5b653197db
chore: use --run for servertests
...
/cc @Garmelon
2021-12-21 16:04:21 +01:00
Sebastian Ullrich
cbdad10419
chore: exclude flaky laketest under sanitizer for now
...
unclear how to reproduce
2021-12-21 12:19:22 +01:00
Sebastian Ullrich
b732484663
fix: do not consider worker threads as idle during startup
...
Without this change, enqueuing multiple tasks before the first worker
was started led to only a single worker being created. Now the first
increment and decrement happen under the task manager mutex, so
effectively the worker is never idle until it is out of tasks.
2021-12-21 12:01:23 +01:00
Leonardo de Moura
b278a20ac2
feat: ensure #eval converts unassigned universe metavars into parameters
...
see #898
2021-12-20 06:11:36 -08:00
Sebastian Ullrich
51dc32957b
feat: show universe args on hover
...
We might also want to replace them with fresh vars to make the hover
completely independent of the context, but this change at least avoids
any hidden information.
2021-12-20 10:51:44 +01: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
Sebastian Ullrich
068ea1beb4
fix: leanc: do not change sysroot
...
Apparently clang is smart enough to look up runtime files missing from
the sysroot in the installation directory automatically.
2021-12-19 18:55:57 +01:00
Chris Lovett
c3a9860dc8
doc: replace leanpkg info with info about Lake
...
Fixes #789
2021-12-19 17:23:25 +01:00
Sebastian Ullrich
6f9c6e4556
doc: match: mention (generalizing := true)
2021-12-19 11:14:27 +01:00
Sebastian Ullrich
5f96a9fc4d
fix: do not show type of sort in hover
...
Fixes #896
2021-12-19 11:03:15 +01:00
tydeu
f4a73889e7
feat: expose more version info (e..g., toolchain)
2021-12-19 10:44:35 +01:00
Leonardo de Moura
92a511be29
chore: fix test
2021-12-18 11:05:37 -08:00
Leonardo de Moura
6499798a35
chore: update stage0
2021-12-18 11:01:54 -08:00
Sebastian Ullrich
167dccce0b
chore: move Leanpkg.leanVersionString to Init
2021-12-18 10:59:37 -08:00
Sebastian Ullrich
234d806f6b
chore: deprecate leanpkg
2021-12-18 10:59:37 -08:00
Mario Carneiro
f17064809c
fix doctest
2021-12-18 10:58:57 -08:00
Mario Carneiro
f22f699d62
feat: split replicate / replicateTR with @[csimp]
2021-12-18 10:58:57 -08:00
Leonardo de Moura
be6bc67eb0
fix: ensure match-expressions compiled using if-then-else can be reduced with TransparencyMode.reducible
...
closes #891
2021-12-18 10:55:42 -08:00
Leonardo de Moura
b3d8766b09
chore: use doubleticks at WHNF.lean
2021-12-18 08:43:50 -08:00
Leonardo de Moura
b6fbdd8679
feat: add Meta.Context.canUnfold?
2021-12-18 08:25:56 -08:00
Leonardo de Moura
c954fc9ec7
fix: bug at simpLoop
2021-12-18 06:48:08 -08:00
Sebastian Ullrich
cd94ec20b0
fix: aux_def: avoid creating unparseable names
2021-12-17 14:21:35 -08:00
Mario Carneiro
51a78fd7af
fix: change argument order of List.get[!?D]
2021-12-17 14:21:00 -08:00
Mario Carneiro
caf09e85ad
chore: universe generalize implies_true
2021-12-17 14:19:54 -08:00
Leonardo de Moura
d51def739e
chore: update stage0
2021-12-17 07:25:59 -08:00
Leonardo de Moura
dce55f79ed
feat: eliminate recursive application syntax annotation at addAndCompileUnsafe
2021-12-17 07:24:44 -08:00
Leonardo de Moura
7df9cf6a0a
feat: eliminate "recAppSyntax" information during structural recursion
2021-12-17 07:15:14 -08:00
Leonardo de Moura
6b82e15069
feat: preserve variable names when packing domain
2021-12-17 07:10:26 -08:00
Leonardo de Moura
8b7411bdd8
feat: improve error location at well-founded recursion
2021-12-17 06:50:20 -08:00
Sebastian Ullrich
9e5ff3db0e
feat: setMainModule in worker
2021-12-17 12:22:53 +01:00
Sebastian Ullrich
ca740f5687
chore: fix copy-produced
2021-12-17 12:22:53 +01:00
Sebastian Ullrich
51adfa2e0c
fix: do not call lake print-paths for lakefile.lean
...
Fixes #873
2021-12-17 12:22:30 +01:00
tydeu
e34c892f89
chore: update Lake
2021-12-17 10:20:37 +01:00
Sebastian Ullrich
5a16745ad9
chore: Nix: add devShell
2021-12-17 09:43:22 +01:00
tydeu
8fb9dd8478
fix: consider globbed files local
...
easiest way to fix mathport builds (for now)
2021-12-16 21:56:10 -05:00
Leonardo de Moura
2d4d5ae96f
feat: save syntax around recursive applications
...
Motivation: better error messages at structural and well-founded recursion.
2021-12-16 17:13:55 -08:00
Leonardo de Moura
e38fab1b4e
fix: ignore Expr.MData at deltaRHS?
2021-12-16 16:58:10 -08:00
Leonardo de Moura
de29657594
feat: implement bool operator==(data_value const & a, data_value const & b) using Lean autogenerated code
2021-12-16 16:37:47 -08:00
Leonardo de Moura
dbe96a4434
chore: update stage0
2021-12-16 15:48:29 -08:00
Leonardo de Moura
867134614b
feat: add constructor DataValue.ofSyntax
2021-12-16 15:41:29 -08:00
Gabriel Ebner
e65f3fe810
fix: use redirected stderr for tout()
2021-12-16 10:23:05 -08:00
Sebastian Ullrich
1221bdd3c7
fix: use redirected stderr for timeit & allocprof
2021-12-16 06:38:35 -08:00
Sebastian Ullrich
87e860f871
perf: Array.push: move elements directly when source is unique
2021-12-16 06:37:37 -08:00
tydeu
72cfe18e9f
chore: update Lake
2021-12-16 11:10:33 +01:00
Joe Hendrix
5a307a93ac
fix: bug at ByteArray.copySlice
2021-12-16 11:05:19 +01:00
tydeu
34bf090300
fix: build dep's extraDepTarget not root's for each dep
2021-12-16 01:03:21 -05:00
Leonardo de Moura
fa8b015603
chore: update stage0
2021-12-15 17:09:39 -08:00
tydeu
d781c3411a
feat: add getLeanSysroot and getLeanLibDir
2021-12-15 20:08:14 -05:00
Leonardo de Moura
81f7335269
fix: ensure motive is type correct at simpProj
2021-12-15 17:07:31 -08:00
Leonardo de Moura
0a81093db5
fix: bug at simpProj
...
This bug was reported at https://github.com/dwrensha/lean4-maze/issues/1
2021-12-15 17:07:00 -08:00
Leonardo de Moura
9a24db4e86
fix: check generated motives at ▸ notation
...
This commit also improves the `▸` notation a bit.
It now tries `subst` (if applicable) before failing.
2021-12-15 16:16:42 -08:00
Leonardo de Moura
89edc184fb
feat: compleation at #print command
2021-12-15 13:13:39 -08:00
Leonardo de Moura
653b684651
feat: improve getCompletionKindForDecl
2021-12-15 12:57:09 -08:00
Leonardo de Moura
7d7c6d8be5
feat: add CompletionItemKind
2021-12-15 11:24:11 -08:00
Leonardo de Moura
31f845c5ed
feat: keyword completion
2021-12-15 11:24:11 -08:00
Leonardo de Moura
043e9c80b4
feat: add Trie.findPrefix
2021-12-15 11:24:11 -08:00
Sebastian Ullrich
ba83721109
chore: add comment for previous fix
2021-12-15 20:10:48 +01: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
Sebastian Ullrich
35e623fca0
chore: update stage0
2021-12-15 15:58:32 +01:00
Sebastian Ullrich
c8c39aa4bb
chore: lean-gdb: fix RC printing
2021-12-15 15:58:31 +01:00
Sebastian Ullrich
3c9ea3b113
fix: wait on tasks before Lean program exit
2021-12-15 15:58:24 +01:00
larsk21
efa2ded224
chore: bump server version to 0.1.1
2021-12-15 13:00:05 +01:00
larsk21
d50c08360d
feat: change error flag to progress kind in LeanFileProgressProcessingInfo
2021-12-15 13:00:05 +01:00
larsk21
dcbc526115
feat: report header processing errors as error progress
2021-12-15 13:00:05 +01:00
larsk21
925c530673
feat: add error field to LeanFileProgressProcessingInfo
2021-12-15 13:00:05 +01:00
Siddharth
37982c6d5c
doc: structure update
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2021-12-15 11:48:46 +00:00
Gabriel Ebner
230d6d2cf5
fix: use group for if-then-else
2021-12-15 11:42:38 +00:00
Gabriel Ebner
202fd1414a
chore: update stage0
2021-12-15 11:42:38 +00:00
Gabriel Ebner
d6f629860b
feat: add ppRealFill and ppRealGroup combinators
2021-12-15 11:42:38 +00:00
Gabriel Ebner
b905824024
chore: fix tests
2021-12-15 11:42:38 +00:00
Gabriel Ebner
ab3e08190b
feat: allow opt-out of grouping in formatter
2021-12-15 11:42:38 +00:00
Gabriel Ebner
b6efece612
fix: missing space after /--
2021-12-15 11:42:38 +00:00
Gabriel Ebner
4f81972996
fix: missing newline before inductionAlt
2021-12-15 11:42:38 +00:00
Gabriel Ebner
f1fc8f2441
fix: space before where/:= in inductive
2021-12-15 11:42:38 +00:00
Gabriel Ebner
7be0d7ec16
fix: space before $
2021-12-15 11:42:38 +00:00
Gabriel Ebner
3f73442a5a
fix: space before infer modifiers
2021-12-15 11:42:38 +00:00
Gabriel Ebner
b176efefca
fix: print line before deriving
2021-12-15 11:42:38 +00:00
Gabriel Ebner
5d25df1a69
fix: indenting of match arms in declValEqns
2021-12-15 11:42:38 +00:00
Gabriel Ebner
067c181075
fix: space after @&
2021-12-15 11:42:38 +00:00
Gabriel Ebner
e1b2c945e3
fix: suppress extra spaces in formatter
2021-12-15 11:42:38 +00:00
Gabriel Ebner
2b7ec7f9ef
fix: spacing around (← monadic lifts)
2021-12-15 11:42:38 +00:00
Gabriel Ebner
52b36cad1d
fix: whitespace around parens in open/export
2021-12-15 11:42:38 +00:00
Gabriel Ebner
87faa7a93a
fix: whitespace after rw/simp [<-
2021-12-15 11:42:38 +00:00
Gabriel Ebner
f219188c95
fix: indent declaration signatures
2021-12-15 11:42:38 +00:00
Gabriel Ebner
e90bdd00db
fix: indent where definitions and add space before
2021-12-15 11:42:38 +00:00
Gabriel Ebner
f5a2562575
fix: indent structure fields
2021-12-15 11:42:38 +00:00
Gabriel Ebner
316fa81042
fix: print spaces around <| and |>
2021-12-15 11:42:38 +00:00
Gabriel Ebner
f1d583c9cf
fix: newline in whereDecls
2021-12-15 11:42:38 +00:00
Gabriel Ebner
448d2cd951
feat: add script to reformat lean files
2021-12-15 11:42:38 +00:00
Gabriel Ebner
7e483d3a0a
feat: support syntax abbreviations in dynamic quotations
2021-12-15 11:17:58 +00:00
tydeu
a3250dc44b
feat: expose --load-dynlib functionality to Lean code
2021-12-15 08:26:48 +00:00
Leonardo de Moura
34430cd7c3
fix: semantic highlighting for keywords of the form #<alpha>...
...
closes #703
2021-12-14 17:58:56 -08:00
Leonardo de Moura
5b14caf329
fix: missing addTermInfo at elabAtomicDiscr
...
closes #820
2021-12-14 17:20:46 -08:00
tydeu
42d8c333a6
chore: update Lake
2021-12-14 14:36:21 -08:00
tydeu
e37cde0def
test: reorganize ffi example
2021-12-14 16:45:43 -05:00
Gabriel Ebner
45bcef5dab
refactor: server: use String.firstDiffPos to find changes
...
This is necessary so that we do not reprocess the whole file if
incremental sync is disabled.
2021-12-14 11:55:34 -08:00
tydeu
c0693c93be
chore: update Lake
2021-12-14 11:53:51 -08:00
Leonardo de Moura
448bac5b3e
chore: one add_test per lake test
2021-12-14 11:48:14 -08:00
tydeu
7199eea687
refactor: cleanup/improve Target utils
2021-12-14 14:12:43 -05:00
Leonardo de Moura
136fab0723
feat: improve error message for let ... ← ... outside of a do
2021-12-14 08:56:22 -08:00
Leonardo de Moura
1c83ea9e40
fix: typo at hasUnusedArguments
...
See comment at #815
2021-12-14 06:50:34 -08:00
tydeu
26a225e230
chore: fix tests
2021-12-14 09:33:52 +01:00
tydeu
d518ba7f08
feat: use BaseIO more in Init.System.IO
2021-12-14 09:33:52 +01: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
Leonardo de Moura
3856d0030c
feat: improve do notation error message for pure code
...
See #770
2021-12-13 11:08:38 -08:00
Leonardo de Moura
e335b2ac8a
feat: add noncomputable sections
...
See https://github.com/leanprover-community/mathport/issues/71
2021-12-13 11:02:46 -08:00
Leonardo de Moura
5f0def2edf
chore: update stage0
2021-12-13 10:39:19 -08:00
Leonardo de Moura
55db56f80d
feat: add noncomputable section parser
2021-12-13 10:35:16 -08:00
tydeu
e054596cfa
chore: bump Lean version
2021-12-13 10:59:53 -05:00
Sebastian Ullrich
0ade9ee39b
fix: make IO.Process.Child.wait fallible
2021-12-13 15:12:48 +01:00
Leonardo de Moura
3a6cc77424
chore: update lake
2021-12-12 08:29:30 -08: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
Leonardo de Moura
133c58aba2
chore: update stage0
2021-12-12 08:17:30 -08:00
Leonardo de Moura
bf3b0c53ad
chore: add helper parser
2021-12-12 08:16:42 -08:00
Leonardo de Moura
b2e065a3ba
chore: avoid where structure instance notation
...
This is a workaround to avoid staging issues.
2021-12-12 07:59:38 -08:00
Leonardo de Moura
b6ef65d8fd
fix: where structure instance parser
...
closes #753
2021-12-12 07:52:52 -08:00
Leonardo de Moura
a3361e7d86
fix: missing universe assignments made during TC resolution
...
closes #796
2021-12-12 07:07:13 -08:00
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
Sebastian Ullrich
a91b861919
Revert "chore: CI: propagate prepare-*.sh errors"
...
This reverts commit 198d3103cd .
2021-12-11 17:37:12 +01:00
Sebastian Ullrich
198d3103cd
chore: CI: propagate prepare-*.sh errors
2021-12-11 09:51:27 +01:00
Sebastian Ullrich
ed3dad9313
fix: bundling on Linux
2021-12-11 09:10:06 +01:00
tydeu
d785652792
chore: update Lake
2021-12-10 16:38:31 -08:00
Leonardo de Moura
d5f1a5d1d1
fix: in-word completion
...
closes #857
2021-12-10 15:48:35 -08: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
Sebastian Ullrich
fddbc3c09e
fix: empty option completion
2021-12-10 14:19:19 -08:00
Sebastian Ullrich
a4633d30e2
fix: option completion after trailing .
2021-12-10 14:19:19 -08:00
Sebastian Ullrich
74dba7c64e
fix: do not hide trace messages on partial syntax
2021-12-10 14:19:19 -08:00
Sebastian Ullrich
ce2e733f17
fix: make option completion work in presence of value
2021-12-10 14:19:19 -08:00
Leonardo de Moura
1003840376
chore: update lake
2021-12-10 13:20:27 -08:00
Leonardo de Moura
0555e29808
chore: do cannot be used in pure code anymore
...
cc @tydeu
2021-12-10 13:18:27 -08:00
Leonardo de Moura
63decd445c
chore: fix test
2021-12-10 13:13:03 -08:00
Leonardo de Moura
68bd55af32
chore: fix codebase
2021-12-10 13:12:09 -08:00
Leonardo de Moura
d9d44baabe
chore: update stage0
2021-12-10 12:56:00 -08:00
Leonardo de Moura
483f32edd8
feat: in pure code, do use assume Id monad at do notation
...
This feature produced counterintuitive behavior and confused users.
See discussion at #770 .
As pointed out by @tydeu, it is not too much work to write `Id.run <|`
before the `do` when we want to use the `do` notation in pure code.
closes #770
2021-12-10 12:55:14 -08:00
Leonardo de Moura
96e0e1db98
fix: nontermination at simp [OfNat.ofNat]
...
closes #788
2021-12-10 12:29:33 -08:00
Leonardo de Moura
47c2d335d4
fix: completion for aliases
...
closes #863
2021-12-10 12:14:11 -08:00
Leonardo de Moura
84f374702d
feat: add fields isInstance and isType to InteractiveHypothesis
...
see https://github.com/leanprover/vscode-lean4/issues/76
2021-12-10 09:08:55 -08:00
Sebastian Ullrich
5796bb835c
fix: Nix: shell.nix on macOS
2021-12-10 16:13:45 +01:00
Joscha
d19cfede02
fix: implement suggestions
2021-12-10 15:25:43 +01:00
Joscha
e4406f1785
fix: find references to function parameters in function body
...
With #861 , the server can now connect the occurrences of parameters in the
function definition and in the function body to each other.
2021-12-10 15:25:43 +01:00
Joscha
12ee541622
fix: reference fields in constructor correctly
2021-12-10 15:25:43 +01:00
Joscha
11ba6dc216
test: add simple "find references" test
2021-12-10 15:25:43 +01:00
Joscha
2823cbc87b
feat: implement single-file "find references" in LSP server
2021-12-10 15:25:43 +01:00
Leonardo de Moura
e64cfbb9b2
test: well-founded recursion example
...
see #860
2021-12-09 14:32:06 -08:00
Leonardo de Moura
45f5909dd0
chore: register Elab.resume trace class
2021-12-09 13:37:39 -08:00
Sebastian Ullrich
77aed3a0b1
fix: add binder info nodes for parameter copies in body
2021-12-09 18:12:51 +01:00
Leonardo de Moura
da33f498f5
feat: show argument name at "don't know how to synthesize placeholder" error messages
2021-12-09 06:48:06 -08:00
Leonardo de Moura
ff90459fd2
feat: add Lean.Elab.Term.getMVarErrorInfo?
2021-12-09 06:48:06 -08:00
Leonardo de Moura
914f181641
feat: add ForIn instance for MVarIdMap
2021-12-09 06:48:06 -08:00
Sebastian Ullrich
a91e5d69f3
chore: lean4-mode: save buffer in lean4-diff-test-file
2021-12-09 15:45:45 +01:00
Michael Burge
6d57299396
chore: set Nix flake's defaultPackage to lean-all for interactive use
...
Allows Nix flake to run tutorial and other simple examples out-of-the-box.
Closes #858
2021-12-09 12:06:25 +01:00
Sebastian Ullrich
265c18accd
doc: faq: bullet points look weird and are not anchors
2021-12-09 11:53:25 +01:00
Leonardo de Moura
d3713e8952
chore: update stage0
2021-12-07 16:44:26 -08:00
Leonardo de Moura
41040a81de
fix: auxiliary matcher definitions should be treated as abbreviations
...
The motivation is to prevent performance problems such as the one
described at issue #854 .
Fixes #854 after a update stage0
2021-12-07 16:43:20 -08:00
Leonardo de Moura
b0fe1e5d10
feat: add Tomas Skrivan's TC resolution improvement
...
This commit implements the TC resolution improvement suggested by
Tomas at #815 .
Closes #815 .
2021-12-06 17:46:11 -08:00
Wojciech Nawrocki
c97487fd65
feat: add blackboard bold characters
2021-12-06 17:45:44 -08:00
Wojciech Nawrocki
c57a664127
feat: lean4-mode: add missing mathematical scripts
2021-12-06 23:16:22 +01:00
Leonardo de Moura
7b6732a137
refactor: ExprDefEq.lean and LevelDefEq.lean are now implementation only files
...
We use the export/extern idiom to define `isLevelDefEqAux`, and then
define the `isDefEq` user facing functions at `Meta/Basic.lean`.
2021-12-06 09:57:00 -08:00
Sebastian Ullrich
f0fa6dcbc5
refactor: remove unnecessary Lean.Elab.Term imports
2021-12-06 09:28:56 -08:00
Leonardo de Moura
7de749a23c
refactor: move setElabConfig to Elab directory
...
see #849
2021-12-06 08:12:59 -08:00
Severen Redwood
af944e69c0
doc: fix typo in documentation for sorry tactic
2021-12-06 17:12:31 +01:00
Sebastian Ullrich
80c3d88e3e
refactor: optimize critical import path
2021-12-06 08:05:24 -08:00
Sebastian Ullrich
458dc64fcb
refactor: Lean.Meta should not depend on Lean.Elab
2021-12-06 08:05:24 -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
Sebastian Ullrich
45917f2f90
chore: Nix: simplify package instructions
2021-12-04 12:14:47 +01:00
Lorenz Leutgeb
171624d7a7
chore: nix flake update
...
• Updated input 'flake-utils':
'github:numtide/flake-utils/f7e004a55b120c02ecb6219596820fcd32ca8772' (2021-06-16)
→ 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28)
• Updated input 'mdBook':
'github:leanprover/mdBook/d97081c547e96b41a9a16197882127e7e8917a3d' (2021-09-30)
→ 'github:leanprover/mdBook/45de7509526f09915b19e4eaeec99c8c2031f1ce' (2021-11-19)
• Updated input 'nix':
'github:NixOS/nix/9c766a40cbbd3a350a9582d0fd8201e3361a63b2' (2021-09-27)
→ 'github:NixOS/nix/2ff71b021379a2c9bbdcb789a93cdc585b3520ca' (2021-12-02)
• Updated input 'nix/lowdown-src':
'github:kristapsdz/lowdown/0b85e777f3cdacf4210f0d624a0ceec8df612e05' (2021-09-23)
→ 'github:kristapsdz/lowdown/d2c2b44ff6c27b936ec27358a2653caaef8f73b8' (2021-10-06)
• Updated input 'nix/nixpkgs':
'github:NixOS/nixpkgs/f6551e1efa261568c82b76c3a582b2c2ceb1f53f' (2021-08-11)
→ 'github:NixOS/nixpkgs/82891b5e2c2359d7e58d08849e4c89511ab94234' (2021-09-28)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/ee084c02040e864eeeb4cf4f8538d92f7c675671' (2021-10-04)
→ 'github:NixOS/nixpkgs/391f93a83c3a486475d60eb4a569bb6afbf306ad' (2021-12-01)
• Updated input 'temci':
'github:parttimenerd/temci/fe4f47173a27cf75f734502fcb88d3d0a3860dca' (2021-07-21)
→ 'github:parttimenerd/temci/a8d78cb52c248f1ae3f2469bbd0916b14ac9ea84' (2021-11-29)
2021-12-03 14:44:19 +01:00
Sebastian Ullrich
2e47a8d5ca
test: actually register new benchmark
2021-12-03 09:25:53 +01: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
Leonardo de Moura
b2d88f7bcc
fix: bug at saveEqn
2021-12-02 17:38:39 -08:00
Leonardo de Moura
bf3a1e94a9
feat: add LocalContext.foldrM
2021-12-02 17:19:30 -08:00
Leonardo de Moura
bb768b06cd
feat: add PersistentArray.foldrM
2021-12-02 17:17:55 -08:00
Leonardo de Moura
01615f175c
chore: cleanup
2021-12-02 15:02:57 -08:00
Gabriel Ebner
c7565c446a
fix: casts on big-endian
2021-12-02 09:57:58 -08:00
Sebastian Ullrich
5869283694
test: new linear solver benchmark by Marc
2021-12-02 17:03:35 +01:00
Sebastian Ullrich
b6d5cd8155
fix: forward USE_GMP to stage 0
2021-12-02 15:52:48 +01:00
Sebastian Ullrich
1ade96cfab
fix: assertion with USE_GMP=OFF
2021-12-02 15:11:47 +01:00
Leonardo de Moura
c42196440f
fix: give preference to non-indices at findRecArg
...
fixes #837
2021-12-01 16:45:19 -08:00
Leonardo de Moura
5d73f0eb01
chore: fix typo
2021-12-01 15:08:41 -08:00
Leonardo de Moura
c54caa1a1f
chore: update stage0
2021-12-01 13:48:10 -08:00
Leonardo de Moura
5e9ebf044a
fix: insert_mpz
2021-12-01 13:47:05 -08:00
Leonardo de Moura
f0c946aa02
chore: update stage0
2021-12-01 13:38:20 -08:00
Leonardo de Moura
92a5f8f18e
fix: insert_mpz
2021-12-01 13:38:20 -08:00
Leonardo de Moura
988b316e3f
feat: check "LEAN_ABORT_ON_PANIC" environment variable at lean_internal_panic
2021-12-01 13:38:20 -08:00
Leonardo de Moura
375de32bfb
fix: fix_mpz
2021-12-01 13:38:19 -08:00
Chris Lovett
10649baf8d
fix: potential buffer override on command line args ( #839 )
2021-12-01 12:14:48 -08:00
Leonardo de Moura
5c39ddbad1
chore: update stage0
2021-11-30 17:57:59 -08:00
Leonardo de Moura
e9e40789c1
fix: mpz::power for USE_GMP=OFF
2021-11-30 17:57:33 -08:00
Leonardo de Moura
7185f99822
chore: update stage0
2021-11-30 17:47:42 -08:00
Leonardo de Moura
83d6eb1c72
fix: mpz::mul2k for USE_GMP=OFF
2021-11-30 17:19:16 -08:00
Leonardo de Moura
e1f0733a1c
chore: update stage0
2021-11-30 16:49:34 -08:00
Leonardo de Moura
9a81ae556a
feat: add support for USE_GMP=OFF at compact.cpp
2021-11-30 16:46:53 -08:00
Leonardo de Moura
8aca088752
feat: mpz missing methods for USE_GMP=OFF
2021-11-30 16:46:53 -08:00
Leonardo de Moura
c6f5c3717c
chore: use size_t at buffer
...
Add `buffer::ensure_capacity`.
2021-11-30 16:46:53 -08:00
Sebastian Ullrich
4aab42f9aa
fix: segfault when passing scalar object to dbgTraceIfShared
2021-11-30 19:07:46 +01:00
tydeu
1284616296
refactor: revamp Async API
2021-11-30 11:56:35 -05:00
Gabriel Ebner
4964f5eb05
chore: add test
2021-11-30 15:34:54 +01:00
Gabriel Ebner
70ad1deb00
fix: catch error in msgToInteractiveDiagnostic
...
Otherwise, any error while pretty-printing would kill the server (file
worker).
2021-11-30 15:34:54 +01:00
Gabriel Ebner
21f0b8c397
chore: update stage0
2021-11-30 15:34:54 +01:00
Gabriel Ebner
9a2140b3db
refactor: auto-generate (builtin)Parenthesizer attribute
...
We already generated `(builtin)Parenthesizer` (and `*Formatter`)
attributes for definitions tagged with `(builtin)*Parser`. This commit
extends this support to all Parser-definitions, as long as we can
determine the syntax node kind syntactically (i.e., the parser
definition contains a leadingNode/node/trailingNode/nodeWithAntiquot
call).
2021-11-30 15:34:54 +01:00
Leonardo de Moura
e5b3b180dc
feat: some mpz methods for LEAN_USE_GMP=OFF
2021-11-29 17:55:04 -08:00
Leonardo de Moura
ec6932fbb7
feat: some mpz methods for LEAN_USE_GMP=OFF
2021-11-29 16:01:07 -08:00
Leonardo de Moura
68fc9a9115
feat: add dummy mpz implementation for LEAN_USE_GMP=OFF
2021-11-29 11:42:08 -08:00
Leonardo de Moura
0002d8bd04
chore: missing #ifdef LEAN_USE_GMP
2021-11-29 11:35:13 -08:00
Leonardo de Moura
6396f3b2c1
chore: simplify mpz.h
...
Add basic support for `LEAN_USE_GMP=OFF`.
2021-11-29 11:11:49 -08:00
Leonardo de Moura
7435fd5dd4
chore: add USE_GMP cmake option
2021-11-29 10:25:26 -08:00
Sebastian Ullrich
0764967757
fix: getFVarId
2021-11-29 10:06:15 -08:00
Sebastian Ullrich
465913c391
fix: this must be a keyword
2021-11-29 10:06:15 -08:00
Sebastian Ullrich
531eefb7db
chore: adapt syntax
2021-11-29 10:06:15 -08:00
Sebastian Ullrich
d253b2d2a7
chore: update stage0
2021-11-29 10:06:15 -08:00
Sebastian Ullrich
9cca1a57e0
feat: generalize syntax of fvar-accepting tactics
2021-11-29 10:06:15 -08:00
Anders Christiansen Sørby
cfe924e53e
feat: Nix: add nativeSharedLibs option
...
* feat: Add nativeSharedLibs option
Use LD_PRELOAD with staticLibDeps
Add a verbose flag when debug is true
Use shared libs instead
feat: Add recursive nativeSharedLibs
Repair printPaths
Remove -v flag from lean call
feat: Use new load-dynlib option
Remove LD_PRELOAD
fix: Add allNativeSharedLibs to allLinkFlags
Trying to fix native linking
feat: Automatic link flags of nativeSharedLibs
fix: Add gmp to sharedLib buildInputs
* fix: Wrap executable files in a linker group
This is a bit slower but ensures that cycles or bad ordering of the
static lib dependencies is resolved.
* Convert allExternalDeps to a list
Breaking change if you depend on allExternalDeps being a attrset
2021-11-28 17:56:01 +01:00
Joshua Seaton
a9317760e7
chore: update IR interpreter enum hygiene
...
This change addresses -Wreturn type and -Wimplicit-fallthrough
infractions in the IR interpreter. Moreover, default switch cases on
enum classes are removed to leverage compiler complaints of missing
cases, which ensures that all related switch logic gets thoughtfully
extended when the enums are extended themselves.
2021-11-28 10:29:08 +01:00
Sebastian Ullrich
a329896e70
feat: refine declaration ranges at instance & example
2021-11-27 07:25:15 -08:00
Sebastian Ullrich
4f15805787
feat: annotate declarations with term infos
2021-11-27 07:25:15 -08:00
Leonardo de Moura
0aa32d643e
fix: eta struct and proof irrelevance issue
...
see #777
2021-11-27 07:15:57 -08: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
Leonardo de Moura
b5afc34391
chore: update stage0
2021-11-26 08:38:34 -08:00
Leonardo de Moura
2d113e83f9
feat: eta struct support for unit-like datatypes
...
For example, given `a b : Unit`, we have that `a` and `b` are
definitionally equal by `etaStruct`.
See #777
2021-11-26 08:36:25 -08:00
Leonardo de Moura
f9a5ac1d8e
fix: missing condition at matchConstStruct
2021-11-26 08:36:25 -08:00
Leonardo de Moura
693a96681a
doc: fix eta struct comment
2021-11-26 08:36:25 -08:00
Sebastian Ullrich
676b5e5ea8
chore: typo
...
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2021-11-26 17:13:19 +01:00
Sebastian Ullrich
14bc140efe
fix: server: do not show parent node on synthetic sorry
2021-11-26 17:13:19 +01:00
Sebastian Ullrich
4063729b6c
doc: document some built-in term notations
2021-11-26 17:13:19 +01:00
Sebastian Ullrich
093fd48e48
chore: update stage0
2021-11-26 17:13:19 +01:00
Sebastian Ullrich
2a1aee2b7a
feat: record declaration ranges of builtin parsers & elaborators
2021-11-26 17:13:19 +01:00
Sebastian Ullrich
e9f7c88299
feat: record doc strings of builtin parsers & elaborators
2021-11-26 17:13:19 +01:00
Sebastian Ullrich
8176084dcf
refactor: factor out declareBuiltin
2021-11-26 17:13:19 +01:00
larsk21
e641ae4eae
fix: prefix check in set_option completion
2021-11-26 11:42:54 +01: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
Leonardo de Moura
3ccd44fafa
fix: proofs after adding eta struct support at recursors
...
see #777
2021-11-25 11:34:31 -08:00
Leonardo de Moura
cec573024c
chore: update stage0
2021-11-25 11:32:53 -08:00
Leonardo de Moura
88b6ad4756
feat: add etaStruct to Meta.Simp.Config
2021-11-25 11:31:00 -08:00
Leonardo de Moura
d806344ee2
fix: set etaStruct := false at MatchEqns
2021-11-25 11:31:00 -08:00
Leonardo de Moura
43217884c0
feat: add Meta.Config.etaStruct
...
It is useful to disable eta for structures for meta programs.
2021-11-25 11:31:00 -08:00
Leonardo de Moura
0fc8c1da77
feat: eta for structures at recursors
...
see #777
2021-11-25 11:31:00 -08:00
Leonardo de Moura
50ac21d0a6
refactor: move is_constructor_app to inductive.cpp
2021-11-25 11:31:00 -08:00
Leonardo de Moura
e22bffa94f
refactor: move is_structure_like to inductive.cpp
2021-11-25 11:31:00 -08:00
Leonardo de Moura
03e346bc66
chore: simplify to_cnstr_when_K
2021-11-25 11:31:00 -08:00
Leonardo de Moura
9e1704f658
chore: simplify toCtorWhenK
2021-11-25 11:31:00 -08:00
Leonardo de Moura
ccc3f99507
chore: use isStructureLike
2021-11-25 11:31:00 -08:00
Leonardo de Moura
0de700fe45
chore: naming convetion
2021-11-25 11:31:00 -08:00
Sebastian Ullrich
91620481a5
fix: adapt to Lean change
2021-11-25 10:01:20 -05:00
Sebastian Ullrich
8f88b1f3f8
feat: bundle llvm-ar with Lean
2021-11-25 15:05:06 +01: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
Sebastian Ullrich
9a939f98ec
chore: update stage0
2021-11-24 15:04:27 +01:00
Sebastian Ullrich
f7decd2d46
fix: go to definition for macro_rules etc.
2021-11-24 11:54:13 +01:00
Wojciech Nawrocki
17f99e353e
fix: tactic state at EOF
2021-11-24 09:15:56 +01:00
Leonardo de Moura
292d3218c2
chore: update stage0
2021-11-23 17:40:44 -08:00
Leonardo de Moura
a8f4146070
feat: support eta struct recursively
...
Addresses issues raised by @gebner at #777
2021-11-23 17:38:48 -08:00
Sebastian Ullrich
653ff184a8
fix: semantic highlighting, once more
2021-11-23 17:20:01 +01:00
Sebastian Ullrich
573c3c9760
fix: semantic highlighting, again
2021-11-23 17:02:09 +01:00
Leonardo de Moura
c447db5db9
chore: update stage0
2021-11-23 07:36:16 -08:00
Gabriel Ebner
7537fa7795
fix: unfold x<y in discrimination tree module
2021-11-23 07:34:51 -08:00
Leonardo de Moura
e15a656fd2
fix: remove @[reducible] annotation from Function.comp and Function.const
...
closes #813
2021-11-23 07:29:25 -08:00
Leonardo de Moura
9fde1d53b7
chore: adjust proofs affected by struct eta
...
closes #777
2021-11-23 06:23:50 -08:00
Leonardo de Moura
8af1024931
chore: update stage0
2021-11-23 06:23:06 -08:00
Leonardo de Moura
d685c545b4
feat: eta for structures
2021-11-23 06:21:25 -08:00
Sebastian Ullrich
dd146d50cf
fix: extra linker flags (e.g. -ldl) must come after stdlib linker flags
2021-11-23 13:07:05 +01:00
Sebastian Ullrich
12306ba401
fix: -lgmp should come last
2021-11-23 13:07:05 +01:00
Sebastian Ullrich
226121433f
fix: semantic highlighting of projection notation elaborated twice
2021-11-23 13:01:51 +01:00
Varun Gandhi
9ae6380b43
fix: only check for ccache if variables aren't passed explicitly
...
The existing CMake will emit a spurious warning when someone
tries to explicitly pass CMAKE_C(XX)_COMPILER_LAUNCHER, such
as when they point it to sccache instead of ccache.
2021-11-23 09:15:42 +01:00
Scott Morrison
43315f7f94
fix: correct spacing in the pretty printer
2021-11-23 09:13:31 +01:00
Leonardo de Moura
d9b057af03
fix: fixes #793
2021-11-22 13:28:08 -08:00
Gabriel Ebner
f55649f81b
fix: prefer simp lemmas with *higher* priority
2021-11-22 11:52:45 -08:00
ammkrn
80c04c562a
doc: add/edit macro guide
...
Incorporate review changes to the doc book suggested by Kha.
2021-11-22 11:02:07 +01:00
ammkrn
7539799976
doc: add macro guide, light reorganizing
...
Sebastian suggested moving the macro guide from Mathlib4 upstream into the Lean 4 manual (called `macro_overview.md` here). There was some discussion about where to put it; the section on metaprogramming seemed like the most appropriate place. I did a little bit of reorganizing to make some items more discoverable (e.g. the user-defined notation section).
2021-11-22 11:02:07 +01:00
tydeu
bb2c720411
doc: fix mathlib link in README
2021-11-21 16:55:29 -05:00
larsk21
9028405798
fix: handle _root_ in unresolveNameGlobal with pp.fullNames
2021-11-21 15:23:21 +01:00
larsk21
8cf520209f
feat: show fully-qualified name in hover text
2021-11-21 15:23:21 +01:00
larsk21
63f9b37c0a
fix: return fully-qualified name in PrettyPrinter when pp.fullNames is set
2021-11-21 15:23:21 +01: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
Sebastian Ullrich
ad10495afa
chore: macOS: build with system c++
2021-11-20 11:04:39 +01:00
Sebastian Ullrich
cbbc6ef709
chore: CI: bump install-nix-action
2021-11-20 11:04:39 +01:00
Sebastian Ullrich
c6c56b15e1
feat: findSysroot? & reworked initSearchPath
2021-11-20 11:04:39 +01:00
Sebastian Ullrich
6e9574045a
feat: expose C & linker flags as API
2021-11-20 11:04:39 +01:00
Sebastian Ullrich
d4683e0169
chore: clean up LEAN_EXTRA_FLAGS
2021-11-20 11:04:39 +01:00
Sebastian Ullrich
babcd3563d
chore: CI: fix nightly release, compress non-release more
2021-11-19 13:05:14 +01:00
Sebastian Ullrich
dbdb92a411
doc: advise using Developer Mode on Windows
2021-11-19 10:09:26 +01:00
Sebastian Ullrich
44f9edff87
feat: resolve symlinks in LEAN_SRC_PATH
2021-11-19 10:09:26 +01:00
Sebastian Ullrich
c5b6968c86
chore: symlink to source from build dir
2021-11-19 10:09:26 +01:00
Gabriel Ebner
6475e3d5cc
fix: add missing LEAN_EXPORT
2021-11-18 11:14:26 +01:00
Sebastian Ullrich
7333de1766
refactor: cmake: make more use of string(APPEND)
...
I guess CMake might not actually be that painful if one was motivated to
learn it
```
sed -Ei 's/set\(([A-Z_]+) "\$\{\1\}/string(APPEND \1 "/' src/**/CMakeLists.txt
```
2021-11-18 10:09:55 +01:00
Sebastian Ullrich
e629fb70d5
chore: CI: squelch harmless Nix error message
...
Fixes #802
2021-11-18 10:02:34 +01:00
Sebastian Ullrich
fee052ceb9
chore: add GMP license for now
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
99aee53172
fix: restore macOS compile flags
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
77ccd92963
chore: remove redundant cmake install directive
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
abef59ddbb
chore: remove LICENSE header that confused GitHub
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
74a616a965
chore: final cleanup?
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
6cda043e5b
chore: add missing LICENSES
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
60095ce13f
chore: CI: even shorter install tree listing
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
767e9cffda
chore: CI: check test binary as well
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
ad2fe8de80
feat: bundle LLVM on macOS
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
db5b150b38
chore: do not use bundled compiler for foreign test
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
3db3fb1429
feat: bundle LLVM on Windows
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
0a40269fcb
fix: build with mingw-clang64 clang
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
337c3715dc
chore: ci: fix List Install Tree
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
09d549aecd
chore: fix foreign test on macOS, again
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
6ca944f453
chore: avoid C++ warning
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
ac5afd6b71
chore: fix leanc.sh -v
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
749158c8c1
perf: strip LLVM binaries
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
27bc6397a0
fix: actually link against GMP statically
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
42ee91bcda
fix: Linux: bundle zlib
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
acf7903691
feat: upload .tar.zst and .zip for every platform
...
Also, do so only for releases since `zstd -19` takes a while.
Also, stop double-wrapping artifacts
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
75a0b43aed
feat: reimplement assert without system headers
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
bfe7583356
chore: install license
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
8f4e59d9b5
chore: update lean-llvm
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
c3f7f09aad
fix: use old nixpkgs for glibc only
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
6ef56efb79
fix: leanc: drop empty arguments
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
d5d8ada8b8
chore: split LICENSE again
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
2cb625e9c4
chore: update lean-llvm
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
881238cc0d
chore: append licenses of LLVM & glibc
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
fe5e731064
chore: gc libleanshared sections
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
b236273780
feat: link external dependencies statically again
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
5bbc160f4b
feat: use custom, more minimal LLVM build
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
92b692808b
chore: CI: list archive contents & sizes
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
4b8a8d241d
chore: CI: no more need for binary patching
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
c3d1b2592c
fix: leanc: discard internal flag when using external compiler
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
5562beccee
fix: actually install all bundled files
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
d2a1e20dd0
feat: bundling LLVM on Linux
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
978e94272c
feat: String.replace
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
f232915cc0
fix: libleanshared.so needs rpath too
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
3a7fa704c3
refactor: avoid non-compiler headers in lean.h
2021-11-18 09:42:35 +01:00
Sebastian Ullrich
25ebc68b87
fix: emit info tree on command without elaborator
...
Fixes #792
2021-11-16 10:44:17 +01:00
Leonardo de Moura
47956b9b9e
chore: fix test
2021-11-15 18:47:25 -08:00
Leonardo de Moura
c67541570f
fix: fixes #787
2021-11-15 18:31:57 -08:00
Scott Morrison
0fc3702d02
chore: remove superfluous abbrev
...
This abbreviation already exists as Lean.Meta.FVarIdToLemmaId, which is imported. (And in fact the code relies on the fact they are definitionally equal.)
Closes #781 .
2021-11-15 18:21:55 -08:00
Scott Morrison
835bd0869b
feat: simpLocation
2021-11-15 18:20:50 -08:00
Leonardo de Moura
2a7b33089a
fix: transparency settings at simp TC check
...
fixes #790
2021-11-15 18:09:31 -08:00
Leonardo de Moura
4b2fa38cb8
fix: #check_failure command should succeed if there are stuck TC problems
2021-11-15 16:56:55 -08:00
Leonardo de Moura
9a152d2051
fix: use withSynthesize at elabStructInstance
...
fixes #783
2021-11-15 16:45:26 -08:00
tydeu
0422c0d019
ci: trigger on all branches
2021-11-11 18:51:24 -05:00
tydeu
781a28b8f4
chore: update Lake
2021-11-11 09:38:42 +01:00
tydeu
2be3a23b46
feat: use IO.appPath for exe in LakeInstall
2021-11-11 02:41:23 -05:00
tydeu
f0fd17138c
fix: pass --trust to frontend
2021-11-11 08:39:53 +01:00
Sebastian Ullrich
6e4fcaaea9
fix: produce info tree even on macro or elab failure
2021-11-11 08:39:31 +01: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
Sebastian Ullrich
8df2b07209
refactor: remove double exception layer in RequestM
2021-11-09 16:58:13 +01:00
Sebastian Ullrich
d8d7eba6c5
feat: liftExcept
2021-11-09 16:58:13 +01:00
Leonardo de Moura
743810b77a
feat: use binrel_no_prop% to define == notation
...
fixes #764
2021-11-09 07:46:10 -08:00
Leonardo de Moura
b70820929f
chore: update stage0
2021-11-09 07:42:40 -08:00
Leonardo de Moura
ced179f2f5
feat: elaborate binrel_no_prop%
2021-11-09 07:24:46 -08:00
Leonardo de Moura
fac091498c
chore: update stage0
2021-11-09 07:02:35 -08:00
Leonardo de Moura
3c00c3270e
feat: add variant of binrel%
2021-11-09 06:51:54 -08:00
Sebastian Ullrich
138d9eea43
fix: server: custom search path should win over package one should win over system one
...
I think that's all permutations now
2021-11-09 14:27:13 +01:00
Sebastian Ullrich
a345a98ef7
chore: fix foreign test on macOS
2021-11-09 11:03:14 +01:00
Sebastian Ullrich
b053679d6d
doc: fix a few links
2021-11-09 09:55:11 +01:00
Sebastian Ullrich
941b4c21e0
chore: CRLF be gone
2021-11-09 09:49:09 +01:00
Sebastian Ullrich
c29ad9a9b3
doc: ubuntu: specify fewer versions that will become outdated anyway
2021-11-09 09:41:18 +01:00
Sebastian Ullrich
d7b8479760
chore: use configured C++ compiler for foreign test
...
Fixes #775
2021-11-09 09:27:10 +01:00
tydeu
7fcfb78fd5
feat: use BaseIO at MonadLift (ST IO.RealWorld)
2021-11-09 09:11:33 +01:00
Leonardo de Moura
a5b1b8de4f
fix: bug at Offset.lean
...
Offset equalities should not assume default `Nat` instances for
numerals, `+`, `*`, and `-` have been used.
fixes #755
2021-11-08 18:27:25 -08:00
Leonardo de Moura
84d4d771ca
fix: bug at addPPExplicitToExposeDiff
2021-11-08 18:25:57 -08:00
Sebastian Ullrich
d5e05f31e4
chore: compiler-dependent test flag
2021-11-06 23:37:19 +01:00
Sebastian Ullrich
177d45a752
chore: fail without decreasing proof
2021-11-06 18:29:59 +01:00
tydeu
f262f77396
chore: update Lake
2021-11-06 09:18:15 +01:00
tydeu
7bc00f9b29
refactor: generalize IOTask to EIOTask
2021-11-05 19:16:30 -04:00
Leonardo de Moura
b28f92a9ea
feat: improve error message produced by #eval command when it fails to synthesize "eval" instance
...
closes #765
2021-11-05 15:03:57 -07:00
Leonardo de Moura
7e0bc23e5d
chore: cleanup syntax
2021-11-05 15:03:57 -07:00
tydeu
f48d9fccd9
refactor: replace RealM with BaseIO
2021-11-05 17:55:27 -04:00
tydeu
3f867acfd7
feat: decidable Prop Eq based on propext
2021-11-05 14:09:53 -07: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
Sebastian Ullrich
03551487ad
chore: simplify test
2021-11-05 10:45:27 +01:00
Mac
eb5852448e
feat: generalize IO task functions to BaseIO := EIO Empty ( #744 )
...
* feat: generalize `asTask`/`bindTask`/`mapTask` to `EIO`
* feat: generalize task functions to the `EIO Empty` monad
* chore: fix test + correct doc
* feat: further generalize task functions to `RealM := EIO Empty`
* chore: `RealM`/Task API touch-ups
* refactor: `abbrev RealM` -> `def BaseIO`
* chore: remame args / remove `EIO.toBaseIO_` as per code review
* refactor: use `BaseIO` at `checkCanceled`/`getNumHeartbeats`
* chore: fix `lean_io_bind_task_fn` signature error
2021-11-04 15:37:55 -07:00
Sebastian Ullrich
85fb03f22c
fix: cannot dynamically link against library that depends on statically linked runtime on Windows
2021-11-04 15:32:07 -07:00
Sebastian Ullrich
b2f331f502
doc: --load-dynlib
2021-11-04 15:32:07 -07:00
Sebastian Ullrich
697e34e229
test: --load-dynlib
2021-11-04 15:32:07 -07:00
Sebastian Ullrich
1adefe197b
fix: leanc: respect LEAN_SYSROOT
2021-11-04 15:32:07 -07:00
Sebastian Ullrich
4b51d00fcb
feat: --load-dynlib
2021-11-04 15:32:07 -07:00
Sebastian Ullrich
5a65189894
chore: use empty string for --githash instead of weird "GITDIR-NOTFOUND" when not building from commit
2021-11-04 15:29:48 -07:00
Sebastian Ullrich
b5e7b2ab6e
feat: Lean.githash
2021-11-04 15:29:48 -07:00
Sebastian Ullrich
6e45685310
fix: propositions should never be considered enum types
2021-11-04 15:27:15 -07:00
Sebastian Ullrich
89ab3cadf9
doc: server: mention infoTree test
2021-11-04 18:31:36 +01:00
Sebastian Ullrich
756a2ae99a
doc: server: update & extend readme
2021-11-04 18:31:36 +01:00
Sebastian Ullrich
e92f7f1b4b
refactor: server: assume 1 info tree per snapshot
2021-11-04 18:31:36 +01:00
Sebastian Ullrich
fc5082eaef
perf: server: reset info trees for each snapshot
2021-11-04 18:31:36 +01: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
Wojciech Nawrocki
bbaf98addf
fix: relax LSP spec compliance
2021-11-01 09:11:31 -07:00
Wojciech Nawrocki
128a71c726
fix: excessive RPC logging
2021-11-01 09:11:31 -07: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
Sebastian Ullrich
571fc66864
doc: ffi: move into dev/
2021-10-29 08:46:31 -07:00
Sebastian Ullrich
81dca2ceb8
doc: ffi: address review
2021-10-29 08:46:31 -07:00
Sebastian Ullrich
627900ba9f
doc: FFI
2021-10-29 08:46:31 -07:00
Leonardo de Moura
5f119cb54f
feat: avoid metavariables at CompletionItems
...
Not sure whether it helps or creates more confusion.
Note that we are still using the `?` prefix for metavariables on the
InfoView and hover info.
2021-10-29 08:01:21 -07:00
Sebastian Ullrich
40cf61f67b
doc: very important clarification
2021-10-29 07:52:48 -07:00
Chris Lovett
d3da41bac6
chore: remove unused header from lean.h
2021-10-29 09:43:19 +02:00
tydeu
d518e3df5b
refactor: properly manage errors in the build monad
2021-10-28 13:36:07 -04:00
Leonardo de Moura
68120b24b8
feat: add docstring to CompletionItem
...
closes #746
2021-10-28 08:14:40 -07:00
Sebastian Ullrich
f92d494c48
chore: do not distribute Lake examples
2021-10-28 16:23:14 +02:00
Leonardo de Moura
3367501511
fix: inaccessible annotations at isDefEq issue
...
Issue was reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Change.20in.20pattern.20matching.3B.20expected.20behaviour.3F/near/259059096
fixes #742
2021-10-27 09:26:12 -07:00
tydeu
781672e935
refactor: generalize Await signature a little
2021-10-27 12:19:02 -04:00
Sebastian Ullrich
b1f7fc1439
fix: CI: copy Homebrew dependencies
2021-10-27 18:16:35 +02:00
Leonardo de Moura
b65da42b7e
chore: update stage0
2021-10-26 12:41:23 -07:00
Leonardo de Moura
352391bfcb
chore: remove mpz_get_d dependency
2021-10-26 12:40:20 -07:00
Leonardo de Moura
c25758e314
chore: remove mpz dead code
2021-10-26 12:28:33 -07:00
Leonardo de Moura
6d0fa6da7c
chore: remove mpz dead code
2021-10-26 12:05:19 -07:00
Leonardo de Moura
fa9c5ad21a
chore: remove mpq
2021-10-26 11:56:37 -07:00
Gabriel Ebner
95b769cd5d
fix: add missing borrow annotations
2021-10-26 11:51:30 -07:00
Gabriel Ebner
61e0eab23f
refactor: reimplement ofScientific for floats
2021-10-26 11:51:30 -07:00
Gabriel Ebner
220ec6e42c
chore: add more decimals tests
2021-10-26 11:51:30 -07:00
Gabriel Ebner
5aab241f7a
fix: show correct popup for a + b
2021-10-26 20:19:27 +02:00
Gabriel Ebner
c870d7374e
chore: update stage0
2021-10-26 20:19:27 +02:00
Gabriel Ebner
9b166d4cf4
Revert "chore: prefer native"
2021-10-26 20:19:27 +02:00
Gabriel Ebner
bfc74decde
feat: add info field to Syntax.node
2021-10-26 20:19:27 +02:00
Gabriel Ebner
e21c021f49
chore: update stage0
2021-10-26 20:19:27 +02:00
Gabriel Ebner
b74db2d902
feat: update macros for extra info field
2021-10-26 20:19:27 +02:00
Gabriel Ebner
6efb459d5b
chore: prefer native
2021-10-26 20:19:27 +02:00
Gabriel Ebner
aa3d7cd751
chore: update stage0
2021-10-26 20:19:27 +02:00
Gabriel Ebner
6063c662de
feat: predictable naming for notation
2021-10-26 20:19:27 +02:00
Gabriel Ebner
422f808bf2
feat: predictable naming for elab_rules
2021-10-26 20:19:27 +02:00
Gabriel Ebner
ce15ea98c5
feat: predictable naming for macro_rules
2021-10-26 20:19:27 +02:00
Gabriel Ebner
babfdb879a
feat: add aux_def command
2021-10-26 20:19:27 +02:00
Gabriel Ebner
3818cbc897
fix: lean-gdb
2021-10-26 20:19:27 +02:00
Sebastian Ullrich
9fc0cd0555
feat: make CMAKE_ args for stage 0 overridable using STAGE0_CMAKE_...
2021-10-26 08:27:31 +02:00
Leonardo de Moura
0a3a8d2d3d
feat: add mpn module
...
This is the Z3 bignum module.
2021-10-25 15:57:19 -07:00
Leonardo de Moura
3d1f682144
feat: missing whnf at checkParamsAndResultType
2021-10-25 13:08:43 -07:00
Leonardo de Moura
57f02804f3
feat: use forallTelescopeReducing
...
This is needed now that we allow definitions at `inductive`.
2021-10-25 13:05:23 -07:00
Leonardo de Moura
3dbd1fd074
chore: style
2021-10-25 13:02:15 -07:00
Leonardo de Moura
80a73dd903
feat: basic support for definitions at inductive declarations
2021-10-25 12:44:35 -07:00
Leonardo de Moura
2b58cb49c9
feat: use whnf at getResultingUniverse
2021-10-25 12:38:56 -07:00
Leonardo de Moura
851ac3809e
feat: extend isInductivePredicate
2021-10-25 12:37:04 -07: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
Leonardo de Moura
a741a3dfd4
chore: update stage0
2021-10-22 16:30:14 -07:00
Leonardo de Moura
83cf5b20a1
fix: simpLet
...
Given `let x := v; b`, `simpLet` was using an incorrect local context to simplify `v`.
2021-10-22 16:29:00 -07:00
Leonardo de Moura
55bbaa55d8
fix: toHeadIndex
2021-10-22 14:54:01 -07:00
Leonardo de Moura
78b3b8b1e8
fix: pattern should only match if the head symbols are equal
2021-10-22 14:26:11 -07:00
Leonardo de Moura
881bf2a088
fix: set zeta to true at pattern conv tactic
2021-10-22 14:14:49 -07:00
Leonardo de Moura
4c335fd660
fix: do not use let_fun notation when pp.notation is set to false
2021-10-22 14:10:37 -07:00
Leonardo de Moura
fbdb68b669
feat: conv in conv
...
Featured suggested at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Pattern.20matching.20lambda.20body.20in.20conv/near/257193307
2021-10-22 13:53:56 -07:00
Sebastian Ullrich
f202c7c322
fix: prefer local search path
2021-10-22 12:48:37 +02:00
Sebastian Ullrich
91f1948f50
fix: Lake search path
2021-10-22 12:30:30 +02:00
Sebastian Ullrich
436b31b83c
doc: quickstart: updated Windows instructions
2021-10-22 09:57:07 +02:00
Sebastian Ullrich
14fdb793f7
chore: update stage0
2021-10-21 22:11:27 +02:00
Gabriel Ebner
ee2804d278
fix: use unsigned char in hash_str
...
char has different signedness on various architectures (signed on amd64,
unsigned on aarch64). oleans are then not architecture-independent
since they contain hashes (e.g. in mkStr).
2021-10-21 22:08:49 +02:00
Leonardo de Moura
b4a6b4f882
fix: do not consume pretty print hints at isDefEq
...
TODO: improve the solution. It is too hackish.
The issue was reported here https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/.E2.9C.94.20MData.20and.20unification/near/258352713
2021-10-20 15:58:56 -07:00
Leonardo de Moura
58430704e5
refactor: move inaccessible? to Expr.lean
2021-10-20 15:54:18 -07:00
Leonardo de Moura
f01a124f18
fix: builtin attribute initialization
...
The failure was triggered if a module declared (only) builtin
attributes that do not have any persistent extension associated with
them.
Fixes #726
2021-10-20 13:55:54 -07:00
Leonardo de Moura
b281295190
chore: cleanup
2021-10-20 13:55:54 -07: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
Sebastian Ullrich
2e36e362cb
chore: bench: apparently make doesn't like writing to /dev/null anymore?
2021-10-20 12:44:30 +02: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
Leonardo de Moura
68469c2487
chore: update Lake
2021-10-19 07:19:07 -07:00
Leonardo de Moura
1bd78590e6
test: for Lean 3 nocomputable issue
...
Issue reported at
https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/noncomputable.20tainting/near/258174927
2021-10-19 07:15:55 -07:00
Leonardo de Moura
b7ff5d3352
fix: make sure unused 'let'-declarations are preserved in WF
2021-10-19 06:51:54 -07:00
Leonardo de Moura
1d372ed7e3
test: well-founded recursion for unary function
2021-10-19 06:47:59 -07:00
Leonardo de Moura
a2bcb1c4c1
fix: typo
2021-10-19 06:47:14 -07:00
Leonardo de Moura
b5e640a423
fix: avoid getMVarType' at cleanup tactic
...
`getMVarType'` applies `whnf`
2021-10-19 06:43:07 -07:00
Leonardo de Moura
4e70a20292
feat: add more Nat "re-packing" simp theorems
2021-10-19 06:43:07 -07:00
Leonardo de Moura
e494329fb3
fix: addNonRecPreDefs at WF/Main.lean
2021-10-19 06:43:07 -07:00
Sebastian Ullrich
51a41705cb
feat: allow more atoms starting with "`"
2021-10-19 14:10:31 +02:00
Gabriel Ebner
d379cd6853
fix: out-of-bounds array access
2021-10-19 12:13:17 +02:00
Sebastian Ullrich
b3c8ee2923
fix: add Lake to built-in search path
2021-10-19 10:57:13 +02:00
Sebastian Ullrich
6a90b30875
fix: prefer user-given search paths
2021-10-19 10:57:13 +02:00
Leonardo de Moura
67c8e76b08
fix: preserve unused let declarations
...
This commit fixes reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/unused.20let.20disappears/near/257528105
2021-10-18 17:40:15 -07:00
Leonardo de Moura
c425397b45
feat: Hashable instances for UInt8 and UInt16
2021-10-18 17:19:39 -07:00
Leonardo de Moura
e336ff5f93
feat: indentation sensitiviy for macro and elab commands
...
This commit fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Command.20terminator/near/257674790
2021-10-18 17:16:09 -07:00
Leonardo de Moura
284177a80a
feat: missing instances and getOp for byte/float arrays
2021-10-18 16:54:56 -07:00
Leonardo de Moura
2fd024c26f
feat: add support for foldlM, foldl, ForIn instances for byte/float arrays
2021-10-18 16:54:56 -07:00
Leonardo de Moura
d03aaec944
feat: expose new float/byte array primitives
2021-10-18 16:54:56 -07:00
Leonardo de Moura
998bec0dd3
feat: new byte/float array primitives
2021-10-18 16:54:56 -07:00
tydeu
aa3f453ebf
refactor: cleanup trace code some
2021-10-18 19:38:32 -04:00
Sebastian Ullrich
675f477f38
chore: disable macOS Nix CI until I get around to updating it
2021-10-19 00:07:27 +02:00
tydeu
ffd5bc0f69
refactor: narrow Lean imports
2021-10-18 18:01:31 -04:00
Leonardo de Moura
499449b66f
chore: add ignore = untracked
2021-10-18 14:39:43 -07:00
Leonardo de Moura
6b2303b243
fix: bug at tryLemmaCore when numExtraArgs > 1
...
Fixes bug reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Simp.20bug.20-.20produces.60application.20type.20mismatch.60/near/257711901
2021-10-18 13:59:19 -07:00
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
Leonardo de Moura
30be5801e2
chore: update stage0
2021-10-18 07:35:49 -07:00
Leonardo de Moura
ab3861ff62
chore: remove unnecessary "c"
...
and avoid compilation warning messages.
2021-10-18 07:34:17 -07:00
Leonardo de Moura
aa0387e070
chore: update stage0
2021-10-18 07:25:25 -07:00
Siddharth
da4ad465d0
feat: un-inline float intrinsics into runtime. ( #694 )
...
* outline all intrinsics into the runtime.
This is necessary to support backends such as LLVM which do not emit C.
* fix style
2021-10-18 07:20:04 -07:00
Sebastian Ullrich
4cc9072ec3
chore: update stage0
2021-10-18 13:11:04 +02:00
Sebastian Ullrich
d3cf0b8098
fix: deriving Ord on parameterized types
...
Fixes #732
2021-10-18 10:08:13 +02:00
tydeu
d9f53dfec9
refactor: replace leanpkg.toml with a lakefile.lean + build reorg
2021-10-17 13:52:01 -04:00
Wojciech Nawrocki
e843fb7ca5
fix: widget messages
2021-10-17 10:01:23 +02:00
tydeu
b1bd3fc304
chore: update Lake
2021-10-15 17:12:29 +02:00
Siddharth Bhat
3374806d0f
refactor: eliminate unused ExtractMonadResult.hasBindInst
2021-10-15 06:57:24 -07:00
Sebastian Ullrich
c2c418b651
chore: update Lake
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
08dbf239a6
chore: server: redundant let
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
7fdc208c1f
chore: update Lake
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
7372e2f6cd
chore: update Lake
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
7a91c494b9
chore: submodule hints
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
74b813fbcd
doc: restructure make/index.md
...
debug builds are not very interesting currently given the state of
debugging Lean code
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
6296151034
chore: update Lake
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
e67e096086
fix: patch bin/lake
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
674e473c84
feat: server: support LAKE env var
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
e422ce4917
chore: update Lake
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
6a1897302b
chore: server: use exit code to communicate absence of package
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
765ed37409
feat: server: support Lake
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
89f9045646
test: add lake tests
2021-10-15 06:56:02 -07:00
Sebastian Ullrich
524be36d23
feat: build & bundle Lake
2021-10-15 06:56:02 -07:00
Chris Lovett
f57e61fead
chore: remove manual shell scripting for compiling libleanrt
2021-10-15 08:08:31 +02: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
Siddharth
66fcfcce37
doc: tutorial on parsing the arithmetic grammar using macros
...
* add arith
* Fixup based on Sebastian's feedback
* style nits
* add explanation about parsing precedence
* add Sebastian's suggest test case
Add the test case into the example to make sure we parse a*b+c as well
as a+b*c correctly.
* grammar pass
* Update doc/tutorial/metaprogramming-arith.md
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
* Update doc/tutorial/metaprogramming-arith.md
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
* use pretty arrows, 2 spaces, [Arith| ... ]
* typo: :+ and :* had sneaked back in
* Update doc/tutorial/metaprogramming-arith.md
Co-authored-by: Wojciech Nawrocki <wjnawrocki+gh@protonmail.com >
* Update doc/tutorial/metaprogramming-arith.md
Co-authored-by: Wojciech Nawrocki <wjnawrocki+gh@protonmail.com >
* Update doc/tutorial/metaprogramming-arith.md
Co-authored-by: Wojciech Nawrocki <wjnawrocki+gh@protonmail.com >
* Update doc/tutorial/metaprogramming-arith.md
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
* move all #print to #check
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
Co-authored-by: Wojciech Nawrocki <wjnawrocki+gh@protonmail.com >
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2021-10-12 08:51:17 +02:00
Gabriel Ebner
d6ba8e597a
feat: add range parameter to getInteractiveDiagnostics
2021-10-11 22:59:47 +02:00
Sebastian Ullrich
e068833e8d
fix: register missing simp trace classes
2021-10-11 15:37:56 +02:00
Leonardo de Moura
48a40c4d0a
fix: quoteString at EmitC.lean
...
Fix issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Incorrect.20escaping.20of.20.5Cr.20.3F/near/257061704
2021-10-11 06:16:56 -07:00
Leonardo de Moura
002fb7f446
fix: make sure pattern is tried on partial applications
...
This commit fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Pattern.20matching.20lambda.20body.20in.20conv/near/256939753
2021-10-10 15:47:04 -07:00
Leonardo de Moura
04fae18fe4
fix: make sure stop conv pattern stop at first match
2021-10-10 15:47:04 -07:00
Leonardo de Moura
e8bdb66dda
fix: make sure we can match pattern inside binders
...
This commit fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Pattern.20matching.20lambda.20body.20in.20conv/near/256890867
2021-10-10 15:47:04 -07: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
Chris Lovett
2860ba96f5
doc: fix some syntax and link in the docs, and more
2021-10-10 11:36:43 +02:00
Sebastian Ullrich
8d10197164
fix: leanpkg print-paths with longer output
2021-10-10 11:25:11 +02: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
Leonardo de Moura
fb27537b8e
fix: appUnexpander name resolution
...
fixes issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Scoping.20for.20delaborator.3F
2021-10-09 08:29:26 -07:00
tydeu
ae01b5d586
chore: use c++ not cc at examples/fffi
2021-10-09 11:26:21 -04:00
Sebastian Ullrich
2ab8a38daa
fix: macOS build, once more
2021-10-09 10:24:30 +02: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
Sebastian Ullrich
1f1dc0b471
fix: macOS Nix build
2021-10-08 21:46:50 +02: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
Gabriel Ebner
34eda689a1
fix: use eraseMacroScopes on trace classes
2021-10-08 11:13:19 -07: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
Leonardo de Moura
d77c99bd2f
chore: update stage0
2021-10-08 09:37:47 -07:00
Leonardo de Moura
81729d96f9
fix: make sure Quot primitives stay in eta expanded form
...
fixes #716
2021-10-08 09:36:06 -07:00
Leonardo de Moura
15ac3c2542
test: small repro for issue #716
2021-10-08 09:36:06 -07:00
Sebastian Ullrich
89d6c70273
fix: macOS build
2021-10-08 18:34:28 +02:00
Sebastian Ullrich
c8b998a607
chore: update stage0
2021-10-08 17:11:30 +02:00
Sebastian Ullrich
0a43a9c466
refactor: use JSON to communicate between server & package manager
2021-10-08 11:28:04 +02: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
Leonardo de Moura
305d035f17
chore: use lean_always_assert at erase_irrelevant.cpp
...
The performance impact should be insignificant, and it should help
debugging issue https://github.com/leanprover/lean4/issues/716
2021-10-07 07:44:56 -07:00
Sebastian Ullrich
db755b6081
doc: temp fix
...
/cc @leodemoura
2021-10-07 12:59:14 +02:00
Sebastian Ullrich
4ac9873880
fix: update-stage0
2021-10-07 12:55:55 +02:00
Leonardo de Moura
b742f0005f
chore: fix test
2021-10-06 19:58:29 -07:00
Leonardo de Moura
697e0ce2db
feat: apply cleanup tactic before applying decreasing tactic
...
Alternative design: apply it only before reporting a failure.
2021-10-06 19:56:57 -07:00
Leonardo de Moura
91d2f6d4fc
feat: add cleanup tactic
2021-10-06 19:54:28 -07:00
Leonardo de Moura
c02b4f2675
refactor: move to Meta namespace
2021-10-06 19:05:37 -07:00
Leonardo de Moura
def7641926
feat: add helper methods for checking dependencies
2021-10-06 19:04:02 -07:00
Leonardo de Moura
f10101cd58
fix: preserve user variable names in decreasing goals
2021-10-06 18:45:48 -07:00
Leonardo de Moura
85150731b7
test: put unit back, but rename it to someVal
...
It is the simple and more efficient.
We just set `someVal` with the first value of `vars`.
Recall that `vars` is never empty.
2021-10-06 18:09:06 -07:00
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
Leonardo de Moura
f64753c106
test: simplify ac_expr.lean
...
We don't want to avoid proofs at `List.getIdx` and `Expr` when doing proofs by reflection.
The new encoding avoids that by using the fact that `vars` in
`Context` should never be empty.
To be honest, the best approach is still the old `unit`. We can just
rename it to `inhabitant` to make sure users don't assume it is the
unit of the AC operator. Then, we can just set it with the first element
of `vars` and avoid proofs at `denote`.
2021-10-06 17:56:26 -07:00
tydeu
e171925991
chore: update Lean version
...
fixes leanprover/lake#21
2021-10-06 20:43:36 -04:00
Leonardo de Moura
079ad47f02
fix: mixed unary and non-unary functions
2021-10-06 17:33:51 -07:00
tydeu
0e7a2bae8e
refactor: clean up CLI code some
2021-10-06 20:06:03 -04:00
Leonardo de Moura
790a22c5df
test: mutual recursion by well-founded recursion
2021-10-06 16:38:42 -07:00
Leonardo de Moura
9d0fe5cbf9
chore: add simp rule Nat.lt x y = (x < y)
2021-10-06 16:37:58 -07: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
Leonardo de Moura
7f660af4c6
feat: add repeat tactic to conv mode
2021-10-06 14:05:44 -07: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
Leonardo de Moura
1f2e92ea04
feat: make sure #check produces some result even when there are pending TC problems
...
Lean 3 uses the same approach.
closes #714
2021-10-06 13:37:06 -07:00
tydeu
0196cbe6a3
refactor: move build execution into CLI
2021-10-06 16:27:49 -04:00
Leonardo de Moura
8ec9fda6c4
fix: improve widening operator used at the ElimDeadBranches abstract interpreter
2021-10-06 12:54:07 -07:00
tydeu
93cc196b10
chore: minor code cleanup
2021-10-06 15:22:19 -04:00
Sebastian Ullrich
5873c1f14e
chore: CI: check first commit message of opened PR
2021-10-06 17:30:38 +02:00
Sebastian Ullrich
c2194c2bc1
chore: update to LLVM 13
2021-10-06 14:34:29 +02:00
Leonardo de Moura
eb7f601ea8
chore: updates stage0
2021-10-05 17:04:09 -07:00
tydeu
3bcd18a1c6
refactor: generalize Lean/Lake installation detection
2021-10-05 20:00:30 -04:00
Leonardo de Moura
106adb09b9
fix: simplify allocator
...
Do not move segments between heaps.
We found yet another bug due to this "feature".
The crash is reported here:
https://gist.github.com/semorrison/490496060bbcfa8ea635f3d7be1ac824
@Kha summarized the "root of the evil" as:
using per-heap import lists while segments can be exchanged between heaps doesn't seem compatible.
This is the second bug due to this design decision.
We had fixed one here:
2283ebc5e9/src/runtime/alloc.cpp (L257-L269)
This commit fixes both issues by removing the segment exchange feature.
2021-10-05 16:58:20 -07: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
Leonardo de Moura
988e43d2b4
fix: WF should reject definitions that do not take any arguments
2021-10-04 13:24:30 -07:00
Wojciech Nawrocki
07f99eba73
fix: use local context from Info node in widgets
2021-10-04 21:09:44 +02: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
Sebastian Ullrich
48764b60d5
chore: CI: retry tests on Windows
...
/cc @leodemoura
2021-10-04 11:24:40 +02:00
Leonardo de Moura
85c49cfeb3
feat: apply termination tactic provided by user
2021-10-03 18:47:52 -07: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
Leonardo de Moura
23740778d4
refactor: termination hints
2021-10-03 18:09:35 -07:00
Leonardo de Moura
a12ade3da4
chore: fix test
2021-10-03 17:20:16 -07:00
Leonardo de Moura
7ff013a3a2
chore: update stage0
2021-10-03 17:17:51 -07:00
Leonardo de Moura
d22a42358f
feat: add decreasing_tactic notation
2021-10-03 17:16:29 -07:00
tydeu
0ede8f2c4c
chore; minor doc cleanup
2021-10-03 17:09:30 -04:00
Sebastian Ullrich
762304f8b7
doc: fix
2021-10-03 21:19:45 +02: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
Leonardo de Moura
68867d02ac
chore: update stage0
2021-10-02 20:20:26 -07:00
Leonardo de Moura
1cdad2be46
fix: missing info trees at let_mvar% elaborator
2021-10-02 20:19:37 -07: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
Leonardo de Moura
53cee4df08
chore: typo
2021-10-02 17:45:08 -07:00
Leonardo de Moura
2b087893a5
chore: update stage0
2021-10-02 17:33:50 -07:00
Leonardo de Moura
c908eec8e5
chore: remove temp priority := high
2021-10-02 17:31:55 -07:00
Leonardo de Moura
5a0974cca6
chore: update stage0
2021-10-02 17:31:17 -07:00
Leonardo de Moura
c24cd877c8
chore: define if-then-else again as a macro
...
We can do it using the new auxiliary notation `let_mvar%` and
`wait_if_type_mvar%`.
2021-10-02 17:30:06 -07:00
Leonardo de Moura
42773941ed
chore: fix test
2021-10-02 17:00:07 -07:00
Leonardo de Moura
740aab923d
chore: update stage0
2021-10-02 16:57:40 -07:00
Leonardo de Moura
1e44902243
fix: add withFreshMacroScope at expandMacroImpl?
2021-10-02 16:57:25 -07:00
Leonardo de Moura
deb77b62df
chore: update stage0
2021-10-02 16:28:47 -07:00
Leonardo de Moura
15347272c7
feat: elaborate wait_* notation
...
We can use to define `if-then-else` using macros
2021-10-02 16:27:22 -07:00
Leonardo de Moura
b510bb305d
feat: elaborate let_mvar%
2021-10-02 16:12:50 -07:00
Leonardo de Moura
59d7b00557
feat: add mapping from mvar user name to MVarId
2021-10-02 15:26:44 -07:00
Leonardo de Moura
98f1ab7816
chore: update stage0
2021-10-02 15:12:51 -07:00
Leonardo de Moura
c6dfecb7aa
feat: helper notation for controlling elaboration order
2021-10-02 15:10:27 -07:00
Leonardo de Moura
acd21052c0
chore: remove old notation
2021-10-02 15:06:40 -07:00
Leonardo de Moura
74329f6713
chore: update stage0
2021-10-02 14:56:09 -07:00
Leonardo de Moura
9337498c5b
chore: keywords should be snake_case
2021-10-02 14:54:48 -07:00
tydeu
3d76e48181
fix: do not build deep deps multiple times
2021-10-02 16:11:53 -04:00
Leonardo de Moura
b7281e9fe2
fix: instruct pretty printer to add a line break after each calc step
...
It should fix https://github.com/leanprover/mathport/issues/26
2021-10-02 11:38:10 -07: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
Daniel Fabian
e1f591ba61
test: do no use unit in ac_expr.lean.
...
It is not necessary to define a unit element for the proof to go through.
2021-10-02 11:11:08 -07:00
Siddharth
4b1b76ae51
doc: add metaprogramming docs of Dyck grammar parsing.
...
* LEAN4 -> Lean 4; directive -> command
* directive -> command everywhere
2021-10-02 11:08:26 -07:00
Wojciech Nawrocki
f454850c70
fix: actually specify opts-per-pos
2021-10-02 09:55:55 +02: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
Sebastian Ullrich
af12c91b0a
fix: rpath rewrite leanc as well
2021-10-01 10:06:50 +02:00
Leonardo de Moura
01ca9a06c1
chore: update stage0
2021-09-30 22:38:31 -07:00
Leonardo de Moura
dba358067a
chore: remove workaround
2021-09-30 22:37:20 -07:00
Leonardo de Moura
3833363be8
chore: update stage0
2021-09-30 22:35:40 -07:00
Leonardo de Moura
b99f1c698b
feat: use if-then-else notation at Do.lean
...
Otherwise, the `if` in the `Do` notation will not benefit from the
improved elaborator.
2021-09-30 22:34:36 -07:00
Leonardo de Moura
9d9f41c27a
chore: update stage0
2021-09-30 22:24:22 -07:00
Leonardo de Moura
2546a2cf7e
test: add test for if-then-else issue
...
The issue was reported here:
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Required.20type.20annotation.20using.20Array
2021-09-30 22:23:22 -07:00
Leonardo de Moura
eedf5b245f
feat: use let_tmp at new if-then-else elaborator
2021-09-30 22:22:14 -07:00
Leonardo de Moura
35d9590b7b
chore: rename let_tmp elaborator
2021-09-30 22:20:32 -07:00
Leonardo de Moura
94dc1ee38f
chore: update stage0
2021-09-30 22:19:42 -07:00
Leonardo de Moura
2bc24ff619
chore: let_zeta => let_tmp
2021-09-30 22:19:06 -07:00
Leonardo de Moura
035251d08a
feat: elaborate let_zeta
2021-09-30 22:18:47 -07:00
Leonardo de Moura
cfa9d5a0b6
chore: update stage0
2021-09-30 22:09:45 -07:00
Leonardo de Moura
b83facc738
feat: add let_zeta auxiliary parser
2021-09-30 22:08:11 -07:00
Leonardo de Moura
cc920dd26b
feat: new if-then-else elaborator that waits for condition type to be known
2021-09-30 22:07:32 -07:00
Leonardo de Moura
7c0993ae12
chore: add pp annotations to if parser
2021-09-30 20:40:02 -07:00
Leonardo de Moura
2aa190ec6a
chore: update stage0
2021-09-30 20:34:56 -07:00
Leonardo de Moura
88c73f1daa
chore: remove old if-then-else parser and elaborator
2021-09-30 20:33:58 -07:00
Leonardo de Moura
a7fc07a8b4
chore: update stage0
2021-09-30 20:33:15 -07:00
Leonardo de Moura
7ea23a0f37
chore: reduce priority of old if-then-else parser
2021-09-30 20:31:54 -07:00
Leonardo de Moura
ef4becfedb
chore: update stage0
2021-09-30 20:31:18 -07:00
Leonardo de Moura
a5502e652c
chore: activate builtin if-then-else elaborator
2021-09-30 20:29:49 -07:00
Leonardo de Moura
bc578f17ad
chore: update stage0
2021-09-30 19:34:21 -07:00
Leonardo de Moura
698760c5eb
refactor: add if-then-else builtin parser
2021-09-30 19:33:41 -07: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
Leonardo de Moura
58743b983e
chore: update stage0
2021-09-30 12:50:40 -07:00
tydeu
628e5e2818
fix: only call removeDirAll if path exists
2021-09-30 15:50:22 -04:00
Leonardo de Moura
32b6172449
chore: update stage0
2021-09-30 12:48:50 -07:00
Leonardo de Moura
28d81ee456
fix: do not extract closed terms containing constants being defined
...
It may produce crashes during initialization.
2021-09-30 12:46:38 -07:00
Leonardo de Moura
837677cb4c
test: doc string
2021-09-30 11:27:09 -07:00
Leonardo de Moura
db5df69db4
fix: bounds check
...
fixes #704
2021-09-30 07:55:10 -07:00
Sebastian Ullrich
9569d7997c
chore: update Nix
2021-09-30 13:34:26 +02:00
Sebastian Ullrich
ee73ad9f23
chore: update mdBook fork
2021-09-30 13:02:39 +02:00
Sebastian Ullrich
f9ab429f75
fix: Nix build
2021-09-30 10:24:45 +02: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
Leonardo de Moura
ff38774b95
test: printDecls
2021-09-29 17:44:21 -07:00
Leonardo de Moura
09d0c93589
feat: declare functions in mutual block using auxiliary fuction defined using WF
2021-09-29 11:24:52 -07:00
Leonardo de Moura
608417b946
fix: check number of explicit variables at induction/cases alternatives when @ is not used
...
fixes #690
2021-09-29 07:39:38 -07:00
Leonardo de Moura
a434489e51
chore: update stage0
2021-09-28 21:10:51 -07:00
Leonardo de Moura
3fed9c9df7
feat: reject partial when if constant is not a function
...
fixes #697
2021-09-28 21:07:14 -07:00
Leonardo de Moura
200a38e20c
feat: improve letIdLhs parser
...
The extra space is only really needed to distinguish an array update (NIY)
```
let x[i] := ...
```
from a declaration taking an instance argument
```
let f [Monad m] := ...
```
closes #696
2021-09-28 18:10:25 -07:00
Leonardo de Moura
f4759c9a22
chore: update stage0
2021-09-28 17:49:20 -07:00
Leonardo de Moura
b85d95b7b6
fix: panic in monadic polymorphic code
...
fixes #695
2021-09-28 17:46:19 -07:00
Leonardo de Moura
d0462153a0
fix: bug at smart unfolding procedure
...
It fixes an issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Simplifications.20in.20proofs.2Ftype-checking.20not.20happening.3B.20wh.2E.2E.2E
2021-09-28 10:45:54 -07:00
Sebastian Ullrich
2be3d97cdd
chore: leanc: typo & minor modifications
2021-09-28 14:15:58 +02:00
Leonardo de Moura
4c051896df
refactor: sizeofMeasure => sizeOfWFRel
...
This commit also makes the first argument of `sizeOfWFRel` implicit.
2021-09-27 19:06:10 -07:00
Leonardo de Moura
bd98e6a586
feat: refine WellFounded.fix functional F over PSigma.casesOn
2021-09-27 19:06:10 -07:00
Leonardo de Moura
d0391d07c2
feat: use PSigma.casesOn instead of projections at packDomain
...
Reason: we want to "refine" the `WellFounded.fix` functional `F` over it.
2021-09-27 19:06:10 -07:00
Leonardo de Moura
8b79176102
feat: refine WellFounded.fix functional F over Sum.casesOn
2021-09-27 19:06:10 -07:00
Leonardo de Moura
f1be1d5bba
feat: add simpProj
...
Simplifier for kernel projections.
2021-09-27 19:06:10 -07:00
Leonardo de Moura
c53d892f22
feat: add Expr.projExpr!
2021-09-27 19:06:10 -07:00
Sebastian Ullrich
ae0308fc04
chore: leanc: do not pass linking flags when not linking, again
2021-09-27 17:40:59 +02: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
Leonardo de Moura
108518aad1
feat: use simp at mkDecreasingProof
2021-09-26 16:32:48 -07:00
Leonardo de Moura
d13bdef6e2
feat: add WF.mkFix
2021-09-26 16:01:07 -07:00
tydeu
a093a38459
refactor: rename package.lean to lakefile.lean
2021-09-26 18:52:31 -04:00
Leonardo de Moura
a7f36cc642
chore: style
2021-09-26 15:52:13 -07: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
Leonardo de Moura
094b70c3d4
feat: add notation for Sum and PSum
2021-09-25 18:24:27 -07:00
Leonardo de Moura
dc5f44edcf
feat: delaborate Sigma and PSigma
2021-09-25 18:19:44 -07:00
Leonardo de Moura
9d69189a60
chore: use Sum instead of PSum at PackMutual
2021-09-25 17:24:56 -07:00
Leonardo de Moura
d4509878bb
feat: add WellFoundedRelation for termination_by
2021-09-25 17:21:03 -07:00
Leonardo de Moura
ceb9889b0e
feat: elaborate temination_by term
2021-09-25 16:54:41 -07: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
Leonardo de Moura
a5b27952b5
fix: panic messages on invalid input
...
fixes #689
2021-09-25 09:01:01 -07:00
Leonardo de Moura
1282fb2d97
fix: getMatchWithExtra
...
`getMatchKeyArgs` returns arguments in reverse order.
2021-09-25 08:36:12 -07:00
Leonardo de Moura
4a8679a57c
feat: add Subarray.popFront
2021-09-25 08:35:41 -07:00
Sebastian Ullrich
816dc1895f
perf: reuse idle thread in favor of spawning new one
2021-09-25 07:34:12 -07:00
Sebastian Ullrich
e6927253cf
feat: use leanc written in Lean for testing & distribution
...
building is still handled by a (minimal) Bash script for bootstrapping purposes
2021-09-25 09:59:50 +02:00
Sebastian Ullrich
a9c5eb491d
chore: put import library in lib/lean/
2021-09-25 09:59:50 +02: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
Chris Lovett
2ca4188fc3
doc: somehow wsl2.md was created so the page on https://leanprover.github.io/lean4/doc/make/wsl2.html is empty. This fixes that.
2021-09-23 23:26:35 +02:00
Mario Carneiro
5007ceae69
feat: add module Glob API
2021-09-23 11:33:10 -04:00
Sebastian Ullrich
a8207e52a9
chore: remove unused flag
2021-09-23 16:32:55 +02:00
Sebastian Ullrich
70f99ab655
chore: placate GCC
2021-09-23 16:31:41 +02:00
Chris Lovett
3a20b6be8a
doc: add wsl setup docs and reorganize a new "dev" folder
2021-09-23 09:21:39 +02:00
Leonardo de Moura
58c938cef8
feat: 'termination_by' goodies
2021-09-22 21:09:33 -07:00
Leonardo de Moura
8425a53377
feat: improve termination_by notation
2021-09-22 21:08:01 -07:00
Leonardo de Moura
38f91a2fa4
doc: PackMutual.lean
2021-09-22 18:27:57 -07:00
Leonardo de Moura
0b7b174f25
feat: replace recursive applications at packMutual
2021-09-22 18:07:07 -07:00
Leonardo de Moura
b8454f3568
fix: packDomain
2021-09-22 18:00:22 -07:00
Leonardo de Moura
65983ef45b
feat: add WF/PackMutual.lean
2021-09-22 15:46:47 -07:00
Sebastian Ullrich
d506b8a5ed
feat: hide non-exported symbols on Unix
2021-09-22 23:02:39 +02: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
ea244c298c
chore: un-orphan file
2021-09-22 16:04:18 +02:00
Sebastian Ullrich
f49d05bd76
chore: Nix: remove Leanpkg from stage 0
2021-09-22 16:03:57 +02:00
Sebastian Ullrich
d3eb5deeea
chore: Nix: fix macOS build
2021-09-22 16:00:13 +02:00
Sebastian Ullrich
5a4309e599
refactor: bootstrap.nix
2021-09-22 14:43:32 +02:00
Chris Lovett
ad7c5b26a7
fix: UTF-8 file path support for lean on Windows
...
* fix msys2 windows build so the windows apps support utf-8 file paths.
* use windres to compile default-manifest.o
* windres is in binutils.
* stop modifying default-manifest.o
* copy to stage0
* fix semicolon joining of lists in add_custom_target
* undo changes to stage0 as per CR feedback.
* fix makefile
* fix: revert cmakelists.txt COMMAND_EXPAND_LISTS change
* fix: msys2 dependencies
* add unit test for decoding UTF-8 chars to prove "lean.exe" can read utf-8 encoded files where utf-8 is also used in the file name.
* fix: utf-8 test by using windows-2022
* fix: do we really need cmake 3.11 or will 3.10 do?
* nope, really does require cmake 11.
2021-09-22 12:21:52 +02:00
Leonardo de Moura
6b1bed5c38
chore: fix test output
2021-09-21 20:37:23 -07:00
Leonardo de Moura
07fb8504a1
fix: bug introduced today
2021-09-21 20:36:18 -07:00
Leonardo de Moura
a909e8cf26
feat: arity mismatch error message at well-founded recursion
2021-09-21 20:34:15 -07:00
Leonardo de Moura
ed47091691
chore: add extra trace messages and document issue
2021-09-21 20:33:44 -07:00
Leonardo de Moura
c41b3d6928
fix: reset local context at addPreDefinitions
2021-09-21 20:18:59 -07:00
Leonardo de Moura
ee2bdc1f84
feat: add WF/PackDomain.lean
2021-09-21 19:38:43 -07:00
Leonardo de Moura
6a880fecc9
chore: modify findDocString?
2021-09-21 17:29:40 -07:00
Leonardo de Moura
5a301d8c3b
refactor: add src/Lean/Elab/PreDefinition/WF directory
2021-09-21 15:44:21 -07:00
Leonardo de Moura
640fc964b6
feat: basic termination_by bookkeeping
2021-09-21 15:24:42 -07:00
Leonardo de Moura
d43876ac2d
chore: fix test
2021-09-21 14:54:45 -07:00
Leonardo de Moura
b8ca5ff280
chore: update stage0
2021-09-21 13:19:20 -07:00
Leonardo de Moura
6211b95e06
feat: add termination_by parser
2021-09-21 13:19:01 -07:00
Leonardo de Moura
bb98057098
refactor: avoid wf suffix
2021-09-21 12:57:08 -07:00
Leonardo de Moura
10a38aef3c
chore: remove class WellFoundedRelation
...
It is dead code.
2021-09-21 12:57:08 -07:00
Leonardo de Moura
9085167872
test: Fin match test that relies heavily on contradiction
...
This example is based on a Lean 3 issue described at
https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/equation.20compiler.20help.20me.20plz
2021-09-21 12:57:08 -07:00
Leonardo de Moura
59ed4dea7b
feat: add runTactic for running tactic Syntax in MetaM
2021-09-21 12:57:08 -07:00
Sebastian Ullrich
abd617b9a5
test: use $LAKE everywhere
2021-09-21 12:17:27 -04:00
Mauricio Collares
245d36147e
chore: lean4-mode: support native elisp compilation
2021-09-21 16:23:52 +02:00
Leonardo de Moura
0351c96831
feat: better error message for induction tactic on mutually inductives
2021-09-21 06:56:17 -07:00
Sebastian Ullrich
15109b5f23
chore: remove obsolete file
2021-09-21 15:54:16 +02:00
tydeu
dfa959ba30
test: add clean* targets to Makefile
...
closes leanprover/lake#13
2021-09-20 18:14:50 -04:00
Leonardo de Moura
2cbf0ba8e9
test: add "parameters" that are fixed in all equations
2021-09-20 12:58:22 -07:00
Leonardo de Moura
06a741be5c
feat: ensure equational theorem conditions occur after the main variables
2021-09-20 11:41:33 -07:00
Leonardo de Moura
5fe40fbccf
refactor: add sortFVarIds to Meta/Basic.lean
2021-09-20 11:32:53 -07:00
Leonardo de Moura
41a58459d7
test: equational theorem generation
2021-09-20 11:12:42 -07:00
Sebastian Ullrich
9b80f69e54
chore: add proper shebang to build.sh & port to sh
2021-09-20 12:53:55 -04:00
Sebastian Ullrich
0a6778d05f
chore: silence clang warning when exporting Lean function declared in lean.h
2021-09-20 18:41:46 +02:00
Sebastian Ullrich
6eca75ddbd
fix: include exported declarations in defining file
2021-09-20 18:41:46 +02:00
Sebastian Ullrich
b13d3e6ca5
fix: dllexport functions not already annotated in header
2021-09-20 18:41:46 +02:00
Sebastian Ullrich
60ffdd094c
fix: annotate lean.h functions with LEAN_SHARED
2021-09-20 18:41:46 +02:00
Sebastian Ullrich
da516f5aa7
fix: write .c output file in binary mode for reproducibility
2021-09-20 18:41:46 +02:00
Sebastian Ullrich
23c3dc335b
chore: avoid cmake -E env
...
It was calling into WSL bash on my machine...
2021-09-20 18:41:46 +02:00
Sebastian Ullrich
0fcc2a0fff
chore: remove --export-all
2021-09-20 18:41:46 +02:00
Sebastian Ullrich
f5aa8ea4f5
chore: update stage0
2021-09-20 18:41:46 +02:00
Sebastian Ullrich
35ffae6f54
feat: Windows: explicitly export Lean functions only
2021-09-20 18:41:46 +02:00
Leonardo de Moura
1868cea536
fix: "stuck at universe contraint" issues
2021-09-20 07:22:14 -07:00
Leonardo de Moura
11cdc65820
chore: update stage0
2021-09-20 07:14:24 -07:00
Leonardo de Moura
9e980b2a78
fix: bug at decAux?
...
We are getting a few "stuck at universe constraint" errors after the
fix. We may need to add some kind of approximation in the future.
2021-09-20 07:12:57 -07:00
Sebastian Ullrich
585fba69e8
refactor: remove redundancy from common register_parser_alias case
...
/cc @leodemoura
2021-09-20 13:20:23 +02:00
Sebastian Ullrich
83c2e8bf75
feat: expose many(1)Indent as parser aliases
2021-09-20 13:20:23 +02:00
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
Leonardo de Moura
f2a418a7ae
chore: smartUnfolding cleanup
...
We remove dead code, update comments, and add new tests
See #445
2021-09-19 15:29:11 -07:00
Leonardo de Moura
2395bb3b35
chore: update stage0
2021-09-19 15:19:12 -07:00
Leonardo de Moura
5b0a1c2b2f
feat: smart unfolding support for nested match-expressions
...
See #445
2021-09-19 15:17:56 -07:00
Leonardo de Moura
35d9589401
feat: add MonadControl m (OptionT m)
2021-09-19 14:20:26 -07:00
Leonardo de Moura
fe55205105
test: equational theorem test
2021-09-19 09:34:08 -07:00
Leonardo de Moura
82f3042fa4
fix: equational theorem generation for structural recursion
2021-09-19 08:48:40 -07:00
Leonardo de Moura
233a262c03
feat: improve whnfReducibleLHS?
2021-09-19 08:33:51 -07:00
Leonardo de Moura
35c7081377
feat: improve casesOnStuckLHS
2021-09-19 08:28:10 -07:00
Leonardo de Moura
c2d33a1a58
fix: bug at addSmartUnfoldingDef
...
The approach using `matcherBelowDep : NameSet` was not correct because
we "reuse" matcher-declarations. For example, in the definition
```
def f : Nat → Bool
| 0 => true
| n + 1 => (match n with
| 0 => true
| _ + 1 => true) && f n
```
we have to `match`-expressions but they can be compiled the same
matcher `f.match_1`. Thus, the set `matcherBelowDep` would contain
`f.match_1` since the first occurence refined the `Nat.below` argument
at `mkBRecOn`. Thus, `addSmartUnfoldingDef` was incorrectly assuming the second
`match` was refined too.
We fixed this issue by simulating `mkBRecOn` behavior.
fixes #445
2021-09-18 19:15:38 -07:00
Leonardo de Moura
e8cd32ff24
chore: add mkBelowName
2021-09-18 18:37:29 -07:00
Leonardo de Moura
2775298fef
feat: add applyMatchSplitter
...
It applies the match splitter without using simplification theorems
2021-09-18 16:30:47 -07:00
Leonardo de Moura
c795a75045
feat: modify approach for generating equational theorems
2021-09-18 15:58:31 -07:00
Leonardo de Moura
fe7b750bce
fix: fixes #679
2021-09-18 15:34:29 -07:00
Leonardo de Moura
fc1ec438b8
fix: Repr Name instance
2021-09-18 15:29:32 -07:00
Leonardo de Moura
1ce65672ba
chore: modify strategy for constructing equational theorems
2021-09-18 08:27:07 -07:00
Leonardo de Moura
07bd5ae2b8
chore: remove dead code
2021-09-18 07:36:14 -07:00
Leonardo de Moura
2a9ba9f795
fix: add support for hierachical names containing numerical parts
...
closes #677
2021-09-17 19:21:49 -07:00
Leonardo de Moura
d413aa1dc5
feat: generate proofs for structural (conditional) equality theorems
2021-09-17 18:57:39 -07:00
Leonardo de Moura
38090fa3c0
feat: improve casesOnStuckLHS
2021-09-17 18:48:45 -07:00
Leonardo de Moura
6fbb6c7215
feat: add delta?
2021-09-17 18:46:09 -07:00
Leonardo de Moura
1a0badac06
feat: generate conditional structural equation theorem types
...
TODO: proofs
2021-09-17 16:49:30 -07:00
Leonardo de Moura
6eff84a7bb
refactor: add generic mkBaseNameFor
2021-09-17 16:30:09 -07:00
Leonardo de Moura
70a4d2691f
chore: cleanup
2021-09-17 16:00:00 -07:00
Leonardo de Moura
06f554b94d
feat: add RBTree.toArray
2021-09-17 15:59:35 -07:00
Leonardo de Moura
da69b10056
chore: cleanup
2021-09-17 15:00:58 -07:00
Leonardo de Moura
0795243a5e
chore: update stage0
2021-09-17 14:26:24 -07:00
Leonardo de Moura
6ffb3f91f0
feat: save information for generating structural equation theorems later
2021-09-17 14:20:28 -07:00
Leonardo de Moura
793d493df0
feat: equation theorem manager
2021-09-17 14:20:28 -07:00
Leonardo de Moura
42eba87325
feat: add simpMatchTarget
2021-09-17 14:20:28 -07:00
Leonardo de Moura
94ede53940
chore: use doc string
2021-09-17 14:20:28 -07:00
Leonardo de Moura
dc32a827b3
fix: missing instantiateMVars
2021-09-17 14:20:28 -07:00
Leonardo de Moura
633dc9829e
feat: add withOptions
2021-09-17 14:20:28 -07: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
Sebastian Ullrich
3d0967f75b
Revert "chore: CI: switch to GCC on Windows for now"
...
This reverts commit 440abd4bd1 .
2021-09-17 19:13:03 +02: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
Leonardo de Moura
d378df47d7
fix: fixes #633
2021-09-16 14:11:34 -07:00
tydeu
8b83d80956
chore: add mising (Active)Target.with* utilities
2021-09-16 17:03:15 -04:00
Leonardo de Moura
a823ebdbe0
chore: make it clear how it is being parsed
...
We are planning to change the `<|>` precedence here.
2021-09-16 13:41:01 -07:00
tydeu
bf4db86bdd
feat: search path now first checks IO.appPath for lean
2021-09-16 16:26:06 -04:00
Sebastian Ullrich
d65871241d
chore: replace sed with perl in test driver
...
Consistent across all three platforms
2021-09-16 21:33:56 +02:00
Sebastian Ullrich
a7b044b80b
chore: CI: build macOS without nix-shell
...
GH Actions already comes with most dependencies and it seems to avoid an
issue with Zig libc++ compilation (because of OSX_DEPLOYMENT_TARGET?)
2021-09-16 21:33:56 +02:00
tydeu
b4dcad59fa
test: add alternate binRoot example (called main)
2021-09-16 15:13:11 -04:00
Leonardo de Moura
fe66523e43
chore: fix doc
2021-09-16 10:32:00 -07:00
Leonardo de Moura
04b7924154
chore: fix tests
2021-09-16 10:29:38 -07:00
Leonardo de Moura
0a898965a3
chore: use snake_case for user-facing tactic names
2021-09-16 10:23:12 -07:00
Leonardo de Moura
1c00f29043
test: add let_fun pretty printing test
2021-09-16 10:14:42 -07:00
Leonardo de Moura
4c0ae51a81
chore: fix test
2021-09-16 10:13:34 -07:00
Leonardo de Moura
c2a5e37c60
feat: simp discharger
2021-09-16 10:11:27 -07:00
Leonardo de Moura
06dbc56629
chore: update stage0
2021-09-16 07:41:43 -07:00
Leonardo de Moura
fd8fb3cf9e
chore: prepare to change simp syntax
2021-09-16 07:41:04 -07:00
Sebastian Ullrich
130eac1b77
chore: reintroduce lean.cpp in separate commit so Git doesn't freak out
2021-09-16 07:03:37 -07:00
Sebastian Ullrich
b3bb2bac97
chore: move all C++ code into libleanshared, use C stub for main
...
Avoids any issues with cross-lib C++
2021-09-16 07:03:37 -07:00
Sebastian Ullrich
08c2c31fcd
feat: IO.FS.removeDir(All)
2021-09-16 07:01:37 -07:00
Sebastian Ullrich
cd7968ba6a
chore: IO.FS.removeFile: include path in error messages
2021-09-16 07:01:37 -07:00
Leonardo de Moura
a29e81b0b6
test: add registerTraceClass test
2021-09-16 06:52:58 -07:00
tydeu
3c1185dc9c
chore: document package configuration + other minor cleanup
2021-09-16 07:49:56 -04:00
Chris Lovett
d32b4ffb24
fix: make sure logs folder exists
2021-09-16 09:46:10 +02:00
Daniel Selsam
8d370f151f
fix: space before 'at' in location
2021-09-15 18:41:26 +02:00
Leonardo de Moura
6fb2a2b47b
chore: remove ≅ notation for HEq
...
We don't really needed it here.
2021-09-15 08:06:32 -07:00
Leonardo de Moura
ae8989a8c6
feat: add mkAppOptM' and mkAppM'
2021-09-15 06:35:40 -07:00
Daniel Selsam
a35cbb5844
fix: pp.analyze skip all omitted instances
2021-09-15 09:41:16 +02:00
Daniel Selsam
5eed3b73bf
chore: adjust pp.analyze funext test
2021-09-15 09:41:16 +02:00
Daniel Selsam
664737def8
feat: trust subtype.mk by default
2021-09-15 09:41:16 +02:00
Daniel Selsam
4b011affca
chore: better msgs in pp.analyze test
2021-09-15 09:41:16 +02:00
Daniel Selsam
7cdcb56c1d
feat: pp.analyze extend max heuristic to imax
2021-09-15 09:41:16 +02:00
Daniel Selsam
4646b36459
feat: pp.analyze no explicit holes by default
2021-09-15 09:41:16 +02:00
Leonardo de Moura
cbe5241663
chore: cleanup
2021-09-14 19:20:32 -07:00
Leonardo de Moura
db583550fd
feat: add Lean.Rat for implementing decision procedures
2021-09-14 19:18:12 -07:00
Leonardo de Moura
34853bcbd8
chore: update stage0
2021-09-14 18:55:05 -07:00
Leonardo de Moura
3fa54e604d
fix: inductive type name is not a necessarily a prefix of the constructor name in Lean 4 anymore
2021-09-14 18:52:43 -07:00
Leonardo de Moura
b92a2cd918
feat: heterogeneous congruence theorems
...
These theorems are needed to implement the congruence closure module.
2021-09-14 17:23:12 -07:00
Leonardo de Moura
35d036b09a
chore: cleanup
2021-09-14 16:09:56 -07:00
Leonardo de Moura
f40a9b7912
feat: add consumeAutoOptParam
2021-09-14 16:09:46 -07:00
Leonardo de Moura
736f119beb
feat: add FunInfo.getArity
2021-09-14 15:58:00 -07: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
Leonardo de Moura
deea3996be
fix: allow renameI to rename shadowed names
2021-09-13 06:43:34 -07:00
Leonardo de Moura
04ecce0085
chore: update stage0
2021-09-12 19:55:26 -07:00
Leonardo de Moura
96d00ff2d7
fix: fixes #664
2021-09-12 19:54:45 -07:00
Leonardo de Moura
6a9ac6c484
test: rw without offset constraints modulo
2021-09-12 19:37:18 -07:00
Leonardo de Moura
a6d41227c6
chore: update stage0
2021-09-12 19:30:04 -07:00
Leonardo de Moura
d2240a99e5
feat: add erw tactic back as a macro
2021-09-12 19:29:12 -07:00
Leonardo de Moura
20abdcb794
chore: update stage0
2021-09-12 19:11:41 -07:00
Leonardo de Moura
42436254ee
fix: code
2021-09-12 19:11:21 -07:00
Leonardo de Moura
1de3efff9d
chore: update stage0
2021-09-12 19:06:04 -07:00
Leonardo de Moura
bfa1c86b24
feat: add optional config parser to rewrite tactics
2021-09-12 19:05:15 -07:00
Leonardo de Moura
ea37c64b52
feat: add Meta.Rewrite.Config
2021-09-12 18:44:08 -07:00
Leonardo de Moura
0726b85adb
feat: add option for disabling Offset.lean
2021-09-12 18:37:25 -07:00
Leonardo de Moura
71229f45fb
chore: "upgrate" to doc string
2021-09-12 18:30:08 -07:00
Leonardo de Moura
4af94b2f6d
chore: update stage0
2021-09-12 18:28:06 -07:00
Leonardo de Moura
f43ab76641
feat: doc string for syntax abbreviations
2021-09-12 18:26:36 -07:00
Leonardo de Moura
8c82302aca
refactor: add config syntax and macro for boilerplate code
2021-09-12 18:09:19 -07:00
Leonardo de Moura
91001eef5a
doc: make it clear that v must have been initialized
2021-09-12 06:05:23 -07:00
Leonardo de Moura
bbe6d37109
fix: specialize
2021-09-11 19:52:51 -07:00
Leonardo de Moura
218b9c87b0
feat: expose APIs for creating IO.Error objects
2021-09-11 17:14:43 -07:00
Leonardo de Moura
ca6941ab39
chore: rename lean_mpz_value
2021-09-11 17:00:47 -07:00
Leonardo de Moura
f9bc4b9b3a
feat: add missing APIs
2021-09-11 15:39:11 -07:00
Leonardo de Moura
fc36dfc550
chore: update stage0
2021-09-11 14:10:20 -07:00
Leonardo de Moura
ae5eb9f793
chore: update stage0
2021-09-11 14:07:23 -07:00
Leonardo de Moura
e6f02b7b1a
fix: workaround for inlining heuristic
2021-09-11 14:05:29 -07:00
Leonardo de Moura
6b235b05d2
feat: avoid code generation after stage1 for match auxiliary functions
2021-09-11 13:41:38 -07:00
Leonardo de Moura
de05b0a038
chore: add Eqns.lean entry point
2021-09-11 13:12:09 -07:00
Leonardo de Moura
1fd3cfb19f
feat: pretty print let_fun
2021-09-11 05:15:11 -07:00
Leonardo de Moura
54d0fc043e
feat: preserve Expr.mdata at simp
2021-09-11 04:49:36 -07:00
Leonardo de Moura
f26c905130
refactor: split Structural.lean into smaller files
2021-09-11 03:40:51 -07:00
Leonardo de Moura
964095ba6e
chore: clean up before refactoring
2021-09-11 02:58:55 -07:00
Leonardo de Moura
127681666a
test: more equality theorems using split
2021-09-10 19:36:27 -07:00
Leonardo de Moura
e667385cf5
feat: simpLet when zeta reduction is disabled
2021-09-10 19:34:38 -07:00
Leonardo de Moura
c06ae66c53
feat: add withScope
2021-09-10 19:20:25 -07:00
Leonardo de Moura
4630c9af7c
feat: add congruence lemmas for let-expressions
2021-09-10 18:53:23 -07:00
Leonardo de Moura
0cf2c19fc2
fix: condition for selecting split target
...
Only discriminants must not have loose bound variables
2021-09-10 14:56:15 -07:00
Chris Lovett
1591bb1640
doc: fix msys text based on code review feedback
2021-09-10 10:07:57 +02:00
Sebastian Ullrich
7467422b67
fix: macOS: libleanshared install name
2021-09-10 09:18:14 +02:00
Leonardo de Moura
1576040c87
chore: remove workaround
2021-09-09 19:30:31 -07:00
Leonardo de Moura
c36cb849d0
chore: update stage0
2021-09-09 19:28:58 -07:00
Leonardo de Moura
19a710ffc9
feat: add getMatchWithExtra and improve tryLemma at simp
2021-09-09 19:28:09 -07:00
Leonardo de Moura
87f49be5dd
fix: missing withReducible
2021-09-09 18:31:10 -07:00
Leonardo de Moura
f5a4b30d5f
fix: broken proof
2021-09-09 18:11:05 -07:00
Leonardo de Moura
8feb14186e
chore: update stage0
2021-09-09 18:07:35 -07:00
Leonardo de Moura
1e1a085ab3
test: eq theorem derivation
2021-09-09 17:51:49 -07:00
Leonardo de Moura
7607a24469
test: deriving DecidableEq for enum types
...
Forgot to add test.
2021-09-09 17:47:23 -07:00
Leonardo de Moura
5154f462f8
feat: add reduce conv tactic
2021-09-09 17:47:10 -07:00
Leonardo de Moura
496cc92ae9
feat: add simpMatch helper conv tactic
2021-09-09 17:29:32 -07:00
Leonardo de Moura
09eecc5c08
fix: simp was not applying rewrites to the function application prefixes
2021-09-09 17:07:14 -07:00
Leonardo de Moura
5a7badd69a
feat: add support for erasing keyed attributes
...
This commit addresses any issue described at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Eq.2Endrec.20vs.20Eq.2Erec
2021-09-09 14:28:41 -07:00
Leonardo de Moura
b5b5370181
feat: add delta to conv mode
2021-09-09 13:07:33 -07:00
Leonardo de Moura
4087525cba
feat: add delta tactic
2021-09-09 13:07:33 -07:00
Leonardo de Moura
3c49969832
feat: add replaceLocalDeclDefEq
2021-09-09 13:07:33 -07:00
Leonardo de Moura
cd75132378
refactor: add withLocation combinator
2021-09-09 13:07:33 -07:00
Sebastian Ullrich
c5940f0149
fix: cmake/make dependencies
2021-09-09 18:12:55 +02:00
Leonardo de Moura
075ba63a8b
feat: add LEAN_ABORT_ON_PANIC
2021-09-09 04:49:16 -07:00
Sebastian Ullrich
2159a90c8c
fix: lean target dependencies
...
Fixes #661
2021-09-09 11:55:33 +02:00
Leonardo de Moura
474395aae4
perf: use binary search
2021-09-08 16:54:54 -07:00
Leonardo de Moura
193d4dc9f5
feat: optimized deriving DecidableEq for enumeration types
...
The proof term is liner on the number of constructors, but type
checking is not linear because the reduction engine in the kernel is
not efficient.
2021-09-08 16:21:32 -07:00
Leonardo de Moura
9b0dfc4b90
feat: convert "orphan" kernel nat literals n into ofNat n
2021-09-08 14:58:13 -07:00
Leonardo de Moura
9032ddd773
chore: add simp lemma for converting Nat.add back into + notation
2021-09-08 14:58:13 -07:00
Christian Pehle
bd02f16b43
feat: optimized ``deriving BEq`` for enumeration types
2021-09-08 14:57:21 -07:00
Sebastian Ullrich
e0869bdf55
fix: sanitized build
2021-09-08 17:24:31 +02:00
Sebastian Ullrich
a97621467f
fix: stdlib.make: missing target
2021-09-08 17:24:31 +02:00
Sebastian Ullrich
68a3799b7c
refactor: build lean in stdlib.make
2021-09-08 17:24:31 +02:00
Sebastian Ullrich
01325170a6
feat: make LEANC_CC configurable
2021-09-08 17:24:31 +02:00
Sebastian Ullrich
af78071000
chore: use -Bsymbolic in favor of -Bsymbolic-functions, which Zig doesn't like
2021-09-08 17:24:31 +02:00
Sebastian Ullrich
ab9a31a806
refactor: leanc: use case
2021-09-08 17:24:31 +02:00
Sebastian Ullrich
9702fe1981
chore: leanc: use C instead of C++ compiler
2021-09-08 17:24:31 +02:00
Leonardo de Moura
716ffecf89
chore: add sorry tactic
2021-09-08 08:10:37 -07:00
Leonardo de Moura
c1573d15c1
test: missing tests
2021-09-08 08:00:36 -07:00
Leonardo de Moura
12af1480d6
feat: add specialize tactic
2021-09-08 08:00:02 -07:00
Sebastian Ullrich
3787c6081c
fix: pass worker cmdline options to Lean code
2021-09-08 11:34:31 +02:00
Sebastian Ullrich
58e8c5774c
fix: stdlib_flags.h
2021-09-08 11:34:31 +02:00
Chris Lovett
bc3900cbb9
doc: small fixes
2021-09-07 19:19:58 -07:00
Leonardo de Moura
3fc226dc6d
chore: fix tests
2021-09-07 19:14:30 -07:00
Leonardo de Moura
445cc3085f
refactor: avoid Name, MVarId, and FVarId confusion
2021-09-07 19:06:50 -07:00
Leonardo de Moura
750c2507da
test: add *> laziness test
...
This commit also fixes a broken test
Closes #617
The following operators are now lazy: `<|>`, `>>`, `*>`, `<*`, `<*>`
2021-09-07 18:03:15 -07:00
Leonardo de Moura
e5600b03df
chore: update stage0
2021-09-07 17:51:26 -07:00
Leonardo de Moura
53ec43ff9b
refactor: lazy evaluation for >>, <*>, <*, and *>
...
see issue: #617
2021-09-07 17:50:34 -07:00
Leonardo de Moura
51b7c4cf21
chore: remove Nondet.lean
...
It was too "unsafe", and it is dead code.
2021-09-07 17:36:20 -07:00
Leonardo de Moura
6ea7869c6a
chore: "fix" <|> notation declaration
...
The `infix` declaration was generating a delaborator, but it is
producing the invalid term
```
ConstantFunction.f myFun 3 <|> fun _ => ConstantFunction.f myFun 4
```
It is invalid because the `macro_rules` for `<|>` is based on
`binop_lazy%` which introduces the `fun _ =>` for us.
I tried to use
```
notation:20 a:21 " <|> " b:20 => HOrElse.hOrElse a fun _ : Unit => b
```
but the delaborator generator does not work for this case.
2021-09-07 17:29:27 -07:00
Leonardo de Moura
eb94e87195
chore: fix some tests
2021-09-07 17:20:21 -07:00
Leonardo de Moura
c5f9113dcf
test: use <|> at binop_lazy test
2021-09-07 17:10:36 -07:00
Leonardo de Moura
2f0a936f88
chore: update stage0
2021-09-07 17:08:16 -07:00
Leonardo de Moura
3714cf16ec
refactor: lazy evaluation for <|>
...
see #617
2021-09-07 17:06:10 -07:00
Leonardo de Moura
3b136816fe
chore: update stage0
2021-09-07 13:39:59 -07:00
Leonardo de Moura
55f01fb6e1
feat: elaborate binop_lazy%
2021-09-07 13:30:09 -07:00
Leonardo de Moura
61976c4e56
chore: update stage0
2021-09-07 13:29:50 -07:00
Leonardo de Moura
d991c20859
chore: add binop_lazy%
...
This is a gadget for issue #617 .
2021-09-07 13:00:36 -07:00
Leonardo de Moura
5a862a06c6
chore: remove leftover
2021-09-07 12:57:27 -07:00
Leonardo de Moura
f46eedac84
fix: fixes #655
2021-09-07 12:17:28 -07:00
Leonardo de Moura
a8007ee827
chore: update stage0
2021-09-07 08:26:55 -07:00
Leonardo de Moura
c8406a301d
chore: reduce src/include/lean
2021-09-07 08:24:54 -07:00
Leonardo de Moura
c93982d10c
chore: disable pp.analyze for now
...
see #651
2021-09-07 07:51:43 -07:00
Leonardo de Moura
ebd8f1efa7
chore: avoid object.h dependencies
2021-09-07 07:31:48 -07:00
Daniel Selsam
b36baa143f
feat: improved name-unresolving in delab
...
Fixes #641
2021-09-07 16:26:00 +02:00
Henrik Böving
b46aa05241
doc: new way to install lean4-mode
...
The current installation procedure requires you to have and update a checkout
of lean4 yourself which is rather annoying if you are just someone who
wants to work with lean4-mode for another project. straight.el +
use-package provide a nice alternative to the current approach.
2021-09-07 16:23:18 +02:00
Henrik Böving
4eca7c2a39
fix: add lsp-mode to the lean4-mode dependencies
...
lean4-mode implicitly relies on lsp-mode being installed, however this
dependency is not explicitly declared. The version used is the latest
release version which seemed to work out for me.
2021-09-07 16:23:18 +02:00
Leonardo de Moura
e2cc056cdd
fix: assertion violation
2021-09-07 07:16:12 -07:00
Leonardo de Moura
d643dfd1c7
chore: update stage0
2021-09-06 12:02:41 -07:00
Leonardo de Moura
70f2200778
chore: remove enum command
...
Now, `inductive` is also efficient for big enumeration types
2021-09-06 12:01:37 -07:00
Leonardo de Moura
1ce2ff394c
chore: update stage0
2021-09-06 11:57:21 -07:00
Leonardo de Moura
d174ffb075
chore: update stage0
2021-09-06 11:55:51 -07:00
Leonardo de Moura
a7c621854e
feat: optimized noConfusion for enumeration types
2021-09-06 11:52:36 -07:00
Leonardo de Moura
d43a1c7d9a
chore: move Constructions to Meta
2021-09-06 10:51:11 -07:00
Leonardo de Moura
ab63382158
feat: add helper functions for optimized noConfusion
2021-09-06 10:33:34 -07:00
Leonardo de Moura
09326df213
chore: fix test output
2021-09-06 07:39:57 -07:00
Leonardo de Moura
ec30a6b7e8
chore: update stage0
2021-09-06 07:37:16 -07:00
Leonardo de Moura
1d68f38aa6
feat: use approxDepth to compute hash code
2021-09-06 07:36:41 -07:00
Leonardo de Moura
5ce97286bb
chore: update stage0
2021-09-06 07:28:10 -07:00
Leonardo de Moura
fa29428934
feat: use 8-bits to store the approximate depth on an expression
...
We are going to use this information to (try to) minimize the number
of hash collisions.
2021-09-06 07:26:51 -07:00
Leonardo de Moura
65509c5617
doc: add basic perf documentation
2021-09-06 07:12:36 -07:00
Leonardo de Moura
20022f3c6d
chore: update stage0
2021-09-05 20:44:08 -07:00
Leonardo de Moura
a8044eb252
feat: improve Match module for patterns containing Fin and UInt literals
2021-09-05 20:43:40 -07:00
Leonardo de Moura
fc334ffbee
fix: pattern matching on UInt
2021-09-05 19:15:59 -07:00
Leonardo de Moura
0d751f3bd3
chore: update stage0
2021-09-05 18:49:02 -07:00
Leonardo de Moura
dc3b4a06f3
fix: missing case
2021-09-05 18:43:39 -07:00
Leonardo de Moura
fa94ce0660
chore: fix test output
2021-09-05 17:49:03 -07:00
Leonardo de Moura
da31ea4b5b
chore: update stage0
2021-09-05 17:17:30 -07: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
Leonardo de Moura
6f075e6ece
feat: add enum command for declaring enumeration types
...
closes #654
2021-09-05 16:58:49 -07: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
Leonardo de Moura
e4410cfbf8
chore: missing Fin instances
2021-09-05 16:09:18 -07: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
Leonardo de Moura
c3bb948009
feat: ignore nested proofs in patterns
2021-09-05 15:46:03 -07: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
Leonardo de Moura
029c5b74a2
feat: ignore implicit arguments at congr conv tactic
2021-09-05 09:44:52 -07:00
Leonardo de Moura
d3c487ddbf
feat: change lhs and rhs conv tactic semantics
...
They can now be applied to non binary applications.
2021-09-05 09:29:40 -07: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
Wojciech Nawrocki
b6971e4733
fix: don't crash watchdog on notifications to closed files
2021-09-04 18:50:27 -07:00
Leonardo de Moura
ef8aadcbea
fix: fixes #653
2021-09-04 18:42:33 -07:00
Leonardo de Moura
aedc706e7d
feat: in modifier at conv tactic
...
It is just a macro for `pattern`
2021-09-04 18:20:33 -07:00
Leonardo de Moura
41cfef5bc4
feat: add pattern conv tactic
2021-09-04 18:02:46 -07: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
Leonardo de Moura
53a3831fd5
feat: add apply conv macro
2021-09-03 20:23:15 -07:00
Leonardo de Moura
94bc386fb4
feat: remark goals as conv goals at the end of nested tactic block
2021-09-03 19:52:51 -07:00
Leonardo de Moura
de455a9010
chore: add tactic' => ... which preserves the conv goal annotation
2021-09-03 19:41:39 -07:00
Leonardo de Moura
6988560177
feat: apply allGoals (try rfl) at end of conv nested blocks
2021-09-03 19:21:34 -07:00
Leonardo de Moura
bfefeb6e5a
chore: use compact structure instance notation
2021-09-03 18:59:26 -07:00
Leonardo de Moura
229373a7e6
chore: fix test
2021-09-03 18:59:13 -07:00
Leonardo de Moura
e6c9da0fcc
feat: add support for implication at congr conv tactic
2021-09-03 18:50:19 -07:00
Leonardo de Moura
69075c775f
fix: missing withMainContext
2021-09-03 16:57:24 -07:00
Leonardo de Moura
44e7033c27
feat: add support for forall_congr at conv
2021-09-03 16:57:15 -07:00
Leonardo de Moura
3f70bc543f
feat: add simp conv tactic
2021-09-03 12:06:29 -07:00
Leonardo de Moura
75b8d9aa86
feat: add support for classes with a prefix of outParams at deriving ...
2021-09-03 11:33:09 -07:00
Leonardo de Moura
bbb74bfd9a
feat: elaborate optional deriving after def
2021-09-03 10:22:17 -07:00
Leonardo de Moura
d682d60025
chore: cleanup
2021-09-03 09:48:36 -07:00
Leonardo de Moura
8a268e184b
feat: update def parser with optional deriving ...
2021-09-03 09:42:17 -07:00
Leonardo de Moura
35c0cc3c91
feat: deriving support for type aliases
2021-09-03 09:33:01 -07:00
Leonardo de Moura
8a249bddd2
feat: add try rfl at end of convTarget
2021-09-03 08:14:47 -07:00
Leonardo de Moura
18bcc458d0
feat: add 'enter' conv tactic macro
2021-09-03 08:11:37 -07:00
Leonardo de Moura
b5b5ef6fdf
feat: add funext conv tactic
2021-09-03 08:00:37 -07:00
Leonardo de Moura
d803a6787a
chore: update stage0
2021-09-02 19:49:31 -07:00
Leonardo de Moura
95b83ac2c0
feat: add 'conv at .. => ..' support
2021-09-02 19:40:08 -07:00
Leonardo de Moura
7b8ee8f9d8
feat: add 'change' conv tactic
2021-09-02 19:26:25 -07:00
Leonardo de Moura
397774157f
feat: nested tactic support in conv mode
2021-09-02 19:12:05 -07:00
Leonardo de Moura
39adda8ffe
fix: missing goals
2021-09-02 19:11:52 -07:00
Leonardo de Moura
41ce24e2c6
feat: add done and traceState conv tactics
2021-09-02 18:46:03 -07:00
Leonardo de Moura
33361929b9
feat: add rewrite conv tactic
2021-09-02 18:13:19 -07:00
Leonardo de Moura
4d32f8eb9d
feat: add arg conv tactic
2021-09-02 17:43:43 -07:00
Leonardo de Moura
120b0200c2
chore: update stage0
2021-09-02 17:30:50 -07:00
Leonardo de Moura
d7537f252a
chore: remove unnecessay parser/elab
2021-09-02 17:29:32 -07:00
Leonardo de Moura
391366ef24
refactor: add annotation for displaying conv state
2021-09-02 15:52:11 -07:00
Leonardo de Moura
a8b434f93d
feat: add missing parsers
2021-09-02 15:25:34 -07:00
Leonardo de Moura
4df9983843
feat: lhs and rhs conv tactics
2021-09-02 15:05:51 -07:00
Leonardo de Moura
9bb5d4dc93
chore: Nat.ltWf => Nat.lt_wf
2021-09-02 07:51:41 -07:00
Leonardo de Moura
ab8627d929
chore: update stage0
2021-09-01 19:27:13 -07:00
Leonardo de Moura
f1c5e7596b
chore: fix build
2021-09-01 19:26:56 -07:00
Leonardo de Moura
f80ca1576e
chore: update stage0
2021-09-01 19:26:47 -07:00
Leonardo de Moura
e3ccc03a45
chore: add nested conv tactics
2021-09-01 18:44:35 -07:00
Leonardo de Moura
7a69c6483d
feat: add congr conv tactic
2021-09-01 18:32:21 -07:00
Leonardo de Moura
346e3ac845
feat: add helper methods for conv
2021-09-01 17:43:32 -07:00
Leonardo de Moura
254f82c273
feat: basic infrastructure for conv mode
2021-09-01 17:00:45 -07:00
Leonardo de Moura
1a362bc212
feat: add support for displaying conv goal in interactive mode
2021-09-01 16:45:12 -07:00
Leonardo de Moura
2166057d47
chore: add elab_stx_quot for conv
2021-09-01 15:56:14 -07:00
Leonardo de Moura
2cbedc0b8f
chore: update stage0
2021-09-01 15:36:20 -07:00
Leonardo de Moura
6d8058034a
chore: basic conv mode parsers
2021-09-01 15:35:32 -07:00
Leonardo de Moura
b18af2c15c
feat: basic support for displaying conv state
2021-09-01 15:34:59 -07:00
Leonardo de Moura
f3b047faf2
chore: update stage0
2021-09-01 14:13:22 -07:00
Leonardo de Moura
d67c633ca1
feat: allow user to set "behavior" at declare_syntax_cat
2021-09-01 13:28:12 -07:00
Leonardo de Moura
d69b8a79ca
chore: add link to "Theorem Proving in Lean 4" tutorial
2021-09-01 10:44:43 -07:00
Leonardo de Moura
5f762171cc
feat: add support for split at
2021-08-31 19:35:07 -07:00
Leonardo de Moura
6db4b53c40
fix: missing flag
2021-08-31 19:29:09 -07:00
Leonardo de Moura
8fec444e55
feat: add injections tactic
2021-08-31 19:12:06 -07:00
Leonardo de Moura
22a80a9623
test: split tactic tests
2021-08-31 17:09:00 -07:00
Leonardo de Moura
ad539a23e1
chore: cleanup proofs for tutorial
2021-08-31 16:37:40 -07:00
Leonardo de Moura
454da2938a
chore: update stage0
2021-08-31 15:31:33 -07:00
Leonardo de Moura
03e61155b0
feat: allow instances to be (temporarily) erased
2021-08-31 15:30:29 -07:00
Leonardo de Moura
56961060d4
fix: use rawIdent at eraseAttr parser
...
Reason: some attribute names are also keywords (e.g., `instance`).
2021-08-31 15:07:21 -07:00
Leonardo de Moura
9e728ebb0a
test: split tactic
2021-08-31 13:14:10 -07:00
Leonardo de Moura
c7d797f5b6
feat: add simpMatch and use it at splitMatch
2021-08-31 12:53:41 -07:00
Leonardo de Moura
6d4422e5ac
refactor: add Simp.tryLemma?
2021-08-31 12:32:34 -07:00
Leonardo de Moura
a83872c718
chore: add pp.match option
2021-08-31 12:32:04 -07:00
Leonardo de Moura
2375447b4d
chore: remove temporary trace messages
2021-08-31 12:13:07 -07:00
Leonardo de Moura
a79b50d629
chore: add type to error message
2021-08-31 10:06:22 -07:00
Leonardo de Moura
c391521891
chore: update stage0
2021-08-31 10:00:34 -07:00
Leonardo de Moura
c491f829e0
feat: elaborator for the calc notation
...
- It produces better error messages.
- It tweaks the elaboration order.
- It adds a checkpoint after each step.
- It avoids the `show .. from ..` workaround.
2021-08-31 09:56:49 -07:00
Leonardo de Moura
d37d340bb0
test: MatchEqs.lean
2021-08-31 06:10:10 -07:00
Leonardo de Moura
aba0a479ec
fix: intro at split tactic
2021-08-30 20:58:04 -07:00
Leonardo de Moura
0a215ac1d2
feat: store the number of parameters in each match splitter alternative
2021-08-30 20:57:18 -07:00
Leonardo de Moura
941f4a5887
chore: update stage0
2021-08-30 18:32:29 -07:00
Leonardo de Moura
b500a2053d
feat: split tactic for splitting match and if terms
2021-08-30 18:31:20 -07:00
Leonardo de Moura
92cf7c987f
chore: cleanup
2021-08-30 16:33:05 -07:00
Leonardo de Moura
ad3b0b4a2c
feat: nary generalize tactic
...
This commit also fixes a bug when using multiple targets with the
`induction` and `cases` tactics.
2021-08-30 16:31:39 -07:00
Leonardo de Moura
2a6473641a
chore: fix theorem name
2021-08-30 10:10:54 -07:00
Leonardo de Moura
2012d9dca1
fix: make sure simp only still uses eq_self
2021-08-30 09:50:11 -07:00
Leonardo de Moura
f4c72025ee
feat: add calc tactic macro
2021-08-30 09:33:32 -07:00
Leonardo de Moura
ce47000e33
fix: missing whnf at tryLemma?
2021-08-30 08:33:58 -07:00
Leonardo de Moura
79938056ad
chore: add isIte and isDIte
2021-08-30 07:08:19 -07:00
Leonardo de Moura
02224548d2
chore: generalize signatures
2021-08-30 07:05:40 -07:00
Leonardo de Moura
34d8ecc066
fix: use show .. from .. to implement calc
...
Recall that `show .. from ..` ensures that proof has exactly the type
provided by the user.
In the new test, `rw [ih]` without this change because the goal would
be
```
... |- 0 + succ n = succ n
```
2021-08-29 11:33:50 -07:00
Leonardo de Moura
1f37cc7b41
feat: add next x₁ ... xₙ => tac tactic
2021-08-29 10:51:01 -07:00
Leonardo de Moura
3972f011ee
chore: update stage0
2021-08-29 10:47:53 -07:00
Leonardo de Moura
1e5a4729c3
feat: case _ ... => ... as solve next goal
2021-08-29 10:45:38 -07:00
Leonardo de Moura
091efbec4f
test: simulate split tactic for match
2021-08-29 10:21:52 -07:00
Leonardo de Moura
9d5f211c28
feat: add environment extension for storing match conditional equations and splitter
2021-08-28 14:49:20 -07:00
Leonardo de Moura
acfa2d7e78
doc: start porting reference manual
2021-08-27 19:30:08 -07:00
Leonardo de Moura
e0e3de5c62
feat: allow (decidable) propositions at #eval
2021-08-27 15:06:48 -07:00
Leonardo de Moura
03f095ccab
fix: match + OfNat issue
...
See https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/simp.20match.20question
2021-08-27 11:48:02 -07:00
Leonardo de Moura
152572386b
chore: fix comment
2021-08-27 10:43:51 -07:00
Leonardo de Moura
7c68741c65
chore: update stage0
2021-08-27 10:39:05 -07:00
Leonardo de Moura
7864a57580
chore: update stage0
2021-08-27 10:37:17 -07:00
Leonardo de Moura
6713d8777a
fix: work duplication bug at specialize.cpp
...
closes #646
2021-08-27 10:35:27 -07:00
Leonardo de Moura
b205cfaaf2
chore: missing annotations at List.mapTR
2021-08-27 10:17:49 -07:00
Leonardo de Moura
8ba10521e6
feat: add theorem for tutorial
2021-08-26 12:58:02 -07:00
Leonardo de Moura
c897f63dd0
fix: using incorrect local context to process simp arguments
2021-08-26 12:49:12 -07:00
Leonardo de Moura
00193fb953
feat: add theorems for tutorial
2021-08-26 12:13:15 -07:00
Leonardo de Moura
b5a434d8a9
test: for induction q with Quot.ind issue
...
See
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Induction.20alternative.20name.20when.20using.20Quot.2Eind.3F
2021-08-26 11:15:14 -07:00
Leonardo de Moura
1aa274e5c0
chore: update stage0
2021-08-26 11:13:16 -07:00
Leonardo de Moura
cf49e6fe8f
fix: binder name
...
Binder names are relevant for the `induction` tactic.
2021-08-26 11:11:37 -07:00
Leonardo de Moura
21a4296ca8
feat: add anyGoals tatic for tutorial
2021-08-26 10:41:06 -07:00
Leonardo de Moura
672849e302
feat: improve error message for constant a b c : Nat
...
see issue #645
2021-08-26 08:26:33 -07:00
Leonardo de Moura
efa5db197e
fix: position information for implicit type
2021-08-26 08:07:16 -07:00
Leonardo de Moura
1ede4843e3
feat: add renameI tactic
2021-08-25 18:50:59 -07:00
Leonardo de Moura
5e4c79964a
fix: nasty bug at rename tactic
2021-08-25 15:27:29 -07:00
Leonardo de Moura
dfe7d9432d
feat: add withoutModifyingStateWithInfoAndMessages
2021-08-25 15:11:45 -07:00
Leonardo de Moura
795ccf6e2b
chore: add Trans instances for tutorial
2021-08-25 08:50:51 -07:00
Leonardo de Moura
5003c74191
chore: fix test
2021-08-25 07:00:25 -07:00
Leonardo de Moura
42f1e16f44
chore: fix calc test
2021-08-25 06:59:46 -07:00
Sebastian Ullrich
f9fd0b3de4
feat: calc
2021-08-25 06:57:09 -07:00
Leonardo de Moura
f08b542068
chore: add Nat.add_mul and Nat.mul_add for tutorial
2021-08-25 06:44:12 -07:00
Leonardo de Moura
fb41e0f4e5
chore: update stage0
2021-08-24 20:26:39 -07:00
Leonardo de Moura
2f8d2e8a12
feat: add procedure for solving subgoals generated by mkSplitterProof
2021-08-24 20:23:13 -07:00
Leonardo de Moura
2b9fded6b7
feat: add splitter theorem
2021-08-24 18:37:12 -07:00
Leonardo de Moura
a3ec6a0565
chore: missing instance
2021-08-24 18:12:12 -07:00
Leonardo de Moura
f4ecbd1102
chore: reduce dependencies
2021-08-24 17:38:43 -07:00
Leonardo de Moura
6f71cb1047
refactor: add Meta.intros
2021-08-24 17:24:29 -07:00
Leonardo de Moura
14b65499e6
feat: construct proof template for the auto generated extended elimination principle
2021-08-24 17:13:42 -07:00
Leonardo de Moura
214f2f7bb6
fix: toFVarsRHSArgs
2021-08-24 16:50:03 -07:00
Leonardo de Moura
63b11368ca
chore: add Or.elim for tutorial
2021-08-24 14:11:18 -07:00
Leonardo de Moura
82eb1b3558
chore: add Or.intro_left and Or.intro_right
...
for porting manuals
2021-08-24 14:06:29 -07:00
Sebastian Ullrich
e632c14f3f
chore: align stx precedence in syntax to the new one in macro
2021-08-24 10:11:12 -07:00
Leonardo de Moura
97764b58b2
chore: update stage0
2021-08-24 09:06:16 -07:00
Wojciech Nawrocki
81eff794d5
doc: add review comments
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
0d35cf3bb8
feat: allow future additions to CodeWithInfos tags
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
0dea880aba
doc: diagnostic diff in snapshots
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
1076d3ed2f
chore: bump server version
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
0897984a95
feat: send expression range in interactive term goal
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
198be2c8a7
chore: no backticks in Name JSON
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
2f5fbf3b13
feat: support multiple RPC sessions
...
Motivation: we may want to also use RPC in editor insets, or multiple
webviews in general.
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
e4fb367f20
chore: make rpc/connect a request
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
278f884406
chore: use array for hypothesis names
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
03dbfaea03
chore: remove ExprWithCtx
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
dc5652210c
fix: missing instance
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
fd016c6065
chore: address some comments
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
916e80a906
fix: optional type for plain goal request
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
1b68daef39
fix: clear messages earlier
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
feff4c2ed3
feat: unify goal handlers
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
3667b46d1e
chore: support goals embedded in messages
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
e8af38f586
chore: fix tests
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
f52940160e
feat: better interactive goals
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
c948d87a28
chore: forgot import
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
568cc3cf11
refactor: consistent naming of widget modules
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
f7e9ba76dd
perf: cache diagnostics in server
...
Reason 1: we were making quadratically many pretty-printer calls since each `publishMessages` would format the entire `MessageLog`.
Reason 2: we want to avoid formatting each diagnostic twice, once as interactive, and once as plain LSP diagnostic.
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
c316a8ea69
fix: syntax not updating in header snapshots
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
ce7f31a654
feat: keep-alive semantics for RPC sessions
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
e3d866bc03
feat: initial TraceExplorer
...
Motivation: trace messages from systems such as instance synthesis or defeq checks can be massive and it is hard to find the relevant info within. We provide an interactive TraceExplorer component to do this.
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
8207ca6493
feat: more widget Info integration
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
fdc11104eb
feat: begin integrating Elab.Info in widgets
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
7ecea27986
feat: emit MessageData from Infos
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
382add19e2
chore: use new deriving handler
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
7d3db49a15
chore: log errors at identifier
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
7babcc2425
fix: tail-recursion in Format pretty-printer
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
77365abc8b
chore: Repr Syntax and minor cleanup
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
1bab9f6ffc
refactor: simplify delaborator monad stacks
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
73f219ddba
fix: no non-expr embeds in diagnostics
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
73363bef1f
fix: delab structure field annotations
2021-08-24 08:57:41 -07:00
Daniel Selsam
2f484ec096
feat: build info trees in delab
2021-08-24 08:57:41 -07:00
Daniel Selsam
c44d341bd4
feat: SubExpr support for iterating holes
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
fd3bf289c4
fix: text ordering
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
d116e2e923
feat: batch RPC release
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
f49b7c4c57
chore: drop superfluous "server"
...
Co-authored-by: Gabriel Ebner <gebner@gebner.org >
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
cc23a21d3e
chore: cleanup
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
d48b5548b2
feat: flatten tagged text
...
Motivation: in JavaScript `JSON.stringify` does not like deeply nested
objects (it blows the stack). With a flatter structure we can show
longer outputs without running into this issue.
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
ae24d8a2db
feat: interactive diagnostics take 1
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
d7c3866e14
perf: tail-recursive Json.compress
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
bc8027cdc6
perf: speed up String.intercalate
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
72df64e8fe
chore: move RpcSession
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
2a20d41cd9
feat: BEq Json
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
690a152275
feat: interactive goals
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
dae1a94d53
feat: misc server additions
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
2f16d5f121
feat: expressions with bundled environments for RPC
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
6eaa536595
feat: pretty-printer with tags
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
528283bc7d
feat: MonadPrettyFormat
2021-08-24 08:57:41 -07:00
Leonardo de Moura
269a3478e0
refactor: cleanup mkEquationsFor
...
and build eliminator type where alternatives have the extra
conditions that ensure none of the previous alternatives are applicable.
2021-08-23 20:19:24 -07:00
Leonardo de Moura
4f45a514fc
fix: TC issue introduced by recent bug fix
...
This commit fixes the issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/instance.20not.20synthesizing.20issue.3F
2021-08-23 17:32:19 -07:00
Leonardo de Moura
79e6732fc6
fix: update tokenTable at withNamespace parser combinator
...
It also moves `withOpen` and `withOpenDecl` applications to simplify
their definitions and make sure we do not need to reset the cache.
2021-08-23 09:41:36 -07:00
Leonardo de Moura
7edc42fdfc
fix: scoped command after open command
...
The issue was reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Ending.20a.20command
2021-08-23 08:29:30 -07:00
Leonardo de Moura
5a7044365b
feat: add instances Alternative MetaM and Alternative TacticM
2021-08-22 22:29:09 -07:00
Leonardo de Moura
d93c4317d1
feat: add withOpenDecl and withOpen parsers
...
It allow us to process `open .. in ..` while parsing.
This is useful for activating a scoped parser while parsing.
TODO: `openOnly` and `openHiding`, these two cases are rarely used
with `open .. in ..`
closes #529
2021-08-22 20:50:35 -07:00
Leonardo de Moura
ca747e9b27
feat: use contradiction at leaves
...
closes #644
2021-08-22 18:41:02 -07:00
Leonardo de Moura
48e6188e89
feat: use exfalso at ElimEmptyInductive
2021-08-22 18:16:14 -07:00
Leonardo de Moura
e5c380fd4f
feat: add exfalso
2021-08-22 18:14:49 -07:00
Leonardo de Moura
ec20725cfb
feat: use searchFuel instead of searchDepth at contradiction
2021-08-22 17:41:12 -07:00
Leonardo de Moura
7385cbfe2d
test: add mapTR test
2021-08-22 16:51:38 -07:00
Leonardo de Moura
4dccaa963b
feat: add List.mapTR and csimp lemma
2021-08-22 09:32:19 -07: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
Leonardo de Moura
a942ab2b72
chore: update stage0
2021-08-21 17:03:30 -07:00
Leonardo de Moura
21c68a49e3
feat: elaborate nonrec modifier
2021-08-21 17:02:54 -07:00
Leonardo de Moura
ef4359a439
chore: update stage0
2021-08-21 16:39:47 -07:00
Leonardo de Moura
54316fabb4
feat: add nonrec parser
2021-08-21 16:39:18 -07:00
Leonardo de Moura
46a5f06121
feat: do not consider dot notation when isAuxDecl is true
2021-08-21 16:35:32 -07:00
Leonardo de Moura
38ecb25d28
chore: update stage0
2021-08-21 16:13:04 -07:00
Leonardo de Moura
ec6af1ba26
feat: use simple List.append definition and add csimp theorem
2021-08-21 16:11:54 -07:00
Leonardo de Moura
3226fdec8c
chore: update stage0
2021-08-21 15:10:10 -07:00
Leonardo de Moura
4d1d06fcbc
chore: fix test
2021-08-21 15:07:36 -07:00
Leonardo de Moura
4b7498f84b
chore: update stage0
2021-08-21 15:05:52 -07:00
Leonardo de Moura
3b240d9a14
feat: use simple List.length definition and add csimp theorem
2021-08-21 13:11:06 -07:00
Leonardo de Moura
6cfdfe9942
feat: apply csimp attribute constant replacements
2021-08-21 12:22:15 -07:00
Leonardo de Moura
347710204a
chore: update stage0
2021-08-21 11:59:57 -07:00
Leonardo de Moura
71e0ff40c2
feat: add basic support for csimp
2021-08-21 11:58:51 -07:00
Leonardo de Moura
e8d23f305d
chore: elaborate open scoped
2021-08-21 07:16:24 -07:00
Leonardo de Moura
7d3e0ee578
chore: update stage0
2021-08-21 07:07:31 -07:00
Leonardo de Moura
519bb1e7d4
feat: add open scoped parser
2021-08-21 07:06:50 -07:00
Leonardo de Moura
6bd37361dc
chore: update stage0
2021-08-20 19:43:44 -07:00
Leonardo de Moura
7066619123
refactor: define Nat.le using inductive type
2021-08-20 19:39:45 -07:00
Leonardo de Moura
9686910c72
chore: update stage0
2021-08-20 09:46:00 -07:00
Sebastian Ullrich
c138dc7d44
chore: CI: fix patching & copying dependent libs
2021-08-20 09:42:05 -07:00
Sebastian Ullrich
2418acd216
chore: Nix: fix stage0
2021-08-20 09:42:05 -07:00
Sebastian Ullrich
6521143ab3
chore: update stage0
2021-08-20 09:42:05 -07:00
Sebastian Ullrich
82c97d34fa
chore: specify accurate dependencies for leanshared
2021-08-20 09:42:05 -07:00
Sebastian Ullrich
5f4b1b1d44
Revert "Revert "feat: reintroduce libleanshared, link lean & leanpkg against it""
...
This reverts commit ccbc9d00db .
2021-08-20 09:42:05 -07:00
Sebastian Ullrich
ccbc9d00db
Revert "feat: reintroduce libleanshared, link lean & leanpkg against it"
2021-08-20 15:39:00 +02: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
Leonardo de Moura
49520aa2ee
feat: generate conditional equation theorems for match expressions
2021-08-19 19:33:31 -07:00
Leonardo de Moura
37f2f7d472
fix: bug at processGenDiseq
...
We should not assign metavar from outer depth inside `withNewMCtxDepth`
2021-08-19 19:33:26 -07:00
Leonardo de Moura
3c519887d1
chore: generate error message when MatchEqs fail
...
TODO: we currently do not generate equation theorems
for `match` expressions using array literals.
2021-08-19 17:04:52 -07:00
Leonardo de Moura
1624e42a5d
chore: cleaup
2021-08-19 14:39:58 -07:00
Leonardo de Moura
bffefa61bd
feat: extend contradiction for MatchEqs.lean
2021-08-19 12:52:50 -07:00
Leonardo de Moura
7b881b6020
chore: add Contradiction.Config
2021-08-19 11:43:12 -07:00
Leonardo de Moura
33a0da8c6f
chore: remove simp annotation from PUnit.eq_punit
...
closes #635
2021-08-19 11:22:13 -07:00
Leonardo de Moura
a6529a795b
feat: add casesOnStuckLHS
2021-08-19 11:22:13 -07:00
Leonardo de Moura
1b60d54814
feat: make sure Eq.ndrec and Eq.ndrecOn are "tagged" as auxiliary recursors
2021-08-19 11:22:13 -07:00
Sebastian Ullrich
f33cdf6bf9
fix: linking against dl
2021-08-19 19:44:28 +02: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
Leonardo de Moura
7c9158a50e
fix: structure command diamond support
...
Fixes issue described at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Structure.20diamond.20error
2021-08-19 07:45:21 -07:00
Leonardo de Moura
015df19808
feat: add trySubst
2021-08-19 07:08:02 -07:00
Leonardo de Moura
d0d7799a7b
doc: document (and rename) the new configuration option ignoreLevelMVarDepth
2021-08-18 20:38:18 -07:00
Leonardo de Moura
107712f8be
feat: add instance from CoeSort to CoeTail
2021-08-18 20:24:43 -07:00
Leonardo de Moura
99e8a98f06
feat: allow universes metavariables from any depth to be assigned when ignoreLevelDepth is true
...
We set `ignoreLevelDepth` to true during type class resolution.
2021-08-18 20:20:51 -07:00
Leonardo de Moura
45d3b85d5a
refactor: cleanup MatchEqs and simplify SplitIf
2021-08-18 18:34:34 -07: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
Sebastian Ullrich
aa177dacc3
chore: Nix: fix macOS linker flags
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
52f3c6a1d0
fix: initialize Std
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
88f3de7a44
chore: link leanshared using leanc after all
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
40f41a1f14
chore: adjust binary size benchmark
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
09a0347fdc
chore: fix compilation of executables containing code to be interpreted
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
c5f00f4bc2
refactor: minimize linker cycles
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
98b3e4b0ec
chore: fix leanrt compilation flags
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
ef64ea2e62
chore: Nix: use leanshared as well
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
6d113b54d5
chore: fix stage 2
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
41b676fd52
chore: CI: fix sanitized build
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
c867376a82
perf: generate separate libleanrt.a with local-exec TLS model for static linking
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
b7d723c982
refactor: compile runtime/ into new static library leanrt
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
70e22910d7
perf: missing -Bsymbolic-functions for libleanshared.so
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
be31d38146
chore: CI: lower ctest timeout
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
1ed329b305
test: try reenabling plugin test on Windows
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
6827928594
chore: cpack: copy required libraries via ldd/otool
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
68ecda843b
chore: remove STATIC cmake flag
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
440abd4bd1
chore: CI: switch to GCC on Windows for now
...
See discussion at https://github.com/leanprover/lean4/pull/555
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
e6a1d24af3
chore: CI: move "Lean stats" after archive upload
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
62fc54ad23
chore: fix leanshared linker flags
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
58d6f3b817
fix: search all loaded modules for symbols on Windows
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
d9337fa39c
chore: fix multiple definitions on Windows
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
df5c1b2a3b
chore: fix leanshared flags
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
eb72fba635
refactor: build C files using leanmake/leanc in stage 0 as well
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
f46e853899
chore: fix Windows link flags
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
66c83c5cf1
chore: fix macOS patching
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
e1a15d0866
perf: set tls-model on macOS as well
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
6ea8b0f4b6
chore: turn off -Bsymbolic-functions in sanitized build
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
99b40e33f5
chore: Windows: create import library after all
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
22a0e4145a
chore: debug macOS build
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
c9ba846b03
chore: try without import library
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
6440a2cd98
fix: rpath on macOS
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
e121ae0d78
chore: turn off -Bsymbolic-functions in sanitized build
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
f1be9844d1
chore: remove -fno-semantic-interposition again
...
It doesn't seem to change anything other than breaking with LLVM 7
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
754286dc6d
fix: compile flags for libleanruntime.bc
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
92403ae7e1
chore: move -fno-semantic-interposition to the right place
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
c58d138695
perf: fno-semantic-interposition
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
3f99545b85
perf: link shared libraries with -Bsymbolic
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
b0167c6ab0
fix: leanpkg rpath
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
76d6be3a90
perf: set tls-model
2021-08-18 13:54:52 +02:00
Sebastian Ullrich
617f17facb
feat: reintroduce libleanshared, link lean & leanpkg against it
2021-08-18 13:54:52 +02:00
Leonardo de Moura
83eaa47e0a
chore: move MatchEqs
2021-08-17 21:32:32 -07:00
Leonardo de Moura
158636b8c0
feat: add spliIfGoal
...
TODO: remove unnecessary complexity, `MatchEqs` doesn't need all this
complexity, and we should not recurse here.
2021-08-17 21:32:32 -07:00
Leonardo de Moura
bb755d6245
feat: add commitIfNoEx
2021-08-17 21:32:32 -07:00
Leonardo de Moura
e04976614f
feat: check if metavar is not assigned at simp tactics
...
and make sure `simpLocalDecl` does not change the goal if it didn't simplify
2021-08-17 21:32:32 -07:00
Leonardo de Moura
8d90872d28
chore: add not_not_intro
2021-08-17 21:32:32 -07:00
Leonardo de Moura
60d38606e7
fix: missing instantiateMVars
2021-08-17 21:32:32 -07:00
Leonardo de Moura
a5b9306e04
fix: deep recursion at contradiction
2021-08-17 21:32:32 -07:00
Leonardo de Moura
4cfbe6030f
feat: add simpLocalDecl
2021-08-17 21:32:32 -07:00
Leonardo de Moura
52b52b22ef
fix: to do unfold matcher applications that cannot be reduced when smartUnfolding is true
...
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/How.20to.20WHNF.20without.20exposing.20recursors.3F
2021-08-17 21:32:32 -07:00
Leonardo de Moura
4635c3afd1
chore: add notNot?
2021-08-17 21:32:32 -07:00
Leonardo de Moura
60ff468a8b
feat: add simpGoal helper method
...
chore: rename `simpGoal?`
2021-08-17 21:32:32 -07:00
Leonardo de Moura
5a76f70bc8
feat: add optional argument discharge? to simp basic methods
2021-08-17 21:32:32 -07:00
Jannis Limperg
1d3e2aa7b1
chore: rename BinomialHeap.WellFormed constructors
2021-08-17 10:19:12 -07:00
Jannis Limperg
9278e0694b
chore: add test case for BinomialHeap
2021-08-17 10:19:12 -07:00
Jannis Limperg
343d2c9c35
feat: add BinomialHeap.{ofList,ofArray}
2021-08-17 10:19:12 -07:00
Jannis Limperg
b43e03699b
doc: document some BinomialHeap defs
2021-08-17 10:19:12 -07:00
Jannis Limperg
8e89cdc05c
feat: add BinomialHeap.{deleteMin,tail?}
2021-08-17 10:19:12 -07:00
Jannis Limperg
3709234971
chore: BinomialHeap: rename lt to le
2021-08-17 10:19:12 -07:00
Jannis Limperg
63628ef61b
fix: BinomialHeap: insert (head h) (tail h) = h
...
fixes #629
2021-08-17 10:19:12 -07:00
Jannis Limperg
2dae878b79
refactor: optimise BinomialHeap.head?
2021-08-17 10:19:12 -07:00
Jannis Limperg
a4cb981569
feat: add BinomialHeap.{toArray,toListUnordered,toArrayUnordered}
2021-08-17 10:19:12 -07:00
Jannis Limperg
7e56c4dc0b
refactor: simplify BinomialHeap.Heap
2021-08-17 10:19:12 -07:00
Jannis Limperg
6ed99b77e9
chore: rm redundant branch in BinomialHeap.toList
2021-08-17 10:19:12 -07:00
Jannis Limperg
c569c62e85
chore: reformat BinomialHeap
2021-08-17 10:19:12 -07: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
Sebastian Ullrich
fc707f3343
test: fix test on Windows
2021-08-17 12:50:58 +02:00
Sebastian Ullrich
94437bcfbb
fix: import hint
2021-08-17 11:14:42 +02:00
Leonardo de Moura
9d24f614fa
chore: update stage0
2021-08-16 18:03:57 -07:00
Leonardo de Moura
b01239b25b
fix: use enableInitializersExecution at leanpkg
2021-08-16 18:02:51 -07:00
Leonardo de Moura
a05b7589b5
fix: assertion violation
2021-08-16 18:02:41 -07:00
Leonardo de Moura
74fccd89eb
chore: update stage0
2021-08-16 17:44:27 -07:00
Leonardo de Moura
d775dc6195
feat: add flag for controlling the execution of initialize commands when importing modules programmatically
...
Fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Environment.20extensions.20in.20importModules
2021-08-16 17:43:28 -07:00
Leonardo de Moura
02163f8bac
chore: update stage0
2021-08-16 16:15:08 -07:00
Leonardo de Moura
6ced2cdece
refactor: move lean_name_eq to runtime, add lean_name_hash in C
2021-08-16 16:13:55 -07:00
Leonardo de Moura
14b611af96
refactor: move buffer.h and *_ref.h files to runtime
2021-08-16 15:39:38 -07:00
Leonardo de Moura
571a0491ee
feat: add Meta.byCases helper tactic
2021-08-16 14:58:51 -07:00
Leonardo de Moura
fcbd807c9d
chore: some Expr constructors
2021-08-16 13:58:48 -07:00
Leonardo de Moura
f59b9813fb
feat: add environment extension for caching Simp.Context for splitIf
2021-08-16 13:05:01 -07:00
Leonardo de Moura
34b092700e
feat: add LazyInitExtension
2021-08-16 12:54:50 -07:00
Leonardo de Moura
a3a3c7c80c
chore: add LEAN_PATH_SEPARATOR cmake variable
...
Motivation: try to fix failure at 81ff285427
2021-08-16 10:50:01 -07:00
Leonardo de Moura
ca0c205389
feat: add registerSimpAttr
2021-08-16 09:59:58 -07:00
Leonardo de Moura
81ff285427
chore: use leanmake instead of leanpkg
2021-08-16 08:52:27 -07: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
Leonardo de Moura
4fe65f3200
test: mathport issue https://github.com/dselsam/mathport/issues/18
2021-08-15 08:11:20 -07:00
Leonardo de Moura
9182ebd4c1
feat: elaborate * simp argument
2021-08-15 08:02:21 -07:00
Leonardo de Moura
3c68703f39
feat: elaborate <- modifier at simp arguments
2021-08-15 07:07:58 -07:00
Leonardo de Moura
d4410c217b
chore: update stage0
2021-08-14 07:00:52 -07:00
Leonardo de Moura
7c5ab8b4c9
chore: prepare to add <- as simp argument
2021-08-14 06:59:55 -07:00
Leonardo de Moura
25344453c0
feat: add simpStar parser
2021-08-14 06:29:26 -07:00
Leonardo de Moura
cbd36e897b
chore: remove ToExpr Expr
2021-08-14 06:16:46 -07:00
Leonardo de Moura
d8340f55a5
doc: document new binop% elaborator
2021-08-13 20:10:30 -07:00
Leonardo de Moura
d52de3392b
chore: remove workaround
2021-08-13 19:35:47 -07:00
Leonardo de Moura
fc6f9324ac
chore: update stage0
2021-08-13 19:32:49 -07:00
Leonardo de Moura
a15a36b8d3
chore: cleanup Subarray instances
2021-08-13 19:29:09 -07:00
Leonardo de Moura
ddec62f77b
feat: synthesize pending metavariables created before binop% too
...
Reason: some of the `binop%` arguments may be let-variables, and the
values assigned to the let-variables may be in the pending list.
2021-08-13 19:25:45 -07:00
Leonardo de Moura
2994747ed9
chore: remove workaround
2021-08-13 18:25:32 -07:00
Leonardo de Moura
7de38460d1
chore: update stage0
2021-08-13 17:34:46 -07:00
Leonardo de Moura
4ee2f80d66
fix: improve binop% elaborator
2021-08-13 17:33:32 -07:00
Leonardo de Moura
4239ae69f6
chore: fix tests
2021-08-13 17:24:58 -07:00
Leonardo de Moura
4b58c4cc02
refactor: instances that "hide" coercions
...
Example:
```
instance [CoeHTCT α β] [Add β] : HAdd α β β where
hAdd a b := Add.add a b
```
2021-08-13 17:18:55 -07:00
Leonardo de Moura
452b717a97
chore: update stage0
2021-08-13 17:14:38 -07:00
Leonardo de Moura
ef46b0145b
chore: use binop% to define the notations >> and <|>
...
Motivation: we want to delete the instances
```
instance [CoeHTCT α β] [OrElse β] : HOrElse α β β where
hOrElse a b := OrElse.orElse a b
instance [CoeHTCT α β] [OrElse β] : HOrElse β α β where
hOrElse a b := OrElse.orElse a b
instance [CoeHTCT α β] [AndThen β] : HAndThen α β β where
hAndThen a b := AndThen.andThen a b
instance [CoeHTCT α β] [AndThen β] : HAndThen β α β where
hAndThen a b := AndThen.andThen a b
```
after we update stage0
2021-08-13 17:13:01 -07:00
Leonardo de Moura
b012050917
chore: remove some macros that use binop%
...
For example, given `i : Int` and `n : Nat`, we don't want to coerce `n`
into a `Int` in the term `i ^ n`.
2021-08-13 17:00:59 -07:00
Leonardo de Moura
3418eb7e1f
fix: check whether CoeHTCT has already been defined or not at hasCoe
2021-08-13 17:00:59 -07:00
Leonardo de Moura
be23709737
chore: use binop% to define ++ notation
2021-08-13 16:26:35 -07:00
Leonardo de Moura
d3d03df83c
feat: new elaborator for binop%
...
cc @gebner.
2021-08-13 15:44:59 -07:00
Leonardo de Moura
24fe2875c6
chore: change Pow class
...
Based on the suggestion at https://github.com/leanprover/lean4/issues/433
2021-08-12 13:59:55 -07:00
Sebastian Ullrich
d3f007b3cd
chore: fix stdlib benchmarks
2021-08-12 22:41:42 +02:00
Sebastian Ullrich
16026e9edd
perf: restore monad instance specialization hack
2021-08-12 21:09:09 +02:00
Leonardo de Moura
a6b6d61b39
chore: simplify mkProjStx?
2021-08-12 09:50:43 -07:00
Leonardo de Moura
da03262937
fix: check redundant sources at structure instance notation
2021-08-12 09:16:30 -07:00
Sebastian Ullrich
917eb4d081
chore: collect stdlib compilation flags in new header
2021-08-12 07:51:50 -07:00
Sebastian Ullrich
7e78de978d
doc: further bootstrapping complications
2021-08-12 07:51:50 -07:00
Sebastian Ullrich
9c15f94be3
perf: do not use parsers from the current stage inside quotations by default
2021-08-12 07:51:50 -07:00
Sebastian Ullrich
20accf5105
feat: revise macro parameter syntax
2021-08-12 07:48:42 -07:00
Sebastian Ullrich
6c220423ed
chore: adjust stx precedences
2021-08-12 07:48:42 -07:00
Leonardo de Moura
bf313a944c
chore: update stage0
2021-08-12 06:23:33 -07:00
Leonardo de Moura
28fe8e7da0
chore: update stage0
2021-08-12 06:21:29 -07:00
Leonardo de Moura
c68882ca67
feat: structure instance notation with multiple sources
...
closes #462
closes #463
2021-08-12 06:18:47 -07:00
Leonardo de Moura
a02a490a10
feat: add mkProjStx?
2021-08-12 05:41:00 -07:00
Leonardo de Moura
2dfde4637f
fix: index out of bounds
2021-08-12 05:39:19 -07:00
Leonardo de Moura
accf198a88
feat: add ExplicitSourceInfo
2021-08-12 04:29:19 -07:00
Leonardo de Moura
c591902547
refactor: add structure to Source.explicit
2021-08-12 04:10:47 -07:00
Leonardo de Moura
45e4dc26e1
refactor: simplify Source.explicit
2021-08-12 03:40:30 -07:00
Daniel Selsam
5952a857cd
feat: pp.analyze improve heuristics for fun binders
2021-08-12 09:37:57 +02:00
Daniel Selsam
638d0ca8ed
feat: pp.instances and pp.instanceTypes
2021-08-12 09:33:30 +02:00
Daniel Selsam
040141f137
feat: unexpander for Subtype
2021-08-12 09:32:33 +02:00
Leonardo de Moura
67103f54a9
chore: add TODOs for multiple sources
2021-08-11 19:28:49 -07:00
Leonardo de Moura
74bd537465
fix: generation of to* field names
2021-08-11 17:25:02 -07:00
Leonardo de Moura
d78101f00d
chore: remove mutual recursion workaround
...
It was a leftover hack for the old frontend.
2021-08-11 16:57:53 -07:00
Leonardo de Moura
4abbb3d74c
chore: cleanup
2021-08-11 16:05:07 -07:00
Leonardo de Moura
f1738ce2a0
feat: add macro for expanding field abbrev notation
...
The new macro allows us to use the field abbrev notation in patterns
too. See new test.
2021-08-11 16:02:50 -07:00
Leonardo de Moura
00ec22d303
chore: update stage0
2021-08-11 13:10:21 -07:00
Leonardo de Moura
09c2b668e6
feat: allow multiple sources in the structure instance parser
...
This commit also fixes some macros, and make sure the elaborator still
works, but it does not support multiple sources yet.
2021-08-11 13:07:56 -07:00
Daniel Selsam
efb3f528a6
fix: handle MData-wrapped app fns consistently in delaborator
...
Fixes #625
2021-08-11 18:53:32 +02:00
Leonardo de Moura
6352e549b5
test: add classes up to Field
2021-08-11 08:51:49 -07:00
Sebastian Ullrich
3b43ab47f1
fix: formatter: check for comment tokens
...
Fixes #624
2021-08-11 17:37:18 +02:00
Sebastian Ullrich
c591a68aab
chore: Nix: add back overrideCC that got lost on the way
2021-08-11 10:49:46 +02:00
Leonardo de Moura
d471f8df60
fix: fixes #621
2021-08-10 21:15:35 -07:00
Leonardo de Moura
39ce3044ec
feat: emit warning message when failed to copy default value
2021-08-10 20:56:20 -07:00
Leonardo de Moura
61b3e6bcb8
fix: reduce projections of expanded structures at copyDefaultValue?
2021-08-10 20:50:59 -07:00
Leonardo de Moura
63ad42ba47
refactor: move and generalize reduceProj?
2021-08-10 20:21:04 -07:00
Leonardo de Moura
0623bb3860
feat: update fieldMap with composite field
2021-08-10 20:04:41 -07:00
Leonardo de Moura
ae03f15c92
test: default value set at copied structure
2021-08-10 19:00:34 -07:00
Leonardo de Moura
3b1285bee8
feat: process overriden default values in copied parents
2021-08-10 18:55:12 -07:00
Leonardo de Moura
295cae8afd
feat: copy field default values
...
Only basic examples are working. We still have many TODOs
2021-08-10 16:53:10 -07:00
Leonardo de Moura
47b8fa15f1
fix: propagate visibility annotation
2021-08-10 15:34:07 -07:00
Leonardo de Moura
702a24913f
chore: update stage0
2021-08-10 15:07:16 -07:00
Leonardo de Moura
16ea00586d
fix: fixes #620
2021-08-10 15:06:06 -07:00
Leonardo de Moura
972f00b0ff
fix: pending metavariable issue
...
It fixes issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/let.20overload
2021-08-10 14:52:53 -07:00
Leonardo de Moura
7cec20582b
feat: add instance Alternative (MonadCacheT α β m)
2021-08-10 14:28:04 -07:00
Leonardo de Moura
f4433f3147
feat: add Alternative (StateRefT' ω σ m)
2021-08-10 14:27:05 -07:00
Leonardo de Moura
b226ae738c
test: add CommGroup diamond
2021-08-10 10:20:37 -07:00
Leonardo de Moura
9cd729265e
fix: missing instantiateMVars
2021-08-10 10:04:16 -07:00
Leonardo de Moura
9fe1cd1026
chore: modify default value for option structureDiamondWarning
...
We still have some TODO items, but structure diamond support is
already useful in practice.
2021-08-10 09:24:53 -07:00
Leonardo de Moura
d03fa17c49
test: copyNewFieldsFrom
2021-08-10 09:19:27 -07:00
Leonardo de Moura
50deae9b8b
feat: copy binderInfo and inferMod from original field
2021-08-10 09:12:58 -07:00
Leonardo de Moura
bc26a9b527
feat: improve copyNewFieldsFrom
2021-08-10 09:08:35 -07:00
Leonardo de Moura
af1cecc641
feat: better error message
2021-08-10 07:46:15 -07:00
Leonardo de Moura
9e5998baf0
feat: register instance/reducible attribute for structuer diamond coercions
2021-08-10 07:16:59 -07:00
Leonardo de Moura
0f184a8c93
fix: binder annotation for class diamond coercions
2021-08-10 06:59:28 -07:00
Leonardo de Moura
2b71e16551
test: structure diamond coercion
2021-08-10 06:31:44 -07:00
Sebastian Ullrich
0b3e548672
fix: syntax tree returned by syntax elaborator
2021-08-10 12:02:04 +02:00
Leonardo de Moura
4089fca103
chore: update stage0
2021-08-09 19:02:38 -07:00
Leonardo de Moura
bccad8edb1
feat: add coercion to parent structure whose fields having been copied
2021-08-09 19:01:08 -07:00
Leonardo de Moura
97664de3ee
fix: diamonds with dependent fields
2021-08-09 19:01:08 -07:00
Leonardo de Moura
e8403f89b0
fix: ensure field names are atomic
2021-08-09 19:01:08 -07:00
Leonardo de Moura
52710688f7
chore: update stage0
2021-08-09 19:01:08 -07:00
Leonardo de Moura
6f318ddde3
feat: save binderInfo and inferMod ad registerStructure
2021-08-09 19:01:08 -07:00
Leonardo de Moura
80cf5202b8
chore: update stage0
2021-08-09 19:01:08 -07:00
Leonardo de Moura
5ef72057e9
feat: save additional information at StructureFieldInfo
2021-08-09 19:01:08 -07:00
Leonardo de Moura
f67501a890
chore: cleanup
2021-08-09 19:01:08 -07:00
Leonardo de Moura
a0bd964255
test: overriding default value of private field
2021-08-09 19:01:08 -07:00
Leonardo de Moura
3f3e5d9dcb
fix: private field + default value bug
2021-08-09 19:01:08 -07:00
Leonardo de Moura
3896c44b55
chore: fix incorrect comment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com >
2021-08-09 19:01:08 -07:00
Leonardo de Moura
fdce7a99e1
feat: structure diamonds basic support
...
See TODO in the new comments.
2021-08-09 19:01:08 -07:00
Leonardo de Moura
56c2f595c7
feat: add getFieldType
2021-08-09 19:01:08 -07:00
Daniel Selsam
0118c47117
refactor: separate pp.funBinderTypes and pp.piBinderTypes
2021-08-09 16:13:40 +02:00
Sebastian Ullrich
4e7cb76281
chore: Nix: adjust local cache config
2021-08-09 12:16:17 +02:00
tydeu
4f75dd99d1
reefactor: improve async API
2021-08-09 05:04:38 -04:00
Sebastian Ullrich
119f685cda
doc: fix link
2021-08-08 18:39:28 +02:00
Sebastian Ullrich
40274e487f
chore: fix docs
2021-08-08 13:26:46 +02:00
Sebastian Ullrich
341b4ac652
doc: link to some macro documentation
2021-08-08 12:41:59 +02:00
François G. Dorais
358a129d78
fix: protect rfl
2021-08-07 13:25:54 -07:00
Leonardo de Moura
ba6fcd7b74
chore: update stage0
2021-08-07 13:23:41 -07:00
Leonardo de Moura
1d9d8c7e75
chore: fix tests
...
close #402
2021-08-07 13:22:58 -07:00
Leonardo de Moura
9cc94296e5
chore: remove staging workaround theorems
2021-08-07 12:52:31 -07:00
Leonardo de Moura
f1272f70cb
chore: update stage0
2021-08-07 12:50:18 -07:00
Leonardo de Moura
a821dcbff2
chore: enforce naming convention for theorems
...
see issue #402
fix: `ElabTerm.lean`
2021-08-07 12:48:38 -07:00
Leonardo de Moura
a0c2142233
chore: update stage0
2021-08-07 07:30:41 -07:00
Leonardo de Moura
a863f1b8a3
fix: fixes #616
2021-08-07 07:29:54 -07:00
Leonardo de Moura
8a84532760
feat: add PEmpty
...
closes #537
2021-08-06 19:18:22 -07:00
Leonardo de Moura
6e2b7189e8
fix: fixes #242
2021-08-06 18:39:55 -07:00
Leonardo de Moura
d482212a1c
feat: add Meta.abstract
...
closes #474
2021-08-06 18:19:06 -07:00
Leonardo de Moura
9dc2a4240d
test: add test for getModuleDoc?
2021-08-06 14:14:22 -07:00
Leonardo de Moura
f2bbe222d7
chore: update stage0
2021-08-06 14:08:01 -07:00
Leonardo de Moura
8acbb55632
chore: fix tests
2021-08-06 14:05:00 -07:00
Leonardo de Moura
3293e9ef08
chore: fix module comments, they must occur after the imports
2021-08-06 14:02:42 -07:00
Leonardo de Moura
accdededc0
test: module docs
2021-08-06 13:54:56 -07:00
Leonardo de Moura
5796b93134
fix: support for /-! at whitespace
2021-08-06 13:52:32 -07:00
Leonardo de Moura
dca9278e09
feat: add elabModuleDoc
2021-08-06 13:45:36 -07:00
Leonardo de Moura
1fc1c4fe8b
chore: update stage0
2021-08-06 13:41:27 -07:00
Leonardo de Moura
3d485bf375
feat: add moduleDocExt
2021-08-06 13:40:54 -07:00
Leonardo de Moura
8d5964ce19
feat: add module doc parser
2021-08-06 13:17:56 -07:00
Leonardo de Moura
634f5015fc
chore: update stage0
2021-08-06 13:11:27 -07:00
Leonardo de Moura
75872189cc
chore: fix test
2021-08-06 13:10:58 -07:00
Leonardo de Moura
1be41f2adb
chore: fix stdlib
2021-08-06 12:58:58 -07:00
Leonardo de Moura
818466785a
chore: update stage0
2021-08-06 12:53:26 -07:00
Leonardo de Moura
76cc99179d
fix: fixes #370
2021-08-06 12:52:23 -07:00
Leonardo de Moura
a230fe2d06
fix: forallMetaTelescope issue
...
This commit incorporates the fix at PR #612 , and clean up
`Meta/Basic.lean` using Lean 4 features.
2021-08-06 09:47:10 -07:00
Sebastian Ullrich
803b73e32d
chore: update stage0
2021-08-06 09:46:46 -07:00
Sebastian Ullrich
01985f4b4c
fix: actually interpret imported anonymous [init] decls
...
Fixes #588
2021-08-06 09:46:46 -07:00
Daniel Selsam
c6e1e356ab
perf: trace messages should disable pp.analyze
2021-08-06 18:30:40 +02:00
Sebastian Ullrich
090786f07c
chore: Nix: fix doc sources
2021-08-06 17:12:27 +02:00
Daniel Selsam
34a27f2d56
fix: pp.analyze strict implicits
2021-08-06 17:02:00 +02:00
Sebastian Ullrich
bae31853b8
chore: Nix: do not install Cachix if not authenticated
2021-08-06 16:58:44 +02:00
Sebastian Ullrich
557af62008
chore: Nix: do not include temci by default
2021-08-06 16:58:44 +02:00
Sebastian Ullrich
2cf780f95d
chore: Nix: cache store
2021-08-06 16:58:44 +02:00
Sebastian Ullrich
e79d52d2ce
chore: Nix: reduce doc/doc-test sources
2021-08-06 16:58:44 +02:00
Daniel Selsam
14177fbaf6
feat: misc pp.analyze improvements
2021-08-06 16:51:14 +02:00
Sebastian Ullrich
81400109f3
chore: Nix: go back to LLVM 11 on macOS
2021-08-06 09:38:14 +02: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
Leonardo de Moura
84b155cfc0
chore: add docstring
2021-08-05 18:12:14 -07:00
Leonardo de Moura
56320cb84f
chore: naming convention and cleanup
2021-08-05 16:23:21 -07:00
Leonardo de Moura
bcfc927799
fix: fixes #602
2021-08-05 16:14:04 -07:00
Leonardo de Moura
789c7073dc
fix: avoid eager TC synthesis at isDefEq
2021-08-05 12:09:22 -07:00
Leonardo de Moura
ddbd10f610
chore: update stage0
2021-08-05 07:02:24 -07:00
Leonardo de Moura
5f019a9770
chore: update stage0
2021-08-05 07:00:37 -07:00
Leonardo de Moura
4dbb3e6db1
fix: add workaround to prevent code explosion at deriving for FromJson
...
fixes #569
2021-08-05 06:58:07 -07:00
Sebastian Ullrich
d52908d3b7
chore: LLVM: 10 -> 12
2021-08-05 15:50:03 +02:00
Sebastian Ullrich
c78bbc6c9c
chore: Nix: update inputs
2021-08-05 15:50:03 +02:00
Sebastian Ullrich
9ef2345aec
perf: enforce hash map load factor
2021-08-05 06:28:24 -07:00
Wojciech Nawrocki
1b44768697
chore: fix test
2021-08-05 06:27:57 -07:00
Wojciech Nawrocki
3bbf19a404
feat: FromToJson for nested inductives
2021-08-05 06:27:57 -07:00
Sebastian Ullrich
07d1735ea2
feat: borrow inference: preserve mutual tail calls
...
Fixes #603
2021-08-05 06:26:06 -07:00
Daniel Selsam
4cdfbde93b
fix: pp.analyze also bottom-up the trivials
2021-08-05 08:51:05 +02:00
Daniel Selsam
1a815a4339
perf: pp.analyze add quick check
2021-08-05 08:51:05 +02:00
Daniel Selsam
b86e9a3a27
fix: pp.analyze bottom-up only checks unknown types
2021-08-05 08:51:05 +02:00
tydeu
859b04bf7f
refactor: generalize Target/ActiveTarget beyond IO
2021-08-05 00:45:50 -04:00
Leonardo de Moura
7807f09dd5
chore: update stage0
2021-08-04 20:18:17 -07:00
Leonardo de Moura
1f0e0a7452
doc: document alternative design option
2021-08-04 20:16:58 -07:00
Leonardo de Moura
72e7bf4999
fix: synthPending bug
2021-08-04 20:07:06 -07:00
Leonardo de Moura
aff28f51cd
fix: fixes #604
2021-08-04 17:19:17 -07:00
Leonardo de Moura
0869bbe558
fix: missig registerMVarErrorImplicitArgInfo for postponed instance mvars
2021-08-04 16:58:00 -07:00
Leonardo de Moura
91b60cbb22
chore: indentation
2021-08-04 16:50:57 -07:00
Leonardo de Moura
61cdf93750
fix: missing registerMVarErrorImplicitArgInfo
2021-08-04 16:09:18 -07:00
tydeu
aa1ca9c4b7
feat: improve Target API
2021-08-04 14:07:28 -04:00
Sebastian Ullrich
f5c51ce48c
chore: update stage0
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
4b87e69ff5
fix: deletion on Windows for real
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
7e2cf59aaf
chore: deleting open .olean files on Windows
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
3c91c9e874
feat: try memory-mapping .olean files on Windows
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
0aaab9e024
chore: remove file_lock.h
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
e4ef665c54
feat: atomically (re-)create .olean files
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
2e8075b015
chore: raise default profiler.threshold to 100ms
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
88492e38a7
chore: CI: run lean --stats src/Lean.lean
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
fbdcaab009
feat: show number of mmap-ed modules in --stats
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
5a71a5b18a
chore: lean.mk: create .olean atomically
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
05abdf7848
perf: move root address of compacted region to the front
...
for true zero-cost loading
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
4766ee0b5e
feat: try to mmap() .olean files on Linux & macOS
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
a00674fcba
feat: compute .olean base address from module name
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
4d8da44f50
feat: allow specifying virtual base address for compacted region
2021-08-04 16:40:57 +02:00
Sebastian Ullrich
c77548c95c
fix: accidental truncation of name::hash
2021-08-04 16:40:57 +02:00
tydeu
a541f2054e
refactor: IO BuildTarget task / protect pure
2021-08-04 01:31:47 -04:00
Leonardo de Moura
2b2311eaa2
chore: update stage0
2021-08-03 19:53:38 -07:00
Leonardo de Moura
4ca7345956
refactor: remove old workaround
2021-08-03 19:50:16 -07:00
Leonardo de Moura
4cd7e359df
feat: elaborate strict implicit binders
2021-08-03 19:40:44 -07:00
Leonardo de Moura
9988264345
chore: update stage0
2021-08-03 19:13:25 -07:00
Leonardo de Moura
257e38394f
feat: add strict implicit binder annotation
2021-08-03 19:10:51 -07:00
Leonardo de Moura
64f65d28e7
chore: update stage0
2021-08-03 18:44:25 -07:00
Leonardo de Moura
d1d7ce1839
feat: start support for strict implicit binder annotation
2021-08-03 18:42:15 -07:00
Leonardo de Moura
c913886938
chore: add private annotations
2021-08-03 18:15:39 -07:00
Leonardo de Moura
698ebe0ba8
chore: update stage0
2021-08-03 17:58:19 -07:00
Leonardo de Moura
68cd66a2b6
feat: elaborate visibility modifier at initialization commands
2021-08-03 17:56:52 -07:00
Leonardo de Moura
20e07501c4
chore: update stage0
2021-08-03 14:39:34 -07:00
Leonardo de Moura
f9672fe4c6
feat: add optional visibitily modifier to initialize and builtin_initialize commands
2021-08-03 14:37:22 -07:00
Leonardo de Moura
01d902f905
feat: add register_option command
...
User-defined options.
2021-08-03 14:31:04 -07:00
Leonardo de Moura
526cbfbcd0
refactor: add ImportingFlag.lean
2021-08-03 14:29:36 -07:00
Leonardo de Moura
65aafc070c
chore: remove mkInternalSubobjectFieldName hack
2021-08-03 12:05:10 -07:00
Leonardo de Moura
6e1620ca8d
refactor: replace IO.Ref with the extern/export hack at MetaM
2021-08-03 11:50:57 -07:00
Sebastian Ullrich
e1703bf1ae
fix: main return value on 32-bit
...
Resolves #594
2021-08-03 11:00:10 -07:00
Sebastian Ullrich
1dfacb5f84
fix: parenthesizer: respect lhsPrec
...
Fixes #595
2021-08-03 15:22:08 +02:00
Daniel Selsam
b8b48b0f72
refactor: move FindLevelMVar to Lean/Util
2021-08-03 09:13:18 +02:00
Daniel Selsam
0036111db9
feat: pp.analyze original mvars are not unknown
2021-08-03 09:13:18 +02:00
Daniel Selsam
5a5ed67698
refactor: pp.analyze track postponed constraints
2021-08-03 09:13:18 +02:00
Daniel Selsam
c0c9d72cc3
refactor: pp.analyze put helper in 'where'
2021-08-03 09:13:18 +02:00
Daniel Selsam
d56db0a22d
doc: pp.analyze one more comment about a failure
2021-08-03 09:13:18 +02:00
Daniel Selsam
2afc18323d
doc: pp.analyze a few comments about failures
2021-08-03 09:13:18 +02:00
Daniel Selsam
f1002cf759
feat: delab more thorough 'getParamKinds'
2021-08-03 09:13:18 +02:00
Daniel Selsam
652681621a
fix: pp.analyze don't type-annotate mdatas
2021-08-03 09:13:18 +02:00
Daniel Selsam
d6253e091b
fix: pp.analyze _s when forced explicit
2021-08-03 09:13:18 +02:00
Daniel Selsam
ea6fca24c2
refactor: pp.analyze StateT for analyzeApp
2021-08-03 09:13:18 +02:00
Daniel Selsam
be02133ca7
feat: pp.analyze default transparency
2021-08-03 09:13:18 +02:00
Daniel Selsam
aefd31b2a2
feat: better bottom-up/structure-type heuristics
2021-08-03 09:13:18 +02:00
Daniel Selsam
ed67bd56e0
fix: only unexpand when pp.notation=true
2021-08-03 09:13:18 +02:00
Daniel Selsam
4c41142a61
chore: pp.analyze new test cases
2021-08-03 09:13:18 +02:00
Daniel Selsam
b6be5435cd
fix: pp.all should enable binderTypes
2021-08-03 09:13:18 +02:00
Daniel Selsam
c89dff56c4
fix: pp.analyze missing structure instance types
2021-08-03 09:13:18 +02:00
Daniel Selsam
e55a5770f3
refactor: nested for-loop
2021-08-03 09:13:18 +02:00
Daniel Selsam
8dd8aea9c1
chore: new tests
2021-08-03 09:13:18 +02:00
Daniel Selsam
44f1f4e410
refactor: pp.analyze needs pp options
2021-08-03 09:13:18 +02:00
Daniel Selsam
48d5c0d2a6
chore: pp.proofs defaults to false
2021-08-03 09:13:18 +02:00
Daniel Selsam
00a33e2662
fix: bug in ppExpr test
2021-08-03 09:13:18 +02:00
Daniel Selsam
e6b90dde8f
fix: pp.analyze mvars can bottom-up
2021-08-03 09:13:18 +02:00
Daniel Selsam
3fa992c684
feat: new pp.analyze.knowsType option
2021-08-03 09:13:18 +02:00
Daniel Selsam
7576b1dad1
chore: fix test hardcoding position offset
2021-08-03 09:13:18 +02:00
Daniel Selsam
a84291641b
fix: pp.analyze restriction on _
2021-08-03 09:13:18 +02:00
Daniel Selsam
702211db2a
feat: pp.analyze detect when struct-inst type needed
2021-08-03 09:13:18 +02:00
Daniel Selsam
e0897ae78c
chore: test unexpanders inside namespaces
2021-08-03 09:13:18 +02:00
Daniel Selsam
db4d33487a
fix: unexpanders can't specify exact names
2021-08-03 09:13:18 +02:00
Daniel Selsam
5acdf48366
chore: fix tests
2021-08-03 09:13:18 +02:00
Daniel Selsam
1f183cdc30
fix: only pp.analyze when all is not set
2021-08-03 09:13:18 +02:00
Daniel Selsam
126db5fb12
fix: pp.analyze confirm def-eq before omitting arg
2021-08-03 09:13:18 +02:00
Daniel Selsam
3bef119136
fix: pp.analyze missing inBottomUp
2021-08-03 09:13:18 +02:00
Daniel Selsam
5fd68821c1
feat: flag for omitted 'bad' max annotations
2021-08-03 09:13:18 +02:00
Daniel Selsam
9838625f19
doc: comment out blockImplicitLambda check
2021-08-03 09:13:18 +02:00
Daniel Selsam
c3d62c1076
chore: patch tests for pp.analyze default
2021-08-03 09:13:18 +02:00
Daniel Selsam
d28419594e
fix: pp.analyze do not panic on bvar
2021-08-03 09:13:18 +02:00
Daniel Selsam
4b57bc26b3
chore: rm stale test
2021-08-03 09:13:18 +02:00
Daniel Selsam
cded8be388
feat: more HBinOps in pp.analyze
2021-08-03 09:13:18 +02:00
Daniel Selsam
54146f1859
fix: 4-ary SubExpr repr for types
2021-08-03 09:13:18 +02:00
Daniel Selsam
ce64629d63
chore: two comments about bad pp.analyze behavior
2021-08-03 09:13:18 +02:00
Daniel Selsam
9744b51c1b
fix: unexpand pairs
2021-08-03 09:13:18 +02:00
Daniel Selsam
3309da8f1e
fix: pp.analyze LocalInstances not in MessageData
2021-08-03 09:13:18 +02:00
Daniel Selsam
45a880ac05
feat: pp.analyze treat original uvars as params
2021-08-03 09:13:18 +02:00
Daniel Selsam
ca73f60894
feat: pp.analyze flag to trust ofScientific
2021-08-03 09:13:18 +02:00
Daniel Selsam
ff4551d217
fix: pp.analyze bottom up with fvar app-fns
2021-08-03 09:13:18 +02:00
Daniel Selsam
3b3e54143c
feat: pp.analyze isSubstLike support Eq.rec
2021-08-03 09:13:18 +02:00
Daniel Selsam
7030eaad3d
feat: one more pp.analyze pass
2021-08-03 09:13:18 +02:00
Daniel Selsam
d6412b3a98
fix: pp.analyze was still printing inaccessibles
2021-08-03 09:13:18 +02:00
Daniel Selsam
912e5cf212
fix: avoid pp.analyze trace/exception loop
2021-08-03 09:13:18 +02:00
Daniel Selsam
aa590ccdf5
feat: pp option to instantiate mvars
2021-08-03 09:13:18 +02:00
Daniel Selsam
b3bb82ee7e
feat: turn more delaborators into unexpanders
2021-08-03 09:13:18 +02:00
Daniel Selsam
0b19f8e5a5
fix: do not double @@
2021-08-03 09:13:18 +02:00
Daniel Selsam
2f9963f092
fix: literals are bottom-up safe
2021-08-03 09:13:18 +02:00
Daniel Selsam
a96a043618
feat: better coe support
2021-08-03 09:13:18 +02:00
Daniel Selsam
ca3be9876e
feat: flag to trust coercions
2021-08-03 09:13:18 +02:00
Daniel Selsam
50d67e77ac
fix: type ascriptions
2021-08-03 09:13:18 +02:00
Daniel Selsam
9158899145
feat: pp.analize try/catch and trace
2021-08-03 09:13:18 +02:00
Daniel Selsam
eed0fb6635
feat: special support for 'fun x => x'
2021-08-03 09:13:18 +02:00
Daniel Selsam
811bb56d10
fix: never set a negation
2021-08-03 09:13:18 +02:00
Daniel Selsam
548bf4d9f4
chore: rm stale todo
2021-08-03 09:13:18 +02:00
Daniel Selsam
4a35cef2c2
chore: rm stale instance
2021-08-03 09:13:18 +02:00
Daniel Selsam
e84a5ac432
fix: @ when there are inaccessible names
2021-08-03 09:13:18 +02:00
Daniel Selsam
280a3db653
fix: only print named patterns inside patterns
2021-08-03 09:13:18 +02:00
Daniel Selsam
d2ff2de4f6
feat: add @ to consts/locals with pi {..} type
2021-08-03 09:13:18 +02:00
Daniel Selsam
1c6cdceb64
refactor: simplify pp.analyze options
2021-08-03 09:13:18 +02:00
Daniel Selsam
6940166db4
chore: rebase and rm rawPos
2021-08-03 09:13:18 +02:00
Daniel Selsam
89364b802b
feat: top-down heuristic delaboration
2021-08-03 09:13:18 +02:00
Leonardo de Moura
ea37a29e4c
chore: remove TODO
2021-08-02 20:25:29 -07:00
Leonardo de Moura
50ae3d8e61
chore: update stage0
2021-08-02 20:23:56 -07:00
Leonardo de Moura
d864afae91
feat: private fields
...
closes #418
2021-08-02 20:20:21 -07:00
Leonardo de Moura
cfa086a471
chore: update stage0
2021-08-02 19:03:04 -07:00
Leonardo de Moura
90047e73e8
feat: cache structure parent names
2021-08-02 18:58:00 -07:00
Leonardo de Moura
694bed5b0b
chore: update stage0
2021-08-02 18:55:41 -07:00
Leonardo de Moura
cfb7e27b87
fix: isStructure vs isStructureLike
2021-08-02 18:54:19 -07:00
Leonardo de Moura
635bc78d72
feat: use structure extension to implement Structure.lean
2021-08-02 18:03:20 -07:00
Leonardo de Moura
bdc6bc6fcc
chore: update stage0
2021-08-02 16:19:13 -07:00
Leonardo de Moura
1ca62e21fd
feat: add environment extension for storing structure field information
2021-08-02 16:17:35 -07:00
Leonardo de Moura
bba9353619
fix: make sure isDefEqOffset does not expose kernel nat literals
...
This issue is similar to a bug where `isDefEqOffset` was exposing
`Nat.add` when processing `HAdd.hAdd`.
Fixes #561
The example at issue #561 is now working, but we may have other places
where raw literals are being accidentally exposed.
2021-08-02 11:27:00 -07:00
Leonardo de Moura
9e4582a7d0
fix: fixes #593
2021-08-02 10:46:12 -07:00
Leonardo de Moura
89e333ab52
chore: move import Lean.Elab.Open
2021-08-02 10:13:35 -07:00
Sebastian Ullrich
0db80c6ea8
chore: Nix: link with gold instead of lld
...
https://twitter.com/derKha/status/1419645259894640645
2021-08-02 13:42:11 +02: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
Leonardo de Moura
45b599ef69
chore: update stage0
2021-08-01 11:46:40 -07:00
Leonardo de Moura
6e9afe1b3d
feat: refine tryResolveCore
...
We need this refinement to be able to process the following example.
```
import Mathlib.RingTheory.Nullstellensatz
import Mathlib.PostPort.Coe
namespace MvPolynomial.Fun
open Ideal
variable {k : Type u} [instField : Field k]
variable {σ : Type v}
variable [instIAC : IsAlgClosed k] [instF : Fintype σ]
(@Ideal.{max v u}
(@MvPolynomial.{v, u} σ k
(@CommRingS.toCommSemiring.{u} k
(@EuclideanDomain.toCommRing.{u} k (@Field.toEuclideanDomain.{u} k instField))))
(@RingS.toSemiring.{max v u}
(@MvPolynomial.{v, u} σ k
(@CommRingS.toCommSemiring.{u} k
(@EuclideanDomain.toCommRing.{u} k (@Field.toEuclideanDomain.{u} k instField))))
(@Domain.toRing.{max v u}
(@MvPolynomial.{v, u} σ k
(@CommRingS.toCommSemiring.{u} k
(@EuclideanDomain.toCommRing.{u} k (@Field.toEuclideanDomain.{u} k instField))))
(@IntegralDomain.toDomain.{max v u}
(@MvPolynomial.{v, u} σ k
(@CommRingS.toCommSemiring.{u} k
(@EuclideanDomain.toCommRing.{u} k (@Field.toEuclideanDomain.{u} k instField))))
(@MvPolynomial.integralDomain.{u, v} k σ (@Field.toIntegralDomain.{u} k instField))))))
```
This example was extracted from a failure at
```
theorem vanishing_ideal_zero_locus_eq_radical (I : Ideal (MvPolynomial σ k)) : vanishingIdeal (ZeroLocus I) = I.radical
```
2021-08-01 11:42:39 -07: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
Leonardo de Moura
27fd35148c
refactor: dependent instances annotations
2021-08-01 10:58:22 -07:00
Wojciech Nawrocki
f1b4d9a193
chore: restore non-generic Format
...
Motivation: it is unclear whether this is the best solution for embedding objects in pretty-printer outputs.
2021-08-01 09:58:44 +02:00
Wojciech Nawrocki
b022a7c1d2
style: indent
2021-08-01 09:58:44 +02:00
Wojciech Nawrocki
5f021baa95
style: statement ordering
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch >
2021-08-01 09:58:44 +02:00
Wojciech Nawrocki
0b6d51d60b
feat: tag pretty-printer outputs
2021-08-01 09:58:44 +02:00
Wojciech Nawrocki
9b8e44618d
chore: default to Format Nat
2021-08-01 09:58:44 +02:00
Wojciech Nawrocki
a937fa26ba
chore: fewer explicit types
2021-08-01 09:58:44 +02:00
Wojciech Nawrocki
f51b80060d
feat: generic tagged Format
2021-08-01 09:58:44 +02:00
Wojciech Nawrocki
d2e23ff5cf
fix: deriving RpcEncoding
2021-08-01 09:58:44 +02:00
Wojciech Nawrocki
1d57ffb4d7
refactor: shuffle classes to avoid dependency loops
2021-08-01 09:58:44 +02:00
Wojciech Nawrocki
1311f87a8b
feat: eagerly initialize RPC session
...
With this we are able to send RpcRefs immediately, in particular in (interactive) diagnostics.
2021-08-01 09:58:44 +02:00
Wojciech Nawrocki
d3ca1e98e9
refactor: make lsp/release a notification
2021-08-01 09:58:44 +02:00
Wojciech Nawrocki
55ffb73bbe
refactor: rename rpc/initialize to rpc/connect
2021-08-01 09:58:44 +02:00
tydeu
293c19d24f
feat: include Lean version in Lake usage header
2021-07-31 19:29:26 -04:00
Leonardo de Moura
af5ff9ceb2
refactor: move List.takeWhile to Init.Data.List.Basic
...
Motivation: make sure it will be aligned by BinPort
2021-07-31 15:03:33 -07:00
Leonardo de Moura
59dff3f3e0
chore: update stage0
2021-07-31 14:30:43 -07:00
Leonardo de Moura
3f72555437
feat: use staged sets at namespacesExt
...
Mathlib has more than 120k namespaces
2021-07-31 14:27:24 -07:00
Leonardo de Moura
6cc30a3f90
feat: add NameSSet
...
Staged set of names
2021-07-31 14:24:00 -07:00
Leonardo de Moura
2abafd9df4
feat: add "staged set" helper type
2021-07-31 14:23:29 -07:00
Leonardo de Moura
bd60e59f9a
feat: add HashMap.insert'
...
The new function returns a flag indicating whether the new entry
replaced an existing or not.
We use it to implement `importModules`.
2021-07-31 13:42:01 -07:00
Sebastian Ullrich
32bea73708
fix: ensure hygiene of double-quoted names
...
Fixes #586
2021-07-30 07:17:50 -07:00
Sebastian Ullrich
2833c61a60
fix: respect preresolved names at resolveConst*
...
This makes sure we can properly quote e.g. `deriving` clauses and avoids
a suspicious `eraseMacroScopes` call (though not at `Elab.Syntax`, since
categories do not have to be declaration names)
2021-07-30 07:17:50 -07:00
Leonardo de Moura
c0f811a725
chore: update stage0
2021-07-29 17:01:08 -07:00
Leonardo de Moura
c6308a0f1f
feat: add support for kernel projections to DiscrTree
2021-07-29 16:59:47 -07:00
Leonardo de Moura
2c037c3989
chore: fix proofs
2021-07-29 16:59:47 -07:00
Leonardo de Moura
c054fa9a60
chore: update stage0
2021-07-29 16:33:13 -07:00
Leonardo de Moura
b25bb78e2a
feat: improve DiscrTree
...
Try to improve the performance issue described at #587 .
The issue is that Mathlib contains thousands of theorems where the
associated key for the discrimination tree is just
`Key.other`. The indexing is not effective for them. This happens because
1- Lambda expressions are indexed using `Key.other`. The
discrimination tree mainly focus on the first-order structure.
2- It unfolds reducible constants when inserting and retrieving
entries. The motivation is that users expect simp theorems to fire
modulo reducible constants.
Then, we have many theorems such as
```lean
map ?g ∘ map ?f = map (?g ∘ ?f)
```
when we expand the function composition on the left-hand side, we get
```lean
fun (x : List ?α) => map ?g (map ?f x)
```
Which is indexed as `Key.other`.
We should not avoid the `Array`s in the discrimination tree nodes
If the index is working effectively, these arrays are all very small.
In this commit, we try to address the problem by using a different
approach. When processing the root of a pattern, we interrupt
reduction as soon as the we hit something that would be indexed
as `Key.other`. Note that, in Lean 3, the root of a pattern also
receives special treatment.
2021-07-29 16:08:26 -07:00
Leonardo de Moura
096b0c2cec
chore: update stage0
2021-07-29 15:29:12 -07:00
Leonardo de Moura
c08ce69a51
refactor: break DiscrTree -> WHNF dependency
...
Motivation: we want to use `whnfCore` at `DiscrTree.lean`
2021-07-29 15:26:35 -07:00
Leonardo de Moura
ad216db08d
chore: add Repr instance for Literal and Key
2021-07-29 09:34:55 -07:00
Leonardo de Moura
f10c27dfb7
perf: add workaround for perf issue
...
See issue #361
2021-07-29 08:29:09 -07:00
Leonardo de Moura
16d803c0b3
chore: update comment
2021-07-28 17:18:41 -07:00
Leonardo de Moura
49a87ceb4d
feat: add basic isDefEq cache
2021-07-28 16:29:44 -07: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
Leonardo de Moura
51e03837f5
fix: exact and refine succeed if they produce no new metavariables
...
closes #492
2021-07-27 18:30:14 -07:00
Leonardo de Moura
a09883a0eb
feat: add mechanism for tracking metavariables "age"
2021-07-27 18:11:56 -07:00
Leonardo de Moura
6d05daf73b
feat: add flag for allowing synthetic opaque mvars to be assigned at isDefEq
...
See issue #492
TODO: add a mechanism for detecting new metavariables.
2021-07-27 17:58:08 -07:00
Leonardo de Moura
8c12a264ee
fix: offset support at isDefEq should not use HAdd.hAdd
...
fixes #550
2021-07-27 16:16:03 -07:00
Leonardo de Moura
3f22d5f624
feat: take auto params into account in the structure instance notation
...
closes #461
2021-07-27 15:49:23 -07:00
Leonardo de Moura
56e247763f
fix: scope of the auto param at fields
2021-07-27 15:22:51 -07:00
Leonardo de Moura
0ccd110eb4
feat: elaborate Term.binderTactic at structure declarations
2021-07-27 14:49:23 -07:00
Leonardo de Moura
3b5e762882
chore: add temporary workaround
2021-07-27 14:23:05 -07:00
Leonardo de Moura
67f4d5bd57
chore: update stage0
2021-07-27 14:19:53 -07:00
Leonardo de Moura
fb3ea8109f
fix: structure instance parser
2021-07-27 12:54:17 -07:00
Leonardo de Moura
1a62826107
chore: cleanup
2021-07-27 12:41:26 -07:00
Leonardo de Moura
714cadfb31
fix: bug at structure instance notation
...
It was exposed by the second example at #461 .
2021-07-27 11:56:33 -07:00
Sebastian Ullrich
e25edf893c
fix: mark MPZ objects in compacted regions as persistent
2021-07-27 16:35:42 +02:00
Leonardo de Moura
b986bde639
fix: IO.Error.alreadyExists may have an optional file name
...
We got an assertion violation yesterday at `leanpkg` at
```cpp
case EEXIST: case EINPROGRESS: case EISCONN:
lean_assert(fname == nullptr); // <<<<<<< HERE
return lean_mk_io_error_already_exists(errnum, details);
```
2021-07-27 07:00:06 -07:00
tydeu
4ae14ac849
refactor: rename 'ext' example to 'ffi'
2021-07-27 07:24:45 -04:00
Leonardo de Moura
8973982926
chore: update stage0
2021-07-26 18:25:11 -07:00
Leonardo de Moura
a77598f7cf
feat: user-defined attributes
...
See new test for an example.
closes #513
2021-07-26 18:24:10 -07:00
Leonardo de Moura
0bea52d1b5
chore: update stage0
2021-07-26 16:19:59 -07:00
Leonardo de Moura
cdd1dbbb36
feat: user-defined environment extensions
...
New test demonstrates how to use them.
The user-defined extensions cannot be used in the same file where they
were declared because the `initialize` commands are only executed when
we import the modules containing them.
TODO: user-defined attributes.
2021-07-26 16:18:48 -07:00
Leonardo de Moura
42561bb93f
perf: change is_def_eq_proof_irrel type to lbool
2021-07-26 07:11:55 -07:00
Leonardo de Moura
8a98987e26
chore: use isDefEq heuristic on regular definitions only
2021-07-26 07:11:55 -07:00
Sebastian Ullrich
694037f29d
chore: update stage0
2021-07-26 07:11:05 -07:00
Sebastian Ullrich
450293e64a
feat: zero-copy GMP deserialization
2021-07-26 07:11:05 -07: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
Sebastian Ullrich
60e6130ece
chore: Nix: expose benchmarks as flake attributes for convenience
2021-07-24 16:36:05 +02: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
Wojciech Nawrocki
43190e0e63
feat: FromToJson for recursive inductives
2021-07-24 10:47:38 +02:00
Wojciech Nawrocki
4073b20b7d
chore: add bcrypt in CMakeLists
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
f7f0064f90
chore: update stage0
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
d6893a3e1f
fix: more robust LspEncoding
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
75feb9c244
chore: fix type and add copyright
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
2f828ee5c6
chore: update stage0
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
54f2769e13
fix: test
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
f27a069773
chore: drop UntypedRef and use monotonic RpcRefs
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
66258b012b
chore: fix windows build
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
102236fdd9
chore: leftover comment
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
ffc6efd5d0
fix: use properly random RPC session id
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
776a0c71aa
feat: add UInt64 unpackings
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
b3d9e90695
feat: IO.getRandomBytes
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
9a5cdaf506
chore: address review 1
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
ef34cfd513
chore: more extensive LspEncoding test
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
cfb5d34dd3
fix: parser arity
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
9664fc88e0
chore: add test
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
3accff6f48
feat: deriving LspEncoding handler
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
f077dd05d3
feat: RPC ref decrement
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
85dcdcde93
chore: use NonScalar
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
80d90038ad
feat: add Format tags
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
1b42255493
feat: check RPC reference types
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
4a93c9ac1c
chore: purify WorkerM
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
d97e1b91ea
chore: drop RPC wrappers for now
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
b3316fd9c2
feat: RPC handlers
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
f891279957
chore: drop one namespace
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
4d83e79121
feat: more RPC handlers
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
3ec568c110
feat: initial RPC
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
2e6382e1c7
feat: untyped references
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
079c290ce0
feat: JSON serde for Name and USize
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
d716bf0d96
fix: preserve lifted CoreM traces
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
4a3c172ac9
feat: parametrised deriving handlers
2021-07-24 10:45:28 +02:00
Leonardo de Moura
1b128848b2
chore: fix test
2021-07-23 16:04:23 -07:00
Leonardo de Moura
3d402eda3f
chore: missing !
2021-07-23 16:04:02 -07:00
Leonardo de Moura
57b4b8ad1b
chore: disable the kernel "tryHeuristic" for abbreviations
2021-07-23 12:10:16 -07:00
Leonardo de Moura
cce6165d4e
perf: refine tryHeuristic
2021-07-23 12:04:11 -07:00
Leonardo de Moura
0d9c5f5bb8
chore: use zeta expansion at AbstractNestedProofs module
2021-07-23 11:48:59 -07:00
Leonardo de Moura
1630cd3eb5
chore: missing argument
2021-07-23 11:37:28 -07:00
Sebastian Ullrich
1eee82f745
fix: Windows build
2021-07-22 19:50:42 +02:00
Sebastian Ullrich
9ff8e3e7d9
chore: remove obsolete C++ tests
2021-07-22 19:16:04 +02:00
Sebastian Ullrich
2b451a3fed
chore: remove obsolete serializer code
2021-07-22 18:59:39 +02:00
Sebastian Ullrich
5b1cfc25d8
chore: remove obsolete header
2021-07-22 18:26:58 +02:00
Sebastian Ullrich
dc3d94ff61
fix: check arity in notation unexpander
...
Fixes #469
2021-07-22 16:59:19 +02:00
Sebastian Ullrich
98634b5554
fix: $(_):ident is not an infallible pattern
2021-07-22 16:52:06 +02:00
Sebastian Ullrich
5866e2bbb7
chore: use register_parser_alias where possible
...
Fixes #494
2021-07-22 16:28:06 +02:00
Sebastian Ullrich
42e681a5a6
fix: make unterminated comments consume all input
...
Fixes #549
2021-07-22 15:55:12 +02:00
Leonardo de Moura
a6af257b7a
fix: missing condition
2021-07-21 07:36:35 -07:00
Formally Verified Waffle Maker
c5ffcc5dd6
refactor: remove redundant condition
2021-07-21 09:39:58 +02:00
Leonardo de Moura
0943dc31fc
chore: update stage0
2021-07-20 10:42:28 -07:00
Leonardo de Moura
a019d8071f
chore: document simplified object header and remove obsolete cmake options
2021-07-20 10:42:28 -07:00
Leonardo de Moura
10122ba38b
chore: try to fix compilation error at CI
2021-07-20 10:42:28 -07:00
Leonardo de Moura
286136b3c7
fix: missing std::
2021-07-20 10:42:28 -07:00
Leonardo de Moura
fa8b842401
chore: update stage0
2021-07-20 10:42:28 -07:00
Leonardo de Moura
c59e72a77b
chore: cleaner lean_dec_ref, inline persistent object case
2021-07-20 10:42:28 -07:00
Leonardo de Moura
da66610fda
chore: cleanup
2021-07-20 10:42:28 -07:00
Leonardo de Moura
974caa97e6
chore: typo
2021-07-20 10:42:28 -07:00
Leonardo de Moura
e0132ea2f1
chore: update stage0
2021-07-20 10:42:28 -07:00
Leonardo de Moura
489b28085f
feat: simpler and faster RC
2021-07-20 10:42:28 -07: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