Leonardo de Moura
65bc3ca1eb
feat(library/type_context): allow nested tmp modes
...
TODO: The tmp_type_context class is obsolete after this change.
We should remove it.
2017-03-16 12:58:11 -07:00
Leonardo de Moura
11dcab1b31
fix(frontends/lean/elaborator): fixes #1458
2017-03-16 10:31:21 -07:00
Leonardo de Moura
22f391c0e1
feat(frontends/lean/elaborator): tolerate orphan bounded variables
...
The pretty printer is used to display ill-formed expressions,
and it uses type_context.
2017-03-16 10:22:52 -07:00
Leonardo de Moura
a897fd3f17
fix(frontends/lean): pattern matching in the declaration header
2017-03-16 01:09:12 -07:00
Leonardo de Moura
16392fda7d
chore(tests/lean/inductive_sorry): remove test
2017-03-15 20:37:53 -07:00
Daniel Selsam
cddf5f081d
fix(library/tactic/kabstract.cpp): only use replace_fn cache if replacing all occs
2017-03-15 19:40:52 -07:00
Daniel Selsam
9135e231f0
fix(tests/lean/inductive_sorry.lean): fix broken test
2017-03-15 19:40:52 -07:00
Leonardo de Moura
83fbb605f4
chore(tests/lean): fix tests
2017-03-15 19:40:52 -07:00
Leonardo de Moura
36770119b6
feat(library): do not generate C.destruct (for structures), and C.induction_on (for structures and inductive datatypes)
2017-03-15 14:45:13 -07:00
Daniel Selsam
7f56f23e70
chore(frontends/lean/inductive_cmds): allow sorrys
2017-03-15 14:06:56 -07:00
Sebastian Ullrich
e3b9190fe2
refactor(library/tactic/user_attribute): use attribute for registering attributes. naturally.
2017-03-15 14:06:34 -07:00
Sebastian Ullrich
c325438453
fix(frontends/lean/elaborator): let expr patterns
2017-03-15 14:06:08 -07:00
Sebastian Ullrich
647d7a8501
fix(frontends/lean/elaborator): expr patterns should ignore binding names
2017-03-15 14:06:00 -07:00
Leonardo de Moura
11a5f81197
test(tests/lean): add test for unification hints
2017-03-12 17:02:05 -07:00
Leonardo de Moura
abbc483246
chore(tests/lean/type_error_at_eval_expr): fix test
...
We should suppress the internal numerical ids when displaying this kind
of error message as suggested by @kha
2017-03-12 16:48:14 -07:00
Leonardo de Moura
8d409d7c63
feat(library/unification_hint): unification hint validation
2017-03-12 16:42:16 -07:00
Leonardo de Moura
e0e3f51c44
feat(library/init): add unification hint for add/succ
2017-03-12 13:45:30 -07:00
Leonardo de Moura
d1ace9e243
chore(library/unification_hint): add check
2017-03-12 12:19:12 -07:00
Leonardo de Moura
9bc378ea49
perf(library/unification_hint): improve performance
2017-03-12 12:07:51 -07:00
Leonardo de Moura
9ce9c0331f
feat(frontends/lean/elaborator): add option 'elaborator.coercion'
...
This option is available in Lean 2, but it was accidentally removed
from Lean 3.
2017-03-12 11:27:41 -07:00
Leonardo de Moura
bc7089dc70
chore(frontends/lean/elaborator): retract c58f61e
...
See discussion at #1438
2017-03-12 09:58:57 -07:00
Daniel Selsam
f3e71e52fc
feat(frontends/smt2/parser.cpp): allow tracing from the smt tactic
2017-03-12 09:54:09 -07:00
Daniel Selsam
aa209d89e7
fix(library/smt/prove.lean): collect_props was collecting (H : Prop)
2017-03-12 09:54:01 -07:00
Daniel Selsam
06233c32c2
perf(constructions/injective): avoid unnecessary app-builder invocation
2017-03-12 09:53:18 -07:00
Simon Hudon
58b9d0ae8e
feat(library/data/bitvec): to_nat and of_nat cancel each other
2017-03-12 09:38:57 -07:00
Simon Hudon
b6889e91fe
feat(lib/init/data/nat): add function pow and a Galois connection between div and mul
2017-03-12 09:38:19 -07:00
Leonardo de Moura
c694dbd600
fix(frontends/lean/elaborator): conflict between (: t :) and (::) notations
...
It was preventing us from using `(::)`
2017-03-12 09:29:42 -07:00
Daniel Selsam
89d0f1773e
chore(tests/lean/inductive_resultant_level_inferrence): update expected output
2017-03-11 18:46:55 -08:00
Leonardo de Moura
d37fd17725
fix(kernel/level): potential compiler specific behavior
2017-03-11 18:30:28 -08:00
Daniel Selsam
cdc24bae77
feat(library/constructions/injective): do not include propositions
2017-03-11 18:12:43 -08:00
Leonardo de Moura
95c93e7211
feat(library/constructions/no_confusion): do not include propositions
2017-03-11 17:36:04 -08:00
Leonardo de Moura
9c24b81cbf
feat(frontends/lean/elaborator): improve error message
2017-03-11 16:35:40 -08:00
Leonardo de Moura
d352ac4bcb
chore(tests/lean): fix tests
2017-03-11 12:20:42 -08:00
Leonardo de Moura
740d42ea45
fix(library/tactic): we should preserve names when using the revert/do_something/intro idiom
2017-03-11 12:20:39 -08:00
Leonardo de Moura
ab1a92ac3b
feat(tmp/micro_lenses): experiment with van Laarhoven-style lens
2017-03-11 11:35:02 -08:00
Leonardo de Moura
3a4cd38ba9
chore(library/init): remove reducible annotations for id, const, etc, and move $ notation to core.lean
2017-03-11 11:34:16 -08:00
Leonardo de Moura
2f6c4d91e4
feat(library/init/core): simplify proofs
2017-03-10 22:42:21 -08:00
Daniel Selsam
e72d516252
refactor(inductive_compiler): use subst to prove packs injective instead of constructors
2017-03-10 22:27:29 -08:00
Daniel Selsam
538ac8d187
feat(inductive_compiler): generate injectivity lemmas
2017-03-10 22:27:18 -08:00
Leonardo de Moura
98e93b73b2
feat(library/init/meta/name): add name.replace_prefix
2017-03-10 22:16:21 -08:00
Leonardo de Moura
300f6b2344
chore(tmp/micro_lenses): update
2017-03-10 18:42:15 -08:00
Sebastian Ullrich
e3bfd90b06
fix(frontends/lean/elaborator): default recover_from_error to false for most commands
...
Fixes #1446
fix(frontends/lean/util): quoting private name
uncovered by now failing run test
2017-03-09 20:51:35 -08:00
Leonardo de Moura
1b48d51cdd
fix(emacs/lean-syntax): new transient commands
2017-03-09 20:41:35 -08:00
Sebastian Ullrich
16558bf082
refactor(library,library): rename pre_monad to has_bind
2017-03-09 20:32:25 -08:00
Sebastian Ullrich
04f1d114a3
chore(script/gen_constants_cpp): make it run from anywhere
2017-03-09 20:30:03 -08:00
Sebastian Ullrich
763097dbd2
refactor(library): revise the monadic hierarchy
2017-03-09 20:30:03 -08:00
Leonardo de Moura
b0a33259ee
fix(library/compiler/simp_inductive): array^.data should not be treated as a regular projection
2017-03-09 19:11:51 -08:00
Leonardo de Moura
6916a8ceca
fix(library/compiler/inliner): inliner was unfolding constants aggressively when trying to reduce projections
...
@digama0 After this commit, your example will also produce a
non-destructive update.
```lean
structure test :=
(data1 : array nat 3)
(data2 : array nat 3)
(sz: nat)
def test.write (s : test) (i : fin 3) (v : nat) :=
{s with data1 := s^.data1^.write i v, data2 := s^.data2^.write i v}
set_option trace.array.update true
(fin.of_nat 1) 10 in
(a^.data1^.read (fin.of_nat 1), a^.data2^.read (fin.of_nat 2)) -- destructive write
```
2017-03-09 18:52:27 -08:00
Leonardo de Moura
9d3c0497cb
chore(frontends/lean): rename transient commands
...
See issue #1432
2017-03-09 18:41:19 -08:00
Leonardo de Moura
a00f2e49a7
chore(frontends/lean): remove several command aliases
...
We still have many more to remove and rename.
See issue #1432
2017-03-09 16:49:03 -08:00