Leonardo de Moura
bc89ebc19c
feat(kernel/inductive): improve how induction hypotheses are named
...
See doc/changes.md
2017-12-05 15:58:09 -08:00
Leonardo de Moura
9dd382f649
chore(tests/lean): fix tests
2017-12-05 15:36:58 -08:00
Leonardo de Moura
a2f55e5d7b
feat(library/tactic/induction_tactic): new name generator for induction and cases tactics
2017-12-05 14:57:36 -08:00
Leonardo de Moura
458958b9fc
feat(kernel/inductive): use ih to name induction hypothesis (instead of ih_1) when there is only one
2017-12-05 13:50:24 -08:00
Leonardo de Moura
0c5ecf6441
feat(library/init/meta/interactive): add iterate n { t }
2017-12-05 12:52:18 -08:00
Leonardo de Moura
52d939b885
chore(library/data/rbtree): use cases h : t to avoid generalize
2017-12-05 12:32:51 -08:00
Leonardo de Moura
6f943d77a2
feat(library/init/meta/interactive): add match_target pat interactive tactic
2017-12-05 12:25:17 -08:00
Leonardo de Moura
b1e8270172
chore(library/init/meta/match_tactic): fix typo
2017-12-05 12:11:04 -08:00
Leonardo de Moura
b5358b1b3e
chore(library/init/meta/interactive): add comment to avoid confusion
2017-12-05 12:07:17 -08:00
Leonardo de Moura
54004d4972
fix(library/tactic/cases_tactic): try to clear input hypothesis when performing dependent elimination
...
The `induction h` tactic tries to clear hypothesis `h` after it is
applied. But, before this commit, `cases h` would only try to clear `h`
when performing non-dependent elimination. This was problematic when
writing tactic scripts for automating proofs.
2017-12-05 11:03:46 -08:00
Leonardo de Moura
6d96741010
feat(library): provide names for constructor arguments
...
Motivation: `cases` and `induction` tactics use these names when the
user does not provide them.
2017-12-04 16:25:16 -08:00
Leonardo de Moura
51a87212fa
chore(frontends/lean/inductive_cmds): remove copy&paste code
2017-12-04 15:56:04 -08:00
Leonardo de Moura
c943576e5a
feat(library/init): add funext tactic
2017-12-04 14:54:39 -08:00
Leonardo de Moura
db46f01315
chore(library/init): replace iterate applications with repeat when appropriate
2017-12-04 13:04:46 -08:00
Leonardo de Moura
53c9737c70
feat(library/init): new repeat tactic
2017-12-04 12:55:53 -08:00
Leonardo de Moura
75aa94b34c
refactor(library): rename repeat ==> iterate
...
Reason: we will implement a new `repeat` tactic.
2017-12-04 12:34:59 -08:00
Leonardo de Moura
7b97e82fb3
chore(library): remove unnecessary repeat applications
2017-12-04 12:16:11 -08:00
Leonardo de Moura
d4e0dde063
chore(library/init/meta/relation_tactics): simplify subst_vars
2017-12-04 12:00:54 -08:00
Leonardo de Moura
b7322e28c1
feat(library): do not using simp lemmas for sorting arguments of AC operators by default
2017-12-03 15:03:58 -08:00
Leonardo de Moura
d9322b16ca
feat(library): add has_equiv type class
2017-12-03 15:03:58 -08:00
Leonardo de Moura
b6c8551753
feat(library): add to_bool lemmas
2017-12-03 15:03:58 -08:00
Leonardo de Moura
8032d2eefd
feat(library/init/algebra/order): add instance
2017-12-03 15:03:58 -08:00
Sebastian Ullrich
450ca5834c
fix(frontends/lean/parser): fix debug build
2017-11-30 17:47:49 +01:00
Sebastian Ullrich
1e1cd7378e
chore(bin/lean-gdb): add pretty printer for lean::level
2017-11-30 17:47:49 +01:00
Sebastian Ullrich
0ca9eb16c1
fix(library/type_context): preprocess_class: always solve universe mvars in inout
2017-11-29 17:21:02 -08:00
Leonardo de Moura
4fdf452b17
fix(library/type_context): make sure all assigned metavariables are substituted
2017-11-29 17:19:15 -08:00
Leonardo de Moura
04f3684681
fix(library/tactic/cases_tactic): debug build
2017-11-29 15:05:19 -08:00
Sebastian Ullrich
c521a2d3c7
fix(library/type_context): do not cache queries containing tmp mvars
2017-11-29 14:43:33 -08:00
Leonardo de Moura
960832045f
fix(library/type_context): failure condition
2017-11-29 14:35:58 -08:00
Leonardo de Moura
a411e6337c
chore(library/type_context): typo
2017-11-29 14:35:36 -08:00
Leonardo de Moura
49b5fbe2c2
fix(library/type_context): add missing update
...
We also improved the comments, and documented alternative designs that
have been considered.
2017-11-28 08:07:11 -08:00
Sebastian Ullrich
f6b113849b
fix(init/category/monad): bind_pure: remove stray parameter
2017-11-28 17:00:22 +01:00
Leonardo de Moura
641a4548b6
fix(library/tactic/cases_tactic): use inj_arrow instead no_confusion when index is a nested and/or mutually recursive datatype
...
The `no_confusion` construction is only generated for inductive
datatypes supported in the kernel.
Before this commit, given `h : T`, `cases h` could leak the internal encoding
used by the inductive compiler WHEN a nested and/or mutual inductive
datatype is used to index the inductive datatype `T`.
The new test exposes the problem.
The solution implemented in this commit uses inj_arrow lemmas
generated by the inductive compiler. We only use the lemmas
if the target is a proposition. If it is not, we sign an error.
The reason for this limitation is documented in the source code.
cc @jroesch @dselsam
Jared: the information leakage has been fixed. So, students will not be
confused by the internal encoding used in the inductive compiler.
I added the example I posted on slack as a new test.
Note that, the workaround I used has been removed.
2017-11-27 21:56:35 -08:00
Sebastian Ullrich
7c63b2f046
fix(frontends/lean/parser): unicode pattern aliases
2017-11-27 12:43:15 +01:00
Sebastian Ullrich
18cf63e37f
fix(frontends/lean/elaborator): avoid assertion error on delayed abstraction in structure notation
2017-11-24 21:27:55 +01:00
Leonardo de Moura
e12275a925
perf(library/equations_compiler/elim_match): use max_sharing
2017-11-22 16:41:42 -08:00
Leonardo de Moura
47994fe14e
chore(library): remove id_locked
2017-11-22 16:29:04 -08:00
Leonardo de Moura
64f575a2d5
perf(library/equations_compiler): performance problem for definitions that produce many equational lemmas
...
The new test and comment at src/library/equations_compiler/util.cpp
explains the issue.
2017-11-22 16:16:11 -08:00
Leonardo de Moura
dd9d8e9552
chore(library/equations_compiler): improve comments
2017-11-22 14:55:40 -08:00
Leonardo de Moura
01bbf27fb0
fix(library/equations_compiler/util): typo
2017-11-22 12:50:23 -08:00
Leonardo de Moura
7c35a25169
fix(frontends/lean): do not generate equation lemma for match expressions occurring in by tac nested in regular definitions
2017-11-22 12:49:32 -08:00
Leonardo de Moura
7d3133a845
fix(frontends/lean/structure_cmd): do not generate equation lemma for _default meta definitions
2017-11-22 12:24:51 -08:00
Sebastian Ullrich
30cfc6cf0b
feat(frontends/lean/{parser,elaborator}): structure instance patterns
2017-11-22 12:16:28 -08:00
Sebastian Ullrich
511bf69dd4
chore(tests): forgot to commit structure instance test
2017-11-22 12:16:28 -08:00
Sebastian Ullrich
b3587e15a3
fix(library/tactic/user_attribute): persist user attribute parameters
...
Fixes #1871
2017-11-22 19:19:05 +01:00
Leonardo de Moura
c98c39e4b9
chore(library/init/data/rbtree/basic): remove unnecessary equation
2017-11-22 08:22:42 -08:00
Leonardo de Moura
0a1d2908aa
feat(library/data/rbtree/main): rbtrees are balanced
2017-11-22 08:02:13 -08:00
Leonardo de Moura
b95b260706
fix(library/data/rbtree): insert
2017-11-22 07:52:18 -08:00
Leonardo de Moura
0208755c82
fix(library/vm/vm_string): bug at VM string <
2017-11-21 16:26:36 -08:00
Leonardo de Moura
96f8ecbdcb
feat(library/data/rbmap): add find_insert lemmas for rbmap
2017-11-21 14:29:04 -08:00